(function (_, $module$react, $module$react_router_h6p15h, com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk, $module$libphonenumber_js_s63wkw, XXH, $module$react_router_dom_s6xi74, $module$uuid, kotlin_kotlin, kotlin_dev_icerock_moko_resources, kotlin_com_ustadmobile_app_lib_database, kotlin_org_kodein_di_kodein_di, kotlin_org_kodein_type_kaverit, kotlin_com_github_UstadMobile_door_door_runtime, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_github_pdvrieze_xmlutil_serialization, kotlin_io_github_pdvrieze_xmlutil_core, kotlin_io_github_aakira_napier, kotlin_com_benasher44_uuid, kotlin_com_ustadmobile_app_lib_util, kotlin_org_jetbrains_kotlinx_kotlinx_datetime, kotlin_net_thauvin_erik_urlencoder_urlencoder_lib, kotlin_com_github_UstadMobile_xmlpullparserkmp, kotlin_org_jetbrains_kotlinx_kotlinx_io_core, kotlin_io_ktor_ktor_utils, kotlin_app_cash_paging_paging_common, kotlin_moe_tlaster_precompose_viewmodel, kotlin_io_ktor_ktor_io, kotlin_com_russhwolf_multiplatform_settings, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react, kotlin_org_jetbrains_kotlin_wrappers_kotlin_web, kotlin_org_jetbrains_kotlin_wrappers_kotlin_js) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var createContext = $module$react.createContext;
  var useState = $module$react.useState;
  var useNavigate = $module$react_router_h6p15h.useNavigate;
  var useLocation = $module$react_router_h6p15h.useLocation;
  var useMemo = $module$react.useMemo;
  var useState_0 = $module$react.useState;
  var parsePhoneNumber = $module$libphonenumber_js_s63wkw.parsePhoneNumber;
  var useSearchParams = $module$react_router_dom_s6xi74.useSearchParams;
  var v4 = $module$uuid.v4;
  var THROW_CCE = kotlin_kotlin.$_$.fi;
  var SupportedLocale = kotlin_dev_icerock_moko_resources.$_$.b;
  var listOf = kotlin_kotlin.$_$.j8;
  var SupportedLocales = kotlin_dev_icerock_moko_resources.$_$.a;
  var Impl = kotlin_dev_icerock_moko_resources.$_$.d;
  var StringResource = kotlin_dev_icerock_moko_resources.$_$.f;
  var protoOf = kotlin_kotlin.$_$.uc;
  var objectMeta = kotlin_kotlin.$_$.tc;
  var setMetadataFor = kotlin_kotlin.$_$.vc;
  var PluralsResource = kotlin_dev_icerock_moko_resources.$_$.e;
  var VOID = kotlin_kotlin.$_$.f;
  var getBooleanHashCode = kotlin_kotlin.$_$.pb;
  var equals = kotlin_kotlin.$_$.mb;
  var classMeta = kotlin_kotlin.$_$.jb;
  var IllegalStateException = kotlin_kotlin.$_$.wh;
  var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.b2;
  var captureStack = kotlin_kotlin.$_$.db;
  var CoroutineImpl = kotlin_kotlin.$_$.ta;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.fa;
  var PersonAuth2 = kotlin_com_ustadmobile_app_lib_database.$_$.i4;
  var Companion_instance = kotlin_com_ustadmobile_app_lib_database.$_$.p7;
  var Unit_instance = kotlin_kotlin.$_$.m5;
  var Companion_instance_0 = kotlin_org_kodein_di_kodein_di.$_$.c;
  var getKClass = kotlin_kotlin.$_$.e;
  var arrayOf = kotlin_kotlin.$_$.ui;
  var createKType = kotlin_kotlin.$_$.b;
  var typeToken = kotlin_org_kodein_type_kaverit.$_$.d;
  var TypeToken = kotlin_org_kodein_type_kaverit.$_$.b;
  var isInterface = kotlin_kotlin.$_$.ec;
  var On = kotlin_org_kodein_di_kodein_di.$_$.n;
  var Companion_instance_1 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.z2;
  var UmAppDatabase = kotlin_com_ustadmobile_app_lib_database.$_$.j;
  var Instance = kotlin_org_kodein_di_kodein_di.$_$.m;
  var InstanceOrNull = kotlin_org_kodein_di_kodein_di.$_$.l;
  var get_diContext = kotlin_org_kodein_di_kodein_di.$_$.i;
  var get_diTrigger = kotlin_org_kodein_di_kodein_di.$_$.j;
  var DIAware = kotlin_org_kodein_di_kodein_di.$_$.k;
  var KProperty1 = kotlin_kotlin.$_$.td;
  var getPropertyCallableRef = kotlin_kotlin.$_$.sb;
  var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u2;
  var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w;
  var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f;
  var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p2;
  var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q2;
  var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
  var objectCreate = kotlin_kotlin.$_$.sc;
  var getStringHashCode = kotlin_kotlin.$_$.tb;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
  var StandardScopeRegistry = kotlin_org_kodein_di_kodein_di.$_$.g;
  var $serializer_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.n7;
  var $serializer_getInstance_0 = kotlin_com_ustadmobile_app_lib_database.$_$.r7;
  var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;
  var $serializer_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.d8;
  var $serializer_getInstance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.u7;
  var removePrefix = kotlin_kotlin.$_$.pf;
  var removeSuffix = kotlin_kotlin.$_$.qf;
  var hashCode = kotlin_kotlin.$_$.ub;
  var compareValues = kotlin_kotlin.$_$.da;
  var List = kotlin_kotlin.$_$.w5;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.n6;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l;
  var UserSession = kotlin_com_ustadmobile_app_lib_database.$_$.y4;
  var Person = kotlin_com_ustadmobile_app_lib_database.$_$.n4;
  var sortedWith = kotlin_kotlin.$_$.m9;
  var plus = kotlin_kotlin.$_$.x8;
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x1;
  var get_direct = kotlin_org_kodein_di_kodein_di.$_$.o;
  var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k2;
  var collectLatest = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
  var PersonAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.f1;
  var shallowCopy = kotlin_com_ustadmobile_app_lib_database.$_$.t1;
  var KProperty0 = kotlin_kotlin.$_$.sd;
  var THROW_ISE = kotlin_kotlin.$_$.hi;
  var getLocalDelegateReference = kotlin_kotlin.$_$.qb;
  var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.q;
  var Pair = kotlin_kotlin.$_$.ci;
  var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.a;
  var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u3;
  var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
  var get_doorPrimaryKeyManager = kotlin_com_github_UstadMobile_door_door_runtime.$_$.k;
  var Companion_instance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.e8;
  var get_doorWrapperNodeId = kotlin_com_github_UstadMobile_door_door_runtime.$_$.l;
  var systemTimeInMillis = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b2;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
  var listOf_0 = kotlin_kotlin.$_$.i8;
  var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;
  var StringCompanionObject_instance = kotlin_kotlin.$_$.a5;
  var serializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b1;
  var ListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;
  var toSet = kotlin_kotlin.$_$.y9;
  var toList = kotlin_kotlin.$_$.r9;
  var Long = kotlin_kotlin.$_$.yh;
  var Comparator = kotlin_kotlin.$_$.ph;
  var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b1;
  var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.k;
  var url = kotlin_io_ktor_ktor_client_core.$_$.o;
  var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
  var contentType = kotlin_io_ktor_ktor_http.$_$.g1;
  var setBodyJson = kotlin_com_github_UstadMobile_door_door_runtime.$_$.q;
  var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.h;
  var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.r;
  var Exception_init_$Create$ = kotlin_kotlin.$_$.n1;
  var withDoorTransactionAsync = kotlin_com_github_UstadMobile_door_door_runtime.$_$.u2;
  var NodeIdAndAuth = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b;
  var toHexString = kotlin_kotlin.$_$.qg;
  var to = kotlin_kotlin.$_$.mj;
  var DoorDatabaseRepository = kotlin_com_github_UstadMobile_door_door_runtime.$_$.e2;
  var parameter = kotlin_io_ktor_ktor_client_core.$_$.n;
  var header = kotlin_io_ktor_ktor_client_core.$_$.m;
  var set_expectSuccess = kotlin_io_ktor_ktor_client_core.$_$.h;
  var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.j;
  var UmAccount = kotlin_com_ustadmobile_app_lib_database.$_$.x4;
  var ensureNotNull = kotlin_kotlin.$_$.yi;
  var addAll = kotlin_kotlin.$_$.e6;
  var Companion_instance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.o7;
  var Companion_instance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.q7;
  var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.u;
  var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.o;
  var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
  var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u;
  var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y1;
  var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w1;
  var MutableStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d1;
  var asStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
  var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k;
  var isCharSequence = kotlin_kotlin.$_$.ac;
  var trim = kotlin_kotlin.$_$.hh;
  var toString = kotlin_kotlin.$_$.zc;
  var buildClassSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1;
  var XmlInput = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.c;
  var EventType_END_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d;
  var EventType_START_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.f;
  var XmlSerialName = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.e;
  var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n2;
  var emptyList = kotlin_kotlin.$_$.i7;
  var XmlValue = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.f;
  var Regex_init_$Create$ = kotlin_kotlin.$_$.d1;
  var contains = kotlin_kotlin.$_$.oe;
  var firstOrNull = kotlin_kotlin.$_$.n7;
  var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s2;
  var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
  var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
  var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;
  var IllegalArgumentException = kotlin_kotlin.$_$.vh;
  var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.v1;
  var $serializer_getInstance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.w6;
  var $serializer_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.t6;
  var mapOf = kotlin_kotlin.$_$.m8;
  var Companion_instance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.i6;
  var Companion_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.x6;
  var interfaceMeta = kotlin_kotlin.$_$.vb;
  var Exception = kotlin_kotlin.$_$.uh;
  var Exception_init_$Init$ = kotlin_kotlin.$_$.m1;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.u1;
  var shallowCopy_0 = kotlin_com_ustadmobile_app_lib_database.$_$.q1;
  var Napier_getInstance = kotlin_io_github_aakira_napier.$_$.g;
  var uuid4 = kotlin_com_benasher44_uuid.$_$.a;
  var Companion_getInstance_2 = kotlin_kotlin.$_$.g5;
  var serializer_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;
  var MapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
  var plus_0 = kotlin_kotlin.$_$.r8;
  var XapiSessionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.r2;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.f2;
  var compareTo = kotlin_kotlin.$_$.kb;
  var mapOf_0 = kotlin_kotlin.$_$.l8;
  var shallowCopy_1 = kotlin_com_ustadmobile_app_lib_database.$_$.w1;
  var PersonNames = kotlin_com_ustadmobile_app_lib_database.$_$.g1;
  var first = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
  var toLong = kotlin_kotlin.$_$.xc;
  var toString_0 = kotlin_kotlin.$_$.lj;
  var CancellationException = kotlin_kotlin.$_$.ea;
  var Enum = kotlin_kotlin.$_$.sh;
  var Companion_instance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.y6;
  var Companion_instance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.v7;
  var Companion_instance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.f7;
  var Companion_instance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.a7;
  var Companion_instance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.u6;
  var charSequenceLength = kotlin_kotlin.$_$.hb;
  var Companion_getInstance_3 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.c3;
  var get_isActive = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i2;
  var delay = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
  var TransferJobItemStatus_COMPLETE_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.z4;
  var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
  var plus_1 = kotlin_kotlin.$_$.y8;
  var Companion_instance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.v6;
  var Companion_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.h6;
  var randomString = kotlin_com_ustadmobile_app_lib_util.$_$.c;
  var Companion_instance_12 = kotlin_com_ustadmobile_app_lib_database.$_$.j6;
  var Companion_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.e7;
  var CoursePermission = kotlin_com_ustadmobile_app_lib_database.$_$.u3;
  var Exception_init_$Init$_0 = kotlin_kotlin.$_$.l1;
  var IllegalStateException_init_$Init$_0 = kotlin_kotlin.$_$.x1;
  var Companion_instance_13 = kotlin_com_ustadmobile_app_lib_database.$_$.k7;
  var ClazzEnrolment_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.f5;
  var Companion_getInstance_6 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.e;
  var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.s1;
  var EnrolmentRequest = kotlin_com_ustadmobile_app_lib_database.$_$.y3;
  var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.i;
  var lazy = kotlin_kotlin.$_$.dj;
  var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.h2;
  var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v2;
  var enumEntries = kotlin_kotlin.$_$.xa;
  var INT_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i;
  var PrimitiveSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l1;
  var mapCapacity = kotlin_kotlin.$_$.k8;
  var coerceAtLeast = kotlin_kotlin.$_$.hd;
  var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u;
  var UrlEncoderUtil_getInstance = kotlin_net_thauvin_erik_urlencoder_urlencoder_lib.$_$.a;
  var doorNodeIdHeader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.j;
  var $serializer_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.q6;
  var setInputString = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.c;
  var substringBeforeLast = kotlin_kotlin.$_$.eg;
  var Collection = kotlin_kotlin.$_$.p5;
  var ContentEntryParentChildJoin = kotlin_com_ustadmobile_app_lib_database.$_$.g3;
  var toMutableList = kotlin_kotlin.$_$.v9;
  var checkIndexOverflow = kotlin_kotlin.$_$.l6;
  var Companion_instance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.z6;
  var getOrNull = kotlin_kotlin.$_$.s7;
  var Companion_instance_15 = kotlin_com_ustadmobile_app_lib_database.$_$.i7;
  var Companion_instance_16 = kotlin_com_ustadmobile_app_lib_database.$_$.s6;
  var plus_2 = kotlin_kotlin.$_$.v8;
  var startsWith = kotlin_kotlin.$_$.yf;
  var emptySet = kotlin_kotlin.$_$.k7;
  var first_0 = kotlin_kotlin.$_$.p7;
  var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.f;
  var endsWith = kotlin_kotlin.$_$.ve;
  var readTo = kotlin_org_jetbrains_kotlinx_kotlinx_io_core.$_$.a;
  var closeFinally = kotlin_kotlin.$_$.vi;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.u2;
  var substringAfterLast = kotlin_kotlin.$_$.ag;
  var charSequenceGet = kotlin_kotlin.$_$.gb;
  var Char = kotlin_kotlin.$_$.nh;
  var isDigit = kotlin_kotlin.$_$.df;
  var toString_1 = kotlin_kotlin.$_$.c3;
  var isLetter = kotlin_kotlin.$_$.ff;
  var joinToString = kotlin_kotlin.$_$.z7;
  var emptyMap = kotlin_kotlin.$_$.j7;
  var until = kotlin_kotlin.$_$.pd;
  var PeerReviewerAllocation = kotlin_com_ustadmobile_app_lib_database.$_$.g4;
  var Companion_instance_17 = kotlin_com_ustadmobile_app_lib_database.$_$.m7;
  var toMap = kotlin_kotlin.$_$.u9;
  var checkCountOverflow = kotlin_kotlin.$_$.k6;
  var shuffled = kotlin_kotlin.$_$.j9;
  var shallowCopy_2 = kotlin_com_ustadmobile_app_lib_database.$_$.c2;
  var SystemPermission = kotlin_com_ustadmobile_app_lib_database.$_$.t4;
  var Companion_instance_18 = kotlin_com_ustadmobile_app_lib_database.$_$.s7;
  var PersonParentJoin = kotlin_com_ustadmobile_app_lib_database.$_$.l4;
  var Companion_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.b8;
  var IllegalArgumentException_init_$Init$_0 = kotlin_kotlin.$_$.t1;
  var filterNotNull = kotlin_kotlin.$_$.m7;
  var Iterator = kotlin_kotlin.$_$.t5;
  var numberToLong = kotlin_kotlin.$_$.rc;
  var indexOf = kotlin_kotlin.$_$.bf;
  var isWhitespace = kotlin_kotlin.$_$.jf;
  var setOf = kotlin_kotlin.$_$.i9;
  var firstOrNull_0 = kotlin_kotlin.$_$.xe;
  var Companion_instance_19 = kotlin_com_ustadmobile_app_lib_database.$_$.x5;
  var distinct = kotlin_kotlin.$_$.f7;
  var Exception_init_$Init$_1 = kotlin_kotlin.$_$.o1;
  var Json_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.n;
  var uuidFrom = kotlin_com_benasher44_uuid.$_$.b;
  var Companion_getInstance_8 = kotlin_kotlin.$_$.e5;
  var _Duration___get_inWholeMilliseconds__impl__msfiry = kotlin_kotlin.$_$.s2;
  var XapiEntityObjectTypeFlags_instance = kotlin_com_ustadmobile_app_lib_database.$_$.d6;
  var plus_3 = kotlin_kotlin.$_$.u8;
  var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.c;
  var Uuid_init_$Create$ = kotlin_com_benasher44_uuid.$_$.c;
  var encodeBase64 = kotlin_io_ktor_ktor_utils.$_$.v;
  var get_jsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.v;
  var get_intOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.t;
  var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;
  var Companion_instance_20 = kotlin_com_ustadmobile_app_lib_database.$_$.y5;
  var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.c5;
  var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
  var ActivityEntity = kotlin_com_ustadmobile_app_lib_database.$_$.g2;
  var Companion_instance_21 = kotlin_com_ustadmobile_app_lib_database.$_$.z5;
  var Companion_instance_22 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
  var ActivityExtensionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.h2;
  var ActivityLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.j2;
  var ActivityInteractionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.i2;
  var JsonContentPolymorphicSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.g;
  var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.u;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.fj;
  var ActorEntity = kotlin_com_ustadmobile_app_lib_database.$_$.k2;
  var JsonDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;
  var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.y1;
  var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.j;
  var Companion_instance_23 = kotlin_com_ustadmobile_app_lib_database.$_$.b6;
  var StatementContextActivityJoin = kotlin_com_ustadmobile_app_lib_database.$_$.m2;
  var Companion_instance_24 = kotlin_com_ustadmobile_app_lib_database.$_$.a6;
  var GroupMemberActorJoin = kotlin_com_ustadmobile_app_lib_database.$_$.l2;
  var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s3;
  var THROW_IAE = kotlin_kotlin.$_$.gi;
  var FloatSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;
  var getNumberHashCode = kotlin_kotlin.$_$.rb;
  var StatementEntity = kotlin_com_ustadmobile_app_lib_database.$_$.o2;
  var StatementEntityJson = kotlin_com_ustadmobile_app_lib_database.$_$.n2;
  var JsonNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;
  var VerbEntity = kotlin_com_ustadmobile_app_lib_database.$_$.p2;
  var VerbLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.q2;
  var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.g;
  var toDuration = kotlin_kotlin.$_$.kh;
  var Duration__toIsoString_impl_9h6wsm = kotlin_kotlin.$_$.t2;
  var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;
  var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
  var $serializer_getInstance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.e6;
  var values = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.j;
  var split = kotlin_kotlin.$_$.xf;
  var isBlank = kotlin_kotlin.$_$.cf;
  var toInt = kotlin_kotlin.$_$.sg;
  var sorted = kotlin_kotlin.$_$.n9;
  var Module_init_$Create$ = kotlin_org_kodein_di_kodein_di.$_$.a;
  var ImplWithScope = kotlin_org_kodein_di_kodein_di.$_$.h;
  var Provider = kotlin_org_kodein_di_kodein_di.$_$.d;
  var Singleton = kotlin_org_kodein_di_kodein_di.$_$.f;
  var Companion_instance_25 = kotlin_com_ustadmobile_app_lib_database.$_$.w7;
  var Companion_instance_26 = kotlin_com_ustadmobile_app_lib_database.$_$.c6;
  var Companion_instance_27 = kotlin_com_ustadmobile_app_lib_database.$_$.p6;
  var Companion_instance_28 = kotlin_com_ustadmobile_app_lib_database.$_$.y7;
  var BufferOverflow_DROP_OLDEST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
  var MutableSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c1;
  var asSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f1;
  var PagingSource = kotlin_app_cash_paging_paging_common.$_$.i;
  var Page_init_$Create$ = kotlin_app_cash_paging_paging_common.$_$.j;
  var LoadResult = kotlin_app_cash_paging_paging_common.$_$.h;
  var JsonPrimitive_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.k;
  var XmlPullParserConstants_instance = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.d;
  var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.b3;
  var mutableLinkedListOf = kotlin_com_github_UstadMobile_door_door_runtime.$_$.m;
  var ChannelResult__getOrThrow_impl_od1axs = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o;
  var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
  var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y;
  var fillArrayVal = kotlin_kotlin.$_$.ob;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f1;
  var indexOf_0 = kotlin_kotlin.$_$.af;
  var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.w2;
  var lastIndexOf = kotlin_kotlin.$_$.lf;
  var HashMap_init_$Create$ = kotlin_kotlin.$_$.p;
  var round = kotlin_kotlin.$_$.dd;
  var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.h;
  var lazy_0 = kotlin_kotlin.$_$.ej;
  var roundToInt = kotlin_kotlin.$_$.cd;
  var substringBefore = kotlin_kotlin.$_$.hg;
  var Companion_instance_29 = kotlin_com_ustadmobile_app_lib_database.$_$.r6;
  var timeout = kotlin_io_ktor_ktor_client_core.$_$.i;
  var Companion_instance_30 = kotlin_com_ustadmobile_app_lib_database.$_$.z7;
  var Companion_getInstance_9 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.i;
  var toLocalDateTime = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.q;
  var toInstant = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.o;
  var periodUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.n;
  var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.f;
  var LocalTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
  var LocalDateTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.a;
  var distinctUntilChanged = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j1;
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
  var Companion_getInstance_10 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.d;
  var minus = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.l;
  var mutableMapOf = kotlin_kotlin.$_$.p8;
  var toMap_0 = kotlin_kotlin.$_$.t9;
  var substringBefore_0 = kotlin_kotlin.$_$.gg;
  var toMutableSet = kotlin_kotlin.$_$.x9;
  var titlecase = kotlin_kotlin.$_$.jg;
  var isLowerCase = kotlin_kotlin.$_$.hf;
  var offsetAt = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.m;
  var PersonGroup = kotlin_com_ustadmobile_app_lib_database.$_$.j4;
  var PersonGroupMember_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.g5;
  var ScopedGrant = kotlin_com_ustadmobile_app_lib_database.$_$.p4;
  var abs = kotlin_kotlin.$_$.ad;
  var padStart = kotlin_kotlin.$_$.of;
  var equals_0 = kotlin_kotlin.$_$.we;
  var SerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p1;
  var toLong_0 = kotlin_kotlin.$_$.vg;
  var LanguageDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.n5;
  var LeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.e4;
  var Companion_getInstance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.l7;
  var lastOrNull = kotlin_kotlin.$_$.f8;
  var ViewModel = kotlin_moe_tlaster_precompose_viewmodel.$_$.b;
  var ViewModel_init_$Init$ = kotlin_moe_tlaster_precompose_viewmodel.$_$.a;
  var get_viewModelScope = kotlin_moe_tlaster_precompose_viewmodel.$_$.c;
  var toMutableMap = kotlin_kotlin.$_$.w9;
  var Companion_instance_31 = kotlin_com_ustadmobile_app_lib_database.$_$.f6;
  var toBoolean = kotlin_kotlin.$_$.lg;
  var ByteReadPacket = kotlin_io_ktor_ktor_io.$_$.u;
  var Companion_getInstance_12 = kotlin_io_ktor_ktor_http.$_$.f;
  var HeadersBuilder = kotlin_io_ktor_ktor_http.$_$.w;
  var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
  var FormItem = kotlin_io_ktor_ktor_http.$_$.u;
  var FileItem = kotlin_io_ktor_ktor_http.$_$.t;
  var substringAfterLast_0 = kotlin_kotlin.$_$.bg;
  var MultiPartFormDataContent = kotlin_io_ktor_ktor_client_core.$_$.j;
  var JsType_instance = kotlin_io_ktor_ktor_utils.$_$.b;
  var typeInfoImpl = kotlin_io_ktor_ktor_utils.$_$.k;
  var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.q;
  var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
  var isSuccess = kotlin_io_ktor_ktor_http.$_$.l1;
  var printStackTrace = kotlin_kotlin.$_$.hj;
  var PermissionFlags_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.p5;
  var ClazzAndDetailPermissions = kotlin_com_ustadmobile_app_lib_database.$_$.m;
  var mutableListOf = kotlin_kotlin.$_$.o8;
  var PermissionTriple = kotlin_com_ustadmobile_app_lib_database.$_$.c1;
  var ClazzAndDisplayDetails = kotlin_com_ustadmobile_app_lib_database.$_$.n;
  var combine = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i1;
  var Companion_getInstance_13 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r;
  var shareIn = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
  var CoursePicture = kotlin_com_ustadmobile_app_lib_database.$_$.v3;
  var shallowCopy_3 = kotlin_com_ustadmobile_app_lib_database.$_$.e2;
  var ClazzWithHolidayCalendarAndAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.b3;
  var getDefaultTimeZoneId = kotlin_com_ustadmobile_app_lib_util.$_$.a;
  var CourseBlockPicture = kotlin_com_ustadmobile_app_lib_database.$_$.p3;
  var CourseBlockAndEditEntities = kotlin_com_ustadmobile_app_lib_database.$_$.v;
  var Schedule = kotlin_com_ustadmobile_app_lib_database.$_$.o4;
  var CourseTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.w3;
  var Companion_instance_32 = kotlin_com_ustadmobile_app_lib_database.$_$.o6;
  var Companion_getInstance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.u5;
  var shallowCopy_4 = kotlin_com_ustadmobile_app_lib_database.$_$.z1;
  var deactivateByUids = kotlin_com_ustadmobile_app_lib_database.$_$.c5;
  var deactivateByUids_0 = kotlin_com_ustadmobile_app_lib_database.$_$.d5;
  var deactivateByUids_1 = kotlin_com_ustadmobile_app_lib_database.$_$.e5;
  var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d2;
  var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
  var Companion_instance_33 = kotlin_com_ustadmobile_app_lib_database.$_$.h7;
  var $serializer_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.x7;
  var $serializer_getInstance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.t5;
  var $serializer_getInstance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.n6;
  var BlockStatus = kotlin_com_ustadmobile_app_lib_database.$_$.l;
  var Page = kotlin_app_cash_paging_paging_common.$_$.g;
  var Invalid = kotlin_app_cash_paging_paging_common.$_$.f;
  var Error_0 = kotlin_app_cash_paging_paging_common.$_$.e;
  var StudentAndBlockStatuses = kotlin_com_ustadmobile_app_lib_database.$_$.i1;
  var PagingSourceWithHttpLoader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.q1;
  var DelegatedInvalidationPagingSource = kotlin_com_github_UstadMobile_door_door_runtime.$_$.k1;
  var ClazzEnrolmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.j5;
  var ClazzDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.i5;
  var PermissionPair = kotlin_com_ustadmobile_app_lib_database.$_$.b1;
  var first_1 = kotlin_kotlin.$_$.q7;
  var eachCount = kotlin_kotlin.$_$.h7;
  var AverageCourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.v2;
  var CourseAssignmentMarkAndMarkerName = kotlin_com_ustadmobile_app_lib_database.$_$.t;
  var SubmissionAndFiles = kotlin_com_ustadmobile_app_lib_database.$_$.j1;
  var ClazzAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.x2;
  var AssignmentProgressSummary = kotlin_com_ustadmobile_app_lib_database.$_$.s2;
  var ClazzAssignmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.h5;
  var ClazzAssignmentCourseBlockAndSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.w2;
  var throwKotlinNothingValueException = kotlin_kotlin.$_$.ij;
  var CourseAssignmentSubmission = kotlin_com_ustadmobile_app_lib_database.$_$.o3;
  var Comments = kotlin_com_ustadmobile_app_lib_database.$_$.d3;
  var CourseAssignmentSubmissionFile = kotlin_com_ustadmobile_app_lib_database.$_$.n3;
  var CourseAssignmentMarkDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.l5;
  var CourseGroupSet = kotlin_com_ustadmobile_app_lib_database.$_$.t3;
  var shallowCopy_5 = kotlin_com_ustadmobile_app_lib_database.$_$.a2;
  var CourseBlock = kotlin_com_ustadmobile_app_lib_database.$_$.q3;
  var $serializer_getInstance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.g7;
  var AssignmentSubmitterSummary = kotlin_com_ustadmobile_app_lib_database.$_$.u2;
  var AssignmentSubmitterAndAllocations = kotlin_com_ustadmobile_app_lib_database.$_$.t2;
  var Companion_getInstance_15 = kotlin_com_ustadmobile_app_lib_database.$_$.g6;
  var CourseBlockAndAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.u;
  var AssignmentPermissionAndActiveUserSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.k;
  var CourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.m3;
  var ClazzNameAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.o;
  var ClazzEnrolmentWithLeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.y2;
  var Companion_instance_34 = kotlin_com_ustadmobile_app_lib_database.$_$.k6;
  var flowOf = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l1;
  var Clazz = kotlin_com_ustadmobile_app_lib_database.$_$.c3;
  var Companion_instance_35 = kotlin_com_ustadmobile_app_lib_database.$_$.l6;
  var ClazzLog = kotlin_com_ustadmobile_app_lib_database.$_$.a3;
  var shallowCopy_6 = kotlin_com_ustadmobile_app_lib_database.$_$.y1;
  var Companion_instance_36 = kotlin_com_ustadmobile_app_lib_database.$_$.m6;
  var Companion_instance_37 = kotlin_com_ustadmobile_app_lib_database.$_$.v5;
  var ClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.z2;
  var PersonAndClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.d1;
  var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q1;
  var shallowCopy_7 = kotlin_com_ustadmobile_app_lib_database.$_$.o1;
  var ContentEntryAndDetail = kotlin_com_ustadmobile_app_lib_database.$_$.r;
  var ContentEntryVersion = kotlin_com_ustadmobile_app_lib_database.$_$.k3;
  var OfflineItemAndState = kotlin_com_ustadmobile_app_lib_database.$_$.a1;
  var Companion_instance_38 = kotlin_com_ustadmobile_app_lib_database.$_$.c8;
  var Companion_instance_39 = kotlin_com_ustadmobile_app_lib_database.$_$.s5;
  var shallowCopy_8 = kotlin_com_ustadmobile_app_lib_database.$_$.x1;
  var ContentEntryPicture2 = kotlin_com_ustadmobile_app_lib_database.$_$.h3;
  var ContentEntryAndContentJob = kotlin_com_ustadmobile_app_lib_database.$_$.q;
  var ContentEntry = kotlin_com_ustadmobile_app_lib_database.$_$.l3;
  var ContentEntryImportJob = kotlin_com_ustadmobile_app_lib_database.$_$.f3;
  var Companion_instance_40 = kotlin_com_ustadmobile_app_lib_database.$_$.r5;
  var setOf_0 = kotlin_kotlin.$_$.h9;
  var ContentEntryDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.k5;
  var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w2;
  var CourseBlockAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.w;
  var CourseGroupMemberAndName = kotlin_com_ustadmobile_app_lib_database.$_$.r3;
  var CourseGroupMember = kotlin_com_ustadmobile_app_lib_database.$_$.s3;
  var Companion_instance_41 = kotlin_com_ustadmobile_app_lib_database.$_$.b7;
  var Companion_instance_42 = kotlin_com_ustadmobile_app_lib_database.$_$.c7;
  var Companion_instance_43 = kotlin_com_ustadmobile_app_lib_database.$_$.d7;
  var shallowCopy_9 = kotlin_com_ustadmobile_app_lib_database.$_$.s1;
  var CourseGroupSetDaoConstants_instance = kotlin_com_ustadmobile_app_lib_database.$_$.m5;
  var shallowCopy_10 = kotlin_com_ustadmobile_app_lib_database.$_$.p1;
  var DiscussionPost = kotlin_com_ustadmobile_app_lib_database.$_$.x3;
  var Companion_instance_44 = kotlin_com_ustadmobile_app_lib_database.$_$.j7;
  var XML = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.d;
  var Site = kotlin_com_ustadmobile_app_lib_database.$_$.s4;
  var daysUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.k;
  var Message = kotlin_com_ustadmobile_app_lib_database.$_$.f4;
  var NotImplementedError = kotlin_kotlin.$_$.ai;
  var shallowCopy_11 = kotlin_com_ustadmobile_app_lib_database.$_$.v1;
  var Companion_instance_45 = kotlin_com_ustadmobile_app_lib_database.$_$.t7;
  var PersonAndDisplayDetail = kotlin_com_ustadmobile_app_lib_database.$_$.h4;
  var EditAndViewPermission = kotlin_com_ustadmobile_app_lib_database.$_$.y;
  var replace = kotlin_kotlin.$_$.sf;
  var PersonPicture = kotlin_com_ustadmobile_app_lib_database.$_$.m4;
  var getSystemTimeInMillis = kotlin_com_ustadmobile_app_lib_util.$_$.b;
  var PersonDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.o5;
  var Settings = kotlin_com_russhwolf_multiplatform_settings.$_$.a;
  var println = kotlin_kotlin.$_$.za;
  var SiteTermsAndLangName = kotlin_com_ustadmobile_app_lib_database.$_$.h1;
  var contains_0 = kotlin_kotlin.$_$.o6;
  var SiteTerms = kotlin_com_ustadmobile_app_lib_database.$_$.r4;
  var Companion_instance_46 = kotlin_com_ustadmobile_app_lib_database.$_$.a8;
  var shallowCopy_12 = kotlin_com_ustadmobile_app_lib_database.$_$.b2;
  var decodeBase64Bytes = kotlin_io_ktor_ktor_utils.$_$.u;
  var addChild = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.d;
  var addChildNode = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.a;
  var FC = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react.$_$.a;
  var toUrlQueryString = kotlin_com_github_UstadMobile_door_door_runtime.$_$.s;
  var json = kotlin_kotlin.$_$.jc;
  var KMutableProperty0 = kotlin_kotlin.$_$.rd;
  var useEffect = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.i;
  var TransferJobItemStatus_FAILED_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.a5;
  var TransferJob = kotlin_com_ustadmobile_app_lib_database.$_$.v4;
  var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
  var TransferJobItem = kotlin_com_ustadmobile_app_lib_database.$_$.u4;
  var TransferJobItemStatus_IN_PROGRESS_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.b5;
  var NonCancellable_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x;
  var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
  var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s1;
  var randomUuid = kotlin_com_github_UstadMobile_door_door_runtime.$_$.a2;
  var fetch_0 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_web.$_$.a;
  var IllegalStateException_init_$Create$_1 = kotlin_kotlin.$_$.c2;
  var Companion_getInstance_16 = kotlin_io_ktor_ktor_http.$_$.c;
  var TextContent = kotlin_io_ktor_ktor_http.$_$.v;
  var Text_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
  var doorNodeAndVersionHeaders = kotlin_com_github_UstadMobile_door_door_runtime.$_$.i;
  var IntCompanionObject_instance = kotlin_kotlin.$_$.y4;
  var toULong = kotlin_kotlin.$_$.ch;
  var _ULong___get_data__impl__fggpzb = kotlin_kotlin.$_$.b4;
  var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.i;
  var encodeToByteArray = kotlin_kotlin.$_$.te;
  var encodeToByteArray_0 = kotlin_io_ktor_ktor_io.$_$.n;
  var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e2;
  var useRequiredContext = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.j;
  var getKClassFromExpression = kotlin_kotlin.$_$.d;
  var format = kotlin_dev_icerock_moko_resources.$_$.g;
  var XmlPullParserFactory = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.a;
  var Default_getInstance_0 = kotlin_kotlin.$_$.b5;
  var Antilog = kotlin_io_github_aakira_napier.$_$.h;
  var LogLevel_VERBOSE_getInstance = kotlin_io_github_aakira_napier.$_$.e;
  var LogLevel_DEBUG_getInstance = kotlin_io_github_aakira_napier.$_$.b;
  var toSet_0 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_js.$_$.b;
  //endregion
  //region block: pre-declaration
  setMetadataFor(strings, 'strings', objectMeta);
  setMetadataFor(plurals, 'plurals', objectMeta);
  setMetadataFor(MR, 'MR', objectMeta);
  setMetadataFor(AccountRegisterOptions, 'AccountRegisterOptions', classMeta, VOID, VOID, AccountRegisterOptions);
  setMetadataFor(AdultAccountRequiredException, 'AdultAccountRequiredException', classMeta, IllegalStateException, VOID, AdultAccountRequiredException);
  setMetadataFor($setAuthCOROUTINE$1, '$setAuthCOROUTINE$1', classMeta, CoroutineImpl);
  setMetadataFor(AuthManager, 'AuthManager', classMeta, VOID, [DIAware], VOID, VOID, VOID, [2]);
  setMetadataFor(ConsentNotGrantedException, 'ConsentNotGrantedException', classMeta, IllegalStateException, VOID, ConsentNotGrantedException);
  setMetadataFor(Companion, 'Companion', objectMeta);
  setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Endpoint, 'Endpoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_11});
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor(EndpointScope, 'EndpointScope', classMeta, VOID, VOID, EndpointScope);
  setMetadataFor(Pbkdf2Params, 'Pbkdf2Params', classMeta, VOID, VOID, Pbkdf2Params);
  setMetadataFor(Companion_1, 'Companion', objectMeta);
  setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(RegisterRequest, 'RegisterRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_12});
  setMetadataFor(UnauthorizedException, 'UnauthorizedException', classMeta, IllegalStateException, VOID, UnauthorizedException);
  setMetadataFor(Companion_2, 'Companion', objectMeta);
  setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(UserSessionWithPersonAndEndpoint, 'UserSessionWithPersonAndEndpoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_13});
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda_1, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda_1, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_3, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(UstadAccountManager$slambda, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda_1, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$makeNewTempGuestSession$slambda, 'UstadAccountManager$makeNewTempGuestSession$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda, 'UstadAccountManager$register$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$addSession$slambda, 'UstadAccountManager$addSession$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$login$slambda, 'UstadAccountManager$login$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($activeSessionsListCOROUTINE$2, '$activeSessionsListCOROUTINE$2', classMeta, CoroutineImpl);
  setMetadataFor($activeSessionCountCOROUTINE$3, '$activeSessionCountCOROUTINE$3', classMeta, CoroutineImpl);
  setMetadataFor($addSessionCOROUTINE$4, '$addSessionCOROUTINE$4', classMeta, CoroutineImpl);
  setMetadataFor($endSessionCOROUTINE$6, '$endSessionCOROUTINE$6', classMeta, CoroutineImpl);
  setMetadataFor($getSiteFromDbOrLoadFromHttpCOROUTINE$7, '$getSiteFromDbOrLoadFromHttpCOROUTINE$7', classMeta, CoroutineImpl);
  setMetadataFor($startGuestSessionCOROUTINE$8, '$startGuestSessionCOROUTINE$8', classMeta, CoroutineImpl);
  setMetadataFor(UstadAccountManager, 'UstadAccountManager', classMeta, VOID, VOID, VOID, VOID, VOID, [1, 2, 4, 3, 5]);
  setMetadataFor(Companion_4, 'Companion', objectMeta);
  setMetadataFor(Companion_5, 'Companion', objectMeta);
  setMetadataFor(Anchor, 'Anchor', classMeta, VOID, VOID, Anchor, VOID, {0: AnchorSerializer_getInstance});
  setMetadataFor(AnchorSerializer, 'AnchorSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_6, 'Companion', objectMeta);
  setMetadataFor(Body, 'Body', classMeta, VOID, VOID, VOID, VOID, {0: BodySerializer_getInstance});
  setMetadataFor(BodySerializer, 'BodySerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_7, 'Companion', objectMeta);
  setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ListItem, 'ListItem', classMeta, VOID, VOID, ListItem, VOID, {0: $serializer_getInstance_14});
  setMetadataFor(Companion_8, 'Companion', objectMeta);
  setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavElement, 'NavElement', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_15});
  setMetadataFor(Companion_9, 'Companion', objectMeta);
  setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavigationDocument, 'NavigationDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_16});
  setMetadataFor(Companion_10, 'Companion', objectMeta);
  setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(OrderedList, 'OrderedList', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_17});
  setMetadataFor(Companion_11, 'Companion', objectMeta);
  setMetadataFor(Span, 'Span', classMeta, VOID, VOID, Span, VOID, {0: SpanSerializer_getInstance});
  setMetadataFor(SpanSerializer, 'SpanSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Content, 'Content', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_18});
  setMetadataFor(Companion_12, 'Companion', objectMeta);
  setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DocTitle, 'DocTitle', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_19});
  setMetadataFor(Companion_13, 'Companion', objectMeta);
  setMetadataFor($serializer_8, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Head, 'Head', classMeta, VOID, VOID, Head, VOID, {0: $serializer_getInstance_20});
  setMetadataFor($serializer_9, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavLabel, 'NavLabel', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_21});
  setMetadataFor(Companion_14, 'Companion', objectMeta);
  setMetadataFor($serializer_10, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavMap, 'NavMap', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_22});
  setMetadataFor(Companion_15, 'Companion', objectMeta);
  setMetadataFor($serializer_11, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavPoint, 'NavPoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_23});
  setMetadataFor(Companion_16, 'Companion', objectMeta);
  setMetadataFor($serializer_12, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NcxDocument, 'NcxDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_24});
  setMetadataFor(Companion_17, 'Companion', objectMeta);
  setMetadataFor($serializer_13, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Text, 'Text', classMeta, VOID, VOID, Text, VOID, {0: $serializer_getInstance_25});
  setMetadataFor(Companion_18, 'Companion', objectMeta);
  setMetadataFor($serializer_14, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcCreator, 'DcCreator', classMeta, VOID, VOID, DcCreator, VOID, {0: $serializer_getInstance_26});
  setMetadataFor(Companion_19, 'Companion', objectMeta);
  setMetadataFor($serializer_15, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcDescription, 'DcDescription', classMeta, VOID, VOID, DcDescription, VOID, {0: $serializer_getInstance_27});
  setMetadataFor(Companion_20, 'Companion', objectMeta);
  setMetadataFor($serializer_16, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcIdentifier, 'DcIdentifier', classMeta, VOID, VOID, DcIdentifier, VOID, {0: $serializer_getInstance_28});
  setMetadataFor($serializer_17, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcLanguage, 'DcLanguage', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_29});
  setMetadataFor(Companion_21, 'Companion', objectMeta);
  setMetadataFor($serializer_18, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcTitle, 'DcTitle', classMeta, VOID, VOID, DcTitle, VOID, {0: $serializer_getInstance_30});
  setMetadataFor($serializer_19, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Item, 'Item', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_31});
  setMetadataFor(Companion_22, 'Companion', objectMeta);
  setMetadataFor($serializer_20, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ItemRef, 'ItemRef', classMeta, VOID, VOID, ItemRef, VOID, {0: $serializer_getInstance_32});
  setMetadataFor(Companion_23, 'Companion', objectMeta);
  setMetadataFor($serializer_21, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Manifest, 'Manifest', classMeta, VOID, VOID, Manifest, VOID, {0: $serializer_getInstance_33});
  setMetadataFor(Companion_24, 'Companion', objectMeta);
  setMetadataFor($serializer_22, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Meta, 'Meta', classMeta, VOID, VOID, Meta, VOID, {0: $serializer_getInstance_34});
  setMetadataFor(Companion_25, 'Companion', objectMeta);
  setMetadataFor($serializer_23, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Metadata, 'Metadata', classMeta, VOID, VOID, Metadata, VOID, {0: $serializer_getInstance_35});
  setMetadataFor(Companion_26, 'Companion', objectMeta);
  setMetadataFor($serializer_24, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PackageDocument, 'PackageDocument', classMeta, VOID, VOID, PackageDocument, VOID, {0: $serializer_getInstance_36});
  setMetadataFor(Companion_27, 'Companion', objectMeta);
  setMetadataFor($serializer_25, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Spine, 'Spine', classMeta, VOID, VOID, Spine, VOID, {0: $serializer_getInstance_37});
  setMetadataFor(Companion_28, 'Companion', objectMeta);
  setMetadataFor($serializer_26, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifest, 'ContentManifest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_38});
  setMetadataFor(Companion_29, 'Companion', objectMeta);
  setMetadataFor($serializer_27, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifestEntry, 'ContentManifestEntry', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_39});
  setMetadataFor(Companion_30, 'Companion', objectMeta);
  setMetadataFor($serializer_28, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaContentInfo, 'MediaContentInfo', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_40});
  setMetadataFor($serializer_29, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaSource, 'MediaSource', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_41});
  setMetadataFor(Companion_31, 'Companion', objectMeta);
  setMetadataFor($serializer_30, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SubtitleTrack, 'SubtitleTrack', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_42});
  setMetadataFor(InvalidContentException, 'InvalidContentException', classMeta, IllegalArgumentException);
  setMetadataFor(Companion_32, 'Companion', objectMeta);
  setMetadataFor($serializer_31, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MetadataResult, 'MetadataResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_43});
  setMetadataFor(PersonConstants, 'PersonConstants', objectMeta);
  setMetadataFor(SubmissionConstants, 'SubmissionConstants', objectMeta);
  setMetadataFor(TerminologyKeys, 'TerminologyKeys', objectMeta);
  setMetadataFor(SetPasswordUseCase, 'SetPasswordUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(AssignmentSubmissionException, 'AssignmentSubmissionException', classMeta, Exception);
  setMetadataFor(AccountIsNotSubmitterException, 'AccountIsNotSubmitterException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentAlreadySubmittedException, 'AssignmentAlreadySubmittedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentDeadlinePassedException, 'AssignmentDeadlinePassedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentTextTooLongException, 'AssignmentTextTooLongException', classMeta, AssignmentSubmissionException);
  setMetadataFor(SubmitAssignmentResult, 'SubmitAssignmentResult', classMeta);
  setMetadataFor($invokeCOROUTINE$9, '$invokeCOROUTINE$9', classMeta, CoroutineImpl);
  setMetadataFor(SubmitAssignmentUseCase, 'SubmitAssignmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(SubmitMarkUseCase$invoke$slambda, 'SubmitMarkUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$10, '$invokeCOROUTINE$10', classMeta, CoroutineImpl);
  setMetadataFor(SubmitMarkUseCase, 'SubmitMarkUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda, 'GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$12, '$collectCOROUTINE$12', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$11, '$invokeCOROUTINE$11', classMeta, CoroutineImpl);
  setMetadataFor(GetAssignmentSubmitterNameUseCase, 'GetAssignmentSubmitterNameUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BlobTransferJobItem, 'BlobTransferJobItem', classMeta);
  setMetadataFor(BlobTransferProgressUpdate, 'BlobTransferProgressUpdate', classMeta);
  setMetadataFor(BlobTransferStatusUpdate, 'BlobTransferStatusUpdate', classMeta);
  setMetadataFor(CancelDownloadUseCase, 'CancelDownloadUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(MakeContentEntryAvailableOfflineUseCase, 'MakeContentEntryAvailableOfflineUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(OpenBlobItem, 'OpenBlobItem', classMeta);
  setMetadataFor($invokeCOROUTINE$14, '$invokeCOROUTINE$14', classMeta, CoroutineImpl);
  setMetadataFor(OpenBlobUiUseCase, 'OpenBlobUiUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpenBlobIntent, 'OpenBlobIntent', classMeta, Enum);
  setMetadataFor(OpenBlobUseCase, 'OpenBlobUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpeningBlobState, 'OpeningBlobState', classMeta);
  setMetadataFor(SaveAndUploadLocalUrisUseCase$updateUris$slambda, 'SaveAndUploadLocalUrisUseCase$updateUris$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$15, '$invokeCOROUTINE$15', classMeta, CoroutineImpl);
  setMetadataFor(SaveAndUploadLocalUrisUseCase, 'SaveAndUploadLocalUrisUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_33, 'Companion', objectMeta);
  setMetadataFor($serializer_32, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SaveLocalUriAsBlobItem, 'SaveLocalUriAsBlobItem', classMeta);
  setMetadataFor(SavedBlob, 'SavedBlob', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_44});
  function invoke$default(localUrisToSave, onTransferJobItemCreated, $completion, $super) {
    var tmp;
    if (onTransferJobItemCreated === VOID) {
      tmp = SaveLocalUrisAsBlobsUseCase$invoke$lambda;
    } else {
      tmp = onTransferJobItemCreated;
    }
    onTransferJobItemCreated = tmp;
    return $super === VOID ? this.bnm(localUrisToSave, onTransferJobItemCreated, $completion) : $super.bnm.call(this, localUrisToSave, onTransferJobItemCreated, $completion);
  }
  setMetadataFor(SaveLocalUrisAsBlobsUseCase, 'SaveLocalUrisAsBlobsUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueSavePictureUseCase, 'EnqueueSavePictureUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_34, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$16, '$invokeCOROUTINE$16', classMeta, CoroutineImpl);
  setMetadataFor(SavePictureUseCase, 'SavePictureUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(TransferJobItemStatusUpdater$updateJob$slambda, 'TransferJobItemStatusUpdater$updateJob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TransferJobItemStatusUpdater$commit$slambda, 'TransferJobItemStatusUpdater$commit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($commitCOROUTINE$17, '$commitCOROUTINE$17', classMeta, CoroutineImpl);
  setMetadataFor($onFinishedCOROUTINE$18, '$onFinishedCOROUTINE$18', classMeta, CoroutineImpl);
  setMetadataFor(TransferJobItemStatusUpdater, 'TransferJobItemStatusUpdater', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$19, '$invokeCOROUTINE$19', classMeta, CoroutineImpl);
  setMetadataFor(UpdateTransferJobItemEtagUseCase, 'UpdateTransferJobItemEtagUseCase', classMeta, VOID, VOID, UpdateTransferJobItemEtagUseCase, VOID, VOID, [4]);
  setMetadataFor(Companion_35, 'Companion', objectMeta);
  setMetadataFor(CancelBlobUploadClientUseCase, 'CancelBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnqueueBlobUploadItem, 'EnqueueBlobUploadItem', classMeta);
  function invoke$default_0(items, batchUuid, chunkSize, tableId, entityUid, $completion, $super) {
    var tmp;
    if (chunkSize === VOID) {
      tmp = 524288;
    } else {
      tmp = chunkSize;
    }
    chunkSize = tmp;
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    return $super === VOID ? this.unr(items, batchUuid, chunkSize, tableId, entityUid, $completion) : $super.unr.call(this, items, batchUuid, chunkSize, tableId, entityUid, $completion);
  }
  setMetadataFor(EnqueueBlobUploadClientUseCase, 'EnqueueBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($getLocalUriIfRemoteCOROUTINE$20, '$getLocalUriIfRemoteCOROUTINE$20', classMeta, CoroutineImpl);
  function invoke$default_1(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion, $super) {
    progressInterval = progressInterval === VOID ? 500 : progressInterval;
    var tmp;
    if (onStateChange === VOID) {
      tmp = GetStoragePathForUrlUseCase$invoke$lambda;
    } else {
      tmp = onStateChange;
    }
    onStateChange = tmp;
    inflateToTmpFileIfCompressed = inflateToTmpFileIfCompressed === VOID ? false : inflateToTmpFileIfCompressed;
    return $super === VOID ? this.kns(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion) : $super.kns.call(this, url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion);
  }
  setMetadataFor(GetStoragePathForUrlUseCase, 'GetStoragePathForUrlUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(CreateNewClazzUseCase$invoke$slambda, 'CreateNewClazzUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CreateNewClazzUseCase, 'CreateNewClazzUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AlreadyEnroledInClassException, 'AlreadyEnroledInClassException', classMeta, Exception, VOID, AlreadyEnroledInClassException);
  setMetadataFor(AlreadyHasPendingRequestException, 'AlreadyHasPendingRequestException', classMeta, IllegalStateException, VOID, AlreadyHasPendingRequestException);
  setMetadataFor(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda, 'ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$21, '$invokeCOROUTINE$21', classMeta, CoroutineImpl);
  setMetadataFor(IApproveOrDeclinePendingEnrolmentRequestUseCase, 'IApproveOrDeclinePendingEnrolmentRequestUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ApproveOrDeclinePendingEnrolmentUseCase, 'ApproveOrDeclinePendingEnrolmentUseCase', classMeta, VOID, [IApproveOrDeclinePendingEnrolmentRequestUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(EnrolIntoCourseUseCase$invoke$slambda, 'EnrolIntoCourseUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnrolIntoCourseUseCase, 'EnrolIntoCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$22, '$invokeCOROUTINE$22', classMeta, CoroutineImpl);
  setMetadataFor(RequestEnrolmentUseCase, 'RequestEnrolmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(SetClipboardStringUseCase, 'SetClipboardStringUseCase', interfaceMeta);
  setMetadataFor(Companion_36, 'Companion', objectMeta);
  setMetadataFor($serializer_33, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CompressParams, 'CompressParams', classMeta, VOID, VOID, CompressParams, VOID, {0: $serializer_getInstance_45});
  setMetadataFor(CompressResult, 'CompressResult', classMeta);
  function invoke$default_2(fromUri, toUri, params, onProgress, $completion, $super) {
    toUri = toUri === VOID ? null : toUri;
    params = params === VOID ? new CompressParams() : params;
    onProgress = onProgress === VOID ? null : onProgress;
    return $super === VOID ? this.qnv(fromUri, toUri, params, onProgress, $completion) : $super.qnv.call(this, fromUri, toUri, params, onProgress, $completion);
  }
  setMetadataFor(CompressUseCase, 'CompressUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(Companion_37, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompressionLevel, 'CompressionLevel', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_55});
  setMetadataFor(CompressionLevelSerializer, 'CompressionLevelSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(ContentManifestMap, 'ContentManifestMap', classMeta);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase$invoke$slambda, 'DeleteContentEntryParentChildJoinUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase, 'DeleteContentEntryParentChildJoinUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_38, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCase, 'ContentEntryGetMetaDataFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(ContentEntryGetMetadataStatus, 'ContentEntryGetMetadataStatus', classMeta, VOID, VOID, ContentEntryGetMetadataStatus);
  setMetadataFor(UnsupportedContentException, 'UnsupportedContentException', classMeta, Exception);
  setMetadataFor(Companion_39, 'Companion', objectMeta);
  function invoke$default_3(subtitleTrackUri, filename, locale, $completion, $super) {
    locale = locale === VOID ? null : locale;
    return $super === VOID ? this.lnx(subtitleTrackUri, filename, locale, $completion) : $super.lnx.call(this, subtitleTrackUri, filename, locale, $completion);
  }
  setMetadataFor(GetSubtitleTrackFromUriUseCase, 'GetSubtitleTrackFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(CancelImportContentEntryUseCase, 'CancelImportContentEntryUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$23, '$invokeCOROUTINE$23', classMeta, CoroutineImpl);
  setMetadataFor(CancelRemoteContentEntryImportUseCase, 'CancelRemoteContentEntryImportUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$24, '$invokeCOROUTINE$24', classMeta, CoroutineImpl);
  setMetadataFor(DismissRemoteContentEntryImportErrorUseCase, 'DismissRemoteContentEntryImportErrorUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueContentEntryImportUseCase, 'EnqueueContentEntryImportUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$25, '$invokeCOROUTINE$25', classMeta, CoroutineImpl);
  setMetadataFor(EnqueueImportContentEntryUseCaseRemote, 'EnqueueImportContentEntryUseCaseRemote', classMeta, VOID, [EnqueueContentEntryImportUseCase], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_40, 'Companion', objectMeta);
  setMetadataFor($serializer_34, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ImportRequest, 'ImportRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_46});
  setMetadataFor(LaunchContentEntryVersionUseCase, 'LaunchContentEntryVersionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(DefaultLaunchContentEntryVersionUseCase, 'DefaultLaunchContentEntryVersionUseCase', classMeta, VOID, [LaunchContentEntryVersionUseCase], DefaultLaunchContentEntryVersionUseCase, VOID, VOID, [5]);
  setMetadataFor(LaunchResult, 'LaunchResult', classMeta, VOID, VOID, LaunchResult);
  setMetadataFor(LaunchEpubUseCase, 'LaunchEpubUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(LaunchXapiUseCase, 'LaunchXapiUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(XapiLaunchHrefResult, 'XapiLaunchHrefResult', classMeta);
  setMetadataFor(ResolveXapiLaunchHrefUseCase$invoke$slambda, 'ResolveXapiLaunchHrefUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$26, '$invokeCOROUTINE$26', classMeta, CoroutineImpl);
  setMetadataFor(ResolveXapiLaunchHrefUseCase, 'ResolveXapiLaunchHrefUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(MoveContentEntriesUseCase, 'MoveContentEntriesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SaveContentEntryUseCase$invoke$slambda, 'SaveContentEntryUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$27, '$invokeCOROUTINE$27', classMeta, CoroutineImpl);
  setMetadataFor(SaveContentEntryUseCase, 'SaveContentEntryUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(AddOrUpdateCourseBlockUseCase, 'AddOrUpdateCourseBlockUseCase', classMeta, VOID, VOID, AddOrUpdateCourseBlockUseCase);
  setMetadataFor(UpdateCourseBlocksOnReorderOrCommitUseCase, 'UpdateCourseBlocksOnReorderOrCommitUseCase', classMeta, VOID, VOID, UpdateCourseBlocksOnReorderOrCommitUseCase);
  setMetadataFor(DeletePermanentlyUseCase, 'DeletePermanentlyUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RestoreDeletedItemUseCase$invoke$slambda, 'RestoreDeletedItemUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RestoreDeletedItemUseCase, 'RestoreDeletedItemUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$28, '$invokeCOROUTINE$28', classMeta, CoroutineImpl);
  setMetadataFor(GetEpubTableOfContentsUseCase, 'GetEpubTableOfContentsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(BlobFileUseCase, 'BlobFileUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(UriFileData, 'UriFileData', classMeta);
  setMetadataFor(Companion_41, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$29, '$invokeCOROUTINE$29', classMeta, CoroutineImpl);
  setMetadataFor(UriFileUseCase, 'UriFileUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_42, 'Companion', objectMeta);
  setMetadataFor(FilterUsernameUseCase, 'FilterUsernameUseCase', classMeta, VOID, VOID, FilterUsernameUseCase);
  setMetadataFor(GetApiUrlUseCase, 'GetApiUrlUseCase', interfaceMeta);
  setMetadataFor(GetApiUrlUseCaseDirect, 'GetApiUrlUseCaseDirect', classMeta, VOID, [GetApiUrlUseCase]);
  setMetadataFor(VersionInfo, 'VersionInfo', classMeta);
  setMetadataFor(GetVersionUseCase, 'GetVersionUseCase', interfaceMeta);
  setMetadataFor(GetHtmlContentDisplayEngineOptionsUseCase, 'GetHtmlContentDisplayEngineOptionsUseCase', classMeta);
  setMetadataFor(GetHtmlContentDisplayEngineUseCase, 'GetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(Companion_43, 'Companion', objectMeta);
  setMetadataFor(SetHtmlContentDisplayEngineUseCase, 'SetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(SetLangResult, 'SetLangResult', classMeta);
  function invoke$default_4(uiLang, currentDestination, navController, navArgs, $super) {
    navArgs = navArgs === VOID ? emptyMap() : navArgs;
    return $super === VOID ? this.do9(uiLang, currentDestination, navController, navArgs) : $super.do9.call(this, uiLang, currentDestination, navController, navArgs);
  }
  setMetadataFor(SetLanguageUseCase, 'SetLanguageUseCase', interfaceMeta);
  setMetadataFor(LaunchOpenLicensesUseCase, 'LaunchOpenLicensesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(MakeLinkUseCase, 'MakeLinkUseCase', classMeta);
  setMetadataFor(OnClickLinkUseCase, 'OnClickLinkUseCase', classMeta);
  setMetadataFor(Companion_44, 'Companion', objectMeta);
  setMetadataFor(LinkTarget, 'LinkTarget', classMeta, Enum);
  setMetadataFor(OpenExternalLinkUseCase, 'OpenExternalLinkUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$30, '$invokeCOROUTINE$30', classMeta, CoroutineImpl);
  setMetadataFor(UpdatePeerReviewAllocationUseCase, 'UpdatePeerReviewAllocationUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(AddNewPersonUseCase$invoke$slambda, 'AddNewPersonUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddNewPersonUseCase, 'AddNewPersonUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(BulkAddPersonException, 'BulkAddPersonException', classMeta, IllegalArgumentException);
  setMetadataFor($serializer_35, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonsDataError, 'BulkAddPersonsDataError', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_47});
  setMetadataFor(BulkAddPersonsFromLocalUriUseCase, 'BulkAddPersonsFromLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_45, 'Companion', objectMeta);
  setMetadataFor($serializer_36, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddUsersResult, 'BulkAddUsersResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_48});
  setMetadataFor(IPhoneNumberUtil, 'IPhoneNumberUtil', interfaceMeta);
  setMetadataFor(OnClickPhoneNumUseCase, 'OnClickPhoneNumUseCase', interfaceMeta);
  setMetadataFor(PhoneNumValidatorUseCase, 'PhoneNumValidatorUseCase', interfaceMeta);
  setMetadataFor(OnClickEmailUseCase, 'OnClickEmailUseCase', interfaceMeta);
  setMetadataFor(ShareAppUseCase, 'ShareAppUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ShareTextUseCase, 'ShareTextUseCase', interfaceMeta);
  setMetadataFor(GetShowPoweredByUseCase, 'GetShowPoweredByUseCase', classMeta);
  setMetadataFor(Companion_46, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$31, '$invokeCOROUTINE$31', classMeta, CoroutineImpl);
  setMetadataFor(GetLocaleForSiteTermsUseCase, 'GetLocaleForSiteTermsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(OnClickSendSmsUseCase, 'OnClickSendSmsUseCase', interfaceMeta);
  setMetadataFor(Companion_47, 'Companion', objectMeta);
  setMetadataFor(DismissSocialWarningUseCase, 'DismissSocialWarningUseCase', classMeta);
  setMetadataFor(Companion_48, 'Companion', objectMeta);
  setMetadataFor(ShowSocialWarningUseCase, 'ShowSocialWarningUseCase', classMeta);
  setMetadataFor(GetOfflineStorageAvailableSpace, 'GetOfflineStorageAvailableSpace', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_49, 'Companion', objectMeta);
  setMetadataFor(GetOfflineStorageOptionsUseCase, 'GetOfflineStorageOptionsUseCase', interfaceMeta);
  setMetadataFor(GetOfflineStorageSettingUseCase, 'GetOfflineStorageSettingUseCase', classMeta);
  setMetadataFor(OfflineStorageOption, 'OfflineStorageOption', classMeta);
  setMetadataFor(SetOfflineStorageSettingUseCase, 'SetOfflineStorageSettingUseCase', classMeta);
  setMetadataFor(Companion_50, 'Companion', objectMeta);
  setMetadataFor($serializer_37, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ThemeUploadResponse, 'ThemeUploadResponse', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_49});
  setMetadataFor(DeleteUrisUseCase, 'DeleteUrisUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(IsTempFileCheckerUseCase, 'IsTempFileCheckerUseCase', interfaceMeta);
  setMetadataFor(ChunkIterator, 'ChunkIterator', classMeta, VOID, [Iterator]);
  setMetadataFor(Chunk, 'Chunk', classMeta);
  setMetadataFor(ChunkInfo, 'ChunkInfo', classMeta);
  setMetadataFor(UploadProgress, 'UploadProgress', classMeta);
  setMetadataFor(LastChunkResponse, 'LastChunkResponse', classMeta);
  function invoke$default_5(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion, $super) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    chunkSize = chunkSize === VOID ? get_DEFAULT_CHUNK_SIZE() : chunkSize;
    var tmp;
    if (onProgress === VOID) {
      tmp = ChunkedUploadClientLocalUriUseCase$invoke$lambda;
    } else {
      tmp = onProgress;
    }
    onProgress = tmp;
    var tmp_0;
    if (onStatusChange === VOID) {
      tmp_0 = ChunkedUploadClientLocalUriUseCase$invoke$lambda_0;
    } else {
      tmp_0 = onStatusChange;
    }
    onStatusChange = tmp_0;
    lastChunkHeaders = lastChunkHeaders === VOID ? null : lastChunkHeaders;
    return $super === VOID ? this.koe(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) : $super.koe.call(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
  }
  setMetadataFor(ChunkedUploadClientLocalUriUseCase, 'ChunkedUploadClientLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [8]);
  setMetadataFor(Companion_51, 'Companion', objectMeta);
  setMetadataFor(StartUserSessionUseCase, 'StartUserSessionUseCase', classMeta);
  setMetadataFor(ValidateEmailUseCase, 'ValidateEmailUseCase', classMeta, VOID, VOID, ValidateEmailUseCase);
  setMetadataFor(Companion_52, 'Companion', objectMeta);
  setMetadataFor(ValidateUsernameUseCase, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase);
  setMetadataFor(Companion_53, 'Companion', objectMeta);
  setMetadataFor(ValidationResult, 'ValidationResult', classMeta, VOID, VOID, ValidationResult);
  setMetadataFor(StoreActivitiesUseCase$invoke$slambda, 'StoreActivitiesUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$35, '$invokeCOROUTINE$35', classMeta, CoroutineImpl);
  setMetadataFor(StoreActivitiesUseCase, 'StoreActivitiesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(XapiException, 'XapiException', classMeta, Exception);
  setMetadataFor(XapiJson, 'XapiJson', classMeta, VOID, VOID, XapiJson);
  setMetadataFor(StatementStoreResult, 'StatementStoreResult', classMeta);
  setMetadataFor(XapiStatementResource$storeStatements$slambda, 'XapiStatementResource$storeStatements$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($storeStatementsCOROUTINE$36, '$storeStatementsCOROUTINE$36', classMeta, CoroutineImpl);
  setMetadataFor($postCOROUTINE$38, '$postCOROUTINE$38', classMeta, CoroutineImpl);
  setMetadataFor(XapiStatementResource, 'XapiStatementResource', classMeta, VOID, VOID, VOID, VOID, VOID, [2, 3]);
  setMetadataFor(XapiGroupAndPersonUidMap, 'XapiGroupAndPersonUidMap', classMeta);
  setMetadataFor($invokeCOROUTINE$40, '$invokeCOROUTINE$40', classMeta, CoroutineImpl);
  setMetadataFor(CreateXapiGroupForCourseGroupUseCase, 'CreateXapiGroupForCourseGroupUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($insertOrUpdateActorsIfNameChangedCOROUTINE$41, '$insertOrUpdateActorsIfNameChangedCOROUTINE$41', classMeta, CoroutineImpl);
  setMetadataFor($insertOrUpdateIfLastModChangedCOROUTINE$42, '$insertOrUpdateIfLastModChangedCOROUTINE$42', classMeta, CoroutineImpl);
  setMetadataFor(Companion_54, 'Companion', objectMeta);
  setMetadataFor($serializer_38, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Attachment, 'Attachment', classMeta, VOID, VOID, Attachment, VOID, {0: $serializer_getInstance_50});
  setMetadataFor(Companion_55, 'Companion', objectMeta);
  setMetadataFor($serializer_39, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiAccount, 'XapiAccount', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_51});
  setMetadataFor(Companion_56, 'Companion', objectMeta);
  setMetadataFor($serializer_40, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Interaction, 'Interaction', classMeta, VOID, VOID, Interaction, VOID, {0: $serializer_getInstance_52});
  setMetadataFor(Companion_57, 'Companion', objectMeta);
  setMetadataFor($serializer_41, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivity, 'XapiActivity', classMeta, VOID, VOID, XapiActivity, VOID, {0: $serializer_getInstance_53});
  setMetadataFor(ActivityEntities, 'ActivityEntities', classMeta);
  setMetadataFor(Companion_58, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiActor, 'XapiActor', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiActorSerializer_getInstance});
  setMetadataFor(XapiActorSerializer, 'XapiActorSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(ActorEntities, 'ActorEntities', classMeta);
  setMetadataFor(Companion_59, 'Companion', objectMeta);
  setMetadataFor($serializer_42, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementObject, 'XapiStatementObject', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiStatementObjectSerializer_getInstance});
  setMetadataFor(XapiAgent, 'XapiAgent', classMeta, VOID, [XapiActor, XapiStatementObject], XapiAgent, VOID, {0: $serializer_getInstance_54});
  setMetadataFor(Companion_60, 'Companion', objectMeta);
  setMetadataFor($serializer_43, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContext, 'XapiContext', classMeta, VOID, VOID, XapiContext, VOID, {0: $serializer_getInstance_55});
  setMetadataFor(Companion_61, 'Companion', objectMeta);
  setMetadataFor(XapiContextActivities, 'XapiContextActivities', classMeta, VOID, VOID, XapiContextActivities, VOID, {0: XapiContextActivitiesSerializer_getInstance});
  setMetadataFor(XapiContextActivitiesSerializer, 'XapiContextActivitiesSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_62, 'Companion', objectMeta);
  setMetadataFor($serializer_44, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContextActivitiesSurrogate, 'XapiContextActivitiesSurrogate', classMeta, VOID, VOID, XapiContextActivitiesSurrogate, VOID, {0: $serializer_getInstance_56});
  setMetadataFor(Companion_63, 'Companion', objectMeta);
  setMetadataFor($serializer_45, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiGroup, 'XapiGroup', classMeta, VOID, [XapiActor, XapiStatementObject], XapiGroup, VOID, {0: $serializer_getInstance_57});
  setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(Companion_64, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiInteractionType, 'XapiInteractionType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_82});
  setMetadataFor(XapiInteractionTypeSerializer, 'XapiInteractionTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_65, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiObjectType, 'XapiObjectType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_83});
  setMetadataFor(XapiObjectTypeSerializer, 'XapiObjectTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_66, 'Companion', objectMeta);
  setMetadataFor($serializer_46, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Score, 'Score', classMeta, VOID, VOID, Score, VOID, {0: $serializer_getInstance_58});
  setMetadataFor(Companion_67, 'Companion', objectMeta);
  setMetadataFor($serializer_47, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiResult, 'XapiResult', classMeta, VOID, VOID, XapiResult, VOID, {0: $serializer_getInstance_59});
  setMetadataFor(Companion_68, 'Companion', objectMeta);
  setMetadataFor($serializer_48, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatement, 'XapiStatement', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_60});
  setMetadataFor(StatementEntities, 'StatementEntities', classMeta, VOID, VOID, StatementEntities);
  setMetadataFor(XapiStatementObjectSerializer, 'XapiStatementObjectSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(Companion_69, 'Companion', objectMeta);
  setMetadataFor($serializer_49, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivityStatementObject, 'XapiActivityStatementObject', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_61});
  setMetadataFor(Companion_70, 'Companion', objectMeta);
  setMetadataFor($serializer_50, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementRef, 'XapiStatementRef', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_62});
  setMetadataFor(Companion_71, 'Companion', objectMeta);
  setMetadataFor($serializer_51, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiVerb, 'XapiVerb', classMeta, VOID, VOID, XapiVerb, VOID, {0: $serializer_getInstance_63});
  setMetadataFor(VerbEntities, 'VerbEntities', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder$onComplete$slambda, 'NonInteractiveContentXapiStatementRecorder$onComplete$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder, 'NonInteractiveContentXapiStatementRecorder', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorderFactory, 'NonInteractiveContentXapiStatementRecorderFactory', classMeta);
  setMetadataFor(SaveStatementOnClearUseCase, 'SaveStatementOnClearUseCase', interfaceMeta);
  setMetadataFor(SaveStatementOnUnloadUseCase, 'SaveStatementOnUnloadUseCase', interfaceMeta, VOID, [SaveStatementOnClearUseCase]);
  setMetadataFor(Companion_72, 'Companion', objectMeta);
  setMetadataFor($serializer_52, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementsAndSession, 'XapiStatementsAndSession', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_64});
  setMetadataFor(ResumeOrStartXapiSessionUseCase, 'ResumeOrStartXapiSessionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(XXHasher64Factory, 'XXHasher64Factory', interfaceMeta);
  setMetadataFor(XXStringHasher, 'XXStringHasher', interfaceMeta);
  setMetadataFor(UstadMobileConstants, 'UstadMobileConstants', objectMeta);
  setMetadataFor(Companion_73, 'Companion', objectMeta);
  setMetadataFor(UstadGoOptions, 'UstadGoOptions', classMeta, VOID, VOID, UstadGoOptions);
  setMetadataFor(UiLanguage, 'UiLanguage', classMeta);
  setMetadataFor(Companion_74, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemCommon, 'UstadMobileSystemCommon', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ActionBarButtonUiState, 'ActionBarButtonUiState', classMeta, VOID, VOID, ActionBarButtonUiState);
  setMetadataFor(AppActionButton, 'AppActionButton', classMeta);
  setMetadataFor(AppBarColors, 'AppBarColors', classMeta, Enum);
  setMetadataFor(AppBarSearchUiState, 'AppBarSearchUiState', classMeta, VOID, VOID, AppBarSearchUiState);
  setMetadataFor(AppStateIcon, 'AppStateIcon', classMeta, Enum);
  setMetadataFor(AppUiState, 'AppUiState', classMeta, VOID, VOID, AppUiState);
  setMetadataFor(FabIcon, 'FabIcon', classMeta, Enum);
  setMetadataFor(FabUiState, 'FabUiState', classMeta, VOID, VOID, FabUiState);
  setMetadataFor(State, 'State', classMeta, Enum);
  setMetadataFor(Companion_75, 'Companion', objectMeta);
  setMetadataFor(LoadingUiState, 'LoadingUiState', classMeta, VOID, VOID, LoadingUiState);
  setMetadataFor(OverflowItem, 'OverflowItem', classMeta);
  setMetadataFor(Snack, 'Snack', classMeta);
  setMetadataFor(SnackBarDispatcher, 'SnackBarDispatcher', interfaceMeta);
  setMetadataFor(TabItem, 'TabItem', classMeta);
  setMetadataFor(UstadContextMenuItem, 'UstadContextMenuItem', classMeta);
  setMetadataFor(ApiUrlConfig, 'ApiUrlConfig', classMeta);
  setMetadataFor(AppConfig, 'AppConfig', interfaceMeta);
  setMetadataFor(AppConfigMap, 'AppConfigMap', classMeta, VOID, [AppConfig]);
  setMetadataFor(Companion_76, 'Companion', objectMeta);
  setMetadataFor(GenderConfig, 'GenderConfig', classMeta, VOID, VOID, GenderConfig);
  setMetadataFor(SettingsLocaleSettingDelegate, 'SettingsLocaleSettingDelegate', classMeta);
  setMetadataFor(Companion_77, 'Companion', objectMeta);
  setMetadataFor(SupportedLanguagesConfig, 'SupportedLanguagesConfig', classMeta);
  setMetadataFor(Companion_78, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyStrings, 'CourseTerminologyStrings', classMeta);
  setMetadataFor(TerminologyEntry, 'TerminologyEntry', classMeta);
  setMetadataFor(ClazzEnrolmentListConstants, 'ClazzEnrolmentListConstants', objectMeta);
  setMetadataFor(ConditionConstants, 'ConditionConstants', objectMeta);
  setMetadataFor(ContentCompletionStatusConstants, 'ContentCompletionStatusConstants', objectMeta);
  setMetadataFor(EnrolmentPolicyConstants, 'EnrolmentPolicyConstants', objectMeta);
  setMetadataFor(FieldConstants, 'FieldConstants', objectMeta);
  setMetadataFor(LicenceConstants, 'LicenceConstants', objectMeta);
  setMetadataFor(OutcomeConstants, 'OutcomeConstants', objectMeta);
  setMetadataFor(PersonConstants_0, 'PersonConstants', objectMeta);
  setMetadataFor(PersonParentJoinConstants, 'PersonParentJoinConstants', objectMeta);
  setMetadataFor(RoleConstants, 'RoleConstants', objectMeta);
  setMetadataFor(ScheduleConstants, 'ScheduleConstants', objectMeta);
  setMetadataFor(SubmissionPolicyConstants, 'SubmissionPolicyConstants', objectMeta);
  function navigate$default(viewName, args, goOptions, $super) {
    goOptions = goOptions === VOID ? Companion_getInstance_91().cot_1 : goOptions;
    var tmp;
    if ($super === VOID) {
      this.doy(viewName, args, goOptions);
      tmp = Unit_instance;
    } else {
      tmp = $super.doy.call(this, viewName, args, goOptions);
    }
    return tmp;
  }
  setMetadataFor(UstadNavController, 'UstadNavController', interfaceMeta);
  setMetadataFor(CommandFlowUstadNavController, 'CommandFlowUstadNavController', classMeta, VOID, [UstadNavController], CommandFlowUstadNavController);
  setMetadataFor(NavCommand, 'NavCommand', classMeta);
  setMetadataFor(NavigateNavCommand, 'NavigateNavCommand', classMeta, NavCommand);
  setMetadataFor(PopNavCommand, 'PopNavCommand', classMeta, NavCommand);
  setMetadataFor(NavResult, 'NavResult', classMeta);
  setMetadataFor(NavResultDest, 'NavResultDest', classMeta);
  setMetadataFor(NavResultReturner, 'NavResultReturner', interfaceMeta);
  setMetadataFor(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda, 'NavResultReturnerImpl$resultFlowForKey$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$43, '$collectCOROUTINE$43', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_1, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(NavResultReturnerImpl, 'NavResultReturnerImpl', classMeta, VOID, [NavResultReturner], NavResultReturnerImpl);
  setMetadataFor(BitmaskFlag, 'BitmaskFlag', classMeta);
  setMetadataFor(ListPagingSource, 'ListPagingSource', classMeta, PagingSource, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RefreshCommand, 'RefreshCommand', classMeta, VOID, VOID, RefreshCommand);
  setMetadataFor(ClazzLogCreatorManager, 'ClazzLogCreatorManager', interfaceMeta);
  setMetadataFor(Activity, 'Activity', classMeta);
  setMetadataFor(Companion_79, 'Companion', objectMeta);
  setMetadataFor(TinCanXML, 'TinCanXML', classMeta, VOID, VOID, TinCanXML);
  setMetadataFor(UriHelper, 'UriHelper', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiTag, 'DiTag', objectMeta);
  setMetadataFor(EventCollator2$receiveEvent$slambda, 'EventCollator2$receiveEvent$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EventCollator2, 'EventCollator2', classMeta);
  setMetadataFor(Companion_80, 'Companion', objectMeta);
  setMetadataFor(MessageIdOption2, 'MessageIdOption2', classMeta);
  setMetadataFor(SortOrderOption, 'SortOrderOption', classMeta);
  setMetadataFor(UMFileUtil, 'UMFileUtil', objectMeta);
  setMetadataFor(Companion_81, 'Companion', objectMeta);
  setMetadataFor(UstadUrlComponents, 'UstadUrlComponents', classMeta);
  setMetadataFor($verifySiteCOROUTINE$44, '$verifySiteCOROUTINE$44', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_2, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$o$collect$slambda, 'whenSubscribed$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$45, '$collectCOROUTINE$45', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_1, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$slambda, 'whenSubscribed$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(navigateToLink$slambda, 'navigateToLink$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScopedGrantResult, 'ScopedGrantResult', classMeta);
  setMetadataFor($insertPersonAndGroupCOROUTINE$46, '$insertPersonAndGroupCOROUTINE$46', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfFalseCOROUTINE$47, '$localFirstThenRepoIfFalseCOROUTINE$47', classMeta, CoroutineImpl);
  setMetadataFor($grantScopedPermissionCOROUTINE$48, '$grantScopedPermissionCOROUTINE$48', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfNullCOROUTINE$49, '$localFirstThenRepoIfNullCOROUTINE$49', classMeta, CoroutineImpl);
  setMetadataFor(Companion_82, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(IStringValues, 'IStringValues', interfaceMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_100});
  setMetadataFor(MapStringValues, 'MapStringValues', classMeta, VOID, [IStringValues]);
  setMetadataFor(StringValuesSerializer, 'StringValuesSerializer', classMeta, VOID, [KSerializer], StringValuesSerializer);
  setMetadataFor(Companion_83, 'Companion', objectMeta);
  setMetadataFor(Companion_84, 'Companion', objectMeta);
  setMetadataFor(Companion_85, 'Companion', objectMeta);
  setMetadataFor(Companion_86, 'Companion', objectMeta);
  setMetadataFor(Companion_87, 'Companion', objectMeta);
  setMetadataFor(Companion_88, 'Companion', objectMeta);
  setMetadataFor(Companion_89, 'Companion', objectMeta);
  setMetadataFor(Companion_90, 'Companion', objectMeta);
  setMetadataFor(Companion_91, 'Companion', objectMeta);
  setMetadataFor(ListViewMode, 'ListViewMode', classMeta, Enum);
  setMetadataFor(Companion_92, 'Companion', objectMeta);
  setMetadataFor(UstadViewModel, 'UstadViewModel', classMeta, ViewModel, [ViewModel, DIAware], VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DetailViewModel, 'DetailViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ErrorReportUiState, 'ErrorReportUiState', classMeta, VOID, VOID, ErrorReportUiState);
  setMetadataFor(HolidayCalendarDetailUIState, 'HolidayCalendarDetailUIState', classMeta, VOID, VOID, HolidayCalendarDetailUIState);
  setMetadataFor(Companion_93, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarEditUiState, 'HolidayCalendarEditUiState', classMeta, VOID, VOID, HolidayCalendarEditUiState);
  setMetadataFor(Companion_94, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarListUiState, 'HolidayCalendarListUiState', classMeta, VOID, VOID, HolidayCalendarListUiState);
  setMetadataFor(LanguageDetailUiState, 'LanguageDetailUiState', classMeta, VOID, VOID, LanguageDetailUiState);
  setMetadataFor(LanguageEditUiState, 'LanguageEditUiState', classMeta, VOID, VOID, LanguageEditUiState);
  setMetadataFor(Companion_95, 'Companion', objectMeta);
  setMetadataFor(LanguageListUiState, 'LanguageListUiState', classMeta, VOID, VOID, LanguageListUiState);
  setMetadataFor(LeavingReasonEditViewModel$slambda$slambda, 'LeavingReasonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LeavingReasonEditViewModel$slambda$slambda_1, 'LeavingReasonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_96, 'Companion', objectMeta);
  setMetadataFor(LeavingReasonEditViewModel$slambda, 'LeavingReasonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LeavingReasonEditViewModel$onEntityChanged$slambda, 'LeavingReasonEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadEditViewModel, 'UstadEditViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LeavingReasonEditViewModel, 'LeavingReasonEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LeavingReasonEditUiState, 'LeavingReasonEditUiState', classMeta, VOID, VOID, LeavingReasonEditUiState);
  setMetadataFor(Companion_97, 'Companion', objectMeta);
  setMetadataFor(Companion_98, 'Companion', objectMeta);
  setMetadataFor(ReportFilterEditUiState, 'ReportFilterEditUiState', classMeta, VOID, VOID, ReportFilterEditUiState);
  setMetadataFor(ScopedGrantDetailUiState, 'ScopedGrantDetailUiState', classMeta, VOID, VOID, ScopedGrantDetailUiState);
  setMetadataFor(Companion_99, 'Companion', objectMeta);
  setMetadataFor(ScopedGrantEditUiState, 'ScopedGrantEditUiState', classMeta, VOID, VOID, ScopedGrantEditUiState);
  setMetadataFor(Companion_100, 'Companion', objectMeta);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_101, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_3, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$searchEvtCollator$slambda, 'UstadListViewModel$searchEvtCollator$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadListViewModel, 'UstadListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(UstadViewModel$filteredResultFlowForKey$o$collect$slambda, 'UstadViewModel$filteredResultFlowForKey$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$53, '$collectCOROUTINE$53', classMeta, CoroutineImpl);
  setMetadataFor(Companion_102, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_4, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(_no_name_provided__qut3iv_2, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$getJson$slambda, 'UstadViewModel$getJson$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$setJson$slambda, 'UstadViewModel$setJson$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchIfHasPermission$slambda, 'UstadViewModel$launchIfHasPermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchWithLoadingIndicator$slambda, 'UstadViewModel$launchWithLoadingIndicator$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($getJsonCOROUTINE$50, '$getJsonCOROUTINE$50', classMeta, CoroutineImpl);
  setMetadataFor($setJsonCOROUTINE$51, '$setJsonCOROUTINE$51', classMeta, CoroutineImpl);
  setMetadataFor($loadEntityCOROUTINE$52, '$loadEntityCOROUTINE$52', classMeta, CoroutineImpl);
  setMetadataFor(Companion_103, 'Companion', objectMeta);
  setMetadataFor(OpenLicensesViewModel, 'OpenLicensesViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AccountListViewModel$slambda$slambda, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda$slambda, 'AccountListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda_1, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_104, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_5, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(AccountListViewModel$slambda, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda_1, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickLogout$slambda, 'AccountListViewModel$onClickLogout$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickDeleteAccount$slambda, 'AccountListViewModel$onClickDeleteAccount$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickOpenLicenses$slambda, 'AccountListViewModel$onClickOpenLicenses$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel, 'AccountListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AccountListUiState, 'AccountListUiState', classMeta, VOID, VOID, AccountListUiState);
  setMetadataFor(Companion_105, 'Companion', objectMeta);
  setMetadataFor(AppearanceDetailViewModel$slambda, 'AppearanceDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AppearanceDetailViewModel, 'AppearanceDetailViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AppearanceDetailUiState, 'AppearanceDetailUiState', classMeta, VOID, VOID, AppearanceDetailUiState);
  setMetadataFor(Companion_106, 'Companion', objectMeta);
  setMetadataFor(AppearanceEditViewModel$onClickSave$slambda, 'AppearanceEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AppearanceEditViewModel, 'AppearanceEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AppearanceEditUiState, 'AppearanceEditUiState', classMeta, VOID, VOID, AppearanceEditUiState);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_6, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda$slambda, 'launchSetTitleFromClazzUid$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda, 'launchSetTitleFromClazzUid$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_7, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(collectClazzNameAndUpdateTitle$slambda, 'collectClazzNameAndUpdateTitle$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionConstants, 'CoursePermissionConstants', objectMeta);
  setMetadataFor(getTitleForCoursePermission$slambda, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(getTitleForCoursePermission$slambda_1, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($getTitleForCoursePermissionCOROUTINE$54, '$getTitleForCoursePermissionCOROUTINE$54', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_107, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_8, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda, 'ClazzDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel, 'ClazzDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailUiState, 'ClazzDetailUiState', classMeta, VOID, VOID, ClazzDetailUiState);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$55, '$collectCOROUTINE$55', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_3, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$56, '$collectCOROUTINE$56', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_4, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$57, '$collectCOROUTINE$57', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_5, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_108, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_9, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda, 'ClazzDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel, 'ClazzDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailOverviewUiState, 'ClazzDetailOverviewUiState', classMeta, VOID, VOID, ClazzDetailOverviewUiState);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_17, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_19, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda$slambda, 'ClazzEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_109, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_10, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda_1, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlockList$slambda, 'ClazzEditViewModel$updateCourseBlockList$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onEntityChanged$slambda, 'ClazzEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda, 'ClazzEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$onCourseBlockMoved$slambda, 'ClazzEditViewModel$onCourseBlockMoved$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlock$slambda, 'ClazzEditViewModel$updateCourseBlock$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickDeleteCourseBlock$slambda, 'ClazzEditViewModel$onClickDeleteCourseBlock$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($updateCourseBlockListCOROUTINE$58, '$updateCourseBlockListCOROUTINE$58', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEditViewModel, 'ClazzEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(CourseBlockUiState, 'CourseBlockUiState', classMeta);
  setMetadataFor(Companion_110, 'Companion', objectMeta);
  setMetadataFor($serializer_53, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzEditUiState, 'ClazzEditUiState', classMeta, VOID, VOID, ClazzEditUiState, VOID, {0: $serializer_getInstance_65});
  setMetadataFor($loadCOROUTINE$59, '$loadCOROUTINE$59', classMeta, CoroutineImpl);
  setMetadataFor($loadHttpCOROUTINE$60, '$loadHttpCOROUTINE$60', classMeta, CoroutineImpl);
  setMetadataFor(ClazzGradebookPagingSource, 'ClazzGradebookPagingSource', classMeta, DelegatedInvalidationPagingSource, [DelegatedInvalidationPagingSource, PagingSourceWithHttpLoader], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_111, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_11, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda, 'ClazzGradebookViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel, 'ClazzGradebookViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzGradebookUiState, 'ClazzGradebookUiState', classMeta, VOID, VOID, ClazzGradebookUiState);
  setMetadataFor(Companion_112, 'Companion', objectMeta);
  setMetadataFor(InviteViaLinkViewModel, 'InviteViaLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(InviteViaLinkUiState, 'InviteViaLinkUiState', classMeta, VOID, VOID, InviteViaLinkUiState);
  setMetadataFor(Companion_113, 'Companion', objectMeta);
  setMetadataFor(JoinWithCodeViewModel$onClickJoin$slambda, 'JoinWithCodeViewModel$onClickJoin$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(JoinWithCodeViewModel, 'JoinWithCodeViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(JoinWithCodeUiState, 'JoinWithCodeUiState', classMeta, VOID, VOID, JoinWithCodeUiState);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_114, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_12, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda_1, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda, 'ClazzListViewModel$onClickCancelEnrolmentRequest$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel, 'ClazzListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_115, 'Companion', objectMeta);
  setMetadataFor(ClazzListUiState, 'ClazzListUiState', classMeta, VOID, VOID, ClazzListUiState);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_116, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionDetailViewModel$slambda, 'CoursePermissionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel, 'CoursePermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionDetailUiState, 'CoursePermissionDetailUiState', classMeta, VOID, VOID, CoursePermissionDetailUiState);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda_1, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_117, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionEditViewModel$slambda, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda_1, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel, 'CoursePermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionEditUiState, 'CoursePermissionEditUiState', classMeta, VOID, VOID, CoursePermissionEditUiState);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_118, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_13, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda, 'CoursePermissionListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$onClickDeleteEntry$slambda, 'CoursePermissionListViewModel$onClickDeleteEntry$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel, 'CoursePermissionListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CoursePermissionListUiState, 'CoursePermissionListUiState', classMeta, VOID, VOID, CoursePermissionListUiState);
  setMetadataFor(Companion_119, 'Companion', objectMeta);
  setMetadataFor(TextLimitType, 'TextLimitType', classMeta, Enum);
  setMetadataFor(MarkingType, 'MarkingType', classMeta, Enum);
  setMetadataFor(ClazzAssignmentViewModelConstants, 'ClazzAssignmentViewModelConstants', objectMeta);
  setMetadataFor(_no_name_provided__qut3iv_6, VOID, classMeta);
  setMetadataFor(UstadAssignmentSubmissionHeaderUiState, 'UstadAssignmentSubmissionHeaderUiState', classMeta, VOID, VOID, UstadAssignmentSubmissionHeaderUiState);
  setMetadataFor(UstadCourseAssignmentMarkListItemUiState, 'UstadCourseAssignmentMarkListItemUiState', classMeta);
  setMetadataFor(Companion_120, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailViewModel$slambda, 'ClazzAssignmentDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailViewModel, 'ClazzAssignmentDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailUiState, 'ClazzAssignmentDetailUiState', classMeta, VOID, VOID, ClazzAssignmentDetailUiState);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_121, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_14, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel, 'ClazzAssignmentDetailSubmissionsTabViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_122, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabUiState, 'ClazzAssignmentDetailSubmissionsTabUiState', classMeta, VOID, VOID, ClazzAssignmentDetailSubmissionsTabUiState);
  setMetadataFor(AssignmentSubmitterSummaryUiState, 'AssignmentSubmitterSummaryUiState', classMeta);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$61, '$collectCOROUTINE$61', classMeta, CoroutineImpl);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_7, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_123, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_15, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda, 'ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda, 'ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel, 'ClazzAssignmentDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailOverviewUiState, 'ClazzAssignmentDetailOverviewUiState', classMeta, VOID, VOID, ClazzAssignmentDetailOverviewUiState);
  setMetadataFor(ClazzAssignmentDetailoverviewSubmissionUiState, 'ClazzAssignmentDetailoverviewSubmissionUiState', classMeta, VOID, VOID, ClazzAssignmentDetailoverviewSubmissionUiState);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_7, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_9, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_11, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_124, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_16, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda, 'ClazzAssignmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda, 'ClazzAssignmentEditViewModel$onAssignmentChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda, 'ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onPictureChanged$slambda, 'ClazzAssignmentEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel, 'ClazzAssignmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [0, 2, 3, 6]);
  setMetadataFor(Companion_125, 'Companion', objectMeta);
  setMetadataFor($serializer_54, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzAssignmentEditUiState, 'ClazzAssignmentEditUiState', classMeta, VOID, VOID, ClazzAssignmentEditUiState, VOID, {0: $serializer_getInstance_66});
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda_1, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_126, 'Companion', objectMeta);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda, 'PeerReviewerAllocationEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda, 'PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel, 'PeerReviewerAllocationEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PeerReviewerAllocationEditUIState, 'PeerReviewerAllocationEditUIState', classMeta, VOID, VOID, PeerReviewerAllocationEditUIState);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_127, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_17, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel, 'ClazzAssignmentSubmitterDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzAssignmentSubmitterDetailUiState, 'ClazzAssignmentSubmitterDetailUiState', classMeta, VOID, VOID, ClazzAssignmentSubmitterDetailUiState);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_128, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_18, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda, 'ClazzMemberListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda, 'ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel, 'ClazzMemberListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzMemberListUiState, 'ClazzMemberListUiState', classMeta, VOID, VOID, ClazzMemberListUiState);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_1, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_3, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_129, 'Companion', objectMeta);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda_1, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onEntityChanged$slambda, 'ClazzEnrolmentEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onClickSave$slambda, 'ClazzEnrolmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel, 'ClazzEnrolmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzEnrolmentEditUiState, 'ClazzEnrolmentEditUiState', classMeta, VOID, VOID, ClazzEnrolmentEditUiState);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$62, '$collectCOROUTINE$62', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$63, '$collectCOROUTINE$63', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_8, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_9, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_130, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_19, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda, 'ClazzEnrolmentListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel, 'ClazzEnrolmentListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzEnrolmentListUiState, 'ClazzEnrolmentListUiState', classMeta, VOID, VOID, ClazzEnrolmentListUiState);
  setMetadataFor(ClazzEnrolmentListItemUiState, 'ClazzEnrolmentListItemUiState', classMeta);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(RecordAttendanceOption, 'RecordAttendanceOption', classMeta, Enum);
  setMetadataFor(PermissionAndExistingLogs, 'PermissionAndExistingLogs', classMeta);
  setMetadataFor(Companion_131, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_20, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda, 'ClazzLogListAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda, 'ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel, 'ClazzLogListAttendanceViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzLogListAttendanceUiState, 'ClazzLogListAttendanceUiState', classMeta, VOID, VOID, ClazzLogListAttendanceUiState);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda_1, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_132, 'Companion', objectMeta);
  setMetadataFor(ClazzLogEditViewModel$slambda, 'ClazzLogEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$onEntityChanged$slambda, 'ClazzLogEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel, 'ClazzLogEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzLogEditUiState, 'ClazzLogEditUiState', classMeta, VOID, VOID, ClazzLogEditUiState);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_3, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_133, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_2, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda, 'ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda, 'ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda, 'ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($savePersonAndAttendanceRecordsCOROUTINE$64, '$savePersonAndAttendanceRecordsCOROUTINE$64', classMeta, CoroutineImpl);
  setMetadataFor($commitAttendanceRecordsToStateCOROUTINE$65, '$commitAttendanceRecordsToStateCOROUTINE$65', classMeta, CoroutineImpl);
  setMetadataFor(ClazzLogEditAttendanceViewModel, 'ClazzLogEditAttendanceViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 0, 3, 6]);
  setMetadataFor(ClazzLogEditAttendanceUiState, 'ClazzLogEditAttendanceUiState', classMeta, VOID, VOID, ClazzLogEditAttendanceUiState);
  setMetadataFor(Companion_134, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailViewModel, 'ContentEntryDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailUiState, 'ContentEntryDetailUiState', classMeta, VOID, VOID, ContentEntryDetailUiState);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_135, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_21, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda, 'ContentEntryDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda, 'ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda, 'ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel, 'ContentEntryDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailOverviewUiState, 'ContentEntryDetailOverviewUiState', classMeta, VOID, VOID, ContentEntryDetailOverviewUiState);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_3, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_5, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_136, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_22, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda_1, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$scheduleEntityCommit$slambda, 'ContentEntryEditViewModel$scheduleEntityCommit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$onClickSave$slambda, 'ContentEntryEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel, 'ContentEntryEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryEditUiState, 'ContentEntryEditUiState', classMeta, VOID, VOID, ContentEntryEditUiState);
  setMetadataFor(Companion_137, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetadataViewModel$slambda, 'ContentEntryGetMetadataViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryGetMetadataViewModel, 'ContentEntryGetMetadataViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryGetMetadataUiState, 'ContentEntryGetMetadataUiState', classMeta, VOID, VOID, ContentEntryGetMetadataUiState);
  setMetadataFor(Companion_138, 'Companion', objectMeta);
  setMetadataFor(GetSubtitleViewModel$slambda, 'GetSubtitleViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(GetSubtitleViewModel, 'GetSubtitleViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(GetSubtitleUiState, 'GetSubtitleUiState', classMeta, VOID, VOID, GetSubtitleUiState);
  setMetadataFor(Companion_139, 'Companion', objectMeta);
  setMetadataFor(ContentEntryImportLinkViewModel$onChangeLink$slambda, 'ContentEntryImportLinkViewModel$onChangeLink$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel$onClickNext$slambda, 'ContentEntryImportLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel, 'ContentEntryImportLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryImportLinkUiState, 'ContentEntryImportLinkUiState', classMeta, VOID, VOID, ContentEntryImportLinkUiState);
  setMetadataFor(ContentEntryListItemUiState, 'ContentEntryListItemUiState', classMeta);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_1, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_3, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_5, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_140, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_23, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_1, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_3, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_5, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$launchDeleteEntries$slambda, 'ContentEntryListViewModel$launchDeleteEntries$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel, 'ContentEntryListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_141, 'Companion', objectMeta);
  setMetadataFor(ContentEntryListUiState, 'ContentEntryListUiState', classMeta, VOID, VOID, ContentEntryListUiState);
  setMetadataFor(Companion_142, 'Companion', objectMeta);
  setMetadataFor($serializer_55, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentEntryListSelectedItem, 'ContentEntryListSelectedItem', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_67});
  setMetadataFor(SubtitleEditViewModel$slambda$slambda, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$slambda$slambda_1, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_143, 'Companion', objectMeta);
  setMetadataFor(SubtitleEditViewModel$slambda, 'SubtitleEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$onEntityChanged$slambda, 'SubtitleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel, 'SubtitleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SubtitleEditUiState, 'SubtitleEditUiState', classMeta, VOID, VOID, SubtitleEditUiState);
  setMetadataFor(Companion_144, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompletionCriteria, 'CompletionCriteria', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_162});
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_3, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_5, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_145, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_24, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda, 'CourseBlockEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onEntityChanged$slambda, 'CourseBlockEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onPictureChanged$slambda, 'CourseBlockEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel, 'CourseBlockEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_146, 'Companion', objectMeta);
  setMetadataFor($serializer_56, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CourseBlockEditUiState, 'CourseBlockEditUiState', classMeta, VOID, VOID, CourseBlockEditUiState, VOID, {0: $serializer_getInstance_68});
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_147, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_25, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda, 'TextBlockDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel, 'TextBlockDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(TextBlockDetailUiState, 'TextBlockDetailUiState', classMeta, VOID, VOID, TextBlockDetailUiState);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_148, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_26, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda, 'CourseGroupSetDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel, 'CourseGroupSetDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetDetailUiState, 'CourseGroupSetDetailUiState', classMeta, VOID, VOID, CourseGroupSetDetailUiState);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_3, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_5, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_149, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetEditViewModel$slambda, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda_1, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onEntityChanged$slambda, 'CourseGroupSetEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda, 'CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda, 'CourseGroupSetEditViewModel$onClickAssignRandomly$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel, 'CourseGroupSetEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetEditUiState, 'CourseGroupSetEditUiState', classMeta, VOID, VOID, CourseGroupSetEditUiState);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_150, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListViewModel$slambda, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda_1, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel, 'CourseGroupSetListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_151, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListUiState, 'CourseGroupSetListUiState', classMeta, VOID, VOID, CourseGroupSetListUiState);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda_1, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_152, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyEditViewModel$slambda, 'CourseTerminologyEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onEntityChanged$slambda, 'CourseTerminologyEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onClickSave$slambda, 'CourseTerminologyEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel, 'CourseTerminologyEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseTerminologyEditUiState, 'CourseTerminologyEditUiState', classMeta, VOID, VOID, CourseTerminologyEditUiState);
  setMetadataFor(Companion_153, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyListViewModel$slambda, 'CourseTerminologyListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyListViewModel, 'CourseTerminologyListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseTerminologyListUiState, 'CourseTerminologyListUiState', classMeta, VOID, VOID, CourseTerminologyListUiState);
  setMetadataFor(Companion_154, 'Companion', objectMeta);
  setMetadataFor(DeletedItemListViewModel$onConfirmDeletePermanently$slambda, 'DeletedItemListViewModel$onConfirmDeletePermanently$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeletedItemListViewModel$restoreItems$slambda, 'DeletedItemListViewModel$restoreItems$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeletedItemListViewModel, 'DeletedItemListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(DeletedItemListUiState, 'DeletedItemListUiState', classMeta, VOID, VOID, DeletedItemListUiState);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_155, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_27, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda, 'CourseDiscussionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$onDeletePost$slambda, 'CourseDiscussionDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel, 'CourseDiscussionDetailViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseDiscussionDetailUiState, 'CourseDiscussionDetailUiState', classMeta, VOID, VOID, CourseDiscussionDetailUiState);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_156, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_28, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda, 'DiscussionPostDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onChangeReplyText$slambda, 'DiscussionPostDetailViewModel$onChangeReplyText$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onClickPostReply$slambda, 'DiscussionPostDetailViewModel$onClickPostReply$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$submitReply$slambda, 'DiscussionPostDetailViewModel$submitReply$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onDeletePost$slambda, 'DiscussionPostDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($submitReplyCOROUTINE$66, '$submitReplyCOROUTINE$66', classMeta, CoroutineImpl);
  setMetadataFor(DiscussionPostDetailViewModel, 'DiscussionPostDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(DiscussionPostDetailUiState2, 'DiscussionPostDetailUiState2', classMeta, VOID, VOID, DiscussionPostDetailUiState2);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda_1, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_157, 'Companion', objectMeta);
  setMetadataFor(DiscussionPostEditViewModel$slambda, 'DiscussionPostEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onEntityChanged$slambda, 'DiscussionPostEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel, 'DiscussionPostEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DiscussionPostEditUiState, 'DiscussionPostEditUiState', classMeta, VOID, VOID, DiscussionPostEditUiState);
  setMetadataFor(EpubContentViewModel$slambda$slambda$slambda, 'EpubContentViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EpubContentViewModel$slambda$slambda, 'EpubContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_158, 'Companion', objectMeta);
  setMetadataFor(EpubContentViewModel$slambda, 'EpubContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AbstractNonInteractiveContentViewModel, 'AbstractNonInteractiveContentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentViewModel, 'EpubContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentUiState, 'EpubContentUiState', classMeta, VOID, VOID, EpubContentUiState);
  setMetadataFor(EpubScrollCommand, 'EpubScrollCommand', classMeta);
  setMetadataFor(EpubTocItem, 'EpubTocItem', classMeta);
  setMetadataFor(Companion_159, 'Companion', objectMeta);
  setMetadataFor(Companion_160, 'Companion', objectMeta);
  setMetadataFor(LoginViewModel$slambda, 'LoginViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickLogin$slambda, 'LoginViewModel$onClickLogin$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickConnectAsGuest$slambda, 'LoginViewModel$onClickConnectAsGuest$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel, 'LoginViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LoginUiState, 'LoginUiState', classMeta, VOID, VOID, LoginUiState);
  setMetadataFor(Companion_161, 'Companion', objectMeta);
  setMetadataFor(ConversationListViewModel, 'ConversationListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ConversationListUiState, 'ConversationListUiState', classMeta, VOID, VOID, ConversationListUiState);
  setMetadataFor(MessageListViewModel$slambda$slambda$slambda, 'MessageListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda$slambda, 'MessageListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_162, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_29, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda, 'MessageListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$onWarningDismiss$slambda, 'MessageListViewModel$onWarningDismiss$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$onClickSend$slambda, 'MessageListViewModel$onClickSend$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel, 'MessageListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(MessageListUiState, 'MessageListUiState', classMeta, VOID, VOID, MessageListUiState);
  setMetadataFor(TitleAndLangCode, 'TitleAndLangCode', classMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_163, 'Companion', objectMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$updateStatus$slambda, 'ParentalConsentManagementViewModel$updateStatus$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel, 'ParentalConsentManagementViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ParentalConsentManagementUiState, 'ParentalConsentManagementUiState', classMeta, VOID, VOID, ParentalConsentManagementUiState);
  setMetadataFor(Companion_164, 'Companion', objectMeta);
  setMetadataFor(PdfContentViewModel$slambda, 'PdfContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PdfContentViewModel, 'PdfContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PdfContentUiState, 'PdfContentUiState', classMeta, VOID, VOID, PdfContentUiState);
  setMetadataFor(PersonViewModelConstants, 'PersonViewModelConstants', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda_1, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda$slambda, 'PersonAccountEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_165, 'Companion', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda_1, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onEntityChanged$slambda, 'PersonAccountEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda, 'PersonAccountEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel, 'PersonAccountEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonAccountEditUiState, 'PersonAccountEditUiState', classMeta, VOID, VOID, PersonAccountEditUiState);
  setMetadataFor(Companion_166, 'Companion', objectMeta);
  setMetadataFor($serializer_57, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PersonUsernameAndPasswordModel, 'PersonUsernameAndPasswordModel', classMeta, VOID, VOID, PersonUsernameAndPasswordModel, VOID, {0: $serializer_getInstance_69});
  setMetadataFor(Companion_167, 'Companion', objectMeta);
  setMetadataFor(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0, 'sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0', classMeta);
  setMetadataFor(BulkAddPersonRunImportViewModel$slambda, 'BulkAddPersonRunImportViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonRunImportViewModel, 'BulkAddPersonRunImportViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_168, 'Companion', objectMeta);
  setMetadataFor($serializer_58, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonRunImportUiState, 'BulkAddPersonRunImportUiState', classMeta, VOID, VOID, BulkAddPersonRunImportUiState, VOID, {0: $serializer_getInstance_70});
  setMetadataFor(Companion_169, 'Companion', objectMeta);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda_1, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda, 'BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel, 'BulkAddPersonSelectFileViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(BulkAddPersonSelectFileUiState, 'BulkAddPersonSelectFileUiState', classMeta, VOID, VOID, BulkAddPersonSelectFileUiState);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_7, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda, 'PersonDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_170, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_30, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda, 'PersonDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel, 'PersonDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonDetailUiState, 'PersonDetailUiState', classMeta, VOID, VOID, PersonDetailUiState);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_3, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_5, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda$slambda, 'PersonEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_171, 'Companion', objectMeta);
  setMetadataFor(PersonEditViewModel$slambda, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda_1, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onEntityChanged$slambda, 'PersonEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onPersonPictureChanged$slambda, 'PersonEditViewModel$onPersonPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda, 'PersonEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel, 'PersonEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonEditUiState, 'PersonEditUiState', classMeta, VOID, VOID, PersonEditUiState);
  setMetadataFor(EmptyPagingSource, 'EmptyPagingSource', classMeta, PagingSource, VOID, EmptyPagingSource, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda$slambda, 'PersonListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonListViewModel$slambda$slambda_1, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_172, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_31, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda_1, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel, 'PersonListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(PersonListUiState, 'PersonListUiState', classMeta, VOID, VOID, PersonListUiState);
  setMetadataFor(Companion_173, 'Companion', objectMeta);
  setMetadataFor(RegisterAgeRedirectViewModel, 'RegisterAgeRedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterAgeRedirectUiState, 'RegisterAgeRedirectUiState', classMeta, VOID, VOID, RegisterAgeRedirectUiState);
  setMetadataFor(Companion_174, 'Companion', objectMeta);
  setMetadataFor(RegisterMinorWaitForParentViewModel, 'RegisterMinorWaitForParentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterMinorWaitForParentUiState, 'RegisterMinorWaitForParentUiState', classMeta, VOID, VOID, RegisterMinorWaitForParentUiState);
  setMetadataFor(Companion_175, 'Companion', objectMeta);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(RedirectViewModel$slambda, 'RedirectViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RedirectViewModel, 'RedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda_1, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_176, 'Companion', objectMeta);
  setMetadataFor(ScheduleEditViewModel$slambda, 'ScheduleEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$onEntityChanged$slambda, 'ScheduleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel, 'ScheduleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ScheduleEditUiState, 'ScheduleEditUiState', classMeta, VOID, VOID, ScheduleEditUiState);
  setMetadataFor(Companion_177, 'Companion', objectMeta);
  setMetadataFor(SettingsViewModel$slambda$slambda, 'SettingsViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_178, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_32, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel$slambda, 'SettingsViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel$slambda_1, 'SettingsViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel, 'SettingsViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SettingsUiState, 'SettingsUiState', classMeta, VOID, VOID, SettingsUiState);
  setMetadataFor(SettingsOfflineStorageOption, 'SettingsOfflineStorageOption', classMeta);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda_1, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda_3, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda, 'SiteDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda_1, 'SiteDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda, 'SiteDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_179, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_33, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda, 'SiteDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel, 'SiteDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteDetailUiState, 'SiteDetailUiState', classMeta, VOID, VOID, SiteDetailUiState);
  setMetadataFor(SiteEditViewModel$slambda$slambda$slambda, 'SiteEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_1, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_3, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_5, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_7, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_180, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_34, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda, 'SiteEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda_1, 'SiteEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onChangeTermsHtml$slambda, 'SiteEditViewModel$onChangeTermsHtml$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onEntityChanged$slambda, 'SiteEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onClickSave$slambda, 'SiteEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel, 'SiteEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteEditUiState, 'SiteEditUiState', classMeta, VOID, VOID, SiteEditUiState);
  setMetadataFor(Companion_181, 'Companion', objectMeta);
  setMetadataFor(SiteTermsDetailViewModel$slambda, 'SiteTermsDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteTermsDetailViewModel, 'SiteTermsDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteTermsDetailUiState, 'SiteTermsDetailUiState', classMeta, VOID, VOID, SiteTermsDetailUiState);
  setMetadataFor(Companion_182, 'Companion', objectMeta);
  setMetadataFor(SiteEnterLinkViewModel$onClickNext$slambda, 'SiteEnterLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEnterLinkViewModel, 'SiteEnterLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteEnterLinkUiState, 'SiteEnterLinkUiState', classMeta, VOID, VOID, SiteEnterLinkUiState);
  setMetadataFor(SystemPermissionConstants, 'SystemPermissionConstants', objectMeta);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_183, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_35, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda, 'SystemPermissionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel, 'SystemPermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionDetailUiState, 'SystemPermissionDetailUiState', classMeta, VOID, VOID, SystemPermissionDetailUiState);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda_1, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_184, 'Companion', objectMeta);
  setMetadataFor(SystemPermissionEditViewModel$slambda, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda_1, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel, 'SystemPermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionEditUiState, 'SystemPermissionEditUiState', classMeta, VOID, VOID, SystemPermissionEditUiState);
  setMetadataFor(TimeZoneListViewModel$slambda$slambda, 'TimeZoneListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_185, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_3, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(TimeZoneListViewModel$slambda, 'TimeZoneListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel, 'TimeZoneListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(TimezoneListUiState, 'TimezoneListUiState', classMeta, VOID, VOID, TimezoneListUiState);
  setMetadataFor(VideoContentViewModel$slambda$slambda, 'VideoContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(VideoContentViewModel$slambda$slambda_1, 'VideoContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MediaPlayState, 'MediaPlayState', classMeta, VOID, VOID, MediaPlayState);
  setMetadataFor(Companion_186, 'Companion', objectMeta);
  setMetadataFor(VideoContentViewModel$slambda, 'VideoContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(VideoContentViewModel, 'VideoContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(VideoContentUiState, 'VideoContentUiState', classMeta, VOID, VOID, VideoContentUiState);
  setMetadataFor(Companion_187, 'Companion', objectMeta);
  setMetadataFor(XapiContentViewModel$slambda, 'XapiContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(XapiContentViewModel, 'XapiContentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(XapiContentUiState, 'XapiContentUiState', classMeta, VOID, VOID, XapiContentUiState);
  setMetadataFor($encryptPbkdf2COROUTINE$67, '$encryptPbkdf2COROUTINE$67', classMeta, CoroutineImpl);
  setMetadataFor($doublePbkdf2HashAsBase64COROUTINE$69, '$doublePbkdf2HashAsBase64COROUTINE$69', classMeta, CoroutineImpl);
  setMetadataFor(NavHostFunction, 'NavHostFunction', classMeta);
  setMetadataFor(NavHost$lambda$lambda$launchClearStackTimeout$slambda, 'NavHost$lambda$lambda$launchClearStackTimeout$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$70, '$invokeCOROUTINE$70', classMeta, CoroutineImpl);
  setMetadataFor(SetPasswordUseCaseJs, 'SetPasswordUseCaseJs', classMeta, VOID, [SetPasswordUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(OpenBlobUseCaseJs, 'OpenBlobUseCaseJs', classMeta, VOID, [OpenBlobUseCase], OpenBlobUseCaseJs, VOID, VOID, [3]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UriToSaveQueueItem, 'UriToSaveQueueItem', classMeta);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$71, '$invokeCOROUTINE$71', classMeta, CoroutineImpl);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs, 'SaveLocalUrisAsBlobUseCaseJs', classMeta, VOID, [SaveLocalUrisAsBlobsUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueSavePictureUseCaseJs$invoke$slambda, 'EnqueueSavePictureUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnqueueSavePictureUseCaseJs, 'EnqueueSavePictureUseCaseJs', classMeta, VOID, [EnqueueSavePictureUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor(SetClipboardStringUseCaseJs, 'SetClipboardStringUseCaseJs', classMeta, VOID, [SetClipboardStringUseCase], SetClipboardStringUseCaseJs);
  setMetadataFor($invokeCOROUTINE$72, '$invokeCOROUTINE$72', classMeta, CoroutineImpl);
  setMetadataFor(CompressImageUseCaseJs, 'CompressImageUseCaseJs', classMeta, VOID, [CompressUseCase], CompressImageUseCaseJs, VOID, VOID, [4]);
  setMetadataFor(Companion_188, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$73, '$invokeCOROUTINE$73', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCaseJs, 'ContentEntryGetMetaDataFromUriUseCaseJs', classMeta, VOID, [ContentEntryGetMetaDataFromUriUseCase], VOID, VOID, VOID, [4]);
  setMetadataFor($invokeCOROUTINE$74, '$invokeCOROUTINE$74', classMeta, CoroutineImpl);
  setMetadataFor(GetSubtitleTrackFromUriUseCaseJs, 'GetSubtitleTrackFromUriUseCaseJs', classMeta, VOID, [GetSubtitleTrackFromUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor($invokeCOROUTINE$75, '$invokeCOROUTINE$75', classMeta, CoroutineImpl);
  setMetadataFor(LaunchXapiUseCaseJs, 'LaunchXapiUseCaseJs', classMeta, VOID, [LaunchXapiUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor($invokeCOROUTINE$76, '$invokeCOROUTINE$76', classMeta, CoroutineImpl);
  setMetadataFor(BlobFileUseCaseJs, 'BlobFileUseCaseJs', classMeta, VOID, [BlobFileUseCase], BlobFileUseCaseJs, VOID, VOID, [3]);
  setMetadataFor(SetLanguageUseCaseJs, 'SetLanguageUseCaseJs', classMeta, VOID, [SetLanguageUseCase]);
  setMetadataFor(OpenExternalLinkUseCaseJs, 'OpenExternalLinkUseCaseJs', classMeta, VOID, [OpenExternalLinkUseCase], OpenExternalLinkUseCaseJs);
  setMetadataFor(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda, 'BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$77, '$invokeCOROUTINE$77', classMeta, CoroutineImpl);
  setMetadataFor(BulkAddPersonsFromLocalUriUseCaseJs, 'BulkAddPersonsFromLocalUriUseCaseJs', classMeta, VOID, [BulkAddPersonsFromLocalUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor(OnClickPhoneNumUseCaseJs, 'OnClickPhoneNumUseCaseJs', classMeta, VOID, [OnClickPhoneNumUseCase], OnClickPhoneNumUseCaseJs);
  setMetadataFor(PhoneNumValidatorUseCaseJs, 'PhoneNumValidatorUseCaseJs', classMeta, VOID, [PhoneNumValidatorUseCase], PhoneNumValidatorUseCaseJs);
  setMetadataFor(PhoneNumberJs, 'PhoneNumberJs', classMeta);
  setMetadataFor(PhoneNumberUtilJs, 'PhoneNumberUtilJs', classMeta, VOID, [IPhoneNumberUtil], PhoneNumberUtilJs);
  setMetadataFor(OnClickSendEmailUseCaseJs, 'OnClickSendEmailUseCaseJs', classMeta, VOID, [OnClickEmailUseCase], OnClickSendEmailUseCaseJs);
  setMetadataFor(DeleteUrisUseCaseJs, 'DeleteUrisUseCaseJs', classMeta, VOID, [DeleteUrisUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(IsTempFileCheckerUseCaseJs, 'IsTempFileCheckerUseCaseJs', classMeta, VOID, [IsTempFileCheckerUseCase], IsTempFileCheckerUseCaseJs);
  setMetadataFor($invokeCOROUTINE$78, '$invokeCOROUTINE$78', classMeta, CoroutineImpl);
  setMetadataFor(ChunkedUploadClientLocalUriUseCaseJs, 'ChunkedUploadClientLocalUriUseCaseJs', classMeta, VOID, [ChunkedUploadClientLocalUriUseCase], ChunkedUploadClientLocalUriUseCaseJs, VOID, VOID, [8]);
  setMetadataFor(SaveStatementOnClearUseCaseJs$invoke$slambda, 'SaveStatementOnClearUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveStatementOnClearUseCaseJs, 'SaveStatementOnClearUseCaseJs', classMeta, VOID, [SaveStatementOnClearUseCase]);
  setMetadataFor(SaveStatementOnUnloadUseCaseJs, 'SaveStatementOnUnloadUseCaseJs', classMeta, VOID, [SaveStatementOnUnloadUseCase]);
  setMetadataFor($invokeCOROUTINE$79, '$invokeCOROUTINE$79', classMeta, CoroutineImpl);
  setMetadataFor(ResumeOrStartXapiSessionUseCaseJs, 'ResumeOrStartXapiSessionUseCaseJs', classMeta, VOID, [ResumeOrStartXapiSessionUseCase], VOID, VOID, VOID, [7]);
  setMetadataFor(XXHasher64FactoryJs, 'XXHasher64FactoryJs', classMeta, VOID, [XXHasher64Factory], XXHasher64FactoryJs);
  setMetadataFor(XXHasher64Js, 'XXHasher64Js', classMeta);
  setMetadataFor(XXStringHasherJs, 'XXStringHasherJs', classMeta, VOID, [XXStringHasher], XXStringHasherJs);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_36, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(collectAsState$lambda$slambda$slambda, 'collectAsState$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(collectAsState$lambda$slambda, 'collectAsState$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(useLaunchedEffect$lambda$slambda, 'useLaunchedEffect$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_37, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(useNavControllerEffect$slambda$slambda, 'useNavControllerEffect$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(useNavControllerEffect$slambda, 'useNavControllerEffect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ViewModelAndKey, 'ViewModelAndKey', classMeta);
  setMetadataFor(Companion_189, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemImpl, 'UstadMobileSystemImpl', classMeta, UstadMobileSystemCommon, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(StringProviderJs, 'StringProviderJs', classMeta);
  setMetadataFor(Companion_190, 'Companion', objectMeta);
  setMetadataFor(SavedStateHandle2, 'SavedStateHandle2', classMeta);
  setMetadataFor(ClazzLogCreatorManagerJs, 'ClazzLogCreatorManagerJs', classMeta, VOID, [ClazzLogCreatorManager], ClazzLogCreatorManagerJs);
  setMetadataFor(UrlKmpJs, 'UrlKmpJs', classMeta);
  setMetadataFor(Companion_191, 'Companion', objectMeta);
  setMetadataFor(UstadAntilog, 'UstadAntilog', classMeta, Antilog, VOID, UstadAntilog);
  setMetadataFor(JsHeaderStringValuesAdapter, 'JsHeaderStringValuesAdapter', classMeta, VOID, [IStringValues]);
  //endregion
  function strings() {
    strings_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_stringsJson.json');
    tmp.sli_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_stringsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_stringsJson_ne.json');
    var tmp_5 = new SupportedLocale('ne', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_stringsJson_ar.json');
    var tmp_7 = new SupportedLocale('ar', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_stringsJson_bn.json');
    var tmp_9 = new SupportedLocale('bn', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_stringsJson_fr.json');
    var tmp_11 = new SupportedLocale('fr', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_stringsJson_km.json');
    var tmp_13 = new SupportedLocale('km', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_stringsJson_fa.json');
    var tmp_15 = new SupportedLocale('fa', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_stringsJson_nb-NO.json');
    var tmp_17 = new SupportedLocale('nb-NO', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_stringsJson_it.json');
    var tmp_19 = new SupportedLocale('it', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_stringsJson_my.json');
    var tmp_21 = new SupportedLocale('my', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_stringsJson_ps.json');
    var tmp_23 = new SupportedLocale('ps', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_stringsJson_tg.json');
    var tmp_25 = new SupportedLocale('tg', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE());
    var tmp_26 = require('localization/comustadmobilecore_stringsJson_ru.json');
    tmp_1.tli_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, tmp_25, new SupportedLocale('ru', (!(tmp_26 == null) ? typeof tmp_26 === 'string' : false) ? tmp_26 : THROW_CCE())]));
    this.uli_1 = new Impl(this.tli_1, this.sli_1);
    this.vli_1 = new StringResource('app_name', this.uli_1);
    this.wli_1 = new StringResource('blank', this.uli_1);
    this.xli_1 = new StringResource('login', this.uli_1);
    this.yli_1 = new StringResource('jetpack_compose_theme_name', this.uli_1);
    this.zli_1 = new StringResource('mui_theme_name', this.uli_1);
    this.alj_1 = new StringResource('got_it', this.uli_1);
    this.blj_1 = new StringResource('learn_more', this.uli_1);
    this.clj_1 = new StringResource('be_careful_interacting_online', this.uli_1);
    this.dlj_1 = new StringResource('be_careful_not_to_share', this.uli_1);
    this.elj_1 = new StringResource('share_app', this.uli_1);
    this.flj_1 = new StringResource('send_apk_file', this.uli_1);
    this.glj_1 = new StringResource('send_app_link', this.uli_1);
    this.hlj_1 = new StringResource('error', this.uli_1);
    this.ilj_1 = new StringResource('err_registering_new_user', this.uli_1);
    this.jlj_1 = new StringResource('register_empty_fields', this.uli_1);
    this.klj_1 = new StringResource('register_incorrect_email', this.uli_1);
    this.llj_1 = new StringResource('group_activity', this.uli_1);
    this.mlj_1 = new StringResource('select_group_members', this.uli_1);
    this.nlj_1 = new StringResource('confirm_delete_message', this.uli_1);
    this.olj_1 = new StringResource('wrong_user_pass_combo', this.uli_1);
    this.plj_1 = new StringResource('login_network_error', this.uli_1);
    this.qlj_1 = new StringResource('download', this.uli_1);
    this.rlj_1 = new StringResource('downloaded', this.uli_1);
    this.slj_1 = new StringResource('recycled', this.uli_1);
    this.tlj_1 = new StringResource('libraries', this.uli_1);
    this.ulj_1 = new StringResource('pause_download', this.uli_1);
    this.vlj_1 = new StringResource('ok', this.uli_1);
    this.wlj_1 = new StringResource('confirm', this.uli_1);
    this.xlj_1 = new StringResource('cancel', this.uli_1);
    this.ylj_1 = new StringResource('canceled', this.uli_1);
    this.zlj_1 = new StringResource('delete', this.uli_1);
    this.alk_1 = new StringResource('deleted', this.uli_1);
    this.blk_1 = new StringResource('new_tab', this.uli_1);
    this.clk_1 = new StringResource('loading', this.uli_1);
    this.dlk_1 = new StringResource('deleting', this.uli_1);
    this.elk_1 = new StringResource('processing', this.uli_1);
    this.flk_1 = new StringResource('uploading', this.uli_1);
    this.glk_1 = new StringResource('error_opening_file', this.uli_1);
    this.hlk_1 = new StringResource('logout', this.uli_1);
    this.ilk_1 = new StringResource('about', this.uli_1);
    this.jlk_1 = new StringResource('download_all', this.uli_1);
    this.klk_1 = new StringResource('next', this.uli_1);
    this.llk_1 = new StringResource('previous', this.uli_1);
    this.mlk_1 = new StringResource('back', this.uli_1);
    this.nlk_1 = new StringResource('username', this.uli_1);
    this.olk_1 = new StringResource('password', this.uli_1);
    this.plk_1 = new StringResource('confirm_password', this.uli_1);
    this.qlk_1 = new StringResource('last_name', this.uli_1);
    this.rlk_1 = new StringResource('first_name', this.uli_1);
    this.slk_1 = new StringResource('register_now', this.uli_1);
    this.tlk_1 = new StringResource('new_password', this.uli_1);
    this.ulk_1 = new StringResource('phone_memory', this.uli_1);
    this.vlk_1 = new StringResource('memory_card', this.uli_1);
    this.wlk_1 = new StringResource('device', this.uli_1);
    this.xlk_1 = new StringResource('register', this.uli_1);
    this.ylk_1 = new StringResource('phone_number', this.uli_1);
    this.zlk_1 = new StringResource('name_key', this.uli_1);
    this.all_1 = new StringResource('description', this.uli_1);
    this.bll_1 = new StringResource('male', this.uli_1);
    this.cll_1 = new StringResource('female', this.uli_1);
    this.dll_1 = new StringResource('other', this.uli_1);
    this.ell_1 = new StringResource('unset', this.uli_1);
    this.fll_1 = new StringResource('settings', this.uli_1);
    this.gll_1 = new StringResource('language', this.uli_1);
    this.hll_1 = new StringResource('add_a_new_language', this.uli_1);
    this.ill_1 = new StringResource('add_new_language', this.uli_1);
    this.jll_1 = new StringResource('select_language', this.uli_1);
    this.kll_1 = new StringResource('languages', this.uli_1);
    this.lll_1 = new StringResource('edit_language', this.uli_1);
    this.mll_1 = new StringResource('two_letter_code', this.uli_1);
    this.nll_1 = new StringResource('three_letter_code', this.uli_1);
    this.oll_1 = new StringResource('languages_description', this.uli_1);
    this.pll_1 = new StringResource('advanced', this.uli_1);
    this.qll_1 = new StringResource('optional', this.uli_1);
    this.rll_1 = new StringResource('email', this.uli_1);
    this.sll_1 = new StringResource('regcode', this.uli_1);
    this.tll_1 = new StringResource('home', this.uli_1);
    this.ull_1 = new StringResource('phone', this.uli_1);
    this.vll_1 = new StringResource('attendance', this.uli_1);
    this.wll_1 = new StringResource('classes', this.uli_1);
    this.xll_1 = new StringResource('exams', this.uli_1);
    this.yll_1 = new StringResource('reports', this.uli_1);
    this.zll_1 = new StringResource('choose_template', this.uli_1);
    this.alm_1 = new StringResource('organisation_name', this.uli_1);
    this.blm_1 = new StringResource('organisation_logo', this.uli_1);
    this.clm_1 = new StringResource('jetpack_compose_theme', this.uli_1);
    this.dlm_1 = new StringResource('mui_theme', this.uli_1);
    this.elm_1 = new StringResource('choose_file', this.uli_1);
    this.flm_1 = new StringResource('no_file_chosen', this.uli_1);
    this.glm_1 = new StringResource('save_as_template', this.uli_1);
    this.hlm_1 = new StringResource('contents', this.uli_1);
    this.ilm_1 = new StringResource('students', this.uli_1);
    this.jlm_1 = new StringResource('add_a_student', this.uli_1);
    this.klm_1 = new StringResource('forgot_password', this.uli_1);
    this.llm_1 = new StringResource('notifications', this.uli_1);
    this.mlm_1 = new StringResource('account', this.uli_1);
    this.nlm_1 = new StringResource('accounts', this.uli_1);
    this.olm_1 = new StringResource('share', this.uli_1);
    this.plm_1 = new StringResource('send', this.uli_1);
    this.qlm_1 = new StringResource('open', this.uli_1);
    this.rlm_1 = new StringResource('downloading', this.uli_1);
    this.slm_1 = new StringResource('waiting', this.uli_1);
    this.tlm_1 = new StringResource('waiting_for_connection', this.uli_1);
    this.ulm_1 = new StringResource('queued', this.uli_1);
    this.vlm_1 = new StringResource('failed', this.uli_1);
    this.wlm_1 = new StringResource('passed', this.uli_1);
    this.xlm_1 = new StringResource('success', this.uli_1);
    this.ylm_1 = new StringResource('incomplete', this.uli_1);
    this.zlm_1 = new StringResource('completed', this.uli_1);
    this.aln_1 = new StringResource('select_subtitle_video', this.uli_1);
    this.bln_1 = new StringResource('no_subtitle', this.uli_1);
    this.cln_1 = new StringResource('no_video_file_found', this.uli_1);
    this.dln_1 = new StringResource('content_from_file', this.uli_1);
    this.eln_1 = new StringResource('content_from_link', this.uli_1);
    this.fln_1 = new StringResource('import_from_file', this.uli_1);
    this.gln_1 = new StringResource('import_from_link', this.uli_1);
    this.hln_1 = new StringResource('import_content', this.uli_1);
    this.iln_1 = new StringResource('update_content', this.uli_1);
    this.jln_1 = new StringResource('publicly_accessible', this.uli_1);
    this.kln_1 = new StringResource('title', this.uli_1);
    this.lln_1 = new StringResource('licence', this.uli_1);
    this.mln_1 = new StringResource('ebook', this.uli_1);
    this.nln_1 = new StringResource('interactive', this.uli_1);
    this.oln_1 = new StringResource('collection', this.uli_1);
    this.pln_1 = new StringResource('document', this.uli_1);
    this.qln_1 = new StringResource('article', this.uli_1);
    this.rln_1 = new StringResource('audio', this.uli_1);
    this.sln_1 = new StringResource('move', this.uli_1);
    this.tln_1 = new StringResource('hide', this.uli_1);
    this.uln_1 = new StringResource('unhide', this.uli_1);
    this.vln_1 = new StringResource('compress', this.uli_1);
    this.wln_1 = new StringResource('and_key', this.uli_1);
    this.xln_1 = new StringResource('added', this.uli_1);
    this.yln_1 = new StringResource('attempts', this.uli_1);
    this.zln_1 = new StringResource('add_link_description', this.uli_1);
    this.alo_1 = new StringResource('add_gallery_description', this.uli_1);
    this.blo_1 = new StringResource('add_file_description', this.uli_1);
    this.clo_1 = new StringResource('error_this_device_doesnt_support_bluetooth_sharing', this.uli_1);
    this.dlo_1 = new StringResource('share_offline_zip_checkbox_label', this.uli_1);
    this.elo_1 = new StringResource('share_offline_dialog_message', this.uli_1);
    this.flo_1 = new StringResource('preparing', this.uli_1);
    this.glo_1 = new StringResource('fixed_date', this.uli_1);
    this.hlo_1 = new StringResource('relative_date', this.uli_1);
    this.ilo_1 = new StringResource('field_required_prompt', this.uli_1);
    this.jlo_1 = new StringResource('field_password_error_min', this.uli_1);
    this.klo_1 = new StringResource('filed_password_no_match', this.uli_1);
    this.llo_1 = new StringResource('update', this.uli_1);
    this.mlo_1 = new StringResource('profile', this.uli_1);
    this.nlo_1 = new StringResource('dialog_download_from_playstore_message', this.uli_1);
    this.olo_1 = new StringResource('dialog_download_from_playstore_ok', this.uli_1);
    this.plo_1 = new StringResource('dialog_download_from_playstore_cancel', this.uli_1);
    this.qlo_1 = new StringResource('accept', this.uli_1);
    this.rlo_1 = new StringResource('also_available_in', this.uli_1);
    this.slo_1 = new StringResource('created_partnership', this.uli_1);
    this.tlo_1 = new StringResource('onboarding_get_started_label', this.uli_1);
    this.ulo_1 = new StringResource('lets_get_started_label', this.uli_1);
    this.vlo_1 = new StringResource('onboarding_headline1', this.uli_1);
    this.wlo_1 = new StringResource('onboarding_subheadline1', this.uli_1);
    this.xlo_1 = new StringResource('onboarding_headline2', this.uli_1);
    this.ylo_1 = new StringResource('onboarding_subheadline2', this.uli_1);
    this.zlo_1 = new StringResource('onboarding_headline3', this.uli_1);
    this.alp_1 = new StringResource('onboarding_subheadline3', this.uli_1);
    this.blp_1 = new StringResource('download_continue_stacked_label', this.uli_1);
    this.clp_1 = new StringResource('download_continue_btn_label', this.uli_1);
    this.dlp_1 = new StringResource('download_wifi_only', this.uli_1);
    this.elp_1 = new StringResource('download_calculating', this.uli_1);
    this.flp_1 = new StringResource('download_state_download', this.uli_1);
    this.glp_1 = new StringResource('download_state_downloading', this.uli_1);
    this.hlp_1 = new StringResource('download_state_downloaded', this.uli_1);
    this.ilp_1 = new StringResource('download_downloading_placeholder', this.uli_1);
    this.jlp_1 = new StringResource('download_summary_title', this.uli_1);
    this.klp_1 = new StringResource('download_cancel_label', this.uli_1);
    this.llp_1 = new StringResource('download_pause_download', this.uli_1);
    this.mlp_1 = new StringResource('download_storage_option_device', this.uli_1);
    this.nlp_1 = new StringResource('download_locally_availability', this.uli_1);
    this.olp_1 = new StringResource('download_cloud_availability', this.uli_1);
    this.plp_1 = new StringResource('insufficient_space', this.uli_1);
    this.qlp_1 = new StringResource('download_entry_state_paused', this.uli_1);
    this.rlp_1 = new StringResource('get_app', this.uli_1);
    this.slp_1 = new StringResource('no_app_found', this.uli_1);
    this.tlp_1 = new StringResource('entry_details_author', this.uli_1);
    this.ulp_1 = new StringResource('entry_details_publisher', this.uli_1);
    this.vlp_1 = new StringResource('entry_details_license', this.uli_1);
    this.wlp_1 = new StringResource('file_not_found', this.uli_1);
    this.xlp_1 = new StringResource('multiple_choice', this.uli_1);
    this.ylp_1 = new StringResource('preview', this.uli_1);
    this.zlp_1 = new StringResource('content_creation_storage_option_title', this.uli_1);
    this.alq_1 = new StringResource('file_required_prompt', this.uli_1);
    this.blq_1 = new StringResource('content_creation_folder_new_message', this.uli_1);
    this.clq_1 = new StringResource('content_creation_folder_update_message', this.uli_1);
    this.dlq_1 = new StringResource('error_message_load_page', this.uli_1);
    this.elq_1 = new StringResource('error_message_update_document', this.uli_1);
    this.flq_1 = new StringResource('supported_files', this.uli_1);
    this.glq_1 = new StringResource('content_editor_save_error', this.uli_1);
    this.hlq_1 = new StringResource('content_entry_export_inprogress', this.uli_1);
    this.ilq_1 = new StringResource('content_entry_export_message', this.uli_1);
    this.jlq_1 = new StringResource('show_hidden_items', this.uli_1);
    this.klq_1 = new StringResource('open_folder', this.uli_1);
    this.llq_1 = new StringResource('action_hidden', this.uli_1);
    this.mlq_1 = new StringResource('invalid', this.uli_1);
    this.nlq_1 = new StringResource('enter_register_code', this.uli_1);
    this.olq_1 = new StringResource('bar_chart', this.uli_1);
    this.plq_1 = new StringResource('line_chart', this.uli_1);
    this.qlq_1 = new StringResource('score', this.uli_1);
    this.rlq_1 = new StringResource('content_total_duration', this.uli_1);
    this.slq_1 = new StringResource('content_average_duration', this.uli_1);
    this.tlq_1 = new StringResource('count_session', this.uli_1);
    this.ulq_1 = new StringResource('interaction_recorded', this.uli_1);
    this.vlq_1 = new StringResource('number_active_users', this.uli_1);
    this.wlq_1 = new StringResource('average_usage_time_per_user', this.uli_1);
    this.xlq_1 = new StringResource('number_students_completed', this.uli_1);
    this.ylq_1 = new StringResource('percent_students_completed', this.uli_1);
    this.zlq_1 = new StringResource('total_attendances', this.uli_1);
    this.alr_1 = new StringResource('total_absences', this.uli_1);
    this.blr_1 = new StringResource('total_lates', this.uli_1);
    this.clr_1 = new StringResource('percent_students_attended', this.uli_1);
    this.dlr_1 = new StringResource('percent_students_attended_or_late', this.uli_1);
    this.elr_1 = new StringResource('total_number_of_classes', this.uli_1);
    this.flr_1 = new StringResource('number_unique_students_attending', this.uli_1);
    this.glr_1 = new StringResource('xapi_day', this.uli_1);
    this.hlr_1 = new StringResource('xapi_week', this.uli_1);
    this.ilr_1 = new StringResource('xapi_month', this.uli_1);
    this.jlr_1 = new StringResource('xapi_custom_date', this.uli_1);
    this.klr_1 = new StringResource('xapi_content_entry', this.uli_1);
    this.llr_1 = new StringResource('xapi_clear', this.uli_1);
    this.mlr_1 = new StringResource('last_week_date_range', this.uli_1);
    this.nlr_1 = new StringResource('last_two_week_date_range', this.uli_1);
    this.olr_1 = new StringResource('last_month_date_range', this.uli_1);
    this.plr_1 = new StringResource('last_three_months_date_range', this.uli_1);
    this.qlr_1 = new StringResource('new_custom_date_range', this.uli_1);
    this.rlr_1 = new StringResource('selected_custom_range', this.uli_1);
    this.slr_1 = new StringResource('time_range', this.uli_1);
    this.tlr_1 = new StringResource('year', this.uli_1);
    this.ulr_1 = new StringResource('from', this.uli_1);
    this.vlr_1 = new StringResource('done', this.uli_1);
    this.wlr_1 = new StringResource('xapi_options_general', this.uli_1);
    this.xlr_1 = new StringResource('xapi_options_report_title', this.uli_1);
    this.ylr_1 = new StringResource('xapi_options_visual_type', this.uli_1);
    this.zlr_1 = new StringResource('xapi_options_data_set', this.uli_1);
    this.als_1 = new StringResource('xapi_options_series', this.uli_1);
    this.bls_1 = new StringResource('xapi_options_axes', this.uli_1);
    this.cls_1 = new StringResource('xapi_options_y_axes', this.uli_1);
    this.dls_1 = new StringResource('xapi_options_x_axes', this.uli_1);
    this.els_1 = new StringResource('xapi_options_subgroup', this.uli_1);
    this.fls_1 = new StringResource('xapi_options_filters', this.uli_1);
    this.gls_1 = new StringResource('xapi_options_who', this.uli_1);
    this.hls_1 = new StringResource('xapi_options_did', this.uli_1);
    this.ils_1 = new StringResource('xapi_options_what', this.uli_1);
    this.jls_1 = new StringResource('xapi_options_when', this.uli_1);
    this.kls_1 = new StringResource('xapi_options_where', this.uli_1);
    this.lls_1 = new StringResource('time_range_all', this.uli_1);
    this.mls_1 = new StringResource('report_filter_edit_field', this.uli_1);
    this.nls_1 = new StringResource('report_filter_edit_condition', this.uli_1);
    this.ols_1 = new StringResource('report_filter_edit_values', this.uli_1);
    this.pls_1 = new StringResource('report', this.uli_1);
    this.qls_1 = new StringResource('create_a_new_report', this.uli_1);
    this.rls_1 = new StringResource('edit_report', this.uli_1);
    this.sls_1 = new StringResource('verb', this.uli_1);
    this.tls_1 = new StringResource('add_a_new_verb', this.uli_1);
    this.uls_1 = new StringResource('id_verbentity_urlid', this.uli_1);
    this.vls_1 = new StringResource('edit_filters', this.uli_1);
    this.wls_1 = new StringResource('field_person_gender', this.uli_1);
    this.xls_1 = new StringResource('field_person_age', this.uli_1);
    this.yls_1 = new StringResource('field_content_completion', this.uli_1);
    this.zls_1 = new StringResource('field_content_entry', this.uli_1);
    this.alt_1 = new StringResource('field_content_progress', this.uli_1);
    this.blt_1 = new StringResource('field_attendance_percentage', this.uli_1);
    this.clt_1 = new StringResource('condition_is', this.uli_1);
    this.dlt_1 = new StringResource('condition_is_not', this.uli_1);
    this.elt_1 = new StringResource('condition_greater_than', this.uli_1);
    this.flt_1 = new StringResource('condition_less_than', this.uli_1);
    this.glt_1 = new StringResource('condition_in_list', this.uli_1);
    this.hlt_1 = new StringResource('condition_not_in_list', this.uli_1);
    this.ilt_1 = new StringResource('condition_between', this.uli_1);
    this.jlt_1 = new StringResource('add_person_filter', this.uli_1);
    this.klt_1 = new StringResource('add_verb_filter', this.uli_1);
    this.llt_1 = new StringResource('add_content_filter', this.uli_1);
    this.mlt_1 = new StringResource('dashboard', this.uli_1);
    this.nlt_1 = new StringResource('activity_import_link', this.uli_1);
    this.olt_1 = new StringResource('xapi_hours', this.uli_1);
    this.plt_1 = new StringResource('xapi_minutes', this.uli_1);
    this.qlt_1 = new StringResource('xapi_seconds', this.uli_1);
    this.rlt_1 = new StringResource('xapi_verb_header', this.uli_1);
    this.slt_1 = new StringResource('xapi_result_header', this.uli_1);
    this.tlt_1 = new StringResource('xapi_score', this.uli_1);
    this.ult_1 = new StringResource('import_title_not_entered', this.uli_1);
    this.vlt_1 = new StringResource('no_account', this.uli_1);
    this.wlt_1 = new StringResource('enter_url', this.uli_1);
    this.xlt_1 = new StringResource('invalid_link', this.uli_1);
    this.ylt_1 = new StringResource('invalid_file', this.uli_1);
    this.zlt_1 = new StringResource('import_link_content_not_supported', this.uli_1);
    this.alu_1 = new StringResource('unsupported_file_type', this.uli_1);
    this.blu_1 = new StringResource('import_link_big_size', this.uli_1);
    this.clu_1 = new StringResource('import_link_error', this.uli_1);
    this.dlu_1 = new StringResource('supported_link', this.uli_1);
    this.elu_1 = new StringResource('offline_sharing_enable_bluetooth_prompt', this.uli_1);
    this.flu_1 = new StringResource('offline_sharing_enable_wifi_promot', this.uli_1);
    this.glu_1 = new StringResource('enable', this.uli_1);
    this.hlu_1 = new StringResource('repo_loading_status_loading_cloud', this.uli_1);
    this.ilu_1 = new StringResource('repo_loading_status_loading_mirror', this.uli_1);
    this.jlu_1 = new StringResource('repo_loading_status_failed_noconnection', this.uli_1);
    this.klu_1 = new StringResource('repo_loading_status_failed_connection_error', this.uli_1);
    this.llu_1 = new StringResource('licence_type_cc_by', this.uli_1);
    this.mlu_1 = new StringResource('licence_type_cc_by_sa', this.uli_1);
    this.nlu_1 = new StringResource('licence_type_cc_by_sa_nc', this.uli_1);
    this.olu_1 = new StringResource('licence_type_cc_by_nc', this.uli_1);
    this.plu_1 = new StringResource('licence_type_cc_by_nc_sa', this.uli_1);
    this.qlu_1 = new StringResource('licence_type_public_domain', this.uli_1);
    this.rlu_1 = new StringResource('licence_type_all_rights', this.uli_1);
    this.slu_1 = new StringResource('license_type_cc_0', this.uli_1);
    this.tlu_1 = new StringResource('syncing', this.uli_1);
    this.ulu_1 = new StringResource('feed', this.uli_1);
    this.vlu_1 = new StringResource('people', this.uli_1);
    this.wlu_1 = new StringResource('record_attendance', this.uli_1);
    this.xlu_1 = new StringResource('today', this.uli_1);
    this.ylu_1 = new StringResource('sort_by', this.uli_1);
    this.zlu_1 = new StringResource('log', this.uli_1);
    this.alv_1 = new StringResource('schedule', this.uli_1);
    this.blv_1 = new StringResource('add_a_schedule', this.uli_1);
    this.clv_1 = new StringResource('edit_schedule', this.uli_1);
    this.dlv_1 = new StringResource('first_key', this.uli_1);
    this.elv_1 = new StringResource('last_key', this.uli_1);
    this.flv_1 = new StringResource('last_week', this.uli_1);
    this.glv_1 = new StringResource('mark_all', this.uli_1);
    this.hlv_1 = new StringResource('mark_all_present', this.uli_1);
    this.ilv_1 = new StringResource('mark_all_absent', this.uli_1);
    this.jlv_1 = new StringResource('present', this.uli_1);
    this.klv_1 = new StringResource('absent', this.uli_1);
    this.llv_1 = new StringResource('attendance_report', this.uli_1);
    this.mlv_1 = new StringResource('father', this.uli_1);
    this.nlv_1 = new StringResource('mother', this.uli_1);
    this.olv_1 = new StringResource('birthday', this.uli_1);
    this.plv_1 = new StringResource('first_names', this.uli_1);
    this.qlv_1 = new StringResource('basic_details', this.uli_1);
    this.rlv_1 = new StringResource('address', this.uli_1);
    this.slv_1 = new StringResource('add_person_to_class', this.uli_1);
    this.tlv_1 = new StringResource('edit', this.uli_1);
    this.ulv_1 = new StringResource('clazz', this.uli_1);
    this.vlv_1 = new StringResource('add_a_new_class', this.uli_1);
    this.wlv_1 = new StringResource('edit_clazz', this.uli_1);
    this.xlv_1 = new StringResource('add_a_class', this.uli_1);
    this.ylv_1 = new StringResource('join_existing_class', this.uli_1);
    this.zlv_1 = new StringResource('student_image', this.uli_1);
    this.alw_1 = new StringResource('question_key', this.uli_1);
    this.blw_1 = new StringResource('add_question', this.uli_1);
    this.clw_1 = new StringResource('edit_question', this.uli_1);
    this.dlw_1 = new StringResource('questions', this.uli_1);
    this.elw_1 = new StringResource('add_person', this.uli_1);
    this.flw_1 = new StringResource('add_class', this.uli_1);
    this.glw_1 = new StringResource('class_name', this.uli_1);
    this.hlw_1 = new StringResource('class_description', this.uli_1);
    this.ilw_1 = new StringResource('to_key', this.uli_1);
    this.jlw_1 = new StringResource('holiday', this.uli_1);
    this.klw_1 = new StringResource('add_a_holiday', this.uli_1);
    this.llw_1 = new StringResource('edit_holiday', this.uli_1);
    this.mlw_1 = new StringResource('holidays', this.uli_1);
    this.nlw_1 = new StringResource('holiday_calendar', this.uli_1);
    this.olw_1 = new StringResource('add_a_new_holiday_calendar', this.uli_1);
    this.plw_1 = new StringResource('edit_holiday_calendar', this.uli_1);
    this.qlw_1 = new StringResource('features_enabled', this.uli_1);
    this.rlw_1 = new StringResource('weekly', this.uli_1);
    this.slw_1 = new StringResource('once', this.uli_1);
    this.tlw_1 = new StringResource('daily', this.uli_1);
    this.ulw_1 = new StringResource('monthly', this.uli_1);
    this.vlw_1 = new StringResource('yearly', this.uli_1);
    this.wlw_1 = new StringResource('sunday', this.uli_1);
    this.xlw_1 = new StringResource('monday', this.uli_1);
    this.ylw_1 = new StringResource('tuesday', this.uli_1);
    this.zlw_1 = new StringResource('wednesday', this.uli_1);
    this.alx_1 = new StringResource('thursday', this.uli_1);
    this.blx_1 = new StringResource('friday', this.uli_1);
    this.clx_1 = new StringResource('saturday', this.uli_1);
    this.dlx_1 = new StringResource('day', this.uli_1);
    this.elx_1 = new StringResource('toC', this.uli_1);
    this.flx_1 = new StringResource('last_month', this.uli_1);
    this.glx_1 = new StringResource('activity_change', this.uli_1);
    this.hlx_1 = new StringResource('change_implemented_if_any', this.uli_1);
    this.ilx_1 = new StringResource('duration', this.uli_1);
    this.jlx_1 = new StringResource('how_did_it_go', this.uli_1);
    this.klx_1 = new StringResource('notes', this.uli_1);
    this.llx_1 = new StringResource('activity', this.uli_1);
    this.mlx_1 = new StringResource('sort_by_name', this.uli_1);
    this.nlx_1 = new StringResource('sort_by_name_asc', this.uli_1);
    this.olx_1 = new StringResource('sort_by_name_desc', this.uli_1);
    this.plx_1 = new StringResource('date_enroll', this.uli_1);
    this.qlx_1 = new StringResource('date_left', this.uli_1);
    this.rlx_1 = new StringResource('enroled', this.uli_1);
    this.slx_1 = new StringResource('class_enrolment', this.uli_1);
    this.tlx_1 = new StringResource('graduated', this.uli_1);
    this.ulx_1 = new StringResource('dropped_out', this.uli_1);
    this.vlx_1 = new StringResource('moved', this.uli_1);
    this.wlx_1 = new StringResource('new_leaving_reason', this.uli_1);
    this.xlx_1 = new StringResource('edit_leaving_reason', this.uli_1);
    this.ylx_1 = new StringResource('edit_enrolment', this.uli_1);
    this.zlx_1 = new StringResource('new_enrolment', this.uli_1);
    this.aly_1 = new StringResource('select_leaving_reason', this.uli_1);
    this.bly_1 = new StringResource('add_leaving_reason', this.uli_1);
    this.cly_1 = new StringResource('leaving_reason', this.uli_1);
    this.dly_1 = new StringResource('leaving_reasons', this.uli_1);
    this.ely_1 = new StringResource('leaving_reason_manage', this.uli_1);
    this.fly_1 = new StringResource('view_profile', this.uli_1);
    this.gly_1 = new StringResource('class_enrolment_outcome', this.uli_1);
    this.hly_1 = new StringResource('class_enrolment_leaving', this.uli_1);
    this.ily_1 = new StringResource('in_progress', this.uli_1);
    this.jly_1 = new StringResource('outcome', this.uli_1);
    this.kly_1 = new StringResource('person_enrolment_in_class', this.uli_1);
    this.lly_1 = new StringResource('enrolment', this.uli_1);
    this.mly_1 = new StringResource('error_start_date_before_clazz_date', this.uli_1);
    this.nly_1 = new StringResource('error_start_date_before_previous_enrolment_date', this.uli_1);
    this.oly_1 = new StringResource('time_present', this.uli_1);
    this.ply_1 = new StringResource('ascending', this.uli_1);
    this.qly_1 = new StringResource('descending', this.uli_1);
    this.rly_1 = new StringResource('sort_by_text', this.uli_1);
    this.sly_1 = new StringResource('attendance_high_to_low', this.uli_1);
    this.tly_1 = new StringResource('attendance_low_to_high', this.uli_1);
    this.uly_1 = new StringResource('teacher', this.uli_1);
    this.vly_1 = new StringResource('add_a_teacher', this.uli_1);
    this.wly_1 = new StringResource('partial', this.uli_1);
    this.xly_1 = new StringResource('teachers_literal', this.uli_1);
    this.yly_1 = new StringResource('participant', this.uli_1);
    this.zly_1 = new StringResource('primary_user', this.uli_1);
    this.alz_1 = new StringResource('up_key', this.uli_1);
    this.blz_1 = new StringResource('down_key', this.uli_1);
    this.clz_1 = new StringResource('activity_went_good', this.uli_1);
    this.dlz_1 = new StringResource('activity_went_bad', this.uli_1);
    this.elz_1 = new StringResource('activity_enter_any_notes', this.uli_1);
    this.flz_1 = new StringResource('uom_frequency_title', this.uli_1);
    this.glz_1 = new StringResource('uom_duration_title', this.uli_1);
    this.hlz_1 = new StringResource('uom_boolean_title', this.uli_1);
    this.ilz_1 = new StringResource('uom_default_title', this.uli_1);
    this.jlz_1 = new StringResource('add_activity', this.uli_1);
    this.klz_1 = new StringResource('add_activity_literal', this.uli_1);
    this.llz_1 = new StringResource('select_one', this.uli_1);
    this.mlz_1 = new StringResource('measurement_type', this.uli_1);
    this.nlz_1 = new StringResource('frequency', this.uli_1);
    this.olz_1 = new StringResource('yes_no', this.uli_1);
    this.plz_1 = new StringResource('time_period', this.uli_1);
    this.qlz_1 = new StringResource('location', this.uli_1);
    this.rlz_1 = new StringResource('last_three_months', this.uli_1);
    this.slz_1 = new StringResource('export', this.uli_1);
    this.tlz_1 = new StringResource('date', this.uli_1);
    this.ulz_1 = new StringResource('average', this.uli_1);
    this.vlz_1 = new StringResource('age', this.uli_1);
    this.wlz_1 = new StringResource('days', this.uli_1);
    this.xlz_1 = new StringResource('apply', this.uli_1);
    this.ylz_1 = new StringResource('file_selected', this.uli_1);
    this.zlz_1 = new StringResource('all', this.uli_1);
    this.am0_1 = new StringResource('holiday_calendars', this.uli_1);
    this.bm0_1 = new StringResource('holiday_calendars_desc', this.uli_1);
    this.cm0_1 = new StringResource('sel_question_set', this.uli_1);
    this.dm0_1 = new StringResource('sel_question_set_desc', this.uli_1);
    this.em0_1 = new StringResource('users', this.uli_1);
    this.fm0_1 = new StringResource('nomination', this.uli_1);
    this.gm0_1 = new StringResource('active', this.uli_1);
    this.hm0_1 = new StringResource('class_id', this.uli_1);
    this.im0_1 = new StringResource('gender_literal', this.uli_1);
    this.jm0_1 = new StringResource('country', this.uli_1);
    this.km0_1 = new StringResource('connectivity', this.uli_1);
    this.lm0_1 = new StringResource('home_internet_access', this.uli_1);
    this.mm0_1 = new StringResource('mobile_internet_access', this.uli_1);
    this.nm0_1 = new StringResource('connectivity_limited', this.uli_1);
    this.om0_1 = new StringResource('connectivity_full', this.uli_1);
    this.pm0_1 = new StringResource('prefer_not_to_say', this.uli_1);
    this.qm0_1 = new StringResource('sel_question_set_to_use', this.uli_1);
    this.rm0_1 = new StringResource('search', this.uli_1);
    this.sm0_1 = new StringResource('attendance_percentage', this.uli_1);
    this.tm0_1 = new StringResource('filter', this.uli_1);
    this.um0_1 = new StringResource('over_key', this.uli_1);
    this.vm0_1 = new StringResource('sync', this.uli_1);
    this.wm0_1 = new StringResource('not_recorded', this.uli_1);
    this.xm0_1 = new StringResource('groups', this.uli_1);
    this.ym0_1 = new StringResource('group_setting_desc', this.uli_1);
    this.zm0_1 = new StringResource('roles', this.uli_1);
    this.am1_1 = new StringResource('role', this.uli_1);
    this.bm1_1 = new StringResource('add_a_new_role', this.uli_1);
    this.cm1_1 = new StringResource('edit_role', this.uli_1);
    this.dm1_1 = new StringResource('rols_assignment', this.uli_1);
    this.em1_1 = new StringResource('role_assignment_setting_desc', this.uli_1);
    this.fm1_1 = new StringResource('locations', this.uli_1);
    this.gm1_1 = new StringResource('locations_setting_desc', this.uli_1);
    this.hm1_1 = new StringResource('audit_log', this.uli_1);
    this.im1_1 = new StringResource('audit_log_setting_desc', this.uli_1);
    this.jm1_1 = new StringResource('entry_key', this.uli_1);
    this.km1_1 = new StringResource('permission_key', this.uli_1);
    this.lm1_1 = new StringResource('permissions', this.uli_1);
    this.mm1_1 = new StringResource('role_name', this.uli_1);
    this.nm1_1 = new StringResource('members_key', this.uli_1);
    this.om1_1 = new StringResource('member_key', this.uli_1);
    this.pm1_1 = new StringResource('role_assignment', this.uli_1);
    this.qm1_1 = new StringResource('scope_by', this.uli_1);
    this.rm1_1 = new StringResource('assign_to', this.uli_1);
    this.sm1_1 = new StringResource('person', this.uli_1);
    this.tm1_1 = new StringResource('add_a_new_person', this.uli_1);
    this.um1_1 = new StringResource('edit_person', this.uli_1);
    this.vm1_1 = new StringResource('permission_person_select', this.uli_1);
    this.wm1_1 = new StringResource('permission_person_insert', this.uli_1);
    this.xm1_1 = new StringResource('permission_person_update', this.uli_1);
    this.ym1_1 = new StringResource('permission_person_picture_select', this.uli_1);
    this.zm1_1 = new StringResource('permission_person_picture_insert', this.uli_1);
    this.am2_1 = new StringResource('permission_person_picture_update', this.uli_1);
    this.bm2_1 = new StringResource('permission_clazz_select', this.uli_1);
    this.cm2_1 = new StringResource('permission_clazz_insert', this.uli_1);
    this.dm2_1 = new StringResource('permission_clazz_update', this.uli_1);
    this.em2_1 = new StringResource('permission_clazz_add_teacher', this.uli_1);
    this.fm2_1 = new StringResource('permission_clazz_add_student', this.uli_1);
    this.gm2_1 = new StringResource('permission_attendance_select', this.uli_1);
    this.hm2_1 = new StringResource('permission_attendance_insert', this.uli_1);
    this.im2_1 = new StringResource('permission_attendance_update', this.uli_1);
    this.jm2_1 = new StringResource('permission_activity_select', this.uli_1);
    this.km2_1 = new StringResource('permission_activity_insert', this.uli_1);
    this.lm2_1 = new StringResource('permission_activity_update', this.uli_1);
    this.mm2_1 = new StringResource('permission_sel_question_select', this.uli_1);
    this.nm2_1 = new StringResource('permission_sel_question_insert', this.uli_1);
    this.om2_1 = new StringResource('permission_sel_question_update', this.uli_1);
    this.pm2_1 = new StringResource('permission_sel_select', this.uli_1);
    this.qm2_1 = new StringResource('permission_sel_update', this.uli_1);
    this.rm2_1 = new StringResource('custom_fields', this.uli_1);
    this.sm2_1 = new StringResource('custom_field', this.uli_1);
    this.tm2_1 = new StringResource('custom_fields_desc', this.uli_1);
    this.um2_1 = new StringResource('field_type', this.uli_1);
    this.vm2_1 = new StringResource('text', this.uli_1);
    this.wm2_1 = new StringResource('dropdown', this.uli_1);
    this.xm2_1 = new StringResource('options', this.uli_1);
    this.ym2_1 = new StringResource('option_value', this.uli_1);
    this.zm2_1 = new StringResource('errors', this.uli_1);
    this.am3_1 = new StringResource('shake_feedback', this.uli_1);
    this.bm3_1 = new StringResource('feedback_hint', this.uli_1);
    this.cm3_1 = new StringResource('send_feedback', this.uli_1);
    this.dm3_1 = new StringResource('feedback_thanks', this.uli_1);
    this.em3_1 = new StringResource('start_date', this.uli_1);
    this.fm3_1 = new StringResource('end_date', this.uli_1);
    this.gm3_1 = new StringResource('last_active', this.uli_1);
    this.hm3_1 = new StringResource('save', this.uli_1);
    this.im3_1 = new StringResource('change_password', this.uli_1);
    this.jm3_1 = new StringResource('current_password', this.uli_1);
    this.km3_1 = new StringResource('password_unchanged', this.uli_1);
    this.lm3_1 = new StringResource('timezone', this.uli_1);
    this.mm3_1 = new StringResource('users_settings_desc', this.uli_1);
    this.nm3_1 = new StringResource('add', this.uli_1);
    this.om3_1 = new StringResource('refresh', this.uli_1);
    this.pm3_1 = new StringResource('school', this.uli_1);
    this.qm3_1 = new StringResource('add_a_new_school', this.uli_1);
    this.rm3_1 = new StringResource('edit_school', this.uli_1);
    this.sm3_1 = new StringResource('join_existing_school', this.uli_1);
    this.tm3_1 = new StringResource('schools', this.uli_1);
    this.um3_1 = new StringResource('assignments', this.uli_1);
    this.vm3_1 = new StringResource('assignment', this.uli_1);
    this.wm3_1 = new StringResource('none_key', this.uli_1);
    this.xm3_1 = new StringResource('instructions_for_students', this.uli_1);
    this.ym3_1 = new StringResource('not_started', this.uli_1);
    this.zm3_1 = new StringResource('percentage_complete', this.uli_1);
    this.am4_1 = new StringResource('percentage_score', this.uli_1);
    this.bm4_1 = new StringResource('started_date', this.uli_1);
    this.cm4_1 = new StringResource('started', this.uli_1);
    this.dm4_1 = new StringResource('mixed', this.uli_1);
    this.em4_1 = new StringResource('store_title', this.uli_1);
    this.fm4_1 = new StringResource('store_description_short', this.uli_1);
    this.gm4_1 = new StringResource('store_description_full', this.uli_1);
    this.hm4_1 = new StringResource('due_date', this.uli_1);
    this.im4_1 = new StringResource('content', this.uli_1);
    this.jm4_1 = new StringResource('add_new_content', this.uli_1);
    this.km4_1 = new StringResource('add_content', this.uli_1);
    this.lm4_1 = new StringResource('student_progress', this.uli_1);
    this.mm4_1 = new StringResource('status', this.uli_1);
    this.nm4_1 = new StringResource('use_device_language', this.uli_1);
    this.om4_1 = new StringResource('select_item', this.uli_1);
    this.pm4_1 = new StringResource('from_to_date', this.uli_1);
    this.qm4_1 = new StringResource('num_items_with_name', this.uli_1);
    this.rm4_1 = new StringResource('num_items_with_name_with_comma', this.uli_1);
    this.sm4_1 = new StringResource('add_to', this.uli_1);
    this.tm4_1 = new StringResource('remove_from', this.uli_1);
    this.um4_1 = new StringResource('change_photo', this.uli_1);
    this.vm4_1 = new StringResource('remove_picture', this.uli_1);
    this.wm4_1 = new StringResource('take_new_photo_from_camera', this.uli_1);
    this.xm4_1 = new StringResource('select_picture_from_gallery', this.uli_1);
    this.ym4_1 = new StringResource('select_file', this.uli_1);
    this.zm4_1 = new StringResource('permission_clazz_assignment_view', this.uli_1);
    this.am5_1 = new StringResource('permission_clazz_asignment_edit', this.uli_1);
    this.bm5_1 = new StringResource('overview', this.uli_1);
    this.cm5_1 = new StringResource('add_new', this.uli_1);
    this.dm5_1 = new StringResource('staff', this.uli_1);
    this.em5_1 = new StringResource('x_teachers_y_students', this.uli_1);
    this.fm5_1 = new StringResource('call', this.uli_1);
    this.gm5_1 = new StringResource('organization_id', this.uli_1);
    this.hm5_1 = new StringResource('student', this.uli_1);
    this.im5_1 = new StringResource('contact_details', this.uli_1);
    this.jm5_1 = new StringResource('untitled', this.uli_1);
    this.km5_1 = new StringResource('present_late_absent', this.uli_1);
    this.lm5_1 = new StringResource('marked_cap', this.uli_1);
    this.mm5_1 = new StringResource('submitted_cap', this.uli_1);
    this.nm5_1 = new StringResource('not_submitted_cap', this.uli_1);
    this.om5_1 = new StringResource('submitliteral', this.uli_1);
    this.pm5_1 = new StringResource('x_percent_attended', this.uli_1);
    this.qm5_1 = new StringResource('answer', this.uli_1);
    this.rm5_1 = new StringResource('of_content', this.uli_1);
    this.sm5_1 = new StringResource('nothing_here', this.uli_1);
    this.tm5_1 = new StringResource('not_answered', this.uli_1);
    this.um5_1 = new StringResource('clazz_work', this.uli_1);
    this.vm5_1 = new StringResource('add_a_new_clazzwork', this.uli_1);
    this.wm5_1 = new StringResource('edit_clazzwork', this.uli_1);
    this.xm5_1 = new StringResource('clazz_assignment', this.uli_1);
    this.ym5_1 = new StringResource('new_assignment', this.uli_1);
    this.zm5_1 = new StringResource('edit_assignment', this.uli_1);
    this.am6_1 = new StringResource('total_score', this.uli_1);
    this.bm6_1 = new StringResource('late_submission', this.uli_1);
    this.cm6_1 = new StringResource('mark_penalty', this.uli_1);
    this.dm6_1 = new StringResource('late_submission_penalty', this.uli_1);
    this.em6_1 = new StringResource('end_of_grace_period', this.uli_1);
    this.fm6_1 = new StringResource('allow_class_comments', this.uli_1);
    this.gm6_1 = new StringResource('after_deadline_date_error', this.uli_1);
    this.hm6_1 = new StringResource('points', this.uli_1);
    this.im6_1 = new StringResource('minimum_score', this.uli_1);
    this.jm6_1 = new StringResource('automatic', this.uli_1);
    this.km6_1 = new StringResource('student_marks_content', this.uli_1);
    this.lm6_1 = new StringResource('completion_criteria', this.uli_1);
    this.mm6_1 = new StringResource('mark_complete', this.uli_1);
    this.nm6_1 = new StringResource('late_penalty', this.uli_1);
    this.om6_1 = new StringResource('marked_key', this.uli_1);
    this.pm6_1 = new StringResource('submitted_key', this.uli_1);
    this.qm6_1 = new StringResource('not_submitted', this.uli_1);
    this.rm6_1 = new StringResource('visible_from_date', this.uli_1);
    this.sm6_1 = new StringResource('submission_type', this.uli_1);
    this.tm6_1 = new StringResource('no_submission_required', this.uli_1);
    this.um6_1 = new StringResource('short_text', this.uli_1);
    this.vm6_1 = new StringResource('attachment', this.uli_1);
    this.wm6_1 = new StringResource('quiz', this.uli_1);
    this.xm6_1 = new StringResource('allow_private_comments_from_students', this.uli_1);
    this.ym6_1 = new StringResource('deadline', this.uli_1);
    this.zm6_1 = new StringResource('class_timezone', this.uli_1);
    this.am7_1 = new StringResource('maximum_score', this.uli_1);
    this.bm7_1 = new StringResource('quiz_questions', this.uli_1);
    this.cm7_1 = new StringResource('time', this.uli_1);
    this.dm7_1 = new StringResource('submission', this.uli_1);
    this.em7_1 = new StringResource('public_comments', this.uli_1);
    this.fm7_1 = new StringResource('private_comments', this.uli_1);
    this.gm7_1 = new StringResource('submit_your_answer', this.uli_1);
    this.hm7_1 = new StringResource('add_class_comment', this.uli_1);
    this.im7_1 = new StringResource('add_private_comment', this.uli_1);
    this.jm7_1 = new StringResource('class_comments', this.uli_1);
    this.km7_1 = new StringResource('submit', this.uli_1);
    this.lm7_1 = new StringResource('three_num_items_with_name_with_comma', this.uli_1);
    this.mm7_1 = new StringResource('marking', this.uli_1);
    this.nm7_1 = new StringResource('return_and_mark_next', this.uli_1);
    this.om7_1 = new StringResource('return_only', this.uli_1);
    this.pm7_1 = new StringResource('workspace', this.uli_1);
    this.qm7_1 = new StringResource('organisation', this.uli_1);
    this.rm7_1 = new StringResource('use_public_library_site', this.uli_1);
    this.sm7_1 = new StringResource('create_site', this.uli_1);
    this.tm7_1 = new StringResource('connect_as_guest', this.uli_1);
    this.um7_1 = new StringResource('create_account', this.uli_1);
    this.vm7_1 = new StringResource('my', this.uli_1);
    this.wm7_1 = new StringResource('add_another', this.uli_1);
    this.xm7_1 = new StringResource('logged_in_as', this.uli_1);
    this.ym7_1 = new StringResource('person_exists', this.uli_1);
    this.zm7_1 = new StringResource('username_too_short', this.uli_1);
    this.am8_1 = new StringResource('username_too_long', this.uli_1);
    this.bm8_1 = new StringResource('username_starts_with_number', this.uli_1);
    this.cm8_1 = new StringResource('invalid_username', this.uli_1);
    this.dm8_1 = new StringResource('incorrect_current_password', this.uli_1);
    this.em8_1 = new StringResource('sel_question_type_free_text', this.uli_1);
    this.fm8_1 = new StringResource('sel_question_type_multiple_choice', this.uli_1);
    this.gm8_1 = new StringResource('question_text', this.uli_1);
    this.hm8_1 = new StringResource('question_type', this.uli_1);
    this.im8_1 = new StringResource('add_option', this.uli_1);
    this.jm8_1 = new StringResource('roles_and_permissions', this.uli_1);
    this.km8_1 = new StringResource('add_role_permission', this.uli_1);
    this.lm8_1 = new StringResource('scope', this.uli_1);
    this.mm8_1 = new StringResource('scope_description', this.uli_1);
    this.nm8_1 = new StringResource('role_description', this.uli_1);
    this.om8_1 = new StringResource('assign_role', this.uli_1);
    this.pm8_1 = new StringResource('more_information', this.uli_1);
    this.qm8_1 = new StringResource('pending_requests', this.uli_1);
    this.rm8_1 = new StringResource('pending', this.uli_1);
    this.sm8_1 = new StringResource('please_wait_for_approval', this.uli_1);
    this.tm8_1 = new StringResource('reject', this.uli_1);
    this.um8_1 = new StringResource('ask_your_teacher_for_code', this.uli_1);
    this.vm8_1 = new StringResource('copied_to_clipboard', this.uli_1);
    this.wm8_1 = new StringResource('invite_link_desc', this.uli_1);
    this.xm8_1 = new StringResource('copy_link', this.uli_1);
    this.ym8_1 = new StringResource('copy_code', this.uli_1);
    this.zm8_1 = new StringResource('share_link', this.uli_1);
    this.am9_1 = new StringResource('invite_with_link', this.uli_1);
    this.bm9_1 = new StringResource('role_not_selected_error', this.uli_1);
    this.cm9_1 = new StringResource('permission_person_delegate', this.uli_1);
    this.dm9_1 = new StringResource('this_field_is_mandatory', this.uli_1);
    this.em9_1 = new StringResource('permission_role_select', this.uli_1);
    this.fm9_1 = new StringResource('permission_role_insert', this.uli_1);
    this.gm9_1 = new StringResource('permission_school_select', this.uli_1);
    this.hm9_1 = new StringResource('permission_school_insert', this.uli_1);
    this.im9_1 = new StringResource('permission_school_update', this.uli_1);
    this.jm9_1 = new StringResource('add_student_to_school', this.uli_1);
    this.km9_1 = new StringResource('add_staff_to_school', this.uli_1);
    this.lm9_1 = new StringResource('permission_password_reset', this.uli_1);
    this.mm9_1 = new StringResource('school_code', this.uli_1);
    this.nm9_1 = new StringResource('invite_code', this.uli_1);
    this.om9_1 = new StringResource('entity_code', this.uli_1);
    this.pm9_1 = new StringResource('join_code_instructions', this.uli_1);
    this.qm9_1 = new StringResource('record_for_student', this.uli_1);
    this.rm9_1 = new StringResource('moved_x_entries', this.uli_1);
    this.sm9_1 = new StringResource('end_is_before_start_error', this.uli_1);
    this.tm9_1 = new StringResource('record_attendance_for_most_recent_occurrence', this.uli_1);
    this.um9_1 = new StringResource('add_a_new_occurrence', this.uli_1);
    this.vm9_1 = new StringResource('active_classes', this.uli_1);
    this.wm9_1 = new StringResource('terms_and_policies', this.uli_1);
    this.xm9_1 = new StringResource('manage_site_settings', this.uli_1);
    this.ym9_1 = new StringResource('guest_login_enabled', this.uli_1);
    this.zm9_1 = new StringResource('registration_allowed', this.uli_1);
    this.ama_1 = new StringResource('yes', this.uli_1);
    this.bma_1 = new StringResource('no', this.uli_1);
    this.cma_1 = new StringResource('edit_site', this.uli_1);
    this.dma_1 = new StringResource('site', this.uli_1);
    this.ema_1 = new StringResource('site_link', this.uli_1);
    this.fma_1 = new StringResource('appearance', this.uli_1);
    this.gma_1 = new StringResource('manage_brand', this.uli_1);
    this.hma_1 = new StringResource('please_enter_the_linK', this.uli_1);
    this.ima_1 = new StringResource('or', this.uli_1);
    this.jma_1 = new StringResource('connect', this.uli_1);
    this.kma_1 = new StringResource('terms_and_policies_text', this.uli_1);
    this.lma_1 = new StringResource('edit_terms_and_policies', this.uli_1);
    this.mma_1 = new StringResource('strings_not_allowed', this.uli_1);
    this.nma_1 = new StringResource('undo', this.uli_1);
    this.oma_1 = new StringResource('video', this.uli_1);
    this.pma_1 = new StringResource('content_editor_create_new_category', this.uli_1);
    this.qma_1 = new StringResource('content_pieces_completed', this.uli_1);
    this.rma_1 = new StringResource('content_usage_duration', this.uli_1);
    this.sma_1 = new StringResource('manage_download', this.uli_1);
    this.tma_1 = new StringResource('powered_by', this.uli_1);
    this.uma_1 = new StringResource('invalid_email', this.uli_1);
    this.vma_1 = new StringResource('select_account', this.uli_1);
    this.wma_1 = new StringResource('opening_link', this.uli_1);
    this.xma_1 = new StringResource('select_account_to_continue', this.uli_1);
    this.yma_1 = new StringResource('you_are_already_in_class', this.uli_1);
    this.zma_1 = new StringResource('you_are_already_in_school', this.uli_1);
    this.amb_1 = new StringResource('join_class', this.uli_1);
    this.bmb_1 = new StringResource('join_school', this.uli_1);
    this.cmb_1 = new StringResource('what_is_your_date_of_birth', this.uli_1);
    this.dmb_1 = new StringResource('parents_email_address', this.uli_1);
    this.emb_1 = new StringResource('we_sent_a_message_to_your_parent', this.uli_1);
    this.fmb_1 = new StringResource('toggle_visibility', this.uli_1);
    this.gmb_1 = new StringResource('parental_consent', this.uli_1);
    this.hmb_1 = new StringResource('parent_child_register_message_subject', this.uli_1);
    this.imb_1 = new StringResource('parent_child_register_message', this.uli_1);
    this.jmb_1 = new StringResource('parent_consent_explanation', this.uli_1);
    this.kmb_1 = new StringResource('relationship', this.uli_1);
    this.lmb_1 = new StringResource('i_consent', this.uli_1);
    this.mmb_1 = new StringResource('i_do_not_consent', this.uli_1);
    this.nmb_1 = new StringResource('revoke_consent', this.uli_1);
    this.omb_1 = new StringResource('restore_consent', this.uli_1);
    this.pmb_1 = new StringResource('status_consent_granted', this.uli_1);
    this.qmb_1 = new StringResource('status_consent_denied', this.uli_1);
    this.rmb_1 = new StringResource('other_legal_guardian', this.uli_1);
    this.smb_1 = new StringResource('manage_parental_consent', this.uli_1);
    this.tmb_1 = new StringResource('view_class_content', this.uli_1);
    this.umb_1 = new StringResource('edit_class_content', this.uli_1);
    this.vmb_1 = new StringResource('view_class_learning_records', this.uli_1);
    this.wmb_1 = new StringResource('view_contact_details_of_members', this.uli_1);
    this.xmb_1 = new StringResource('edit_contact_details_of_members', this.uli_1);
    this.ymb_1 = new StringResource('view_socioeconomic_details_of_members', this.uli_1);
    this.zmb_1 = new StringResource('edit_socioeconomic_details_of_members', this.uli_1);
    this.amc_1 = new StringResource('add_person_or_group', this.uli_1);
    this.bmc_1 = new StringResource('lets_get_started', this.uli_1);
    this.cmc_1 = new StringResource('looks_like_installed_app_from_link', this.uli_1);
    this.dmc_1 = new StringResource('continue_using_link_recommended', this.uli_1);
    this.emc_1 = new StringResource('continue_using_the_link', this.uli_1);
    this.fmc_1 = new StringResource('start_from_scratch', this.uli_1);
    this.gmc_1 = new StringResource('ignore_the_link', this.uli_1);
    this.hmc_1 = new StringResource('add_permission_for_a_person', this.uli_1);
    this.imc_1 = new StringResource('add_permission_for_a_group', this.uli_1);
    this.jmc_1 = new StringResource('add_using_link', this.uli_1);
    this.kmc_1 = new StringResource('add_using_a_web_link_then', this.uli_1);
    this.lmc_1 = new StringResource('add_from_gallery', this.uli_1);
    this.mmc_1 = new StringResource('add_video_or_audio_from_the_device_gallery', this.uli_1);
    this.nmc_1 = new StringResource('add_file', this.uli_1);
    this.omc_1 = new StringResource('add_folder', this.uli_1);
    this.pmc_1 = new StringResource('importing', this.uli_1);
    this.qmc_1 = new StringResource('downloading_content', this.uli_1);
    this.rmc_1 = new StringResource('deleting_content', this.uli_1);
    this.smc_1 = new StringResource('add_folder_description', this.uli_1);
    this.tmc_1 = new StringResource('add_educational_content_using_supported_formats_eg_pdf_xapi_h5p', this.uli_1);
    this.umc_1 = new StringResource('current_status_consent_granted', this.uli_1);
    this.vmc_1 = new StringResource('select_country', this.uli_1);
    this.wmc_1 = new StringResource('enter_link', this.uli_1);
    this.xmc_1 = new StringResource('add_subject', this.uli_1);
    this.ymc_1 = new StringResource('share_via', this.uli_1);
    this.zmc_1 = new StringResource('share_apk_file', this.uli_1);
    this.amd_1 = new StringResource('recommended_for_advanced_users', this.uli_1);
    this.bmd_1 = new StringResource('nearby_share', this.uli_1);
    this.cmd_1 = new StringResource('recommended_for_offline_installation', this.uli_1);
    this.dmd_1 = new StringResource('app_store_link', this.uli_1);
    this.emd_1 = new StringResource('everything_works_offline', this.uli_1);
    this.fmd_1 = new StringResource('swipe_to_next', this.uli_1);
    this.gmd_1 = new StringResource('content_entries_completed', this.uli_1);
    this.hmd_1 = new StringResource('content_usage_time', this.uli_1);
    this.imd_1 = new StringResource('all_permissions', this.uli_1);
    this.jmd_1 = new StringResource('folder', this.uli_1);
    this.kmd_1 = new StringResource('create_a_new_learning_env', this.uli_1);
    this.lmd_1 = new StringResource('add_educational_content_to_new_learning_env', this.uli_1);
    this.mmd_1 = new StringResource('connect_to_an_existing_learning_environment', this.uli_1);
    this.nmd_1 = new StringResource('does_your_class_already_have_learning_env', this.uli_1);
    this.omd_1 = new StringResource('use_the_public_lib_env', this.uli_1);
    this.pmd_1 = new StringResource('just_want_to_browse', this.uli_1);
    this.qmd_1 = new StringResource('revoking_consent_will', this.uli_1);
    this.rmd_1 = new StringResource('you_must_comply_with_license', this.uli_1);
    this.smd_1 = new StringResource('you_can_copypaste_a_link', this.uli_1);
    this.tmd_1 = new StringResource('see_supported_sites', this.uli_1);
    this.umd_1 = new StringResource('class_setup', this.uli_1);
    this.vmd_1 = new StringResource('anyone_with_this_can_join_school', this.uli_1);
    this.wmd_1 = new StringResource('this_class', this.uli_1);
    this.xmd_1 = new StringResource('from_my_classes', this.uli_1);
    this.ymd_1 = new StringResource('my_content', this.uli_1);
    this.zmd_1 = new StringResource('learning_environment', this.uli_1);
    this.ame_1 = new StringResource('grades_class_age', this.uli_1);
    this.bme_1 = new StringResource('add_remove_and_modify_grades', this.uli_1);
    this.cme_1 = new StringResource('subjects', this.uli_1);
    this.dme_1 = new StringResource('add_remove_and_modify_subjects', this.uli_1);
    this.eme_1 = new StringResource('create_my_account', this.uli_1);
    this.fme_1 = new StringResource('recommend_it', this.uli_1);
    this.gme_1 = new StringResource('edit_permissions', this.uli_1);
    this.hme_1 = new StringResource('add_from_contacts', this.uli_1);
    this.ime_1 = new StringResource('almost_done', this.uli_1);
    this.jme_1 = new StringResource('your_username', this.uli_1);
    this.kme_1 = new StringResource('select_content', this.uli_1);
    this.lme_1 = new StringResource('search_in', this.uli_1);
    this.mme_1 = new StringResource('type', this.uli_1);
    this.nme_1 = new StringResource('please_download_the_app', this.uli_1);
    this.ome_1 = new StringResource('alternatively_you_can_download_the_apk', this.uli_1);
    this.pme_1 = new StringResource('full_i_can_download_as_much_as_i_like', this.uli_1);
    this.qme_1 = new StringResource('limited_i_avoid_downloading_too_much', this.uli_1);
    this.rme_1 = new StringResource('oops', this.uli_1);
    this.sme_1 = new StringResource('sorry_something_went_wrong', this.uli_1);
    this.tme_1 = new StringResource('incident_id', this.uli_1);
    this.ume_1 = new StringResource('error_code', this.uli_1);
    this.vme_1 = new StringResource('take_me_home', this.uli_1);
    this.wme_1 = new StringResource('view_clazz', this.uli_1);
    this.xme_1 = new StringResource('view_clazzes', this.uli_1);
    this.yme_1 = new StringResource('enrol_and_unenrol_students', this.uli_1);
    this.zme_1 = new StringResource('enrol_and_unenrol_teachers', this.uli_1);
    this.amf_1 = new StringResource('view_assignments', this.uli_1);
    this.bmf_1 = new StringResource('add_or_edit_assignment', this.uli_1);
    this.cmf_1 = new StringResource('view_basic_profile_of_members', this.uli_1);
    this.dmf_1 = new StringResource('edit_basic_profile_of_members', this.uli_1);
    this.emf_1 = new StringResource('view_school', this.uli_1);
    this.fmf_1 = new StringResource('edit_clazzes', this.uli_1);
    this.gmf_1 = new StringResource('add_new_clazz_to_school', this.uli_1);
    this.hmf_1 = new StringResource('added_to_class_content', this.uli_1);
    this.imf_1 = new StringResource('content_already_added_to_class', this.uli_1);
    this.jmf_1 = new StringResource('your_account_needs_approved', this.uli_1);
    this.kmf_1 = new StringResource('adult_account_required', this.uli_1);
    this.lmf_1 = new StringResource('blank_report', this.uli_1);
    this.mmf_1 = new StringResource('attendance_over_time_by_class', this.uli_1);
    this.nmf_1 = new StringResource('percentage_of_students_attending_over_time', this.uli_1);
    this.omf_1 = new StringResource('content_completion', this.uli_1);
    this.pmf_1 = new StringResource('number_of_students_completed_time', this.uli_1);
    this.qmf_1 = new StringResource('content_usage_by_class', this.uli_1);
    this.rmf_1 = new StringResource('total_content_usage_duration_class', this.uli_1);
    this.smf_1 = new StringResource('content_usage_over_time', this.uli_1);
    this.tmf_1 = new StringResource('total_content_duration_gender', this.uli_1);
    this.umf_1 = new StringResource('unique_content_users_over_time', this.uli_1);
    this.vmf_1 = new StringResource('number_of_active_users_over_time', this.uli_1);
    this.wmf_1 = new StringResource('parent', this.uli_1);
    this.xmf_1 = new StringResource('upload', this.uli_1);
    this.ymf_1 = new StringResource('selected_file_summary', this.uli_1);
    this.zmf_1 = new StringResource('drag_and_drop_or_click_to_add_file', this.uli_1);
    this.amg_1 = new StringResource('extra_active_tab_warning', this.uli_1);
    this.bmg_1 = new StringResource('saved', this.uli_1);
    this.cmg_1 = new StringResource('individual', this.uli_1);
    this.dmg_1 = new StringResource('group', this.uli_1);
    this.emg_1 = new StringResource('dont_show_before', this.uli_1);
    this.fmg_1 = new StringResource('group_submission', this.uli_1);
    this.gmg_1 = new StringResource('require_file_submission', this.uli_1);
    this.hmg_1 = new StringResource('require_text_submission', this.uli_1);
    this.img_1 = new StringResource('maximum', this.uli_1);
    this.jmg_1 = new StringResource('size_limit', this.uli_1);
    this.kmg_1 = new StringResource('size_limit_error', this.uli_1);
    this.lmg_1 = new StringResource('limit', this.uli_1);
    this.mmg_1 = new StringResource('number_of_files', this.uli_1);
    this.nmg_1 = new StringResource('edit_after_submission', this.uli_1);
    this.omg_1 = new StringResource('allowed_till_deadline', this.uli_1);
    this.pmg_1 = new StringResource('allowed_till_grace', this.uli_1);
    this.qmg_1 = new StringResource('not_allowed', this.uli_1);
    this.rmg_1 = new StringResource('marked_by', this.uli_1);
    this.smg_1 = new StringResource('peers', this.uli_1);
    this.tmg_1 = new StringResource('peers_to_review', this.uli_1);
    this.umg_1 = new StringResource('file_type', this.uli_1);
    this.vmg_1 = new StringResource('file_type_chosen', this.uli_1);
    this.wmg_1 = new StringResource('file_type_any', this.uli_1);
    this.xmg_1 = new StringResource('file_document', this.uli_1);
    this.ymg_1 = new StringResource('file_image', this.uli_1);
    this.zmg_1 = new StringResource('submit_grade', this.uli_1);
    this.amh_1 = new StringResource('submit_grade_and_mark_next', this.uli_1);
    this.bmh_1 = new StringResource('graded', this.uli_1);
    this.cmh_1 = new StringResource('score_greater_than_zero', this.uli_1);
    this.dmh_1 = new StringResource('words', this.uli_1);
    this.emh_1 = new StringResource('characters', this.uli_1);
    this.fmh_1 = new StringResource('class_timezone_set', this.uli_1);
    this.gmh_1 = new StringResource('maximum_points', this.uli_1);
    this.hmh_1 = new StringResource('penalty_label', this.uli_1);
    this.imh_1 = new StringResource('submissions', this.uli_1);
    this.jmh_1 = new StringResource('add_text', this.uli_1);
    this.kmh_1 = new StringResource('course_blocks', this.uli_1);
    this.lmh_1 = new StringResource('add_block', this.uli_1);
    this.mmh_1 = new StringResource('edit_block', this.uli_1);
    this.nmh_1 = new StringResource('module', this.uli_1);
    this.omh_1 = new StringResource('course_module', this.uli_1);
    this.pmh_1 = new StringResource('formatted_text_to_show_to_course_participants', this.uli_1);
    this.qmh_1 = new StringResource('add_course_block_content_desc', this.uli_1);
    this.rmh_1 = new StringResource('add_assignment_block_content_desc', this.uli_1);
    this.smh_1 = new StringResource('discussion_board', this.uli_1);
    this.tmh_1 = new StringResource('add_discussion_board_desc', this.uli_1);
    this.umh_1 = new StringResource('new_module', this.uli_1);
    this.vmh_1 = new StringResource('edit_module', this.uli_1);
    this.wmh_1 = new StringResource('indent', this.uli_1);
    this.xmh_1 = new StringResource('unindent', this.uli_1);
    this.ymh_1 = new StringResource('institution', this.uli_1);
    this.zmh_1 = new StringResource('student_enrolment_policy', this.uli_1);
    this.ami_1 = new StringResource('teacher_enrolment_policy', this.uli_1);
    this.bmi_1 = new StringResource('open_enrolment', this.uli_1);
    this.cmi_1 = new StringResource('enrolment_requests_must_be_approved', this.uli_1);
    this.dmi_1 = new StringResource('accept_enrolment_requests_automatically', this.uli_1);
    this.emi_1 = new StringResource('visibility', this.uli_1);
    this.fmi_1 = new StringResource('hidden_enrolment_via_links_code_or_invitation', this.uli_1);
    this.gmi_1 = new StringResource('visible_for_all', this.uli_1);
    this.hmi_1 = new StringResource('terminology', this.uli_1);
    this.imi_1 = new StringResource('select_terminology', this.uli_1);
    this.jmi_1 = new StringResource('add_new_terminology', this.uli_1);
    this.kmi_1 = new StringResource('edit_terminology', this.uli_1);
    this.lmi_1 = new StringResource('your_words_for', this.uli_1);
    this.mmi_1 = new StringResource('course_setup', this.uli_1);
    this.nmi_1 = new StringResource('number_of_groups', this.uli_1);
    this.omi_1 = new StringResource('assign_to_random_groups', this.uli_1);
    this.pmi_1 = new StringResource('add_new_groups', this.uli_1);
    this.qmi_1 = new StringResource('edit_groups', this.uli_1);
    this.rmi_1 = new StringResource('num_replies', this.uli_1);
    this.smi_1 = new StringResource('topics', this.uli_1);
    this.tmi_1 = new StringResource('add_topic', this.uli_1);
    this.umi_1 = new StringResource('add_a_reply', this.uli_1);
    this.vmi_1 = new StringResource('messages', this.uli_1);
    this.wmi_1 = new StringResource('message', this.uli_1);
    this.xmi_1 = new StringResource('library', this.uli_1);
    this.ymi_1 = new StringResource('courses', this.uli_1);
    this.zmi_1 = new StringResource('course', this.uli_1);
    this.amj_1 = new StringResource('reports_and_analytics', this.uli_1);
    this.bmj_1 = new StringResource('course_comments', this.uli_1);
    this.cmj_1 = new StringResource('currently_enroled', this.uli_1);
    this.dmj_1 = new StringResource('past_enrolments', this.uli_1);
    this.emj_1 = new StringResource('standard', this.uli_1);
    this.fmj_1 = new StringResource('group_number', this.uli_1);
    this.gmj_1 = new StringResource('add_group', this.uli_1);
    this.hmj_1 = new StringResource('edit_group', this.uli_1);
    this.imj_1 = new StringResource('new_group_set', this.uli_1);
    this.jmj_1 = new StringResource('edit_text', this.uli_1);
    this.kmj_1 = new StringResource('add_module', this.uli_1);
    this.lmj_1 = new StringResource('add_a_new_course', this.uli_1);
    this.mmj_1 = new StringResource('join_existing_course', this.uli_1);
    this.nmj_1 = new StringResource('edit_course', this.uli_1);
    this.omj_1 = new StringResource('currently_enrolled', this.uli_1);
    this.pmj_1 = new StringResource('past_enrollments', this.uli_1);
    this.qmj_1 = new StringResource('unread', this.uli_1);
    this.rmj_1 = new StringResource('new_chat', this.uli_1);
    this.smj_1 = new StringResource('new_group', this.uli_1);
    this.tmj_1 = new StringResource('chat', this.uli_1);
    this.umj_1 = new StringResource('you', this.uli_1);
    this.vmj_1 = new StringResource('edit_topic', this.uli_1);
    this.wmj_1 = new StringResource('posts', this.uli_1);
    this.xmj_1 = new StringResource('post', this.uli_1);
    this.ymj_1 = new StringResource('individual_submission', this.uli_1);
    this.zmj_1 = new StringResource('unassigned', this.uli_1);
    this.amk_1 = new StringResource('error_too_long_text', this.uli_1);
    this.bmk_1 = new StringResource('managed_enrolment', this.uli_1);
    this.cmk_1 = new StringResource('text_file_submission_error', this.uli_1);
    this.dmk_1 = new StringResource('submit_all_at_once_submission_policy', this.uli_1);
    this.emk_1 = new StringResource('multiple_submission_allowed_submission_policy', this.uli_1);
    this.fmk_1 = new StringResource('enrolment_policy', this.uli_1);
    this.gmk_1 = new StringResource('submission_policy', this.uli_1);
    this.hmk_1 = new StringResource('submission_already_made', this.uli_1);
    this.imk_1 = new StringResource('grade_out_of_range', this.uli_1);
    this.jmk_1 = new StringResource('update_grade', this.uli_1);
    this.kmk_1 = new StringResource('update_grade_and_mark_next', this.uli_1);
    this.lmk_1 = new StringResource('add_discussion', this.uli_1);
    this.mmk_1 = new StringResource('edit_discussion', this.uli_1);
    this.nmk_1 = new StringResource('type_here', this.uli_1);
    this.omk_1 = new StringResource('deadline_has_passed', this.uli_1);
    this.pmk_1 = new StringResource('already_submitted', this.uli_1);
    this.qmk_1 = new StringResource('exceeds_word_limit', this.uli_1);
    this.rmk_1 = new StringResource('exceeds_char_limit', this.uli_1);
    this.smk_1 = new StringResource('unassigned_error', this.uli_1);
    this.tmk_1 = new StringResource('enabled', this.uli_1);
    this.umk_1 = new StringResource('disabled', this.uli_1);
    this.vmk_1 = new StringResource('from_my_courses', this.uli_1);
    this.wmk_1 = new StringResource('assign_reviewers', this.uli_1);
    this.xmk_1 = new StringResource('reviews_per_user_group', this.uli_1);
    this.ymk_1 = new StringResource('assign_random_reviewers', this.uli_1);
    this.zmk_1 = new StringResource('reviewer', this.uli_1);
    this.aml_1 = new StringResource('app_language', this.uli_1);
    this.bml_1 = new StringResource('pdf', this.uli_1);
    this.cml_1 = new StringResource('panic_button_app', this.uli_1);
    this.dml_1 = new StringResource('actions_to_be_taken_in_case_of_emergency', this.uli_1);
    this.eml_1 = new StringResource('exit_app', this.uli_1);
    this.fml_1 = new StringResource('delete_app_data_from_device', this.uli_1);
    this.gml_1 = new StringResource('more_options', this.uli_1);
    this.hml_1 = new StringResource('num_holidays', this.uli_1);
    this.iml_1 = new StringResource('hide_app', this.uli_1);
    this.jml_1 = new StringResource('panic_button_explanation', this.uli_1);
    this.kml_1 = new StringResource('hide_app_explanation', this.uli_1);
    this.lml_1 = new StringResource('most_recent', this.uli_1);
    this.mml_1 = new StringResource('comment', this.uli_1);
    this.nml_1 = new StringResource('grant_app_permission', this.uli_1);
    this.oml_1 = new StringResource('this_app_will_receive', this.uli_1);
    this.pml_1 = new StringResource('my_profile', this.uli_1);
    this.qml_1 = new StringResource('add_another_account', this.uli_1);
    this.rml_1 = new StringResource('end_is_before_start', this.uli_1);
    this.sml_1 = new StringResource('select_person', this.uli_1);
    this.tml_1 = new StringResource('your_submission', this.uli_1);
    this.uml_1 = new StringResource('edit_content', this.uli_1);
    this.vml_1 = new StringResource('edit_folder', this.uli_1);
    this.wml_1 = new StringResource('add_new_post', this.uli_1);
    this.xml_1 = new StringResource('grades_scoring', this.uli_1);
    this.yml_1 = new StringResource('mark_comment', this.uli_1);
    this.zml_1 = new StringResource('mark', this.uli_1);
    this.amm_1 = new StringResource('too_high', this.uli_1);
    this.bmm_1 = new StringResource('required', this.uli_1);
    this.cmm_1 = new StringResource('expand', this.uli_1);
    this.dmm_1 = new StringResource('collapse', this.uli_1);
    this.emm_1 = new StringResource('remove', this.uli_1);
    this.fmm_1 = new StringResource('table_of_contents', this.uli_1);
    this.gmm_1 = new StringResource('select_date', this.uli_1);
    this.hmm_1 = new StringResource('link', this.uli_1);
    this.imm_1 = new StringResource('time_submitted', this.uli_1);
    this.jmm_1 = new StringResource('group_assignment', this.uli_1);
    this.kmm_1 = new StringResource('menu', this.uli_1);
    this.lmm_1 = new StringResource('restarting', this.uli_1);
    this.mmm_1 = new StringResource('terms_required_if_registration_enabled', this.uli_1);
    this.nmm_1 = new StringResource('drop_files_to_import', this.uli_1);
    this.omm_1 = new StringResource('compose_post', this.uli_1);
    this.pmm_1 = new StringResource('password_updated', this.uli_1);
    this.qmm_1 = new StringResource('html5_content_display_engine', this.uli_1);
    this.rmm_1 = new StringResource('chrome_recommended', this.uli_1);
    this.smm_1 = new StringResource('chrome_recommended_info', this.uli_1);
    this.tmm_1 = new StringResource('internal_webview', this.uli_1);
    this.umm_1 = new StringResource('internal_webview_info', this.uli_1);
    this.vmm_1 = new StringResource('content_not_ready_try_later', this.uli_1);
    this.wmm_1 = new StringResource('version', this.uli_1);
    this.xmm_1 = new StringResource('licenses', this.uli_1);
    this.ymm_1 = new StringResource('cannot_record_attendance_for_future_date_time', this.uli_1);
    this.zmm_1 = new StringResource('could_not_load_vlc', this.uli_1);
    this.amn_1 = new StringResource('selected', this.uli_1);
    this.bmn_1 = new StringResource('clear_selection', this.uli_1);
    this.cmn_1 = new StringResource('move_entries_to_this_folder', this.uli_1);
    this.dmn_1 = new StringResource('cannot_move_to_subfolder_of_self', this.uli_1);
    this.emn_1 = new StringResource('cannot_move_already_in_same_folder', this.uli_1);
    this.fmn_1 = new StringResource('move_to', this.uli_1);
    this.gmn_1 = new StringResource('restore', this.uli_1);
    this.hmn_1 = new StringResource('delete_permanently', this.uli_1);
    this.imn_1 = new StringResource('deleted_items', this.uli_1);
    this.jmn_1 = new StringResource('delete_or_restore_items', this.uli_1);
    this.kmn_1 = new StringResource('yesterday', this.uli_1);
    this.lmn_1 = new StringResource('request_to_enrol_already_pending', this.uli_1);
    this.mmn_1 = new StringResource('request_submitted', this.uli_1);
    this.nmn_1 = new StringResource('canceled_enrolment_request', this.uli_1);
    this.omn_1 = new StringResource('enroled_into_name', this.uli_1);
    this.pmn_1 = new StringResource('declined_request_from_name', this.uli_1);
    this.qmn_1 = new StringResource('view_course', this.uli_1);
    this.rmn_1 = new StringResource('moderate', this.uli_1);
    this.smn_1 = new StringResource('manage_student_enrolments', this.uli_1);
    this.tmn_1 = new StringResource('manage_teacher_enrolments', this.uli_1);
    this.umn_1 = new StringResource('view_learning_records', this.uli_1);
    this.vmn_1 = new StringResource('edit_learning_records', this.uli_1);
    this.wmn_1 = new StringResource('view_members', this.uli_1);
    this.xmn_1 = new StringResource('copy_invite_code', this.uli_1);
    this.ymn_1 = new StringResource('direct_enrol_users_onto_courses', this.uli_1);
    this.zmn_1 = new StringResource('could_not_restart', this.uli_1);
    this.amo_1 = new StringResource('close_now', this.uli_1);
    this.bmo_1 = new StringResource('view_all_courses', this.uli_1);
    this.cmo_1 = new StringResource('edit_all_courses', this.uli_1);
    this.dmo_1 = new StringResource('moderate_all_courses', this.uli_1);
    this.emo_1 = new StringResource('manage_student_enrolments_for_all_courses', this.uli_1);
    this.fmo_1 = new StringResource('manage_teacher_enrolments_for_all_courses', this.uli_1);
    this.gmo_1 = new StringResource('view_attendance_records_for_all_courses', this.uli_1);
    this.hmo_1 = new StringResource('edit_attendance_records_for_all_courses', this.uli_1);
    this.imo_1 = new StringResource('add_new_users', this.uli_1);
    this.jmo_1 = new StringResource('view_all_users', this.uli_1);
    this.kmo_1 = new StringResource('edit_all_users', this.uli_1);
    this.lmo_1 = new StringResource('view_learning_records_for_all_courses', this.uli_1);
    this.mmo_1 = new StringResource('edit_learning_records_for_all_courses', this.uli_1);
    this.nmo_1 = new StringResource('add_new_courses', this.uli_1);
    this.omo_1 = new StringResource('manage_user_permissions', this.uli_1);
    this.pmo_1 = new StringResource('reset_passwords', this.uli_1);
    this.qmo_1 = new StringResource('upload_failed', this.uli_1);
    this.rmo_1 = new StringResource('opening_name', this.uli_1);
    this.smo_1 = new StringResource('invalid_invite_code', this.uli_1);
    this.tmo_1 = new StringResource('bulk_import', this.uli_1);
    this.umo_1 = new StringResource('import_key', this.uli_1);
    this.vmo_1 = new StringResource('imported', this.uli_1);
    this.wmo_1 = new StringResource('you_can_import_users_using_a_csv_file', this.uli_1);
    this.xmo_1 = new StringResource('get_template', this.uli_1);
    this.ymo_1 = new StringResource('line_number', this.uli_1);
    this.zmo_1 = new StringResource('selected_content', this.uli_1);
    this.amp_1 = new StringResource('edit_content_block', this.uli_1);
    this.bmp_1 = new StringResource('compression', this.uli_1);
    this.cmp_1 = new StringResource('compression_highest', this.uli_1);
    this.dmp_1 = new StringResource('compression_high', this.uli_1);
    this.emp_1 = new StringResource('compression_medium', this.uli_1);
    this.fmp_1 = new StringResource('compression_low', this.uli_1);
    this.gmp_1 = new StringResource('compression_lowest', this.uli_1);
    this.hmp_1 = new StringResource('compression_none', this.uli_1);
    this.imp_1 = new StringResource('size_compressed_was', this.uli_1);
    this.jmp_1 = new StringResource('size', this.uli_1);
    this.kmp_1 = new StringResource('import_error', this.uli_1);
    this.lmp_1 = new StringResource('upload_error', this.uli_1);
    this.mmp_1 = new StringResource('offline_items_storage', this.uli_1);
    this.nmp_1 = new StringResource('space_available', this.uli_1);
    this.omp_1 = new StringResource('grant_permission', this.uli_1);
    this.pmp_1 = new StringResource('gradebook', this.uli_1);
    this.qmp_1 = new StringResource('full_screen', this.uli_1);
    this.rmp_1 = new StringResource('exit_full_screen', this.uli_1);
    this.smp_1 = new StringResource('increase_text_size', this.uli_1);
    this.tmp_1 = new StringResource('decrease_text_size', this.uli_1);
    this.ump_1 = new StringResource('nothing_here_yet', this.uli_1);
    this.vmp_1 = new StringResource('select_picture_from_files', this.uli_1);
    this.wmp_1 = new StringResource('add_subtitles', this.uli_1);
    this.xmp_1 = new StringResource('edit_subtitles', this.uli_1);
    this.ymp_1 = new StringResource('subtitles', this.uli_1);
  }
  var strings_instance;
  function strings_getInstance() {
    if (strings_instance == null)
      new strings();
    return strings_instance;
  }
  function plurals() {
    plurals_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_pluralsJson.json');
    tmp.zmp_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_pluralsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_pluralsJson_ne.json');
    var tmp_5 = new SupportedLocale('ne', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_pluralsJson_ar.json');
    var tmp_7 = new SupportedLocale('ar', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_pluralsJson_bn.json');
    var tmp_9 = new SupportedLocale('bn', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_pluralsJson_fr.json');
    var tmp_11 = new SupportedLocale('fr', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_pluralsJson_fa.json');
    var tmp_13 = new SupportedLocale('fa', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_pluralsJson_nb-NO.json');
    var tmp_15 = new SupportedLocale('nb-NO', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_pluralsJson_it.json');
    var tmp_17 = new SupportedLocale('it', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_pluralsJson_my.json');
    var tmp_19 = new SupportedLocale('my', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_pluralsJson_ps.json');
    var tmp_21 = new SupportedLocale('ps', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_pluralsJson_tg.json');
    var tmp_23 = new SupportedLocale('tg', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_pluralsJson_ru.json');
    tmp_1.amq_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, new SupportedLocale('ru', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE())]));
    this.bmq_1 = new Impl(this.amq_1, this.zmp_1);
    this.cmq_1 = new PluralsResource('number_of_attempts', this.bmq_1);
    this.dmq_1 = new PluralsResource('duration_hours', this.bmq_1);
    this.emq_1 = new PluralsResource('duration_minutes', this.bmq_1);
    this.fmq_1 = new PluralsResource('duration_seconds', this.bmq_1);
    this.gmq_1 = new PluralsResource('items_selected', this.bmq_1);
    this.hmq_1 = new PluralsResource('items_deleted', this.bmq_1);
    this.imq_1 = new PluralsResource('items_restored', this.bmq_1);
    this.jmq_1 = new PluralsResource('are_you_sure_you_want_to_permanently_delete', this.bmq_1);
  }
  var plurals_instance;
  function plurals_getInstance() {
    if (plurals_instance == null)
      new plurals();
    return plurals_instance;
  }
  function MR() {
    MR_instance = this;
    this.kmq_1 = 'a6426d809f875e9e74f5754873784eb5';
    this.lmq_1 = strings_getInstance().uli_1.cle(plurals_getInstance().bmq_1);
  }
  var MR_instance;
  function MR_getInstance() {
    if (MR_instance == null)
      new MR();
    return MR_instance;
  }
  function AccountRegisterOptions(makeAccountActive, parentJoin) {
    makeAccountActive = makeAccountActive === VOID ? true : makeAccountActive;
    parentJoin = parentJoin === VOID ? null : parentJoin;
    this.mmq_1 = makeAccountActive;
    this.nmq_1 = parentJoin;
  }
  protoOf(AccountRegisterOptions).toString = function () {
    return 'AccountRegisterOptions(makeAccountActive=' + this.mmq_1 + ', parentJoin=' + this.nmq_1 + ')';
  };
  protoOf(AccountRegisterOptions).hashCode = function () {
    var result = getBooleanHashCode(this.mmq_1);
    result = imul(result, 31) + (this.nmq_1 == null ? 0 : this.nmq_1.hashCode()) | 0;
    return result;
  };
  protoOf(AccountRegisterOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountRegisterOptions))
      return false;
    var tmp0_other_with_cast = other instanceof AccountRegisterOptions ? other : THROW_CCE();
    if (!(this.mmq_1 === tmp0_other_with_cast.mmq_1))
      return false;
    if (!equals(this.nmq_1, tmp0_other_with_cast.nmq_1))
      return false;
    return true;
  };
  function AdultAccountRequiredException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, AdultAccountRequiredException);
  }
  function _get_db__ndbzd9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qmq_1;
    db$factory_0();
    return this_0.t2();
  }
  function _get_repo__dd1xjt($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rmq_1;
    repo$factory_0();
    return this_0.t2();
  }
  function $setAuthCOROUTINE$1(_this__u8e3s4, personUid, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.amr_1 = _this__u8e3s4;
    this.bmr_1 = personUid;
    this.cmr_1 = password;
  }
  protoOf($setAuthCOROUTINE$1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = doublePbkdf2HashAsBase64(this.amr_1, this.cmr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.dmr_1 = suspendResult;
            this.hd_1 = 2;
            var tmp0_elvis_lhs = _get_repo__dd1xjt(this.amr_1);
            var tmp_0 = (tmp0_elvis_lhs == null ? _get_db__ndbzd9(this.amr_1) : tmp0_elvis_lhs).f7l();
            var this_0 = new PersonAuth2();
            this_0.qfr_1 = this.bmr_1;
            var tmp_1 = this_0;
            tmp_1.rfr_1 = 'PBKDF2x2';
            this_0.sfr_1 = this.dmr_1;
            suspendResult = tmp_0.nfr(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function AuthManager(endpoint, di) {
    this.omq_1 = endpoint;
    this.pmq_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.omq_1;
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.m5d(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.qmq_1 = Instance(this_0, tmp$ret$3, 1).f5j(this, db$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.omq_1;
    var trigger_0 = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_4 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$6 = tmp_4.m5d(tmp$ret$5, context_0);
    var this_1 = On(this, tmp$ret$6, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_3.rmq_1 = InstanceOrNull(this_1, tmp$ret$8, 2).f5j(this, repo$factory());
  }
  protoOf(AuthManager).f5d = function () {
    return this.pmq_1;
  };
  protoOf(AuthManager).emr = function (personUid, password, $completion) {
    var tmp = new $setAuthCOROUTINE$1(this, personUid, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function db$factory() {
    return getPropertyCallableRef('db', 1, KProperty1, function (receiver) {
      return _get_db__ndbzd9(receiver);
    }, null);
  }
  function repo$factory() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return _get_repo__dd1xjt(receiver);
    }, null);
  }
  function db$factory_0() {
    return getPropertyCallableRef('db', 1, KProperty1, function (receiver) {
      return _get_db__ndbzd9(receiver);
    }, null);
  }
  function repo$factory_0() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return _get_repo__dd1xjt(receiver);
    }, null);
  }
  function ConsentNotGrantedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, ConsentNotGrantedException);
  }
  function Companion() {
  }
  var Companion_instance_47;
  function Companion_getInstance_17() {
    return Companion_instance_47;
  }
  function $serializer() {
    $serializer_instance = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.Endpoint', this, 1);
    tmp0_serialDesc.y4l('url', false);
    this.fmr_1 = tmp0_serialDesc;
  }
  protoOf($serializer).v4a = function () {
    return this.fmr_1;
  };
  protoOf($serializer).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer).x4a = function (decoder) {
    var tmp0_desc = this.fmr_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return Endpoint_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer).gmr = function (encoder, value) {
    var tmp0_desc = this.fmr_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.b4g(tmp0_desc, 0, value.hmr_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer).w4a = function (encoder, value) {
    return this.gmr(encoder, value instanceof Endpoint ? value : THROW_CCE());
  };
  var $serializer_instance;
  function $serializer_getInstance_11() {
    if ($serializer_instance == null)
      new $serializer();
    return $serializer_instance;
  }
  function Endpoint_init_$Init$(seen1, url, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_11().fmr_1);
    }
    $this.hmr_1 = url;
    return $this;
  }
  function Endpoint_init_$Create$(seen1, url, serializationConstructorMarker) {
    return Endpoint_init_$Init$(seen1, url, serializationConstructorMarker, objectCreate(protoOf(Endpoint)));
  }
  function Endpoint(url) {
    this.hmr_1 = url;
  }
  protoOf(Endpoint).toString = function () {
    return 'Endpoint(url=' + this.hmr_1 + ')';
  };
  protoOf(Endpoint).hashCode = function () {
    return getStringHashCode(this.hmr_1);
  };
  protoOf(Endpoint).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Endpoint))
      return false;
    var tmp0_other_with_cast = other instanceof Endpoint ? other : THROW_CCE();
    if (!(this.hmr_1 === tmp0_other_with_cast.hmr_1))
      return false;
    return true;
  };
  function Companion_0() {
    Companion_instance_48 = this;
    this.imr_1 = new EndpointScope();
  }
  var Companion_instance_48;
  function Companion_getInstance_18() {
    if (Companion_instance_48 == null)
      new Companion_0();
    return Companion_instance_48;
  }
  function EndpointScope() {
    Companion_getInstance_18();
    var tmp = this;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp.jmr_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(EndpointScope).kmr = function (context) {
    // Inline function 'kotlin.collections.getOrPut' call
    var this_0 = this.jmr_1;
    var key = context.hmr_1;
    var value = this_0.q(key);
    var tmp;
    if (value == null) {
      // Inline function 'com.ustadmobile.core.account.EndpointScope.getRegistry.<anonymous>' call
      var answer = new StandardScopeRegistry();
      this_0.s(key, answer);
      tmp = answer;
    } else {
      tmp = value;
    }
    return tmp;
  };
  protoOf(EndpointScope).m5f = function (context) {
    return this.kmr(context instanceof Endpoint ? context : THROW_CCE());
  };
  function Pbkdf2Params(iterations, keyLength) {
    iterations = iterations === VOID ? 10000 : iterations;
    keyLength = keyLength === VOID ? 512 : keyLength;
    this.lmr_1 = iterations;
    this.mmr_1 = keyLength;
  }
  protoOf(Pbkdf2Params).toString = function () {
    return 'Pbkdf2Params(iterations=' + this.lmr_1 + ', keyLength=' + this.mmr_1 + ')';
  };
  protoOf(Pbkdf2Params).hashCode = function () {
    var result = this.lmr_1;
    result = imul(result, 31) + this.mmr_1 | 0;
    return result;
  };
  protoOf(Pbkdf2Params).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Pbkdf2Params))
      return false;
    var tmp0_other_with_cast = other instanceof Pbkdf2Params ? other : THROW_CCE();
    if (!(this.lmr_1 === tmp0_other_with_cast.lmr_1))
      return false;
    if (!(this.mmr_1 === tmp0_other_with_cast.mmr_1))
      return false;
    return true;
  };
  function Companion_1() {
  }
  protoOf(Companion_1).s4x = function () {
    return $serializer_getInstance_12();
  };
  var Companion_instance_49;
  function Companion_getInstance_19() {
    return Companion_instance_49;
  }
  function $serializer_0() {
    $serializer_instance_0 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.RegisterRequest', this, 5);
    tmp0_serialDesc.y4l('person', false);
    tmp0_serialDesc.y4l('newPassword', false);
    tmp0_serialDesc.y4l('parent', false);
    tmp0_serialDesc.y4l('endpointUrl', false);
    tmp0_serialDesc.y4l('langCode', true);
    this.nmr_1 = tmp0_serialDesc;
  }
  protoOf($serializer_0).v4a = function () {
    return this.nmr_1;
  };
  protoOf($serializer_0).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance(), StringSerializer_getInstance(), get_nullable($serializer_getInstance_0()), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_0).x4a = function (decoder) {
    var tmp0_desc = this.nmr_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.n4e(tmp0_desc);
    if (tmp9_input.c4f()) {
      tmp4_local0 = tmp9_input.z4e(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.b4f(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.x4e(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.x4e(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.z4e(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.b4f(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.x4e(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.x4e(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.o4e(tmp0_desc);
    return RegisterRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_0).omr = function (encoder, value) {
    var tmp0_desc = this.nmr_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, $serializer_getInstance(), value.pmr_1);
    tmp1_output.b4g(tmp0_desc, 1, value.qmr_1);
    tmp1_output.f4g(tmp0_desc, 2, $serializer_getInstance_0(), value.rmr_1);
    tmp1_output.b4g(tmp0_desc, 3, value.smr_1);
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.tmr_1 === 'en')) {
      tmp1_output.b4g(tmp0_desc, 4, value.tmr_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_0).w4a = function (encoder, value) {
    return this.omr(encoder, value instanceof RegisterRequest ? value : THROW_CCE());
  };
  var $serializer_instance_0;
  function $serializer_getInstance_12() {
    if ($serializer_instance_0 == null)
      new $serializer_0();
    return $serializer_instance_0;
  }
  function RegisterRequest_init_$Init$(seen1, person, newPassword, parent, endpointUrl, langCode, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_12().nmr_1);
    }
    $this.pmr_1 = person;
    $this.qmr_1 = newPassword;
    $this.rmr_1 = parent;
    $this.smr_1 = endpointUrl;
    if (0 === (seen1 & 16))
      $this.tmr_1 = 'en';
    else
      $this.tmr_1 = langCode;
    return $this;
  }
  function RegisterRequest_init_$Create$(seen1, person, newPassword, parent, endpointUrl, langCode, serializationConstructorMarker) {
    return RegisterRequest_init_$Init$(seen1, person, newPassword, parent, endpointUrl, langCode, serializationConstructorMarker, objectCreate(protoOf(RegisterRequest)));
  }
  function RegisterRequest(person, newPassword, parent, endpointUrl, langCode) {
    langCode = langCode === VOID ? 'en' : langCode;
    this.pmr_1 = person;
    this.qmr_1 = newPassword;
    this.rmr_1 = parent;
    this.smr_1 = endpointUrl;
    this.tmr_1 = langCode;
  }
  protoOf(RegisterRequest).toString = function () {
    return 'RegisterRequest(person=' + this.pmr_1 + ', newPassword=' + this.qmr_1 + ', parent=' + this.rmr_1 + ', endpointUrl=' + this.smr_1 + ', langCode=' + this.tmr_1 + ')';
  };
  protoOf(RegisterRequest).hashCode = function () {
    var result = this.pmr_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.qmr_1) | 0;
    result = imul(result, 31) + (this.rmr_1 == null ? 0 : this.rmr_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.smr_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.tmr_1) | 0;
    return result;
  };
  protoOf(RegisterRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterRequest))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterRequest ? other : THROW_CCE();
    if (!this.pmr_1.equals(tmp0_other_with_cast.pmr_1))
      return false;
    if (!(this.qmr_1 === tmp0_other_with_cast.qmr_1))
      return false;
    if (!equals(this.rmr_1, tmp0_other_with_cast.rmr_1))
      return false;
    if (!(this.smr_1 === tmp0_other_with_cast.smr_1))
      return false;
    if (!(this.tmr_1 === tmp0_other_with_cast.tmr_1))
      return false;
    return true;
  };
  function UnauthorizedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, UnauthorizedException);
  }
  function Companion_2() {
  }
  var Companion_instance_50;
  function Companion_getInstance_20() {
    return Companion_instance_50;
  }
  function $serializer_1() {
    $serializer_instance_1 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.UserSessionWithPersonAndEndpoint', this, 4);
    tmp0_serialDesc.y4l('userSession', false);
    tmp0_serialDesc.y4l('person', false);
    tmp0_serialDesc.y4l('endpoint', false);
    tmp0_serialDesc.y4l('personPicture', true);
    this.umr_1 = tmp0_serialDesc;
  }
  protoOf($serializer_1).v4a = function () {
    return this.umr_1;
  };
  protoOf($serializer_1).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_1(), $serializer_getInstance(), $serializer_getInstance_11(), get_nullable($serializer_getInstance_2())];
  };
  protoOf($serializer_1).x4a = function (decoder) {
    var tmp0_desc = this.umr_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.n4e(tmp0_desc);
    if (tmp8_input.c4f()) {
      tmp4_local0 = tmp8_input.z4e(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.z4e(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.z4e(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.z4e(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.z4e(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.z4e(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.o4e(tmp0_desc);
    return UserSessionWithPersonAndEndpoint_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_1).vmr = function (encoder, value) {
    var tmp0_desc = this.umr_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, $serializer_getInstance_1(), value.wmr_1);
    tmp1_output.d4g(tmp0_desc, 1, $serializer_getInstance(), value.xmr_1);
    tmp1_output.d4g(tmp0_desc, 2, $serializer_getInstance_11(), value.ymr_1);
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.zmr_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, $serializer_getInstance_2(), value.zmr_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_1).w4a = function (encoder, value) {
    return this.vmr(encoder, value instanceof UserSessionWithPersonAndEndpoint ? value : THROW_CCE());
  };
  var $serializer_instance_1;
  function $serializer_getInstance_13() {
    if ($serializer_instance_1 == null)
      new $serializer_1();
    return $serializer_instance_1;
  }
  function UserSessionWithPersonAndEndpoint_init_$Init$(seen1, userSession, person, endpoint, personPicture, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_13().umr_1);
    }
    $this.wmr_1 = userSession;
    $this.xmr_1 = person;
    $this.ymr_1 = endpoint;
    if (0 === (seen1 & 8))
      $this.zmr_1 = null;
    else
      $this.zmr_1 = personPicture;
    return $this;
  }
  function UserSessionWithPersonAndEndpoint_init_$Create$(seen1, userSession, person, endpoint, personPicture, serializationConstructorMarker) {
    return UserSessionWithPersonAndEndpoint_init_$Init$(seen1, userSession, person, endpoint, personPicture, serializationConstructorMarker, objectCreate(protoOf(UserSessionWithPersonAndEndpoint)));
  }
  function UserSessionWithPersonAndEndpoint(userSession, person, endpoint, personPicture) {
    personPicture = personPicture === VOID ? null : personPicture;
    this.wmr_1 = userSession;
    this.xmr_1 = person;
    this.ymr_1 = endpoint;
    this.zmr_1 = personPicture;
  }
  protoOf(UserSessionWithPersonAndEndpoint).ams = function () {
    var displayUrl = removeSuffix(removePrefix(removePrefix(this.ymr_1.hmr_1, 'http://'), 'https://'), '/');
    return '' + this.xmr_1.y9b_1 + '@' + displayUrl;
  };
  protoOf(UserSessionWithPersonAndEndpoint).bms = function () {
    return toUmAccount(this.xmr_1, this.ymr_1.hmr_1);
  };
  protoOf(UserSessionWithPersonAndEndpoint).cms = function () {
    var tmp0_elvis_lhs = this.xmr_1.y9b_1;
    return new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(this.ymr_1.hmr_1, tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs));
  };
  protoOf(UserSessionWithPersonAndEndpoint).dms = function (userSession, person, endpoint, personPicture) {
    return new UserSessionWithPersonAndEndpoint(userSession, person, endpoint, personPicture);
  };
  protoOf(UserSessionWithPersonAndEndpoint).ems = function (userSession, person, endpoint, personPicture, $super) {
    userSession = userSession === VOID ? this.wmr_1 : userSession;
    person = person === VOID ? this.xmr_1 : person;
    endpoint = endpoint === VOID ? this.ymr_1 : endpoint;
    personPicture = personPicture === VOID ? this.zmr_1 : personPicture;
    return $super === VOID ? this.dms(userSession, person, endpoint, personPicture) : $super.dms.call(this, userSession, person, endpoint, personPicture);
  };
  protoOf(UserSessionWithPersonAndEndpoint).toString = function () {
    return 'UserSessionWithPersonAndEndpoint(userSession=' + this.wmr_1 + ', person=' + this.xmr_1 + ', endpoint=' + this.ymr_1 + ', personPicture=' + this.zmr_1 + ')';
  };
  protoOf(UserSessionWithPersonAndEndpoint).hashCode = function () {
    var result = hashCode(this.wmr_1);
    result = imul(result, 31) + this.xmr_1.hashCode() | 0;
    result = imul(result, 31) + this.ymr_1.hashCode() | 0;
    result = imul(result, 31) + (this.zmr_1 == null ? 0 : this.zmr_1.hashCode()) | 0;
    return result;
  };
  protoOf(UserSessionWithPersonAndEndpoint).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UserSessionWithPersonAndEndpoint))
      return false;
    var tmp0_other_with_cast = other instanceof UserSessionWithPersonAndEndpoint ? other : THROW_CCE();
    if (!equals(this.wmr_1, tmp0_other_with_cast.wmr_1))
      return false;
    if (!this.xmr_1.equals(tmp0_other_with_cast.xmr_1))
      return false;
    if (!this.ymr_1.equals(tmp0_other_with_cast.ymr_1))
      return false;
    if (!equals(this.zmr_1, tmp0_other_with_cast.zmr_1))
      return false;
    return true;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.ams();
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.ams();
    return compareValues(tmp, tmp$ret$1);
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation) {
    this.nms_1 = this$0;
    this.oms_1 = $endpoint;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).qms = function (endpointSessions, $completion) {
    var tmp = this.rms(endpointSessions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qms((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.nms_1.wms_1;
            while (true) {
              var prevValue = this_0.t2();
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = prevValue.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (!element.ymr_1.equals(this.oms_1)) {
                  destination.i1(element);
                }
              }
              var this_1 = this.pms_1;
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
              var tmp0_iterator_0 = this_1.w();
              while (tmp0_iterator_0.f()) {
                var item = tmp0_iterator_0.e();
                var tmp0_elvis_lhs = item.yi2_1;
                var tmp_0 = tmp0_elvis_lhs == null ? new UserSession() : tmp0_elvis_lhs;
                var tmp1_elvis_lhs = item.wi2_1;
                destination_0.i1(new UserSessionWithPersonAndEndpoint(tmp_0, tmp1_elvis_lhs == null ? new Person() : tmp1_elvis_lhs, this.oms_1, item.xi2_1));
              }
              var tmp_1 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda;
              var nextValue = plus(destination, sortedWith(destination_0, new sam$kotlin_Comparator$0(tmp_1)));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).rms = function (endpointSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this.nms_1, this.oms_1, completion);
    i.pms_1 = endpointSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this$0, $endpoint, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation);
    var l = function (endpointSessions, $completion) {
      return i.qms(endpointSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation) {
    this.kmt_1 = this$0;
    this.lmt_1 = $endpoint;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var this_0 = this.kmt_1.tms_1;
            var context = this.lmt_1;
            var trigger = this_0.i5d();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.m5d(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).k5e();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.nmt_1 = tmp_3.i5e(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.nmt_1.g7l().ri1();
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this.kmt_1, this.lmt_1, null);
            suspendResult = tmp_5.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this.kmt_1, this.lmt_1, completion);
    i.mmt_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_0(this$0, $endpoint, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wmt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda).ymt = function (endpointsWithSessions, $completion) {
    var tmp = this.zmt(endpointsWithSessions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ymt((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_iterator = this.xmt_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            launch(this.wmt_1.bmt_1, VOID, VOID, UstadAccountManager$slambda$slambda$slambda$slambda_0(this.wmt_1, element, null));
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).zmt = function (endpointsWithSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this.wmt_1, completion);
    i.xmt_1 = endpointsWithSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (endpointsWithSessions, $completion) {
      return i.ymt(endpointsWithSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda(this$0, resultContinuation) {
    this.imu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda).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 = collectLatest(this.imu_1.vms_1, UstadAccountManager$slambda$slambda$slambda_0(this.imu_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadAccountManager$slambda$slambda).q7e = function (completion) {
    return new UstadAccountManager$slambda$slambda(this.imu_1, completion);
  };
  function UstadAccountManager$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$lambda($personAndPictureFromDb) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = $personAndPictureFromDb;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gfv_1;
      tmp.z9b_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z9b_1;
      var tmp_0 = $this$shallowCopy;
      var tmp2_safe_receiver = $personAndPictureFromDb;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.gfv_1;
      tmp_0.a9c_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.a9c_1;
      return Unit_instance;
    };
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation) {
    this.rmu_1 = $session;
    this.smu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).umu = function (personAndPictureFromDb, $completion) {
    var tmp = this.vmu(personAndPictureFromDb, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.umu((p1 == null ? true : p1 instanceof PersonAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_safe_receiver = this.tmu_1;
          var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gfv_1;
          var nameChanged = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.qjt()) === this.rmu_1.xmr_1.qjt());
          var tmp2_safe_receiver = this.tmu_1;
          var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hfv_1;
          var tmp_0 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.y9c_1;
          var tmp4_safe_receiver = this.rmu_1.zmr_1;
          var pictureUriChanged = !(tmp_0 == (tmp4_safe_receiver == null ? null : tmp4_safe_receiver.y9c_1));
          if (nameChanged ? true : pictureUriChanged) {
            var tmp_1;
            if (nameChanged) {
              tmp_1 = shallowCopy(this.rmu_1.xmr_1, UstadAccountManager$slambda$slambda$slambda$slambda$lambda(this.tmu_1));
            } else {
              tmp_1 = this.rmu_1.xmr_1;
            }
            var tmp_2 = tmp_1;
            var tmp_3;
            if (pictureUriChanged) {
              var tmp5_safe_receiver = this.tmu_1;
              tmp_3 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.hfv_1;
            } else {
              tmp_3 = this.rmu_1.zmr_1;
            }
            this.smu_1.wmu(this.rmu_1.ems(VOID, tmp_2, VOID, tmp_3));
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).vmu = function (personAndPictureFromDb, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1(this.rmu_1, this.smu_1, completion);
    i.tmu_1 = personAndPictureFromDb;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_2($session, this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation);
    var l = function (personAndPictureFromDb, $completion) {
      return i.umu(personAndPictureFromDb, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.fmv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).imv = function (session, $completion) {
    var tmp = this.jmv(session, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.imv(p1 instanceof UserSessionWithPersonAndEndpoint ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var this_0 = this.fmv_1.tms_1;
            var context = this.gmv_1.ymr_1;
            var trigger = this_0.i5d();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.m5d(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).k5e();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.hmv_1 = tmp_3.i5e(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.hmv_1.s7j().vcc(this.gmv_1.wmr_1.oi2_1);
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda_2(this.gmv_1, this.fmv_1, null);
            suspendResult = tmp_5.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).jmv = function (session, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this.fmv_1, completion);
    i.gmv_1 = session;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (session, $completion) {
      return i.imv(session, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda_1(this$0, resultContinuation) {
    this.smv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda_1).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda_1).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).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 = collectLatest(this.smv_1.ums_1, UstadAccountManager$slambda$slambda$slambda_2(this.smv_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).q7e = function (completion) {
    return new UstadAccountManager$slambda$slambda_1(this.smv_1, completion);
  };
  function UstadAccountManager$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function invoke$lambda($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function UstadAccountManager$register$slambda$slambda(this$0, resultContinuation) {
    this.bmw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda).fmw = function (response, $completion) {
    var tmp = this.t3l(response, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda$slambda).he = function (p1, $completion) {
    return this.fmw(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.cmw_1.a3f().g33_1 === 200) {
              var tmp_0 = this;
              tmp_0.emw_1 = _get_json__d8whur(this.bmw_1);
              this.hd_1 = 1;
              suspendResult = bodyAsText(this.cmw_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.dmw_1 = new Pair(null, this.cmw_1.a3f().g33_1);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var string = suspendResult;
            var this_0 = this.emw_1.y4b();
            var this_1 = serializer(this_0, createKType(getKClass(Person), arrayOf([]), false));
            var ARGUMENT = this.emw_1.x4b(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
            this.dmw_1 = new Pair(ARGUMENT, 200);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.dmw_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).t3l = function (response, completion) {
    var i = new UstadAccountManager$register$slambda$slambda(this.bmw_1, completion);
    i.cmw_1 = response;
    return i;
  };
  function UstadAccountManager$register$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda(this$0, resultContinuation);
    var l = function (response, $completion) {
      return i.fmw(response, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation) {
    this.omw_1 = $db;
    this.pmw_1 = $registeredPerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda_1).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = this.omw_1.s7j().kfu(this.pmw_1.x9b_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rmw_1 = suspendResult;
            if (this.rmw_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.omw_1.s7j().insertAsync(this.pmw_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).tmw = function (it, completion) {
    var i = new UstadAccountManager$register$slambda$slambda_1(this.omw_1, this.pmw_1, completion);
    i.qmw_1 = it;
    return i;
  };
  function UstadAccountManager$register$slambda$slambda_2($db, $registeredPerson, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$lambda_0($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function _get_httpClient__2ty1zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xms_1;
    httpClient$factory_0();
    return this_0.t2();
  }
  function _get_json__d8whur($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yms_1;
    json$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zms_1;
    apiUrlConfig$factory_0();
    return this_0.t2();
  }
  function makeNewTempGuestSession($this, endpointUrl, currentDb) {
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.apply' call
    var this_0 = new UserSession();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    var tmp = this_0;
    var tmp_0 = get_doorPrimaryKeyManager(currentDb);
    tmp.ji2_1 = tmp_0.s68(679);
    this_0.pi2_1 = get_doorWrapperNodeId(currentDb);
    this_0.qi2_1 = systemTimeInMillis();
    var tmp_1 = this_0;
    tmp_1.vi2_1 = 8 | 4;
    var tmp_2 = this_0;
    tmp_2.si2_1 = 1;
    var this_1 = new UserSessionWithPersonAndEndpoint(this_0, Companion_getInstance_21().umw_1, new Endpoint(endpointUrl));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    launch($this.bmt_1, VOID, VOID, UstadAccountManager$makeNewTempGuestSession$slambda_0(currentDb, this_1, null));
    return this_1;
  }
  function assertNotClosed($this) {
    if ($this.amt_1.kotlinx$atomicfu$value)
      throw IllegalStateException_init_$Create$('UstadAccountManager is closed');
  }
  function addActiveEndpoint($this, endpoint, commit, $completion) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.vms_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.addActiveEndpoint.<anonymous>' call
        var nextValue = plus(prevValue, listOf_0(endpoint));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
    return Unit_instance;
  }
  function removeActiveEndpoint($this, endpoint, commit) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.vms_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveEndpoint.<anonymous>' call
        // Inline function 'kotlin.collections.filter' call
        // Inline function 'kotlin.collections.filterTo' call
        var destination = ArrayList_init_$Create$();
        var tmp0_iterator = prevValue.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveEndpoint.<anonymous>.<anonymous>' call
          if (!element.equals(endpoint)) {
            destination.i1(element);
          }
        }
        var nextValue = destination;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
  }
  function removeActiveEndpoint$default($this, endpoint, commit, $super) {
    commit = commit === VOID ? true : commit;
    return removeActiveEndpoint($this, endpoint, commit);
  }
  function commitActiveEndpointsToPref($this) {
    var tmp = Default_getInstance();
    var tmp_0 = ListSerializer(serializer_0(StringCompanionObject_instance));
    // Inline function 'kotlin.collections.map' call
    var this_0 = toSet($this.vms_1.t2());
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.commitActiveEndpointsToPref.<anonymous>' call
      var tmp$ret$0 = item.hmr_1;
      destination.i1(tmp$ret$0);
    }
    var json = tmp.w4b(tmp_0, toList(destination));
    // Inline function 'com.russhwolf.settings.set' call
    var this_1 = $this.sms_1;
    var key = 'accountmgr.endpointswithsessions';
    this_1.ml8(key, json);
  }
  function getSiteFromDbOrLoadFromHttp($this, repo, $completion) {
    var tmp = new $getSiteFromDbOrLoadFromHttpCOROUTINE$7($this, repo, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_3() {
    Companion_instance_51 = this;
    var tmp = this;
    // Inline function 'kotlin.apply' call
    var this_0 = new Person();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.Companion.GUEST_PERSON.<anonymous>' call
    this_0.x9b_1 = new Long(0, 0);
    this_0.z9b_1 = 'Guest';
    this_0.a9c_1 = 'User';
    tmp.umw_1 = this_0;
    this.vmw_1 = 'accountmgr.activesession';
    this.wmw_1 = 'accountmgr.activeendpoint';
    this.xmw_1 = 'accountmgr.endpointswithsessions';
    this.ymw_1 = 'http://localhost/';
    this.zmw_1 = 'com.ustadmobile';
    this.amx_1 = 'com.ustadmobile.AUTH_GET_TOKEN';
  }
  var Companion_instance_51;
  function Companion_getInstance_21() {
    if (Companion_instance_51 == null)
      new Companion_3();
    return Companion_instance_51;
  }
  function sam$kotlin_Comparator$0(function_0) {
    this.nmx_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0).pa = function (a, b) {
    return this.nmx_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0(function_0) {
    this.omx_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).t1d = function (value, $completion) {
    return this.omx_1(value, $completion);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(function_0) {
    this.pmx_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0).qmx = function (endpointUrl) {
    return this.pmx_1(endpointUrl);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(function_0) {
    this.rmx_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0).qmx = function (endpointUrl) {
    return this.rmx_1(endpointUrl);
  };
  function startGuestSession$lambda($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function UstadAccountManager$slambda(this$0, resultContinuation) {
    this.amy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda).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 = whenSubscribed(this.amy_1.wms_1, UstadAccountManager$slambda$slambda_0(this.amy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadAccountManager$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda(this.amy_1, completion);
    i.bmy_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda_1(this$0, resultContinuation) {
    this.kmy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda_1).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 = whenSubscribed(this.kmy_1.ums_1, UstadAccountManager$slambda$slambda_2(this.kmy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadAccountManager$slambda_1).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda_1(this.kmy_1, completion);
    i.lmy_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation) {
    this.umy_1 = $currentDb;
    this.vmy_1 = $it;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).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.umy_1.g7l().qi1(this.vmy_1.wmr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda(this.umy_1, this.vmy_1, completion);
    i.wmy_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$makeNewTempGuestSession$slambda_0($currentDb, $it, resultContinuation) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$activeSessionCount$lambda(it) {
    return true;
  }
  function UstadAccountManager$register$slambda(this$0, $endpointUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    this.fmz_1 = this$0;
    this.gmz_1 = $endpointUrl;
    this.hmz_1 = $accountRegisterOptions;
    this.imz_1 = $person;
    this.jmz_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda).vmz = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda).he = function (p1, $completion) {
    return this.vmz((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            assertNotClosed(this.fmz_1);
            this.lmz_1 = new Endpoint(this.gmz_1);
            this.mmz_1 = this.hmz_1.nmq_1;
            var tmp_0 = this;
            var this_0 = _get_httpClient__2ty1zc(this.fmz_1);
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.gmz_1, '/') + '/auth/register');
            contentType(this_1, Application_getInstance().p2u_1);
            setBodyJson(this_1, _get_json__d8whur(this.fmz_1), Companion_instance_49.s4x(), new RegisterRequest(this.imz_1, this.jmz_1, this.mmz_1, this.gmz_1));
            this_1.n3c_1 = Companion_getInstance().n30_1;
            tmp_0.nmz_1 = new HttpStatement(this_1, this_0);
            this.hd_1 = 1;
            suspendResult = this.nmz_1.l45(UstadAccountManager$register$slambda$slambda_0(this.fmz_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.omz_1 = suspendResult;
            this.pmz_1 = this.omz_1.y6();
            this.qmz_1 = this.omz_1.z6();
            if (this.qmz_1 === 200 ? !(this.pmz_1 == null) : false) {
              var tmp_1 = this;
              var this_2 = this.fmz_1.tms_1;
              var context = this.lmz_1;
              var trigger = this_2.i5d();
              var tmp_2 = Companion_instance_0;
              var tmp_3 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
              var this_3 = On(this_2, tmp_2.m5d(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context), trigger);
              var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
              tmp_1.smz_1 = Instance(this_3, isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 2).f5j(null, getLocalDelegateReference('repo', KProperty0, false, function () {
                return THROW_ISE();
              }));
              this.hd_1 = 2;
              suspendResult = getSiteFromDbOrLoadFromHttp(this.fmz_1, invoke$lambda(this.smz_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.qmz_1 === 409) {
                var tmp_5 = this;
                throw IllegalStateException_init_$Create$('Conflict: username already taken');
              } else {
                var tmp_6 = this;
                throw Exception_init_$Create$('register request: non-OK status code: ' + this.qmz_1);
              }
            }

          case 2:
            this.hd_1 = 3;
            suspendResult = this.fmz_1.wmz(this.pmz_1, this.gmz_1, this.jmz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.tmz_1 = suspendResult;
            var tmp_7 = this;
            var this_4 = this.fmz_1.tms_1;
            var context_0 = this.lmz_1;
            var trigger_0 = this_4.i5d();
            var tmp_8 = Companion_instance_0;
            var tmp_9 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_10 = get_direct(On(this_4, tmp_8.m5d(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), context_0), trigger_0)).k5e();
            var tmp_11 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_7.umz_1 = tmp_10.i5e(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), 1);
            this.hd_1 = 4;
            suspendResult = withDoorTransactionAsync(this.umz_1, VOID, UstadAccountManager$register$slambda$slambda_2(this.umz_1, this.pmz_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            if (this.hmz_1.mmq_1) {
              this.fmz_1.wmu(this.tmz_1);
            }

            this.rmz_1 = this.pmz_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.rmz_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);
  };
  protoOf(UstadAccountManager$register$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$register$slambda(this.fmz_1, this.gmz_1, this.hmz_1, this.imz_1, this.jmz_1, completion);
    i.kmz_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$register$slambda_0(this$0, $endpointUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    var i = new UstadAccountManager$register$slambda(this$0, $endpointUrl, $accountRegisterOptions, $person, $password, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.vmz($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$addSession$slambda(this$0, $endpoint, $person, $password, $authManager, $endpointRepo, $endpointDb, resultContinuation) {
    this.fn0_1 = this$0;
    this.gn0_1 = $endpoint;
    this.hn0_1 = $person;
    this.in0_1 = $password;
    this.jn0_1 = $authManager;
    this.kn0_1 = $endpointRepo;
    this.ln0_1 = $endpointDb;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$addSession$slambda).yn0 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$addSession$slambda).he = function (p1, $completion) {
    return this.yn0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$addSession$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = this.fn0_1.tms_1;
            var context = this.gn0_1;
            var trigger = this_0.i5d();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.m5d(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).k5e();
            var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
            tmp_0.nn0_1 = tmp_3.i5e(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).v6a_1;
            var tmp_5 = this;
            tmp_5.on0_1 = new UserSession();
            var tmp_6 = this;
            tmp_6.pn0_1 = this.on0_1;
            this.pn0_1.pi2_1 = this.nn0_1;
            this.pn0_1.oi2_1 = this.hn0_1.x9b_1;
            this.pn0_1.qi2_1 = systemTimeInMillis();
            var tmp_7 = this.pn0_1;
            tmp_7.vi2_1 = 1;
            var tmp_8 = this.pn0_1;
            tmp_8.si2_1 = 1;
            this.qn0_1 = this.in0_1;
            if (this.qn0_1 == null) {
              this.rn0_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_9 = this;
              tmp_9.sn0_1 = this.qn0_1;
              var tmp_10 = this;
              tmp_10.tn0_1 = this.sn0_1;
              this.hd_1 = 1;
              suspendResult = encryptPbkdf2(this.jn0_1, this.tn0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.un0_1 = suspendResult;
            this.rn0_1 = toHexString(this.un0_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.vn0_1 = this.rn0_1;
            this.pn0_1.ui2_1 = this.vn0_1;
            this.hd_1 = 3;
            suspendResult = this.kn0_1.g7l().qi1(this.pn0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.wn0_1 = suspendResult;
            this.pn0_1.ji2_1 = this.wn0_1;
            this.xn0_1 = this.on0_1;
            this.hd_1 = 4;
            suspendResult = this.ln0_1.k7k().mgn(this.hn0_1.x9b_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var personPicture = suspendResult;
            return to(this.xn0_1, personPicture);
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$addSession$slambda).tmw = function (it, completion) {
    var i = new UstadAccountManager$addSession$slambda(this.fn0_1, this.gn0_1, this.hn0_1, this.in0_1, this.jn0_1, this.kn0_1, this.ln0_1, completion);
    i.mn0_1 = it;
    return i;
  };
  function UstadAccountManager$addSession$slambda_0(this$0, $endpoint, $person, $password, $authManager, $endpointRepo, $endpointDb, resultContinuation) {
    var i = new UstadAccountManager$addSession$slambda(this$0, $endpoint, $person, $password, $authManager, $endpointRepo, $endpointDb, resultContinuation);
    var l = function (it, $completion) {
      return i.yn0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$endSession$lambda($session) {
    return function (it) {
      return it === $session.ymr_1.hmr_1;
    };
  }
  function UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    this.hn1_1 = this$0;
    this.in1_1 = $endpointUrl;
    this.jn1_1 = $username;
    this.kn1_1 = $password;
    this.ln1_1 = $maxDateOfBirth;
    this.mn1_1 = $dontSetCurrentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$login$slambda).dn2 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$login$slambda).he = function (p1, $completion) {
    return this.dn2((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$login$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            assertNotClosed(this.hn1_1);
            var tmp_0 = this;
            var this_0 = this.hn1_1.tms_1;
            var context = new Endpoint(this.in1_1);
            var trigger = this_0.i5d();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var this_1 = On(this_0, tmp_1.m5d(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger);
            var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.on1_1 = Instance(this_1, isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), 2).f5j(null, getLocalDelegateReference('repo', KProperty0, false, function () {
              return THROW_ISE();
            }));
            var tmp_4 = this;
            var this_2 = this.hn1_1.tms_1;
            var context_0 = new Endpoint(this.in1_1);
            var trigger_0 = this_2.i5d();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var this_3 = On(this_2, tmp_5.m5d(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context_0), trigger_0);
            var tmp_7 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.pn1_1 = Instance(this_3, isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), 1).f5j(null, getLocalDelegateReference('db', KProperty0, false, function () {
              return THROW_ISE();
            }));
            var tmp_8 = this;
            var tmp_9 = invoke$lambda_0(this.on1_1);
            var tmp0_safe_receiver = isInterface(tmp_9, DoorDatabaseRepository) ? tmp_9 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a3d();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a6c_1;
            var tmp_10;
            if (tmp2_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not open repo for endpoint ' + this.in1_1);
            } else {
              tmp_10 = tmp2_elvis_lhs;
            }

            tmp_8.qn1_1 = tmp_10;
            var tmp_11 = this;
            tmp_11.rn1_1 = _get_httpClient__2ty1zc(this.hn1_1);
            var tmp_12 = this;
            tmp_12.sn1_1 = this.rn1_1;
            var tmp_13 = this;
            var this_4 = new HttpRequestBuilder();
            url(this_4, removeSuffix(this.in1_1, '/') + '/auth/login');
            parameter(this_4, 'username', this.jn1_1);
            parameter(this_4, 'password', this.kn1_1);
            parameter(this_4, 'maxDateOfBirth', this.ln1_1);
            header(this_4, 'X-nid', this.qn1_1);
            set_expectSuccess(this_4, false);
            tmp_13.tn1_1 = this_4;
            this.tn1_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_14 = this;
            tmp_14.un1_1 = this.sn1_1;
            var tmp_15 = this;
            tmp_15.vn1_1 = this.tn1_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.vn1_1, this.un1_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wn1_1 = suspendResult;
            if (this.wn1_1.a3f().g33_1 === 403) {
              throw new UnauthorizedException('Access denied');
            } else if (this.wn1_1.a3f().equals(Companion_getInstance_0().r32_1)) {
              throw new ConsentNotGrantedException('Parental consent required but not granted');
            } else if (this.wn1_1.a3f().equals(Companion_getInstance_0().g32_1)) {
              throw new AdultAccountRequiredException('Adult account required, credentials for child account');
            } else if (!(this.wn1_1.a3f().g33_1 === 200)) {
              throw IllegalStateException_init_$Create$('Server error - response ' + this.wn1_1.a3f().g33_1);
            }

            var tmp_16 = this;
            tmp_16.xn1_1 = _get_json__d8whur(this.hn1_1);
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.wn1_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.yn1_1 = suspendResult;
            var tmp_17 = this;
            var this_5 = this.xn1_1.y4b();
            var this_6 = serializer(this_5, createKType(getKClass(UmAccount), arrayOf([]), false));
            tmp_17.zn1_1 = this.xn1_1.x4b(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), this.yn1_1);
            this.zn1_1.ck1_1 = this.in1_1;
            this.hd_1 = 3;
            suspendResult = invoke$lambda_0(this.on1_1).s7j().jfu(this.zn1_1.zk0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.an2_1 = suspendResult;
            var tmp_18 = this;
            var tmp_19;
            if (this.an2_1 == null) {
              throw IllegalStateException_init_$Create$('Cannot find person in repo/db');
            } else {
              tmp_19 = this.an2_1;
            }

            tmp_18.bn2_1 = tmp_19;
            this.cn2_1 = ensureNotNull(this.bn2_1.gfv_1);
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.hn1_1, invoke$lambda_0(this.on1_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.hn1_1.wmz(this.cn2_1, this.in1_1, this.kn1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            if (!this.mn1_1) {
              this.hn1_1.wmu(newSession);
            }

            return this.zn1_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);
  };
  protoOf(UstadAccountManager$login$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$login$slambda(this.hn1_1, this.in1_1, this.jn1_1, this.kn1_1, this.ln1_1, this.mn1_1, completion);
    i.nn1_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$login$slambda_0(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    var i = new UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.dn2($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $activeSessionsListCOROUTINE$2(_this__u8e3s4, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mn2_1 = _this__u8e3s4;
    this.nn2_1 = endpointFilter;
  }
  protoOf($activeSessionsListCOROUTINE$2).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.mn2_1.vms_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.nn2_1.qmx(element.hmr_1)) {
                destination.i1(element);
              }
            }

            tmp_0.on2_1 = destination;
            var tmp_1 = this;
            tmp_1.pn2_1 = this.on2_1;
            var tmp_2 = this;
            tmp_2.qn2_1 = ArrayList_init_$Create$();
            this.rn2_1 = this.pn2_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.rn2_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.sn2_1 = this.rn2_1.e();
            var tmp_3 = this;
            tmp_3.tn2_1 = this.sn2_1;
            var tmp_4 = this;
            var this_1 = this.mn2_1.tms_1;
            var context = this.tn2_1;
            var trigger = this_1.i5d();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.m5d(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).k5e();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.un2_1 = tmp_7.i5e(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.un2_1.g7l().si1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_2 = suspendResult;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_0 = this_2.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(withEndpoint(item, this.tn2_1));
            }

            var list = destination_0;
            addAll(this.qn2_1, list);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.qn2_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $activeSessionCountCOROUTINE$3(_this__u8e3s4, maxDateOfBirth, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.dn3_1 = _this__u8e3s4;
    this.en3_1 = maxDateOfBirth;
    this.fn3_1 = endpointFilter;
  }
  protoOf($activeSessionCountCOROUTINE$3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.dn3_1.vms_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.fn3_1.qmx(element.hmr_1)) {
                destination.i1(element);
              }
            }

            tmp_0.gn3_1 = destination;
            var tmp_1 = this;
            tmp_1.hn3_1 = 0;
            this.in3_1 = this.hn3_1;
            this.jn3_1 = this.gn3_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.jn3_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.kn3_1 = this.jn3_1.e();
            var tmp_2 = this;
            tmp_2.ln3_1 = this.in3_1;
            var tmp_3 = this;
            tmp_3.mn3_1 = this.kn3_1;
            var tmp_4 = this;
            var this_1 = this.dn3_1.tms_1;
            var context = this.mn3_1;
            var trigger = this_1.i5d();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.m5d(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).k5e();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.nn3_1 = tmp_7.i5e(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.nn3_1.g7l().ti1(this.en3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            this.in3_1 = this.ln3_1 + ARGUMENT | 0;
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.in3_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $addSessionCOROUTINE$4(_this__u8e3s4, person, endpointUrl, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wn3_1 = _this__u8e3s4;
    this.xn3_1 = person;
    this.yn3_1 = endpointUrl;
    this.zn3_1 = password;
  }
  protoOf($addSessionCOROUTINE$4).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            assertNotClosed(this.wn3_1);
            this.an4_1 = new Endpoint(this.yn3_1);
            var tmp_0 = this;
            var this_0 = this.wn3_1.tms_1;
            var context = this.an4_1;
            var trigger = this_0.i5d();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.m5d(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).k5e();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.bn4_1 = tmp_3.i5e(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 2);
            var tmp_5 = this;
            var this_1 = this.wn3_1.tms_1;
            var context_0 = this.an4_1;
            var trigger_0 = this_1.i5d();
            var tmp_6 = Companion_instance_0;
            var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.m5d(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).k5e();
            var tmp_9 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_5.cn4_1 = tmp_8.i5e(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), 1);
            if (!this.wn3_1.vms_1.t2().a1(this.an4_1)) {
              this.hd_1 = 1;
              suspendResult = addActiveEndpoint(this.wn3_1, this.an4_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            commitActiveEndpointsToPref(this.wn3_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp_10 = this;
            var this_2 = this.wn3_1.tms_1;
            var context_1 = this.an4_1;
            var trigger_1 = this_2.i5d();
            var tmp_11 = Companion_instance_0;
            var tmp_12 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_13 = get_direct(On(this_2, tmp_11.m5d(isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE(), context_1), trigger_1)).k5e();
            var tmp_14 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
            tmp_10.dn4_1 = tmp_13.i5e(isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE(), null);
            this.hd_1 = 3;
            suspendResult = withDoorTransactionAsync(this.bn4_1, VOID, UstadAccountManager$addSession$slambda_0(this.wn3_1, this.an4_1, this.xn3_1, this.zn3_1, this.dn4_1, this.bn4_1, this.cn4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp0_container = suspendResult;
            var userSession = tmp0_container.y6();
            var personPicture = tmp0_container.z6();
            return new UserSessionWithPersonAndEndpoint(userSession, this.xn3_1, this.an4_1, personPicture);
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $endSessionCOROUTINE$6(_this__u8e3s4, session, endStatus, endReason, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mn4_1 = _this__u8e3s4;
    this.nn4_1 = session;
    this.on4_1 = endStatus;
    this.pn4_1 = endReason;
  }
  protoOf($endSessionCOROUTINE$6).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.mn4_1.tms_1;
            var context = this.nn4_1.ymr_1;
            var trigger = this_0.i5d();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.m5d(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).k5e();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.qn4_1 = tmp_3.i5e(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 2);
            this.hd_1 = 1;
            suspendResult = this.qn4_1.g7l().ui1(this.nn4_1.wmr_1.ji2_1, this.on4_1, this.pn4_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (this.mn4_1.rn4().wmr_1.ji2_1.equals(this.nn4_1.wmr_1.ji2_1) ? this.mn4_1.rn4().ymr_1.equals(this.nn4_1.ymr_1) : false) {
              this.mn4_1.wmu(makeNewTempGuestSession(this.mn4_1, this.nn4_1.ymr_1.hmr_1, this.qn4_1));
            }

            this.hd_1 = 2;
            var tmp_5 = UstadAccountManager$endSession$lambda(this.nn4_1);
            suspendResult = this.mn4_1.sn4(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            if (ARGUMENT.c1()) {
              removeActiveEndpoint$default(this.mn4_1, this.nn4_1.ymr_1);
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $getSiteFromDbOrLoadFromHttpCOROUTINE$7(_this__u8e3s4, repo, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jmx_1 = _this__u8e3s4;
    this.kmx_1 = repo;
  }
  protoOf($getSiteFromDbOrLoadFromHttpCOROUTINE$7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.kmx_1;
            var tmp_2 = (isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : THROW_CCE()).c5p();
            tmp_0.lmx_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : THROW_CCE();
            this.hd_1 = 1;
            suspendResult = this.lmx_1.a7l().dh6(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.mmx_1 = suspendResult;
            if (this.mmx_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.kmx_1.a7l().dh6(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            if (suspendResult == null)
              throw IllegalStateException_init_$Create$('Internal error: no Site in database and could not fetch it from server');
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $startGuestSessionCOROUTINE$8(_this__u8e3s4, endpointUrl, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bn5_1 = _this__u8e3s4;
    this.cn5_1 = endpointUrl;
  }
  protoOf($startGuestSessionCOROUTINE$8).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.bn5_1.tms_1;
            var context = new Endpoint(this.cn5_1);
            var trigger = this_0.i5d();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var this_1 = On(this_0, tmp_1.m5d(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger);
            var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.dn5_1 = Instance(this_1, isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), 2).f5j(null, getLocalDelegateReference('repo', KProperty0, false, function () {
              return THROW_ISE();
            }));
            this.hd_1 = 1;
            var tmp_4 = startGuestSession$lambda(this.dn5_1);
            var this_2 = new Person();
            this_2.y9b_1 = null;
            this_2.z9b_1 = 'Guest';
            this_2.a9c_1 = 'User';
            var tmp_5 = this_2;
            tmp_5.l9c_1 = 2;
            suspendResult = insertPersonAndGroup(tmp_4, this_2, 1 | 16, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.en5_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.bn5_1, startGuestSession$lambda(this.dn5_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.bn5_1.wmz(this.en5_1, this.cn5_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var guestSession = suspendResult;
            this.bn5_1.wmu(guestSession);
            return guestSession;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UstadAccountManager(settings, di) {
    Companion_getInstance_21();
    this.sms_1 = settings;
    this.tms_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = this.tms_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.xms_1 = Instance(this_0, tmp$ret$0, null).f5j(this, httpClient$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = this.tms_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.yms_1 = Instance(this_1, tmp$ret$2, null).f5j(this, json$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = this.tms_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.zms_1 = Instance(this_2, tmp$ret$4, null).f5j(this, apiUrlConfig$factory());
    this.amt_1 = atomic$boolean$1(false);
    this.bmt_1 = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
    var tmp0_elvis_lhs = this.sms_1.nl8('accountmgr.activeendpoint');
    var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg(this).fn5_1 : tmp0_elvis_lhs;
    var currentEndpointStr = tmp1_elvis_lhs == null ? 'http://localhost/' : tmp1_elvis_lhs;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_3 = get_direct(this.tms_1);
    var context = new Endpoint(currentEndpointStr);
    var tmp_5 = this_3.k5e();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$7 = tmp_6.m5d(tmp$ret$6, context);
    var tmp_8 = tmp_5.h5e(tmp$ret$7).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var currentDb = tmp_8.i5e(tmp$ret$9, 1);
    var tmp2_safe_receiver = this.sms_1.nl8('accountmgr.activesession');
    var tmp_10;
    if (tmp2_safe_receiver == null) {
      tmp_10 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_4 = _get_json__d8whur(this);
      // Inline function 'kotlinx.serialization.serializer' call
      var this_5 = this_4.y4b();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_6 = serializer(this_5, createKType(getKClass(UserSessionWithPersonAndEndpoint), arrayOf([]), true));
      var tmp$ret$12 = isInterface(this_6, KSerializer) ? this_6 : THROW_CCE();
      tmp_10 = this_4.x4b(tmp$ret$12, tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp_10;
    var initUserSession = tmp3_elvis_lhs == null ? makeNewTempGuestSession(this, currentEndpointStr, currentDb) : tmp3_elvis_lhs;
    this.ums_1 = MutableStateFlow(initUserSession);
    var tmp4_safe_receiver = this.sms_1.nl8('accountmgr.endpointswithsessions');
    var tmp_11;
    if (tmp4_safe_receiver == null) {
      tmp_11 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      tmp_11 = _get_json__d8whur(this).x4b(ListSerializer(serializer_0(StringCompanionObject_instance)), tmp4_safe_receiver);
    }
    var tmp5_elvis_lhs = tmp_11;
    var initEndpoints = tmp5_elvis_lhs == null ? listOf_0(currentEndpointStr) : tmp5_elvis_lhs;
    var tmp_12 = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(initEndpoints, 10));
    var tmp0_iterator = initEndpoints.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      var tmp$ret$18 = new Endpoint(item);
      destination.i1(tmp$ret$18);
    }
    tmp_12.vms_1 = MutableStateFlow(destination);
    this.wms_1 = MutableStateFlow(listOf_0(initUserSession));
    launch(this.bmt_1, VOID, VOID, UstadAccountManager$slambda_0(this, null));
    launch(this.bmt_1, VOID, VOID, UstadAccountManager$slambda_2(this, null));
  }
  protoOf(UstadAccountManager).wmu = function (value) {
    this.ums_1.x1k(value);
    // Inline function 'kotlinx.serialization.encodeToString' call
    var this_0 = _get_json__d8whur(this);
    // Inline function 'kotlinx.serialization.serializer' call
    var this_1 = this_0.y4b();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(UserSessionWithPersonAndEndpoint), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var activeAccountJson = this_0.w4b(tmp$ret$1, value);
    // Inline function 'com.russhwolf.settings.set' call
    var this_3 = this.sms_1;
    var key = 'accountmgr.activesession';
    this_3.ml8(key, activeAccountJson);
    // Inline function 'com.russhwolf.settings.set' call
    var this_4 = this.sms_1;
    var key_0 = 'accountmgr.activeendpoint';
    var value_0 = value.ymr_1.hmr_1;
    this_4.ml8(key_0, value_0);
  };
  protoOf(UstadAccountManager).rn4 = function () {
    return this.ums_1.t2();
  };
  protoOf(UstadAccountManager).hn5 = function () {
    return asStateFlow(this.ums_1);
  };
  protoOf(UstadAccountManager).in5 = function () {
    return this.ums_1.t2().bms();
  };
  protoOf(UstadAccountManager).jn5 = function () {
    return asStateFlow(this.wms_1);
  };
  protoOf(UstadAccountManager).kn5 = function () {
    return this.ums_1.t2().ymr_1;
  };
  protoOf(UstadAccountManager).sn4 = function (endpointFilter, $completion) {
    var tmp = new $activeSessionsListCOROUTINE$2(this, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).ln5 = function (maxDateOfBirth, endpointFilter, $completion) {
    var tmp = new $activeSessionCountCOROUTINE$3(this, maxDateOfBirth, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).mn5 = function (maxDateOfBirth, endpointFilter, $completion, $super) {
    maxDateOfBirth = maxDateOfBirth === VOID ? new Long(0, 0) : maxDateOfBirth;
    var tmp;
    if (endpointFilter === VOID) {
      var tmp_0 = UstadAccountManager$activeSessionCount$lambda;
      tmp = new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(tmp_0);
    } else {
      tmp = endpointFilter;
    }
    endpointFilter = tmp;
    return $super === VOID ? this.ln5(maxDateOfBirth, endpointFilter, $completion) : $super.ln5.call(this, maxDateOfBirth, endpointFilter, $completion);
  };
  protoOf(UstadAccountManager).nn5 = function (person, password, endpointUrl, accountRegisterOptions, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$register$slambda_0(this, endpointUrl, accountRegisterOptions, person, password, null), $completion);
  };
  protoOf(UstadAccountManager).wmz = function (person, endpointUrl, password, $completion) {
    var tmp = new $addSessionCOROUTINE$4(this, person, endpointUrl, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).on5 = function (session, endStatus, endReason, $completion) {
    var tmp = new $endSessionCOROUTINE$6(this, session, endStatus, endReason, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).pn5 = function (session, endStatus, endReason, $completion, $super) {
    var tmp;
    if (endStatus === VOID) {
      tmp = 4;
    } else {
      tmp = endStatus;
    }
    endStatus = tmp;
    var tmp_0;
    if (endReason === VOID) {
      tmp_0 = 1;
    } else {
      tmp_0 = endReason;
    }
    endReason = tmp_0;
    return $super === VOID ? this.on5(session, endStatus, endReason, $completion) : $super.on5.call(this, session, endStatus, endReason, $completion);
  };
  protoOf(UstadAccountManager).qn5 = function (username, password, endpointUrl, maxDateOfBirth, dontSetCurrentSession, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$login$slambda_0(this, endpointUrl, username, password, maxDateOfBirth, dontSetCurrentSession, null), $completion);
  };
  protoOf(UstadAccountManager).rn5 = function (endpointUrl, $completion) {
    var tmp = new $startGuestSessionCOROUTINE$8(this, endpointUrl, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function httpClient$factory() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function httpClient$factory_0() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory_0() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory_0() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function Companion_4() {
    this.sn5_1 = 101;
  }
  var Companion_instance_52;
  function Companion_getInstance_22() {
    return Companion_instance_52;
  }
  function Companion_5() {
  }
  protoOf(Companion_5).s4x = function () {
    return AnchorSerializer_getInstance();
  };
  var Companion_instance_53;
  function Companion_getInstance_23() {
    return Companion_instance_53;
  }
  function Anchor(content, href) {
    content = content === VOID ? '' : content;
    href = href === VOID ? '' : href;
    this.tn5_1 = content;
    this.un5_1 = href;
  }
  function deserializeDynamic($this, reader) {
    var href = reader.r7j(null, 'href');
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Anchor(text, href == null ? '' : href);
  }
  function AnchorSerializer() {
    AnchorSerializer_instance = this;
    this.vn5_1 = buildClassSerialDescriptor('a', []);
  }
  protoOf(AnchorSerializer).v4a = function () {
    return this.vn5_1;
  };
  protoOf(AnchorSerializer).x4a = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic(this, decoder.hkg());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.vn5_1;
      var composite = decoder.n4e(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.AnchorSerializer.deserialize.<anonymous>' call
      var result = composite.a4f(AnchorSerializer_getInstance().vn5_1, 0, Companion_instance_53.s4x());
      composite.o4e(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(AnchorSerializer).wn5 = function (encoder, value) {
    encoder.e4g(Companion_instance_53.s4x(), value);
  };
  protoOf(AnchorSerializer).w4a = function (encoder, value) {
    return this.wn5(encoder, value instanceof Anchor ? value : THROW_CCE());
  };
  var AnchorSerializer_instance;
  function AnchorSerializer_getInstance() {
    if (AnchorSerializer_instance == null)
      new AnchorSerializer();
    return AnchorSerializer_instance;
  }
  function Companion_6() {
  }
  protoOf(Companion_6).s4x = function () {
    return BodySerializer_instance;
  };
  var Companion_instance_54;
  function Companion_getInstance_24() {
    return Companion_instance_54;
  }
  function Body(navigationElements) {
    this.xn5_1 = navigationElements;
  }
  function BodySerializer() {
  }
  protoOf(BodySerializer).v4a = function () {
    return buildClassSerialDescriptor('body', []);
  };
  protoOf(BodySerializer).x4a = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = this.yn5(decoder, decoder.hkg());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.v4a();
      var composite = decoder.n4e(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.BodySerializer.deserialize.<anonymous>' call
      var result = composite.a4f(BodySerializer_instance.v4a(), 0, Companion_instance_54.s4x());
      composite.o4e(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(BodySerializer).yn5 = function (decoder, reader) {
    var xml = this.zn5(decoder);
    // Inline function 'kotlin.collections.mutableListOf' call
    var navElementList = ArrayList_init_$Create$();
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = this.v4a();
    var composite = decoder.n4e(descriptor);
    while (!(reader.e().equals(EventType_END_ELEMENT_getInstance()) ? reader.dc().fka() === 'body' : false)) {
      if (reader.ok6().equals(EventType_START_ELEMENT_getInstance()) ? reader.gk6() === 'nav' : false) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = xml.ukk(Companion_instance_56.s4x(), reader);
        navElementList.i1(element);
      }
    }
    var result = Unit_instance;
    composite.o4e(descriptor);
    return new Body(toList(navElementList));
  };
  protoOf(BodySerializer).an6 = function (encoder, value) {
    encoder.e4g(Companion_instance_54.s4x(), value);
  };
  protoOf(BodySerializer).w4a = function (encoder, value) {
    return this.an6(encoder, value instanceof Body ? value : THROW_CCE());
  };
  protoOf(BodySerializer).zn5 = function (decoder) {
    return (isInterface(decoder, XmlInput) ? decoder : THROW_CCE()).qki();
  };
  var BodySerializer_instance;
  function BodySerializer_getInstance() {
    return BodySerializer_instance;
  }
  function Companion_7() {
  }
  var Companion_instance_55;
  function Companion_getInstance_25() {
    return Companion_instance_55;
  }
  function $serializer_2() {
    $serializer_instance_2 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.ListItem', this, 3);
    tmp0_serialDesc.y4l('anchor', true);
    tmp0_serialDesc.y4l('span', true);
    tmp0_serialDesc.y4l('orderedList', true);
    tmp0_serialDesc.a4m(new XmlSerialName('li', 'http://www.w3.org/1999/xhtml'));
    this.bn6_1 = tmp0_serialDesc;
  }
  protoOf($serializer_2).v4a = function () {
    return this.bn6_1;
  };
  protoOf($serializer_2).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(AnchorSerializer_getInstance()), get_nullable(SpanSerializer_getInstance()), get_nullable($serializer_getInstance_17())];
  };
  protoOf($serializer_2).x4a = function (decoder) {
    var tmp0_desc = this.bn6_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.n4e(tmp0_desc);
    if (tmp7_input.c4f()) {
      tmp4_local0 = tmp7_input.b4f(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.b4f(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.b4f(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.b4f(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.b4f(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.b4f(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.o4e(tmp0_desc);
    return ListItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_2).cn6 = function (encoder, value) {
    var tmp0_desc = this.bn6_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.dn6_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, AnchorSerializer_getInstance(), value.dn6_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.en6_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, SpanSerializer_getInstance(), value.en6_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.fn6_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, $serializer_getInstance_17(), value.fn6_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_2).w4a = function (encoder, value) {
    return this.cn6(encoder, value instanceof ListItem ? value : THROW_CCE());
  };
  var $serializer_instance_2;
  function $serializer_getInstance_14() {
    if ($serializer_instance_2 == null)
      new $serializer_2();
    return $serializer_instance_2;
  }
  function ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_14().bn6_1);
    }
    if (0 === (seen1 & 1))
      $this.dn6_1 = null;
    else
      $this.dn6_1 = anchor;
    if (0 === (seen1 & 2))
      $this.en6_1 = null;
    else
      $this.en6_1 = span;
    if (0 === (seen1 & 4))
      $this.fn6_1 = null;
    else
      $this.fn6_1 = orderedList;
    return $this;
  }
  function ListItem_init_$Create$(seen1, anchor, span, orderedList, serializationConstructorMarker) {
    return ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, objectCreate(protoOf(ListItem)));
  }
  function ListItem(anchor, span, orderedList) {
    anchor = anchor === VOID ? null : anchor;
    span = span === VOID ? null : span;
    orderedList = orderedList === VOID ? null : orderedList;
    this.dn6_1 = anchor;
    this.en6_1 = span;
    this.fn6_1 = orderedList;
  }
  function Companion_8() {
  }
  protoOf(Companion_8).s4x = function () {
    return $serializer_getInstance_15();
  };
  var Companion_instance_56;
  function Companion_getInstance_26() {
    return Companion_instance_56;
  }
  function $serializer_3() {
    $serializer_instance_3 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavElement', this, 2);
    tmp0_serialDesc.y4l('epubType', true);
    tmp0_serialDesc.z4l(new XmlSerialName('type', 'http://www.idpf.org/2007/ops'));
    tmp0_serialDesc.y4l('orderedList', false);
    tmp0_serialDesc.a4m(new XmlSerialName('nav', 'http://www.w3.org/1999/xhtml'));
    this.gn6_1 = tmp0_serialDesc;
  }
  protoOf($serializer_3).v4a = function () {
    return this.gn6_1;
  };
  protoOf($serializer_3).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), $serializer_getInstance_17()];
  };
  protoOf($serializer_3).x4a = function (decoder) {
    var tmp0_desc = this.gn6_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.z4e(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.z4e(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return NavElement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_3).hn6 = function (encoder, value) {
    var tmp0_desc = this.gn6_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.in6_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.in6_1);
    }
    tmp1_output.d4g(tmp0_desc, 1, $serializer_getInstance_17(), value.jn6_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_3).w4a = function (encoder, value) {
    return this.hn6(encoder, value instanceof NavElement ? value : THROW_CCE());
  };
  var $serializer_instance_3;
  function $serializer_getInstance_15() {
    if ($serializer_instance_3 == null)
      new $serializer_3();
    return $serializer_instance_3;
  }
  function NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_15().gn6_1);
    }
    if (0 === (seen1 & 1))
      $this.in6_1 = null;
    else
      $this.in6_1 = epubType;
    $this.jn6_1 = orderedList;
    return $this;
  }
  function NavElement_init_$Create$(seen1, epubType, orderedList, serializationConstructorMarker) {
    return NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, objectCreate(protoOf(NavElement)));
  }
  function NavElement() {
  }
  function Companion_9() {
    this.kn6_1 = 'http://www.w3.org/1999/xhtml';
    this.ln6_1 = 'http://www.idpf.org/2007/ops';
  }
  var Companion_instance_57;
  function Companion_getInstance_27() {
    return Companion_instance_57;
  }
  function $serializer_4() {
    $serializer_instance_4 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavigationDocument', this, 1);
    tmp0_serialDesc.y4l('bodyElement', false);
    tmp0_serialDesc.a4m(new XmlSerialName('html', 'http://www.w3.org/1999/xhtml'));
    this.mn6_1 = tmp0_serialDesc;
  }
  protoOf($serializer_4).v4a = function () {
    return this.mn6_1;
  };
  protoOf($serializer_4).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BodySerializer_instance];
  };
  protoOf($serializer_4).x4a = function (decoder) {
    var tmp0_desc = this.mn6_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return NavigationDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_4).nn6 = function (encoder, value) {
    var tmp0_desc = this.mn6_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, BodySerializer_instance, value.on6_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_4).w4a = function (encoder, value) {
    return this.nn6(encoder, value instanceof NavigationDocument ? value : THROW_CCE());
  };
  var $serializer_instance_4;
  function $serializer_getInstance_16() {
    if ($serializer_instance_4 == null)
      new $serializer_4();
    return $serializer_instance_4;
  }
  function NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_16().mn6_1);
    }
    $this.on6_1 = bodyElement;
    return $this;
  }
  function NavigationDocument_init_$Create$(seen1, bodyElement, serializationConstructorMarker) {
    return NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, objectCreate(protoOf(NavigationDocument)));
  }
  function NavigationDocument(bodyElement) {
    this.on6_1 = bodyElement;
  }
  function Companion_10() {
    Companion_instance_58 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.pn6_1 = [new ArrayListSerializer($serializer_getInstance_14())];
  }
  var Companion_instance_58;
  function Companion_getInstance_28() {
    if (Companion_instance_58 == null)
      new Companion_10();
    return Companion_instance_58;
  }
  function $serializer_5() {
    $serializer_instance_5 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.OrderedList', this, 1);
    tmp0_serialDesc.y4l('listItems', false);
    tmp0_serialDesc.a4m(new XmlSerialName('ol', 'http://www.w3.org/1999/xhtml'));
    this.qn6_1 = tmp0_serialDesc;
  }
  protoOf($serializer_5).v4a = function () {
    return this.qn6_1;
  };
  protoOf($serializer_5).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_28().pn6_1[0]];
  };
  protoOf($serializer_5).x4a = function (decoder) {
    var tmp0_desc = this.qn6_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    var tmp6_cached = Companion_getInstance_28().pn6_1;
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return OrderedList_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_5).rn6 = function (encoder, value) {
    var tmp0_desc = this.qn6_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_28().pn6_1;
    tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.sn6_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_5).w4a = function (encoder, value) {
    return this.rn6(encoder, value instanceof OrderedList ? value : THROW_CCE());
  };
  var $serializer_instance_5;
  function $serializer_getInstance_17() {
    if ($serializer_instance_5 == null)
      new $serializer_5();
    return $serializer_instance_5;
  }
  function OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_17().qn6_1);
    }
    $this.sn6_1 = listItems;
    return $this;
  }
  function OrderedList_init_$Create$(seen1, listItems, serializationConstructorMarker) {
    return OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, objectCreate(protoOf(OrderedList)));
  }
  function OrderedList() {
  }
  function Companion_11() {
  }
  protoOf(Companion_11).s4x = function () {
    return SpanSerializer_getInstance();
  };
  var Companion_instance_59;
  function Companion_getInstance_29() {
    return Companion_instance_59;
  }
  function Span(content) {
    content = content === VOID ? '' : content;
    this.tn6_1 = content;
  }
  function deserializeDynamic_0($this, reader) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Span(text);
  }
  function SpanSerializer() {
    SpanSerializer_instance = this;
    this.un6_1 = buildClassSerialDescriptor('span', []);
  }
  protoOf(SpanSerializer).v4a = function () {
    return this.un6_1;
  };
  protoOf(SpanSerializer).x4a = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic_0(this, decoder.hkg());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = AnchorSerializer_getInstance().vn5_1;
      var composite = decoder.n4e(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.SpanSerializer.deserialize.<anonymous>' call
      var result = composite.a4f(AnchorSerializer_getInstance().vn5_1, 0, Companion_instance_59.s4x());
      composite.o4e(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(SpanSerializer).vn6 = function (encoder, value) {
    encoder.e4g(Companion_instance_59.s4x(), value);
  };
  protoOf(SpanSerializer).w4a = function (encoder, value) {
    return this.vn6(encoder, value instanceof Span ? value : THROW_CCE());
  };
  var SpanSerializer_instance;
  function SpanSerializer_getInstance() {
    if (SpanSerializer_instance == null)
      new SpanSerializer();
    return SpanSerializer_instance;
  }
  function $serializer_6() {
    $serializer_instance_6 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Content', this, 2);
    tmp0_serialDesc.y4l('id', true);
    tmp0_serialDesc.y4l('src', false);
    tmp0_serialDesc.a4m(new XmlSerialName('content', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.wn6_1 = tmp0_serialDesc;
  }
  protoOf($serializer_6).v4a = function () {
    return this.wn6_1;
  };
  protoOf($serializer_6).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_6).x4a = function (decoder) {
    var tmp0_desc = this.wn6_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return Content_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_6).xn6 = function (encoder, value) {
    var tmp0_desc = this.wn6_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.yn6_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.yn6_1);
    }
    tmp1_output.b4g(tmp0_desc, 1, value.zn6_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_6).w4a = function (encoder, value) {
    return this.xn6(encoder, value instanceof Content ? value : THROW_CCE());
  };
  var $serializer_instance_6;
  function $serializer_getInstance_18() {
    if ($serializer_instance_6 == null)
      new $serializer_6();
    return $serializer_instance_6;
  }
  function Content_init_$Init$(seen1, id, src, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_18().wn6_1);
    }
    if (0 === (seen1 & 1))
      $this.yn6_1 = null;
    else
      $this.yn6_1 = id;
    $this.zn6_1 = src;
    return $this;
  }
  function Content_init_$Create$(seen1, id, src, serializationConstructorMarker) {
    return Content_init_$Init$(seen1, id, src, serializationConstructorMarker, objectCreate(protoOf(Content)));
  }
  function Content() {
  }
  function Companion_12() {
    Companion_instance_60 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.an7_1 = [new ArrayListSerializer($serializer_getInstance_25())];
  }
  var Companion_instance_60;
  function Companion_getInstance_30() {
    if (Companion_instance_60 == null)
      new Companion_12();
    return Companion_instance_60;
  }
  function $serializer_7() {
    $serializer_instance_7 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.DocTitle', this, 1);
    tmp0_serialDesc.y4l('texts', false);
    tmp0_serialDesc.a4m(new XmlSerialName('docTitle', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.bn7_1 = tmp0_serialDesc;
  }
  protoOf($serializer_7).v4a = function () {
    return this.bn7_1;
  };
  protoOf($serializer_7).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_30().an7_1[0]];
  };
  protoOf($serializer_7).x4a = function (decoder) {
    var tmp0_desc = this.bn7_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    var tmp6_cached = Companion_getInstance_30().an7_1;
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return DocTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_7).cn7 = function (encoder, value) {
    var tmp0_desc = this.bn7_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_30().an7_1;
    tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.dn7_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_7).w4a = function (encoder, value) {
    return this.cn7(encoder, value instanceof DocTitle ? value : THROW_CCE());
  };
  var $serializer_instance_7;
  function $serializer_getInstance_19() {
    if ($serializer_instance_7 == null)
      new $serializer_7();
    return $serializer_instance_7;
  }
  function DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_19().bn7_1);
    }
    $this.dn7_1 = texts;
    return $this;
  }
  function DocTitle_init_$Create$(seen1, texts, serializationConstructorMarker) {
    return DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, objectCreate(protoOf(DocTitle)));
  }
  function DocTitle() {
  }
  function Companion_13() {
    Companion_instance_61 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.en7_1 = [new ArrayListSerializer($serializer_getInstance_35())];
  }
  var Companion_instance_61;
  function Companion_getInstance_31() {
    if (Companion_instance_61 == null)
      new Companion_13();
    return Companion_instance_61;
  }
  function $serializer_8() {
    $serializer_instance_8 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Head', this, 1);
    tmp0_serialDesc.y4l('metadata', true);
    tmp0_serialDesc.a4m(new XmlSerialName('head', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.fn7_1 = tmp0_serialDesc;
  }
  protoOf($serializer_8).v4a = function () {
    return this.fn7_1;
  };
  protoOf($serializer_8).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_31().en7_1[0]];
  };
  protoOf($serializer_8).x4a = function (decoder) {
    var tmp0_desc = this.fn7_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    var tmp6_cached = Companion_getInstance_31().en7_1;
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return Head_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_8).gn7 = function (encoder, value) {
    var tmp0_desc = this.fn7_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_31().en7_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !equals(value.hn7_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.hn7_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_8).w4a = function (encoder, value) {
    return this.gn7(encoder, value instanceof Head ? value : THROW_CCE());
  };
  var $serializer_instance_8;
  function $serializer_getInstance_20() {
    if ($serializer_instance_8 == null)
      new $serializer_8();
    return $serializer_instance_8;
  }
  function Head_init_$Init$(seen1, metadata, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_20().fn7_1);
    }
    if (0 === (seen1 & 1))
      $this.hn7_1 = emptyList();
    else
      $this.hn7_1 = metadata;
    return $this;
  }
  function Head_init_$Create$(seen1, metadata, serializationConstructorMarker) {
    return Head_init_$Init$(seen1, metadata, serializationConstructorMarker, objectCreate(protoOf(Head)));
  }
  function Head(metadata) {
    Companion_getInstance_31();
    metadata = metadata === VOID ? emptyList() : metadata;
    this.hn7_1 = metadata;
  }
  function $serializer_9() {
    $serializer_instance_9 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavLabel', this, 1);
    tmp0_serialDesc.y4l('text', false);
    tmp0_serialDesc.a4m(new XmlSerialName('navLabel', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.in7_1 = tmp0_serialDesc;
  }
  protoOf($serializer_9).v4a = function () {
    return this.in7_1;
  };
  protoOf($serializer_9).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_25()];
  };
  protoOf($serializer_9).x4a = function (decoder) {
    var tmp0_desc = this.in7_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return NavLabel_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_9).jn7 = function (encoder, value) {
    var tmp0_desc = this.in7_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, $serializer_getInstance_25(), value.kn7_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_9).w4a = function (encoder, value) {
    return this.jn7(encoder, value instanceof NavLabel ? value : THROW_CCE());
  };
  var $serializer_instance_9;
  function $serializer_getInstance_21() {
    if ($serializer_instance_9 == null)
      new $serializer_9();
    return $serializer_instance_9;
  }
  function NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_21().in7_1);
    }
    $this.kn7_1 = text;
    return $this;
  }
  function NavLabel_init_$Create$(seen1, text, serializationConstructorMarker) {
    return NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, objectCreate(protoOf(NavLabel)));
  }
  function NavLabel() {
  }
  function Companion_14() {
    Companion_instance_62 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ln7_1 = [new ArrayListSerializer($serializer_getInstance_23())];
  }
  var Companion_instance_62;
  function Companion_getInstance_32() {
    if (Companion_instance_62 == null)
      new Companion_14();
    return Companion_instance_62;
  }
  function $serializer_10() {
    $serializer_instance_10 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavMap', this, 1);
    tmp0_serialDesc.y4l('navPoints', false);
    tmp0_serialDesc.a4m(new XmlSerialName('navMap', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.mn7_1 = tmp0_serialDesc;
  }
  protoOf($serializer_10).v4a = function () {
    return this.mn7_1;
  };
  protoOf($serializer_10).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_32().ln7_1[0]];
  };
  protoOf($serializer_10).x4a = function (decoder) {
    var tmp0_desc = this.mn7_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    var tmp6_cached = Companion_getInstance_32().ln7_1;
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return NavMap_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_10).nn7 = function (encoder, value) {
    var tmp0_desc = this.mn7_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_32().ln7_1;
    tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.on7_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_10).w4a = function (encoder, value) {
    return this.nn7(encoder, value instanceof NavMap ? value : THROW_CCE());
  };
  var $serializer_instance_10;
  function $serializer_getInstance_22() {
    if ($serializer_instance_10 == null)
      new $serializer_10();
    return $serializer_instance_10;
  }
  function NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_22().mn7_1);
    }
    $this.on7_1 = navPoints;
    return $this;
  }
  function NavMap_init_$Create$(seen1, navPoints, serializationConstructorMarker) {
    return NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, objectCreate(protoOf(NavMap)));
  }
  function NavMap() {
  }
  function Companion_15() {
    Companion_instance_63 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.pn7_1 = [new ArrayListSerializer($serializer_getInstance_21()), null, null, null];
  }
  var Companion_instance_63;
  function Companion_getInstance_33() {
    if (Companion_instance_63 == null)
      new Companion_15();
    return Companion_instance_63;
  }
  function $serializer_11() {
    $serializer_instance_11 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavPoint', this, 4);
    tmp0_serialDesc.y4l('navLabels', false);
    tmp0_serialDesc.y4l('content', false);
    tmp0_serialDesc.y4l('id', false);
    tmp0_serialDesc.y4l('childPoints', false);
    tmp0_serialDesc.a4m(new XmlSerialName('navPoint', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.qn7_1 = tmp0_serialDesc;
  }
  protoOf($serializer_11).v4a = function () {
    return this.qn7_1;
  };
  protoOf($serializer_11).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_33().pn7_1[0], $serializer_getInstance_18(), StringSerializer_getInstance(), new ArrayListSerializer($serializer_getInstance_23())];
  };
  protoOf($serializer_11).x4a = function (decoder) {
    var tmp0_desc = this.qn7_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.n4e(tmp0_desc);
    var tmp9_cached = Companion_getInstance_33().pn7_1;
    if (tmp8_input.c4f()) {
      tmp4_local0 = tmp8_input.z4e(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.z4e(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.x4e(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.z4e(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.z4e(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.z4e(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.x4e(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.z4e(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.o4e(tmp0_desc);
    return NavPoint_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_11).rn7 = function (encoder, value) {
    var tmp0_desc = this.qn7_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_33().pn7_1;
    tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.sn7_1);
    tmp1_output.d4g(tmp0_desc, 1, $serializer_getInstance_18(), value.tn7_1);
    tmp1_output.b4g(tmp0_desc, 2, value.un7_1);
    tmp1_output.d4g(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), value.vn7_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_11).w4a = function (encoder, value) {
    return this.rn7(encoder, value instanceof NavPoint ? value : THROW_CCE());
  };
  var $serializer_instance_11;
  function $serializer_getInstance_23() {
    if ($serializer_instance_11 == null)
      new $serializer_11();
    return $serializer_instance_11;
  }
  function NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_23().qn7_1);
    }
    $this.sn7_1 = navLabels;
    $this.tn7_1 = content;
    $this.un7_1 = id;
    $this.vn7_1 = childPoints;
    return $this;
  }
  function NavPoint_init_$Create$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker) {
    return NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, objectCreate(protoOf(NavPoint)));
  }
  function NavPoint() {
  }
  function Companion_16() {
    this.wn7_1 = 'http://www.daisy.org/z3986/2005/ncx/';
    this.xn7_1 = 'application/x-dtbncx+xml';
  }
  var Companion_instance_64;
  function Companion_getInstance_34() {
    return Companion_instance_64;
  }
  function $serializer_12() {
    $serializer_instance_12 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NcxDocument', this, 3);
    tmp0_serialDesc.y4l('head', false);
    tmp0_serialDesc.y4l('docTitle', false);
    tmp0_serialDesc.y4l('navMap', false);
    tmp0_serialDesc.a4m(new XmlSerialName('ncx', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.yn7_1 = tmp0_serialDesc;
  }
  protoOf($serializer_12).v4a = function () {
    return this.yn7_1;
  };
  protoOf($serializer_12).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_20(), $serializer_getInstance_19(), $serializer_getInstance_22()];
  };
  protoOf($serializer_12).x4a = function (decoder) {
    var tmp0_desc = this.yn7_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.n4e(tmp0_desc);
    if (tmp7_input.c4f()) {
      tmp4_local0 = tmp7_input.z4e(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.z4e(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.z4e(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.z4e(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.z4e(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.z4e(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.o4e(tmp0_desc);
    return NcxDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_12).zn7 = function (encoder, value) {
    var tmp0_desc = this.yn7_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, $serializer_getInstance_20(), value.an8_1);
    tmp1_output.d4g(tmp0_desc, 1, $serializer_getInstance_19(), value.bn8_1);
    tmp1_output.d4g(tmp0_desc, 2, $serializer_getInstance_22(), value.cn8_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_12).w4a = function (encoder, value) {
    return this.zn7(encoder, value instanceof NcxDocument ? value : THROW_CCE());
  };
  var $serializer_instance_12;
  function $serializer_getInstance_24() {
    if ($serializer_instance_12 == null)
      new $serializer_12();
    return $serializer_instance_12;
  }
  function NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_24().yn7_1);
    }
    $this.an8_1 = head;
    $this.bn8_1 = docTitle;
    $this.cn8_1 = navMap;
    return $this;
  }
  function NcxDocument_init_$Create$(seen1, head, docTitle, navMap, serializationConstructorMarker) {
    return NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, objectCreate(protoOf(NcxDocument)));
  }
  function NcxDocument(head, docTitle, navMap) {
    this.an8_1 = head;
    this.bn8_1 = docTitle;
    this.cn8_1 = navMap;
  }
  function Companion_17() {
  }
  var Companion_instance_65;
  function Companion_getInstance_35() {
    return Companion_instance_65;
  }
  function $serializer_13() {
    $serializer_instance_13 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Text', this, 1);
    tmp0_serialDesc.y4l('content', true);
    tmp0_serialDesc.z4l(new XmlValue());
    tmp0_serialDesc.a4m(new XmlSerialName('text', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.dn8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_13).v4a = function () {
    return this.dn8_1;
  };
  protoOf($serializer_13).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_13).x4a = function (decoder) {
    var tmp0_desc = this.dn8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return Text_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_13).en8 = function (encoder, value) {
    var tmp0_desc = this.dn8_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.fn8_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 0, value.fn8_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_13).w4a = function (encoder, value) {
    return this.en8(encoder, value instanceof Text ? value : THROW_CCE());
  };
  var $serializer_instance_13;
  function $serializer_getInstance_25() {
    if ($serializer_instance_13 == null)
      new $serializer_13();
    return $serializer_instance_13;
  }
  function Text_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_25().dn8_1);
    }
    if (0 === (seen1 & 1))
      $this.fn8_1 = '';
    else
      $this.fn8_1 = content;
    return $this;
  }
  function Text_init_$Create$(seen1, content, serializationConstructorMarker) {
    return Text_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(Text)));
  }
  function Text(content) {
    content = content === VOID ? '' : content;
    this.fn8_1 = content;
  }
  function Companion_18() {
  }
  var Companion_instance_66;
  function Companion_getInstance_36() {
    return Companion_instance_66;
  }
  function $serializer_14() {
    $serializer_instance_14 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcCreator', this, 2);
    tmp0_serialDesc.y4l('id', true);
    tmp0_serialDesc.y4l('content', true);
    tmp0_serialDesc.z4l(new XmlValue());
    tmp0_serialDesc.a4m(new XmlSerialName('creator', 'http://purl.org/dc/elements/1.1/'));
    this.gn8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_14).v4a = function () {
    return this.gn8_1;
  };
  protoOf($serializer_14).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_14).x4a = function (decoder) {
    var tmp0_desc = this.gn8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return DcCreator_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_14).hn8 = function (encoder, value) {
    var tmp0_desc = this.gn8_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.in8_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.in8_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.jn8_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 1, value.jn8_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_14).w4a = function (encoder, value) {
    return this.hn8(encoder, value instanceof DcCreator ? value : THROW_CCE());
  };
  var $serializer_instance_14;
  function $serializer_getInstance_26() {
    if ($serializer_instance_14 == null)
      new $serializer_14();
    return $serializer_instance_14;
  }
  function DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_26().gn8_1);
    }
    if (0 === (seen1 & 1))
      $this.in8_1 = null;
    else
      $this.in8_1 = id;
    if (0 === (seen1 & 2))
      $this.jn8_1 = '';
    else
      $this.jn8_1 = content;
    return $this;
  }
  function DcCreator_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcCreator)));
  }
  function DcCreator(id, content) {
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.in8_1 = id;
    this.jn8_1 = content;
  }
  function Companion_19() {
  }
  var Companion_instance_67;
  function Companion_getInstance_37() {
    return Companion_instance_67;
  }
  function $serializer_15() {
    $serializer_instance_15 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcDescription', this, 2);
    tmp0_serialDesc.y4l('lang', true);
    tmp0_serialDesc.y4l('content', true);
    tmp0_serialDesc.z4l(new XmlValue());
    tmp0_serialDesc.a4m(new XmlSerialName('description', 'http://purl.org/dc/elements/1.1/'));
    this.kn8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_15).v4a = function () {
    return this.kn8_1;
  };
  protoOf($serializer_15).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_15).x4a = function (decoder) {
    var tmp0_desc = this.kn8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return DcDescription_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_15).ln8 = function (encoder, value) {
    var tmp0_desc = this.kn8_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.mn8_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.mn8_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.nn8_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 1, value.nn8_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_15).w4a = function (encoder, value) {
    return this.ln8(encoder, value instanceof DcDescription ? value : THROW_CCE());
  };
  var $serializer_instance_15;
  function $serializer_getInstance_27() {
    if ($serializer_instance_15 == null)
      new $serializer_15();
    return $serializer_instance_15;
  }
  function DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_27().kn8_1);
    }
    if (0 === (seen1 & 1))
      $this.mn8_1 = null;
    else
      $this.mn8_1 = lang;
    if (0 === (seen1 & 2))
      $this.nn8_1 = '';
    else
      $this.nn8_1 = content;
    return $this;
  }
  function DcDescription_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcDescription)));
  }
  function DcDescription(lang, content) {
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.mn8_1 = lang;
    this.nn8_1 = content;
  }
  function Companion_20() {
  }
  var Companion_instance_68;
  function Companion_getInstance_38() {
    return Companion_instance_68;
  }
  function $serializer_16() {
    $serializer_instance_16 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcIdentifier', this, 2);
    tmp0_serialDesc.y4l('id', true);
    tmp0_serialDesc.y4l('content', true);
    tmp0_serialDesc.z4l(new XmlValue());
    tmp0_serialDesc.a4m(new XmlSerialName('identifier', 'http://purl.org/dc/elements/1.1/'));
    this.on8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_16).v4a = function () {
    return this.on8_1;
  };
  protoOf($serializer_16).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_16).x4a = function (decoder) {
    var tmp0_desc = this.on8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return DcIdentifier_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_16).pn8 = function (encoder, value) {
    var tmp0_desc = this.on8_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.qn8_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.qn8_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.rn8_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 1, value.rn8_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_16).w4a = function (encoder, value) {
    return this.pn8(encoder, value instanceof DcIdentifier ? value : THROW_CCE());
  };
  var $serializer_instance_16;
  function $serializer_getInstance_28() {
    if ($serializer_instance_16 == null)
      new $serializer_16();
    return $serializer_instance_16;
  }
  function DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_28().on8_1);
    }
    if (0 === (seen1 & 1))
      $this.qn8_1 = null;
    else
      $this.qn8_1 = id;
    if (0 === (seen1 & 2))
      $this.rn8_1 = '';
    else
      $this.rn8_1 = content;
    return $this;
  }
  function DcIdentifier_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcIdentifier)));
  }
  function DcIdentifier(id, content) {
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.qn8_1 = id;
    this.rn8_1 = content;
  }
  function $serializer_17() {
    $serializer_instance_17 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcLanguage', this, 1);
    tmp0_serialDesc.y4l('content', false);
    tmp0_serialDesc.z4l(new XmlValue());
    tmp0_serialDesc.a4m(new XmlSerialName('language', 'http://purl.org/dc/elements/1.1/'));
    this.sn8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_17).v4a = function () {
    return this.sn8_1;
  };
  protoOf($serializer_17).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_17).x4a = function (decoder) {
    var tmp0_desc = this.sn8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return DcLanguage_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_17).tn8 = function (encoder, value) {
    var tmp0_desc = this.sn8_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.b4g(tmp0_desc, 0, value.un8_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_17).w4a = function (encoder, value) {
    return this.tn8(encoder, value instanceof DcLanguage ? value : THROW_CCE());
  };
  var $serializer_instance_17;
  function $serializer_getInstance_29() {
    if ($serializer_instance_17 == null)
      new $serializer_17();
    return $serializer_instance_17;
  }
  function DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_29().sn8_1);
    }
    $this.un8_1 = content;
    return $this;
  }
  function DcLanguage_init_$Create$(seen1, content, serializationConstructorMarker) {
    return DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(DcLanguage)));
  }
  function DcLanguage() {
  }
  function Companion_21() {
  }
  var Companion_instance_69;
  function Companion_getInstance_39() {
    return Companion_instance_69;
  }
  function $serializer_18() {
    $serializer_instance_18 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcTitle', this, 2);
    tmp0_serialDesc.y4l('lang', true);
    tmp0_serialDesc.z4l(new XmlSerialName(VOID, VOID, 'xml'));
    tmp0_serialDesc.y4l('content', true);
    tmp0_serialDesc.z4l(new XmlValue());
    tmp0_serialDesc.a4m(new XmlSerialName('title', 'http://purl.org/dc/elements/1.1/'));
    this.vn8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_18).v4a = function () {
    return this.vn8_1;
  };
  protoOf($serializer_18).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_18).x4a = function (decoder) {
    var tmp0_desc = this.vn8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return DcTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_18).wn8 = function (encoder, value) {
    var tmp0_desc = this.vn8_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.xn8_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.xn8_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.yn8_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 1, value.yn8_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_18).w4a = function (encoder, value) {
    return this.wn8(encoder, value instanceof DcTitle ? value : THROW_CCE());
  };
  var $serializer_instance_18;
  function $serializer_getInstance_30() {
    if ($serializer_instance_18 == null)
      new $serializer_18();
    return $serializer_instance_18;
  }
  function DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_30().vn8_1);
    }
    if (0 === (seen1 & 1))
      $this.xn8_1 = null;
    else
      $this.xn8_1 = lang;
    if (0 === (seen1 & 2))
      $this.yn8_1 = '';
    else
      $this.yn8_1 = content;
    return $this;
  }
  function DcTitle_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcTitle)));
  }
  function DcTitle(lang, content) {
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.xn8_1 = lang;
    this.yn8_1 = content;
  }
  function $serializer_19() {
    $serializer_instance_19 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Item', this, 4);
    tmp0_serialDesc.y4l('id', false);
    tmp0_serialDesc.y4l('href', false);
    tmp0_serialDesc.y4l('properties', true);
    tmp0_serialDesc.y4l('mediaType', false);
    tmp0_serialDesc.z4l(new XmlSerialName('media-type'));
    tmp0_serialDesc.a4m(new XmlSerialName('item', 'http://www.idpf.org/2007/opf'));
    this.zn8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_19).v4a = function () {
    return this.zn8_1;
  };
  protoOf($serializer_19).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_19).x4a = function (decoder) {
    var tmp0_desc = this.zn8_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.n4e(tmp0_desc);
    if (tmp8_input.c4f()) {
      tmp4_local0 = tmp8_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.x4e(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.x4e(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.o4e(tmp0_desc);
    return Item_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_19).an9 = function (encoder, value) {
    var tmp0_desc = this.zn8_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.b4g(tmp0_desc, 0, value.bn9_1);
    tmp1_output.b4g(tmp0_desc, 1, value.cn9_1);
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.dn9_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.dn9_1);
    }
    tmp1_output.b4g(tmp0_desc, 3, value.en9_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_19).w4a = function (encoder, value) {
    return this.an9(encoder, value instanceof Item ? value : THROW_CCE());
  };
  var $serializer_instance_19;
  function $serializer_getInstance_31() {
    if ($serializer_instance_19 == null)
      new $serializer_19();
    return $serializer_instance_19;
  }
  function Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, $this) {
    if (!(11 === (11 & seen1))) {
      throwMissingFieldException(seen1, 11, $serializer_getInstance_31().zn8_1);
    }
    $this.bn9_1 = id;
    $this.cn9_1 = href;
    if (0 === (seen1 & 4))
      $this.dn9_1 = null;
    else
      $this.dn9_1 = properties;
    $this.en9_1 = mediaType;
    return $this;
  }
  function Item_init_$Create$(seen1, id, href, properties, mediaType, serializationConstructorMarker) {
    return Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, objectCreate(protoOf(Item)));
  }
  function Item() {
  }
  function Companion_22() {
  }
  var Companion_instance_70;
  function Companion_getInstance_40() {
    return Companion_instance_70;
  }
  function $serializer_20() {
    $serializer_instance_20 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.ItemRef', this, 1);
    tmp0_serialDesc.y4l('idRef', true);
    tmp0_serialDesc.z4l(new XmlSerialName('idref'));
    tmp0_serialDesc.a4m(new XmlSerialName('itemref', 'http://www.idpf.org/2007/opf'));
    this.fn9_1 = tmp0_serialDesc;
  }
  protoOf($serializer_20).v4a = function () {
    return this.fn9_1;
  };
  protoOf($serializer_20).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_20).x4a = function (decoder) {
    var tmp0_desc = this.fn9_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return ItemRef_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_20).gn9 = function (encoder, value) {
    var tmp0_desc = this.fn9_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.hn9_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 0, value.hn9_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_20).w4a = function (encoder, value) {
    return this.gn9(encoder, value instanceof ItemRef ? value : THROW_CCE());
  };
  var $serializer_instance_20;
  function $serializer_getInstance_32() {
    if ($serializer_instance_20 == null)
      new $serializer_20();
    return $serializer_instance_20;
  }
  function ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_32().fn9_1);
    }
    if (0 === (seen1 & 1))
      $this.hn9_1 = '';
    else
      $this.hn9_1 = idRef;
    return $this;
  }
  function ItemRef_init_$Create$(seen1, idRef, serializationConstructorMarker) {
    return ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, objectCreate(protoOf(ItemRef)));
  }
  function ItemRef(idRef) {
    idRef = idRef === VOID ? '' : idRef;
    this.hn9_1 = idRef;
  }
  function Companion_23() {
    Companion_instance_71 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.in9_1 = [new ArrayListSerializer($serializer_getInstance_31())];
  }
  var Companion_instance_71;
  function Companion_getInstance_41() {
    if (Companion_instance_71 == null)
      new Companion_23();
    return Companion_instance_71;
  }
  function $serializer_21() {
    $serializer_instance_21 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Manifest', this, 1);
    tmp0_serialDesc.y4l('items', true);
    tmp0_serialDesc.a4m(new XmlSerialName('manifest', 'http://www.idpf.org/2007/opf'));
    this.jn9_1 = tmp0_serialDesc;
  }
  protoOf($serializer_21).v4a = function () {
    return this.jn9_1;
  };
  protoOf($serializer_21).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_41().in9_1[0]];
  };
  protoOf($serializer_21).x4a = function (decoder) {
    var tmp0_desc = this.jn9_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    var tmp6_cached = Companion_getInstance_41().in9_1;
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return Manifest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_21).kn9 = function (encoder, value) {
    var tmp0_desc = this.jn9_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_41().in9_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !equals(value.ln9_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.ln9_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_21).w4a = function (encoder, value) {
    return this.kn9(encoder, value instanceof Manifest ? value : THROW_CCE());
  };
  var $serializer_instance_21;
  function $serializer_getInstance_33() {
    if ($serializer_instance_21 == null)
      new $serializer_21();
    return $serializer_instance_21;
  }
  function Manifest_init_$Init$(seen1, items, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_33().jn9_1);
    }
    if (0 === (seen1 & 1))
      $this.ln9_1 = emptyList();
    else
      $this.ln9_1 = items;
    return $this;
  }
  function Manifest_init_$Create$(seen1, items, serializationConstructorMarker) {
    return Manifest_init_$Init$(seen1, items, serializationConstructorMarker, objectCreate(protoOf(Manifest)));
  }
  function Manifest(items) {
    Companion_getInstance_41();
    items = items === VOID ? emptyList() : items;
    this.ln9_1 = items;
  }
  function Companion_24() {
  }
  var Companion_instance_72;
  function Companion_getInstance_42() {
    return Companion_instance_72;
  }
  function $serializer_22() {
    $serializer_instance_22 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Meta', this, 2);
    tmp0_serialDesc.y4l('name', true);
    tmp0_serialDesc.y4l('content', true);
    tmp0_serialDesc.a4m(new XmlSerialName('meta', 'http://www.idpf.org/2007/opf'));
    this.mn9_1 = tmp0_serialDesc;
  }
  protoOf($serializer_22).v4a = function () {
    return this.mn9_1;
  };
  protoOf($serializer_22).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_22).x4a = function (decoder) {
    var tmp0_desc = this.mn9_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return Meta_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_22).nn9 = function (encoder, value) {
    var tmp0_desc = this.mn9_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.on9_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.on9_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.pn9_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, StringSerializer_getInstance(), value.pn9_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_22).w4a = function (encoder, value) {
    return this.nn9(encoder, value instanceof Meta ? value : THROW_CCE());
  };
  var $serializer_instance_22;
  function $serializer_getInstance_34() {
    if ($serializer_instance_22 == null)
      new $serializer_22();
    return $serializer_instance_22;
  }
  function Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_34().mn9_1);
    }
    if (0 === (seen1 & 1))
      $this.on9_1 = null;
    else
      $this.on9_1 = name;
    if (0 === (seen1 & 2))
      $this.pn9_1 = null;
    else
      $this.pn9_1 = content;
    return $this;
  }
  function Meta_init_$Create$(seen1, name, content, serializationConstructorMarker) {
    return Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, objectCreate(protoOf(Meta)));
  }
  function Meta(name, content) {
    name = name === VOID ? null : name;
    content = content === VOID ? null : content;
    this.on9_1 = name;
    this.pn9_1 = content;
  }
  function Companion_25() {
    Companion_instance_73 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qn9_1 = [new ArrayListSerializer($serializer_getInstance_30()), new ArrayListSerializer($serializer_getInstance_26()), new ArrayListSerializer($serializer_getInstance_29()), new ArrayListSerializer($serializer_getInstance_27()), new ArrayListSerializer($serializer_getInstance_28()), new ArrayListSerializer($serializer_getInstance_34())];
  }
  var Companion_instance_73;
  function Companion_getInstance_43() {
    if (Companion_instance_73 == null)
      new Companion_25();
    return Companion_instance_73;
  }
  function $serializer_23() {
    $serializer_instance_23 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Metadata', this, 6);
    tmp0_serialDesc.y4l('titles', true);
    tmp0_serialDesc.y4l('creators', true);
    tmp0_serialDesc.y4l('languages', true);
    tmp0_serialDesc.y4l('descriptions', true);
    tmp0_serialDesc.y4l('identifiers', true);
    tmp0_serialDesc.y4l('metas', true);
    tmp0_serialDesc.a4m(new XmlSerialName('metadata', 'http://www.idpf.org/2007/opf'));
    this.rn9_1 = tmp0_serialDesc;
  }
  protoOf($serializer_23).v4a = function () {
    return this.rn9_1;
  };
  protoOf($serializer_23).p4m = function () {
    var tmp0_cached = Companion_getInstance_43().qn9_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [tmp0_cached[0], tmp0_cached[1], tmp0_cached[2], tmp0_cached[3], tmp0_cached[4], tmp0_cached[5]];
  };
  protoOf($serializer_23).x4a = function (decoder) {
    var tmp0_desc = this.rn9_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.n4e(tmp0_desc);
    var tmp11_cached = Companion_getInstance_43().qn9_1;
    if (tmp10_input.c4f()) {
      tmp4_local0 = tmp10_input.z4e(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.z4e(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.z4e(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.z4e(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.z4e(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.z4e(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.z4e(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.z4e(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.z4e(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.z4e(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.z4e(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.z4e(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.o4e(tmp0_desc);
    return Metadata_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_23).sn9 = function (encoder, value) {
    var tmp0_desc = this.rn9_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_43().qn9_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !equals(value.tn9_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.tn9_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !equals(value.un9_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 1, tmp2_cached[1], value.un9_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !equals(value.vn9_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 2, tmp2_cached[2], value.vn9_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !equals(value.wn9_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 3, tmp2_cached[3], value.wn9_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !equals(value.xn9_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 4, tmp2_cached[4], value.xn9_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !equals(value.yn9_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 5, tmp2_cached[5], value.yn9_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_23).w4a = function (encoder, value) {
    return this.sn9(encoder, value instanceof Metadata ? value : THROW_CCE());
  };
  var $serializer_instance_23;
  function $serializer_getInstance_35() {
    if ($serializer_instance_23 == null)
      new $serializer_23();
    return $serializer_instance_23;
  }
  function Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_35().rn9_1);
    }
    if (0 === (seen1 & 1))
      $this.tn9_1 = emptyList();
    else
      $this.tn9_1 = titles;
    if (0 === (seen1 & 2))
      $this.un9_1 = emptyList();
    else
      $this.un9_1 = creators;
    if (0 === (seen1 & 4))
      $this.vn9_1 = emptyList();
    else
      $this.vn9_1 = languages;
    if (0 === (seen1 & 8))
      $this.wn9_1 = emptyList();
    else
      $this.wn9_1 = descriptions;
    if (0 === (seen1 & 16))
      $this.xn9_1 = emptyList();
    else
      $this.xn9_1 = identifiers;
    if (0 === (seen1 & 32))
      $this.yn9_1 = emptyList();
    else
      $this.yn9_1 = metas;
    return $this;
  }
  function Metadata_init_$Create$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker) {
    return Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, objectCreate(protoOf(Metadata)));
  }
  function Metadata(titles, creators, languages, descriptions, identifiers, metas) {
    Companion_getInstance_43();
    titles = titles === VOID ? emptyList() : titles;
    creators = creators === VOID ? emptyList() : creators;
    languages = languages === VOID ? emptyList() : languages;
    descriptions = descriptions === VOID ? emptyList() : descriptions;
    identifiers = identifiers === VOID ? emptyList() : identifiers;
    metas = metas === VOID ? emptyList() : metas;
    this.tn9_1 = titles;
    this.un9_1 = creators;
    this.vn9_1 = languages;
    this.wn9_1 = descriptions;
    this.xn9_1 = identifiers;
    this.yn9_1 = metas;
  }
  function Companion_26() {
    this.zn9_1 = 'http://www.idpf.org/2007/opf';
    this.ana_1 = 'http://purl.org/dc/elements/1.1/';
  }
  protoOf(Companion_26).s4x = function () {
    return $serializer_getInstance_36();
  };
  var Companion_instance_74;
  function Companion_getInstance_44() {
    return Companion_instance_74;
  }
  function $serializer_24() {
    $serializer_instance_24 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.PackageDocument', this, 5);
    tmp0_serialDesc.y4l('version', true);
    tmp0_serialDesc.y4l('uniqueIdentifier', true);
    tmp0_serialDesc.z4l(new XmlSerialName('unique-identifier'));
    tmp0_serialDesc.y4l('metadata', true);
    tmp0_serialDesc.y4l('manifest', true);
    tmp0_serialDesc.y4l('spine', true);
    tmp0_serialDesc.a4m(new XmlSerialName('package', 'http://www.idpf.org/2007/opf'));
    this.bna_1 = tmp0_serialDesc;
  }
  protoOf($serializer_24).v4a = function () {
    return this.bna_1;
  };
  protoOf($serializer_24).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), $serializer_getInstance_35(), $serializer_getInstance_33(), $serializer_getInstance_37()];
  };
  protoOf($serializer_24).x4a = function (decoder) {
    var tmp0_desc = this.bna_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.n4e(tmp0_desc);
    if (tmp9_input.c4f()) {
      tmp4_local0 = tmp9_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.z4e(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.z4e(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.z4e(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.z4e(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.z4e(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.z4e(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.o4e(tmp0_desc);
    return PackageDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_24).cna = function (encoder, value) {
    var tmp0_desc = this.bna_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.dna_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.dna_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.ena_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 1, value.ena_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !equals(value.fna_1, new Metadata())) {
      tmp1_output.d4g(tmp0_desc, 2, $serializer_getInstance_35(), value.fna_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !equals(value.gna_1, new Manifest())) {
      tmp1_output.d4g(tmp0_desc, 3, $serializer_getInstance_33(), value.gna_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !equals(value.hna_1, new Spine())) {
      tmp1_output.d4g(tmp0_desc, 4, $serializer_getInstance_37(), value.hna_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_24).w4a = function (encoder, value) {
    return this.cna(encoder, value instanceof PackageDocument ? value : THROW_CCE());
  };
  var $serializer_instance_24;
  function $serializer_getInstance_36() {
    if ($serializer_instance_24 == null)
      new $serializer_24();
    return $serializer_instance_24;
  }
  function PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_36().bna_1);
    }
    if (0 === (seen1 & 1))
      $this.dna_1 = null;
    else
      $this.dna_1 = version;
    if (0 === (seen1 & 2))
      $this.ena_1 = '';
    else
      $this.ena_1 = uniqueIdentifier;
    if (0 === (seen1 & 4))
      $this.fna_1 = new Metadata();
    else
      $this.fna_1 = metadata;
    if (0 === (seen1 & 8))
      $this.gna_1 = new Manifest();
    else
      $this.gna_1 = manifest;
    if (0 === (seen1 & 16))
      $this.hna_1 = new Spine();
    else
      $this.hna_1 = spine;
    return $this;
  }
  function PackageDocument_init_$Create$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker) {
    return PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, objectCreate(protoOf(PackageDocument)));
  }
  function PackageDocument(version, uniqueIdentifier, metadata, manifest, spine) {
    version = version === VOID ? null : version;
    uniqueIdentifier = uniqueIdentifier === VOID ? '' : uniqueIdentifier;
    metadata = metadata === VOID ? new Metadata() : metadata;
    manifest = manifest === VOID ? new Manifest() : manifest;
    spine = spine === VOID ? new Spine() : spine;
    this.dna_1 = version;
    this.ena_1 = uniqueIdentifier;
    this.fna_1 = metadata;
    this.gna_1 = manifest;
    this.hna_1 = spine;
  }
  protoOf(PackageDocument).ina = function () {
    var whitespaceRegex = Regex_init_$Create$('\\s+');
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.gna_1.ln9_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp0_safe_receiver = element.dn9_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          // Inline function 'kotlin.text.split' call
          tmp = whitespaceRegex.y9(tmp0_safe_receiver, 0);
        }
        var tmp1_safe_receiver = tmp;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a1('cover-image');
        if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$2;
    var tmp_0;
    if (tmp2_elvis_lhs_0 == null) {
      var tmp$ret$4;
      $l$block_0: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.fna_1.yn9_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
          if (element_0.on9_1 === 'cover') {
            tmp$ret$4 = element_0;
            break $l$block_0;
          }
        }
        tmp$ret$4 = null;
      }
      var tmp0_safe_receiver_0 = tmp$ret$4;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.pn9_1;
      var tmp_1;
      if (tmp1_safe_receiver_0 == null) {
        tmp_1 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp$ret$6;
        $l$block_1: {
          // Inline function 'kotlin.collections.firstOrNull' call
          var tmp0_iterator_1 = this.gna_1.ln9_1.w();
          while (tmp0_iterator_1.f()) {
            var element_1 = tmp0_iterator_1.e();
            // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>.<anonymous>' call
            if (element_1.bn9_1 === tmp1_safe_receiver_0) {
              tmp$ret$6 = element_1;
              break $l$block_1;
            }
          }
          tmp$ret$6 = null;
        }
        tmp_1 = tmp$ret$6;
      }
      tmp_0 = tmp_1;
    } else {
      tmp_0 = tmp2_elvis_lhs_0;
    }
    return tmp_0;
  };
  protoOf(PackageDocument).jna = function () {
    var whiteSpaceRegex = Regex_init_$Create$('\\s+');
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.gna_1.ln9_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp0_safe_receiver = element.dn9_1;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.text.split' call
        tmp = whiteSpaceRegex.y9(tmp0_safe_receiver, 0);
      }
      var tmp1_safe_receiver = tmp;
      var tmp_0;
      if (tmp1_safe_receiver == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_0 = tmp1_safe_receiver.a1('toc') ? true : tmp1_safe_receiver.a1('nav');
      }
      var tmp2_elvis_lhs = tmp_0;
      if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
        destination.i1(element);
      }
    }
    var tocCandidates = destination;
    var tmp0_safe_receiver_0 = this.hna_1.lna_1;
    var tmp_1;
    if (tmp0_safe_receiver_0 == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp$ret$7;
      $l$block: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.gna_1.ln9_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
          if (element_0.bn9_1 === tmp0_safe_receiver_0) {
            tmp$ret$7 = element_0;
            break $l$block;
          }
        }
        tmp$ret$7 = null;
      }
      var tmp0_safe_receiver_1 = tmp$ret$7;
      var tmp_2;
      if (tmp0_safe_receiver_1 == null) {
        tmp_2 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_2 = listOf_0(tmp0_safe_receiver_1);
      }
      var tmp1_elvis_lhs = tmp_2;
      tmp_1 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    }
    var tmp1_elvis_lhs_0 = tmp_1;
    var spineNcxCandidate = tmp1_elvis_lhs_0 == null ? emptyList() : tmp1_elvis_lhs_0;
    var allTocCandidates = plus(tocCandidates, spineNcxCandidate);
    var tmp$ret$13;
    $l$block_0: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_1 = allTocCandidates.w();
      while (tmp0_iterator_1.f()) {
        var element_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
        var tmp0_safe_receiver_2 = element_1.dn9_1;
        var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : contains(tmp0_safe_receiver_2, 'nav');
        if (tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1) {
          tmp$ret$13 = element_1;
          break $l$block_0;
        }
      }
      tmp$ret$13 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$13;
    return tmp2_elvis_lhs_0 == null ? firstOrNull(allTocCandidates) : tmp2_elvis_lhs_0;
  };
  function Companion_27() {
    Companion_instance_75 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.mna_1 = [new ArrayListSerializer($serializer_getInstance_32()), null];
  }
  var Companion_instance_75;
  function Companion_getInstance_45() {
    if (Companion_instance_75 == null)
      new Companion_27();
    return Companion_instance_75;
  }
  function $serializer_25() {
    $serializer_instance_25 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Spine', this, 2);
    tmp0_serialDesc.y4l('itemRefs', true);
    tmp0_serialDesc.y4l('toc', true);
    tmp0_serialDesc.a4m(new XmlSerialName('spine', 'http://www.idpf.org/2007/opf'));
    this.nna_1 = tmp0_serialDesc;
  }
  protoOf($serializer_25).v4a = function () {
    return this.nna_1;
  };
  protoOf($serializer_25).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_45().mna_1[0], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_25).x4a = function (decoder) {
    var tmp0_desc = this.nna_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    var tmp7_cached = Companion_getInstance_45().mna_1;
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return Spine_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_25).ona = function (encoder, value) {
    var tmp0_desc = this.nna_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_45().mna_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !equals(value.kna_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.kna_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.lna_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, StringSerializer_getInstance(), value.lna_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_25).w4a = function (encoder, value) {
    return this.ona(encoder, value instanceof Spine ? value : THROW_CCE());
  };
  var $serializer_instance_25;
  function $serializer_getInstance_37() {
    if ($serializer_instance_25 == null)
      new $serializer_25();
    return $serializer_instance_25;
  }
  function Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_37().nna_1);
    }
    if (0 === (seen1 & 1))
      $this.kna_1 = emptyList();
    else
      $this.kna_1 = itemRefs;
    if (0 === (seen1 & 2))
      $this.lna_1 = null;
    else
      $this.lna_1 = toc;
    return $this;
  }
  function Spine_init_$Create$(seen1, itemRefs, toc, serializationConstructorMarker) {
    return Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, objectCreate(protoOf(Spine)));
  }
  function Spine(itemRefs, toc) {
    Companion_getInstance_45();
    itemRefs = itemRefs === VOID ? emptyList() : itemRefs;
    toc = toc === VOID ? null : toc;
    this.kna_1 = itemRefs;
    this.lna_1 = toc;
  }
  function Companion_28() {
    Companion_instance_76 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.pna_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_39())];
  }
  var Companion_instance_76;
  function Companion_getInstance_46() {
    if (Companion_instance_76 == null)
      new Companion_28();
    return Companion_instance_76;
  }
  function $serializer_26() {
    $serializer_instance_26 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifest', this, 3);
    tmp0_serialDesc.y4l('version', false);
    tmp0_serialDesc.y4l('metadata', false);
    tmp0_serialDesc.y4l('entries', false);
    this.qna_1 = tmp0_serialDesc;
  }
  protoOf($serializer_26).v4a = function () {
    return this.qna_1;
  };
  protoOf($serializer_26).p4m = function () {
    var tmp0_cached = Companion_getInstance_46().pna_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), tmp0_cached[1], tmp0_cached[2]];
  };
  protoOf($serializer_26).x4a = function (decoder) {
    var tmp0_desc = this.qna_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.n4e(tmp0_desc);
    var tmp8_cached = Companion_getInstance_46().pna_1;
    if (tmp7_input.c4f()) {
      tmp4_local0 = tmp7_input.s4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.z4e(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.z4e(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.s4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.z4e(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.z4e(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.o4e(tmp0_desc);
    return ContentManifest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_26).rna = function (encoder, value) {
    var tmp0_desc = this.qna_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_46().pna_1;
    tmp1_output.w4f(tmp0_desc, 0, value.sna_1);
    tmp1_output.d4g(tmp0_desc, 1, tmp2_cached[1], value.tna_1);
    tmp1_output.d4g(tmp0_desc, 2, tmp2_cached[2], value.una_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_26).w4a = function (encoder, value) {
    return this.rna(encoder, value instanceof ContentManifest ? value : THROW_CCE());
  };
  var $serializer_instance_26;
  function $serializer_getInstance_38() {
    if ($serializer_instance_26 == null)
      new $serializer_26();
    return $serializer_instance_26;
  }
  function ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_38().qna_1);
    }
    $this.sna_1 = version;
    $this.tna_1 = metadata;
    $this.una_1 = entries;
    return $this;
  }
  function ContentManifest_init_$Create$(seen1, version, metadata, entries, serializationConstructorMarker) {
    return ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, objectCreate(protoOf(ContentManifest)));
  }
  function ContentManifest(version, metadata, entries) {
    Companion_getInstance_46();
    this.sna_1 = version;
    this.tna_1 = metadata;
    this.una_1 = entries;
  }
  protoOf(ContentManifest).toString = function () {
    return 'ContentManifest(version=' + this.sna_1 + ', metadata=' + this.tna_1 + ', entries=' + this.una_1 + ')';
  };
  protoOf(ContentManifest).hashCode = function () {
    var result = this.sna_1;
    result = imul(result, 31) + hashCode(this.tna_1) | 0;
    result = imul(result, 31) + hashCode(this.una_1) | 0;
    return result;
  };
  protoOf(ContentManifest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentManifest))
      return false;
    var tmp0_other_with_cast = other instanceof ContentManifest ? other : THROW_CCE();
    if (!(this.sna_1 === tmp0_other_with_cast.sna_1))
      return false;
    if (!equals(this.tna_1, tmp0_other_with_cast.tna_1))
      return false;
    if (!equals(this.una_1, tmp0_other_with_cast.una_1))
      return false;
    return true;
  };
  function Companion_29() {
    Companion_instance_77 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.vna_1 = [null, null, null, null, null, null, new StringValuesSerializer(), new StringValuesSerializer(), null];
  }
  var Companion_instance_77;
  function Companion_getInstance_47() {
    if (Companion_instance_77 == null)
      new Companion_29();
    return Companion_instance_77;
  }
  function $serializer_27() {
    $serializer_instance_27 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifestEntry', this, 9);
    tmp0_serialDesc.y4l('uri', false);
    tmp0_serialDesc.y4l('storageSize', false);
    tmp0_serialDesc.y4l('ignoreQueryParams', true);
    tmp0_serialDesc.y4l('status', true);
    tmp0_serialDesc.y4l('method', true);
    tmp0_serialDesc.y4l('integrity', false);
    tmp0_serialDesc.y4l('requestHeaders', true);
    tmp0_serialDesc.y4l('responseHeaders', false);
    tmp0_serialDesc.y4l('bodyDataUrl', false);
    this.wna_1 = tmp0_serialDesc;
  }
  protoOf($serializer_27).v4a = function () {
    return this.wna_1;
  };
  protoOf($serializer_27).p4m = function () {
    var tmp0_cached = Companion_getInstance_47().vna_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), LongSerializer_getInstance(), BooleanSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[6], tmp0_cached[7], StringSerializer_getInstance()];
  };
  protoOf($serializer_27).x4a = function (decoder) {
    var tmp0_desc = this.wna_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = false;
    var tmp7_local3 = 0;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.n4e(tmp0_desc);
    var tmp14_cached = Companion_getInstance_47().vna_1;
    if (tmp13_input.c4f()) {
      tmp4_local0 = tmp13_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.t4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.p4e(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.s4e(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.x4e(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.x4e(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.z4e(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.z4e(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.x4e(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.t4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.p4e(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.s4e(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.x4e(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.x4e(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.z4e(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.z4e(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.x4e(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.o4e(tmp0_desc);
    return ContentManifestEntry_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_27).xna = function (encoder, value) {
    var tmp0_desc = this.wna_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_47().vna_1;
    tmp1_output.b4g(tmp0_desc, 0, value.yna_1);
    tmp1_output.x4f(tmp0_desc, 1, value.zna_1);
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.anb_1 === true)) {
      tmp1_output.t4f(tmp0_desc, 2, value.anb_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.bnb_1 === 200)) {
      tmp1_output.w4f(tmp0_desc, 3, value.bnb_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.cnb_1 === 'GET')) {
      tmp1_output.b4g(tmp0_desc, 4, value.cnb_1);
    }
    tmp1_output.b4g(tmp0_desc, 5, value.dnb_1);
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !equals(value.enb_1, emptyStringValues())) {
      tmp1_output.d4g(tmp0_desc, 6, tmp2_cached[6], value.enb_1);
    }
    tmp1_output.d4g(tmp0_desc, 7, tmp2_cached[7], value.fnb_1);
    tmp1_output.b4g(tmp0_desc, 8, value.gnb_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_27).w4a = function (encoder, value) {
    return this.xna(encoder, value instanceof ContentManifestEntry ? value : THROW_CCE());
  };
  var $serializer_instance_27;
  function $serializer_getInstance_39() {
    if ($serializer_instance_27 == null)
      new $serializer_27();
    return $serializer_instance_27;
  }
  function ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, $this) {
    if (!(419 === (419 & seen1))) {
      throwMissingFieldException(seen1, 419, $serializer_getInstance_39().wna_1);
    }
    $this.yna_1 = uri;
    $this.zna_1 = storageSize;
    if (0 === (seen1 & 4))
      $this.anb_1 = true;
    else
      $this.anb_1 = ignoreQueryParams;
    if (0 === (seen1 & 8))
      $this.bnb_1 = 200;
    else
      $this.bnb_1 = status;
    if (0 === (seen1 & 16))
      $this.cnb_1 = 'GET';
    else
      $this.cnb_1 = method;
    $this.dnb_1 = integrity;
    if (0 === (seen1 & 64))
      $this.enb_1 = emptyStringValues();
    else
      $this.enb_1 = requestHeaders;
    $this.fnb_1 = responseHeaders;
    $this.gnb_1 = bodyDataUrl;
    return $this;
  }
  function ContentManifestEntry_init_$Create$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker) {
    return ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, objectCreate(protoOf(ContentManifestEntry)));
  }
  function ContentManifestEntry() {
  }
  function Companion_30() {
    Companion_instance_78 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.hnb_1 = [new ArrayListSerializer($serializer_getInstance_41()), new ArrayListSerializer($serializer_getInstance_42())];
  }
  var Companion_instance_78;
  function Companion_getInstance_48() {
    if (Companion_instance_78 == null)
      new Companion_30();
    return Companion_instance_78;
  }
  function $serializer_28() {
    $serializer_instance_28 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaContentInfo', this, 2);
    tmp0_serialDesc.y4l('sources', false);
    tmp0_serialDesc.y4l('subtitles', true);
    this.inb_1 = tmp0_serialDesc;
  }
  protoOf($serializer_28).v4a = function () {
    return this.inb_1;
  };
  protoOf($serializer_28).p4m = function () {
    var tmp0_cached = Companion_getInstance_48().hnb_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [tmp0_cached[0], tmp0_cached[1]];
  };
  protoOf($serializer_28).x4a = function (decoder) {
    var tmp0_desc = this.inb_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    var tmp7_cached = Companion_getInstance_48().hnb_1;
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.z4e(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.z4e(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return MediaContentInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_28).jnb = function (encoder, value) {
    var tmp0_desc = this.inb_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_48().hnb_1;
    tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.knb_1);
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !equals(value.lnb_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 1, tmp2_cached[1], value.lnb_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_28).w4a = function (encoder, value) {
    return this.jnb(encoder, value instanceof MediaContentInfo ? value : THROW_CCE());
  };
  var $serializer_instance_28;
  function $serializer_getInstance_40() {
    if ($serializer_instance_28 == null)
      new $serializer_28();
    return $serializer_instance_28;
  }
  function MediaContentInfo_init_$Init$(seen1, sources, subtitles, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_40().inb_1);
    }
    $this.knb_1 = sources;
    if (0 === (seen1 & 2))
      $this.lnb_1 = emptyList();
    else
      $this.lnb_1 = subtitles;
    return $this;
  }
  function MediaContentInfo_init_$Create$(seen1, sources, subtitles, serializationConstructorMarker) {
    return MediaContentInfo_init_$Init$(seen1, sources, subtitles, serializationConstructorMarker, objectCreate(protoOf(MediaContentInfo)));
  }
  function MediaContentInfo(sources, subtitles) {
    Companion_getInstance_48();
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.knb_1 = sources;
    this.lnb_1 = subtitles;
  }
  function $serializer_29() {
    $serializer_instance_29 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaSource', this, 2);
    tmp0_serialDesc.y4l('uri', false);
    tmp0_serialDesc.y4l('mimeType', false);
    this.mnb_1 = tmp0_serialDesc;
  }
  protoOf($serializer_29).v4a = function () {
    return this.mnb_1;
  };
  protoOf($serializer_29).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_29).x4a = function (decoder) {
    var tmp0_desc = this.mnb_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return MediaSource_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_29).nnb = function (encoder, value) {
    var tmp0_desc = this.mnb_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.b4g(tmp0_desc, 0, value.onb_1);
    tmp1_output.b4g(tmp0_desc, 1, value.pnb_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_29).w4a = function (encoder, value) {
    return this.nnb(encoder, value instanceof MediaSource ? value : THROW_CCE());
  };
  var $serializer_instance_29;
  function $serializer_getInstance_41() {
    if ($serializer_instance_29 == null)
      new $serializer_29();
    return $serializer_instance_29;
  }
  function MediaSource_init_$Init$(seen1, uri, mimeType, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_41().mnb_1);
    }
    $this.onb_1 = uri;
    $this.pnb_1 = mimeType;
    return $this;
  }
  function MediaSource_init_$Create$(seen1, uri, mimeType, serializationConstructorMarker) {
    return MediaSource_init_$Init$(seen1, uri, mimeType, serializationConstructorMarker, objectCreate(protoOf(MediaSource)));
  }
  function MediaSource() {
  }
  function Companion_31() {
  }
  protoOf(Companion_31).s4x = function () {
    return $serializer_getInstance_42();
  };
  var Companion_instance_79;
  function Companion_getInstance_49() {
    return Companion_instance_79;
  }
  function $serializer_30() {
    $serializer_instance_30 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.SubtitleTrack', this, 4);
    tmp0_serialDesc.y4l('uri', false);
    tmp0_serialDesc.y4l('mimeType', false);
    tmp0_serialDesc.y4l('langCode', false);
    tmp0_serialDesc.y4l('title', false);
    this.qnb_1 = tmp0_serialDesc;
  }
  protoOf($serializer_30).v4a = function () {
    return this.qnb_1;
  };
  protoOf($serializer_30).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_30).x4a = function (decoder) {
    var tmp0_desc = this.qnb_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.n4e(tmp0_desc);
    if (tmp8_input.c4f()) {
      tmp4_local0 = tmp8_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.x4e(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.x4e(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.o4e(tmp0_desc);
    return SubtitleTrack_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_30).rnb = function (encoder, value) {
    var tmp0_desc = this.qnb_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.b4g(tmp0_desc, 0, value.snb_1);
    tmp1_output.b4g(tmp0_desc, 1, value.tnb_1);
    tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.unb_1);
    tmp1_output.b4g(tmp0_desc, 3, value.vnb_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_30).w4a = function (encoder, value) {
    return this.rnb(encoder, value instanceof SubtitleTrack ? value : THROW_CCE());
  };
  var $serializer_instance_30;
  function $serializer_getInstance_42() {
    if ($serializer_instance_30 == null)
      new $serializer_30();
    return $serializer_instance_30;
  }
  function SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_42().qnb_1);
    }
    $this.snb_1 = uri;
    $this.tnb_1 = mimeType;
    $this.unb_1 = langCode;
    $this.vnb_1 = title;
    return $this;
  }
  function SubtitleTrack_init_$Create$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker) {
    return SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, objectCreate(protoOf(SubtitleTrack)));
  }
  function SubtitleTrack(uri, mimeType, langCode, title) {
    this.snb_1 = uri;
    this.tnb_1 = mimeType;
    this.unb_1 = langCode;
    this.vnb_1 = title;
  }
  protoOf(SubtitleTrack).wnb = function (uri, mimeType, langCode, title) {
    return new SubtitleTrack(uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).xnb = function (uri, mimeType, langCode, title, $super) {
    uri = uri === VOID ? this.snb_1 : uri;
    mimeType = mimeType === VOID ? this.tnb_1 : mimeType;
    langCode = langCode === VOID ? this.unb_1 : langCode;
    title = title === VOID ? this.vnb_1 : title;
    return $super === VOID ? this.wnb(uri, mimeType, langCode, title) : $super.wnb.call(this, uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).toString = function () {
    return 'SubtitleTrack(uri=' + this.snb_1 + ', mimeType=' + this.tnb_1 + ', langCode=' + this.unb_1 + ', title=' + this.vnb_1 + ')';
  };
  protoOf(SubtitleTrack).hashCode = function () {
    var result = getStringHashCode(this.snb_1);
    result = imul(result, 31) + getStringHashCode(this.tnb_1) | 0;
    result = imul(result, 31) + (this.unb_1 == null ? 0 : getStringHashCode(this.unb_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.vnb_1) | 0;
    return result;
  };
  protoOf(SubtitleTrack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleTrack))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleTrack ? other : THROW_CCE();
    if (!(this.snb_1 === tmp0_other_with_cast.snb_1))
      return false;
    if (!(this.tnb_1 === tmp0_other_with_cast.tnb_1))
      return false;
    if (!(this.unb_1 == tmp0_other_with_cast.unb_1))
      return false;
    if (!(this.vnb_1 === tmp0_other_with_cast.vnb_1))
      return false;
    return true;
  };
  function InvalidContentException(message, cause) {
    cause = cause === VOID ? null : cause;
    IllegalArgumentException_init_$Init$(message, cause, this);
    captureStack(this, InvalidContentException);
  }
  function Companion_32() {
    this.ynb_1 = 'upload-tmp';
    this.znb_1 = 'upload-tmp:///';
  }
  protoOf(Companion_32).s4x = function () {
    return $serializer_getInstance_43();
  };
  var Companion_instance_80;
  function Companion_getInstance_50() {
    return Companion_instance_80;
  }
  function $serializer_31() {
    $serializer_instance_31 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentjob.MetadataResult', this, 4);
    tmp0_serialDesc.y4l('entry', false);
    tmp0_serialDesc.y4l('importerId', false);
    tmp0_serialDesc.y4l('originalFilename', true);
    tmp0_serialDesc.y4l('picture', true);
    this.anc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_31).v4a = function () {
    return this.anc_1;
  };
  protoOf($serializer_31).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_3(), IntSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_4())];
  };
  protoOf($serializer_31).x4a = function (decoder) {
    var tmp0_desc = this.anc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.n4e(tmp0_desc);
    if (tmp8_input.c4f()) {
      tmp4_local0 = tmp8_input.z4e(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.s4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.z4e(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.s4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.o4e(tmp0_desc);
    return MetadataResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_31).bnc = function (encoder, value) {
    var tmp0_desc = this.anc_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, $serializer_getInstance_3(), value.cnc_1);
    tmp1_output.w4f(tmp0_desc, 1, value.dnc_1);
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.enc_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.enc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.fnc_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, $serializer_getInstance_4(), value.fnc_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_31).w4a = function (encoder, value) {
    return this.bnc(encoder, value instanceof MetadataResult ? value : THROW_CCE());
  };
  var $serializer_instance_31;
  function $serializer_getInstance_43() {
    if ($serializer_instance_31 == null)
      new $serializer_31();
    return $serializer_instance_31;
  }
  function MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_43().anc_1);
    }
    $this.cnc_1 = entry;
    $this.dnc_1 = importerId;
    if (0 === (seen1 & 4))
      $this.enc_1 = null;
    else
      $this.enc_1 = originalFilename;
    if (0 === (seen1 & 8))
      $this.fnc_1 = null;
    else
      $this.fnc_1 = picture;
    return $this;
  }
  function MetadataResult_init_$Create$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker) {
    return MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, objectCreate(protoOf(MetadataResult)));
  }
  function MetadataResult(entry, importerId, originalFilename, picture) {
    originalFilename = originalFilename === VOID ? null : originalFilename;
    picture = picture === VOID ? null : picture;
    this.cnc_1 = entry;
    this.dnc_1 = importerId;
    this.enc_1 = originalFilename;
    this.fnc_1 = picture;
  }
  protoOf(MetadataResult).toString = function () {
    return 'MetadataResult(entry=' + this.cnc_1 + ', importerId=' + this.dnc_1 + ', originalFilename=' + this.enc_1 + ', picture=' + this.fnc_1 + ')';
  };
  protoOf(MetadataResult).hashCode = function () {
    var result = this.cnc_1.hashCode();
    result = imul(result, 31) + this.dnc_1 | 0;
    result = imul(result, 31) + (this.enc_1 == null ? 0 : getStringHashCode(this.enc_1)) | 0;
    result = imul(result, 31) + (this.fnc_1 == null ? 0 : this.fnc_1.hashCode()) | 0;
    return result;
  };
  protoOf(MetadataResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MetadataResult))
      return false;
    var tmp0_other_with_cast = other instanceof MetadataResult ? other : THROW_CCE();
    if (!this.cnc_1.equals(tmp0_other_with_cast.cnc_1))
      return false;
    if (!(this.dnc_1 === tmp0_other_with_cast.dnc_1))
      return false;
    if (!(this.enc_1 == tmp0_other_with_cast.enc_1))
      return false;
    if (!equals(this.fnc_1, tmp0_other_with_cast.fnc_1))
      return false;
    return true;
  };
  function PersonConstants() {
    PersonConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1, strings_getInstance().cll_1);
    var tmp_1 = to(2, strings_getInstance().bll_1);
    var tmp_2 = to(4, strings_getInstance().dll_1);
    tmp.gnc_1 = mapOf([tmp_0, tmp_1, tmp_2, to(0, strings_getInstance().ell_1)]);
  }
  var PersonConstants_instance;
  function PersonConstants_getInstance() {
    if (PersonConstants_instance == null)
      new PersonConstants();
    return PersonConstants_instance;
  }
  function SubmissionConstants() {
    SubmissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(0, strings_getInstance().wmg_1);
    var tmp_1 = to(4, strings_getInstance().rln_1);
    var tmp_2 = to(1, strings_getInstance().xmg_1);
    var tmp_3 = to(2, strings_getInstance().ymg_1);
    tmp.hnc_1 = mapOf([tmp_0, tmp_1, tmp_2, tmp_3, to(3, strings_getInstance().oma_1)]);
    var tmp_4 = this;
    Companion_getInstance_1();
    var tmp_5 = to(0, strings_getInstance().nm5_1);
    Companion_getInstance_1();
    var tmp_6 = to(1, strings_getInstance().mm5_1);
    Companion_getInstance_1();
    tmp_4.inc_1 = mapOf([tmp_5, tmp_6, to(2, strings_getInstance().lm5_1)]);
  }
  var SubmissionConstants_instance;
  function SubmissionConstants_getInstance() {
    if (SubmissionConstants_instance == null)
      new SubmissionConstants();
    return SubmissionConstants_instance;
  }
  function TerminologyKeys() {
    TerminologyKeys_instance = this;
    this.jnc_1 = 'Teacher';
    this.knc_1 = 'Student';
    this.lnc_1 = 'Teachers';
    this.mnc_1 = 'Students';
    this.nnc_1 = 'AddTeacher';
    this.onc_1 = 'AddStudent';
    this.pnc_1 = mapOf([to('Teacher', strings_getInstance().uly_1), to('Student', strings_getInstance().hm5_1), to('Teachers', strings_getInstance().xly_1), to('Students', strings_getInstance().ilm_1), to('AddTeacher', strings_getInstance().vly_1), to('AddStudent', strings_getInstance().jlm_1)]);
  }
  var TerminologyKeys_instance;
  function TerminologyKeys_getInstance() {
    if (TerminologyKeys_instance == null)
      new TerminologyKeys();
    return TerminologyKeys_instance;
  }
  function SetPasswordUseCase() {
  }
  function AccountIsNotSubmitterException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AccountIsNotSubmitterException);
  }
  function AssignmentAlreadySubmittedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentAlreadySubmittedException);
  }
  function AssignmentDeadlinePassedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentDeadlinePassedException);
  }
  function AssignmentTextTooLongException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentTextTooLongException);
  }
  function AssignmentSubmissionException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, AssignmentSubmissionException);
  }
  function SubmitAssignmentResult(submission) {
    this.rnc_1 = submission;
  }
  protoOf(SubmitAssignmentResult).toString = function () {
    return 'SubmitAssignmentResult(submission=' + this.rnc_1 + ')';
  };
  protoOf(SubmitAssignmentResult).hashCode = function () {
    return this.rnc_1 == null ? 0 : this.rnc_1.hashCode();
  };
  protoOf(SubmitAssignmentResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubmitAssignmentResult))
      return false;
    var tmp0_other_with_cast = other instanceof SubmitAssignmentResult ? other : THROW_CCE();
    if (!equals(this.rnc_1, tmp0_other_with_cast.rnc_1))
      return false;
    return true;
  };
  function SubmitAssignmentUseCase$invoke$lambda($assignmentUid, $submitterUid, $accountPersonUid, $assignment) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.abu_1 = $assignmentUid;
      $this$shallowCopy.bbu_1 = $submitterUid;
      $this$shallowCopy.cbu_1 = $accountPersonUid;
      $this$shallowCopy.fbu_1 = systemTimeInMillis();
      $this$shallowCopy.gbu_1 = $assignment.a80_1;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$9(_this__u8e3s4, repo, submitterUid, assignmentUid, accountPersonUid, submission, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.and_1 = _this__u8e3s4;
    this.bnd_1 = repo;
    this.cnd_1 = submitterUid;
    this.dnd_1 = assignmentUid;
    this.end_1 = accountPersonUid;
    this.fnd_1 = submission;
  }
  protoOf($invokeCOROUTINE$9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.cnd_1.equals(new Long(0, 0)))
              throw new AccountIsNotSubmitterException('Not a valid submitter');
            this.hd_1 = 1;
            suspendResult = this.bnd_1.v7k().l7y(this.dnd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gnd_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.gnd_1 == null) {
              throw IllegalArgumentException_init_$Create$('Could not find assignment uid ' + this.dnd_1.toString());
            } else {
              tmp_1 = this.gnd_1;
            }

            tmp_0.hnd_1 = tmp_1;
            var tmp_2 = this;
            var tmp1_elvis_lhs = this.hnd_1.n83_1;
            var tmp_3;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('Could not load courseblock');
            } else {
              tmp_3 = tmp1_elvis_lhs;
            }

            tmp_2.ind_1 = tmp_3;
            var tmp_4 = this;
            var tmp2_elvis_lhs = this.hnd_1.m83_1;
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('assignment cannot be null');
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_4.jnd_1 = tmp_5;
            var tmp_6 = this.jnd_1.u7z_1;
            if (tmp_6 === 1) {
              this.hd_1 = 2;
              suspendResult = this.bnd_1.w7k().hbt(this.end_1, this.dnd_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.knd_1 = false;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.knd_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.knd_1) {
              throw new AssignmentAlreadySubmittedException(this.and_1.mnd_1.rnd(strings_getInstance().pmk_1));
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            if (lastPossibleSubmissionTime(this.ind_1).c7(systemTimeInMillis()) < 0) {
              throw new AssignmentDeadlinePassedException(this.and_1.mnd_1.rnd(strings_getInstance().omk_1));
            }

            if (this.jnd_1.w7z_1) {
              var tmp_7 = this.jnd_1.x7z_1;
              if (tmp_7 === 1) {
                var tmp3_safe_receiver = this.fnd_1.dbu_1;
                var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : htmlToPlainText(tmp3_safe_receiver);
                var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : countWords(tmp4_safe_receiver);
                var wordCount = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
                if (wordCount > this.jnd_1.y7z_1) {
                  throw new AssignmentTextTooLongException(this.and_1.mnd_1.snd(strings_getInstance().qmk_1, [wordCount.toString(), this.jnd_1.y7z_1.toString()]));
                }
              } else {
                var tmp_8 = this.jnd_1.x7z_1;
                if (tmp_8 === 2) {
                  var tmp6_safe_receiver = this.fnd_1.dbu_1;
                  var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : htmlToPlainText(tmp6_safe_receiver);
                  var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.length;
                  var charCount = tmp8_elvis_lhs == null ? 0 : tmp8_elvis_lhs;
                  if (charCount > this.jnd_1.y7z_1) {
                    throw new AssignmentTextTooLongException(this.and_1.mnd_1.snd(strings_getInstance().rmk_1, [charCount.toString(), this.jnd_1.y7z_1.toString()]));
                  }
                }
              }
            }

            var tmp_9 = this;
            tmp_9.lnd_1 = shallowCopy_0(this.fnd_1, SubmitAssignmentUseCase$invoke$lambda(this.dnd_1, this.cnd_1, this.end_1, this.jnd_1));
            Napier_getInstance().n5k('SubmitAssignmentUseCase: save to repo for submitterUid=' + this.cnd_1.toString() + ' assignmentUid=' + this.dnd_1.toString());
            this.hd_1 = 5;
            suspendResult = this.bnd_1.w7k().insertAsync(this.lnd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return new SubmitAssignmentResult(this.lnd_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 SubmitAssignmentUseCase(systemImpl) {
    this.mnd_1 = systemImpl;
  }
  protoOf(SubmitAssignmentUseCase).tnd = function (repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion) {
    var tmp = new $invokeCOROUTINE$9(this, repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SubmitMarkUseCase$invoke$lambda($assignment, $submitterUid, $activeUserSubmitterUid, $activeUserPerson, $courseBlock, $clazzUid, $applyPenalty) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.vbn_1 = $assignment.i7z_1;
      $this$shallowCopy.wbn_1 = $submitterUid;
      $this$shallowCopy.xbn_1 = $activeUserSubmitterUid;
      $this$shallowCopy.ybn_1 = $activeUserPerson.x9b_1;
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $courseBlock.z83_1;
      tmp.bbo_1 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
      $this$shallowCopy.ebo_1 = $clazzUid;
      var tmp_0;
      if ($applyPenalty) {
        $this$shallowCopy.cbo_1 = roundTo($this$shallowCopy.abo_1 * ($courseBlock.x83_1 / 100.0), 2);
        $this$shallowCopy.abo_1 = $this$shallowCopy.abo_1 - $this$shallowCopy.cbo_1;
        tmp_0 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    this.cne_1 = this$0;
    this.dne_1 = $stmt;
    this.ene_1 = $activeUserPerson;
    this.fne_1 = $courseBlock;
    this.gne_1 = $instructorActorToPersonUidMap;
    this.hne_1 = $actorToPersonUidMap;
    this.ine_1 = $clazzUid;
    this.jne_1 = $activityId;
    this.kne_1 = $markToRecord;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubmitMarkUseCase$invoke$slambda).nne = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.nne(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.mne_1 = uuid4();
            this.hd_1 = 1;
            var tmp_0 = listOf_0(this.dne_1);
            var tmp0_xseAccountPersonUid = this.ene_1.x9b_1;
            var tmp1_xseAccountUsername = ensureNotNull(this.ene_1.y9b_1);
            var tmp2_xseCbUid = this.fne_1.o83_1;
            var tmp3_xseRegistrationHi = this.mne_1.kle();
            var tmp4_xseRegistrationLo = this.mne_1.lle();
            var tmp5_knownActorUidToPersonUids = this.cne_1.tne_1.w4b(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), plus_0(this.gne_1, this.hne_1));
            suspendResult = this.cne_1.rne_1.bnf(tmp_0, new XapiSessionEntity(VOID, VOID, tmp3_xseRegistrationHi, tmp4_xseRegistrationLo, VOID, tmp0_xseAccountPersonUid, VOID, tmp1_xseAccountUsername, this.ine_1, tmp2_xseCbUid, VOID, VOID, this.jne_1, VOID, VOID, VOID, VOID, VOID, tmp5_knownActorUidToPersonUids), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.cne_1.one_1.y7k().insertAsync(this.kne_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new SubmitMarkUseCase$invoke$slambda(this.cne_1, this.dne_1, this.ene_1, this.fne_1, this.gne_1, this.hne_1, this.ine_1, this.jne_1, this.kne_1, completion);
    i.lne_1 = it;
    return i;
  };
  function SubmitMarkUseCase$invoke$slambda_0(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    var i = new SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation);
    var l = function (it, $completion) {
      return i.nne(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$10(_this__u8e3s4, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.knf_1 = _this__u8e3s4;
    this.lnf_1 = activeUserPerson;
    this.mnf_1 = assignment;
    this.nnf_1 = clazzUid;
    this.onf_1 = submitterUid;
    this.pnf_1 = draftMark;
    this.qnf_1 = submissions;
    this.rnf_1 = courseBlock;
  }
  protoOf($invokeCOROUTINE$10).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            var tmp_0 = this;
            var tmp_1;
            if (!this.qnf_1.c1()) {
              var iterator = this.qnf_1.w();
              if (!iterator.f())
                throw NoSuchElementException_init_$Create$();
              var maxValue = iterator.e().fbu_1;
              while (iterator.f()) {
                var v = iterator.e().fbu_1;
                if (compareTo(maxValue, v) < 0) {
                  maxValue = v;
                }
              }
              tmp_1 = maxValue.c7(this.rnf_1.w83_1) > 0;
            } else {
              tmp_1 = false;
            }

            tmp_0.snf_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.knf_1.one_1.v7k().j7y(this.mnf_1.i7z_1, this.nnf_1, this.lnf_1.x9b_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tnf_1 = suspendResult;
            var tmp_2;
            if (this.mnf_1.l7z_1.equals(new Long(0, 0))) {
              tmp_2 = true;
            } else {
              var tmp_3 = this.mnf_1.v7z_1;
              tmp_2 = tmp_3 === 1;
            }

            if (tmp_2) {
              var tmp_4 = this;
              var activeUserPersonXapiAgent = toXapiAgent(this.lnf_1, this.knf_1.pne_1);
              tmp_4.unf_1 = to(activeUserPersonXapiAgent, mapOf_0(to(identifierHash(activeUserPersonXapiAgent, this.knf_1.sne_1), this.lnf_1.x9b_1)));
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.knf_1.qne_1.nng(this.mnf_1.l7z_1, this.tnf_1.mb(), this.mnf_1.a80_1, this.mnf_1.i7z_1, this.lnf_1.x9b_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.vnf_1 = suspendResult;
            var tmp_5 = this;
            var it = this.vnf_1;
            tmp_5.unf_1 = to(it.ong_1, it.png_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.wnf_1 = this.unf_1;
            this.xnf_1 = this.wnf_1.y6();
            this.ynf_1 = this.wnf_1.z6();
            if (this.mnf_1.l7z_1.equals(new Long(0, 0))) {
              this.hd_1 = 5;
              suspendResult = this.knf_1.one_1.s7j().kfu(this.onf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.knf_1.qne_1.nng(this.mnf_1.l7z_1, this.onf_1.mb(), this.mnf_1.a80_1, this.mnf_1.i7z_1, this.lnf_1.x9b_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.ang_1 = suspendResult;
            var tmp_6 = this;
            var it_0 = this.ang_1;
            tmp_6.znf_1 = to(it_0.ong_1, it_0.png_1);
            this.hd_1 = 6;
            continue $sm;
          case 5:
            this.bng_1 = suspendResult;
            this.cng_1 = this.bng_1 == null ? null : toXapiAgent(this.bng_1, this.knf_1.pne_1);
            var tmp_7 = this;
            var tmp_8;
            if (this.cng_1 == null) {
              throw IllegalStateException_init_$Create$('Could not find person for ' + this.onf_1.toString());
            } else {
              tmp_8 = this.cng_1;
            }

            tmp_7.dng_1 = tmp_8;
            this.znf_1 = to(this.dng_1, mapOf_0(to(identifierHash(this.dng_1, this.knf_1.sne_1), this.onf_1)));
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.eng_1 = this.znf_1;
            this.fng_1 = this.eng_1.y6();
            this.gng_1 = this.eng_1.z6();
            var tmp_9 = this;
            tmp_9.hng_1 = shallowCopy_1(this.pnf_1, SubmitMarkUseCase$invoke$lambda(this.mnf_1, this.onf_1, this.tnf_1, this.lnf_1, this.rnf_1, this.nnf_1, this.snf_1));
            var tmp_10 = this;
            var tmp4_viewName = 'CourseAssignment';
            var tmp5_endpoint = this.knf_1.pne_1.hmr_1;
            Companion_getInstance_120();
            var tmp_11 = to('clazzUid', this.nnf_1.toString());
            Companion_getInstance_120();
            var tmp6_queryString = toQueryString(mapOf([tmp_11, to('entityUid', this.mnf_1.i7z_1.toString())]));
            tmp_10.ing_1 = (new UstadUrlComponents(tmp5_endpoint, tmp4_viewName, tmp6_queryString)).vng();
            var tmp_12 = this;
            var tmp7_verb = new XapiVerb(get_VERB_COMPLETED());
            var tmp8_object = new XapiActivityStatementObject(XapiObjectType_Activity_getInstance(), this.ing_1);
            var tmp9_context = new XapiContext(this.xnf_1);
            var tmp10_result = new XapiResult(true, true, new Score(this.hng_1.abo_1 / this.hng_1.bbo_1, this.hng_1.abo_1, 0.0, this.hng_1.bbo_1));
            tmp_12.jng_1 = new XapiStatement(VOID, this.fng_1, tmp7_verb, tmp8_object, tmp10_result, tmp9_context);
            this.hd_1 = 7;
            suspendResult = withDoorTransactionAsync(this.knf_1.one_1, VOID, SubmitMarkUseCase$invoke$slambda_0(this.knf_1, this.jng_1, this.lnf_1, this.rnf_1, this.ynf_1, this.gng_1, this.nnf_1, this.ing_1, this.hng_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            return Unit_instance;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SubmitMarkUseCase(repo, endpoint, createXapiGroupUseCase, xapiStatementResource, xxStringHasher, json) {
    this.one_1 = repo;
    this.pne_1 = endpoint;
    this.qne_1 = createXapiGroupUseCase;
    this.rne_1 = xapiStatementResource;
    this.sne_1 = xxStringHasher;
    this.tne_1 = json;
  }
  protoOf(SubmitMarkUseCase).wng = function (activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion) {
    var tmp = new $invokeCOROUTINE$10(this, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.fnh_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).knh = function (value, $completion) {
    var tmp = this.lnh(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).he = function (p1, $completion) {
    return this.knh((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.inh_1 = this.fnh_1;
            var tmp_1 = this;
            tmp_1.jnh_1 = this.gnh_1;
            var tmp0_safe_receiver = this.jnh_1;
            if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gfy_1) == null)) {
              this.hd_1 = 3;
              suspendResult = this.inh_1.t1d(this.jnh_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.hnh_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).lnh = function (value, completion) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda(this.fnh_1, completion);
    i.gnh_1 = value;
    return i;
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.knh(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$12(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.unh_1 = _this__u8e3s4;
    this.vnh_1 = collector;
  }
  protoOf($collectCOROUTINE$12).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.wnh_1 = this.vnh_1;
            this.hd_1 = 1;
            var tmp_1 = GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0(this.wnh_1, null);
            suspendResult = this.unh_1.xnh_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_0(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 sam$kotlinx_coroutines_flow_FlowCollector$0_0(function_0) {
    this.ynh_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).t1d = function (value, $completion) {
    return this.ynh_1(value, $completion);
  };
  function _no_name_provided__qut3iv($this) {
    this.xnh_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv).znh = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$12(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv).z1b = function (collector, $completion) {
    return this.znh(collector, $completion);
  };
  function $invokeCOROUTINE$11(_this__u8e3s4, submitterUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ini_1 = _this__u8e3s4;
    this.jni_1 = submitterUid;
  }
  protoOf($invokeCOROUTINE$11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            Companion_getInstance_1();
            if (this.jni_1.c7(toLong(10000)) < 0) {
              var tmp_0 = this;
              tmp_0.kni_1 = this.ini_1.mni_1.rnd(strings_getInstance().dmg_1) + ' ' + this.jni_1.toString();
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var this_0 = this.ini_1.lni_1.s7j().ofu(this.jni_1);
              suspendResult = first(new _no_name_provided__qut3iv(this_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            var it = suspendResult;
            var tmp_2 = it == null ? null : it.gfy_1;
            tmp_1.kni_1 = '' + tmp_2 + ' ' + (it == null ? null : it.hfy_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.kni_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetAssignmentSubmitterNameUseCase(repo, systemImpl) {
    this.lni_1 = repo;
    this.mni_1 = systemImpl;
  }
  protoOf(GetAssignmentSubmitterNameUseCase).nni = function (submitterUid, $completion) {
    var tmp = new $invokeCOROUTINE$11(this, submitterUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function BlobTransferJobItem(blobUrl, transferJobItemUid, lockIdToRelease, estimatedSize, partialResponseFile) {
    lockIdToRelease = lockIdToRelease === VOID ? new Long(0, 0) : lockIdToRelease;
    estimatedSize = estimatedSize === VOID ? null : estimatedSize;
    partialResponseFile = partialResponseFile === VOID ? null : partialResponseFile;
    this.oni_1 = blobUrl;
    this.pni_1 = transferJobItemUid;
    this.qni_1 = lockIdToRelease;
    this.rni_1 = estimatedSize;
    this.sni_1 = partialResponseFile;
  }
  protoOf(BlobTransferJobItem).toString = function () {
    return 'BlobTransferJobItem(blobUrl=' + this.oni_1 + ', transferJobItemUid=' + this.pni_1 + ', lockIdToRelease=' + this.qni_1.toString() + ', estimatedSize=' + toString_0(this.rni_1) + ', partialResponseFile=' + this.sni_1 + ')';
  };
  protoOf(BlobTransferJobItem).hashCode = function () {
    var result = getStringHashCode(this.oni_1);
    result = imul(result, 31) + this.pni_1 | 0;
    result = imul(result, 31) + this.qni_1.hashCode() | 0;
    result = imul(result, 31) + (this.rni_1 == null ? 0 : this.rni_1.hashCode()) | 0;
    result = imul(result, 31) + (this.sni_1 == null ? 0 : getStringHashCode(this.sni_1)) | 0;
    return result;
  };
  protoOf(BlobTransferJobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferJobItem))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferJobItem ? other : THROW_CCE();
    if (!(this.oni_1 === tmp0_other_with_cast.oni_1))
      return false;
    if (!(this.pni_1 === tmp0_other_with_cast.pni_1))
      return false;
    if (!this.qni_1.equals(tmp0_other_with_cast.qni_1))
      return false;
    if (!equals(this.rni_1, tmp0_other_with_cast.rni_1))
      return false;
    if (!(this.sni_1 == tmp0_other_with_cast.sni_1))
      return false;
    return true;
  };
  function BlobTransferProgressUpdate(transferItem, bytesTransferred) {
    this.tni_1 = transferItem;
    this.uni_1 = bytesTransferred;
  }
  protoOf(BlobTransferProgressUpdate).toString = function () {
    return 'Uid #' + this.tni_1.pni_1 + ' transferred=' + this.uni_1.toString() + ' bytes';
  };
  protoOf(BlobTransferProgressUpdate).hashCode = function () {
    var result = this.tni_1.hashCode();
    result = imul(result, 31) + this.uni_1.hashCode() | 0;
    return result;
  };
  protoOf(BlobTransferProgressUpdate).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferProgressUpdate))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferProgressUpdate ? other : THROW_CCE();
    if (!this.tni_1.equals(tmp0_other_with_cast.tni_1))
      return false;
    if (!this.uni_1.equals(tmp0_other_with_cast.uni_1))
      return false;
    return true;
  };
  function BlobTransferStatusUpdate(transferItem, status) {
    this.vni_1 = transferItem;
    this.wni_1 = status;
  }
  protoOf(BlobTransferStatusUpdate).toString = function () {
    return 'BlobTransferStatusUpdate(transferItem=' + this.vni_1 + ', status=' + this.wni_1 + ')';
  };
  protoOf(BlobTransferStatusUpdate).hashCode = function () {
    var result = this.vni_1.hashCode();
    result = imul(result, 31) + this.wni_1 | 0;
    return result;
  };
  protoOf(BlobTransferStatusUpdate).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferStatusUpdate))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferStatusUpdate ? other : THROW_CCE();
    if (!this.vni_1.equals(tmp0_other_with_cast.vni_1))
      return false;
    if (!(this.wni_1 === tmp0_other_with_cast.wni_1))
      return false;
    return true;
  };
  function CancelDownloadUseCase() {
  }
  function MakeContentEntryAvailableOfflineUseCase(repo, nodeIdAndAuth, enqueueContentManifestDownloadUseCase) {
    this.xni_1 = repo;
    this.yni_1 = nodeIdAndAuth;
    this.zni_1 = enqueueContentManifestDownloadUseCase;
  }
  function OpenBlobItem(uri, mimeType, fileName, fileSize) {
    this.anj_1 = uri;
    this.bnj_1 = mimeType;
    this.cnj_1 = fileName;
    this.dnj_1 = fileSize;
  }
  protoOf(OpenBlobItem).toString = function () {
    return 'OpenBlobItem(uri=' + this.anj_1 + ', mimeType=' + this.bnj_1 + ', fileName=' + this.cnj_1 + ', fileSize=' + this.dnj_1.toString() + ')';
  };
  protoOf(OpenBlobItem).hashCode = function () {
    var result = getStringHashCode(this.anj_1);
    result = imul(result, 31) + getStringHashCode(this.bnj_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.cnj_1) | 0;
    result = imul(result, 31) + this.dnj_1.hashCode() | 0;
    return result;
  };
  protoOf(OpenBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpenBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof OpenBlobItem ? other : THROW_CCE();
    if (!(this.anj_1 === tmp0_other_with_cast.anj_1))
      return false;
    if (!(this.bnj_1 === tmp0_other_with_cast.bnj_1))
      return false;
    if (!(this.cnj_1 === tmp0_other_with_cast.cnj_1))
      return false;
    if (!this.dnj_1.equals(tmp0_other_with_cast.dnj_1))
      return false;
    return true;
  };
  function OpenBlobUiUseCase$invoke$lambda($onUiUpdate, $openItem) {
    return function (transferred, total) {
      $onUiUpdate(new OpeningBlobState($openItem, transferred, total));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$14(_this__u8e3s4, openItem, onUiUpdate, intent, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mnj_1 = _this__u8e3s4;
    this.nnj_1 = openItem;
    this.onj_1 = onUiUpdate;
    this.pnj_1 = intent;
  }
  protoOf($invokeCOROUTINE$14).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.onj_1(new OpeningBlobState(this.nnj_1, new Long(0, 0), new Long(0, 0)));
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.mnj_1.qnj_1.snj(this.nnj_1, OpenBlobUiUseCase$invoke$lambda(this.onj_1, this.nnj_1), this.pnj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.onj_1(null);
            this.id_1 = 4;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.id_1 = 4;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().r5k('OpenBlobUiCase: could not open ' + this.nnj_1, e);
              if (!(e instanceof CancellationException)) {
                var tmp_1 = new Long(0, 0);
                var tmp_2 = new Long(0, 0);
                var tmp0_elvis_lhs = e.message;
                this.onj_1(new OpeningBlobState(this.nnj_1, tmp_1, tmp_2, tmp0_elvis_lhs == null ? this.mnj_1.rnj_1.rnd(strings_getInstance().hlj_1) : tmp0_elvis_lhs));
              }
              this.hd_1 = 3;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            this.id_1 = 4;
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function OpenBlobUiUseCase(openBlobUseCase, systemImpl) {
    this.qnj_1 = openBlobUseCase;
    this.rnj_1 = systemImpl;
  }
  protoOf(OpenBlobUiUseCase).tnj = function (openItem, onUiUpdate, intent, $completion) {
    var tmp = new $invokeCOROUTINE$14(this, openItem, onUiUpdate, intent, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  var OpenBlobIntent_VIEW_instance;
  var OpenBlobIntent_SEND_instance;
  var OpenBlobIntent_entriesInitialized;
  function OpenBlobIntent_initEntries() {
    if (OpenBlobIntent_entriesInitialized)
      return Unit_instance;
    OpenBlobIntent_entriesInitialized = true;
    OpenBlobIntent_VIEW_instance = new OpenBlobIntent('VIEW', 0);
    OpenBlobIntent_SEND_instance = new OpenBlobIntent('SEND', 1);
  }
  function OpenBlobIntent(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function OpenBlobIntent_VIEW_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_VIEW_instance;
  }
  function OpenBlobIntent_SEND_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_SEND_instance;
  }
  function OpenBlobUseCase() {
  }
  function OpeningBlobState(item, bytesReady, totalBytes, error) {
    error = error === VOID ? null : error;
    this.unj_1 = item;
    this.vnj_1 = bytesReady;
    this.wnj_1 = totalBytes;
    this.xnj_1 = error;
  }
  protoOf(OpeningBlobState).toString = function () {
    return 'OpeningBlobState(item=' + this.unj_1 + ', bytesReady=' + this.vnj_1.toString() + ', totalBytes=' + this.wnj_1.toString() + ', error=' + this.xnj_1 + ')';
  };
  protoOf(OpeningBlobState).hashCode = function () {
    var result = this.unj_1.hashCode();
    result = imul(result, 31) + this.vnj_1.hashCode() | 0;
    result = imul(result, 31) + this.wnj_1.hashCode() | 0;
    result = imul(result, 31) + (this.xnj_1 == null ? 0 : getStringHashCode(this.xnj_1)) | 0;
    return result;
  };
  protoOf(OpeningBlobState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpeningBlobState))
      return false;
    var tmp0_other_with_cast = other instanceof OpeningBlobState ? other : THROW_CCE();
    if (!this.unj_1.equals(tmp0_other_with_cast.unj_1))
      return false;
    if (!this.vnj_1.equals(tmp0_other_with_cast.vnj_1))
      return false;
    if (!this.wnj_1.equals(tmp0_other_with_cast.wnj_1))
      return false;
    if (!(this.xnj_1 == tmp0_other_with_cast.xnj_1))
      return false;
    return true;
  };
  function updateUris(_this__u8e3s4, $this, blobs, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(_this__u8e3s4, VOID, SaveAndUploadLocalUrisUseCase$updateUris$slambda_0(blobs, _this__u8e3s4, timeNow, null), $completion);
  }
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation) {
    this.gnk_1 = $blobs;
    this.hnk_1 = $this_updateUris;
    this.ink_1 = $timeNow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).smw = function (_anonymous_parameter_0__qggqh8, $completion) {
    var tmp = this.tmw(_anonymous_parameter_0__qggqh8, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.knk_1 = this.gnk_1;
            this.lnk_1 = this.knk_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.lnk_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.mnk_1 = this.lnk_1.e();
            var tmp_1 = this;
            tmp_1.nnk_1 = this.mnk_1;
            this.onk_1 = this.nnk_1.qnk_1;
            if (this.onk_1 === 90) {
              this.hd_1 = 2;
              suspendResult = this.hnk_1.x7k().sc1(this.nnk_1.pnk_1, this.nnk_1.snk_1, this.ink_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).tmw = function (_anonymous_parameter_0__qggqh8, completion) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda(this.gnk_1, this.hnk_1, this.ink_1, completion);
    i.jnk_1 = _anonymous_parameter_0__qggqh8;
    return i;
  };
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda_0($blobs, $this_updateUris, $timeNow, resultContinuation) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation);
    var l = function (_anonymous_parameter_0__qggqh8, $completion) {
      return i.smw(_anonymous_parameter_0__qggqh8, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$15(_this__u8e3s4, localUrisToSave, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fnl_1 = _this__u8e3s4;
    this.gnl_1 = localUrisToSave;
  }
  protoOf($invokeCOROUTINE$15).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;
            suspendResult = this.fnl_1.jnl_1.nnl(this.gnl_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hnl_1 = suspendResult;
            this.inl_1 = this.fnl_1.knl_1;
            if (!(this.inl_1 == null)) {
              this.hd_1 = 3;
              suspendResult = updateUris(this.fnl_1.lnl_1, this.fnl_1, this.hnl_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              var tmp0_elvis_lhs = this.fnl_1.mnl_1;
              suspendResult = updateUris(tmp0_elvis_lhs == null ? this.fnl_1.lnl_1 : tmp0_elvis_lhs, this.fnl_1, this.hnl_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var this_0 = this.hnl_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp0_blobUrl = item.snk_1;
              var tmp1_entityUid = item.pnk_1;
              var tmp2_tableId = item.qnk_1;
              var tmp3_retentionLockIdToRelease = item.tnk_1;
              destination.i1(new EnqueueBlobUploadItem(tmp0_blobUrl, tmp2_tableId, tmp1_entityUid, tmp3_retentionLockIdToRelease));
            }

            suspendResult = this.inl_1.onl(destination, randomUuidAsString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          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 SaveAndUploadLocalUrisUseCase(saveLocalUrisAsBlobsUseCase, enqueueBlobUploadClientUseCase, activeDb, activeRepo) {
    this.jnl_1 = saveLocalUrisAsBlobsUseCase;
    this.knl_1 = enqueueBlobUploadClientUseCase;
    this.lnl_1 = activeDb;
    this.mnl_1 = activeRepo;
  }
  protoOf(SaveAndUploadLocalUrisUseCase).pnl = function (localUrisToSave, $completion) {
    var tmp = new $invokeCOROUTINE$15(this, localUrisToSave, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_33() {
  }
  protoOf(Companion_33).s4x = function () {
    return $serializer_getInstance_44();
  };
  var Companion_instance_81;
  function Companion_getInstance_51() {
    return Companion_instance_81;
  }
  function $serializer_32() {
    $serializer_instance_32 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.blob.savelocaluris.SaveLocalUrisAsBlobsUseCase.SavedBlob', this, 8);
    tmp0_serialDesc.y4l('entityUid', false);
    tmp0_serialDesc.y4l('tableId', false);
    tmp0_serialDesc.y4l('localUri', false);
    tmp0_serialDesc.y4l('blobUrl', false);
    tmp0_serialDesc.y4l('retentionLockId', true);
    tmp0_serialDesc.y4l('integrity', false);
    tmp0_serialDesc.y4l('mimeType', false);
    tmp0_serialDesc.y4l('storageSize', false);
    this.qnl_1 = tmp0_serialDesc;
  }
  protoOf($serializer_32).v4a = function () {
    return this.qnl_1;
  };
  protoOf($serializer_32).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_32).x4a = function (decoder) {
    var tmp0_desc = this.qnl_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = new Long(0, 0);
    var tmp12_input = decoder.n4e(tmp0_desc);
    if (tmp12_input.c4f()) {
      tmp4_local0 = tmp12_input.t4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.s4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.x4e(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.x4e(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.t4e(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.x4e(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.x4e(tmp0_desc, 6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.t4e(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.t4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.s4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.x4e(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.x4e(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.t4e(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.x4e(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.x4e(tmp0_desc, 6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.t4e(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.o4e(tmp0_desc);
    return SavedBlob_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_32).rnl = function (encoder, value) {
    var tmp0_desc = this.qnl_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.x4f(tmp0_desc, 0, value.pnk_1);
    tmp1_output.w4f(tmp0_desc, 1, value.qnk_1);
    tmp1_output.b4g(tmp0_desc, 2, value.rnk_1);
    tmp1_output.b4g(tmp0_desc, 3, value.snk_1);
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !value.tnk_1.equals(new Long(0, 0))) {
      tmp1_output.x4f(tmp0_desc, 4, value.tnk_1);
    }
    tmp1_output.b4g(tmp0_desc, 5, value.unk_1);
    tmp1_output.b4g(tmp0_desc, 6, value.vnk_1);
    tmp1_output.x4f(tmp0_desc, 7, value.wnk_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_32).w4a = function (encoder, value) {
    return this.rnl(encoder, value instanceof SavedBlob ? value : THROW_CCE());
  };
  var $serializer_instance_32;
  function $serializer_getInstance_44() {
    if ($serializer_instance_32 == null)
      new $serializer_32();
    return $serializer_instance_32;
  }
  function SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, $this) {
    if (!(239 === (239 & seen1))) {
      throwMissingFieldException(seen1, 239, $serializer_getInstance_44().qnl_1);
    }
    $this.pnk_1 = entityUid;
    $this.qnk_1 = tableId;
    $this.rnk_1 = localUri;
    $this.snk_1 = blobUrl;
    if (0 === (seen1 & 16))
      $this.tnk_1 = new Long(0, 0);
    else
      $this.tnk_1 = retentionLockId;
    $this.unk_1 = integrity;
    $this.vnk_1 = mimeType;
    $this.wnk_1 = storageSize;
    return $this;
  }
  function SavedBlob_init_$Create$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker) {
    return SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, objectCreate(protoOf(SavedBlob)));
  }
  function SaveLocalUriAsBlobItem(localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders) {
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    tableId = tableId === VOID ? 0 : tableId;
    mimeType = mimeType === VOID ? null : mimeType;
    deleteLocalUriAfterSave = deleteLocalUriAfterSave === VOID ? false : deleteLocalUriAfterSave;
    createRetentionLock = createRetentionLock === VOID ? false : createRetentionLock;
    extraHeaders = extraHeaders === VOID ? Companion_instance_130.g4k() : extraHeaders;
    this.snl_1 = localUri;
    this.tnl_1 = entityUid;
    this.unl_1 = tableId;
    this.vnl_1 = mimeType;
    this.wnl_1 = deleteLocalUriAfterSave;
    this.xnl_1 = createRetentionLock;
    this.ynl_1 = extraHeaders;
  }
  protoOf(SaveLocalUriAsBlobItem).toString = function () {
    return 'SaveLocalUriAsBlobItem(localUri=' + this.snl_1 + ', entityUid=' + this.tnl_1.toString() + ', tableId=' + this.unl_1 + ', mimeType=' + this.vnl_1 + ', deleteLocalUriAfterSave=' + this.wnl_1 + ', createRetentionLock=' + this.xnl_1 + ', extraHeaders=' + this.ynl_1 + ')';
  };
  protoOf(SaveLocalUriAsBlobItem).hashCode = function () {
    var result = getStringHashCode(this.snl_1);
    result = imul(result, 31) + this.tnl_1.hashCode() | 0;
    result = imul(result, 31) + this.unl_1 | 0;
    result = imul(result, 31) + (this.vnl_1 == null ? 0 : getStringHashCode(this.vnl_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wnl_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xnl_1) | 0;
    result = imul(result, 31) + hashCode(this.ynl_1) | 0;
    return result;
  };
  protoOf(SaveLocalUriAsBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SaveLocalUriAsBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof SaveLocalUriAsBlobItem ? other : THROW_CCE();
    if (!(this.snl_1 === tmp0_other_with_cast.snl_1))
      return false;
    if (!this.tnl_1.equals(tmp0_other_with_cast.tnl_1))
      return false;
    if (!(this.unl_1 === tmp0_other_with_cast.unl_1))
      return false;
    if (!(this.vnl_1 == tmp0_other_with_cast.vnl_1))
      return false;
    if (!(this.wnl_1 === tmp0_other_with_cast.wnl_1))
      return false;
    if (!(this.xnl_1 === tmp0_other_with_cast.xnl_1))
      return false;
    if (!equals(this.ynl_1, tmp0_other_with_cast.ynl_1))
      return false;
    return true;
  };
  function SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    retentionLockId = retentionLockId === VOID ? new Long(0, 0) : retentionLockId;
    this.pnk_1 = entityUid;
    this.qnk_1 = tableId;
    this.rnk_1 = localUri;
    this.snk_1 = blobUrl;
    this.tnk_1 = retentionLockId;
    this.unk_1 = integrity;
    this.vnk_1 = mimeType;
    this.wnk_1 = storageSize;
  }
  protoOf(SavedBlob).znl = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    return new SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).anm = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, $super) {
    entityUid = entityUid === VOID ? this.pnk_1 : entityUid;
    tableId = tableId === VOID ? this.qnk_1 : tableId;
    localUri = localUri === VOID ? this.rnk_1 : localUri;
    blobUrl = blobUrl === VOID ? this.snk_1 : blobUrl;
    retentionLockId = retentionLockId === VOID ? this.tnk_1 : retentionLockId;
    integrity = integrity === VOID ? this.unk_1 : integrity;
    mimeType = mimeType === VOID ? this.vnk_1 : mimeType;
    storageSize = storageSize === VOID ? this.wnk_1 : storageSize;
    return $super === VOID ? this.znl(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) : $super.znl.call(this, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).toString = function () {
    return 'SavedBlob(entityUid=' + this.pnk_1.toString() + ', tableId=' + this.qnk_1 + ', localUri=' + this.rnk_1 + ', blobUrl=' + this.snk_1 + ', retentionLockId=' + this.tnk_1.toString() + ', integrity=' + this.unk_1 + ', mimeType=' + this.vnk_1 + ', storageSize=' + this.wnk_1.toString() + ')';
  };
  protoOf(SavedBlob).hashCode = function () {
    var result = this.pnk_1.hashCode();
    result = imul(result, 31) + this.qnk_1 | 0;
    result = imul(result, 31) + getStringHashCode(this.rnk_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.snk_1) | 0;
    result = imul(result, 31) + this.tnk_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.unk_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.vnk_1) | 0;
    result = imul(result, 31) + this.wnk_1.hashCode() | 0;
    return result;
  };
  protoOf(SavedBlob).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SavedBlob))
      return false;
    var tmp0_other_with_cast = other instanceof SavedBlob ? other : THROW_CCE();
    if (!this.pnk_1.equals(tmp0_other_with_cast.pnk_1))
      return false;
    if (!(this.qnk_1 === tmp0_other_with_cast.qnk_1))
      return false;
    if (!(this.rnk_1 === tmp0_other_with_cast.rnk_1))
      return false;
    if (!(this.snk_1 === tmp0_other_with_cast.snk_1))
      return false;
    if (!this.tnk_1.equals(tmp0_other_with_cast.tnk_1))
      return false;
    if (!(this.unk_1 === tmp0_other_with_cast.unk_1))
      return false;
    if (!(this.vnk_1 === tmp0_other_with_cast.vnk_1))
      return false;
    if (!this.wnk_1.equals(tmp0_other_with_cast.wnk_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobsUseCase$invoke$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function SaveLocalUrisAsBlobsUseCase() {
  }
  function EnqueueSavePictureUseCase() {
  }
  function imageDaoForTable(_this__u8e3s4, $this, tableId) {
    var tmp;
    if (tableId === 50) {
      tmp = _this__u8e3s4.k7k();
    } else {
      if (tableId === 125) {
        tmp = _this__u8e3s4.i7l();
      } else {
        if (tableId === 6677) {
          tmp = _this__u8e3s4.v7l();
        } else {
          if (tableId === 6678) {
            tmp = _this__u8e3s4.w7l();
          } else {
            tmp = null;
          }
        }
      }
    }
    return tmp;
  }
  function Companion_34() {
    this.dnm_1 = 160;
  }
  var Companion_instance_82;
  function Companion_getInstance_52() {
    return Companion_instance_82;
  }
  function $invokeCOROUTINE$16(_this__u8e3s4, entityUid, tableId, pictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mnm_1 = _this__u8e3s4;
    this.nnm_1 = entityUid;
    this.onm_1 = tableId;
    this.pnm_1 = pictureUri;
  }
  protoOf($invokeCOROUTINE$16).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 21;
            var tmp0_safe_receiver = this.pnm_1;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              var tmp_1;
              if (charSequenceLength(tmp0_safe_receiver) === 0) {
                tmp_1 = null;
              } else {
                tmp_1 = tmp0_safe_receiver;
              }
              tmp_0 = tmp_1;
            }

            if (!(tmp_0 == null)) {
              this.qnm_1 = Companion_getInstance_3().q2t(this.pnm_1);
              this.rnm_1 = this.mnm_1.ynn_1;
              if (this.rnm_1 == null) {
                this.snm_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                suspendResult = getLocalUriIfRemote(this.rnm_1, this.qnm_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.tnm_1 = imageDaoForTable(this.mnm_1.vnn_1, this.mnm_1, this.onm_1);
              if (this.tnm_1 == null) {
                this.unm_1 = null;
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.tnm_1.jba(this.nnm_1, null, null, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp_2 = this;
            tmp_2.unm_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 20;
            continue $sm;
          case 3:
            this.snm_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.vnm_1 = this.snm_1;
            this.wnm_1 = this.vnm_1 == null ? this.qnm_1 : this.vnm_1;
            this.hd_1 = 5;
            suspendResult = this.mnm_1.wnn_1.znn(this.wnm_1.toString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.xnm_1 = suspendResult;
            this.hd_1 = 6;
            suspendResult = this.mnm_1.wnn_1.znn(this.wnm_1.toString(), VOID, new CompressParams(160, 160), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.ynm_1 = suspendResult;
            this.znm_1 = this.mnm_1.snn_1;
            var tmp_3 = this;
            tmp_3.ann_1 = ArrayList_init_$Create$();
            var tmp_4 = this;
            tmp_4.bnn_1 = this.ann_1;
            if (this.xnm_1 == null)
              null;
            else {
              this.bnn_1.i1(new SaveLocalUriAsBlobItem(this.xnm_1.ano_1, this.nnm_1, this.onm_1, this.xnm_1.bno_1, true, true));
            }

            if (this.ynm_1 == null)
              null;
            else {
              this.bnn_1.i1(new SaveLocalUriAsBlobItem(this.ynm_1.ano_1, this.nnm_1, this.onm_1, this.ynm_1.bno_1, true, true));
            }

            if (this.xnm_1 == null ? true : this.ynm_1 == null) {
              this.hd_1 = 7;
              suspendResult = isRemote(this.qnm_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.cnn_1 = false;
              this.hd_1 = 8;
              continue $sm;
            }

          case 7:
            this.dnn_1 = suspendResult;
            this.cnn_1 = !this.dnn_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.enn_1 = this.cnn_1;
            if (this.enn_1) {
              this.bnn_1.i1(new SaveLocalUriAsBlobItem(this.pnm_1, this.nnm_1, this.onm_1, VOID, VOID, true));
            }

            this.fnn_1 = this.ann_1;
            this.gnn_1 = this.fnn_1.f3();
            this.hd_1 = 9;
            suspendResult = this.znm_1.nnl(this.gnn_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.hnn_1 = suspendResult;
            this.hd_1 = 10;
            suspendResult = this.mnm_1.xnn_1.eno(listOf_0(this.pnm_1), true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.hnn_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.rnk_1 === this.pnm_1) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp3_safe_receiver = tmp$ret$0;
            var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.snk_1;
            tmp_5.inn_1 = tmp4_elvis_lhs == null ? this.qnm_1.toString() : tmp4_elvis_lhs;
            var tmp_6 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_0 = this.hnn_1.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver_0 = this.xnm_1;
                if (element_0.rnk_1 === (tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ano_1)) {
                  tmp$ret$2 = element_0;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            var tmp5_safe_receiver = tmp$ret$2;
            var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.snk_1;
            tmp_6.jnn_1 = tmp6_elvis_lhs == null ? this.inn_1 : tmp6_elvis_lhs;
            var tmp_7 = this;
            var tmp$ret$4;
            l$ret$5: do {
              var tmp0_iterator_1 = this.hnn_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp0_safe_receiver_1 = this.ynm_1;
                if (element_1.rnk_1 === (tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.ano_1)) {
                  tmp$ret$4 = element_1;
                  break l$ret$5;
                }
              }
              tmp$ret$4 = null;
            }
             while (false);
            var tmp7_safe_receiver = tmp$ret$4;
            var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.snk_1;
            tmp_7.knn_1 = tmp8_elvis_lhs == null ? this.inn_1 : tmp8_elvis_lhs;
            if (!(this.mnm_1.tnn_1 == null)) {
              if (this.xnm_1 == null ? true : this.ynm_1 == null) {
                this.hd_1 = 13;
                suspendResult = isRemote(this.qnm_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.mnn_1 = false;
                this.hd_1 = 14;
                continue $sm;
              }
            } else {
              this.nnn_1 = imageDaoForTable(this.mnm_1.vnn_1, this.mnm_1, this.onm_1);
              if (this.nnn_1 == null) {
                this.onn_1 = null;
                this.hd_1 = 12;
                continue $sm;
              } else {
                this.hd_1 = 11;
                suspendResult = this.nnn_1.jba(this.nnm_1, this.jnn_1, this.knn_1, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 11:
            var tmp_8 = this;
            tmp_8.onn_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.hd_1 = 19;
            continue $sm;
          case 13:
            this.mnn_1 = suspendResult;
            this.hd_1 = 14;
            continue $sm;
          case 14:
            if (this.mnn_1) {
              var tmp_9 = this;
              tmp_9.lnn_1 = new EnqueueBlobUploadItem(this.qnm_1.toString(), this.onm_1, this.nnm_1, new Long(0, 0));
              this.hd_1 = 15;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.lnn_1 = null;
              this.hd_1 = 15;
              continue $sm;
            }

          case 15:
            this.pnn_1 = this.lnn_1;
            this.qnn_1 = imageDaoForTable(this.mnm_1.unn_1, this.mnm_1, this.onm_1);
            if (this.qnn_1 == null) {
              this.rnn_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              this.hd_1 = 16;
              suspendResult = this.qnn_1.jba(this.nnm_1, this.jnn_1, this.knn_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            var tmp_11 = this;
            tmp_11.rnn_1 = Unit_instance;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            Napier_getInstance().n5k('SavePictureUseCase: Set picture url = ' + this.jnn_1 + ' on entity=' + this.nnm_1.toString() + ' table=' + this.onm_1);
            this.hd_1 = 18;
            var this_0 = this.hnn_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator_2 = this_0.w();
            while (tmp0_iterator_2.f()) {
              var item = tmp0_iterator_2.e();
              destination.i1(new EnqueueBlobUploadItem(item.snk_1, this.onm_1, this.nnm_1, item.tnk_1));
            }

            var this_1 = listOf_0(this.pnn_1);
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_3 = this_1.w();
            while (tmp0_iterator_3.f()) {
              var element_2 = tmp0_iterator_3.e();
              if (element_2 == null)
                null;
              else {
                destination_0.i1(element_2);
              }
            }

            suspendResult = this.mnm_1.tnn_1.onl(plus(destination, destination_0), randomUuidAsString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 18:
            this.hd_1 = 19;
            continue $sm;
          case 19:
            this.hd_1 = 20;
            continue $sm;
          case 20:
            return Unit_instance;
          case 21:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 21) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SavePictureUseCase(saveLocalUrisAsBlobUseCase, enqueueBlobUploadClientUseCase, db, repo, compressImageUseCase, deleteUrisUseCase, getStoragePathForUrlUseCase) {
    getStoragePathForUrlUseCase = getStoragePathForUrlUseCase === VOID ? null : getStoragePathForUrlUseCase;
    this.snn_1 = saveLocalUrisAsBlobUseCase;
    this.tnn_1 = enqueueBlobUploadClientUseCase;
    this.unn_1 = db;
    this.vnn_1 = repo;
    this.wnn_1 = compressImageUseCase;
    this.xnn_1 = deleteUrisUseCase;
    this.ynn_1 = getStoragePathForUrlUseCase;
  }
  protoOf(SavePictureUseCase).cnm = function (entityUid, tableId, pictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$16(this, entityUid, tableId, pictureUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function TransferJobItemStatusUpdater$commit$slambda$lambda($updateTransferJobStatusUid, $numUpdates) {
    return function () {
      return 'TransferJobItemStatusUpdater: update status complete for ' + ('' + $updateTransferJobStatusUid + ' updates=' + $numUpdates);
    };
  }
  function TransferJobItemStatusUpdater$updateJob$slambda(this$0, resultContinuation) {
    this.nno_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!get_isActive(this.ono_1)) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.hd_1 = 2;
            suspendResult = delay(this.nno_1.rno_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.nno_1.wno(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).v1m = function ($this$launch, completion) {
    var i = new TransferJobItemStatusUpdater$updateJob$slambda(this.nno_1, completion);
    i.ono_1 = $this$launch;
    return i;
  };
  function TransferJobItemStatusUpdater$updateJob$slambda_0(this$0, resultContinuation) {
    var i = new TransferJobItemStatusUpdater$updateJob$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TransferJobItemStatusUpdater$commit$slambda($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation) {
    this.fnp_1 = $progressUpdatesToCommit;
    this.gnp_1 = this$0;
    this.hnp_1 = $statusUpdatesToCommit;
    this.inp_1 = $repoNodeId;
    this.jnp_1 = $updateTransferJobStatusUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$commit$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            tmp_0.lnp_1 = this.fnp_1;
            this.mnp_1 = this.lnp_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.mnp_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.nnp_1 = this.mnp_1.e();
            var tmp_1 = this;
            tmp_1.onp_1 = this.nnp_1;
            this.hd_1 = 2;
            suspendResult = this.gnp_1.pno_1.p7l().nhx(this.onp_1.tni_1.pni_1, this.onp_1.uni_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 1;
            continue $sm;
          case 3:
            var tmp_2 = this;
            tmp_2.pnp_1 = this.hnp_1;
            this.qnp_1 = this.pnp_1.w();
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (!this.qnp_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.rnp_1 = this.qnp_1.e();
            var tmp_3 = this;
            tmp_3.snp_1 = this.rnp_1;
            this.hd_1 = 5;
            suspendResult = this.gnp_1.pno_1.p7l().ohx(this.snp_1.vni_1.pni_1, this.snp_1.wni_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            if (this.snp_1.wni_1 === TransferJobItemStatus_COMPLETE_getInstance().ijf_1 ? !(this.inp_1 == null) : false) {
              this.hd_1 = 6;
              suspendResult = this.gnp_1.pno_1.p7l().phx(this.inp_1, this.snp_1.vni_1.pni_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.hd_1 = 4;
            continue $sm;
          case 8:
            if (!(this.jnp_1 === 0)) {
              this.hd_1 = 9;
              suspendResult = this.gnp_1.pno_1.o7l().dhv(this.jnp_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            var numUpdates = suspendResult;
            var tmp_4 = Napier_getInstance();
            tmp_4.p5k(VOID, VOID, TransferJobItemStatusUpdater$commit$slambda$lambda(this.jnp_1, numUpdates));
            this.hd_1 = 10;
            continue $sm;
          case 10:
            return Unit_instance;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).tmw = function (it, completion) {
    var i = new TransferJobItemStatusUpdater$commit$slambda(this.fnp_1, this.gnp_1, this.hnp_1, this.inp_1, this.jnp_1, completion);
    i.knp_1 = it;
    return i;
  };
  function TransferJobItemStatusUpdater$commit$slambda_0($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation) {
    var i = new TransferJobItemStatusUpdater$commit$slambda($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $commitCOROUTINE$17(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bnq_1 = _this__u8e3s4;
    this.cnq_1 = updateTransferJobStatusUid;
  }
  protoOf($commitCOROUTINE$17).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.dnq_1 = this.bnq_1.tno_1.atomicfu$getAndSet(emptyList());
            this.enq_1 = this.bnq_1.uno_1.atomicfu$getAndSet(emptyList());
            var tmp_0 = this;
            var this_0 = this.dnq_1;
            var map = LinkedHashMap_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var key = element.tni_1.pni_1;
              map.s(key, element);
            }

            tmp_0.fnq_1 = toList(map.p2());
            var tmp_1 = this;
            var this_1 = this.enq_1;
            var map_0 = LinkedHashMap_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var key_0 = element_0.vni_1.pni_1;
              map_0.s(key_0, element_0);
            }

            tmp_1.gnq_1 = toList(map_0.p2());
            var tmp_2 = this;
            var tmp_3 = this.bnq_1.qno_1;
            var tmp0_safe_receiver = (!(tmp_3 == null) ? isInterface(tmp_3, DoorDatabaseRepository) : false) ? tmp_3 : null;
            tmp_2.hnq_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r67();
            var tmp_4 = this;
            var this_2 = this.bnq_1.pno_1;
            var tmp_5;
            var tmp_6;
            var tmp_7;
            if (!this.fnq_1.c1()) {
              tmp_7 = true;
            } else {
              tmp_7 = !this.gnq_1.c1();
            }

            if (tmp_7) {
              tmp_6 = true;
            } else {
              tmp_6 = !(this.cnq_1 === 0);
            }

            if (tmp_6) {
              tmp_5 = this_2;
            } else {
              tmp_5 = null;
            }

            tmp_4.inq_1 = tmp_5;
            if (this.inq_1 == null) {
              this.jnq_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = withDoorTransactionAsync(this.inq_1, VOID, TransferJobItemStatusUpdater$commit$slambda_0(this.fnq_1, this.bnq_1, this.gnq_1, this.hnq_1, this.cnq_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_8 = this;
            tmp_8.jnq_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $onFinishedCOROUTINE$18(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.snq_1 = _this__u8e3s4;
    this.tnq_1 = updateTransferJobStatusUid;
  }
  protoOf($onFinishedCOROUTINE$18).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!this.snq_1.sno_1.atomicfu$getAndSet(true)) {
              this.snq_1.vno_1.mr();
              this.hd_1 = 1;
              suspendResult = this.snq_1.unq(this.tnq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function TransferJobItemStatusUpdater(db, repo, scope, commitInterval) {
    commitInterval = commitInterval === VOID ? new Long(500, 0) : commitInterval;
    this.pno_1 = db;
    this.qno_1 = repo;
    this.rno_1 = commitInterval;
    this.sno_1 = atomic$boolean$1(false);
    this.tno_1 = atomic$ref$1(emptyList());
    this.uno_1 = atomic$ref$1(emptyList());
    var tmp = this;
    tmp.vno_1 = launch(scope, VOID, VOID, TransferJobItemStatusUpdater$updateJob$slambda_0(this, null));
  }
  protoOf(TransferJobItemStatusUpdater).vnq = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.tno_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.blob.transferjobitem.TransferJobItemStatusUpdater.onProgressUpdate.<anonymous>' call
        var upd = plus_1(cur, update);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(TransferJobItemStatusUpdater).wnq = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.uno_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.blob.transferjobitem.TransferJobItemStatusUpdater.onStatusUpdate.<anonymous>' call
        var upd = plus_1(cur, update);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(TransferJobItemStatusUpdater).unq = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $commitCOROUTINE$17(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).wno = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.unq(updateTransferJobStatusUid, $completion) : $super.unq.call(this, updateTransferJobStatusUid, $completion);
  };
  protoOf(TransferJobItemStatusUpdater).xnq = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $onFinishedCOROUTINE$18(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).ynq = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.xnq(updateTransferJobStatusUid, $completion) : $super.xnq.call(this, updateTransferJobStatusUid, $completion);
  };
  function $invokeCOROUTINE$19(_this__u8e3s4, db, tableId, entityUid, transferJobItemUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.hnr_1 = _this__u8e3s4;
    this.inr_1 = db;
    this.jnr_1 = tableId;
    this.knr_1 = entityUid;
    this.lnr_1 = transferJobItemUid;
  }
  protoOf($invokeCOROUTINE$19).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.mnr_1 = this.jnr_1;
            if (this.mnr_1 === 50) {
              this.hd_1 = 2;
              suspendResult = this.inr_1.k7k().xbh(this.knr_1, this.lnr_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.mnr_1 === 738) {
                this.hd_1 = 1;
                suspendResult = this.inr_1.n7l().xbh(this.knr_1, this.lnr_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UpdateTransferJobItemEtagUseCase() {
  }
  protoOf(UpdateTransferJobItemEtagUseCase).nnr = function (db, tableId, entityUid, transferJobItemUid, $completion) {
    var tmp = new $invokeCOROUTINE$19(this, db, tableId, entityUid, transferJobItemUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_35() {
    this.onr_1 = 'X-Blob-Response-';
    this.pnr_1 = 'Blob-Upload-Batch-Uuid';
  }
  var Companion_instance_83;
  function Companion_getInstance_53() {
    return Companion_instance_83;
  }
  function CancelBlobUploadClientUseCase() {
  }
  function EnqueueBlobUploadItem(blobUrl, tableId, entityUid, retentionLockIdToRelease) {
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    retentionLockIdToRelease = retentionLockIdToRelease === VOID ? new Long(0, 0) : retentionLockIdToRelease;
    this.qnr_1 = blobUrl;
    this.rnr_1 = tableId;
    this.snr_1 = entityUid;
    this.tnr_1 = retentionLockIdToRelease;
  }
  protoOf(EnqueueBlobUploadItem).toString = function () {
    return 'EnqueueBlobUploadItem(blobUrl=' + this.qnr_1 + ', tableId=' + this.rnr_1 + ', entityUid=' + this.snr_1.toString() + ', retentionLockIdToRelease=' + this.tnr_1.toString() + ')';
  };
  protoOf(EnqueueBlobUploadItem).hashCode = function () {
    var result = getStringHashCode(this.qnr_1);
    result = imul(result, 31) + this.rnr_1 | 0;
    result = imul(result, 31) + this.snr_1.hashCode() | 0;
    result = imul(result, 31) + this.tnr_1.hashCode() | 0;
    return result;
  };
  protoOf(EnqueueBlobUploadItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EnqueueBlobUploadItem))
      return false;
    var tmp0_other_with_cast = other instanceof EnqueueBlobUploadItem ? other : THROW_CCE();
    if (!(this.qnr_1 === tmp0_other_with_cast.qnr_1))
      return false;
    if (!(this.rnr_1 === tmp0_other_with_cast.rnr_1))
      return false;
    if (!this.snr_1.equals(tmp0_other_with_cast.snr_1))
      return false;
    if (!this.tnr_1.equals(tmp0_other_with_cast.tnr_1))
      return false;
    return true;
  };
  function EnqueueBlobUploadClientUseCase() {
  }
  function getLocalUriIfRemote(_this__u8e3s4, uri, $completion) {
    var tmp = new $getLocalUriIfRemoteCOROUTINE$20(_this__u8e3s4, uri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $getLocalUriIfRemoteCOROUTINE$20(_this__u8e3s4, uri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.dns_1 = _this__u8e3s4;
    this.ens_1 = uri;
  }
  protoOf($getLocalUriIfRemoteCOROUTINE$20).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = isRemote(this.ens_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (suspendResult) {
              this.gns_1 = Companion_getInstance_3();
              this.hd_1 = 2;
              suspendResult = this.dns_1.hns(this.ens_1.toString(), VOID, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.fns_1 = this.ens_1;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = ARGUMENT.ins_1;
            this.fns_1 = this.gns_1.q2t(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.fns_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetStoragePathForUrlUseCase$invoke$lambda(it) {
    return Unit_instance;
  }
  function GetStoragePathForUrlUseCase() {
  }
  function CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation) {
    this.tns_1 = $clazz;
    this.uns_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CreateNewClazzUseCase$invoke$slambda).nne = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.nne(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var this_0 = this.tns_1;
            var tmp_0;
            if (this_0.j8k_1 == null) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver != null) {
              var tmp_1 = tmp0_safe_receiver;
              Companion_getInstance_4();
              tmp_1.j8k_1 = randomString(6);
            }

            this.hd_1 = 1;
            suspendResult = this.uns_1.xns_1.t7j().insertAsync(this.tns_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wns_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = this.uns_1.xns_1.t7l();
            var tmp_3 = this.tns_1.m8j_1;
            Companion_getInstance_5();
            suspendResult = tmp_2.sdb(new CoursePermission(VOID, VOID, tmp_3, 1001, VOID, VOID, new Long(8703, 0)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            var tmp_4 = this.uns_1.xns_1.t7l();
            var tmp_5 = this.tns_1.m8j_1;
            Companion_getInstance_5();
            suspendResult = tmp_4.sdb(new CoursePermission(VOID, VOID, tmp_5, 1000, VOID, VOID, new Long(8193, 0)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return this.wns_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new CreateNewClazzUseCase$invoke$slambda(this.tns_1, this.uns_1, completion);
    i.vns_1 = it;
    return i;
  };
  function CreateNewClazzUseCase$invoke$slambda_0($clazz, this$0, resultContinuation) {
    var i = new CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.nne(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CreateNewClazzUseCase(repoOrDb) {
    this.xns_1 = repoOrDb;
  }
  protoOf(CreateNewClazzUseCase).yns = function (clazz, $completion) {
    return withDoorTransactionAsync(this.xns_1, VOID, CreateNewClazzUseCase$invoke$slambda_0(clazz, this, null), $completion);
  };
  function AlreadyEnroledInClassException() {
    Exception_init_$Init$_0(this);
    captureStack(this, AlreadyEnroledInClassException);
  }
  function AlreadyHasPendingRequestException() {
    IllegalStateException_init_$Init$_0(this);
    captureStack(this, AlreadyHasPendingRequestException);
  }
  function ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation) {
    this.hnt_1 = $approved;
    this.int_1 = this$0;
    this.jnt_1 = $enrolmentRequest;
    this.knt_1 = $effectiveClazz;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (this.hnt_1) {
              this.hd_1 = 1;
              var tmp_0 = this.jnt_1.aeq_1;
              var tmp_1 = this.jnt_1.ceq_1;
              var tmp_2 = ClazzEnrolment_init_$Create$(tmp_0, tmp_1, 1000);
              var tmp0_elvis_lhs = this.knt_1.e8k_1;
              suspendResult = this.int_1.qnt_1.tnt(tmp_2, tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.mnt_1 = 3;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var tmp_4 = this;
            tmp_4.mnt_1 = 2;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.nnt_1 = this.mnt_1;
            this.hd_1 = 3;
            suspendResult = this.int_1.pnt_1.s7l().jep(this.jnt_1.zep_1, this.nnt_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda(this.hnt_1, this.int_1, this.jnt_1, this.knt_1, completion);
    i.lnt_1 = it;
    return i;
  };
  function ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$21(_this__u8e3s4, enrolmentRequest, approved, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cnu_1 = _this__u8e3s4;
    this.dnu_1 = enrolmentRequest;
    this.enu_1 = approved;
  }
  protoOf($invokeCOROUTINE$21).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.cnu_1.ont_1.t7j().n8i(this.dnu_1.aeq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.fnu_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.fnu_1 == null) {
              throw IllegalStateException_init_$Create$('Class does not exist');
            } else {
              tmp_1 = this.fnu_1;
            }

            tmp_0.gnu_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = withDoorTransactionAsync(this.cnu_1.pnt_1, VOID, ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0(this.enu_1, this.cnu_1, this.dnu_1, this.gnu_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ApproveOrDeclinePendingEnrolmentUseCase(db, repo, enrolIntoCourseUseCase) {
    this.ont_1 = db;
    this.pnt_1 = repo;
    this.qnt_1 = enrolIntoCourseUseCase;
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase).hnu = function (enrolmentRequest, approved, $completion) {
    var tmp = new $invokeCOROUTINE$21(this, enrolmentRequest, approved, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation) {
    this.qnu_1 = $effectiveDb;
    this.rnu_1 = $enrolment;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).nne = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.nne(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).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.qnu_1.y7j().insertAsync(this.rnu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda(this.qnu_1, this.rnu_1, completion);
    i.snu_1 = it;
    return i;
  };
  function EnrolIntoCourseUseCase$invoke$slambda_0($effectiveDb, $enrolment, resultContinuation) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation);
    var l = function (it, $completion) {
      return i.nne(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EnrolIntoCourseUseCase(db, repo) {
    this.rnt_1 = db;
    this.snt_1 = repo;
  }
  protoOf(EnrolIntoCourseUseCase).tnt = function (enrolment, timeZoneId, $completion) {
    enrolment.z8n_1 = toLocalMidnight(Companion_getInstance_6().ulh(enrolment.z8n_1), timeZoneId).tlh();
    if (enrolment.a8o_1.c7(get_UNSET_DISTANT_FUTURE()) < 0) {
      enrolment.a8o_1 = toLocalEndOfDay(Companion_getInstance_6().ulh(enrolment.a8o_1), timeZoneId).tlh();
    }
    var tmp0_elvis_lhs = this.snt_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.rnt_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, EnrolIntoCourseUseCase$invoke$slambda_0(effectiveDb, enrolment, null), $completion);
  };
  function IApproveOrDeclinePendingEnrolmentRequestUseCase() {
  }
  function $invokeCOROUTINE$22(_this__u8e3s4, clazzCode, person, roleId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bnv_1 = _this__u8e3s4;
    this.cnv_1 = clazzCode;
    this.dnv_1 = person;
    this.env_1 = roleId;
  }
  protoOf($invokeCOROUTINE$22).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            suspendResult = this.bnv_1.inv_1.t7j().m8i(this.cnv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.fnv_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.fnv_1 == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_1 = this.fnv_1;
            }

            tmp_0.gnv_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = this.bnv_1.inv_1.s7l().hep(this.dnv_1.x9b_1, this.gnv_1.m8j_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (suspendResult) {
              throw new AlreadyHasPendingRequestException();
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            suspendResult = this.bnv_1.inv_1.y7j().c99(this.gnv_1.m8j_1, this.dnv_1.x9b_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hnv_1 = suspendResult;
            if (!this.hnv_1.c1()) {
              throw new AlreadyEnroledInClassException();
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            this.hd_1 = 6;
            var tmp_2 = this.bnv_1.inv_1.s7l();
            var tmp_3 = this.gnv_1.m8j_1;
            var tmp_4 = this.gnv_1.n8j_1;
            var tmp_5 = this.dnv_1.x9b_1;
            var tmp_6 = this.dnv_1.qjt();
            var tmp_7 = this.dnv_1.y9b_1;
            var tmp_8 = systemTimeInMillis();
            suspendResult = tmp_2.gep(new EnrolmentRequest(VOID, tmp_3, tmp_4, tmp_5, tmp_6, VOID, tmp_7, this.env_1, tmp_8, 1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            return Unit_instance;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function RequestEnrolmentUseCase(activeRepo) {
    this.inv_1 = activeRepo;
  }
  protoOf(RequestEnrolmentUseCase).jnv = function (clazzCode, person, roleId, $completion) {
    var tmp = new $invokeCOROUTINE$22(this, clazzCode, person, roleId, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SetClipboardStringUseCase() {
  }
  function Companion_36() {
  }
  var Companion_instance_84;
  function Companion_getInstance_54() {
    return Companion_instance_84;
  }
  function $serializer_33() {
    $serializer_instance_33 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.compress.CompressParams', this, 3);
    tmp0_serialDesc.y4l('maxWidth', true);
    tmp0_serialDesc.y4l('maxHeight', true);
    tmp0_serialDesc.y4l('compressionLevel', true);
    this.lnv_1 = tmp0_serialDesc;
  }
  protoOf($serializer_33).v4a = function () {
    return this.lnv_1;
  };
  protoOf($serializer_33).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), IntSerializer_getInstance(), CompressionLevelSerializer_getInstance()];
  };
  protoOf($serializer_33).x4a = function (decoder) {
    var tmp0_desc = this.lnv_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_input = decoder.n4e(tmp0_desc);
    if (tmp7_input.c4f()) {
      tmp4_local0 = tmp7_input.s4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.s4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.z4e(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.s4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.s4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.z4e(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.o4e(tmp0_desc);
    return CompressParams_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_33).mnv = function (encoder, value) {
    var tmp0_desc = this.lnv_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.nnv_1 === 1280)) {
      tmp1_output.w4f(tmp0_desc, 0, value.nnv_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.onv_1 === 1280)) {
      tmp1_output.w4f(tmp0_desc, 1, value.onv_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !value.pnv_1.equals(CompressionLevel_MEDIUM_getInstance())) {
      tmp1_output.d4g(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), value.pnv_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_33).w4a = function (encoder, value) {
    return this.mnv(encoder, value instanceof CompressParams ? value : THROW_CCE());
  };
  var $serializer_instance_33;
  function $serializer_getInstance_45() {
    if ($serializer_instance_33 == null)
      new $serializer_33();
    return $serializer_instance_33;
  }
  function CompressParams_init_$Init$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_45().lnv_1);
    }
    if (0 === (seen1 & 1))
      $this.nnv_1 = 1280;
    else
      $this.nnv_1 = maxWidth;
    if (0 === (seen1 & 2))
      $this.onv_1 = 1280;
    else
      $this.onv_1 = maxHeight;
    if (0 === (seen1 & 4))
      $this.pnv_1 = CompressionLevel_MEDIUM_getInstance();
    else
      $this.pnv_1 = compressionLevel;
    return $this;
  }
  function CompressParams_init_$Create$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker) {
    return CompressParams_init_$Init$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker, objectCreate(protoOf(CompressParams)));
  }
  function CompressParams(maxWidth, maxHeight, compressionLevel) {
    maxWidth = maxWidth === VOID ? 1280 : maxWidth;
    maxHeight = maxHeight === VOID ? 1280 : maxHeight;
    compressionLevel = compressionLevel === VOID ? CompressionLevel_MEDIUM_getInstance() : compressionLevel;
    this.nnv_1 = maxWidth;
    this.onv_1 = maxHeight;
    this.pnv_1 = compressionLevel;
  }
  protoOf(CompressParams).toString = function () {
    return 'CompressParams(maxWidth=' + this.nnv_1 + ', maxHeight=' + this.onv_1 + ', compressionLevel=' + this.pnv_1 + ')';
  };
  protoOf(CompressParams).hashCode = function () {
    var result = this.nnv_1;
    result = imul(result, 31) + this.onv_1 | 0;
    result = imul(result, 31) + this.pnv_1.hashCode() | 0;
    return result;
  };
  protoOf(CompressParams).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CompressParams))
      return false;
    var tmp0_other_with_cast = other instanceof CompressParams ? other : THROW_CCE();
    if (!(this.nnv_1 === tmp0_other_with_cast.nnv_1))
      return false;
    if (!(this.onv_1 === tmp0_other_with_cast.onv_1))
      return false;
    if (!this.pnv_1.equals(tmp0_other_with_cast.pnv_1))
      return false;
    return true;
  };
  function CompressResult(uri, mimeType, originalSize, compressedSize) {
    this.ano_1 = uri;
    this.bno_1 = mimeType;
    this.cno_1 = originalSize;
    this.dno_1 = compressedSize;
  }
  protoOf(CompressResult).toString = function () {
    return 'CompressResult(uri=' + this.ano_1 + ', mimeType=' + this.bno_1 + ', originalSize=' + this.cno_1.toString() + ', compressedSize=' + this.dno_1.toString() + ')';
  };
  protoOf(CompressResult).hashCode = function () {
    var result = getStringHashCode(this.ano_1);
    result = imul(result, 31) + getStringHashCode(this.bno_1) | 0;
    result = imul(result, 31) + this.cno_1.hashCode() | 0;
    result = imul(result, 31) + this.dno_1.hashCode() | 0;
    return result;
  };
  protoOf(CompressResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CompressResult))
      return false;
    var tmp0_other_with_cast = other instanceof CompressResult ? other : THROW_CCE();
    if (!(this.ano_1 === tmp0_other_with_cast.ano_1))
      return false;
    if (!(this.bno_1 === tmp0_other_with_cast.bno_1))
      return false;
    if (!this.cno_1.equals(tmp0_other_with_cast.cno_1))
      return false;
    if (!this.dno_1.equals(tmp0_other_with_cast.dno_1))
      return false;
    return true;
  };
  function CompressUseCase() {
  }
  function _get_$cachedSerializer__te6jhj($this) {
    return $this.rnv_1.t2();
  }
  function CompressionLevel$Companion$_anonymous__cmsj0x() {
    return CompressionLevelSerializer_getInstance();
  }
  var CompressionLevel_NONE_instance;
  var CompressionLevel_LOWEST_instance;
  var CompressionLevel_LOW_instance;
  var CompressionLevel_MEDIUM_instance;
  var CompressionLevel_HIGH_instance;
  var CompressionLevel_HIGHEST_instance;
  function Companion_37() {
    Companion_instance_85 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.rnv_1 = lazy(tmp_0, CompressionLevel$Companion$_anonymous__cmsj0x);
  }
  protoOf(Companion_37).snv = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = get_entries().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.compress.Companion.forValue.<anonymous>' call
        if (element.vnv_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(Companion_37).s4x = function () {
    return _get_$cachedSerializer__te6jhj(this);
  };
  protoOf(Companion_37).a4n = function (typeParamsSerializers) {
    return this.s4x();
  };
  var Companion_instance_85;
  function Companion_getInstance_55() {
    CompressionLevel_initEntries();
    if (Companion_instance_85 == null)
      new Companion_37();
    return Companion_instance_85;
  }
  function values_0() {
    return [CompressionLevel_NONE_getInstance(), CompressionLevel_LOWEST_getInstance(), CompressionLevel_LOW_getInstance(), CompressionLevel_MEDIUM_getInstance(), CompressionLevel_HIGH_getInstance(), CompressionLevel_HIGHEST_getInstance()];
  }
  function get_entries() {
    if ($ENTRIES == null)
      $ENTRIES = enumEntries(values_0());
    return $ENTRIES;
  }
  var CompressionLevel_entriesInitialized;
  function CompressionLevel_initEntries() {
    if (CompressionLevel_entriesInitialized)
      return Unit_instance;
    CompressionLevel_entriesInitialized = true;
    CompressionLevel_NONE_instance = new CompressionLevel('NONE', 0, 0);
    CompressionLevel_LOWEST_instance = new CompressionLevel('LOWEST', 1, 1);
    CompressionLevel_LOW_instance = new CompressionLevel('LOW', 2, 2);
    CompressionLevel_MEDIUM_instance = new CompressionLevel('MEDIUM', 3, 3);
    CompressionLevel_HIGH_instance = new CompressionLevel('HIGH', 4, 4);
    CompressionLevel_HIGHEST_instance = new CompressionLevel('HIGHEST', 5, 5);
    Companion_getInstance_55();
  }
  var $ENTRIES;
  function CompressionLevel(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.vnv_1 = value;
  }
  function CompressionLevel_NONE_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_NONE_instance;
  }
  function CompressionLevel_LOWEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOWEST_instance;
  }
  function CompressionLevel_LOW_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOW_instance;
  }
  function CompressionLevel_MEDIUM_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_MEDIUM_instance;
  }
  function CompressionLevel_HIGH_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGH_instance;
  }
  function CompressionLevel_HIGHEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGHEST_instance;
  }
  function CompressionLevelSerializer() {
    CompressionLevelSerializer_instance = this;
    this.wnv_1 = PrimitiveSerialDescriptor('CompressionLevel', INT_getInstance());
  }
  protoOf(CompressionLevelSerializer).v4a = function () {
    return this.wnv_1;
  };
  protoOf(CompressionLevelSerializer).x4a = function (decoder) {
    return Companion_getInstance_55().snv(decoder.d4e());
  };
  protoOf(CompressionLevelSerializer).xnv = function (encoder, value) {
    encoder.l4f(value.vnv_1);
  };
  protoOf(CompressionLevelSerializer).w4a = function (encoder, value) {
    return this.xnv(encoder, value instanceof CompressionLevel ? value : THROW_CCE());
  };
  var CompressionLevelSerializer_instance;
  function CompressionLevelSerializer_getInstance() {
    if (CompressionLevelSerializer_instance == null)
      new CompressionLevelSerializer();
    return CompressionLevelSerializer_instance;
  }
  function ContentManifestMap(manifest, entryMap) {
    var tmp;
    if (entryMap === VOID) {
      // Inline function 'kotlin.collections.associateBy' call
      var this_0 = manifest.una_1;
      var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
      // Inline function 'kotlin.collections.associateByTo' call
      var destination = LinkedHashMap_init_$Create$_0(capacity);
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.ContentManifestMap.<init>.<anonymous>' call
        var tmp$ret$0 = UrlEncoderUtil_getInstance().hle(element.yna_1);
        destination.s(tmp$ret$0, element);
      }
      tmp = destination;
    } else {
      tmp = entryMap;
    }
    entryMap = tmp;
    this.ynv_1 = manifest;
    this.znv_1 = entryMap;
  }
  protoOf(ContentManifestMap).anw = function (manifestUrl, pathInContentEntryVersion) {
    return UrlKmp(manifestUrl).bnw(pathInContentEntryVersion).toString();
  };
  protoOf(ContentManifestMap).toString = function () {
    return 'ContentManifestMap(manifest=' + this.ynv_1 + ', entryMap=' + this.znv_1 + ')';
  };
  protoOf(ContentManifestMap).hashCode = function () {
    var result = this.ynv_1.hashCode();
    result = imul(result, 31) + hashCode(this.znv_1) | 0;
    return result;
  };
  protoOf(ContentManifestMap).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentManifestMap))
      return false;
    var tmp0_other_with_cast = other instanceof ContentManifestMap ? other : THROW_CCE();
    if (!this.ynv_1.equals(tmp0_other_with_cast.ynv_1))
      return false;
    if (!equals(this.znv_1, tmp0_other_with_cast.znv_1))
      return false;
    return true;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    this.knw_1 = this$0;
    this.lnw_1 = $entries;
    this.mnw_1 = $timeNow;
    this.nnw_1 = $activeUserPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            var tmp_0 = this.knw_1.tnw_1.c7k();
            var this_0 = this.lnw_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.vnw_1);
            }

            suspendResult = tmp_0.gb5(destination, true, this.mnw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            tmp_1.pnw_1 = this.lnw_1;
            this.qnw_1 = this.pnw_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.qnw_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.rnw_1 = this.qnw_1.e();
            var tmp_2 = this;
            tmp_2.snw_1 = this.rnw_1;
            this.hd_1 = 3;
            suspendResult = this.knw_1.tnw_1.r7l().re7(this.snw_1.vnw_1, this.mnw_1, this.nnw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this.knw_1, this.lnw_1, this.mnw_1, this.nnw_1, completion);
    i.onw_1 = it;
    return i;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeleteContentEntryParentChildJoinUseCase(repoOrDb) {
    this.tnw_1 = repoOrDb;
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase).xnw = function (entries, activeUserPersonUid, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.tnw_1, VOID, DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this, entries, timeNow, activeUserPersonUid, null), $completion);
  };
  function Companion_38() {
    this.ynw_1 = 'upload-original-filename';
  }
  var Companion_instance_86;
  function Companion_getInstance_56() {
    return Companion_instance_86;
  }
  function ContentEntryGetMetaDataFromUriUseCase() {
  }
  function ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes) {
    indeterminate = indeterminate === VOID ? true : indeterminate;
    error = error === VOID ? null : error;
    processedBytes = processedBytes === VOID ? new Long(0, 0) : processedBytes;
    totalBytes = totalBytes === VOID ? new Long(0, 0) : totalBytes;
    this.anx_1 = indeterminate;
    this.bnx_1 = error;
    this.cnx_1 = processedBytes;
    this.dnx_1 = totalBytes;
  }
  protoOf(ContentEntryGetMetadataStatus).enx = function () {
    var tmp;
    if (!this.dnx_1.equals(new Long(0, 0))) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.cnx_1.cb(toLong(100)).bb(this.dnx_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(ContentEntryGetMetadataStatus).fnx = function (indeterminate, error, processedBytes, totalBytes) {
    return new ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).gnx = function (indeterminate, error, processedBytes, totalBytes, $super) {
    indeterminate = indeterminate === VOID ? this.anx_1 : indeterminate;
    error = error === VOID ? this.bnx_1 : error;
    processedBytes = processedBytes === VOID ? this.cnx_1 : processedBytes;
    totalBytes = totalBytes === VOID ? this.dnx_1 : totalBytes;
    return $super === VOID ? this.fnx(indeterminate, error, processedBytes, totalBytes) : $super.fnx.call(this, indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).toString = function () {
    return 'ContentEntryGetMetadataStatus(indeterminate=' + this.anx_1 + ', error=' + this.bnx_1 + ', processedBytes=' + this.cnx_1.toString() + ', totalBytes=' + this.dnx_1.toString() + ')';
  };
  protoOf(ContentEntryGetMetadataStatus).hashCode = function () {
    var result = getBooleanHashCode(this.anx_1);
    result = imul(result, 31) + (this.bnx_1 == null ? 0 : getStringHashCode(this.bnx_1)) | 0;
    result = imul(result, 31) + this.cnx_1.hashCode() | 0;
    result = imul(result, 31) + this.dnx_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryGetMetadataStatus).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataStatus))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataStatus ? other : THROW_CCE();
    if (!(this.anx_1 === tmp0_other_with_cast.anx_1))
      return false;
    if (!(this.bnx_1 == tmp0_other_with_cast.bnx_1))
      return false;
    if (!this.cnx_1.equals(tmp0_other_with_cast.cnx_1))
      return false;
    if (!this.dnx_1.equals(tmp0_other_with_cast.dnx_1))
      return false;
    return true;
  };
  function UnsupportedContentException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, UnsupportedContentException);
  }
  function Companion_39() {
    this.hnx_1 = 'text/vtt';
    this.inx_1 = 'filename';
    this.jnx_1 = 'locale';
    this.knx_1 = 'WEBVTT';
  }
  var Companion_instance_87;
  function Companion_getInstance_57() {
    return Companion_instance_87;
  }
  function GetSubtitleTrackFromUriUseCase() {
  }
  function CancelImportContentEntryUseCase() {
  }
  function $invokeCOROUTINE$23(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vnx_1 = _this__u8e3s4;
    this.wnx_1 = cjiUid;
    this.xnx_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$23).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.vnx_1.iny_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.ynx_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.znx_1 = this.vnx_1.hny_1;
            var tmp_4 = this;
            tmp_4.any_1 = this.vnx_1.gny_1.hmr_1 + 'api/contententryimportjob/cancel';
            var tmp_5 = this;
            tmp_5.bny_1 = this.znx_1;
            var tmp_6 = this;
            tmp_6.cny_1 = this.bny_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.any_1);
            parameter(this_0, 'jobUid', this.wnx_1);
            doorNodeIdHeader(this_0, this.ynx_1);
            parameter(this_0, 'accountPersonUid', this.xnx_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.dny_1 = this_0;
            this.dny_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_8 = this;
            tmp_8.eny_1 = this.cny_1;
            var tmp_9 = this;
            tmp_9.fny_1 = this.dny_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.fny_1, this.eny_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 CancelRemoteContentEntryImportUseCase(endpoint, httpClient, repo) {
    this.gny_1 = endpoint;
    this.hny_1 = httpClient;
    this.iny_1 = repo;
  }
  protoOf(CancelRemoteContentEntryImportUseCase).jny = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$23(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$24(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.sny_1 = _this__u8e3s4;
    this.tny_1 = cjiUid;
    this.uny_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$24).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.sny_1.fnz_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('no repo');
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.vny_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.wny_1 = this.sny_1.dnz_1;
            var tmp_4 = this;
            tmp_4.xny_1 = this.sny_1.enz_1.hmr_1 + 'api/contententryimportjob/dismissError';
            var tmp_5 = this;
            tmp_5.yny_1 = this.wny_1;
            var tmp_6 = this;
            tmp_6.zny_1 = this.yny_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.xny_1);
            parameter(this_0, 'jobUid', this.tny_1);
            doorNodeIdHeader(this_0, this.vny_1);
            parameter(this_0, 'accountPersonUid', this.uny_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.anz_1 = this_0;
            this.anz_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_8 = this;
            tmp_8.bnz_1 = this.zny_1;
            var tmp_9 = this;
            tmp_9.cnz_1 = this.anz_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.cnz_1, this.bnz_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 DismissRemoteContentEntryImportErrorUseCase(httpClient, endpoint, repo) {
    this.dnz_1 = httpClient;
    this.enz_1 = endpoint;
    this.fnz_1 = repo;
  }
  protoOf(DismissRemoteContentEntryImportErrorUseCase).jny = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$24(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnqueueContentEntryImportUseCase() {
  }
  function $invokeCOROUTINE$25(_this__u8e3s4, contentJobItem, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pnz_1 = _this__u8e3s4;
    this.qnz_1 = contentJobItem;
  }
  protoOf($invokeCOROUTINE$25).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.rnz_1 = this.pnz_1.znz_1;
            var tmp_1 = this;
            tmp_1.snz_1 = this.pnz_1.ynz_1.hmr_1 + 'api/import/importRequest';
            var tmp_2 = this;
            tmp_2.tnz_1 = this.rnz_1;
            var tmp_3 = this;
            tmp_3.unz_1 = this.tnz_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.snz_1);
            contentType(this_0, Application_getInstance().p2u_1);
            setBodyJson(this_0, this.pnz_1.ao0_1, Companion_instance_88.s4x(), new ImportRequest(this.qnz_1));
            tmp_4.vnz_1 = this_0;
            this.vnz_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_5 = this;
            tmp_5.wnz_1 = this.unz_1;
            var tmp_6 = this;
            tmp_6.xnz_1 = this.vnz_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.xnz_1, this.wnz_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 EnqueueImportContentEntryUseCaseRemote(endpoint, httpClient, json) {
    this.ynz_1 = endpoint;
    this.znz_1 = httpClient;
    this.ao0_1 = json;
  }
  protoOf(EnqueueImportContentEntryUseCaseRemote).gnz = function (contentJobItem, $completion) {
    var tmp = new $invokeCOROUTINE$25(this, contentJobItem, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_40() {
  }
  protoOf(Companion_40).s4x = function () {
    return $serializer_getInstance_46();
  };
  var Companion_instance_88;
  function Companion_getInstance_58() {
    return Companion_instance_88;
  }
  function $serializer_34() {
    $serializer_instance_34 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.contententry.importcontent.ImportRequest', this, 1);
    tmp0_serialDesc.y4l('contentJobItem', false);
    this.bo0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_34).v4a = function () {
    return this.bo0_1;
  };
  protoOf($serializer_34).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_5()];
  };
  protoOf($serializer_34).x4a = function (decoder) {
    var tmp0_desc = this.bo0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.z4e(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return ImportRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_34).co0 = function (encoder, value) {
    var tmp0_desc = this.bo0_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, $serializer_getInstance_5(), value.do0_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_34).w4a = function (encoder, value) {
    return this.co0(encoder, value instanceof ImportRequest ? value : THROW_CCE());
  };
  var $serializer_instance_34;
  function $serializer_getInstance_46() {
    if ($serializer_instance_34 == null)
      new $serializer_34();
    return $serializer_instance_34;
  }
  function ImportRequest_init_$Init$(seen1, contentJobItem, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_46().bo0_1);
    }
    $this.do0_1 = contentJobItem;
    return $this;
  }
  function ImportRequest_init_$Create$(seen1, contentJobItem, serializationConstructorMarker) {
    return ImportRequest_init_$Init$(seen1, contentJobItem, serializationConstructorMarker, objectCreate(protoOf(ImportRequest)));
  }
  function ImportRequest(contentJobItem) {
    this.do0_1 = contentJobItem;
  }
  protoOf(ImportRequest).toString = function () {
    return 'ImportRequest(contentJobItem=' + this.do0_1 + ')';
  };
  protoOf(ImportRequest).hashCode = function () {
    return this.do0_1.hashCode();
  };
  protoOf(ImportRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ImportRequest))
      return false;
    var tmp0_other_with_cast = other instanceof ImportRequest ? other : THROW_CCE();
    if (!this.do0_1.equals(tmp0_other_with_cast.do0_1))
      return false;
    return true;
  };
  function DefaultLaunchContentEntryVersionUseCase() {
  }
  protoOf(DefaultLaunchContentEntryVersionUseCase).eo0 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp0_subject = contentEntryVersion.yap_1;
    var tmp;
    if (tmp0_subject === 'xapi') {
      tmp = 'XapiContent';
    } else {
      if (tmp0_subject === 'pdf') {
        tmp = 'PdfContent';
      } else {
        if (tmp0_subject === 'epub') {
          tmp = 'EpubContent';
        } else {
          if (tmp0_subject === 'video') {
            tmp = 'Video';
          } else {
            tmp = null;
          }
        }
      }
    }
    var destName = tmp;
    if (!(destName == null)) {
      Companion_getInstance_120();
      var tmp_0 = to('entityUid', contentEntryVersion.vap_1.toString());
      Companion_getInstance_120();
      var tmp_1 = to('courseBlockUid', cbUid.toString());
      Companion_getInstance_120();
      var tmp_2 = to('clazzUid', clazzUid.toString());
      Companion_getInstance_120();
      navController.fo0(destName, mapOf([tmp_0, tmp_1, tmp_2, to('entryid', contentEntryVersion.wap_1.toString())]));
    }
    return new LaunchResult();
  };
  protoOf(DefaultLaunchContentEntryVersionUseCase).go0 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.eo0(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function LaunchResult(message) {
    message = message === VOID ? null : message;
    this.ho0_1 = message;
  }
  protoOf(LaunchResult).toString = function () {
    return 'LaunchResult(message=' + this.ho0_1 + ')';
  };
  protoOf(LaunchResult).hashCode = function () {
    return this.ho0_1 == null ? 0 : getStringHashCode(this.ho0_1);
  };
  protoOf(LaunchResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LaunchResult))
      return false;
    var tmp0_other_with_cast = other instanceof LaunchResult ? other : THROW_CCE();
    if (!(this.ho0_1 == tmp0_other_with_cast.ho0_1))
      return false;
    return true;
  };
  function LaunchContentEntryVersionUseCase() {
  }
  function LaunchEpubUseCase() {
  }
  function LaunchXapiUseCase() {
  }
  function XapiLaunchHrefResult(url, launchUriInContent, launchActivity, manifestUrl) {
    this.io0_1 = url;
    this.jo0_1 = launchUriInContent;
    this.ko0_1 = launchActivity;
    this.lo0_1 = manifestUrl;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda($contentEntryVersionUid) {
    return function () {
      return 'Resolving xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString();
    };
  }
  function ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation) {
    this.uo0_1 = $contentEntryVersionUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).wo0 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.wo0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).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.vo0_1.n7l().ubh(this.uo0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda(this.uo0_1, completion);
    i.vo0_1 = it;
    return i;
  };
  function ResolveXapiLaunchHrefUseCase$invoke$slambda_0($contentEntryVersionUid, resultContinuation) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation);
    var l = function (it, $completion) {
      return i.wo0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda_0($contentEntryVersionUid, $url) {
    return function () {
      return 'Resolved xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString() + ' : ' + $url;
    };
  }
  function $invokeCOROUTINE$26(_this__u8e3s4, contentEntryVersionUid, clazzUid, cbUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fo1_1 = _this__u8e3s4;
    this.go1_1 = contentEntryVersionUid;
    this.ho1_1 = clazzUid;
    this.io1_1 = cbUid;
  }
  protoOf($invokeCOROUTINE$26).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            var tmp_0 = Napier_getInstance();
            tmp_0.j5k(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda(this.go1_1));
            this.hd_1 = 1;
            suspendResult = localFirstThenRepoIfNull(this.fo1_1.mo2_1, ResolveXapiLaunchHrefUseCase$invoke$slambda_0(this.go1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jo1_1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.jo1_1 == null) {
              throw IllegalArgumentException_init_$Create$('could not load contententryversion ' + this.go1_1.toString());
            } else {
              tmp_2 = this.jo1_1;
            }

            tmp_1.ko1_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.ko1_1.zap_1;
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.go1_1.toString() + ' manifesturl is null');
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.lo1_1 = tmp_4;
            var tmp_5 = this;
            tmp_5.mo1_1 = this.fo1_1.oo2_1;
            var tmp_6 = this;
            tmp_6.no1_1 = this.fo1_1.no2_1;
            var tmp_7 = this;
            tmp_7.oo1_1 = this.lo1_1;
            var tmp_8 = this;
            tmp_8.po1_1 = this.no1_1;
            var tmp_9 = this;
            tmp_9.qo1_1 = this.po1_1;
            var tmp_10 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.oo1_1);
            tmp_10.ro1_1 = this_0;
            this.ro1_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_11 = this;
            tmp_11.so1_1 = this.qo1_1;
            var tmp_12 = this;
            tmp_12.to1_1 = this.ro1_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.to1_1, this.so1_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.uo1_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.uo1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.vo1_1 = suspendResult;
            var tmp_13 = this;
            var this_1 = this.mo1_1.y4b();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_13.wo1_1 = this.mo1_1.x4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.vo1_1);
            this.xo1_1 = requireEntryByUri(this.wo1_1, ensureNotNull(this.ko1_1.xap_1));
            var tmp_14 = this;
            tmp_14.yo1_1 = this.fo1_1.no2_1;
            var tmp_15 = this;
            tmp_15.zo1_1 = this.xo1_1.gnb_1;
            var tmp_16 = this;
            tmp_16.ao2_1 = this.yo1_1;
            var tmp_17 = this;
            tmp_17.bo2_1 = this.ao2_1;
            var tmp_18 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.zo1_1);
            tmp_18.co2_1 = this_3;
            this.co2_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_19 = this;
            tmp_19.do2_1 = this.bo2_1;
            var tmp_20 = this;
            tmp_20.eo2_1 = this.co2_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.eo2_1, this.do2_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.fo2_1 = suspendResult;
            this.hd_1 = 5;
            suspendResult = bodyAsDecodedText(this.fo2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.go2_1 = suspendResult;
            this.ho2_1 = this.fo1_1.po2_1.d7j();
            setInputString(this.ho2_1, this.go2_1);
            this.io2_1 = Companion_instance_127.vo2(this.ho2_1);
            var tmp_21 = this;
            var tmp2_safe_receiver = this.io2_1.wo2_1;
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.eo3_1;
            var tmp_22;
            if (tmp3_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.go1_1.toString() + ' manifesturl is null');
            } else {
              tmp_22 = tmp3_elvis_lhs;
            }

            tmp_21.jo2_1 = tmp_22;
            var tmp_23 = this;
            var tmp4_safe_receiver = this.io2_1.wo2_1;
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.bo3_1;
            var tmp_24;
            if (tmp5_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Launch Activity must have id');
            } else {
              tmp_24 = tmp5_elvis_lhs;
            }

            tmp_23.ko2_1 = tmp_24;
            this.lo2_1 = this.fo1_1.so2_1.rn4().xmr_1.x9b_1;
            this.hd_1 = 6;
            suspendResult = this.fo1_1.qo2_1.ho3(this.lo2_1, this.fo1_1.so2_1.rn4().cms(), this.ko2_1, this.ho1_1, this.io1_1, this.ko1_1.wap_1, this.go1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var xapiSession = suspendResult;
            var queryParams = mapOf([to('endpoint', this.fo1_1.ro2_1.io3('/api/xapi/')), to('auth', authorizationHeader(xapiSession)), to('actor', this.fo1_1.oo2_1.w4b(Companion_instance_107.s4x(), agent(xapiSession, this.fo1_1.to2_1))), to('registration', get_registrationUuid(xapiSession).toString()), to('activity_id', xapiSession.hj4_1)]);
            var url_0 = appendQueryArgs(UMFileUtil_getInstance().oo3(this.lo1_1, this.jo2_1), queryParams);
            var tinCanXmlPathPrefix = substringBeforeLast(ensureNotNull(this.ko1_1.xap_1), '/', '');
            var tmp_25 = Napier_getInstance();
            tmp_25.j5k(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda_0(this.go1_1, url_0));
            return new XapiLaunchHrefResult(url_0, appendQueryArgs(tinCanXmlPathPrefix + this.jo2_1, queryParams), ensureNotNull(this.io2_1.wo2_1), this.lo1_1);
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ResolveXapiLaunchHrefUseCase(activeRepo, httpClient, json, xppFactory, resumeOrStartXapiSessionUseCase, getApiUrlUseCase, accountManager, endpoint) {
    this.mo2_1 = activeRepo;
    this.no2_1 = httpClient;
    this.oo2_1 = json;
    this.po2_1 = xppFactory;
    this.qo2_1 = resumeOrStartXapiSessionUseCase;
    this.ro2_1 = getApiUrlUseCase;
    this.so2_1 = accountManager;
    this.to2_1 = endpoint;
  }
  protoOf(ResolveXapiLaunchHrefUseCase).po3 = function (contentEntryVersionUid, clazzUid, cbUid, $completion) {
    var tmp = new $invokeCOROUTINE$26(this, contentEntryVersionUid, clazzUid, cbUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function MoveContentEntriesUseCase(repo, systemImpl) {
    this.qo3_1 = repo;
    this.ro3_1 = systemImpl;
  }
  protoOf(MoveContentEntriesUseCase).so3 = function (destContentEntry, selectedEntriesToMove, $completion) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp = selectedEntriesToMove.c1();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = selectedEntriesToMove.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element.unw_1.equals(destContentEntry.xan_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      throw IllegalArgumentException_init_$Create$(this.ro3_1.rnd(strings_getInstance().dmn_1));
    }
    var tmp$ret$2;
    $l$block_2: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp_0 = selectedEntriesToMove.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$2 = false;
        break $l$block_2;
      }
      var tmp0_iterator_0 = selectedEntriesToMove.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element_0.wnw_1.equals(destContentEntry.xan_1)) {
          tmp$ret$2 = true;
          break $l$block_2;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2) {
      throw IllegalArgumentException_init_$Create$(this.ro3_1.rnd(strings_getInstance().emn_1));
    }
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(selectedEntriesToMove, 10));
    var tmp0_iterator_1 = selectedEntriesToMove.w();
    while (tmp0_iterator_1.f()) {
      var item = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
      var tmp$ret$4 = item.vnw_1;
      destination.i1(tmp$ret$4);
    }
    var uidsToMove = destination;
    if (uidsToMove.c1())
      return Unit_instance;
    return this.qo3_1.c7k().fb5(destContentEntry.xan_1, uidsToMove, systemTimeInMillis(), $completion);
  };
  function SaveContentEntryUseCase$invoke$slambda$lambda($picture) {
    return function () {
      return 'SavePictureUseCase: ContentEntry Set picture upsert uri = ' + $picture.pap_1 + ' uid=' + $picture.nap_1.toString();
    };
  }
  function SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    this.bo4_1 = $effectiveDb;
    this.co4_1 = $contentEntry;
    this.do4_1 = $picture;
    this.eo4_1 = $initPictureUri;
    this.fo4_1 = this$0;
    this.go4_1 = $joinToParentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveContentEntryUseCase$invoke$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).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;
            suspendResult = this.bo4_1.a7k().ban(this.co4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.do4_1 == null) ? !(this.do4_1.pap_1 == this.eo4_1) : false) {
              var tmp_0 = Napier_getInstance();
              tmp_0.j5k(VOID, VOID, SaveContentEntryUseCase$invoke$slambda$lambda(this.do4_1));
              this.hd_1 = 2;
              suspendResult = this.fo4_1.io4_1.w7l().iba(listOf_0(this.do4_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!(this.go4_1 == null)) {
              this.hd_1 = 4;
              suspendResult = this.bo4_1.c7k().insertAsync(new ContentEntryParentChildJoin(this.go4_1, this.co4_1.xan_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          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);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new SaveContentEntryUseCase$invoke$slambda(this.bo4_1, this.co4_1, this.do4_1, this.eo4_1, this.fo4_1, this.go4_1, completion);
    i.ho4_1 = it;
    return i;
  };
  function SaveContentEntryUseCase$invoke$slambda_0($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    var i = new SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$27(_this__u8e3s4, contentEntry, joinToParentUid, picture, initPictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.to4_1 = _this__u8e3s4;
    this.uo4_1 = contentEntry;
    this.vo4_1 = joinToParentUid;
    this.wo4_1 = picture;
    this.xo4_1 = initPictureUri;
  }
  protoOf($invokeCOROUTINE$27).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.to4_1.jo4_1;
            tmp_0.yo4_1 = tmp0_elvis_lhs == null ? this.to4_1.io4_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.yo4_1, VOID, SaveContentEntryUseCase$invoke$slambda_0(this.yo4_1, this.uo4_1, this.wo4_1, this.xo4_1, this.to4_1, this.vo4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.wo4_1 == null) ? !(this.wo4_1.pap_1 == this.xo4_1) : false) {
              this.hd_1 = 2;
              var tmp_1 = this.wo4_1.nap_1;
              suspendResult = this.to4_1.ko4_1.cnm(tmp_1, 6678, this.wo4_1.pap_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveContentEntryUseCase(db, repo, enqueueSavePictureUseCase) {
    this.io4_1 = db;
    this.jo4_1 = repo;
    this.ko4_1 = enqueueSavePictureUseCase;
  }
  protoOf(SaveContentEntryUseCase).zo4 = function (contentEntry, joinToParentUid, picture, initPictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$27(this, contentEntry, joinToParentUid, picture, initPictureUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function AddOrUpdateCourseBlockUseCase() {
  }
  protoOf(AddOrUpdateCourseBlockUseCase).ao5 = function (currentList, clazzUid, addOrUpdateBlock) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = currentList.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
        if (item.rjc_1.o83_1.equals(addOrUpdateBlock.rjc_1.o83_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var currentIndex = tmp$ret$1;
    var courseBlockMutableList = toMutableList(currentList);
    var tmp;
    if (currentIndex >= 0) {
      // Inline function 'kotlin.apply' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
      courseBlockMutableList.f1(currentIndex, addOrUpdateBlock);
      tmp = courseBlockMutableList;
    } else {
      courseBlockMutableList.i1(addOrUpdateBlock.djd(addOrUpdateBlock.rjc_1.vjo(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, clazzUid)));
      tmp = updateParentModuleUidsAndIndex(autoIndent(courseBlockMutableList, courseBlockMutableList.u() - 1 | 0));
    }
    var newCourseBlockList = tmp;
    return toList(newCourseBlockList);
  };
  function updateParentModuleUidsAndIndex(_this__u8e3s4) {
    // Inline function 'kotlin.collections.mapIndexed' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.collections.mapIndexedTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var index = 0;
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.updateParentModuleUidsAndIndex.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var index_0 = checkIndexOverflow(tmp1);
      var parentModUid = findParentModule(_this__u8e3s4, item);
      var tmp;
      if (!item.rjc_1.r83_1.equals(parentModUid) ? true : !(item.rjc_1.b84_1 === index_0)) {
        tmp = item.djd(item.rjc_1.vjo(VOID, VOID, VOID, parentModUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, index_0));
      } else {
        tmp = item;
      }
      var tmp$ret$0 = tmp;
      destination.i1(tmp$ret$0);
    }
    return toList(destination);
  }
  function autoIndent(_this__u8e3s4, index) {
    var block = _this__u8e3s4.v(index).rjc_1;
    var tmp = block.p83_1;
    if (tmp === 100)
      return _this__u8e3s4;
    var tmp0_safe_receiver = getOrNull(_this__u8e3s4, index - 1 | 0);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rjc_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return _this__u8e3s4;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var prevBlock = tmp_0;
    var tmp_1;
    var tmp_2 = prevBlock.p83_1;
    if (tmp_2 === 100) {
      tmp_1 = 1;
    } else {
      tmp_1 = prevBlock.q83_1;
    }
    var autoIndent = tmp_1;
    var tmp_3;
    if (!(block.q83_1 === autoIndent)) {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.autoIndent.<anonymous>' call
      this_0.f1(index, this_0.v(index).djd(this_0.v(index).rjc_1.vjo(VOID, VOID, autoIndent)));
      tmp_3 = toList(this_0);
    } else {
      tmp_3 = _this__u8e3s4;
    }
    return tmp_3;
  }
  function findParentModule(_this__u8e3s4, forBlock) {
    var tmp = forBlock.rjc_1.p83_1;
    if (tmp === 100)
      return new Long(0, 0);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.findParentModule.<anonymous>' call
        if (item.rjc_1.o83_1.equals(forBlock.rjc_1.o83_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var index_0 = tmp$ret$1;
    var tmp0_elvis_lhs = getOrNull(_this__u8e3s4, index_0 - 1 | 0);
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      return new Long(0, 0);
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    var prevBlock = tmp_0;
    var tmp_1;
    var tmp_2 = prevBlock.rjc_1.p83_1;
    if (tmp_2 === 100) {
      tmp_1 = prevBlock.rjc_1.o83_1;
    } else {
      if (prevBlock.rjc_1.q83_1 >= 1) {
        tmp_1 = prevBlock.rjc_1.r83_1;
      } else {
        tmp_1 = new Long(0, 0);
      }
    }
    return tmp_1;
  }
  function UpdateCourseBlocksOnReorderOrCommitUseCase() {
  }
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).bo5 = function (currentList, autoIndentIndex) {
    var tmp;
    if (autoIndentIndex >= 0) {
      tmp = autoIndent(currentList, autoIndentIndex);
    } else {
      tmp = currentList;
    }
    var listIndented = tmp;
    return updateParentModuleUidsAndIndex(listIndented);
  };
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).co5 = function (currentList, autoIndentIndex, $super) {
    autoIndentIndex = autoIndentIndex === VOID ? -1 : autoIndentIndex;
    return $super === VOID ? this.bo5(currentList, autoIndentIndex) : $super.bo5.call(this, currentList, autoIndentIndex);
  };
  function DeletePermanentlyUseCase(repoOrDb) {
    this.do5_1 = repoOrDb;
  }
  protoOf(DeletePermanentlyUseCase).eo5 = function (items, $completion) {
    var timeNow = systemTimeInMillis();
    var tmp = this.do5_1.r7l();
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(items, 10));
    var tmp0_iterator = items.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.deleteditem.DeletePermanentlyUseCase.invoke.<anonymous>' call
      var tmp$ret$0 = item.ue7_1;
      destination.i1(tmp$ret$0);
    }
    var tmp_0 = destination;
    return tmp.te7(tmp_0, 3, timeNow, $completion);
  };
  function RestoreDeletedItemUseCase$invoke$slambda($itemsByType, this$0, $timeNow, $items, resultContinuation) {
    this.no5_1 = $itemsByType;
    this.oo5_1 = this$0;
    this.po5_1 = $timeNow;
    this.qo5_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            tmp_0.so5_1 = this.no5_1;
            var tmp_1 = this;
            tmp_1.to5_1 = this.so5_1.q2().w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.to5_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.uo5_1 = this.to5_1.e();
            var tmp_2 = this;
            tmp_2.vo5_1 = this.uo5_1;
            this.wo5_1 = this.vo5_1.s2();
            if (this.wo5_1 === 7) {
              this.hd_1 = 2;
              var tmp_3 = this.oo5_1.xo5_1.c7k();
              var this_0 = this.vo5_1.t2();
              var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
              var tmp0_iterator = this_0.w();
              while (tmp0_iterator.f()) {
                var item = tmp0_iterator.e();
                destination.i1(item.ae8_1);
              }
              suspendResult = tmp_3.gb5(destination, false, this.po5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            this.hd_1 = 5;
            var tmp_4 = this.oo5_1.xo5_1.r7l();
            var this_1 = this.qo5_1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var item_0 = tmp0_iterator_0.e();
              destination_0.i1(item_0.ue7_1);
            }

            suspendResult = tmp_4.te7(destination_0, 2, this.po5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return Unit_instance;
          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);
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda(this.no5_1, this.oo5_1, this.po5_1, this.qo5_1, completion);
    i.ro5_1 = it;
    return i;
  };
  function RestoreDeletedItemUseCase$invoke$slambda_0($itemsByType, this$0, $timeNow, $items, resultContinuation) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda($itemsByType, this$0, $timeNow, $items, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RestoreDeletedItemUseCase(repoOrDb) {
    this.xo5_1 = repoOrDb;
  }
  protoOf(RestoreDeletedItemUseCase).eo5 = function (items, $completion) {
    // Inline function 'kotlin.collections.groupBy' call
    // Inline function 'kotlin.collections.groupByTo' call
    var destination = LinkedHashMap_init_$Create$();
    var tmp0_iterator = items.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.deleteditem.RestoreDeletedItemUseCase.invoke.<anonymous>' call
      var key = element.ze7_1;
      // Inline function 'kotlin.collections.getOrPut' call
      var value = destination.q(key);
      var tmp;
      if (value == null) {
        // Inline function 'kotlin.collections.groupByTo.<anonymous>' call
        var answer = ArrayList_init_$Create$();
        destination.s(key, answer);
        tmp = answer;
      } else {
        tmp = value;
      }
      var list = tmp;
      list.i1(element);
    }
    var itemsByType = destination;
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.xo5_1, VOID, RestoreDeletedItemUseCase$invoke$slambda_0(itemsByType, this, timeNow, items, null), $completion);
  };
  function toEpubTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.zo5_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp8_uid = $this.zo5_1.atomicfu$incrementAndGet();
    var tmp0_safe_receiver = _this__u8e3s4.dn6_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tn5_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.en6_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tn6_1;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var tmp3_elvis_lhs = tmp;
    var tmp9_label = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.dn6_1;
    var tmp10_href = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.un5_1;
    var tmp5_safe_receiver = _this__u8e3s4.fn6_1;
    var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.sn6_1;
    var tmp_0;
    if (tmp6_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp6_safe_receiver, 10));
      var tmp0_iterator = tmp6_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toEpubTocItem.<anonymous>' call
        var tmp$ret$0 = toEpubTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
        destination.i1(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp7_elvis_lhs = tmp_0;
    var tmp11_children = tmp7_elvis_lhs == null ? emptyList() : tmp7_elvis_lhs;
    return new EpubTocItem(tmp8_uid, tmp9_label, tmp10_href, tmp11_children, parentUids, indentLevel);
  }
  function toTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.zo5_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp0_safe_receiver = firstOrNull(_this__u8e3s4.sn7_1);
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kn7_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fn8_1;
    var tmp3_label = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
    var tmp4_href = _this__u8e3s4.tn7_1.zn6_1;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.vn7_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toTocItem.<anonymous>' call
      var tmp$ret$0 = toTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
      destination.i1(tmp$ret$0);
    }
    return new EpubTocItem(uid, tmp3_label, tmp4_href, destination, parentUids, indentLevel);
  }
  function $invokeCOROUTINE$28(_this__u8e3s4, opfPackage, readItemText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.io6_1 = _this__u8e3s4;
    this.jo6_1 = opfPackage;
    this.ko6_1 = readItemText;
  }
  protoOf($invokeCOROUTINE$28).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.lo6_1 = this.jo6_1.jna();
            if (!(this.lo6_1 == null) ? startsWith(this.lo6_1.en9_1, 'application/xhtml') : false) {
              this.hd_1 = 2;
              suspendResult = this.ko6_1(this.lo6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0;
              if (!(this.lo6_1 == null)) {
                tmp_0 = this.lo6_1.en9_1 === 'application/x-dtbncx+xml';
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                this.hd_1 = 1;
                suspendResult = this.ko6_1(this.lo6_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_1 = this;
                tmp_1.mo6_1 = null;
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            var docStr = suspendResult;
            var this_0 = this.io6_1.yo5_1;
            var this_1 = this_0.y4b();
            var this_2 = serializer(this_1, createKType(getKClass(NcxDocument), arrayOf([]), false));
            var ncxDoc = this_0.x4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), docStr);
            var tmp_2 = this;
            var this_3 = ncxDoc.cn8_1.on7_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_3.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var it = toTocItem(element, this.io6_1, 0, emptySet());
              var list = plus(listOf_0(it), it.qo6_1);
              addAll(destination, list);
            }

            tmp_2.mo6_1 = destination;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var docStr_0 = suspendResult;
            var this_4 = this.io6_1.yo5_1;
            var this_5 = this_4.y4b();
            var this_6 = serializer(this_5, createKType(getKClass(NavigationDocument), arrayOf([]), false));
            var navDoc = this_4.x4b(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), docStr_0);
            var tmp_3 = this;
            var this_7 = first_0(navDoc.on6_1.xn5_1).jn6_1.sn6_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_7.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var it_0 = toEpubTocItem(element_0, this.io6_1, 0, emptySet());
              var list_0 = plus(listOf_0(it_0), it_0.qo6_1);
              addAll(destination_0, list_0);
            }

            tmp_3.mo6_1 = destination_0;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.mo6_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetEpubTableOfContentsUseCase(xml) {
    this.yo5_1 = xml;
    this.zo5_1 = atomic$int$1(0);
  }
  protoOf(GetEpubTableOfContentsUseCase).uo6 = function (opfPackage, readItemText, $completion) {
    var tmp = new $invokeCOROUTINE$28(this, opfPackage, readItemText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function BlobFileUseCase() {
  }
  function _get_uriHelper__vzpi21($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xo6_1;
    uriHelper$factory_0();
    return this_0.t2();
  }
  function UriFileData(bytes, filename, mimeType) {
    this.yo6_1 = bytes;
    this.zo6_1 = filename;
    this.ao7_1 = mimeType;
  }
  protoOf(UriFileData).toString = function () {
    return 'UriFileData(bytes=' + toString(this.yo6_1) + ', filename=' + this.zo6_1 + ', mimeType=' + this.ao7_1 + ')';
  };
  protoOf(UriFileData).hashCode = function () {
    var result = this.yo6_1 == null ? 0 : hashCode(this.yo6_1);
    result = imul(result, 31) + getStringHashCode(this.zo6_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ao7_1) | 0;
    return result;
  };
  protoOf(UriFileData).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UriFileData))
      return false;
    var tmp0_other_with_cast = other instanceof UriFileData ? other : THROW_CCE();
    if (!equals(this.yo6_1, tmp0_other_with_cast.yo6_1))
      return false;
    if (!(this.zo6_1 === tmp0_other_with_cast.zo6_1))
      return false;
    if (!(this.ao7_1 === tmp0_other_with_cast.ao7_1))
      return false;
    return true;
  };
  function getMimeTypeFromExtension($this, filename) {
    return endsWith(filename, '.svg', true) ? 'image/svg+xml' : endsWith(filename, '.png', true) ? 'image/png' : (endsWith(filename, '.jpg', true) ? true : endsWith(filename, '.jpeg', true)) ? 'image/jpeg' : endsWith(filename, '.zip', true) ? 'application/zip' : endsWith(filename, '.json', true) ? 'application/json' : 'application/octet-stream';
  }
  function Companion_41() {
    this.bo7_1 = 'file';
  }
  var Companion_instance_89;
  function Companion_getInstance_59() {
    return Companion_instance_89;
  }
  function $invokeCOROUTINE$29(_this__u8e3s4, uriStr, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ko7_1 = _this__u8e3s4;
    this.lo7_1 = uriStr;
  }
  protoOf($invokeCOROUTINE$29).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 20;
            this.id_1 = 12;
            this.no7_1 = Companion_getInstance_3().q2t(this.lo7_1);
            this.hd_1 = 1;
            suspendResult = _get_uriHelper__vzpi21(this.ko7_1).go8(this.no7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.oo7_1 = suspendResult;
            if (this.oo7_1.c7(new Long(0, 0)) <= 0) {
              var tmp_0 = this;
              tmp_0.po7_1 = null;
              this.hd_1 = 11;
              continue $sm;
            } else {
              this.qo7_1 = new Int8Array(this.oo7_1.mb());
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            suspendResult = _get_uriHelper__vzpi21(this.ko7_1).ho8(this.no7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.so7_1 = suspendResult;
            this.to7_1 = null;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.id_1 = 7;
            this.id_1 = 6;
            var tmp_1 = this;
            var input = this.so7_1;
            readTo(input, this.qo7_1, 0, this.oo7_1.mb());
            tmp_1.uo7_1 = Unit_instance;
            this.hd_1 = 8;
            var tmp_2 = this;
            continue $sm;
          case 6:
            this.id_1 = 7;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              this.vo7_1 = this.kd_1;
              var tmp_4 = this;
              this.to7_1 = this.vo7_1;
              throw this.vo7_1;
            } else {
              throw this.kd_1;
            }

          case 7:
            this.id_1 = 12;
            this.wo7_1 = this.kd_1;
            closeFinally(this.so7_1, this.to7_1);
            throw this.wo7_1;
          case 8:
            this.id_1 = 12;
            var tmp_5 = this;
            closeFinally(this.so7_1, this.to7_1);
            tmp_5.ro7_1 = Unit_instance;
            this.hd_1 = 10;
            continue $sm;
          case 9:
            this.id_1 = 12;
            closeFinally(this.so7_1, this.to7_1);
            if (false) {
              this.hd_1 = 2;
              continue $sm;
            }

            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.po7_1 = this.qo7_1;
            this.hd_1 = 11;
            continue $sm;
          case 11:
            this.mo7_1 = this.po7_1;
            this.id_1 = 20;
            this.hd_1 = 13;
            continue $sm;
          case 12:
            this.id_1 = 20;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Exception) {
              this.xo7_1 = this.kd_1;
              var tmp_7 = this;
              tmp_7.mo7_1 = null;
              this.hd_1 = 13;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 20;
            this.yo7_1 = this.mo7_1;
            this.id_1 = 15;
            this.ao8_1 = Companion_getInstance_3().q2t(this.lo7_1);
            this.hd_1 = 14;
            suspendResult = _get_uriHelper__vzpi21(this.ko7_1).io8(this.ao8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 14:
            this.bo8_1 = suspendResult;
            this.zo7_1 = this.bo8_1 == null ? substringAfterLast(this.lo7_1, _Char___init__impl__6a9atx(47), 'file') : this.bo8_1;
            this.id_1 = 20;
            this.hd_1 = 16;
            continue $sm;
          case 15:
            this.id_1 = 20;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Exception) {
              this.co8_1 = this.kd_1;
              var tmp_9 = this;
              tmp_9.zo7_1 = substringAfterLast(this.lo7_1, _Char___init__impl__6a9atx(47), 'file');
              this.hd_1 = 16;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 16:
            this.id_1 = 20;
            this.do8_1 = this.zo7_1;
            this.id_1 = 18;
            this.fo8_1 = Companion_getInstance_3().q2t(this.lo7_1);
            this.hd_1 = 17;
            suspendResult = _get_uriHelper__vzpi21(this.ko7_1).jo8(this.fo8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 17:
            var tmp1_elvis_lhs = suspendResult;
            this.eo8_1 = tmp1_elvis_lhs == null ? getMimeTypeFromExtension(this.ko7_1, this.lo7_1) : tmp1_elvis_lhs;
            this.id_1 = 20;
            this.hd_1 = 19;
            continue $sm;
          case 18:
            this.id_1 = 20;
            var tmp_10 = this.kd_1;
            if (tmp_10 instanceof Exception) {
              var e = this.kd_1;
              var tmp_11 = this;
              tmp_11.eo8_1 = getMimeTypeFromExtension(this.ko7_1, this.lo7_1);
              this.hd_1 = 19;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 19:
            this.id_1 = 20;
            var mimeType = this.eo8_1;
            return new UriFileData(this.yo7_1, this.do8_1, mimeType);
          case 20:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 20) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function UriFileUseCase(di) {
    this.wo6_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = this.wo6_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UriHelper), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.xo6_1 = Instance(this_0, tmp$ret$0, null).f5j(this, uriHelper$factory());
  }
  protoOf(UriFileUseCase).ko8 = function (uriStr, $completion) {
    var tmp = new $invokeCOROUTINE$29(this, uriStr, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function uriHelper$factory() {
    return getPropertyCallableRef('uriHelper', 1, KProperty1, function (receiver) {
      return _get_uriHelper__vzpi21(receiver);
    }, null);
  }
  function uriHelper$factory_0() {
    return getPropertyCallableRef('uriHelper', 1, KProperty1, function (receiver) {
      return _get_uriHelper__vzpi21(receiver);
    }, null);
  }
  function Companion_42() {
    Companion_instance_90 = this;
    this.lo8_1 = Companion_getInstance_70().oo8_1;
  }
  var Companion_instance_90;
  function Companion_getInstance_60() {
    if (Companion_instance_90 == null)
      new Companion_42();
    return Companion_instance_90;
  }
  function FilterUsernameUseCase() {
    Companion_getInstance_60();
  }
  protoOf(FilterUsernameUseCase).po8 = function (username, invalidCharReplacement) {
    // Inline function 'kotlin.text.map' call
    // Inline function 'kotlin.text.mapTo' call
    var destination = ArrayList_init_$Create$_0(charSequenceLength(username));
    var inductionVariable = 0;
    while (inductionVariable < charSequenceLength(username)) {
      var item = charSequenceGet(username, inductionVariable);
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.domain.filterusername.FilterUsernameUseCase.invoke.<anonymous>' call
      var tmp;
      if (isLetter(item)) {
        // Inline function 'kotlin.text.lowercase' call
        // Inline function 'kotlin.js.unsafeCast' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = toString_1(item).toLowerCase();
      } else if (isDigit(item)) {
        tmp = new Char(item);
      } else if (Companion_getInstance_60().lo8_1.a1(new Char(item))) {
        tmp = new Char(item);
      } else {
        tmp = invalidCharReplacement;
      }
      var tmp$ret$3 = tmp;
      destination.i1(tmp$ret$3);
    }
    return joinToString(destination, '');
  };
  function GetApiUrlUseCase() {
  }
  function GetApiUrlUseCaseDirect(endpoint) {
    this.qo8_1 = endpoint;
  }
  protoOf(GetApiUrlUseCaseDirect).io3 = function (path) {
    return requirePostfix(this.qo8_1.hmr_1, '/') + removePrefix(path, '/');
  };
  function VersionInfo(versionString, buildTime) {
    this.ro8_1 = versionString;
    this.so8_1 = buildTime;
  }
  protoOf(VersionInfo).toString = function () {
    return 'VersionInfo(versionString=' + this.ro8_1 + ', buildTime=' + this.so8_1.toString() + ')';
  };
  protoOf(VersionInfo).hashCode = function () {
    var result = getStringHashCode(this.ro8_1);
    result = imul(result, 31) + this.so8_1.hashCode() | 0;
    return result;
  };
  protoOf(VersionInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VersionInfo))
      return false;
    var tmp0_other_with_cast = other instanceof VersionInfo ? other : THROW_CCE();
    if (!(this.ro8_1 === tmp0_other_with_cast.ro8_1))
      return false;
    if (!this.so8_1.equals(tmp0_other_with_cast.so8_1))
      return false;
    return true;
  };
  function GetVersionUseCase() {
  }
  function GetHtmlContentDisplayEngineOptionsUseCase(optionsList) {
    this.uo8_1 = optionsList;
  }
  protoOf(GetHtmlContentDisplayEngineOptionsUseCase).to8 = function () {
    return this.uo8_1;
  };
  function GetHtmlContentDisplayEngineUseCase(settings, getOptionsUseCase) {
    this.vo8_1 = settings;
    this.wo8_1 = getOptionsUseCase;
  }
  protoOf(GetHtmlContentDisplayEngineUseCase).to8 = function () {
    // Inline function 'com.russhwolf.settings.get' call
    var this_0 = this.vo8_1;
    var key = 'com.ustadmobile.htmlcontentdisplayengine';
    var settingInt = this_0.ll8(key, 0);
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.wo8_1.to8().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.htmlcontentdisplayengine.GetHtmlContentDisplayEngineUseCase.invoke.<anonymous>' call
        if (element.xo8_1 === settingInt) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$2;
    return tmp0_elvis_lhs == null ? first_0(this.wo8_1.to8()) : tmp0_elvis_lhs;
  };
  function Companion_43() {
    this.ao9_1 = 'com.ustadmobile.htmlcontentdisplayengine';
  }
  var Companion_instance_91;
  function Companion_getInstance_61() {
    return Companion_instance_91;
  }
  function SetHtmlContentDisplayEngineUseCase(settings) {
    this.bo9_1 = settings;
  }
  function SetLangResult(waitForRestart) {
    this.co9_1 = waitForRestart;
  }
  protoOf(SetLangResult).toString = function () {
    return 'SetLangResult(waitForRestart=' + this.co9_1 + ')';
  };
  protoOf(SetLangResult).hashCode = function () {
    return getBooleanHashCode(this.co9_1);
  };
  protoOf(SetLangResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SetLangResult))
      return false;
    var tmp0_other_with_cast = other instanceof SetLangResult ? other : THROW_CCE();
    if (!(this.co9_1 === tmp0_other_with_cast.co9_1))
      return false;
    return true;
  };
  function SetLanguageUseCase() {
  }
  function LaunchOpenLicensesUseCase() {
  }
  function MakeLinkUseCase(endpoint) {
    this.fo9_1 = endpoint;
  }
  protoOf(MakeLinkUseCase).go9 = function (destName, args) {
    var tmp = UMFileUtil_getInstance();
    Companion_getInstance_92();
    return appendQueryArgs_0(tmp.ho9([this.fo9_1.hmr_1, '/umapp/#/']) + destName, toQueryString(args));
  };
  function OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, $this) {
    OnClickLinkUseCase.call($this, navController, accountManager, openExternalLinkUseCase, apiUrlConfig.gn5_1);
    return $this;
  }
  function OnClickLinkUseCase_init_$Create$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig) {
    return OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, objectCreate(protoOf(OnClickLinkUseCase)));
  }
  function OnClickLinkUseCase(navController, accountManager, openExternalLinkUseCase, userCanSelectServer) {
    this.io9_1 = navController;
    this.jo9_1 = accountManager;
    this.ko9_1 = openExternalLinkUseCase;
    this.lo9_1 = userCanSelectServer;
  }
  protoOf(OnClickLinkUseCase).mo9 = function (link, target) {
    navigateToLink(this.io9_1, link, this.jo9_1, this.ko9_1, VOID, VOID, this.lo9_1, VOID, VOID, target);
  };
  var LinkTarget_BLANK_instance;
  var LinkTarget_TOP_instance;
  var LinkTarget_SELF_instance;
  var LinkTarget_DEFAULT_instance;
  function Companion_44() {
  }
  protoOf(Companion_44).klh = function (targetAttr) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    switch (targetAttr.toLowerCase()) {
      case '_top':
        return LinkTarget_TOP_getInstance();
      case '_blank':
        return LinkTarget_BLANK_getInstance();
      case '_self':
        return LinkTarget_SELF_getInstance();
      default:
        return LinkTarget_DEFAULT_getInstance();
    }
  };
  var Companion_instance_92;
  function Companion_getInstance_62() {
    return Companion_instance_92;
  }
  var LinkTarget_entriesInitialized;
  function LinkTarget_initEntries() {
    if (LinkTarget_entriesInitialized)
      return Unit_instance;
    LinkTarget_entriesInitialized = true;
    LinkTarget_BLANK_instance = new LinkTarget('BLANK', 0);
    LinkTarget_TOP_instance = new LinkTarget('TOP', 1);
    LinkTarget_SELF_instance = new LinkTarget('SELF', 2);
    LinkTarget_DEFAULT_instance = new LinkTarget('DEFAULT', 3);
  }
  function LinkTarget(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function LinkTarget_BLANK_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_BLANK_instance;
  }
  function LinkTarget_TOP_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_TOP_instance;
  }
  function LinkTarget_SELF_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_SELF_instance;
  }
  function LinkTarget_DEFAULT_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_DEFAULT_instance;
  }
  function OpenExternalLinkUseCase() {
  }
  function UpdatePeerReviewAllocationUseCase$invoke$lambda($selectedMarkerUid) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $selectedMarkerUid;
      tmp.dfm_1 = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$30(_this__u8e3s4, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vo9_1 = _this__u8e3s4;
    this.wo9_1 = existingAllocations;
    this.xo9_1 = groupUid;
    this.yo9_1 = clazzUid;
    this.zo9_1 = assignmentUid;
    this.aoa_1 = numReviewsPerSubmission;
    this.boa_1 = allocateRemaining;
    this.coa_1 = resetAllocations;
  }
  protoOf($invokeCOROUTINE$30).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hd_1 = 1;
            suspendResult = this.vo9_1.woa_1.v7k().h7y(this.yo9_1, this.xo9_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.doa_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.eoa_1 = this.doa_1;
            var tmp_1 = this;
            tmp_1.foa_1 = this.eoa_1;
            var tmp_2 = this;
            tmp_2.goa_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.eoa_1, 10));
            this.hoa_1 = this.foa_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.hoa_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.ioa_1 = this.hoa_1.e();
            var tmp_3 = this;
            tmp_3.joa_1 = this.ioa_1;
            var tmp_4 = this;
            tmp_4.koa_1 = this.vo9_1;
            var tmp_5 = this;
            var this_0 = this.wo9_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.efm_1.equals(this.joa_1)) {
                destination.i1(element);
              }
            }

            tmp_5.loa_1 = this.vo9_1.yoa(destination, this.aoa_1);
            var tmp_6 = this;
            tmp_6.moa_1 = this.aoa_1;
            if (this.loa_1.u() >= this.moa_1) {
              this.noa_1 = this.loa_1;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.ooa_1 = until(0, this.moa_1 - this.loa_1.u() | 0);
              var tmp_8 = this;
              tmp_8.poa_1 = this.ooa_1;
              var tmp_9 = this;
              tmp_9.qoa_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ooa_1, 10));
              this.roa_1 = this.poa_1.w();
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            if (!this.roa_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.soa_1 = this.roa_1.e();
            var tmp_10 = this;
            tmp_10.toa_1 = this.soa_1;
            var tmp_11 = this;
            tmp_11.uoa_1 = new PeerReviewerAllocation();
            var tmp_12 = this;
            tmp_12.voa_1 = this.uoa_1;
            this.hd_1 = 4;
            var tmp_13 = get_doorPrimaryKeyManager(this.vo9_1.woa_1);
            suspendResult = tmp_13.t68(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var ARGUMENT = suspendResult;
            this.voa_1.cfm_1 = ARGUMENT;
            this.voa_1.efm_1 = this.joa_1;
            this.voa_1.ffm_1 = this.zo9_1;
            var ARGUMENT_0 = this.uoa_1;
            this.qoa_1.i1(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 5:
            var ARGUMENT_1 = this.qoa_1;
            this.noa_1 = plus(this.loa_1, ARGUMENT_1);
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var existingAllocationsForSubmitter = this.noa_1;
            var ARGUMENT_2 = to(this.joa_1, existingAllocationsForSubmitter);
            this.goa_1.i1(ARGUMENT_2);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            var ARGUMENT_3 = this.goa_1;
            var allocationsForEachSubmitter = toMap(ARGUMENT_3);
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = allocationsForEachSubmitter.q2().w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var list = element_0.t2();
              addAll(destination_0, list);
            }

            var allocationList = toMutableList(destination_0);
            if (this.coa_1) {
              var inductionVariable = 0;
              var last = allocationList.u() - 1 | 0;
              if (inductionVariable <= last)
                do {
                  var index = inductionVariable;
                  inductionVariable = inductionVariable + 1 | 0;
                  allocationList.f1(index, allocationList.v(index).cjt(VOID, new Long(0, 0)));
                }
                 while (inductionVariable <= last);
            }

            if (this.boa_1) {
              var this_1 = this.doa_1;
              var destination_1 = ArrayList_init_$Create$();
              var tmp0_iterator_1 = this_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp_14;
                  if (isInterface(allocationList, Collection)) {
                    tmp_14 = allocationList.c1();
                  } else {
                    tmp_14 = false;
                  }
                  if (tmp_14) {
                    tmp$ret$0 = 0;
                    break l$ret$1;
                  }
                  var count = 0;
                  var tmp0_iterator_2 = allocationList.w();
                  while (tmp0_iterator_2.f()) {
                    var element_2 = tmp0_iterator_2.e();
                    if (element_2.dfm_1.equals(element_1)) {
                      count = count + 1 | 0;
                      checkCountOverflow(count);
                    }
                  }
                  tmp$ret$0 = count;
                }
                 while (false);
                var numToMarkAlreadyAssignedToSubmitter = tmp$ret$0;
                var this_2 = until(0, this.aoa_1 - numToMarkAlreadyAssignedToSubmitter | 0);
                var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_3 = this_2.w();
                while (tmp0_iterator_3.f()) {
                  var item = tmp0_iterator_3.e();
                  destination_2.i1(element_1);
                }
                var list_0 = destination_2;
                addAll(destination_1, list_0);
              }
              var fromBucket = toMutableList(shuffled(destination_1));
              var inductionVariable_0 = 0;
              var last_0 = allocationList.u() - 1 | 0;
              if (inductionVariable_0 <= last_0)
                do {
                  var index_0 = inductionVariable_0;
                  inductionVariable_0 = inductionVariable_0 + 1 | 0;
                  var allocation = allocationList.v(index_0);
                  if (allocation.dfm_1.equals(new Long(0, 0))) {
                    var destination_3 = ArrayList_init_$Create$();
                    var tmp0_iterator_4 = allocationList.w();
                    while (tmp0_iterator_4.f()) {
                      var element_3 = tmp0_iterator_4.e();
                      if (element_3.efm_1.equals(allocation.efm_1)) {
                        destination_3.i1(element_3);
                      }
                    }
                    var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_3, 10));
                    var tmp0_iterator_5 = destination_3.w();
                    while (tmp0_iterator_5.f()) {
                      var item_0 = tmp0_iterator_5.e();
                      destination_4.i1(item_0.dfm_1);
                    }
                    var destination_5 = ArrayList_init_$Create$();
                    var tmp0_iterator_6 = destination_4.w();
                    while (tmp0_iterator_6.f()) {
                      var element_4 = tmp0_iterator_6.e();
                      if (!element_4.equals(new Long(0, 0))) {
                        destination_5.i1(element_4);
                      }
                    }
                    var otherMarkersForThisSubmitter = destination_5;
                    var tmp$ret$2;
                    l$ret$3: do {
                      var tmp0_iterator_7 = fromBucket.w();
                      while (tmp0_iterator_7.f()) {
                        var element_5 = tmp0_iterator_7.e();
                        if (!element_5.equals(allocation.efm_1) ? !otherMarkersForThisSubmitter.a1(element_5) : false) {
                          tmp$ret$2 = element_5;
                          break l$ret$3;
                        }
                      }
                      tmp$ret$2 = null;
                    }
                     while (false);
                    var tmp2_safe_receiver = tmp$ret$2;
                    var tmp_15;
                    if (tmp2_safe_receiver == null) {
                      tmp_15 = null;
                    } else {
                      fromBucket.j1(tmp2_safe_receiver);
                      tmp_15 = tmp2_safe_receiver;
                    }
                    var selectedMarkerUid = tmp_15;
                    allocationList.f1(index_0, shallowCopy_2(allocation, UpdatePeerReviewAllocationUseCase$invoke$lambda(selectedMarkerUid)));
                  }
                }
                 while (inductionVariable_0 <= last_0);
            }

            return allocationList;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UpdatePeerReviewAllocationUseCase(db, systemImpl) {
    this.woa_1 = db;
    this.xoa_1 = systemImpl;
  }
  protoOf(UpdatePeerReviewAllocationUseCase).yoa = function (_this__u8e3s4, maxSize) {
    return _this__u8e3s4.u() <= maxSize ? _this__u8e3s4 : _this__u8e3s4.z(0, maxSize);
  };
  protoOf(UpdatePeerReviewAllocationUseCase).zoa = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) {
    var tmp = new $invokeCOROUTINE$30(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UpdatePeerReviewAllocationUseCase).aob = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion, $super) {
    resetAllocations = resetAllocations === VOID ? false : resetAllocations;
    return $super === VOID ? this.zoa(existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) : $super.zoa.call(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
  };
  function AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, resultContinuation) {
    this.job_1 = $effectiveDb;
    this.kob_1 = $person;
    this.lob_1 = $systemPermissions;
    this.mob_1 = $createPersonParentApprovalIfMinor;
    this.nob_1 = $addedByPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddNewPersonUseCase$invoke$slambda).nne = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.nne(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.job_1.s7j().insertAsync(this.kob_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.pob_1 = suspendResult;
            this.qob_1 = this.kob_1.x9b_1.equals(new Long(0, 0)) ? this.pob_1 : this.kob_1.x9b_1;
            this.hd_1 = 2;
            suspendResult = this.job_1.u7l().qhj(new SystemPermission(VOID, this.qob_1, VOID, this.lob_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (isDateOfBirthAMinor(Companion_getInstance_6().ulh(this.kob_1.f9c_1)) ? this.mob_1 : false) {
              this.hd_1 = 3;
              var tmp_0 = this.job_1.c7l();
              var tmp2_ppjApprovalTiemstamp = systemTimeInMillis();
              suspendResult = tmp_0.qgh(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, this.nob_1, this.qob_1, 8, VOID, VOID, VOID, 1, tmp2_ppjApprovalTiemstamp), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return this.qob_1;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new AddNewPersonUseCase$invoke$slambda(this.job_1, this.kob_1, this.lob_1, this.mob_1, this.nob_1, completion);
    i.oob_1 = it;
    return i;
  };
  function AddNewPersonUseCase$invoke$slambda_0($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, resultContinuation) {
    var i = new AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, resultContinuation);
    var l = function (it, $completion) {
      return i.nne(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddNewPersonUseCase(db, repo) {
    this.rob_1 = db;
    this.sob_1 = repo;
  }
  protoOf(AddNewPersonUseCase).tob = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion) {
    var tmp0_elvis_lhs = this.sob_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.rob_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, AddNewPersonUseCase$invoke$slambda_0(effectiveDb, person, systemPermissions, createPersonParentApprovalIfMinor, addedByPersonUid, null), $completion);
  };
  protoOf(AddNewPersonUseCase).uob = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion, $super) {
    addedByPersonUid = addedByPersonUid === VOID ? new Long(0, 0) : addedByPersonUid;
    createPersonParentApprovalIfMinor = createPersonParentApprovalIfMinor === VOID ? true : createPersonParentApprovalIfMinor;
    var tmp;
    if (systemPermissions === VOID) {
      Companion_getInstance_7();
      tmp = new Long(0, 0);
    } else {
      tmp = systemPermissions;
    }
    systemPermissions = tmp;
    return $super === VOID ? this.tob(person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion) : $super.tob.call(this, person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion);
  };
  function BulkAddPersonException(message, errors) {
    message = message === VOID ? null : message;
    IllegalArgumentException_init_$Init$_0(message, this);
    captureStack(this, BulkAddPersonException);
    this.vob_1 = errors;
  }
  protoOf(BulkAddPersonException).toString = function () {
    var tmp0_elvis_lhs = this.message;
    return (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs) + ' ' + joinToString(this.vob_1);
  };
  function $serializer_35() {
    $serializer_instance_35 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsDataError', this, 3);
    tmp0_serialDesc.y4l('lineNum', false);
    tmp0_serialDesc.y4l('colName', false);
    tmp0_serialDesc.y4l('invalidValue', false);
    this.wob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_35).v4a = function () {
    return this.wob_1;
  };
  protoOf($serializer_35).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_35).x4a = function (decoder) {
    var tmp0_desc = this.wob_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.n4e(tmp0_desc);
    if (tmp7_input.c4f()) {
      tmp4_local0 = tmp7_input.s4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.s4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.o4e(tmp0_desc);
    return BulkAddPersonsDataError_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_35).xob = function (encoder, value) {
    var tmp0_desc = this.wob_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.w4f(tmp0_desc, 0, value.yob_1);
    tmp1_output.b4g(tmp0_desc, 1, value.zob_1);
    tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.aoc_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_35).w4a = function (encoder, value) {
    return this.xob(encoder, value instanceof BulkAddPersonsDataError ? value : THROW_CCE());
  };
  var $serializer_instance_35;
  function $serializer_getInstance_47() {
    if ($serializer_instance_35 == null)
      new $serializer_35();
    return $serializer_instance_35;
  }
  function BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_47().wob_1);
    }
    $this.yob_1 = lineNum;
    $this.zob_1 = colName;
    $this.aoc_1 = invalidValue;
    return $this;
  }
  function BulkAddPersonsDataError_init_$Create$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker) {
    return BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonsDataError)));
  }
  function BulkAddPersonsDataError() {
  }
  protoOf(BulkAddPersonsDataError).toString = function () {
    return 'BulkAddPersonsDataError(lineNum=' + this.yob_1 + ', colName=' + this.zob_1 + ', invalidValue=' + this.aoc_1 + ')';
  };
  protoOf(BulkAddPersonsDataError).hashCode = function () {
    var result = this.yob_1;
    result = imul(result, 31) + getStringHashCode(this.zob_1) | 0;
    result = imul(result, 31) + (this.aoc_1 == null ? 0 : getStringHashCode(this.aoc_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonsDataError).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonsDataError))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonsDataError ? other : THROW_CCE();
    if (!(this.yob_1 === tmp0_other_with_cast.yob_1))
      return false;
    if (!(this.zob_1 === tmp0_other_with_cast.zob_1))
      return false;
    if (!(this.aoc_1 == tmp0_other_with_cast.aoc_1))
      return false;
    return true;
  };
  function BulkAddPersonsFromLocalUriUseCase() {
  }
  function Companion_45() {
  }
  var Companion_instance_93;
  function Companion_getInstance_63() {
    return Companion_instance_93;
  }
  function $serializer_36() {
    $serializer_instance_36 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsUseCase.BulkAddUsersResult', this, 1);
    tmp0_serialDesc.y4l('numImported', false);
    this.coc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_36).v4a = function () {
    return this.coc_1;
  };
  protoOf($serializer_36).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance()];
  };
  protoOf($serializer_36).x4a = function (decoder) {
    var tmp0_desc = this.coc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_input = decoder.n4e(tmp0_desc);
    if (tmp5_input.c4f()) {
      tmp4_local0 = tmp5_input.s4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.s4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.o4e(tmp0_desc);
    return BulkAddUsersResult_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_36).doc = function (encoder, value) {
    var tmp0_desc = this.coc_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.w4f(tmp0_desc, 0, value.eoc_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_36).w4a = function (encoder, value) {
    return this.doc(encoder, value instanceof BulkAddUsersResult ? value : THROW_CCE());
  };
  var $serializer_instance_36;
  function $serializer_getInstance_48() {
    if ($serializer_instance_36 == null)
      new $serializer_36();
    return $serializer_instance_36;
  }
  function BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_48().coc_1);
    }
    $this.eoc_1 = numImported;
    return $this;
  }
  function BulkAddUsersResult_init_$Create$(seen1, numImported, serializationConstructorMarker) {
    return BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, objectCreate(protoOf(BulkAddUsersResult)));
  }
  function BulkAddUsersResult(numImported) {
    this.eoc_1 = numImported;
  }
  protoOf(BulkAddUsersResult).toString = function () {
    return 'BulkAddUsersResult(numImported=' + this.eoc_1 + ')';
  };
  protoOf(BulkAddUsersResult).hashCode = function () {
    return this.eoc_1;
  };
  protoOf(BulkAddUsersResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddUsersResult))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddUsersResult ? other : THROW_CCE();
    if (!(this.eoc_1 === tmp0_other_with_cast.eoc_1))
      return false;
    return true;
  };
  function IPhoneNumberUtil() {
  }
  function formatInternationalOrNull(_this__u8e3s4, number) {
    var tmp;
    try {
      tmp = _this__u8e3s4.goc(_this__u8e3s4.foc(number, 'US'));
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var e = $p;
        tmp_0 = null;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function OnClickPhoneNumUseCase() {
  }
  function PhoneNumValidatorUseCase() {
  }
  function OnClickEmailUseCase() {
  }
  function ShareAppUseCase() {
  }
  function ShareTextUseCase() {
  }
  function GetShowPoweredByUseCase(showPoweredBy) {
    this.ioc_1 = showPoweredBy;
  }
  protoOf(GetShowPoweredByUseCase).to8 = function () {
    return this.ioc_1;
  };
  function Companion_46() {
    this.joc_1 = 'en';
  }
  var Companion_instance_94;
  function Companion_getInstance_64() {
    return Companion_instance_94;
  }
  function $invokeCOROUTINE$31(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.soc_1 = _this__u8e3s4;
  }
  protoOf($invokeCOROUTINE$31).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.toc_1 = plus(listOf_0(this.soc_1.bod_1.aod_1), this.soc_1.bod_1.uoc_1);
            this.hd_1 = 1;
            suspendResult = this.soc_1.cod_1.b7l().ahb(1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            var availableLocales = filterNotNull(ARGUMENT);
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.toc_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (availableLocales.a1(element)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp0_elvis_lhs = tmp$ret$0;
            return tmp0_elvis_lhs == null ? 'en' : tmp0_elvis_lhs;
          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 GetLocaleForSiteTermsUseCase(supportedLangConfig, repo) {
    this.bod_1 = supportedLangConfig;
    this.cod_1 = repo;
  }
  protoOf(GetLocaleForSiteTermsUseCase).dod = function ($completion) {
    var tmp = new $invokeCOROUTINE$31(this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickSendSmsUseCase() {
  }
  function Companion_47() {
    this.eod_1 = 'dismissed-social-warning-';
  }
  var Companion_instance_95;
  function Companion_getInstance_65() {
    return Companion_instance_95;
  }
  function DismissSocialWarningUseCase(settings) {
    this.fod_1 = settings;
  }
  protoOf(DismissSocialWarningUseCase).knv = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    // Inline function 'com.russhwolf.settings.set' call
    this.fod_1.ol8(key, true);
  };
  function Companion_48() {
    this.god_1 = 'dismissed-social-warning-';
    this.hod_1 = 'https://beinternetawesome.withgoogle.com';
  }
  var Companion_instance_96;
  function Companion_getInstance_66() {
    return Companion_instance_96;
  }
  function ShowSocialWarningUseCase(settings) {
    this.iod_1 = settings;
  }
  protoOf(ShowSocialWarningUseCase).io3 = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    return !this.iod_1.pl8(key, false);
  };
  function GetOfflineStorageAvailableSpace() {
  }
  function Companion_49() {
    this.kod_1 = 'offlineStoragePath';
  }
  var Companion_instance_97;
  function Companion_getInstance_67() {
    return Companion_instance_97;
  }
  function GetOfflineStorageOptionsUseCase() {
  }
  function GetOfflineStorageSettingUseCase(getOfflineStorageOptionsUseCase, settings) {
    this.lod_1 = getOfflineStorageOptionsUseCase;
    this.mod_1 = settings;
  }
  protoOf(GetOfflineStorageSettingUseCase).to8 = function () {
    var setting = this.mod_1.nl8('offlineStoragePath');
    var options = this.lod_1.to8();
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.domain.storage.GetOfflineStorageSettingUseCase.invoke.<anonymous>' call
    if (!(setting == null)) {
      tmp = options;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      var tmp$ret$3;
      $l$block: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator = tmp0_safe_receiver.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.domain.storage.GetOfflineStorageSettingUseCase.invoke.<anonymous>' call
          if (element.ood_1 === setting) {
            tmp$ret$3 = element;
            break $l$block;
          }
        }
        tmp$ret$3 = null;
      }
      tmp_0 = tmp$ret$3;
    }
    var tmp1_elvis_lhs = tmp_0;
    return tmp1_elvis_lhs == null ? first_0(options) : tmp1_elvis_lhs;
  };
  function OfflineStorageOption() {
  }
  protoOf(OfflineStorageOption).hashCode = function () {
    var result = this.nod_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.ood_1) | 0;
    return result;
  };
  protoOf(OfflineStorageOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OfflineStorageOption))
      return false;
    var tmp0_other_with_cast = other instanceof OfflineStorageOption ? other : THROW_CCE();
    if (!this.nod_1.equals(tmp0_other_with_cast.nod_1))
      return false;
    if (!(this.ood_1 === tmp0_other_with_cast.ood_1))
      return false;
    return true;
  };
  function SetOfflineStorageSettingUseCase(settings) {
    this.pod_1 = settings;
  }
  function Companion_50() {
  }
  var Companion_instance_98;
  function Companion_getInstance_68() {
    return Companion_instance_98;
  }
  function $serializer_37() {
    $serializer_instance_37 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.theme.ThemeUploadUseCase.ThemeUploadResponse', this, 2);
    tmp0_serialDesc.y4l('success', false);
    tmp0_serialDesc.y4l('message', false);
    this.qod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_37).v4a = function () {
    return this.qod_1;
  };
  protoOf($serializer_37).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_37).x4a = function (decoder) {
    var tmp0_desc = this.qod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.p4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.p4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return ThemeUploadResponse_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_37).rod = function (encoder, value) {
    var tmp0_desc = this.qod_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.t4f(tmp0_desc, 0, value.sod_1);
    tmp1_output.b4g(tmp0_desc, 1, value.tod_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_37).w4a = function (encoder, value) {
    return this.rod(encoder, value instanceof ThemeUploadResponse ? value : THROW_CCE());
  };
  var $serializer_instance_37;
  function $serializer_getInstance_49() {
    if ($serializer_instance_37 == null)
      new $serializer_37();
    return $serializer_instance_37;
  }
  function ThemeUploadResponse_init_$Init$(seen1, success, message, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_49().qod_1);
    }
    $this.sod_1 = success;
    $this.tod_1 = message;
    return $this;
  }
  function ThemeUploadResponse_init_$Create$(seen1, success, message, serializationConstructorMarker) {
    return ThemeUploadResponse_init_$Init$(seen1, success, message, serializationConstructorMarker, objectCreate(protoOf(ThemeUploadResponse)));
  }
  function ThemeUploadResponse(success, message) {
    this.sod_1 = success;
    this.tod_1 = message;
  }
  protoOf(ThemeUploadResponse).toString = function () {
    return 'ThemeUploadResponse(success=' + this.sod_1 + ', message=' + this.tod_1 + ')';
  };
  protoOf(ThemeUploadResponse).hashCode = function () {
    var result = getBooleanHashCode(this.sod_1);
    result = imul(result, 31) + getStringHashCode(this.tod_1) | 0;
    return result;
  };
  protoOf(ThemeUploadResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ThemeUploadResponse))
      return false;
    var tmp0_other_with_cast = other instanceof ThemeUploadResponse ? other : THROW_CCE();
    if (!(this.sod_1 === tmp0_other_with_cast.sod_1))
      return false;
    if (!(this.tod_1 === tmp0_other_with_cast.tod_1))
      return false;
    return true;
  };
  function DeleteUrisUseCase() {
  }
  function IsTempFileCheckerUseCase() {
  }
  function ChunkIterator(chunkInfo) {
    this.uod_1 = chunkInfo;
    this.vod_1 = 0;
  }
  protoOf(ChunkIterator).f = function () {
    return this.vod_1 < this.uod_1.aoe_1;
  };
  protoOf(ChunkIterator).e = function () {
    // Inline function 'kotlin.also' call
    var this_0 = this.uod_1.v(this.vod_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkIterator.next.<anonymous>' call
    this.vod_1 = this.vod_1 + 1 | 0;
    return this_0;
  };
  function Chunk(start, end, isLastChunk, size) {
    size = size === VOID ? end.mc(start).mb() : size;
    this.boe_1 = start;
    this.coe_1 = end;
    this.doe_1 = isLastChunk;
    this.eoe_1 = size;
  }
  protoOf(Chunk).toString = function () {
    return 'Chunk(start=' + this.boe_1.toString() + ', end=' + this.coe_1.toString() + ', isLastChunk=' + this.doe_1 + ', size=' + this.eoe_1 + ')';
  };
  protoOf(Chunk).hashCode = function () {
    var result = this.boe_1.hashCode();
    result = imul(result, 31) + this.coe_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.doe_1) | 0;
    result = imul(result, 31) + this.eoe_1 | 0;
    return result;
  };
  protoOf(Chunk).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Chunk))
      return false;
    var tmp0_other_with_cast = other instanceof Chunk ? other : THROW_CCE();
    if (!this.boe_1.equals(tmp0_other_with_cast.boe_1))
      return false;
    if (!this.coe_1.equals(tmp0_other_with_cast.coe_1))
      return false;
    if (!(this.doe_1 === tmp0_other_with_cast.doe_1))
      return false;
    if (!(this.eoe_1 === tmp0_other_with_cast.eoe_1))
      return false;
    return true;
  };
  function ChunkInfo(totalSize, chunkSize, fromByte) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    this.wod_1 = totalSize;
    this.xod_1 = chunkSize;
    this.yod_1 = fromByte;
    this.zod_1 = this.wod_1.mc(this.yod_1);
    var tmp = this;
    // Inline function 'kotlin.comparisons.maxOf' call
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.Long.div' call
    var this_0 = this.zod_1;
    var other = this.xod_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkInfo.numChunks.<anonymous>' call
    var it = this_0.bb(toLong(other));
    var tmp_0;
    // Inline function 'kotlin.mod' call
    var this_1 = this.zod_1;
    var other_0 = this.xod_1;
    // Inline function 'kotlin.mod' call
    var other_1 = toLong(other_0);
    var r = this_1.nc(other_1);
    if (!(r.lc(other_1.uc(r.wc(other_1).uc(r.vc(r.b7())).sc(63))).mb() === 0)) {
      // Inline function 'kotlin.Long.plus' call
      tmp_0 = it.lc(toLong(1));
    } else {
      tmp_0 = it;
    }
    var a = tmp_0.mb();
    tmp.aoe_1 = Math.max(a, 1);
  }
  protoOf(ChunkInfo).w = function () {
    return new ChunkIterator(this);
  };
  protoOf(ChunkInfo).v = function (index) {
    var start = numberToLong(index).cb(toLong(this.xod_1)).lc(this.yod_1);
    // Inline function 'kotlin.math.min' call
    // Inline function 'kotlin.Long.plus' call
    var other = this.xod_1;
    var a = start.lc(toLong(other));
    var b = this.wod_1;
    var end = a.c7(b) <= 0 ? a : b;
    var isLastChunk = index === (this.aoe_1 - 1 | 0);
    return new Chunk(start, end, isLastChunk);
  };
  function UploadProgress(bytesTransferred, totalBytes) {
    this.foe_1 = bytesTransferred;
    this.goe_1 = totalBytes;
  }
  protoOf(UploadProgress).toString = function () {
    return 'UploadProgress(bytesTransferred=' + this.foe_1.toString() + ', totalBytes=' + this.goe_1.toString() + ')';
  };
  protoOf(UploadProgress).hashCode = function () {
    var result = this.foe_1.hashCode();
    result = imul(result, 31) + this.goe_1.hashCode() | 0;
    return result;
  };
  protoOf(UploadProgress).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UploadProgress))
      return false;
    var tmp0_other_with_cast = other instanceof UploadProgress ? other : THROW_CCE();
    if (!this.foe_1.equals(tmp0_other_with_cast.foe_1))
      return false;
    if (!this.goe_1.equals(tmp0_other_with_cast.goe_1))
      return false;
    return true;
  };
  function LastChunkResponse(body, statusCode, headers) {
    this.hoe_1 = body;
    this.ioe_1 = statusCode;
    this.joe_1 = headers;
  }
  protoOf(LastChunkResponse).toString = function () {
    return 'LastChunkResponse(body=' + this.hoe_1 + ', statusCode=' + this.ioe_1 + ', headers=' + this.joe_1 + ')';
  };
  protoOf(LastChunkResponse).hashCode = function () {
    var result = this.hoe_1 == null ? 0 : getStringHashCode(this.hoe_1);
    result = imul(result, 31) + this.ioe_1 | 0;
    result = imul(result, 31) + hashCode(this.joe_1) | 0;
    return result;
  };
  protoOf(LastChunkResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LastChunkResponse))
      return false;
    var tmp0_other_with_cast = other instanceof LastChunkResponse ? other : THROW_CCE();
    if (!(this.hoe_1 == tmp0_other_with_cast.hoe_1))
      return false;
    if (!(this.ioe_1 === tmp0_other_with_cast.ioe_1))
      return false;
    if (!equals(this.joe_1, tmp0_other_with_cast.joe_1))
      return false;
    return true;
  };
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda(it) {
    return Unit_instance;
  }
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda_0(it) {
    return Unit_instance;
  }
  function ChunkedUploadClientLocalUriUseCase() {
  }
  function Companion_51() {
    this.moe_1 = 524288;
  }
  var Companion_instance_99;
  function Companion_getInstance_69() {
    return Companion_instance_99;
  }
  function get_HEADER_UPLOAD_UUID() {
    return HEADER_UPLOAD_UUID;
  }
  var HEADER_UPLOAD_UUID;
  function get_HEADER_IS_FINAL_CHUNK() {
    return HEADER_IS_FINAL_CHUNK;
  }
  var HEADER_IS_FINAL_CHUNK;
  function get_HEADER_UPLOAD_START_BYTE() {
    return HEADER_UPLOAD_START_BYTE;
  }
  var HEADER_UPLOAD_START_BYTE;
  function get_DEFAULT_CHUNK_SIZE() {
    return DEFAULT_CHUNK_SIZE;
  }
  var DEFAULT_CHUNK_SIZE;
  function StartUserSessionUseCase(accountManager) {
    this.noe_1 = accountManager;
  }
  protoOf(StartUserSessionUseCase).ooe = function (session, nextDest, navController, goOptions, dontSetCurrentSession) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.noe_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.domain.usersession.StartUserSessionUseCase.invoke.<anonymous>' call
    if (!dontSetCurrentSession) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver != null) {
      tmp0_safe_receiver.wmu(session);
    }
    navigateToViewUri(navController, appendSelectedAccount(nextDest, session.xmr_1.x9b_1, session.ymr_1), goOptions);
  };
  protoOf(StartUserSessionUseCase).poe = function (session, nextDest, navController, goOptions, dontSetCurrentSession, $super) {
    var tmp;
    if (nextDest === VOID) {
      Companion_getInstance_132();
      tmp = 'CourseListHome';
    } else {
      tmp = nextDest;
    }
    nextDest = tmp;
    goOptions = goOptions === VOID ? new UstadGoOptions(VOID, VOID, true) : goOptions;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    var tmp_0;
    if ($super === VOID) {
      this.ooe(session, nextDest, navController, goOptions, dontSetCurrentSession);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.ooe.call(this, session, nextDest, navController, goOptions, dontSetCurrentSession);
    }
    return tmp_0;
  };
  function ValidateEmailUseCase() {
  }
  protoOf(ValidateEmailUseCase).io3 = function (email) {
    // Inline function 'kotlin.text.trim' call
    var trimmed = toString(trim(isCharSequence(email) ? email : THROW_CCE()));
    var atPos = indexOf(trimmed, _Char___init__impl__6a9atx(64));
    if (atPos === -1)
      return null;
    if (indexOf(trimmed, _Char___init__impl__6a9atx(46), atPos) === -1)
      return null;
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.text.any' call
      var inductionVariable = 0;
      while (inductionVariable < charSequenceLength(trimmed)) {
        var element = charSequenceGet(trimmed, inductionVariable);
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.domain.validateemail.ValidateEmailUseCase.invoke.<anonymous>' call
        if (((isWhitespace(element) ? true : element === _Char___init__impl__6a9atx(91)) ? true : element === _Char___init__impl__6a9atx(93)) ? true : element === _Char___init__impl__6a9atx(92)) {
          tmp$ret$2 = true;
          break $l$block;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2)
      return null;
    return trimmed;
  };
  function Companion_52() {
    Companion_instance_100 = this;
    this.mo8_1 = 3;
    this.no8_1 = 30;
    this.oo8_1 = setOf([new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95))]);
  }
  protoOf(Companion_52).qoe = function (character) {
    return isLetter(character) ? true : isDigit(character) ? true : this.oo8_1.a1(new Char(character)) ? true : false;
  };
  var Companion_instance_100;
  function Companion_getInstance_70() {
    if (Companion_instance_100 == null)
      new Companion_52();
    return Companion_instance_100;
  }
  function ValidateUsernameUseCase() {
    Companion_getInstance_70();
  }
  protoOf(ValidateUsernameUseCase).io3 = function (username) {
    var tmp;
    if (username.length < 3) {
      tmp = Companion_getInstance_71().soe_1;
    } else {
      if (username.length > 30) {
        tmp = Companion_getInstance_71().toe_1;
      } else {
        var tmp0_safe_receiver = firstOrNull_0(username);
        var tmp_0;
        var tmp_1 = tmp0_safe_receiver;
        if ((tmp_1 == null ? null : new Char(tmp_1)) == null) {
          tmp_0 = null;
        } else {
          tmp_0 = isDigit(tmp0_safe_receiver);
        }
        if (tmp_0 === true) {
          tmp = Companion_getInstance_71().uoe_1;
        } else {
          var tmp$ret$1;
          $l$block: {
            // Inline function 'kotlin.text.all' call
            var inductionVariable = 0;
            while (inductionVariable < charSequenceLength(username)) {
              var element = charSequenceGet(username, inductionVariable);
              inductionVariable = inductionVariable + 1 | 0;
              // Inline function 'com.ustadmobile.core.domain.validateusername.ValidateUsernameUseCase.invoke.<anonymous>' call
              if (!Companion_getInstance_70().qoe(element)) {
                tmp$ret$1 = false;
                break $l$block;
              }
            }
            tmp$ret$1 = true;
          }
          if (!tmp$ret$1) {
            tmp = Companion_getInstance_71().voe_1;
          } else {
            tmp = Companion_getInstance_71().roe_1;
          }
        }
      }
    }
    return tmp;
  };
  function Companion_53() {
    Companion_instance_101 = this;
    this.roe_1 = new ValidationResult();
    this.soe_1 = new ValidationResult(strings_getInstance().zm7_1);
    this.toe_1 = new ValidationResult(strings_getInstance().am8_1);
    this.uoe_1 = new ValidationResult(strings_getInstance().bm8_1);
    this.voe_1 = new ValidationResult(strings_getInstance().cm8_1);
  }
  var Companion_instance_101;
  function Companion_getInstance_71() {
    if (Companion_instance_101 == null)
      new Companion_53();
    return Companion_instance_101;
  }
  function ValidationResult(errorMessage) {
    Companion_getInstance_71();
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.woe_1 = errorMessage;
  }
  protoOf(ValidationResult).toString = function () {
    return 'ValidationResult(errorMessage=' + this.woe_1 + ')';
  };
  protoOf(ValidationResult).hashCode = function () {
    return this.woe_1 == null ? 0 : this.woe_1.hashCode();
  };
  protoOf(ValidationResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ValidationResult))
      return false;
    var tmp0_other_with_cast = other instanceof ValidationResult ? other : THROW_CCE();
    if (!equals(this.woe_1, tmp0_other_with_cast.woe_1))
      return false;
    return true;
  };
  function isAnonymous(_this__u8e3s4) {
    return ((_this__u8e3s4.rik_1 == null ? _this__u8e3s4.pik_1 == null : false) ? _this__u8e3s4.sik_1 == null : false) ? _this__u8e3s4.qik_1 == null : false;
  }
  function _get_isIdOnly__t0wrie(_this__u8e3s4, $this) {
    var tmp;
    var tmp_0;
    if (_this__u8e3s4.oi8_1 == null ? _this__u8e3s4.pi8_1 == null : false) {
      var tmp_1 = _this__u8e3s4.qi8_1;
      tmp_0 = tmp_1 === 0;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = _this__u8e3s4.ri8_1 == null;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation) {
    this.fof_1 = $activityEntities;
    this.gof_1 = $timeNow;
    this.hof_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(StoreActivitiesUseCase$invoke$slambda).nog = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.nog(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp_0 = this;
            var this_0 = this.fof_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.oog_1.ik2(VOID, VOID, VOID, VOID, VOID, VOID, this.gof_1));
            }

            tmp_0.jof_1 = destination;
            this.hd_1 = 1;
            suspendResult = this.hof_1.uog_1.m7k().hi8(this.jof_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var this_1 = this.jof_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element = tmp0_iterator_0.e();
              if (!_get_isIdOnly__t0wrie(element, this.hof_1)) {
                destination_0.i1(element);
              }
            }

            tmp_1.kof_1 = destination_0;
            this.lof_1 = this.kof_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.lof_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.mof_1 = this.lof_1.e();
            var tmp_2 = this;
            tmp_2.nof_1 = this.mof_1;
            this.hd_1 = 3;
            suspendResult = this.hof_1.uog_1.m7k().ii8(this.nof_1.mi8_1, this.nof_1.pi8_1, this.gof_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            suspendResult = this.hof_1.uog_1.m7k().ji8(this.nof_1.mi8_1, this.nof_1.oi8_1, this.nof_1.pi8_1, this.nof_1.qi8_1, this.nof_1.ri8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 2;
            continue $sm;
          case 5:
            var tmp_3 = this;
            var this_2 = this.fof_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_0 = tmp0_iterator_1.e();
              var list = element_0.pog_1;
              addAll(destination_1, list);
            }

            tmp_3.oof_1 = destination_1;
            var tmp_4 = this;
            var this_3 = this.fof_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_1 = tmp0_iterator_2.e();
              var list_0 = element_1.qog_1;
              addAll(destination_2, list_0);
            }

            tmp_4.pof_1 = destination_2;
            this.hd_1 = 6;
            var tmp_5 = this.hof_1.tog_1.b7m();
            var this_4 = this.pof_1;
            var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.w();
            while (tmp0_iterator_3.f()) {
              var item_0 = tmp0_iterator_3.e();
              destination_3.i1(item_0.wid_1);
            }

            suspendResult = tmp_5.tid(toList(distinct(destination_3)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.qof_1 = suspendResult;
            this.rof_1 = toSet(this.qof_1);
            this.hd_1 = 7;
            var tmp_6 = this.hof_1.uog_1.b7m();
            var this_5 = this.pof_1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_5.w();
            while (tmp0_iterator_4.f()) {
              var element_2 = tmp0_iterator_4.e();
              if (!this.rof_1.a1(element_2.wid_1)) {
                destination_4.i1(element_2);
              }
            }

            suspendResult = tmp_6.sid(destination_4, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var tmp_7 = this;
            var this_6 = this.oof_1;
            var first = ArrayList_init_$Create$();
            var second = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_6.w();
            while (tmp0_iterator_5.f()) {
              var element_3 = tmp0_iterator_5.e();
              if (element_3.big_1.equals(new Long(0, 0))) {
                first.i1(element_3);
              } else {
                second.i1(element_3);
              }
            }

            tmp_7.sof_1 = new Pair(first, second);
            this.tof_1 = this.sof_1.y6();
            this.uof_1 = this.sof_1.z6();
            this.hd_1 = 8;
            suspendResult = this.hof_1.uog_1.a7m().rif(this.tof_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            var tmp_8 = this;
            tmp_8.vof_1 = this.uof_1;
            this.wof_1 = this.vof_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.wof_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.xof_1 = this.wof_1.e();
            var tmp_9 = this;
            tmp_9.yof_1 = this.xof_1;
            this.zof_1 = this.hof_1.uog_1.a7m();
            this.aog_1 = this.yof_1.wif_1;
            this.bog_1 = this.yof_1.big_1;
            this.cog_1 = this.yof_1.aig_1;
            this.dog_1 = this.yof_1.yif_1;
            this.eog_1 = this.yof_1.xif_1;
            this.hd_1 = 10;
            suspendResult = this.zof_1.sif(this.aog_1, this.eog_1, this.dog_1, this.cog_1, this.bog_1, this.gof_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.hd_1 = 9;
            continue $sm;
          case 11:
            var tmp_10 = this;
            tmp_10.fog_1 = this.oof_1;
            this.gog_1 = this.fog_1.w();
            this.hd_1 = 12;
            continue $sm;
          case 12:
            if (!this.gog_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.hog_1 = this.gog_1.e();
            var tmp_11 = this;
            tmp_11.iog_1 = this.hog_1;
            this.hd_1 = 13;
            suspendResult = this.hof_1.uog_1.a7m().tif(this.iog_1.wif_1, this.iog_1.xif_1, this.iog_1.aig_1, this.gof_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.hd_1 = 12;
            continue $sm;
          case 14:
            this.hd_1 = 15;
            var tmp_12 = this.hof_1.uog_1.c7m();
            var this_7 = this.fof_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = this_7.w();
            while (tmp0_iterator_6.f()) {
              var element_4 = tmp0_iterator_6.e();
              var list_1 = element_4.rog_1;
              addAll(destination_5, list_1);
            }

            suspendResult = tmp_12.oic(destination_5, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            var tmp_13 = this;
            var this_8 = this.fof_1;
            var destination_6 = ArrayList_init_$Create$();
            var tmp0_iterator_7 = this_8.w();
            while (tmp0_iterator_7.f()) {
              var element_5 = tmp0_iterator_7.e();
              var tmp0_safe_receiver = element_5.sog_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_6.i1(tmp0_safe_receiver);
              }
            }

            var tmp_14;
            if (!destination_6.c1()) {
              tmp_14 = destination_6;
            } else {
              tmp_14 = null;
            }

            tmp_13.jog_1 = tmp_14;
            if (this.jog_1 == null) {
              this.kog_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              var tmp_15 = this;
              tmp_15.log_1 = this.jog_1;
              var tmp_16 = this;
              tmp_16.mog_1 = this.log_1;
              this.hd_1 = 16;
              suspendResult = this.hof_1.uog_1.d7m().zit(this.mog_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            this.kog_1 = this.log_1;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return this.kog_1;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).tmw = function (it, completion) {
    var i = new StoreActivitiesUseCase$invoke$slambda(this.fof_1, this.gof_1, this.hof_1, completion);
    i.iof_1 = it;
    return i;
  };
  function StoreActivitiesUseCase$invoke$slambda_0($activityEntities, $timeNow, this$0, resultContinuation) {
    var i = new StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.nog(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$35(_this__u8e3s4, activityEntities, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.doh_1 = _this__u8e3s4;
    this.eoh_1 = activityEntities;
  }
  protoOf($invokeCOROUTINE$35).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.foh_1 = systemTimeInMillis();
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.doh_1.uog_1, VOID, StoreActivitiesUseCase$invoke$slambda_0(this.eoh_1, this.foh_1, this.doh_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 StoreActivitiesUseCase(db, repo) {
    this.tog_1 = db;
    var tmp = this;
    tmp.uog_1 = repo == null ? this.tog_1 : repo;
  }
  protoOf(StoreActivitiesUseCase).goh = function (activityEntities, $completion) {
    var tmp = new $invokeCOROUTINE$35(this, activityEntities, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XapiException(responseCode, message, cause) {
    cause = cause === VOID ? null : cause;
    Exception_init_$Init$_1(message, cause, this);
    captureStack(this, XapiException);
    this.hoh_1 = responseCode;
  }
  function XapiJson$_init_$lambda_lhwgtd($this$Json) {
    $this$Json.i4w_1 = false;
    $this$Json.k4w_1 = true;
    return Unit_instance;
  }
  function XapiJson(json) {
    var tmp;
    if (json === VOID) {
      tmp = Json_0(VOID, XapiJson$_init_$lambda_lhwgtd);
    } else {
      tmp = json;
    }
    json = tmp;
    this.ioh_1 = json;
  }
  protoOf(XapiJson).toString = function () {
    return 'XapiJson(json=' + this.ioh_1 + ')';
  };
  protoOf(XapiJson).hashCode = function () {
    return hashCode(this.ioh_1);
  };
  protoOf(XapiJson).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiJson))
      return false;
    var tmp0_other_with_cast = other instanceof XapiJson ? other : THROW_CCE();
    if (!equals(this.ioh_1, tmp0_other_with_cast.ioh_1))
      return false;
    return true;
  };
  function xapiRequireValidUuidOrNullAsString(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      if (!(uuid == null)) {
        uuidFrom(uuid);
      }
      return uuid;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidUuidOrNull(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      var tmp;
      if (uuid == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireValidUuidOrNull.<anonymous>' call
        tmp = uuidFrom(uuid);
      }
      return tmp;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRI(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid iri' : errorMessage;
    if (iri == null)
      throw new XapiException(400, errorMessage + ': iri is null');
    xapiRequireValidIRIOrNull(iri);
    return iri;
  }
  function xapiRequireDurationOrNullAsLong(duration) {
    var tmp;
    if (duration == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireDurationOrNullAsLong.<anonymous>' call
      var tmp_0;
      try {
        tmp_0 = _Duration___get_inWholeMilliseconds__impl__msfiry(Companion_getInstance_8().jm(duration));
      } catch ($p) {
        var tmp_1;
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, 'Invalid duration: ' + e.message, e);
        } else {
          throw $p;
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function xapiRequireTimestampAsLong(timestampStr) {
    try {
      return Companion_getInstance_6().q2t(timestampStr).tlh();
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, 'Invalid timestamp: ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRIOrNull(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid IRI:' : errorMessage;
    if (!(iri == null)) {
      try {
        Companion_getInstance_3().q2t(iri);
      } catch ($p) {
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, errorMessage + ': ' + e.message, e);
        } else {
          throw $p;
        }
      }
    }
    return iri;
  }
  function StatementStoreResult(statementUuids) {
    this.joh_1 = statementUuids;
  }
  protoOf(StatementStoreResult).toString = function () {
    return 'StatementStoreResult(statementUuids=' + this.joh_1 + ')';
  };
  protoOf(StatementStoreResult).hashCode = function () {
    return hashCode(this.joh_1);
  };
  protoOf(StatementStoreResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementStoreResult))
      return false;
    var tmp0_other_with_cast = other instanceof StatementStoreResult ? other : THROW_CCE();
    if (!equals(this.joh_1, tmp0_other_with_cast.joh_1))
      return false;
    return true;
  };
  function storeStatements($this, statements, xapiSession, $completion) {
    var tmp = new $storeStatementsCOROUTINE$36($this, statements, xapiSession, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation) {
    this.goi_1 = $statementEntities;
    this.hoi_1 = this$0;
    this.ioi_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiStatementResource$storeStatements$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiStatementResource$storeStatements$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.goi_1;
              var tmp_0;
              if (isInterface(this_0, Collection)) {
                tmp_0 = this_0.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = this_0.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_safe_receiver = element.doj_1;
                var tmp_1;
                if (tmp0_safe_receiver == null) {
                  tmp_1 = null;
                } else {
                  tmp_1 = tmp0_safe_receiver.liw_1 ? tmp0_safe_receiver.tiv_1 === true : false;
                }
                if (tmp_1 === true) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            if (tmp$ret$0) {
              this.koi_1 = this.hoi_1.zne_1.e7m();
              this.loi_1 = this.ioi_1.vj3_1;
              this.moi_1 = systemTimeInMillis();
              this.hd_1 = 1;
              suspendResult = this.koi_1.nj3(true, this.moi_1, this.loi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            var tmp_2 = this.hoi_1.zne_1.o7k();
            var this_1 = this.goi_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver_0 = element_0.doj_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_0);
              }
            }

            suspendResult = tmp_2.eiv(destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_3 = this.hoi_1.zne_1.f7m();
            var this_2 = this.goi_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_1 = tmp0_iterator_1.e();
              var tmp0_safe_receiver_1 = element_1.eoj_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_1);
              }
            }

            suspendResult = tmp_3.gj0(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_4 = this;
            var this_3 = this.goi_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_2 = tmp0_iterator_2.e();
              var tmp0_elvis_lhs = element_2.foj_1;
              var list = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
              addAll(destination_1, list);
            }

            tmp_4.noi_1 = destination_1;
            var tmp_5 = this;
            var this_4 = this.noi_1;
            var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.w();
            while (tmp0_iterator_3.f()) {
              var item = tmp0_iterator_3.e();
              destination_2.i1(item.ioj_1);
            }

            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = destination_2.w();
            while (tmp0_iterator_4.f()) {
              var element_3 = tmp0_iterator_4.e();
              var tmp_6 = element_3.wik_1;
              if (tmp_6 === 1) {
                destination_3.i1(element_3);
              }
            }

            var tmp_7;
            if (!destination_3.c1()) {
              tmp_7 = destination_3;
            } else {
              tmp_7 = null;
            }

            tmp_5.ooi_1 = tmp_7;
            if (this.ooi_1 == null) {
              this.poi_1 = null;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.qoi_1 = this.ooi_1;
              var tmp_9 = this;
              tmp_9.roi_1 = this.qoi_1;
              this.hd_1 = 5;
              suspendResult = insertOrUpdateActorsIfNameChanged(this.hoi_1.zne_1.p7k(), this.roi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 5:
            this.poi_1 = this.qoi_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var tmp_10 = this;
            var this_5 = this.noi_1;
            var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_5, 10));
            var tmp0_iterator_5 = this_5.w();
            while (tmp0_iterator_5.f()) {
              var item_0 = tmp0_iterator_5.e();
              destination_4.i1(item_0.ioj_1);
            }

            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = destination_4.w();
            while (tmp0_iterator_6.f()) {
              var element_4 = tmp0_iterator_6.e();
              var tmp_11 = element_4.wik_1;
              if (tmp_11 === 2) {
                destination_5.i1(element_4);
              }
            }

            tmp_10.soi_1 = destination_5;
            this.hd_1 = 7;
            var tmp_12 = this.hoi_1.une_1.p7k();
            var this_6 = this.soi_1;
            var destination_6 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_6, 10));
            var tmp0_iterator_7 = this_6.w();
            while (tmp0_iterator_7.f()) {
              var item_1 = tmp0_iterator_7.e();
              destination_6.i1(item_1.mik_1);
            }

            suspendResult = tmp_12.sij(destination_6, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.toi_1 = suspendResult;
            var tmp_13 = this;
            var this_7 = this.noi_1;
            var destination_7 = ArrayList_init_$Create$();
            var tmp0_iterator_8 = this_7.w();
            while (tmp0_iterator_8.f()) {
              var element_5 = tmp0_iterator_8.e();
              var list_0 = element_5.joj_1;
              addAll(destination_7, list_0);
            }

            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_7, 10)), 16);
            var destination_8 = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator_9 = destination_7.w();
            while (tmp0_iterator_9.f()) {
              var element_6 = tmp0_iterator_9.e();
              destination_8.s(element_6.mik_1, element_6);
            }

            tmp_13.uoi_1 = destination_8;
            var tmp_14 = this;
            tmp_14.voi_1 = this.soi_1;
            this.woi_1 = this.voi_1.w();
            this.hd_1 = 8;
            continue $sm;
          case 8:
            if (!this.woi_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.xoi_1 = this.woi_1.e();
            var tmp_15 = this;
            tmp_15.yoi_1 = this.xoi_1;
            var tmp_16 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_10 = this.toi_1.w();
              while (tmp0_iterator_10.f()) {
                var element_7 = tmp0_iterator_10.e();
                if (element_7.oil_1.equals(this.yoi_1.mik_1)) {
                  tmp$ret$2 = element_7;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            tmp_16.zoi_1 = tmp$ret$2;
            var tmp_17 = this;
            var tmp_18;
            if (!isAnonymous(this.yoi_1)) {
              var tmp_19 = this.yoi_1.uik_1;
              var tmp0_safe_receiver_2 = this.zoi_1;
              tmp_18 = !tmp_19.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.pil_1);
            } else {
              tmp_18 = true;
            }

            tmp_17.aoj_1 = tmp_18;
            var tmp_20 = this;
            var this_8 = this.noi_1;
            var destination_9 = ArrayList_init_$Create$();
            var tmp0_iterator_11 = this_8.w();
            while (tmp0_iterator_11.f()) {
              var element_8 = tmp0_iterator_11.e();
              var list_1 = element_8.koj_1;
              addAll(destination_9, list_1);
            }

            var destination_10 = ArrayList_init_$Create$();
            var tmp0_iterator_12 = destination_9.w();
            while (tmp0_iterator_12.f()) {
              var element_9 = tmp0_iterator_12.e();
              if (element_9.jip_1.equals(this.yoi_1.mik_1)) {
                destination_10.i1(element_9);
              }
            }

            tmp_20.boj_1 = destination_10;
            var tmp_21 = this;
            var this_9 = this.boj_1;
            var destination_11 = ArrayList_init_$Create$();
            var tmp0_iterator_13 = this_9.w();
            while (tmp0_iterator_13.f()) {
              var element_10 = tmp0_iterator_13.e();
              var tmp0_safe_receiver_3 = this.uoi_1.q(element_10.kip_1);
              if (tmp0_safe_receiver_3 == null)
                null;
              else {
                destination_11.i1(tmp0_safe_receiver_3);
              }
            }

            tmp_21.coj_1 = destination_11;
            this.hd_1 = 9;
            suspendResult = insertOrUpdateActorsIfNameChanged(this.hoi_1.zne_1.p7k(), this.coj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            if (!this.aoj_1 ? !(this.zoi_1 == null) : false) {
              this.hd_1 = 12;
              var tmp_22 = this.hoi_1.zne_1.z7l();
              var this_10 = this.boj_1;
              var destination_12 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_10, 10));
              var tmp0_iterator_14 = this_10.w();
              while (tmp0_iterator_14.f()) {
                var item_2 = tmp0_iterator_14.e();
                destination_12.i1(item_2.ek3(VOID, VOID, this.zoi_1.qil_1));
              }
              suspendResult = insertOrUpdateIfLastModChanged(tmp_22, destination_12, this.zoi_1.qil_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              suspendResult = this.hoi_1.zne_1.p7k().qij(listOf_0(this.yoi_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            suspendResult = this.hoi_1.zne_1.z7l().fip(this.boj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            this.hd_1 = 13;
            continue $sm;
          case 12:
            this.hd_1 = 13;
            continue $sm;
          case 13:
            this.hd_1 = 8;
            continue $sm;
          case 14:
            this.hd_1 = 15;
            var tmp_23 = this.hoi_1.zne_1.l7k();
            var this_11 = this.goi_1;
            var destination_13 = ArrayList_init_$Create$();
            var tmp0_iterator_15 = this_11.w();
            while (tmp0_iterator_15.f()) {
              var element_11 = tmp0_iterator_15.e();
              var tmp0_safe_receiver_4 = element_11.goj_1;
              var tmp0_safe_receiver_5 = tmp0_safe_receiver_4 == null ? null : tmp0_safe_receiver_4.loj_1;
              if (tmp0_safe_receiver_5 == null)
                null;
              else {
                destination_13.i1(tmp0_safe_receiver_5);
              }
            }

            suspendResult = tmp_23.ij1(destination_13, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            this.hd_1 = 16;
            var tmp_24 = this.hoi_1.zne_1.y7l();
            var this_12 = this.goi_1;
            var destination_14 = ArrayList_init_$Create$();
            var tmp0_iterator_16 = this_12.w();
            while (tmp0_iterator_16.f()) {
              var element_12 = tmp0_iterator_16.e();
              var tmp0_safe_receiver_6 = element_12.goj_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_6 == null ? null : tmp0_safe_receiver_6.moj_1;
              var list_2 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
              addAll(destination_14, list_2);
            }

            suspendResult = tmp_24.kj2(destination_14, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.hd_1 = 17;
            var this_13 = this.goi_1;
            var destination_15 = ArrayList_init_$Create$();
            var tmp0_iterator_17 = this_13.w();
            while (tmp0_iterator_17.f()) {
              var element_13 = tmp0_iterator_17.e();
              var tmp0_elvis_lhs_0 = element_13.hoj_1;
              var list_3 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
              addAll(destination_15, list_3);
            }

            suspendResult = this.hoi_1.yne_1.goh(destination_15, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 17:
            return Unit_instance;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).tmw = function (it, completion) {
    var i = new XapiStatementResource$storeStatements$slambda(this.goi_1, this.hoi_1, this.ioi_1, completion);
    i.joi_1 = it;
    return i;
  };
  function XapiStatementResource$storeStatements$slambda_0($statementEntities, this$0, $xapiSession, resultContinuation) {
    var i = new XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $storeStatementsCOROUTINE$36(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.soh_1 = _this__u8e3s4;
    this.toh_1 = statements;
    this.uoh_1 = xapiSession;
  }
  protoOf($storeStatementsCOROUTINE$36).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.voh_1 = identifierHash(agent(this.uoh_1, this.soh_1.wne_1), this.soh_1.vne_1);
            var tmp_0 = this;
            var it = knownActorUidToPersonUidsMap(this.uoh_1, this.soh_1.anf_1);
            var tmp_1;
            if (!it.r(this.voh_1)) {
              tmp_1 = plus_3(it, to(this.voh_1, this.uoh_1.aj4_1));
            } else {
              tmp_1 = it;
            }

            tmp_0.woh_1 = tmp_1;
            var tmp_2 = this;
            var this_0 = this.toh_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var timeNowStr = System_instance.nle().toString();
              var tmp1_elvis_lhs = element.toj_1;
              var tmp4_timestamp = tmp1_elvis_lhs == null ? timeNowStr : tmp1_elvis_lhs;
              var tmp0_elvis_lhs = xapiRequireValidUuidOrNullAsString(element.noj_1);
              var tmp5_id = tmp0_elvis_lhs == null ? randomUuidAsString() : tmp0_elvis_lhs;
              var tmp2_name = this.uoh_1.cj4_1;
              var tmp3_homePage = this.soh_1.wne_1.hmr_1;
              var tmp6_authority = new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(tmp3_homePage, tmp2_name));
              var exactStatement = element.zoj(tmp5_id, VOID, VOID, VOID, VOID, VOID, tmp4_timestamp, timeNowStr, tmp6_authority);
              var tmp7_stringHasher = this.soh_1.vne_1;
              var tmp8_exactJson = this.soh_1.anf_1.w4b(Companion_getInstance_86().s4x(), exactStatement);
              var tmp9_primaryKeyManager = get_doorPrimaryKeyManager(this.soh_1.une_1);
              var tmp10_hasherFactory = this.soh_1.xne_1;
              var tmp11_json = this.soh_1.anf_1;
              var tmp12_endpoint = this.soh_1.wne_1;
              var list = toEntities_3(exactStatement, tmp7_stringHasher, tmp9_primaryKeyManager, tmp10_hasherFactory, tmp11_json, this.uoh_1, this.woh_1, tmp8_exactJson, false, tmp12_endpoint);
              addAll(destination, list);
            }

            tmp_2.xoh_1 = destination;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.soh_1.zne_1, VOID, XapiStatementResource$storeStatements$slambda_0(this.xoh_1, this.soh_1, this.uoh_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_1 = this.xoh_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = element_0.doj_1;
              var tmp_3;
              if (tmp0_safe_receiver == null) {
                tmp_3 = null;
              } else {
                tmp_3 = Uuid_init_$Create$(tmp0_safe_receiver.jiv_1, tmp0_safe_receiver.kiv_1);
              }
              var tmp0_safe_receiver_0 = tmp_3;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_0);
              }
            }

            return new StatementStoreResult(destination_0);
          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 $postCOROUTINE$38(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jok_1 = _this__u8e3s4;
    this.kok_1 = statements;
    this.lok_1 = xapiSession;
  }
  protoOf($postCOROUTINE$38).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 = storeStatements(this.jok_1, this.kok_1, this.lok_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return ARGUMENT.joh_1;
          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 XapiStatementResource(db, repo, xxHasher, endpoint, xapiJson, hasherFactory, storeActivitiesUseCase) {
    this.une_1 = db;
    this.vne_1 = xxHasher;
    this.wne_1 = endpoint;
    this.xne_1 = hasherFactory;
    this.yne_1 = storeActivitiesUseCase;
    var tmp = this;
    tmp.zne_1 = repo == null ? this.une_1 : repo;
    this.anf_1 = xapiJson.ioh_1;
  }
  protoOf(XapiStatementResource).bnf = function (statements, xapiSession, $completion) {
    var tmp = new $postCOROUTINE$38(this, statements, xapiSession, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XapiGroupAndPersonUidMap(group, actorUidToPersonUidMap) {
    this.ong_1 = group;
    this.png_1 = actorUidToPersonUidMap;
  }
  protoOf(XapiGroupAndPersonUidMap).toString = function () {
    return 'XapiGroupAndPersonUidMap(group=' + this.ong_1 + ', actorUidToPersonUidMap=' + this.png_1 + ')';
  };
  protoOf(XapiGroupAndPersonUidMap).hashCode = function () {
    var result = this.ong_1.hashCode();
    result = imul(result, 31) + hashCode(this.png_1) | 0;
    return result;
  };
  protoOf(XapiGroupAndPersonUidMap).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroupAndPersonUidMap))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroupAndPersonUidMap ? other : THROW_CCE();
    if (!this.ong_1.equals(tmp0_other_with_cast.ong_1))
      return false;
    if (!equals(this.png_1, tmp0_other_with_cast.png_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$40(_this__u8e3s4, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.uok_1 = _this__u8e3s4;
    this.vok_1 = groupSetUid;
    this.wok_1 = groupNum;
    this.xok_1 = clazzUid;
    this.yok_1 = assignmentUid;
    this.zok_1 = accountPersonUid;
  }
  protoOf($invokeCOROUTINE$40).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.uok_1.kng_1.x7j().kcv(this.vok_1, this.wok_1, this.xok_1, this.yok_1, this.zok_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var groupMembers = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = groupMembers.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp0_safe_receiver = element.rcx_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toXapiAgent(tmp0_safe_receiver, this.uok_1.lng_1);
              var tmp_0;
              if (tmp1_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = element.qcx_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.hcw_1;
                tmp_0 = new Pair(tmp1_safe_receiver, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
              }
              var tmp0_safe_receiver_1 = tmp_0;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_1);
              }
            }

            var membersAndPersonUids = destination;
            var tmp_1 = new XapiAccount(this.uok_1.lng_1.hmr_1, 'cgs-' + this.vok_1.toString() + '-' + this.wok_1);
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(membersAndPersonUids, 10));
            var tmp0_iterator_0 = membersAndPersonUids.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(item.w6_1);
            }

            var tmp_2 = new XapiGroup(VOID, VOID, VOID, VOID, VOID, tmp_1, destination_0);
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(membersAndPersonUids, 10)), 16);
            var destination_1 = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator_1 = membersAndPersonUids.w();
            while (tmp0_iterator_1.f()) {
              var element_0 = tmp0_iterator_1.e();
              var pair = to(identifierHash(element_0.w6_1, this.uok_1.mng_1), element_0.x6_1);
              destination_1.s(pair.w6_1, pair.x6_1);
            }

            return new XapiGroupAndPersonUidMap(tmp_2, destination_1);
          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 CreateXapiGroupForCourseGroupUseCase(repo, endpoint, stringHasher) {
    this.kng_1 = repo;
    this.lng_1 = endpoint;
    this.mng_1 = stringHasher;
  }
  protoOf(CreateXapiGroupForCourseGroupUseCase).nng = function (groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$40(this, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function insertOrUpdateActorsIfNameChanged(_this__u8e3s4, actors, $completion) {
    var tmp = new $insertOrUpdateActorsIfNameChangedCOROUTINE$41(_this__u8e3s4, actors, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateActorsIfNameChangedCOROUTINE$41(_this__u8e3s4, actors, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.iol_1 = _this__u8e3s4;
    this.jol_1 = actors;
  }
  protoOf($insertOrUpdateActorsIfNameChangedCOROUTINE$41).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.iol_1.pij(this.jol_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.kol_1 = systemTimeInMillis();
            var tmp_0 = this;
            tmp_0.lol_1 = this.jol_1;
            this.mol_1 = this.lol_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.mol_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.nol_1 = this.mol_1.e();
            var tmp_1 = this;
            tmp_1.ool_1 = this.nol_1;
            this.hd_1 = 3;
            suspendResult = this.iol_1.rij(this.ool_1.mik_1, this.ool_1.oik_1, this.kol_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function insertOrUpdateIfLastModChanged(_this__u8e3s4, memberJoins, lastModTime, $completion) {
    var tmp = new $insertOrUpdateIfLastModChangedCOROUTINE$42(_this__u8e3s4, memberJoins, lastModTime, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateIfLastModChangedCOROUTINE$42(_this__u8e3s4, memberJoins, lastModTime, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xol_1 = _this__u8e3s4;
    this.yol_1 = memberJoins;
    this.zol_1 = lastModTime;
  }
  protoOf($insertOrUpdateIfLastModChangedCOROUTINE$42).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.xol_1.eip(this.yol_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.aom_1 = this.yol_1;
            this.bom_1 = this.aom_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.bom_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.com_1 = this.bom_1.e();
            var tmp_1 = this;
            tmp_1.dom_1 = this.com_1;
            this.hd_1 = 3;
            suspendResult = this.xol_1.gip(this.dom_1.jip_1, this.dom_1.kip_1, this.zol_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function agent(_this__u8e3s4, endpoint) {
    var tmp0_account = new XapiAccount(endpoint.hmr_1, _this__u8e3s4.cj4_1);
    var tmp1_objectType = XapiObjectType_Agent_getInstance();
    return new XapiAgent(VOID, VOID, VOID, VOID, tmp1_objectType, tmp0_account);
  }
  function knownActorUidToPersonUidsMap(_this__u8e3s4, json) {
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    var this_0 = _this__u8e3s4.nj4_1;
    if (charSequenceLength(this_0) > 0) {
      tmp = json.x4b(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), _this__u8e3s4.nj4_1);
    } else {
      tmp = emptyMap();
    }
    return tmp;
  }
  function authorizationHeader(_this__u8e3s4) {
    return 'Basic ' + encodeBase64(_this__u8e3s4.vj3_1.toString() + ':' + _this__u8e3s4.lj4_1);
  }
  function get_registrationUuid(_this__u8e3s4) {
    return Uuid_init_$Create$(_this__u8e3s4.xj3_1, _this__u8e3s4.yj3_1);
  }
  function get_resultProgressExtension(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.roj_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jom_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>' call
      var tmp$ret$1;
      $l$block: {
        // Inline function 'kotlin.collections.firstNotNullOfOrNull' call
        var tmp0_iterator = get_XAPI_PROGRESSED_EXTENSIONS().w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver_0 = tmp1_safe_receiver.q(element);
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : get_jsonPrimitive(tmp0_safe_receiver_0);
          var result = tmp1_safe_receiver_0 == null ? null : get_intOrNull(tmp1_safe_receiver_0);
          if (!(result == null)) {
            tmp$ret$1 = result;
            break $l$block;
          }
        }
        tmp$ret$1 = null;
      }
      tmp = tmp$ret$1;
    }
    return tmp;
  }
  function Companion_54() {
    Companion_instance_102 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.kom_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, null, null];
  }
  var Companion_instance_102;
  function Companion_getInstance_72() {
    if (Companion_instance_102 == null)
      new Companion_54();
    return Companion_instance_102;
  }
  function $serializer_38() {
    $serializer_instance_38 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.Attachment', this, 6);
    tmp0_serialDesc.y4l('usageType', true);
    tmp0_serialDesc.y4l('display', true);
    tmp0_serialDesc.y4l('description', true);
    tmp0_serialDesc.y4l('contentType', true);
    tmp0_serialDesc.y4l('length', true);
    tmp0_serialDesc.y4l('sha2', true);
    this.lom_1 = tmp0_serialDesc;
  }
  protoOf($serializer_38).v4a = function () {
    return this.lom_1;
  };
  protoOf($serializer_38).p4m = function () {
    var tmp0_cached = Companion_getInstance_72().kom_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(StringSerializer_getInstance()), LongSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_38).x4a = function (decoder) {
    var tmp0_desc = this.lom_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_input = decoder.n4e(tmp0_desc);
    var tmp11_cached = Companion_getInstance_72().kom_1;
    if (tmp10_input.c4f()) {
      tmp4_local0 = tmp10_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.b4f(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.b4f(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.t4e(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.b4f(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.b4f(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.b4f(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.t4e(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.b4f(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.o4e(tmp0_desc);
    return Attachment_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_38).mom = function (encoder, value) {
    var tmp0_desc = this.lom_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_72().kom_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.nom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.nom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.oom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, tmp2_cached[1], value.oom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.pom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, tmp2_cached[2], value.pom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.qom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, StringSerializer_getInstance(), value.qom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !value.rom_1.equals(new Long(0, 0))) {
      tmp1_output.x4f(tmp0_desc, 4, value.rom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.som_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, StringSerializer_getInstance(), value.som_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_38).w4a = function (encoder, value) {
    return this.mom(encoder, value instanceof Attachment ? value : THROW_CCE());
  };
  var $serializer_instance_38;
  function $serializer_getInstance_50() {
    if ($serializer_instance_38 == null)
      new $serializer_38();
    return $serializer_instance_38;
  }
  function Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_50().lom_1);
    }
    if (0 === (seen1 & 1))
      $this.nom_1 = null;
    else
      $this.nom_1 = usageType;
    if (0 === (seen1 & 2))
      $this.oom_1 = null;
    else
      $this.oom_1 = display;
    if (0 === (seen1 & 4))
      $this.pom_1 = null;
    else
      $this.pom_1 = description;
    if (0 === (seen1 & 8))
      $this.qom_1 = null;
    else
      $this.qom_1 = contentType;
    if (0 === (seen1 & 16))
      $this.rom_1 = new Long(0, 0);
    else
      $this.rom_1 = length;
    if (0 === (seen1 & 32))
      $this.som_1 = null;
    else
      $this.som_1 = sha2;
    return $this;
  }
  function Attachment_init_$Create$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker) {
    return Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, objectCreate(protoOf(Attachment)));
  }
  function Attachment(usageType, display, description, contentType, length, sha2) {
    Companion_getInstance_72();
    usageType = usageType === VOID ? null : usageType;
    display = display === VOID ? null : display;
    description = description === VOID ? null : description;
    contentType = contentType === VOID ? null : contentType;
    length = length === VOID ? new Long(0, 0) : length;
    sha2 = sha2 === VOID ? null : sha2;
    this.nom_1 = usageType;
    this.oom_1 = display;
    this.pom_1 = description;
    this.qom_1 = contentType;
    this.rom_1 = length;
    this.som_1 = sha2;
  }
  protoOf(Attachment).toString = function () {
    return 'Attachment(usageType=' + this.nom_1 + ', display=' + this.oom_1 + ', description=' + this.pom_1 + ', contentType=' + this.qom_1 + ', length=' + this.rom_1.toString() + ', sha2=' + this.som_1 + ')';
  };
  protoOf(Attachment).hashCode = function () {
    var result = this.nom_1 == null ? 0 : getStringHashCode(this.nom_1);
    result = imul(result, 31) + (this.oom_1 == null ? 0 : hashCode(this.oom_1)) | 0;
    result = imul(result, 31) + (this.pom_1 == null ? 0 : hashCode(this.pom_1)) | 0;
    result = imul(result, 31) + (this.qom_1 == null ? 0 : getStringHashCode(this.qom_1)) | 0;
    result = imul(result, 31) + this.rom_1.hashCode() | 0;
    result = imul(result, 31) + (this.som_1 == null ? 0 : getStringHashCode(this.som_1)) | 0;
    return result;
  };
  protoOf(Attachment).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Attachment))
      return false;
    var tmp0_other_with_cast = other instanceof Attachment ? other : THROW_CCE();
    if (!(this.nom_1 == tmp0_other_with_cast.nom_1))
      return false;
    if (!equals(this.oom_1, tmp0_other_with_cast.oom_1))
      return false;
    if (!equals(this.pom_1, tmp0_other_with_cast.pom_1))
      return false;
    if (!(this.qom_1 == tmp0_other_with_cast.qom_1))
      return false;
    if (!this.rom_1.equals(tmp0_other_with_cast.rom_1))
      return false;
    if (!(this.som_1 == tmp0_other_with_cast.som_1))
      return false;
    return true;
  };
  function Companion_55() {
  }
  var Companion_instance_103;
  function Companion_getInstance_73() {
    return Companion_instance_103;
  }
  function $serializer_39() {
    $serializer_instance_39 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAccount', this, 2);
    tmp0_serialDesc.y4l('homePage', false);
    tmp0_serialDesc.y4l('name', false);
    this.tom_1 = tmp0_serialDesc;
  }
  protoOf($serializer_39).v4a = function () {
    return this.tom_1;
  };
  protoOf($serializer_39).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_39).x4a = function (decoder) {
    var tmp0_desc = this.tom_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.x4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.x4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return XapiAccount_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_39).uom = function (encoder, value) {
    var tmp0_desc = this.tom_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.b4g(tmp0_desc, 0, value.vom_1);
    tmp1_output.b4g(tmp0_desc, 1, value.wom_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_39).w4a = function (encoder, value) {
    return this.uom(encoder, value instanceof XapiAccount ? value : THROW_CCE());
  };
  var $serializer_instance_39;
  function $serializer_getInstance_51() {
    if ($serializer_instance_39 == null)
      new $serializer_39();
    return $serializer_instance_39;
  }
  function XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_51().tom_1);
    }
    $this.vom_1 = homePage;
    $this.wom_1 = name;
    return $this;
  }
  function XapiAccount_init_$Create$(seen1, homePage, name, serializationConstructorMarker) {
    return XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, objectCreate(protoOf(XapiAccount)));
  }
  function XapiAccount(homePage, name) {
    this.vom_1 = homePage;
    this.wom_1 = name;
  }
  protoOf(XapiAccount).toString = function () {
    return 'XapiAccount(homePage=' + this.vom_1 + ', name=' + this.wom_1 + ')';
  };
  protoOf(XapiAccount).hashCode = function () {
    var result = getStringHashCode(this.vom_1);
    result = imul(result, 31) + getStringHashCode(this.wom_1) | 0;
    return result;
  };
  protoOf(XapiAccount).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAccount))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAccount ? other : THROW_CCE();
    if (!(this.vom_1 === tmp0_other_with_cast.vom_1))
      return false;
    if (!(this.wom_1 === tmp0_other_with_cast.wom_1))
      return false;
    return true;
  };
  function Companion_56() {
    Companion_instance_104 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.xom_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_104;
  function Companion_getInstance_74() {
    if (Companion_instance_104 == null)
      new Companion_56();
    return Companion_instance_104;
  }
  function $serializer_40() {
    $serializer_instance_40 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivity.Interaction', this, 2);
    tmp0_serialDesc.y4l('id', true);
    tmp0_serialDesc.y4l('description', true);
    this.yom_1 = tmp0_serialDesc;
  }
  protoOf($serializer_40).v4a = function () {
    return this.yom_1;
  };
  protoOf($serializer_40).p4m = function () {
    var tmp0_cached = Companion_getInstance_74().xom_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_40).x4a = function (decoder) {
    var tmp0_desc = this.yom_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    var tmp7_cached = Companion_getInstance_74().xom_1;
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return Interaction_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_40).zom = function (encoder, value) {
    var tmp0_desc = this.yom_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_74().xom_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.aon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.aon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.bon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, tmp2_cached[1], value.bon_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_40).w4a = function (encoder, value) {
    return this.zom(encoder, value instanceof Interaction ? value : THROW_CCE());
  };
  var $serializer_instance_40;
  function $serializer_getInstance_52() {
    if ($serializer_instance_40 == null)
      new $serializer_40();
    return $serializer_instance_40;
  }
  function Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_52().yom_1);
    }
    if (0 === (seen1 & 1))
      $this.aon_1 = null;
    else
      $this.aon_1 = id;
    if (0 === (seen1 & 2))
      $this.bon_1 = null;
    else
      $this.bon_1 = description;
    return $this;
  }
  function Interaction_init_$Create$(seen1, id, description, serializationConstructorMarker) {
    return Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, objectCreate(protoOf(Interaction)));
  }
  function Interaction(id, description) {
    Companion_getInstance_74();
    id = id === VOID ? null : id;
    description = description === VOID ? null : description;
    this.aon_1 = id;
    this.bon_1 = description;
  }
  protoOf(Interaction).toString = function () {
    return 'Interaction(id=' + this.aon_1 + ', description=' + this.bon_1 + ')';
  };
  protoOf(Interaction).hashCode = function () {
    var result = this.aon_1 == null ? 0 : getStringHashCode(this.aon_1);
    result = imul(result, 31) + (this.bon_1 == null ? 0 : hashCode(this.bon_1)) | 0;
    return result;
  };
  protoOf(Interaction).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Interaction))
      return false;
    var tmp0_other_with_cast = other instanceof Interaction ? other : THROW_CCE();
    if (!(this.aon_1 == tmp0_other_with_cast.aon_1))
      return false;
    if (!equals(this.bon_1, tmp0_other_with_cast.bon_1))
      return false;
    return true;
  };
  function Companion_57() {
    Companion_instance_105 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.con_1 = [new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance()), null, null, new ArrayListSerializer(StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_52()), new ArrayListSerializer($serializer_getInstance_52()), new ArrayListSerializer($serializer_getInstance_52()), new ArrayListSerializer($serializer_getInstance_52()), new ArrayListSerializer($serializer_getInstance_52())];
  }
  var Companion_instance_105;
  function Companion_getInstance_75() {
    if (Companion_instance_105 == null)
      new Companion_57();
    return Companion_instance_105;
  }
  function $serializer_41() {
    $serializer_instance_41 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('Activity', this, 12);
    tmp0_serialDesc.y4l('name', true);
    tmp0_serialDesc.y4l('description', true);
    tmp0_serialDesc.y4l('type', true);
    tmp0_serialDesc.y4l('extensions', true);
    tmp0_serialDesc.y4l('moreInfo', true);
    tmp0_serialDesc.y4l('interactionType', true);
    tmp0_serialDesc.y4l('correctResponsePattern', true);
    tmp0_serialDesc.y4l('choices', true);
    tmp0_serialDesc.y4l('scale', true);
    tmp0_serialDesc.y4l('source', true);
    tmp0_serialDesc.y4l('target', true);
    tmp0_serialDesc.y4l('steps', true);
    this.don_1 = tmp0_serialDesc;
  }
  protoOf($serializer_41).v4a = function () {
    return this.don_1;
  };
  protoOf($serializer_41).p4m = function () {
    var tmp0_cached = Companion_getInstance_75().con_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[3]), get_nullable(StringSerializer_getInstance()), get_nullable(XapiInteractionTypeSerializer_instance), get_nullable(tmp0_cached[6]), get_nullable(tmp0_cached[7]), get_nullable(tmp0_cached[8]), get_nullable(tmp0_cached[9]), get_nullable(tmp0_cached[10]), get_nullable(tmp0_cached[11])];
  };
  protoOf($serializer_41).x4a = function (decoder) {
    var tmp0_desc = this.don_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.n4e(tmp0_desc);
    var tmp17_cached = Companion_getInstance_75().con_1;
    if (tmp16_input.c4f()) {
      tmp4_local0 = tmp16_input.b4f(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.b4f(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.b4f(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.b4f(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.b4f(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.b4f(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.b4f(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.b4f(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.b4f(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.b4f(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.b4f(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.b4f(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.b4f(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.b4f(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.b4f(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.b4f(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.b4f(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.b4f(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.b4f(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.b4f(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.o4e(tmp0_desc);
    return XapiActivity_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_41).eon = function (encoder, value) {
    var tmp0_desc = this.don_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_75().con_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.fon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, tmp2_cached[0], value.fon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.gon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, tmp2_cached[1], value.gon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.hon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.hon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.ion_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, tmp2_cached[3], value.ion_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.jon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, StringSerializer_getInstance(), value.jon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.kon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, value.kon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !(value.lon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 6, tmp2_cached[6], value.lon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 7) ? true : !(value.mon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 7, tmp2_cached[7], value.mon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 8) ? true : !(value.non_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 8, tmp2_cached[8], value.non_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 9) ? true : !(value.oon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 9, tmp2_cached[9], value.oon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 10) ? true : !(value.pon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 10, tmp2_cached[10], value.pon_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 11) ? true : !(value.qon_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 11, tmp2_cached[11], value.qon_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_41).w4a = function (encoder, value) {
    return this.eon(encoder, value instanceof XapiActivity ? value : THROW_CCE());
  };
  var $serializer_instance_41;
  function $serializer_getInstance_53() {
    if ($serializer_instance_41 == null)
      new $serializer_41();
    return $serializer_instance_41;
  }
  function XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_53().don_1);
    }
    if (0 === (seen1 & 1))
      $this.fon_1 = null;
    else
      $this.fon_1 = name;
    if (0 === (seen1 & 2))
      $this.gon_1 = null;
    else
      $this.gon_1 = description;
    if (0 === (seen1 & 4))
      $this.hon_1 = null;
    else
      $this.hon_1 = type;
    if (0 === (seen1 & 8))
      $this.ion_1 = null;
    else
      $this.ion_1 = extensions;
    if (0 === (seen1 & 16))
      $this.jon_1 = null;
    else
      $this.jon_1 = moreInfo;
    if (0 === (seen1 & 32))
      $this.kon_1 = null;
    else
      $this.kon_1 = interactionType;
    if (0 === (seen1 & 64))
      $this.lon_1 = null;
    else
      $this.lon_1 = correctResponsePattern;
    if (0 === (seen1 & 128))
      $this.mon_1 = null;
    else
      $this.mon_1 = choices;
    if (0 === (seen1 & 256))
      $this.non_1 = null;
    else
      $this.non_1 = scale;
    if (0 === (seen1 & 512))
      $this.oon_1 = null;
    else
      $this.oon_1 = source;
    if (0 === (seen1 & 1024))
      $this.pon_1 = null;
    else
      $this.pon_1 = target;
    if (0 === (seen1 & 2048))
      $this.qon_1 = null;
    else
      $this.qon_1 = steps;
    return $this;
  }
  function XapiActivity_init_$Create$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker) {
    return XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, objectCreate(protoOf(XapiActivity)));
  }
  function XapiActivity(name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps) {
    Companion_getInstance_75();
    name = name === VOID ? null : name;
    description = description === VOID ? null : description;
    type = type === VOID ? null : type;
    extensions = extensions === VOID ? null : extensions;
    moreInfo = moreInfo === VOID ? null : moreInfo;
    interactionType = interactionType === VOID ? null : interactionType;
    correctResponsePattern = correctResponsePattern === VOID ? null : correctResponsePattern;
    choices = choices === VOID ? null : choices;
    scale = scale === VOID ? null : scale;
    source = source === VOID ? null : source;
    target = target === VOID ? null : target;
    steps = steps === VOID ? null : steps;
    this.fon_1 = name;
    this.gon_1 = description;
    this.hon_1 = type;
    this.ion_1 = extensions;
    this.jon_1 = moreInfo;
    this.kon_1 = interactionType;
    this.lon_1 = correctResponsePattern;
    this.mon_1 = choices;
    this.non_1 = scale;
    this.oon_1 = source;
    this.pon_1 = target;
    this.qon_1 = steps;
  }
  protoOf(XapiActivity).toString = function () {
    return 'XapiActivity(name=' + this.fon_1 + ', description=' + this.gon_1 + ', type=' + this.hon_1 + ', extensions=' + this.ion_1 + ', moreInfo=' + this.jon_1 + ', interactionType=' + this.kon_1 + ', correctResponsePattern=' + this.lon_1 + ', choices=' + this.mon_1 + ', scale=' + this.non_1 + ', source=' + this.oon_1 + ', target=' + this.pon_1 + ', steps=' + this.qon_1 + ')';
  };
  protoOf(XapiActivity).hashCode = function () {
    var result = this.fon_1 == null ? 0 : hashCode(this.fon_1);
    result = imul(result, 31) + (this.gon_1 == null ? 0 : hashCode(this.gon_1)) | 0;
    result = imul(result, 31) + (this.hon_1 == null ? 0 : getStringHashCode(this.hon_1)) | 0;
    result = imul(result, 31) + (this.ion_1 == null ? 0 : hashCode(this.ion_1)) | 0;
    result = imul(result, 31) + (this.jon_1 == null ? 0 : getStringHashCode(this.jon_1)) | 0;
    result = imul(result, 31) + (this.kon_1 == null ? 0 : this.kon_1.hashCode()) | 0;
    result = imul(result, 31) + (this.lon_1 == null ? 0 : hashCode(this.lon_1)) | 0;
    result = imul(result, 31) + (this.mon_1 == null ? 0 : hashCode(this.mon_1)) | 0;
    result = imul(result, 31) + (this.non_1 == null ? 0 : hashCode(this.non_1)) | 0;
    result = imul(result, 31) + (this.oon_1 == null ? 0 : hashCode(this.oon_1)) | 0;
    result = imul(result, 31) + (this.pon_1 == null ? 0 : hashCode(this.pon_1)) | 0;
    result = imul(result, 31) + (this.qon_1 == null ? 0 : hashCode(this.qon_1)) | 0;
    return result;
  };
  protoOf(XapiActivity).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivity))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivity ? other : THROW_CCE();
    if (!equals(this.fon_1, tmp0_other_with_cast.fon_1))
      return false;
    if (!equals(this.gon_1, tmp0_other_with_cast.gon_1))
      return false;
    if (!(this.hon_1 == tmp0_other_with_cast.hon_1))
      return false;
    if (!equals(this.ion_1, tmp0_other_with_cast.ion_1))
      return false;
    if (!(this.jon_1 == tmp0_other_with_cast.jon_1))
      return false;
    if (!equals(this.kon_1, tmp0_other_with_cast.kon_1))
      return false;
    if (!equals(this.lon_1, tmp0_other_with_cast.lon_1))
      return false;
    if (!equals(this.mon_1, tmp0_other_with_cast.mon_1))
      return false;
    if (!equals(this.non_1, tmp0_other_with_cast.non_1))
      return false;
    if (!equals(this.oon_1, tmp0_other_with_cast.oon_1))
      return false;
    if (!equals(this.pon_1, tmp0_other_with_cast.pon_1))
      return false;
    if (!equals(this.qon_1, tmp0_other_with_cast.qon_1))
      return false;
    return true;
  };
  function ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    activityLangMapEntries = activityLangMapEntries === VOID ? emptyList() : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? emptyList() : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? emptyList() : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? null : statementContextActivityJoin;
    this.oog_1 = activityEntity;
    this.pog_1 = activityLangMapEntries;
    this.qog_1 = activityInteractionEntities;
    this.rog_1 = activityExtensionEntities;
    this.sog_1 = statementContextActivityJoin;
  }
  protoOf(ActivityEntities).ron = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    return new ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).son = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin, $super) {
    activityEntity = activityEntity === VOID ? this.oog_1 : activityEntity;
    activityLangMapEntries = activityLangMapEntries === VOID ? this.pog_1 : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? this.qog_1 : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? this.rog_1 : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? this.sog_1 : statementContextActivityJoin;
    return $super === VOID ? this.ron(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) : $super.ron.call(this, activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).toString = function () {
    return 'ActivityEntities(activityEntity=' + this.oog_1 + ', activityLangMapEntries=' + this.pog_1 + ', activityInteractionEntities=' + this.qog_1 + ', activityExtensionEntities=' + this.rog_1 + ', statementContextActivityJoin=' + this.sog_1 + ')';
  };
  protoOf(ActivityEntities).hashCode = function () {
    var result = this.oog_1.hashCode();
    result = imul(result, 31) + hashCode(this.pog_1) | 0;
    result = imul(result, 31) + hashCode(this.qog_1) | 0;
    result = imul(result, 31) + hashCode(this.rog_1) | 0;
    result = imul(result, 31) + (this.sog_1 == null ? 0 : this.sog_1.hashCode()) | 0;
    return result;
  };
  protoOf(ActivityEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActivityEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActivityEntities ? other : THROW_CCE();
    if (!this.oog_1.equals(tmp0_other_with_cast.oog_1))
      return false;
    if (!equals(this.pog_1, tmp0_other_with_cast.pog_1))
      return false;
    if (!equals(this.qog_1, tmp0_other_with_cast.qog_1))
      return false;
    if (!equals(this.rog_1, tmp0_other_with_cast.rog_1))
      return false;
    if (!equals(this.sog_1, tmp0_other_with_cast.sog_1))
      return false;
    return true;
  };
  function toEntities(_this__u8e3s4, activityId, stringHasher, json) {
    xapiRequireValidIRI(activityId, 'Activity ID is not a valid IRI: ' + activityId);
    var activityUid = stringHasher.ton(activityId);
    var tmp9_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.mon_1;
    var tmp;
    if (tmp9_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp9_safe_receiver, 10));
      var tmp0_iterator = tmp9_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$0 = toEntities$toEntities(item, stringHasher, activityUid, 1, 'choices');
        destination.i1(tmp$ret$0);
      }
      tmp = destination;
    }
    var tmp_0 = toEmptyIfNull(tmp);
    var tmp7_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.non_1;
    var tmp_1;
    if (tmp7_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp7_safe_receiver, 10));
      var tmp0_iterator_0 = tmp7_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$3 = toEntities$toEntities(item_0, stringHasher, activityUid, 2, 'scale');
        destination_0.i1(tmp$ret$3);
      }
      tmp_1 = destination_0;
    }
    var tmp_2 = plus(tmp_0, toEmptyIfNull(tmp_1));
    var tmp5_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.oon_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_safe_receiver, 10));
      var tmp0_iterator_1 = tmp5_safe_receiver.w();
      while (tmp0_iterator_1.f()) {
        var item_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$6 = toEntities$toEntities(item_1, stringHasher, activityUid, 3, 'source');
        destination_1.i1(tmp$ret$6);
      }
      tmp_3 = destination_1;
    }
    var tmp_4 = plus(tmp_2, toEmptyIfNull(tmp_3));
    var tmp3_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.pon_1;
    var tmp_5;
    if (tmp3_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp3_safe_receiver, 10));
      var tmp0_iterator_2 = tmp3_safe_receiver.w();
      while (tmp0_iterator_2.f()) {
        var item_2 = tmp0_iterator_2.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$9 = toEntities$toEntities(item_2, stringHasher, activityUid, 4, 'target');
        destination_2.i1(tmp$ret$9);
      }
      tmp_5 = destination_2;
    }
    var tmp_6 = plus(tmp_4, toEmptyIfNull(tmp_5));
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.qon_1;
    var tmp_7;
    if (tmp1_safe_receiver == null) {
      tmp_7 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator_3 = tmp1_safe_receiver.w();
      while (tmp0_iterator_3.f()) {
        var item_3 = tmp0_iterator_3.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$12 = toEntities$toEntities(item_3, stringHasher, activityUid, 5, 'steps');
        destination_3.i1(tmp$ret$12);
      }
      tmp_7 = destination_3;
    }
    var interactionEntitiesAndLangMaps = plus(tmp_6, toEmptyIfNull(tmp_7));
    var tmp_8 = _this__u8e3s4 == null ? null : _this__u8e3s4.hon_1;
    var tmp_9 = _this__u8e3s4 == null ? null : _this__u8e3s4.jon_1;
    var tmp13_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.kon_1;
    var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.xon_1;
    var tmp_10;
    if (tmp14_elvis_lhs == null) {
      tmp_10 = 0;
    } else {
      tmp_10 = tmp14_elvis_lhs;
    }
    var tmp_11 = tmp_10;
    var tmp16_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.lon_1;
    var tmp_12;
    if (tmp16_safe_receiver == null) {
      tmp_12 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      // Inline function 'kotlinx.serialization.encodeToString' call
      // Inline function 'kotlinx.serialization.serializer' call
      var this_0 = json.y4b();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_1 = serializer(this_0, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false))]), false));
      var tmp$ret$16 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
      tmp_12 = json.w4b(tmp$ret$16, tmp16_safe_receiver);
    }
    var tmp_13 = new ActivityEntity(activityUid, activityId, tmp_8, tmp_9, tmp_11, tmp_12);
    var tmp20_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.fon_1;
    var tmp_14;
    if (tmp20_safe_receiver == null) {
      tmp_14 = null;
    } else {
      tmp_14 = toEntities$toLangMapEntries(tmp20_safe_receiver, activityUid, stringHasher, 'name');
    }
    var tmp_15 = toEmptyIfNull(tmp_14);
    var tmp18_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.gon_1;
    var tmp_16;
    if (tmp18_safe_receiver == null) {
      tmp_16 = null;
    } else {
      tmp_16 = toEntities$toLangMapEntries(tmp18_safe_receiver, activityUid, stringHasher, 'description');
    }
    var tmp_17 = plus(tmp_15, toEmptyIfNull(tmp_16));
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_4 = ArrayList_init_$Create$();
    var tmp0_iterator_4 = interactionEntitiesAndLangMaps.w();
    while (tmp0_iterator_4.f()) {
      var element = tmp0_iterator_4.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var list = element.x6_1;
      addAll(destination_4, list);
    }
    var tmp_18 = plus(tmp_17, destination_4);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_5 = ArrayList_init_$Create$_0(collectionSizeOrDefault(interactionEntitiesAndLangMaps, 10));
    var tmp0_iterator_5 = interactionEntitiesAndLangMaps.w();
    while (tmp0_iterator_5.f()) {
      var item_4 = tmp0_iterator_5.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var tmp$ret$23 = item_4.w6_1;
      destination_5.i1(tmp$ret$23);
    }
    var tmp_19 = destination_5;
    var tmp22_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.ion_1;
    var tmp_20;
    if (tmp22_safe_receiver == null) {
      tmp_20 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_6 = ArrayList_init_$Create$_0(tmp22_safe_receiver.u());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator_6 = tmp22_safe_receiver.q2().w();
      while (tmp0_iterator_6.f()) {
        var item_5 = tmp0_iterator_6.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        // Inline function 'kotlin.collections.component1' call
        var key = item_5.s2();
        // Inline function 'kotlin.collections.component2' call
        var value = item_5.t2();
        var tmp$ret$29 = new ActivityExtensionEntity(activityUid, stringHasher.ton(key), xapiRequireValidIRI(key, activityId + ' extension ' + key + ' is not a valid IRI'), json.w4b(Companion_instance_22.s4x(), value));
        destination_6.i1(tmp$ret$29);
      }
      tmp_20 = destination_6;
    }
    var tmp23_elvis_lhs = tmp_20;
    return new ActivityEntities(tmp_13, tmp_18, tmp_19, tmp23_elvis_lhs == null ? emptyList() : tmp23_elvis_lhs);
  }
  function toEntities$toLangMapEntries(_this__u8e3s4, activityUid, $stringHasher, propName, almeAieHash) {
    almeAieHash = almeAieHash === VOID ? new Long(0, 0) : almeAieHash;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.q2();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.toLangMapEntries.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var lang = item.s2();
      // Inline function 'kotlin.collections.component2' call
      var text = item.t2();
      var tmp$ret$2 = new ActivityLangMapEntry(activityUid, $stringHasher.ton(propName + '-' + lang), lang, propName, text, almeAieHash);
      destination.i1(tmp$ret$2);
    }
    return destination;
  }
  function toEntities$toEntities(_this__u8e3s4, $stringHasher, activityUid, propId, propName) {
    var aieHash = $stringHasher.ton('' + propId + _this__u8e3s4.aon_1);
    var tmp = new ActivityInteractionEntity(activityUid, aieHash, propId, _this__u8e3s4.aon_1);
    var tmp0_safe_receiver = _this__u8e3s4.bon_1;
    return to(tmp, toEmptyIfNull(tmp0_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp0_safe_receiver, activityUid, $stringHasher, propName + '-' + _this__u8e3s4.aon_1, aieHash)));
  }
  function Companion_58() {
  }
  protoOf(Companion_58).s4x = function () {
    return XapiActorSerializer_getInstance();
  };
  protoOf(Companion_58).a4n = function (typeParamsSerializers) {
    return this.s4x();
  };
  var Companion_instance_106;
  function Companion_getInstance_76() {
    return Companion_instance_106;
  }
  function XapiActor() {
  }
  function XapiActorSerializer() {
    XapiActorSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiActor));
  }
  protoOf(XapiActorSerializer).q4x = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).ba('type');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.x3e();
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiActorSerializer.selectDeserializer.<anonymous>' call
      tmp = valueOf(tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var objectType = tmp3_elvis_lhs == null ? XapiObjectType_Agent_getInstance() : tmp3_elvis_lhs;
    var tmp_0;
    switch (objectType.za_1) {
      case 3:
        tmp_0 = Companion_instance_107.s4x();
        break;
      case 4:
        tmp_0 = Companion_getInstance_81().s4x();
        break;
      default:
        throw new XapiException(400, 'Invalid object type for actor: must be Agent or Group');
    }
    return tmp_0;
  };
  var XapiActorSerializer_instance;
  function XapiActorSerializer_getInstance() {
    if (XapiActorSerializer_instance == null)
      new XapiActorSerializer();
    return XapiActorSerializer_instance;
  }
  function identifierHash(_this__u8e3s4, xxHasher) {
    var tmp;
    if (!(_this__u8e3s4.boo() == null)) {
      var tmp0_safe_receiver = _this__u8e3s4.boo();
      var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wom_1;
      var tmp1_safe_receiver = _this__u8e3s4.boo();
      tmp = '' + tmp_0 + '@' + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vom_1);
    } else if (!(_this__u8e3s4.yon() == null)) {
      tmp = _this__u8e3s4.yon();
    } else if (!(_this__u8e3s4.zon() == null)) {
      tmp = _this__u8e3s4.zon();
    } else if (!(_this__u8e3s4.aoo() == null)) {
      tmp = _this__u8e3s4.aoo();
    } else {
      tmp = null;
    }
    var idStr = tmp;
    var tmp_1;
    if (idStr == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.identifierHash.<anonymous>' call
      tmp_1 = xxHasher.ton(idStr);
    }
    var tmp3_elvis_lhs = tmp_1;
    return tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
  }
  function ActorEntities(actor, groupMemberAgents, groupMemberJoins) {
    groupMemberAgents = groupMemberAgents === VOID ? emptyList() : groupMemberAgents;
    groupMemberJoins = groupMemberJoins === VOID ? emptyList() : groupMemberJoins;
    this.ioj_1 = actor;
    this.joj_1 = groupMemberAgents;
    this.koj_1 = groupMemberJoins;
  }
  protoOf(ActorEntities).toString = function () {
    return 'ActorEntities(actor=' + this.ioj_1 + ', groupMemberAgents=' + this.joj_1 + ', groupMemberJoins=' + this.koj_1 + ')';
  };
  protoOf(ActorEntities).hashCode = function () {
    var result = this.ioj_1.hashCode();
    result = imul(result, 31) + hashCode(this.joj_1) | 0;
    result = imul(result, 31) + hashCode(this.koj_1) | 0;
    return result;
  };
  protoOf(ActorEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActorEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActorEntities ? other : THROW_CCE();
    if (!this.ioj_1.equals(tmp0_other_with_cast.ioj_1))
      return false;
    if (!equals(this.joj_1, tmp0_other_with_cast.joj_1))
      return false;
    if (!equals(this.koj_1, tmp0_other_with_cast.koj_1))
      return false;
    return true;
  };
  function toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var tmp;
    if (_this__u8e3s4 instanceof XapiAgent) {
      tmp = new ActorEntities(toActorEntity(_this__u8e3s4, stringHasher, knownActorUidToPersonUidMap));
    } else {
      if (_this__u8e3s4 instanceof XapiGroup) {
        tmp = toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
      } else {
        noWhenBranchMatchedException();
      }
    }
    return tmp;
  }
  function Companion_59() {
  }
  protoOf(Companion_59).s4x = function () {
    return $serializer_getInstance_54();
  };
  var Companion_instance_107;
  function Companion_getInstance_77() {
    return Companion_instance_107;
  }
  function $serializer_42() {
    $serializer_instance_42 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAgent', this, 6);
    tmp0_serialDesc.y4l('name', true);
    tmp0_serialDesc.y4l('mbox', true);
    tmp0_serialDesc.y4l('mbox_sha1sum', true);
    tmp0_serialDesc.y4l('openid', true);
    tmp0_serialDesc.y4l('objectType', true);
    tmp0_serialDesc.y4l('account', true);
    this.foo_1 = tmp0_serialDesc;
  }
  protoOf($serializer_42).v4a = function () {
    return this.foo_1;
  };
  protoOf($serializer_42).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_instance), get_nullable($serializer_getInstance_51())];
  };
  protoOf($serializer_42).x4a = function (decoder) {
    var tmp0_desc = this.foo_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.n4e(tmp0_desc);
    if (tmp10_input.c4f()) {
      tmp4_local0 = tmp10_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.b4f(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.b4f(tmp0_desc, 5, $serializer_getInstance_51(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.b4f(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.b4f(tmp0_desc, 5, $serializer_getInstance_51(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.o4e(tmp0_desc);
    return XapiAgent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_42).goo = function (encoder, value) {
    var tmp0_desc = this.foo_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.hoo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.hoo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.ioo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, StringSerializer_getInstance(), value.ioo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.joo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.joo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.koo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, StringSerializer_getInstance(), value.koo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.loo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.loo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.moo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, $serializer_getInstance_51(), value.moo_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_42).w4a = function (encoder, value) {
    return this.goo(encoder, value instanceof XapiAgent ? value : THROW_CCE());
  };
  var $serializer_instance_42;
  function $serializer_getInstance_54() {
    if ($serializer_instance_42 == null)
      new $serializer_42();
    return $serializer_instance_42;
  }
  function XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_54().foo_1);
    }
    if (0 === (seen1 & 1))
      $this.hoo_1 = null;
    else
      $this.hoo_1 = name;
    if (0 === (seen1 & 2))
      $this.ioo_1 = null;
    else
      $this.ioo_1 = mbox;
    if (0 === (seen1 & 4))
      $this.joo_1 = null;
    else
      $this.joo_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.koo_1 = null;
    else
      $this.koo_1 = openid;
    if (0 === (seen1 & 16))
      $this.loo_1 = null;
    else
      $this.loo_1 = objectType;
    if (0 === (seen1 & 32))
      $this.moo_1 = null;
    else
      $this.moo_1 = account;
    return $this;
  }
  function XapiAgent_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker) {
    return XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, objectCreate(protoOf(XapiAgent)));
  }
  function XapiAgent(name, mbox, mbox_sha1sum, openid, objectType, account) {
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    this.hoo_1 = name;
    this.ioo_1 = mbox;
    this.joo_1 = mbox_sha1sum;
    this.koo_1 = openid;
    this.loo_1 = objectType;
    this.moo_1 = account;
  }
  protoOf(XapiAgent).yon = function () {
    return this.ioo_1;
  };
  protoOf(XapiAgent).zon = function () {
    return this.joo_1;
  };
  protoOf(XapiAgent).aoo = function () {
    return this.koo_1;
  };
  protoOf(XapiAgent).noo = function () {
    return this.loo_1;
  };
  protoOf(XapiAgent).boo = function () {
    return this.moo_1;
  };
  protoOf(XapiAgent).toString = function () {
    return 'XapiAgent(name=' + this.hoo_1 + ', mbox=' + this.ioo_1 + ', mbox_sha1sum=' + this.joo_1 + ', openid=' + this.koo_1 + ', objectType=' + this.loo_1 + ', account=' + this.moo_1 + ')';
  };
  protoOf(XapiAgent).hashCode = function () {
    var result = this.hoo_1 == null ? 0 : getStringHashCode(this.hoo_1);
    result = imul(result, 31) + (this.ioo_1 == null ? 0 : getStringHashCode(this.ioo_1)) | 0;
    result = imul(result, 31) + (this.joo_1 == null ? 0 : getStringHashCode(this.joo_1)) | 0;
    result = imul(result, 31) + (this.koo_1 == null ? 0 : getStringHashCode(this.koo_1)) | 0;
    result = imul(result, 31) + (this.loo_1 == null ? 0 : this.loo_1.hashCode()) | 0;
    result = imul(result, 31) + (this.moo_1 == null ? 0 : this.moo_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiAgent).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAgent))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAgent ? other : THROW_CCE();
    if (!(this.hoo_1 == tmp0_other_with_cast.hoo_1))
      return false;
    if (!(this.ioo_1 == tmp0_other_with_cast.ioo_1))
      return false;
    if (!(this.joo_1 == tmp0_other_with_cast.joo_1))
      return false;
    if (!(this.koo_1 == tmp0_other_with_cast.koo_1))
      return false;
    if (!equals(this.loo_1, tmp0_other_with_cast.loo_1))
      return false;
    if (!equals(this.moo_1, tmp0_other_with_cast.moo_1))
      return false;
    return true;
  };
  function toActorEntity(_this__u8e3s4, xxHasher, knownActorUidToPersonUidMap, lastModifiedTime) {
    lastModifiedTime = lastModifiedTime === VOID ? systemTimeInMillis() : lastModifiedTime;
    var uid = identifierHash(_this__u8e3s4, xxHasher);
    var tmp0_elvis_lhs = knownActorUidToPersonUidMap.q(uid);
    var tmp5_actorPersonUid = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
    var tmp6_actorMbox = _this__u8e3s4.ioo_1;
    var tmp7_actorMbox_sha1sum = _this__u8e3s4.joo_1;
    var tmp8_actorOpenid = _this__u8e3s4.koo_1;
    var tmp1_safe_receiver = _this__u8e3s4.moo_1;
    var tmp9_actorAccountName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wom_1;
    var tmp2_safe_receiver = _this__u8e3s4.moo_1;
    var tmp10_actorAccountHomePage = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vom_1;
    var tmp3_safe_receiver = _this__u8e3s4.hoo_1;
    var tmp;
    if (tmp3_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toActorEntity.<anonymous>' call
      tmp = xxHasher.ton(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp;
    var tmp11_actorEtag = tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs;
    return new ActorEntity(uid, tmp5_actorPersonUid, VOID, tmp6_actorMbox, tmp7_actorMbox_sha1sum, tmp8_actorOpenid, tmp9_actorAccountName, tmp10_actorAccountHomePage, tmp11_actorEtag, lastModifiedTime, 1);
  }
  function Companion_60() {
    Companion_instance_108 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ooo_1 = [null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_108;
  function Companion_getInstance_78() {
    if (Companion_instance_108 == null)
      new Companion_60();
    return Companion_instance_108;
  }
  function $serializer_43() {
    $serializer_instance_43 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiContext', this, 9);
    tmp0_serialDesc.y4l('instructor', true);
    tmp0_serialDesc.y4l('registration', true);
    tmp0_serialDesc.y4l('language', true);
    tmp0_serialDesc.y4l('platform', true);
    tmp0_serialDesc.y4l('revision', true);
    tmp0_serialDesc.y4l('team', true);
    tmp0_serialDesc.y4l('statement', true);
    tmp0_serialDesc.y4l('contextActivities', true);
    tmp0_serialDesc.y4l('extensions', true);
    this.poo_1 = tmp0_serialDesc;
  }
  protoOf($serializer_43).v4a = function () {
    return this.poo_1;
  };
  protoOf($serializer_43).p4m = function () {
    var tmp0_cached = Companion_getInstance_78().ooo_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable($serializer_getInstance_61()), get_nullable(XapiContextActivitiesSerializer_getInstance()), get_nullable(tmp0_cached[8])];
  };
  protoOf($serializer_43).x4a = function (decoder) {
    var tmp0_desc = this.poo_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.n4e(tmp0_desc);
    var tmp14_cached = Companion_getInstance_78().ooo_1;
    if (tmp13_input.c4f()) {
      tmp4_local0 = tmp13_input.b4f(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.b4f(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.b4f(tmp0_desc, 6, $serializer_getInstance_61(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.b4f(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.b4f(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.b4f(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.b4f(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.b4f(tmp0_desc, 6, $serializer_getInstance_61(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.b4f(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.b4f(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.o4e(tmp0_desc);
    return XapiContext_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_43).qoo = function (encoder, value) {
    var tmp0_desc = this.poo_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_78().ooo_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.roo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, XapiActorSerializer_getInstance(), value.roo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.soo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, StringSerializer_getInstance(), value.soo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.too_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.too_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.uoo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, StringSerializer_getInstance(), value.uoo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.voo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, StringSerializer_getInstance(), value.voo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.woo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, XapiActorSerializer_getInstance(), value.woo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !(value.xoo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 6, $serializer_getInstance_61(), value.xoo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 7) ? true : !(value.yoo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), value.yoo_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 8) ? true : !(value.zoo_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 8, tmp2_cached[8], value.zoo_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_43).w4a = function (encoder, value) {
    return this.qoo(encoder, value instanceof XapiContext ? value : THROW_CCE());
  };
  var $serializer_instance_43;
  function $serializer_getInstance_55() {
    if ($serializer_instance_43 == null)
      new $serializer_43();
    return $serializer_instance_43;
  }
  function XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_55().poo_1);
    }
    if (0 === (seen1 & 1))
      $this.roo_1 = null;
    else
      $this.roo_1 = instructor;
    if (0 === (seen1 & 2))
      $this.soo_1 = null;
    else
      $this.soo_1 = registration;
    if (0 === (seen1 & 4))
      $this.too_1 = null;
    else
      $this.too_1 = language;
    if (0 === (seen1 & 8))
      $this.uoo_1 = null;
    else
      $this.uoo_1 = platform;
    if (0 === (seen1 & 16))
      $this.voo_1 = null;
    else
      $this.voo_1 = revision;
    if (0 === (seen1 & 32))
      $this.woo_1 = null;
    else
      $this.woo_1 = team;
    if (0 === (seen1 & 64))
      $this.xoo_1 = null;
    else
      $this.xoo_1 = statement;
    if (0 === (seen1 & 128))
      $this.yoo_1 = null;
    else
      $this.yoo_1 = contextActivities;
    if (0 === (seen1 & 256))
      $this.zoo_1 = null;
    else
      $this.zoo_1 = extensions;
    return $this;
  }
  function XapiContext_init_$Create$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker) {
    return XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiContext)));
  }
  function XapiContext(instructor, registration, language, platform, revision, team, statement, contextActivities, extensions) {
    Companion_getInstance_78();
    instructor = instructor === VOID ? null : instructor;
    registration = registration === VOID ? null : registration;
    language = language === VOID ? null : language;
    platform = platform === VOID ? null : platform;
    revision = revision === VOID ? null : revision;
    team = team === VOID ? null : team;
    statement = statement === VOID ? null : statement;
    contextActivities = contextActivities === VOID ? null : contextActivities;
    extensions = extensions === VOID ? null : extensions;
    this.roo_1 = instructor;
    this.soo_1 = registration;
    this.too_1 = language;
    this.uoo_1 = platform;
    this.voo_1 = revision;
    this.woo_1 = team;
    this.xoo_1 = statement;
    this.yoo_1 = contextActivities;
    this.zoo_1 = extensions;
  }
  protoOf(XapiContext).toString = function () {
    return 'XapiContext(instructor=' + this.roo_1 + ', registration=' + this.soo_1 + ', language=' + this.too_1 + ', platform=' + this.uoo_1 + ', revision=' + this.voo_1 + ', team=' + this.woo_1 + ', statement=' + this.xoo_1 + ', contextActivities=' + this.yoo_1 + ', extensions=' + this.zoo_1 + ')';
  };
  protoOf(XapiContext).hashCode = function () {
    var result = this.roo_1 == null ? 0 : hashCode(this.roo_1);
    result = imul(result, 31) + (this.soo_1 == null ? 0 : getStringHashCode(this.soo_1)) | 0;
    result = imul(result, 31) + (this.too_1 == null ? 0 : getStringHashCode(this.too_1)) | 0;
    result = imul(result, 31) + (this.uoo_1 == null ? 0 : getStringHashCode(this.uoo_1)) | 0;
    result = imul(result, 31) + (this.voo_1 == null ? 0 : getStringHashCode(this.voo_1)) | 0;
    result = imul(result, 31) + (this.woo_1 == null ? 0 : hashCode(this.woo_1)) | 0;
    result = imul(result, 31) + (this.xoo_1 == null ? 0 : this.xoo_1.hashCode()) | 0;
    result = imul(result, 31) + (this.yoo_1 == null ? 0 : this.yoo_1.hashCode()) | 0;
    result = imul(result, 31) + (this.zoo_1 == null ? 0 : hashCode(this.zoo_1)) | 0;
    return result;
  };
  protoOf(XapiContext).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContext))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContext ? other : THROW_CCE();
    if (!equals(this.roo_1, tmp0_other_with_cast.roo_1))
      return false;
    if (!(this.soo_1 == tmp0_other_with_cast.soo_1))
      return false;
    if (!(this.too_1 == tmp0_other_with_cast.too_1))
      return false;
    if (!(this.uoo_1 == tmp0_other_with_cast.uoo_1))
      return false;
    if (!(this.voo_1 == tmp0_other_with_cast.voo_1))
      return false;
    if (!equals(this.woo_1, tmp0_other_with_cast.woo_1))
      return false;
    if (!equals(this.xoo_1, tmp0_other_with_cast.xoo_1))
      return false;
    if (!equals(this.yoo_1, tmp0_other_with_cast.yoo_1))
      return false;
    if (!equals(this.zoo_1, tmp0_other_with_cast.zoo_1))
      return false;
    return true;
  };
  function Companion_61() {
  }
  var Companion_instance_109;
  function Companion_getInstance_79() {
    return Companion_instance_109;
  }
  function XapiContextActivities(parent, grouping, category, other) {
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.aop_1 = parent;
    this.bop_1 = grouping;
    this.cop_1 = category;
    this.dop_1 = other;
  }
  protoOf(XapiContextActivities).toString = function () {
    return 'XapiContextActivities(parent=' + this.aop_1 + ', grouping=' + this.bop_1 + ', category=' + this.cop_1 + ', other=' + this.dop_1 + ')';
  };
  protoOf(XapiContextActivities).hashCode = function () {
    var result = this.aop_1 == null ? 0 : hashCode(this.aop_1);
    result = imul(result, 31) + (this.bop_1 == null ? 0 : hashCode(this.bop_1)) | 0;
    result = imul(result, 31) + (this.cop_1 == null ? 0 : hashCode(this.cop_1)) | 0;
    result = imul(result, 31) + (this.dop_1 == null ? 0 : hashCode(this.dop_1)) | 0;
    return result;
  };
  protoOf(XapiContextActivities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContextActivities))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContextActivities ? other : THROW_CCE();
    if (!equals(this.aop_1, tmp0_other_with_cast.aop_1))
      return false;
    if (!equals(this.bop_1, tmp0_other_with_cast.bop_1))
      return false;
    if (!equals(this.cop_1, tmp0_other_with_cast.cop_1))
      return false;
    if (!equals(this.dop_1, tmp0_other_with_cast.dop_1))
      return false;
    return true;
  };
  function deserialize$propertyToObjectList(jsonObject, jsonDecoder, propName) {
    var jsonElement = jsonObject.ba(propName);
    var tmp;
    if (!(jsonElement == null)) {
      tmp = decodeListOrSingleObjectAsList(jsonDecoder.r4x(), Companion_instance_117.s4x(), jsonElement);
    } else {
      tmp = null;
    }
    return tmp;
  }
  function XapiContextActivitiesSerializer() {
    XapiContextActivitiesSerializer_instance = this;
    this.eop_1 = Companion_getInstance_80().s4x().v4a();
  }
  protoOf(XapiContextActivitiesSerializer).v4a = function () {
    return this.eop_1;
  };
  protoOf(XapiContextActivitiesSerializer).gop = function (encoder, value) {
    encoder.e4g(Companion_getInstance_80().s4x(), toSurrogate(value));
  };
  protoOf(XapiContextActivitiesSerializer).w4a = function (encoder, value) {
    return this.gop(encoder, value instanceof XapiContextActivities ? value : THROW_CCE());
  };
  protoOf(XapiContextActivitiesSerializer).x4a = function (decoder) {
    var tmp0_elvis_lhs = isInterface(decoder, JsonDecoder) ? decoder : null;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$_0();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var jsonDecoder = tmp;
    var tmp_0 = jsonDecoder.p4x();
    var jsonObject = tmp_0 instanceof JsonObject ? tmp_0 : THROW_CCE();
    return new XapiContextActivities(deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'parent'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'grouping'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'category'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'other'));
  };
  var XapiContextActivitiesSerializer_instance;
  function XapiContextActivitiesSerializer_getInstance() {
    if (XapiContextActivitiesSerializer_instance == null)
      new XapiContextActivitiesSerializer();
    return XapiContextActivitiesSerializer_instance;
  }
  function Companion_62() {
    Companion_instance_110 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.fop_1 = [new ArrayListSerializer($serializer_getInstance_61()), new ArrayListSerializer($serializer_getInstance_61()), new ArrayListSerializer($serializer_getInstance_61()), new ArrayListSerializer($serializer_getInstance_61())];
  }
  protoOf(Companion_62).s4x = function () {
    return $serializer_getInstance_56();
  };
  var Companion_instance_110;
  function Companion_getInstance_80() {
    if (Companion_instance_110 == null)
      new Companion_62();
    return Companion_instance_110;
  }
  function $serializer_44() {
    $serializer_instance_44 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('XapiContextActivities', this, 4);
    tmp0_serialDesc.y4l('parent', true);
    tmp0_serialDesc.y4l('grouping', true);
    tmp0_serialDesc.y4l('category', true);
    tmp0_serialDesc.y4l('other', true);
    this.hop_1 = tmp0_serialDesc;
  }
  protoOf($serializer_44).v4a = function () {
    return this.hop_1;
  };
  protoOf($serializer_44).p4m = function () {
    var tmp0_cached = Companion_getInstance_80().fop_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(tmp0_cached[3])];
  };
  protoOf($serializer_44).x4a = function (decoder) {
    var tmp0_desc = this.hop_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.n4e(tmp0_desc);
    var tmp9_cached = Companion_getInstance_80().fop_1;
    if (tmp8_input.c4f()) {
      tmp4_local0 = tmp8_input.b4f(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.b4f(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.b4f(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.b4f(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.o4e(tmp0_desc);
    return XapiContextActivitiesSurrogate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_44).iop = function (encoder, value) {
    var tmp0_desc = this.hop_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_80().fop_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.jop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, tmp2_cached[0], value.jop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.kop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, tmp2_cached[1], value.kop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.lop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, tmp2_cached[2], value.lop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.mop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, tmp2_cached[3], value.mop_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_44).w4a = function (encoder, value) {
    return this.iop(encoder, value instanceof XapiContextActivitiesSurrogate ? value : THROW_CCE());
  };
  var $serializer_instance_44;
  function $serializer_getInstance_56() {
    if ($serializer_instance_44 == null)
      new $serializer_44();
    return $serializer_instance_44;
  }
  function XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_56().hop_1);
    }
    if (0 === (seen1 & 1))
      $this.jop_1 = null;
    else
      $this.jop_1 = parent;
    if (0 === (seen1 & 2))
      $this.kop_1 = null;
    else
      $this.kop_1 = grouping;
    if (0 === (seen1 & 4))
      $this.lop_1 = null;
    else
      $this.lop_1 = category;
    if (0 === (seen1 & 8))
      $this.mop_1 = null;
    else
      $this.mop_1 = other;
    return $this;
  }
  function XapiContextActivitiesSurrogate_init_$Create$(seen1, parent, grouping, category, other, serializationConstructorMarker) {
    return XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, objectCreate(protoOf(XapiContextActivitiesSurrogate)));
  }
  function XapiContextActivitiesSurrogate(parent, grouping, category, other) {
    Companion_getInstance_80();
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.jop_1 = parent;
    this.kop_1 = grouping;
    this.lop_1 = category;
    this.mop_1 = other;
  }
  function toSurrogate(_this__u8e3s4) {
    return new XapiContextActivitiesSurrogate(_this__u8e3s4.aop_1, _this__u8e3s4.bop_1, _this__u8e3s4.cop_1, _this__u8e3s4.dop_1);
  }
  function toEntities_1(_this__u8e3s4, stringHasher, json, statementUuid) {
    var tmp = toEntities$toEntitiesInternal(_this__u8e3s4.aop_1, stringHasher, json, statementUuid, 1);
    var tmp_0 = plus(tmp, toEntities$toEntitiesInternal(_this__u8e3s4.bop_1, stringHasher, json, statementUuid, 2));
    var tmp_1 = plus(tmp_0, toEntities$toEntitiesInternal(_this__u8e3s4.cop_1, stringHasher, json, statementUuid, 3));
    return plus(tmp_1, toEntities$toEntitiesInternal(_this__u8e3s4.dop_1, stringHasher, json, statementUuid, 4));
  }
  function toEntities_2(_this__u8e3s4, stringHasher, json, statementUuid, contextType) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var activityUid = stringHasher.ton(item.oop_1);
      var scajToHash = stringHasher.ton('' + contextType + '-' + item.oop_1);
      var statementContextActivityJoin = new StatementContextActivityJoin(statementUuid.kle(), statementUuid.lle(), scajToHash, contextType, activityUid, item.oop_1);
      var tmp0_safe_receiver = item.pop_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toEntities(tmp0_safe_receiver, item.oop_1, stringHasher, json);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.son(VOID, VOID, VOID, VOID, statementContextActivityJoin);
      var tmp$ret$0 = tmp2_elvis_lhs == null ? new ActivityEntities(new ActivityEntity(activityUid, item.oop_1), VOID, VOID, VOID, statementContextActivityJoin) : tmp2_elvis_lhs;
      destination.i1(tmp$ret$0);
    }
    return destination;
  }
  function toEntities$toEntitiesInternal(_this__u8e3s4, $stringHasher, $json, $statementUuid, type) {
    return toEmptyIfNull(_this__u8e3s4 == null ? null : toEntities_2(_this__u8e3s4, $stringHasher, $json, $statementUuid, type));
  }
  function Companion_63() {
    Companion_instance_111 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.eoo_1 = [null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_54())];
  }
  protoOf(Companion_63).s4x = function () {
    return $serializer_getInstance_57();
  };
  var Companion_instance_111;
  function Companion_getInstance_81() {
    if (Companion_instance_111 == null)
      new Companion_63();
    return Companion_instance_111;
  }
  function $serializer_45() {
    $serializer_instance_45 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiGroup', this, 7);
    tmp0_serialDesc.y4l('name', true);
    tmp0_serialDesc.y4l('mbox', true);
    tmp0_serialDesc.y4l('mbox_sha1sum', true);
    tmp0_serialDesc.y4l('openid', true);
    tmp0_serialDesc.y4l('objectType', true);
    tmp0_serialDesc.y4l('account', true);
    tmp0_serialDesc.y4l('member', true);
    this.qop_1 = tmp0_serialDesc;
  }
  protoOf($serializer_45).v4a = function () {
    return this.qop_1;
  };
  protoOf($serializer_45).p4m = function () {
    var tmp0_cached = Companion_getInstance_81().eoo_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_instance), get_nullable($serializer_getInstance_51()), tmp0_cached[6]];
  };
  protoOf($serializer_45).x4a = function (decoder) {
    var tmp0_desc = this.qop_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_input = decoder.n4e(tmp0_desc);
    var tmp12_cached = Companion_getInstance_81().eoo_1;
    if (tmp11_input.c4f()) {
      tmp4_local0 = tmp11_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp11_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp11_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp11_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp11_input.b4f(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp11_input.b4f(tmp0_desc, 5, $serializer_getInstance_51(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp11_input.z4e(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp11_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp11_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp11_input.b4f(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp11_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp11_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp11_input.b4f(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp11_input.b4f(tmp0_desc, 5, $serializer_getInstance_51(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp11_input.z4e(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp11_input.o4e(tmp0_desc);
    return XapiGroup_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
  };
  protoOf($serializer_45).rop = function (encoder, value) {
    var tmp0_desc = this.qop_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_81().eoo_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.sop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.sop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.top_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, StringSerializer_getInstance(), value.top_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.uop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.uop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.vop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, StringSerializer_getInstance(), value.vop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.wop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.wop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.xop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, $serializer_getInstance_51(), value.xop_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !equals(value.yop_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 6, tmp2_cached[6], value.yop_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_45).w4a = function (encoder, value) {
    return this.rop(encoder, value instanceof XapiGroup ? value : THROW_CCE());
  };
  var $serializer_instance_45;
  function $serializer_getInstance_57() {
    if ($serializer_instance_45 == null)
      new $serializer_45();
    return $serializer_instance_45;
  }
  function XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_57().qop_1);
    }
    if (0 === (seen1 & 1))
      $this.sop_1 = null;
    else
      $this.sop_1 = name;
    if (0 === (seen1 & 2))
      $this.top_1 = null;
    else
      $this.top_1 = mbox;
    if (0 === (seen1 & 4))
      $this.uop_1 = null;
    else
      $this.uop_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.vop_1 = null;
    else
      $this.vop_1 = openid;
    if (0 === (seen1 & 16))
      $this.wop_1 = null;
    else
      $this.wop_1 = objectType;
    if (0 === (seen1 & 32))
      $this.xop_1 = null;
    else
      $this.xop_1 = account;
    if (0 === (seen1 & 64))
      $this.yop_1 = emptyList();
    else
      $this.yop_1 = member;
    return $this;
  }
  function XapiGroup_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker) {
    return XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, objectCreate(protoOf(XapiGroup)));
  }
  function XapiGroup(name, mbox, mbox_sha1sum, openid, objectType, account, member) {
    Companion_getInstance_81();
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    member = member === VOID ? emptyList() : member;
    this.sop_1 = name;
    this.top_1 = mbox;
    this.uop_1 = mbox_sha1sum;
    this.vop_1 = openid;
    this.wop_1 = objectType;
    this.xop_1 = account;
    this.yop_1 = member;
  }
  protoOf(XapiGroup).yon = function () {
    return this.top_1;
  };
  protoOf(XapiGroup).zon = function () {
    return this.uop_1;
  };
  protoOf(XapiGroup).aoo = function () {
    return this.vop_1;
  };
  protoOf(XapiGroup).noo = function () {
    return this.wop_1;
  };
  protoOf(XapiGroup).boo = function () {
    return this.xop_1;
  };
  protoOf(XapiGroup).toString = function () {
    return 'XapiGroup(name=' + this.sop_1 + ', mbox=' + this.top_1 + ', mbox_sha1sum=' + this.uop_1 + ', openid=' + this.vop_1 + ', objectType=' + this.wop_1 + ', account=' + this.xop_1 + ', member=' + this.yop_1 + ')';
  };
  protoOf(XapiGroup).hashCode = function () {
    var result = this.sop_1 == null ? 0 : getStringHashCode(this.sop_1);
    result = imul(result, 31) + (this.top_1 == null ? 0 : getStringHashCode(this.top_1)) | 0;
    result = imul(result, 31) + (this.uop_1 == null ? 0 : getStringHashCode(this.uop_1)) | 0;
    result = imul(result, 31) + (this.vop_1 == null ? 0 : getStringHashCode(this.vop_1)) | 0;
    result = imul(result, 31) + (this.wop_1 == null ? 0 : this.wop_1.hashCode()) | 0;
    result = imul(result, 31) + (this.xop_1 == null ? 0 : this.xop_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.yop_1) | 0;
    return result;
  };
  protoOf(XapiGroup).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroup))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroup ? other : THROW_CCE();
    if (!(this.sop_1 == tmp0_other_with_cast.sop_1))
      return false;
    if (!(this.top_1 == tmp0_other_with_cast.top_1))
      return false;
    if (!(this.uop_1 == tmp0_other_with_cast.uop_1))
      return false;
    if (!(this.vop_1 == tmp0_other_with_cast.vop_1))
      return false;
    if (!equals(this.wop_1, tmp0_other_with_cast.wop_1))
      return false;
    if (!equals(this.xop_1, tmp0_other_with_cast.xop_1))
      return false;
    if (!equals(this.yop_1, tmp0_other_with_cast.yop_1))
      return false;
    return true;
  };
  function toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var modTime = systemTimeInMillis();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.yop_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$0 = to(identifierHash(item, stringHasher), toActorEntity(item, stringHasher, knownActorUidToPersonUidMap));
      destination.i1(tmp$ret$0);
    }
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = toGroupEntities$lambda;
    var tmp$ret$3 = new sam$kotlin_Comparator$0_0(tmp);
    var memberActors = sortedWith(destination, tmp$ret$3);
    var hasher = hasherFactory.zop(new Long(0, 0));
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator_0 = memberActors.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      hasher.aoq(toByteArray(element.w6_1));
    }
    var memberHash = hasher.boq();
    var tmp_0;
    if (get_isAnonymous(_this__u8e3s4)) {
      tmp_0 = primaryKeyManager.s68(68);
    } else {
      tmp_0 = identifierHash(_this__u8e3s4, stringHasher);
    }
    var tmp2_actorUid = tmp_0;
    var tmp4_actorName = _this__u8e3s4.sop_1;
    var tmp5_actorMbox = _this__u8e3s4.top_1;
    var tmp6_actorMbox_sha1sum = _this__u8e3s4.uop_1;
    var tmp7_actorOpenid = _this__u8e3s4.vop_1;
    var tmp0_safe_receiver = _this__u8e3s4.xop_1;
    var tmp8_actorAccountName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wom_1;
    var tmp1_safe_receiver = _this__u8e3s4.xop_1;
    var tmp9_actorAccountHomePage = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vom_1;
    var groupActor = new ActorEntity(tmp2_actorUid, VOID, tmp4_actorName, tmp5_actorMbox, tmp6_actorMbox_sha1sum, tmp7_actorOpenid, tmp8_actorAccountName, tmp9_actorAccountHomePage, memberHash, modTime, 2);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_1 = memberActors.w();
    while (tmp0_iterator_1.f()) {
      var item_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$5 = item_0.x6_1;
      destination_0.i1(tmp$ret$5);
    }
    var tmp_1 = destination_0;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_2 = memberActors.w();
    while (tmp0_iterator_2.f()) {
      var item_1 = tmp0_iterator_2.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$8 = new GroupMemberActorJoin(groupActor.mik_1, item_1.x6_1.mik_1, modTime);
      destination_1.i1(tmp$ret$8);
    }
    return new ActorEntities(groupActor, tmp_1, destination_1);
  }
  function get_isAnonymous(_this__u8e3s4) {
    return (_this__u8e3s4.top_1 == null ? _this__u8e3s4.vop_1 == null : false) ? _this__u8e3s4.xop_1 == null : false;
  }
  function sam$kotlin_Comparator$0_0(function_0) {
    this.coq_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_0).pa = function (a, b) {
    return this.coq_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function toGroupEntities$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp = a.w6_1;
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp$ret$1 = b.w6_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function _get_$cachedSerializer__te6jhj_0($this) {
    return $this.doq_1.t2();
  }
  function XapiInteractionType$Companion$_anonymous__3zafad() {
    return XapiInteractionTypeSerializer_instance;
  }
  var XapiInteractionType_TrueFalse_instance;
  var XapiInteractionType_Choice_instance;
  var XapiInteractionType_FillIn_instance;
  var XapiInteractionType_LongFillIn_instance;
  var XapiInteractionType_Matching_instance;
  var XapiInteractionType_Performance_instance;
  var XapiInteractionType_Sequencing_instance;
  var XapiInteractionType_Likert_instance;
  var XapiInteractionType_Numeric_instance;
  var XapiInteractionType_Other_instance;
  function Companion_64() {
    Companion_instance_112 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.doq_1 = lazy(tmp_0, XapiInteractionType$Companion$_anonymous__3zafad);
  }
  protoOf(Companion_64).eoq = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = get_entries_0().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.Companion.fromJsonFieldValue.<anonymous>' call
        if (element.won_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? XapiInteractionType_Other_getInstance() : tmp0_elvis_lhs;
  };
  protoOf(Companion_64).s4x = function () {
    return _get_$cachedSerializer__te6jhj_0(this);
  };
  protoOf(Companion_64).a4n = function (typeParamsSerializers) {
    return this.s4x();
  };
  var Companion_instance_112;
  function Companion_getInstance_82() {
    XapiInteractionType_initEntries();
    if (Companion_instance_112 == null)
      new Companion_64();
    return Companion_instance_112;
  }
  function values_1() {
    return [XapiInteractionType_TrueFalse_getInstance(), XapiInteractionType_Choice_getInstance(), XapiInteractionType_FillIn_getInstance(), XapiInteractionType_LongFillIn_getInstance(), XapiInteractionType_Matching_getInstance(), XapiInteractionType_Performance_getInstance(), XapiInteractionType_Sequencing_getInstance(), XapiInteractionType_Likert_getInstance(), XapiInteractionType_Numeric_getInstance(), XapiInteractionType_Other_getInstance()];
  }
  function get_entries_0() {
    if ($ENTRIES_0 == null)
      $ENTRIES_0 = enumEntries(values_1());
    return $ENTRIES_0;
  }
  var XapiInteractionType_entriesInitialized;
  function XapiInteractionType_initEntries() {
    if (XapiInteractionType_entriesInitialized)
      return Unit_instance;
    XapiInteractionType_entriesInitialized = true;
    XapiInteractionType_TrueFalse_instance = new XapiInteractionType('TrueFalse', 0, 'true-false', 1);
    XapiInteractionType_Choice_instance = new XapiInteractionType('Choice', 1, 'choice', 2);
    XapiInteractionType_FillIn_instance = new XapiInteractionType('FillIn', 2, 'fill-in', 3);
    XapiInteractionType_LongFillIn_instance = new XapiInteractionType('LongFillIn', 3, 'long-fill-in', 4);
    XapiInteractionType_Matching_instance = new XapiInteractionType('Matching', 4, 'matching', 5);
    XapiInteractionType_Performance_instance = new XapiInteractionType('Performance', 5, 'performance', 6);
    XapiInteractionType_Sequencing_instance = new XapiInteractionType('Sequencing', 6, 'sequencing', 7);
    XapiInteractionType_Likert_instance = new XapiInteractionType('Likert', 7, 'likert', 8);
    XapiInteractionType_Numeric_instance = new XapiInteractionType('Numeric', 8, 'numeric', 9);
    XapiInteractionType_Other_instance = new XapiInteractionType('Other', 9, 'other', 10);
    Companion_getInstance_82();
  }
  var $ENTRIES_0;
  function XapiInteractionType(name, ordinal, jsonFieldValue, dbFlag) {
    Enum.call(this, name, ordinal);
    this.won_1 = jsonFieldValue;
    this.xon_1 = dbFlag;
  }
  function XapiInteractionTypeSerializer() {
  }
  protoOf(XapiInteractionTypeSerializer).v4a = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).v4a();
  };
  protoOf(XapiInteractionTypeSerializer).x4a = function (decoder) {
    return Companion_getInstance_82().eoq(decoder.i4e());
  };
  protoOf(XapiInteractionTypeSerializer).foq = function (encoder, value) {
    encoder.q4f(value.won_1);
  };
  protoOf(XapiInteractionTypeSerializer).w4a = function (encoder, value) {
    return this.foq(encoder, value instanceof XapiInteractionType ? value : THROW_CCE());
  };
  var XapiInteractionTypeSerializer_instance;
  function XapiInteractionTypeSerializer_getInstance() {
    return XapiInteractionTypeSerializer_instance;
  }
  function XapiInteractionType_TrueFalse_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_TrueFalse_instance;
  }
  function XapiInteractionType_Choice_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Choice_instance;
  }
  function XapiInteractionType_FillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_FillIn_instance;
  }
  function XapiInteractionType_LongFillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_LongFillIn_instance;
  }
  function XapiInteractionType_Matching_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Matching_instance;
  }
  function XapiInteractionType_Performance_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Performance_instance;
  }
  function XapiInteractionType_Sequencing_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Sequencing_instance;
  }
  function XapiInteractionType_Likert_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Likert_instance;
  }
  function XapiInteractionType_Numeric_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Numeric_instance;
  }
  function XapiInteractionType_Other_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Other_instance;
  }
  function _get_$cachedSerializer__te6jhj_1($this) {
    return $this.goq_1.t2();
  }
  function XapiObjectType$Companion$_anonymous__v4av7w() {
    return XapiObjectTypeSerializer_instance;
  }
  var XapiObjectType_StatementRef_instance;
  var XapiObjectType_SubStatement_instance;
  var XapiObjectType_Activity_instance;
  var XapiObjectType_Agent_instance;
  var XapiObjectType_Group_instance;
  var XapiObjectType_Statement_instance;
  function Companion_65() {
    Companion_instance_113 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.goq_1 = lazy(tmp_0, XapiObjectType$Companion$_anonymous__v4av7w);
  }
  protoOf(Companion_65).s4x = function () {
    return _get_$cachedSerializer__te6jhj_1(this);
  };
  protoOf(Companion_65).a4n = function (typeParamsSerializers) {
    return this.s4x();
  };
  var Companion_instance_113;
  function Companion_getInstance_83() {
    XapiObjectType_initEntries();
    if (Companion_instance_113 == null)
      new Companion_65();
    return Companion_instance_113;
  }
  function valueOf(value) {
    switch (value) {
      case 'StatementRef':
        return XapiObjectType_StatementRef_getInstance();
      case 'SubStatement':
        return XapiObjectType_SubStatement_getInstance();
      case 'Activity':
        return XapiObjectType_Activity_getInstance();
      case 'Agent':
        return XapiObjectType_Agent_getInstance();
      case 'Group':
        return XapiObjectType_Group_getInstance();
      case 'Statement':
        return XapiObjectType_Statement_getInstance();
      default:
        XapiObjectType_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  var XapiObjectType_entriesInitialized;
  function XapiObjectType_initEntries() {
    if (XapiObjectType_entriesInitialized)
      return Unit_instance;
    XapiObjectType_entriesInitialized = true;
    XapiObjectType_StatementRef_instance = new XapiObjectType('StatementRef', 0);
    XapiObjectType_SubStatement_instance = new XapiObjectType('SubStatement', 1);
    XapiObjectType_Activity_instance = new XapiObjectType('Activity', 2);
    XapiObjectType_Agent_instance = new XapiObjectType('Agent', 3);
    XapiObjectType_Group_instance = new XapiObjectType('Group', 4);
    XapiObjectType_Statement_instance = new XapiObjectType('Statement', 5);
    Companion_getInstance_83();
  }
  function XapiObjectType(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function XapiObjectTypeSerializer() {
  }
  protoOf(XapiObjectTypeSerializer).v4a = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).v4a();
  };
  protoOf(XapiObjectTypeSerializer).x4a = function (decoder) {
    var strValue = decoder.i4e();
    return valueOf(strValue);
  };
  protoOf(XapiObjectTypeSerializer).hoq = function (encoder, value) {
    encoder.q4f(value.toString());
  };
  protoOf(XapiObjectTypeSerializer).w4a = function (encoder, value) {
    return this.hoq(encoder, value instanceof XapiObjectType ? value : THROW_CCE());
  };
  var XapiObjectTypeSerializer_instance;
  function XapiObjectTypeSerializer_getInstance() {
    return XapiObjectTypeSerializer_instance;
  }
  function get_typeFlag(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 0:
        tmp = 3;
        break;
      case 1:
        tmp = 4;
        break;
      case 2:
        tmp = 5;
        break;
      case 3:
        tmp = 1;
        break;
      case 4:
        tmp = 2;
        break;
      case 5:
        tmp = 6;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function XapiObjectType_StatementRef_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_StatementRef_instance;
  }
  function XapiObjectType_SubStatement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_SubStatement_instance;
  }
  function XapiObjectType_Activity_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Activity_instance;
  }
  function XapiObjectType_Agent_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Agent_instance;
  }
  function XapiObjectType_Group_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Group_instance;
  }
  function XapiObjectType_Statement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Statement_instance;
  }
  function Companion_66() {
  }
  var Companion_instance_114;
  function Companion_getInstance_84() {
    return Companion_instance_114;
  }
  function $serializer_46() {
    $serializer_instance_46 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult.Score', this, 4);
    tmp0_serialDesc.y4l('scaled', true);
    tmp0_serialDesc.y4l('raw', true);
    tmp0_serialDesc.y4l('min', true);
    tmp0_serialDesc.y4l('max', true);
    this.ioq_1 = tmp0_serialDesc;
  }
  protoOf($serializer_46).v4a = function () {
    return this.ioq_1;
  };
  protoOf($serializer_46).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance())];
  };
  protoOf($serializer_46).x4a = function (decoder) {
    var tmp0_desc = this.ioq_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.n4e(tmp0_desc);
    if (tmp8_input.c4f()) {
      tmp4_local0 = tmp8_input.b4f(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.b4f(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.b4f(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.b4f(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.b4f(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.b4f(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.o4e(tmp0_desc);
    return Score_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_46).joq = function (encoder, value) {
    var tmp0_desc = this.ioq_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.koq_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, FloatSerializer_getInstance(), value.koq_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.loq_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, FloatSerializer_getInstance(), value.loq_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.moq_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, FloatSerializer_getInstance(), value.moq_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.noq_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, FloatSerializer_getInstance(), value.noq_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_46).w4a = function (encoder, value) {
    return this.joq(encoder, value instanceof Score ? value : THROW_CCE());
  };
  var $serializer_instance_46;
  function $serializer_getInstance_58() {
    if ($serializer_instance_46 == null)
      new $serializer_46();
    return $serializer_instance_46;
  }
  function Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_58().ioq_1);
    }
    if (0 === (seen1 & 1))
      $this.koq_1 = null;
    else
      $this.koq_1 = scaled;
    if (0 === (seen1 & 2))
      $this.loq_1 = null;
    else
      $this.loq_1 = raw;
    if (0 === (seen1 & 4))
      $this.moq_1 = null;
    else
      $this.moq_1 = min;
    if (0 === (seen1 & 8))
      $this.noq_1 = null;
    else
      $this.noq_1 = max;
    return $this;
  }
  function Score_init_$Create$(seen1, scaled, raw, min, max, serializationConstructorMarker) {
    return Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, objectCreate(protoOf(Score)));
  }
  function Score(scaled, raw, min, max) {
    scaled = scaled === VOID ? null : scaled;
    raw = raw === VOID ? null : raw;
    min = min === VOID ? null : min;
    max = max === VOID ? null : max;
    this.koq_1 = scaled;
    this.loq_1 = raw;
    this.moq_1 = min;
    this.noq_1 = max;
  }
  protoOf(Score).toString = function () {
    return 'Score(scaled=' + this.koq_1 + ', raw=' + this.loq_1 + ', min=' + this.moq_1 + ', max=' + this.noq_1 + ')';
  };
  protoOf(Score).hashCode = function () {
    var result = this.koq_1 == null ? 0 : getNumberHashCode(this.koq_1);
    result = imul(result, 31) + (this.loq_1 == null ? 0 : getNumberHashCode(this.loq_1)) | 0;
    result = imul(result, 31) + (this.moq_1 == null ? 0 : getNumberHashCode(this.moq_1)) | 0;
    result = imul(result, 31) + (this.noq_1 == null ? 0 : getNumberHashCode(this.noq_1)) | 0;
    return result;
  };
  protoOf(Score).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Score))
      return false;
    var tmp0_other_with_cast = other instanceof Score ? other : THROW_CCE();
    if (!equals(this.koq_1, tmp0_other_with_cast.koq_1))
      return false;
    if (!equals(this.loq_1, tmp0_other_with_cast.loq_1))
      return false;
    if (!equals(this.moq_1, tmp0_other_with_cast.moq_1))
      return false;
    if (!equals(this.noq_1, tmp0_other_with_cast.noq_1))
      return false;
    return true;
  };
  function Companion_67() {
    Companion_instance_115 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ooq_1 = [null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_115;
  function Companion_getInstance_85() {
    if (Companion_instance_115 == null)
      new Companion_67();
    return Companion_instance_115;
  }
  function $serializer_47() {
    $serializer_instance_47 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult', this, 6);
    tmp0_serialDesc.y4l('completion', true);
    tmp0_serialDesc.y4l('success', true);
    tmp0_serialDesc.y4l('score', true);
    tmp0_serialDesc.y4l('duration', true);
    tmp0_serialDesc.y4l('response', true);
    tmp0_serialDesc.y4l('extensions', true);
    this.poq_1 = tmp0_serialDesc;
  }
  protoOf($serializer_47).v4a = function () {
    return this.poq_1;
  };
  protoOf($serializer_47).p4m = function () {
    var tmp0_cached = Companion_getInstance_85().ooq_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_58()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[5])];
  };
  protoOf($serializer_47).x4a = function (decoder) {
    var tmp0_desc = this.poq_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.n4e(tmp0_desc);
    var tmp11_cached = Companion_getInstance_85().ooq_1;
    if (tmp10_input.c4f()) {
      tmp4_local0 = tmp10_input.b4f(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.b4f(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.b4f(tmp0_desc, 2, $serializer_getInstance_58(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.b4f(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.b4f(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.b4f(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.b4f(tmp0_desc, 2, $serializer_getInstance_58(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.b4f(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.o4e(tmp0_desc);
    return XapiResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_47).qoq = function (encoder, value) {
    var tmp0_desc = this.poq_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_85().ooq_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.eom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, BooleanSerializer_getInstance(), value.eom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.fom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, BooleanSerializer_getInstance(), value.fom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.gom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, $serializer_getInstance_58(), value.gom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.hom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, StringSerializer_getInstance(), value.hom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.iom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, StringSerializer_getInstance(), value.iom_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.jom_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, tmp2_cached[5], value.jom_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_47).w4a = function (encoder, value) {
    return this.qoq(encoder, value instanceof XapiResult ? value : THROW_CCE());
  };
  var $serializer_instance_47;
  function $serializer_getInstance_59() {
    if ($serializer_instance_47 == null)
      new $serializer_47();
    return $serializer_instance_47;
  }
  function XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_59().poq_1);
    }
    if (0 === (seen1 & 1))
      $this.eom_1 = null;
    else
      $this.eom_1 = completion;
    if (0 === (seen1 & 2))
      $this.fom_1 = null;
    else
      $this.fom_1 = success;
    if (0 === (seen1 & 4))
      $this.gom_1 = null;
    else
      $this.gom_1 = score;
    if (0 === (seen1 & 8))
      $this.hom_1 = null;
    else
      $this.hom_1 = duration;
    if (0 === (seen1 & 16))
      $this.iom_1 = null;
    else
      $this.iom_1 = response;
    if (0 === (seen1 & 32))
      $this.jom_1 = null;
    else
      $this.jom_1 = extensions;
    return $this;
  }
  function XapiResult_init_$Create$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker) {
    return XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiResult)));
  }
  function XapiResult(completion, success, score, duration, response, extensions) {
    Companion_getInstance_85();
    completion = completion === VOID ? null : completion;
    success = success === VOID ? null : success;
    score = score === VOID ? null : score;
    duration = duration === VOID ? null : duration;
    response = response === VOID ? null : response;
    extensions = extensions === VOID ? null : extensions;
    this.eom_1 = completion;
    this.fom_1 = success;
    this.gom_1 = score;
    this.hom_1 = duration;
    this.iom_1 = response;
    this.jom_1 = extensions;
  }
  protoOf(XapiResult).toString = function () {
    return 'XapiResult(completion=' + this.eom_1 + ', success=' + this.fom_1 + ', score=' + this.gom_1 + ', duration=' + this.hom_1 + ', response=' + this.iom_1 + ', extensions=' + this.jom_1 + ')';
  };
  protoOf(XapiResult).hashCode = function () {
    var result = this.eom_1 == null ? 0 : getBooleanHashCode(this.eom_1);
    result = imul(result, 31) + (this.fom_1 == null ? 0 : getBooleanHashCode(this.fom_1)) | 0;
    result = imul(result, 31) + (this.gom_1 == null ? 0 : this.gom_1.hashCode()) | 0;
    result = imul(result, 31) + (this.hom_1 == null ? 0 : getStringHashCode(this.hom_1)) | 0;
    result = imul(result, 31) + (this.iom_1 == null ? 0 : getStringHashCode(this.iom_1)) | 0;
    result = imul(result, 31) + (this.jom_1 == null ? 0 : hashCode(this.jom_1)) | 0;
    return result;
  };
  protoOf(XapiResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiResult))
      return false;
    var tmp0_other_with_cast = other instanceof XapiResult ? other : THROW_CCE();
    if (!(this.eom_1 == tmp0_other_with_cast.eom_1))
      return false;
    if (!(this.fom_1 == tmp0_other_with_cast.fom_1))
      return false;
    if (!equals(this.gom_1, tmp0_other_with_cast.gom_1))
      return false;
    if (!(this.hom_1 == tmp0_other_with_cast.hom_1))
      return false;
    if (!(this.iom_1 == tmp0_other_with_cast.iom_1))
      return false;
    if (!equals(this.jom_1, tmp0_other_with_cast.jom_1))
      return false;
    return true;
  };
  function get_XAPI_PROGRESSED_EXTENSIONS() {
    _init_properties_XapiStatement_kt__raho1n();
    return XAPI_PROGRESSED_EXTENSIONS;
  }
  var XAPI_PROGRESSED_EXTENSIONS;
  function get_XAPI_RESULT_EXTENSION_PROGRESS() {
    return XAPI_RESULT_EXTENSION_PROGRESS;
  }
  var XAPI_RESULT_EXTENSION_PROGRESS;
  function Companion_68() {
    Companion_instance_116 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.aok_1 = [null, null, null, null, null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_50()), null];
  }
  protoOf(Companion_68).s4x = function () {
    return $serializer_getInstance_60();
  };
  var Companion_instance_116;
  function Companion_getInstance_86() {
    if (Companion_instance_116 == null)
      new Companion_68();
    return Companion_instance_116;
  }
  function $serializer_48() {
    $serializer_instance_48 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatement', this, 12);
    tmp0_serialDesc.y4l('id', true);
    tmp0_serialDesc.y4l('actor', false);
    tmp0_serialDesc.y4l('verb', false);
    tmp0_serialDesc.y4l('object', false);
    tmp0_serialDesc.y4l('result', true);
    tmp0_serialDesc.y4l('context', true);
    tmp0_serialDesc.y4l('timestamp', true);
    tmp0_serialDesc.y4l('stored', true);
    tmp0_serialDesc.y4l('authority', true);
    tmp0_serialDesc.y4l('version', true);
    tmp0_serialDesc.y4l('attachments', true);
    tmp0_serialDesc.y4l('objectType', true);
    this.roq_1 = tmp0_serialDesc;
  }
  protoOf($serializer_48).v4a = function () {
    return this.roq_1;
  };
  protoOf($serializer_48).p4m = function () {
    var tmp0_cached = Companion_getInstance_86().aok_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), XapiActorSerializer_getInstance(), $serializer_getInstance_63(), XapiStatementObjectSerializer_getInstance(), get_nullable($serializer_getInstance_59()), get_nullable($serializer_getInstance_55()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[10]), get_nullable(XapiObjectTypeSerializer_instance)];
  };
  protoOf($serializer_48).x4a = function (decoder) {
    var tmp0_desc = this.roq_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.n4e(tmp0_desc);
    var tmp17_cached = Companion_getInstance_86().aok_1;
    if (tmp16_input.c4f()) {
      tmp4_local0 = tmp16_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.z4e(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.z4e(tmp0_desc, 2, $serializer_getInstance_63(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.z4e(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.b4f(tmp0_desc, 4, $serializer_getInstance_59(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.b4f(tmp0_desc, 5, $serializer_getInstance_55(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.b4f(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.b4f(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.b4f(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.b4f(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.b4f(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.b4f(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.z4e(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.z4e(tmp0_desc, 2, $serializer_getInstance_63(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.z4e(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.b4f(tmp0_desc, 4, $serializer_getInstance_59(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.b4f(tmp0_desc, 5, $serializer_getInstance_55(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.b4f(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.b4f(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.b4f(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.b4f(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.b4f(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.b4f(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.o4e(tmp0_desc);
    return XapiStatement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_48).soq = function (encoder, value) {
    var tmp0_desc = this.roq_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_86().aok_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.noj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.noj_1);
    }
    tmp1_output.d4g(tmp0_desc, 1, XapiActorSerializer_getInstance(), value.ooj_1);
    tmp1_output.d4g(tmp0_desc, 2, $serializer_getInstance_63(), value.poj_1);
    tmp1_output.d4g(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), value.qoj_1);
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.roj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, $serializer_getInstance_59(), value.roj_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.soj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, $serializer_getInstance_55(), value.soj_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !(value.toj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 6, StringSerializer_getInstance(), value.toj_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 7) ? true : !(value.uoj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 7, StringSerializer_getInstance(), value.uoj_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 8) ? true : !(value.voj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 8, XapiActorSerializer_getInstance(), value.voj_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 9) ? true : !(value.woj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 9, StringSerializer_getInstance(), value.woj_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 10) ? true : !(value.xoj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 10, tmp2_cached[10], value.xoj_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 11) ? true : !(value.yoj_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 11, XapiObjectTypeSerializer_instance, value.yoj_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_48).w4a = function (encoder, value) {
    return this.soq(encoder, value instanceof XapiStatement ? value : THROW_CCE());
  };
  var $serializer_instance_48;
  function $serializer_getInstance_60() {
    if ($serializer_instance_48 == null)
      new $serializer_48();
    return $serializer_instance_48;
  }
  function XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, $this) {
    if (!(14 === (14 & seen1))) {
      throwMissingFieldException(seen1, 14, $serializer_getInstance_60().roq_1);
    }
    if (0 === (seen1 & 1))
      $this.noj_1 = null;
    else
      $this.noj_1 = id;
    $this.ooj_1 = actor;
    $this.poj_1 = verb;
    $this.qoj_1 = object;
    if (0 === (seen1 & 16))
      $this.roj_1 = null;
    else
      $this.roj_1 = result;
    if (0 === (seen1 & 32))
      $this.soj_1 = null;
    else
      $this.soj_1 = context;
    if (0 === (seen1 & 64))
      $this.toj_1 = null;
    else
      $this.toj_1 = timestamp;
    if (0 === (seen1 & 128))
      $this.uoj_1 = null;
    else
      $this.uoj_1 = stored;
    if (0 === (seen1 & 256))
      $this.voj_1 = null;
    else
      $this.voj_1 = authority;
    if (0 === (seen1 & 512))
      $this.woj_1 = null;
    else
      $this.woj_1 = version;
    if (0 === (seen1 & 1024))
      $this.xoj_1 = null;
    else
      $this.xoj_1 = attachments;
    if (0 === (seen1 & 2048))
      $this.yoj_1 = null;
    else
      $this.yoj_1 = objectType;
    return $this;
  }
  function XapiStatement_init_$Create$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker) {
    return XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, objectCreate(protoOf(XapiStatement)));
  }
  function XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    Companion_getInstance_86();
    id = id === VOID ? null : id;
    result = result === VOID ? null : result;
    context = context === VOID ? null : context;
    timestamp = timestamp === VOID ? null : timestamp;
    stored = stored === VOID ? null : stored;
    authority = authority === VOID ? null : authority;
    version = version === VOID ? null : version;
    attachments = attachments === VOID ? null : attachments;
    objectType = objectType === VOID ? null : objectType;
    this.noj_1 = id;
    this.ooj_1 = actor;
    this.poj_1 = verb;
    this.qoj_1 = object;
    this.roj_1 = result;
    this.soj_1 = context;
    this.toj_1 = timestamp;
    this.uoj_1 = stored;
    this.voj_1 = authority;
    this.woj_1 = version;
    this.xoj_1 = attachments;
    this.yoj_1 = objectType;
  }
  protoOf(XapiStatement).noo = function () {
    return this.yoj_1;
  };
  protoOf(XapiStatement).toq = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    return new XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).zoj = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, $super) {
    id = id === VOID ? this.noj_1 : id;
    actor = actor === VOID ? this.ooj_1 : actor;
    verb = verb === VOID ? this.poj_1 : verb;
    object = object === VOID ? this.qoj_1 : object;
    result = result === VOID ? this.roj_1 : result;
    context = context === VOID ? this.soj_1 : context;
    timestamp = timestamp === VOID ? this.toj_1 : timestamp;
    stored = stored === VOID ? this.uoj_1 : stored;
    authority = authority === VOID ? this.voj_1 : authority;
    version = version === VOID ? this.woj_1 : version;
    attachments = attachments === VOID ? this.xoj_1 : attachments;
    objectType = objectType === VOID ? this.yoj_1 : objectType;
    return $super === VOID ? this.toq(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) : $super.toq.call(this, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).toString = function () {
    return 'XapiStatement(id=' + this.noj_1 + ', actor=' + this.ooj_1 + ', verb=' + this.poj_1 + ', object=' + this.qoj_1 + ', result=' + this.roj_1 + ', context=' + this.soj_1 + ', timestamp=' + this.toj_1 + ', stored=' + this.uoj_1 + ', authority=' + this.voj_1 + ', version=' + this.woj_1 + ', attachments=' + this.xoj_1 + ', objectType=' + this.yoj_1 + ')';
  };
  protoOf(XapiStatement).hashCode = function () {
    var result = this.noj_1 == null ? 0 : getStringHashCode(this.noj_1);
    result = imul(result, 31) + hashCode(this.ooj_1) | 0;
    result = imul(result, 31) + this.poj_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.qoj_1) | 0;
    result = imul(result, 31) + (this.roj_1 == null ? 0 : this.roj_1.hashCode()) | 0;
    result = imul(result, 31) + (this.soj_1 == null ? 0 : this.soj_1.hashCode()) | 0;
    result = imul(result, 31) + (this.toj_1 == null ? 0 : getStringHashCode(this.toj_1)) | 0;
    result = imul(result, 31) + (this.uoj_1 == null ? 0 : getStringHashCode(this.uoj_1)) | 0;
    result = imul(result, 31) + (this.voj_1 == null ? 0 : hashCode(this.voj_1)) | 0;
    result = imul(result, 31) + (this.woj_1 == null ? 0 : getStringHashCode(this.woj_1)) | 0;
    result = imul(result, 31) + (this.xoj_1 == null ? 0 : hashCode(this.xoj_1)) | 0;
    result = imul(result, 31) + (this.yoj_1 == null ? 0 : this.yoj_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiStatement).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatement))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatement ? other : THROW_CCE();
    if (!(this.noj_1 == tmp0_other_with_cast.noj_1))
      return false;
    if (!equals(this.ooj_1, tmp0_other_with_cast.ooj_1))
      return false;
    if (!this.poj_1.equals(tmp0_other_with_cast.poj_1))
      return false;
    if (!equals(this.qoj_1, tmp0_other_with_cast.qoj_1))
      return false;
    if (!equals(this.roj_1, tmp0_other_with_cast.roj_1))
      return false;
    if (!equals(this.soj_1, tmp0_other_with_cast.soj_1))
      return false;
    if (!(this.toj_1 == tmp0_other_with_cast.toj_1))
      return false;
    if (!(this.uoj_1 == tmp0_other_with_cast.uoj_1))
      return false;
    if (!equals(this.voj_1, tmp0_other_with_cast.voj_1))
      return false;
    if (!(this.woj_1 == tmp0_other_with_cast.woj_1))
      return false;
    if (!equals(this.xoj_1, tmp0_other_with_cast.xoj_1))
      return false;
    if (!equals(this.yoj_1, tmp0_other_with_cast.yoj_1))
      return false;
    return true;
  };
  function StatementEntities(statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities) {
    statementEntity = statementEntity === VOID ? null : statementEntity;
    statementEntityJson = statementEntityJson === VOID ? null : statementEntityJson;
    actorEntities = actorEntities === VOID ? null : actorEntities;
    verbEntities = verbEntities === VOID ? null : verbEntities;
    activityEntities = activityEntities === VOID ? null : activityEntities;
    this.doj_1 = statementEntity;
    this.eoj_1 = statementEntityJson;
    this.foj_1 = actorEntities;
    this.goj_1 = verbEntities;
    this.hoj_1 = activityEntities;
  }
  protoOf(StatementEntities).toString = function () {
    return 'StatementEntities(statementEntity=' + this.doj_1 + ', statementEntityJson=' + this.eoj_1 + ', actorEntities=' + this.foj_1 + ', verbEntities=' + this.goj_1 + ', activityEntities=' + this.hoj_1 + ')';
  };
  protoOf(StatementEntities).hashCode = function () {
    var result = this.doj_1 == null ? 0 : this.doj_1.hashCode();
    result = imul(result, 31) + (this.eoj_1 == null ? 0 : this.eoj_1.hashCode()) | 0;
    result = imul(result, 31) + (this.foj_1 == null ? 0 : hashCode(this.foj_1)) | 0;
    result = imul(result, 31) + (this.goj_1 == null ? 0 : this.goj_1.hashCode()) | 0;
    result = imul(result, 31) + (this.hoj_1 == null ? 0 : hashCode(this.hoj_1)) | 0;
    return result;
  };
  protoOf(StatementEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementEntities))
      return false;
    var tmp0_other_with_cast = other instanceof StatementEntities ? other : THROW_CCE();
    if (!equals(this.doj_1, tmp0_other_with_cast.doj_1))
      return false;
    if (!equals(this.eoj_1, tmp0_other_with_cast.eoj_1))
      return false;
    if (!equals(this.foj_1, tmp0_other_with_cast.foj_1))
      return false;
    if (!equals(this.goj_1, tmp0_other_with_cast.goj_1))
      return false;
    if (!equals(this.hoj_1, tmp0_other_with_cast.hoj_1))
      return false;
    return true;
  };
  function toEntities_3(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, exactJson, isSubStatement, endpoint) {
    isSubStatement = isSubStatement === VOID ? false : isSubStatement;
    _init_properties_XapiStatement_kt__raho1n();
    var tmp0_safe_receiver = _this__u8e3s4.noj_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp = uuidFrom(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('id is null');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var statementUuid = tmp_0;
    var tmp_1;
    if (isSubStatement) {
      var tmp_2 = _this__u8e3s4.qoj_1;
      tmp_1 = tmp_2 instanceof XapiStatement;
    } else {
      tmp_1 = false;
    }
    if (tmp_1)
      throw new XapiException(400, 'SubStatement cannot have another nested subs== XapiObjectType.SubStatementtatement');
    var tmp2_safe_receiver = _this__u8e3s4.soj_1;
    var contextRegistration = xapiRequireValidUuidOrNull(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.soo_1, 'Invalid context registration uuid');
    var statementActorEntities = toEntities_0(_this__u8e3s4.ooj_1, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp3_safe_receiver = _this__u8e3s4.voj_1;
    var authorityActor = tmp3_safe_receiver == null ? null : toEntities_0(tmp3_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp4_safe_receiver = _this__u8e3s4.soj_1;
    var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.roo_1;
    var contextInstructorActorEntities = tmp5_safe_receiver == null ? null : toEntities_0(tmp5_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var statementObjectForeignKeys = objectForeignKeys(_this__u8e3s4.qoj_1, stringHasher, statementUuid);
    var tmp34_statementIdHi = statementUuid.kle();
    var tmp35_statementIdLo = statementUuid.lle();
    var tmp_3;
    var tmp_4;
    var tmp6_safe_receiver = _this__u8e3s4.ooj_1.boo();
    if ((tmp6_safe_receiver == null ? null : tmp6_safe_receiver.vom_1) === endpoint.hmr_1) {
      var tmp7_safe_receiver = _this__u8e3s4.ooj_1.boo();
      tmp_4 = (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.wom_1) === xapiSession.cj4_1;
    } else {
      tmp_4 = false;
    }
    if (tmp_4) {
      tmp_3 = xapiSession.aj4_1;
    } else {
      tmp_3 = new Long(0, 0);
    }
    var tmp36_statementActorPersonUid = tmp_3;
    var tmp37_statementActorUid = statementActorEntities.ioj_1.mik_1;
    var tmp9_safe_receiver = authorityActor == null ? null : authorityActor.ioj_1;
    var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.mik_1;
    var tmp38_authorityActorUid = tmp10_elvis_lhs == null ? new Long(0, 0) : tmp10_elvis_lhs;
    var tmp39_statementVerbUid = stringHasher.ton(xapiRequireValidIRI(_this__u8e3s4.poj_1.uoq_1, 'Statement ' + statementUuid + ' VerbID ' + _this__u8e3s4.poj_1.uoq_1 + ' is not a valid IRI'));
    var tmp11_safe_receiver = _this__u8e3s4.roj_1;
    var tmp40_resultCompletion = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.eom_1;
    var tmp12_safe_receiver = _this__u8e3s4.roj_1;
    var tmp41_resultSuccess = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.fom_1;
    var tmp13_safe_receiver = _this__u8e3s4.roj_1;
    var tmp14_safe_receiver = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.gom_1;
    var tmp42_resultScoreScaled = tmp14_safe_receiver == null ? null : tmp14_safe_receiver.koq_1;
    var tmp15_safe_receiver = _this__u8e3s4.roj_1;
    var tmp16_safe_receiver = tmp15_safe_receiver == null ? null : tmp15_safe_receiver.gom_1;
    var tmp43_resultScoreRaw = tmp16_safe_receiver == null ? null : tmp16_safe_receiver.loq_1;
    var tmp17_safe_receiver = _this__u8e3s4.roj_1;
    var tmp18_safe_receiver = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.gom_1;
    var tmp44_resultScoreMin = tmp18_safe_receiver == null ? null : tmp18_safe_receiver.moq_1;
    var tmp19_safe_receiver = _this__u8e3s4.roj_1;
    var tmp20_safe_receiver = tmp19_safe_receiver == null ? null : tmp19_safe_receiver.gom_1;
    var tmp45_resultScoreMax = tmp20_safe_receiver == null ? null : tmp20_safe_receiver.noq_1;
    var tmp21_safe_receiver = _this__u8e3s4.roj_1;
    var tmp46_resultDuration = xapiRequireDurationOrNullAsLong(tmp21_safe_receiver == null ? null : tmp21_safe_receiver.hom_1);
    var tmp22_safe_receiver = _this__u8e3s4.roj_1;
    var tmp47_resultResponse = tmp22_safe_receiver == null ? null : tmp22_safe_receiver.iom_1;
    var tmp23_safe_receiver = _this__u8e3s4.toj_1;
    var tmp_5;
    if (tmp23_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp_5 = xapiRequireTimestampAsLong(tmp23_safe_receiver);
    }
    var tmp24_elvis_lhs = tmp_5;
    var tmp48_timestamp = tmp24_elvis_lhs == null ? systemTimeInMillis() : tmp24_elvis_lhs;
    var tmp49_stored = systemTimeInMillis();
    var tmp26_elvis_lhs = contextRegistration == null ? null : contextRegistration.kle();
    var tmp50_contextRegistrationHi = tmp26_elvis_lhs == null ? new Long(0, 0) : tmp26_elvis_lhs;
    var tmp28_elvis_lhs = contextRegistration == null ? null : contextRegistration.lle();
    var tmp51_contextRegistrationLo = tmp28_elvis_lhs == null ? new Long(0, 0) : tmp28_elvis_lhs;
    var tmp29_safe_receiver = _this__u8e3s4.soj_1;
    var tmp52_contextPlatform = tmp29_safe_receiver == null ? null : tmp29_safe_receiver.uoo_1;
    var tmp31_safe_receiver = contextInstructorActorEntities == null ? null : contextInstructorActorEntities.ioj_1;
    var tmp32_elvis_lhs = tmp31_safe_receiver == null ? null : tmp31_safe_receiver.mik_1;
    var tmp53_contextInstructorActorUid = tmp32_elvis_lhs == null ? new Long(0, 0) : tmp32_elvis_lhs;
    var tmp54_statementContentEntryUid = xapiSession.fj4_1;
    var tmp55_statementClazzUid = xapiSession.dj4_1;
    var tmp56_statementCbUid = xapiSession.ej4_1;
    var tmp_6;
    if (isCompletionOrProgress(_this__u8e3s4)) {
      var tmp_7;
      if (xapiSession.fj4_1.equals(new Long(0, 0))) {
        tmp_7 = true;
      } else {
        var tmp_8 = _this__u8e3s4.qoj_1;
        var tmp33_safe_receiver = tmp_8 instanceof XapiActivityStatementObject ? tmp_8 : null;
        tmp_7 = (tmp33_safe_receiver == null ? null : tmp33_safe_receiver.oop_1) === xapiSession.hj4_1;
      }
      tmp_6 = tmp_7;
    } else {
      tmp_6 = false;
    }
    var tmp57_completionOrProgress = tmp_6;
    var tmp58_extensionProgress = get_resultProgressExtension(_this__u8e3s4);
    var tmp59_statementObjectType = get_objectTypeFlag(_this__u8e3s4.qoj_1);
    var tmp60_statementObjectUid1 = statementObjectForeignKeys.w6_1;
    var tmp61_statementObjectUid2 = statementObjectForeignKeys.x6_1;
    var tmp_9 = new StatementEntity(tmp34_statementIdHi, tmp35_statementIdLo, tmp36_statementActorPersonUid, tmp39_statementVerbUid, tmp59_statementObjectType, tmp60_statementObjectUid1, tmp61_statementObjectUid2, tmp37_statementActorUid, tmp38_authorityActorUid, VOID, tmp40_resultCompletion, tmp41_resultSuccess, tmp42_resultScoreScaled, tmp43_resultScoreRaw, tmp44_resultScoreMin, tmp45_resultScoreMax, tmp46_resultDuration, tmp47_resultResponse, tmp48_timestamp, tmp49_stored, tmp50_contextRegistrationHi, tmp51_contextRegistrationLo, tmp52_contextPlatform, VOID, VOID, tmp53_contextInstructorActorUid, VOID, tmp58_extensionProgress, tmp57_completionOrProgress, tmp54_statementContentEntryUid, VOID, tmp55_statementClazzUid, tmp56_statementCbUid, VOID, isSubStatement);
    var tmp_10 = new StatementEntityJson(statementUuid.kle(), statementUuid.lle(), VOID, exactJson);
    // Inline function 'kotlin.collections.buildList' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildListInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = ArrayList_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
    this_0.i1(statementActorEntities);
    if (contextInstructorActorEntities == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>.<anonymous>' call
      this_0.i1(contextInstructorActorEntities);
    }
    var tmp_11 = this_0.f3();
    var tmp_12 = toVerbEntities(_this__u8e3s4.poj_1, stringHasher);
    var tmp62_safe_receiver = _this__u8e3s4.soj_1;
    var tmp63_safe_receiver = tmp62_safe_receiver == null ? null : tmp62_safe_receiver.yoo_1;
    return plus(listOf_0(new StatementEntities(tmp_9, tmp_10, tmp_11, tmp_12, toEmptyIfNull(tmp63_safe_receiver == null ? null : toEntities_1(tmp63_safe_receiver, stringHasher, json, statementUuid)))), objectToEntities(_this__u8e3s4.qoj_1, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, statementUuid, endpoint));
  }
  function isCompletionOrProgress(_this__u8e3s4) {
    _init_properties_XapiStatement_kt__raho1n();
    var tmp;
    var tmp0_safe_receiver = _this__u8e3s4.roj_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eom_1) == null)) {
      tmp = true;
    } else {
      tmp = !(get_resultProgressExtension(_this__u8e3s4) == null);
    }
    return tmp;
  }
  var properties_initialized_XapiStatement_kt_2xltj7;
  function _init_properties_XapiStatement_kt__raho1n() {
    if (!properties_initialized_XapiStatement_kt_2xltj7) {
      properties_initialized_XapiStatement_kt_2xltj7 = true;
      XAPI_PROGRESSED_EXTENSIONS = listOf(['https://w3id.org/xapi/cmi5/result/extensions/progress', 'http://w3id.org/xapi/cmi5/result/extensions/progress']);
    }
  }
  function XapiStatementObject() {
  }
  function XapiStatementObjectSerializer() {
    XapiStatementObjectSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiStatementObject));
  }
  protoOf(XapiStatementObjectSerializer).q4x = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).ba('objectType');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_0;
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      if (!(tmp1_safe_receiver instanceof JsonNull)) {
        tmp_0 = tmp1_safe_receiver;
      } else {
        tmp_0 = null;
      }
      tmp = tmp_0;
    }
    var tmp2_safe_receiver = tmp;
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.x3e();
    var tmp_1;
    if (tmp3_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      tmp_1 = valueOf(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp_1;
    var objectType = tmp4_elvis_lhs == null ? XapiObjectType_Activity_getInstance() : tmp4_elvis_lhs;
    var tmp_2;
    switch (objectType.za_1) {
      case 2:
        tmp_2 = Companion_instance_117.s4x();
        break;
      case 3:
        tmp_2 = Companion_instance_107.s4x();
        break;
      case 4:
        tmp_2 = Companion_getInstance_81().s4x();
        break;
      case 0:
        tmp_2 = Companion_instance_118.s4x();
        break;
      case 1:
        tmp_2 = Companion_getInstance_86().s4x();
        break;
      default:
        throw new XapiException(400, 'Statement object type invalid');
    }
    return tmp_2;
  };
  var XapiStatementObjectSerializer_instance;
  function XapiStatementObjectSerializer_getInstance() {
    if (XapiStatementObjectSerializer_instance == null)
      new XapiStatementObjectSerializer();
    return XapiStatementObjectSerializer_instance;
  }
  function Companion_69() {
  }
  protoOf(Companion_69).s4x = function () {
    return $serializer_getInstance_61();
  };
  var Companion_instance_117;
  function Companion_getInstance_87() {
    return Companion_instance_117;
  }
  function $serializer_49() {
    $serializer_instance_49 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivityStatementObject', this, 3);
    tmp0_serialDesc.y4l('objectType', true);
    tmp0_serialDesc.y4l('id', false);
    tmp0_serialDesc.y4l('definition', true);
    this.yoq_1 = tmp0_serialDesc;
  }
  protoOf($serializer_49).v4a = function () {
    return this.yoq_1;
  };
  protoOf($serializer_49).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiObjectTypeSerializer_instance), StringSerializer_getInstance(), get_nullable($serializer_getInstance_53())];
  };
  protoOf($serializer_49).x4a = function (decoder) {
    var tmp0_desc = this.yoq_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.n4e(tmp0_desc);
    if (tmp7_input.c4f()) {
      tmp4_local0 = tmp7_input.b4f(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.b4f(tmp0_desc, 2, $serializer_getInstance_53(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.b4f(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.b4f(tmp0_desc, 2, $serializer_getInstance_53(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.o4e(tmp0_desc);
    return XapiActivityStatementObject_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_49).zoq = function (encoder, value) {
    var tmp0_desc = this.yoq_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.nop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.nop_1);
    }
    tmp1_output.b4g(tmp0_desc, 1, value.oop_1);
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.pop_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, $serializer_getInstance_53(), value.pop_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_49).w4a = function (encoder, value) {
    return this.zoq(encoder, value instanceof XapiActivityStatementObject ? value : THROW_CCE());
  };
  var $serializer_instance_49;
  function $serializer_getInstance_61() {
    if ($serializer_instance_49 == null)
      new $serializer_49();
    return $serializer_instance_49;
  }
  function XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_61().yoq_1);
    }
    if (0 === (seen1 & 1))
      $this.nop_1 = null;
    else
      $this.nop_1 = objectType;
    $this.oop_1 = id;
    if (0 === (seen1 & 4))
      $this.pop_1 = null;
    else
      $this.pop_1 = definition;
    return $this;
  }
  function XapiActivityStatementObject_init_$Create$(seen1, objectType, id, definition, serializationConstructorMarker) {
    return XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, objectCreate(protoOf(XapiActivityStatementObject)));
  }
  function XapiActivityStatementObject(objectType, id, definition) {
    objectType = objectType === VOID ? null : objectType;
    definition = definition === VOID ? null : definition;
    this.nop_1 = objectType;
    this.oop_1 = id;
    this.pop_1 = definition;
  }
  protoOf(XapiActivityStatementObject).noo = function () {
    return this.nop_1;
  };
  protoOf(XapiActivityStatementObject).toString = function () {
    return 'XapiActivityStatementObject(objectType=' + this.nop_1 + ', id=' + this.oop_1 + ', definition=' + this.pop_1 + ')';
  };
  protoOf(XapiActivityStatementObject).hashCode = function () {
    var result = this.nop_1 == null ? 0 : this.nop_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.oop_1) | 0;
    result = imul(result, 31) + (this.pop_1 == null ? 0 : this.pop_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiActivityStatementObject).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivityStatementObject))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivityStatementObject ? other : THROW_CCE();
    if (!equals(this.nop_1, tmp0_other_with_cast.nop_1))
      return false;
    if (!(this.oop_1 === tmp0_other_with_cast.oop_1))
      return false;
    if (!equals(this.pop_1, tmp0_other_with_cast.pop_1))
      return false;
    return true;
  };
  function objectForeignKeys(_this__u8e3s4, stringHasher, statementUuid) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = new Pair(stringHasher.ton(_this__u8e3s4.oop_1), new Long(0, 0));
    } else {
      if (_this__u8e3s4 instanceof XapiAgent) {
        tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
      } else {
        if (_this__u8e3s4 instanceof XapiGroup) {
          tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
        } else {
          if (_this__u8e3s4 instanceof XapiStatementRef) {
            var uuid = uuidFrom(_this__u8e3s4.bor_1);
            tmp = new Pair(uuid.kle(), uuid.lle());
          } else {
            if (_this__u8e3s4 instanceof XapiStatement) {
              var tmp_0 = statementUuid.kle();
              // Inline function 'kotlin.Long.plus' call
              var tmp$ret$0 = statementUuid.lle().lc(toLong(1));
              tmp = new Pair(tmp_0, tmp$ret$0);
            } else {
              noWhenBranchMatchedException();
            }
          }
        }
      }
    }
    return tmp;
  }
  function objectToEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, parentStatementUuid, endpoint) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = listOf_0(new StatementEntities(VOID, VOID, VOID, VOID, listOf_0(toEntities(_this__u8e3s4.pop_1, _this__u8e3s4.oop_1, stringHasher, json))));
    } else {
      if (isInterface(_this__u8e3s4, XapiActor)) {
        tmp = listOf_0(new StatementEntities(VOID, VOID, listOf_0(toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap))));
      } else {
        if (_this__u8e3s4 instanceof XapiStatementRef) {
          tmp = emptyList();
        } else {
          if (_this__u8e3s4 instanceof XapiStatement) {
            var tmp_0 = parentStatementUuid.kle();
            // Inline function 'kotlin.Long.plus' call
            var tmp$ret$0 = parentStatementUuid.lle().lc(toLong(1));
            tmp = toEntities_3(_this__u8e3s4.zoj(Uuid_init_$Create$(tmp_0, tmp$ret$0).toString()), stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, null, true, endpoint);
          } else {
            throw IllegalStateException_init_$Create$('This cant really happen. The compiler does not recognize XapiActor as covering XapiGroup and XapiAgent, but it does.');
          }
        }
      }
    }
    return tmp;
  }
  function get_objectTypeFlag(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.noo();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_typeFlag(tmp0_safe_receiver);
    var tmp;
    if (tmp1_elvis_lhs == null) {
      tmp = 5;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    return tmp;
  }
  function Companion_70() {
  }
  protoOf(Companion_70).s4x = function () {
    return $serializer_getInstance_62();
  };
  var Companion_instance_118;
  function Companion_getInstance_88() {
    return Companion_instance_118;
  }
  function $serializer_50() {
    $serializer_instance_50 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatementRef', this, 2);
    tmp0_serialDesc.y4l('objectType', false);
    tmp0_serialDesc.y4l('id', false);
    this.cor_1 = tmp0_serialDesc;
  }
  protoOf($serializer_50).v4a = function () {
    return this.cor_1;
  };
  protoOf($serializer_50).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [XapiObjectTypeSerializer_instance, StringSerializer_getInstance()];
  };
  protoOf($serializer_50).x4a = function (decoder) {
    var tmp0_desc = this.cor_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.x4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return XapiStatementRef_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_50).dor = function (encoder, value) {
    var tmp0_desc = this.cor_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.d4g(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.aor_1);
    tmp1_output.b4g(tmp0_desc, 1, value.bor_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_50).w4a = function (encoder, value) {
    return this.dor(encoder, value instanceof XapiStatementRef ? value : THROW_CCE());
  };
  var $serializer_instance_50;
  function $serializer_getInstance_62() {
    if ($serializer_instance_50 == null)
      new $serializer_50();
    return $serializer_instance_50;
  }
  function XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_62().cor_1);
    }
    $this.aor_1 = objectType;
    $this.bor_1 = id;
    return $this;
  }
  function XapiStatementRef_init_$Create$(seen1, objectType, id, serializationConstructorMarker) {
    return XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, objectCreate(protoOf(XapiStatementRef)));
  }
  function XapiStatementRef() {
  }
  protoOf(XapiStatementRef).noo = function () {
    return this.aor_1;
  };
  protoOf(XapiStatementRef).toString = function () {
    return 'XapiStatementRef(objectType=' + this.aor_1 + ', id=' + this.bor_1 + ')';
  };
  protoOf(XapiStatementRef).hashCode = function () {
    var result = this.aor_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.bor_1) | 0;
    return result;
  };
  protoOf(XapiStatementRef).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatementRef))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatementRef ? other : THROW_CCE();
    if (!this.aor_1.equals(tmp0_other_with_cast.aor_1))
      return false;
    if (!(this.bor_1 === tmp0_other_with_cast.bor_1))
      return false;
    return true;
  };
  function Companion_71() {
    Companion_instance_119 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.eor_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_119;
  function Companion_getInstance_89() {
    if (Companion_instance_119 == null)
      new Companion_71();
    return Companion_instance_119;
  }
  function $serializer_51() {
    $serializer_instance_51 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiVerb', this, 2);
    tmp0_serialDesc.y4l('id', true);
    tmp0_serialDesc.y4l('display', true);
    this.for_1 = tmp0_serialDesc;
  }
  protoOf($serializer_51).v4a = function () {
    return this.for_1;
  };
  protoOf($serializer_51).p4m = function () {
    var tmp0_cached = Companion_getInstance_89().eor_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_51).x4a = function (decoder) {
    var tmp0_desc = this.for_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    var tmp7_cached = Companion_getInstance_89().eor_1;
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.b4f(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.b4f(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return XapiVerb_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_51).gor = function (encoder, value) {
    var tmp0_desc = this.for_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_89().eor_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.uoq_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, StringSerializer_getInstance(), value.uoq_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.voq_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, tmp2_cached[1], value.voq_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_51).w4a = function (encoder, value) {
    return this.gor(encoder, value instanceof XapiVerb ? value : THROW_CCE());
  };
  var $serializer_instance_51;
  function $serializer_getInstance_63() {
    if ($serializer_instance_51 == null)
      new $serializer_51();
    return $serializer_instance_51;
  }
  function XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_63().for_1);
    }
    if (0 === (seen1 & 1))
      $this.uoq_1 = null;
    else
      $this.uoq_1 = id;
    if (0 === (seen1 & 2))
      $this.voq_1 = null;
    else
      $this.voq_1 = display;
    return $this;
  }
  function XapiVerb_init_$Create$(seen1, id, display, serializationConstructorMarker) {
    return XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, objectCreate(protoOf(XapiVerb)));
  }
  function XapiVerb(id, display) {
    Companion_getInstance_89();
    id = id === VOID ? null : id;
    display = display === VOID ? null : display;
    this.uoq_1 = id;
    this.voq_1 = display;
  }
  protoOf(XapiVerb).toString = function () {
    return 'XapiVerb(id=' + this.uoq_1 + ', display=' + this.voq_1 + ')';
  };
  protoOf(XapiVerb).hashCode = function () {
    var result = this.uoq_1 == null ? 0 : getStringHashCode(this.uoq_1);
    result = imul(result, 31) + (this.voq_1 == null ? 0 : hashCode(this.voq_1)) | 0;
    return result;
  };
  protoOf(XapiVerb).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiVerb))
      return false;
    var tmp0_other_with_cast = other instanceof XapiVerb ? other : THROW_CCE();
    if (!(this.uoq_1 == tmp0_other_with_cast.uoq_1))
      return false;
    if (!equals(this.voq_1, tmp0_other_with_cast.voq_1))
      return false;
    return true;
  };
  function get_VERB_COMPLETED() {
    return VERB_COMPLETED;
  }
  var VERB_COMPLETED;
  function VerbEntities(verbEntity, verbLangMapEntries) {
    this.loj_1 = verbEntity;
    this.moj_1 = verbLangMapEntries;
  }
  protoOf(VerbEntities).toString = function () {
    return 'VerbEntities(verbEntity=' + this.loj_1 + ', verbLangMapEntries=' + this.moj_1 + ')';
  };
  protoOf(VerbEntities).hashCode = function () {
    var result = this.loj_1.hashCode();
    result = imul(result, 31) + hashCode(this.moj_1) | 0;
    return result;
  };
  protoOf(VerbEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VerbEntities))
      return false;
    var tmp0_other_with_cast = other instanceof VerbEntities ? other : THROW_CCE();
    if (!this.loj_1.equals(tmp0_other_with_cast.loj_1))
      return false;
    if (!equals(this.moj_1, tmp0_other_with_cast.moj_1))
      return false;
    return true;
  };
  function toVerbEntities(_this__u8e3s4, xxHasher) {
    var verbIri = xapiRequireValidIRI(_this__u8e3s4.uoq_1);
    var verbUid = xxHasher.ton(verbIri);
    var tmp = new VerbEntity(verbUid, _this__u8e3s4.uoq_1);
    var tmp0_safe_receiver = _this__u8e3s4.voq_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q2();
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toVerbEntities.<anonymous>' call
        var tmp0_vlmeLangHash = xxHasher.ton(item.s2());
        var tmp1_vlmeEntryString = item.t2();
        var tmp2_vlmeLangCode = item.s2();
        var tmp$ret$0 = new VerbLangMapEntry(verbUid, tmp0_vlmeLangHash, tmp2_vlmeLangCode, tmp1_vlmeEntryString);
        destination.i1(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp2_elvis_lhs = tmp_0;
    return new VerbEntities(tmp, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
  }
  function get_VERB_PROGRESSED() {
    return VERB_PROGRESSED;
  }
  var VERB_PROGRESSED;
  function createXapiStatement($this, totalDuration, progress, isComplete) {
    var tmp = agent($this.kor_1, $this.nor_1);
    var tmp_0;
    if (isComplete === true) {
      tmp_0 = get_VERB_COMPLETED();
    } else {
      tmp_0 = get_VERB_PROGRESSED();
    }
    var tmp_1 = new XapiVerb(tmp_0);
    var tmp_2 = $this.mor_1();
    // Inline function 'kotlin.time.Companion.milliseconds' call
    Companion_getInstance_8();
    var tmp$ret$0 = toDuration(totalDuration, DurationUnit_MILLISECONDS_getInstance());
    return new XapiStatement(VOID, tmp, tmp_1, tmp_2, new XapiResult(isComplete, VOID, VOID, Duration__toIsoString_impl_9h6wsm(tmp$ret$0), VOID, mapOf_0(to(get_XAPI_RESULT_EXTENSION_PROGRESS(), JsonPrimitive(progress)))));
  }
  function createFinalStatement($this) {
    $this.sor(false);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = $this.oor_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd = new Long(0, 0);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    var usageDurationVal = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_1 = $this.por_1;
      while (true) {
        var cur_0 = this_1.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd_0 = 0;
        if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
          tmp$ret$3 = cur_0;
          break $l$block_0;
        }
      }
    }
    var maxProgressVal = tmp$ret$3;
    return createXapiStatement($this, usageDurationVal, maxProgressVal, false);
  }
  function NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda($active) {
    return function () {
      return 'ContentUsageStatementRecorder: active=' + $active;
    };
  }
  function NonInteractiveContentXapiStatementRecorder$onComplete$lambda() {
    return 'ContentUsageStatementRecorder: completed';
  }
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    this.bos_1 = this$0;
    this.cos_1 = $usageDurationVal;
    this.dos_1 = $timeSinceActive;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).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.bos_1.jor_1.bnf(listOf_0(createXapiStatement(this.bos_1, this.cos_1.lc(this.dos_1), 100, true)), this.bos_1.kor_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).v1m = function ($this$launch, completion) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this.bos_1, this.cos_1, this.dos_1, completion);
    i.eos_1 = $this$launch;
    return i;
  };
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NonInteractiveContentXapiStatementRecorder(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, xapiSession, scope, xapiActivityProvider, endpoint) {
    this.hor_1 = saveStatementOnClearUseCase;
    this.ior_1 = saveStatementOnUnloadUseCase;
    this.jor_1 = xapiStatementResource;
    this.kor_1 = xapiSession;
    this.lor_1 = scope;
    this.mor_1 = xapiActivityProvider;
    this.nor_1 = endpoint;
    this.oor_1 = atomic$long$1(new Long(0, 0));
    this.por_1 = atomic$int$1(0);
    this.qor_1 = atomic$long$1(new Long(0, 0));
    this.ror_1 = atomic$boolean$1(false);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder).sor = function (active) {
    var tmp = Napier_getInstance();
    tmp.j5k(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda(active));
    if (active) {
      $l$block: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_0 = this.qor_1;
        while (true) {
          var cur = this_0.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd = cur.equals(new Long(0, 0)) ? systemTimeInMillis() : cur;
          if (this_0.atomicfu$compareAndSet(cur, upd)) {
            break $l$block;
          }
        }
      }
    } else {
      var tmp$ret$3;
      $l$block_0: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_1 = this.qor_1;
        while (true) {
          var cur_0 = this_1.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd_0 = new Long(0, 0);
          if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
            tmp$ret$3 = cur_0;
            break $l$block_0;
          }
        }
      }
      var activeStarted = tmp$ret$3;
      if (!activeStarted.equals(new Long(0, 0))) {
        $l$block_1: {
          // Inline function 'kotlinx.atomicfu.update' call
          var this_2 = this.oor_1;
          while (true) {
            var cur_1 = this_2.kotlinx$atomicfu$value;
            // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
            var upd_1 = cur_1.lc(systemTimeInMillis().mc(activeStarted));
            if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
              break $l$block_1;
            }
          }
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).fos = function (progress) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.por_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onProgressed.<anonymous>' call
        // Inline function 'kotlin.comparisons.maxOf' call
        var upd = Math.max(cur, progress);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).gos = function (oneCompletionStatementOnly) {
    var tmp = Napier_getInstance();
    tmp.j5k(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$lambda);
    var tmp_0;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = this.ror_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
        var upd = true;
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    if (!tmp$ret$1) {
      tmp_0 = true;
    } else {
      tmp_0 = !oneCompletionStatementOnly;
    }
    if (tmp_0) {
      var tmp$ret$3;
      $l$block_0: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_1 = this.oor_1;
        while (true) {
          var cur_0 = this_1.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_0 = new Long(0, 0);
          if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
            tmp$ret$3 = cur_0;
            break $l$block_0;
          }
        }
      }
      var usageDurationVal = tmp$ret$3;
      var tmp$ret$5;
      $l$block_1: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_2 = this.qor_1;
        while (true) {
          var cur_1 = this_2.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_1 = new Long(0, 0);
          if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
            tmp$ret$5 = cur_1;
            break $l$block_1;
          }
        }
      }
      var activeStartTimeVal = tmp$ret$5;
      var tmp_1;
      if (!activeStartTimeVal.equals(new Long(0, 0))) {
        tmp_1 = systemTimeInMillis().mc(activeStartTimeVal);
      } else {
        tmp_1 = new Long(0, 0);
      }
      var timeSinceActive = tmp_1;
      $l$block_2: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_3 = this.por_1;
        while (true) {
          var cur_2 = this_3.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
          var upd_2 = 0;
          if (this_3.atomicfu$compareAndSet(cur_2, upd_2)) {
            break $l$block_2;
          }
        }
      }
      launch(this.lor_1, VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this, usageDurationVal, timeSinceActive, null));
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).jl8 = function () {
    this.hor_1.hos(listOf_0(createFinalStatement(this)), this.kor_1);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).ios = function () {
    var tmp0_safe_receiver = this.ior_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.hos(listOf_0(createFinalStatement(this)), this.kor_1);
    }
  };
  function NonInteractiveContentXapiStatementRecorderFactory(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, endpoint) {
    this.jos_1 = saveStatementOnClearUseCase;
    this.kos_1 = saveStatementOnUnloadUseCase;
    this.los_1 = xapiStatementResource;
    this.mos_1 = endpoint;
  }
  protoOf(NonInteractiveContentXapiStatementRecorderFactory).nos = function (xapiSession, scope, xapiActivityProvider) {
    return new NonInteractiveContentXapiStatementRecorder(this.jos_1, this.kos_1, this.los_1, xapiSession, scope, xapiActivityProvider, this.mos_1);
  };
  function SaveStatementOnClearUseCase() {
  }
  function SaveStatementOnUnloadUseCase() {
  }
  function Companion_72() {
    Companion_instance_120 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.oos_1 = [new ArrayListSerializer($serializer_getInstance_60()), null];
  }
  protoOf(Companion_72).s4x = function () {
    return $serializer_getInstance_64();
  };
  var Companion_instance_120;
  function Companion_getInstance_90() {
    if (Companion_instance_120 == null)
      new Companion_72();
    return Companion_instance_120;
  }
  function $serializer_52() {
    $serializer_instance_52 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.savestatementonclear.XapiStatementsAndSession', this, 2);
    tmp0_serialDesc.y4l('statements', false);
    tmp0_serialDesc.y4l('session', false);
    this.pos_1 = tmp0_serialDesc;
  }
  protoOf($serializer_52).v4a = function () {
    return this.pos_1;
  };
  protoOf($serializer_52).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_90().oos_1[0], $serializer_getInstance_6()];
  };
  protoOf($serializer_52).x4a = function (decoder) {
    var tmp0_desc = this.pos_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.n4e(tmp0_desc);
    var tmp7_cached = Companion_getInstance_90().oos_1;
    if (tmp6_input.c4f()) {
      tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.z4e(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.z4e(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.z4e(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.o4e(tmp0_desc);
    return XapiStatementsAndSession_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_52).qos = function (encoder, value) {
    var tmp0_desc = this.pos_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_90().oos_1;
    tmp1_output.d4g(tmp0_desc, 0, tmp2_cached[0], value.ros_1);
    tmp1_output.d4g(tmp0_desc, 1, $serializer_getInstance_6(), value.sos_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_52).w4a = function (encoder, value) {
    return this.qos(encoder, value instanceof XapiStatementsAndSession ? value : THROW_CCE());
  };
  var $serializer_instance_52;
  function $serializer_getInstance_64() {
    if ($serializer_instance_52 == null)
      new $serializer_52();
    return $serializer_instance_52;
  }
  function XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_64().pos_1);
    }
    $this.ros_1 = statements;
    $this.sos_1 = session;
    return $this;
  }
  function XapiStatementsAndSession_init_$Create$(seen1, statements, session, serializationConstructorMarker) {
    return XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, objectCreate(protoOf(XapiStatementsAndSession)));
  }
  function XapiStatementsAndSession(statements, session) {
    Companion_getInstance_90();
    this.ros_1 = statements;
    this.sos_1 = session;
  }
  protoOf(XapiStatementsAndSession).toString = function () {
    return 'XapiStatementsAndSession(statements=' + this.ros_1 + ', session=' + this.sos_1 + ')';
  };
  protoOf(XapiStatementsAndSession).hashCode = function () {
    var result = hashCode(this.ros_1);
    result = imul(result, 31) + this.sos_1.hashCode() | 0;
    return result;
  };
  protoOf(XapiStatementsAndSession).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatementsAndSession))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatementsAndSession ? other : THROW_CCE();
    if (!equals(this.ros_1, tmp0_other_with_cast.ros_1))
      return false;
    if (!this.sos_1.equals(tmp0_other_with_cast.sos_1))
      return false;
    return true;
  };
  function ResumeOrStartXapiSessionUseCase() {
  }
  function XXHasher64Factory() {
  }
  function XXStringHasher() {
  }
  function UstadMobileConstants() {
    UstadMobileConstants_instance = this;
    this.tos_1 = 'UTF-8';
    this.uos_1 = 0;
    this.vos_1 = 'UTC';
    this.wos_1 = mapOf([to('en', 'English'), to('tg', '\u0422\u043E\u04B7\u0438\u043A\u04E3'), to('ps', '\u067E\u069A\u062A\u0648'), to('fa', '\u062F\u0631\u06CC'), to('ar', '\u0627\u0644\u0639\u0631\u0628\u064A\u0629'), to('bn', '\u09AC\u09BE\u0982\u09B2\u09BE'), to('ne', '\u0928\u0947\u092A\u093E\u0932\u0940'), to('my', '\u1019\u103C\u1014\u103A\u1019\u102C\u1005\u102C'), to('ru', '\u0420\u0443\u0441\u0441\u043A\u0438\u0439'), to('rw', 'Kinyarwanda')]);
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.xos_1 = ['ar', 'arc', 'dv', 'fa', 'ha', 'he', 'khw', 'ks', 'ku', 'ps', 'ur', 'yi'];
    this.yos_1 = 13;
    this.zos_1 = 18;
    this.aot_1 = 10000;
    this.bot_1 = 512;
  }
  var UstadMobileConstants_instance;
  function UstadMobileConstants_getInstance() {
    if (UstadMobileConstants_instance == null)
      new UstadMobileConstants();
    return UstadMobileConstants_instance;
  }
  function Companion_73() {
    Companion_instance_121 = this;
    this.cot_1 = new UstadGoOptions(null, false);
  }
  var Companion_instance_121;
  function Companion_getInstance_91() {
    if (Companion_instance_121 == null)
      new Companion_73();
    return Companion_instance_121;
  }
  function UstadGoOptions(popUpToViewName, popUpToInclusive, clearStack, serializer) {
    Companion_getInstance_91();
    popUpToViewName = popUpToViewName === VOID ? null : popUpToViewName;
    popUpToInclusive = popUpToInclusive === VOID ? false : popUpToInclusive;
    clearStack = clearStack === VOID ? false : clearStack;
    serializer = serializer === VOID ? null : serializer;
    this.dot_1 = popUpToViewName;
    this.eot_1 = popUpToInclusive;
    this.fot_1 = clearStack;
    this.got_1 = serializer;
  }
  protoOf(UstadGoOptions).toString = function () {
    return 'UstadGoOptions(popUpToViewName=' + this.dot_1 + ', popUpToInclusive=' + this.eot_1 + ', clearStack=' + this.fot_1 + ', serializer=' + this.got_1 + ')';
  };
  protoOf(UstadGoOptions).hashCode = function () {
    var result = this.dot_1 == null ? 0 : getStringHashCode(this.dot_1);
    result = imul(result, 31) + getBooleanHashCode(this.eot_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fot_1) | 0;
    result = imul(result, 31) + (this.got_1 == null ? 0 : hashCode(this.got_1)) | 0;
    return result;
  };
  protoOf(UstadGoOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadGoOptions))
      return false;
    var tmp0_other_with_cast = other instanceof UstadGoOptions ? other : THROW_CCE();
    if (!(this.dot_1 == tmp0_other_with_cast.dot_1))
      return false;
    if (!(this.eot_1 === tmp0_other_with_cast.eot_1))
      return false;
    if (!(this.fot_1 === tmp0_other_with_cast.fot_1))
      return false;
    if (!equals(this.got_1, tmp0_other_with_cast.got_1))
      return false;
    return true;
  };
  function UiLanguage(langCode, langDisplay) {
    this.hot_1 = langCode;
    this.iot_1 = langDisplay;
  }
  protoOf(UiLanguage).toString = function () {
    return 'UiLanguage(langCode=' + this.hot_1 + ', langDisplay=' + this.iot_1 + ')';
  };
  protoOf(UiLanguage).hashCode = function () {
    var result = getStringHashCode(this.hot_1);
    result = imul(result, 31) + getStringHashCode(this.iot_1) | 0;
    return result;
  };
  protoOf(UiLanguage).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UiLanguage))
      return false;
    var tmp0_other_with_cast = other instanceof UiLanguage ? other : THROW_CCE();
    if (!(this.hot_1 === tmp0_other_with_cast.hot_1))
      return false;
    if (!(this.iot_1 === tmp0_other_with_cast.iot_1))
      return false;
    return true;
  };
  function Companion_74() {
    Companion_instance_122 = this;
    this.jot_1 = mapOf([to('image/jpg', 'jpg'), to('image/jpg', 'jpg'), to('image/jpeg', 'jpg'), to('image/png', 'png'), to('image/gif', 'gif'), to('image/svg', 'svg'), to('application/epub+zip', 'epub')]);
    var tmp = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_0 = this.jot_1.q2();
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination = LinkedHashMap_init_$Create$_0(capacity);
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp_0 = element.t2();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp$ret$1 = element.s2();
      destination.s(tmp_0, tmp$ret$1);
    }
    tmp.kot_1 = destination;
    this.lot_1 = 'ustadmobileContent';
    this.mot_1 = '';
    this.PREFKEY_LOCALE = 'locale';
    this.not_1 = 2;
    this.oot_1 = 4;
    this.pot_1 = 'ref';
    this.qot_1 = 67108864;
    this.rot_1 = 'dlenabled';
    this.sot_1 = 16;
    this.tot_1 = 32;
    this.uot_1 = 64;
    this.vot_1 = 'umclient';
    this.wot_1 = '/umapp/#/';
    this.xot_1 = 'sitedata';
    this.yot_1 = 'container';
    this.zot_1 = 'attachments';
    this.aou_1 = 'rootViewName';
    this.bou_1 = 'client_id';
  }
  protoOf(Companion_74).cou = function () {
    return this.PREFKEY_LOCALE;
  };
  var Companion_instance_122;
  function Companion_getInstance_92() {
    if (Companion_instance_122 == null)
      new Companion_74();
    return Companion_instance_122;
  }
  function UstadMobileSystemCommon(settings, langConfig) {
    Companion_getInstance_92();
    this.dou_1 = settings;
    this.eou_1 = langConfig;
    this.fou_1 = null;
  }
  protoOf(UstadMobileSystemCommon).gou = function () {
    Companion_getInstance_132();
    return 'CourseListHome';
  };
  protoOf(UstadMobileSystemCommon).hou = function () {
    // Inline function 'kotlin.collections.associateWith' call
    var this_0 = values();
    var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_0.length), 16));
    // Inline function 'kotlin.collections.associateWithTo' call
    var inductionVariable = 0;
    var last = this_0.length;
    while (inductionVariable < last) {
      var element = this_0[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.impl.UstadMobileSystemCommon.getDayOfWeekStrings.<anonymous>' call
      var tmp$ret$0 = this.rnd(get_dayStringResource(element));
      result.s(element, tmp$ret$0);
    }
    return result;
  };
  function ActionBarButtonUiState$_init_$lambda_4nqccj() {
    return Unit_instance;
  }
  function ActionBarButtonUiState(visible, text, enabled, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    enabled = enabled === VOID ? true : enabled;
    var tmp;
    if (onClick === VOID) {
      tmp = ActionBarButtonUiState$_init_$lambda_4nqccj;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.iou_1 = visible;
    this.jou_1 = text;
    this.kou_1 = enabled;
    this.lou_1 = onClick;
  }
  protoOf(ActionBarButtonUiState).mou = function (visible, text, enabled, onClick) {
    return new ActionBarButtonUiState(visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).nou = function (visible, text, enabled, onClick, $super) {
    visible = visible === VOID ? this.iou_1 : visible;
    text = text === VOID ? this.jou_1 : text;
    enabled = enabled === VOID ? this.kou_1 : enabled;
    onClick = onClick === VOID ? this.lou_1 : onClick;
    return $super === VOID ? this.mou(visible, text, enabled, onClick) : $super.mou.call(this, visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).toString = function () {
    return 'ActionBarButtonUiState(visible=' + this.iou_1 + ', text=' + this.jou_1 + ', enabled=' + this.kou_1 + ', onClick=' + this.lou_1 + ')';
  };
  protoOf(ActionBarButtonUiState).hashCode = function () {
    var result = getBooleanHashCode(this.iou_1);
    result = imul(result, 31) + (this.jou_1 == null ? 0 : getStringHashCode(this.jou_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kou_1) | 0;
    result = imul(result, 31) + hashCode(this.lou_1) | 0;
    return result;
  };
  protoOf(ActionBarButtonUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActionBarButtonUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ActionBarButtonUiState ? other : THROW_CCE();
    if (!(this.iou_1 === tmp0_other_with_cast.iou_1))
      return false;
    if (!(this.jou_1 == tmp0_other_with_cast.jou_1))
      return false;
    if (!(this.kou_1 === tmp0_other_with_cast.kou_1))
      return false;
    if (!equals(this.lou_1, tmp0_other_with_cast.lou_1))
      return false;
    return true;
  };
  function AppActionButton(icon, contentDescription, onClick, id) {
    this.oou_1 = icon;
    this.pou_1 = contentDescription;
    this.qou_1 = onClick;
    this.rou_1 = id;
  }
  protoOf(AppActionButton).toString = function () {
    return 'AppActionButton(icon=' + this.oou_1 + ', contentDescription=' + this.pou_1 + ', onClick=' + this.qou_1 + ', id=' + this.rou_1 + ')';
  };
  protoOf(AppActionButton).hashCode = function () {
    var result = this.oou_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.pou_1) | 0;
    result = imul(result, 31) + hashCode(this.qou_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.rou_1) | 0;
    return result;
  };
  protoOf(AppActionButton).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppActionButton))
      return false;
    var tmp0_other_with_cast = other instanceof AppActionButton ? other : THROW_CCE();
    if (!this.oou_1.equals(tmp0_other_with_cast.oou_1))
      return false;
    if (!(this.pou_1 === tmp0_other_with_cast.pou_1))
      return false;
    if (!equals(this.qou_1, tmp0_other_with_cast.qou_1))
      return false;
    if (!(this.rou_1 === tmp0_other_with_cast.rou_1))
      return false;
    return true;
  };
  var AppBarColors_STANDARD_instance;
  var AppBarColors_SELECTION_MODE_instance;
  var AppBarColors_entriesInitialized;
  function AppBarColors_initEntries() {
    if (AppBarColors_entriesInitialized)
      return Unit_instance;
    AppBarColors_entriesInitialized = true;
    AppBarColors_STANDARD_instance = new AppBarColors('STANDARD', 0);
    AppBarColors_SELECTION_MODE_instance = new AppBarColors('SELECTION_MODE', 1);
  }
  function AppBarColors(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppBarColors_STANDARD_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_STANDARD_instance;
  }
  function AppBarColors_SELECTION_MODE_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_SELECTION_MODE_instance;
  }
  function AppBarSearchUiState$_init_$lambda_rwjni0(it) {
    return Unit_instance;
  }
  function AppBarSearchUiState(visible, searchText, onSearchTextChanged) {
    visible = visible === VOID ? false : visible;
    searchText = searchText === VOID ? '' : searchText;
    var tmp;
    if (onSearchTextChanged === VOID) {
      tmp = AppBarSearchUiState$_init_$lambda_rwjni0;
    } else {
      tmp = onSearchTextChanged;
    }
    onSearchTextChanged = tmp;
    this.sou_1 = visible;
    this.tou_1 = searchText;
    this.uou_1 = onSearchTextChanged;
  }
  protoOf(AppBarSearchUiState).vou = function (visible, searchText, onSearchTextChanged) {
    return new AppBarSearchUiState(visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).wou = function (visible, searchText, onSearchTextChanged, $super) {
    visible = visible === VOID ? this.sou_1 : visible;
    searchText = searchText === VOID ? this.tou_1 : searchText;
    onSearchTextChanged = onSearchTextChanged === VOID ? this.uou_1 : onSearchTextChanged;
    return $super === VOID ? this.vou(visible, searchText, onSearchTextChanged) : $super.vou.call(this, visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).toString = function () {
    return 'AppBarSearchUiState(visible=' + this.sou_1 + ', searchText=' + this.tou_1 + ', onSearchTextChanged=' + this.uou_1 + ')';
  };
  protoOf(AppBarSearchUiState).hashCode = function () {
    var result = getBooleanHashCode(this.sou_1);
    result = imul(result, 31) + getStringHashCode(this.tou_1) | 0;
    result = imul(result, 31) + hashCode(this.uou_1) | 0;
    return result;
  };
  protoOf(AppBarSearchUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppBarSearchUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppBarSearchUiState ? other : THROW_CCE();
    if (!(this.sou_1 === tmp0_other_with_cast.sou_1))
      return false;
    if (!(this.tou_1 === tmp0_other_with_cast.tou_1))
      return false;
    if (!equals(this.uou_1, tmp0_other_with_cast.uou_1))
      return false;
    return true;
  };
  var AppStateIcon_MOVE_instance;
  var AppStateIcon_CLOSE_instance;
  var AppStateIcon_DELETE_instance;
  var AppStateIcon_entriesInitialized;
  function AppStateIcon_initEntries() {
    if (AppStateIcon_entriesInitialized)
      return Unit_instance;
    AppStateIcon_entriesInitialized = true;
    AppStateIcon_MOVE_instance = new AppStateIcon('MOVE', 0);
    AppStateIcon_CLOSE_instance = new AppStateIcon('CLOSE', 1);
    AppStateIcon_DELETE_instance = new AppStateIcon('DELETE', 2);
  }
  function AppStateIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppStateIcon_MOVE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_MOVE_instance;
  }
  function AppStateIcon_CLOSE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_CLOSE_instance;
  }
  function AppStateIcon_DELETE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_DELETE_instance;
  }
  function AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    fabState = fabState === VOID ? new FabUiState() : fabState;
    loadingState = loadingState === VOID ? new LoadingUiState() : loadingState;
    title = title === VOID ? null : title;
    navigationVisible = navigationVisible === VOID ? true : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? false : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? false : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? true : userAccountIconVisible;
    searchState = searchState === VOID ? new AppBarSearchUiState() : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? new ActionBarButtonUiState() : actionBarButtonState;
    overflowItems = overflowItems === VOID ? emptyList() : overflowItems;
    hideAppBar = hideAppBar === VOID ? false : hideAppBar;
    actionButtons = actionButtons === VOID ? emptyList() : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? null : leadingActionButton;
    appBarColors = appBarColors === VOID ? AppBarColors_STANDARD_getInstance() : appBarColors;
    this.xou_1 = fabState;
    this.you_1 = loadingState;
    this.zou_1 = title;
    this.aov_1 = navigationVisible;
    this.bov_1 = hideBottomNavigation;
    this.cov_1 = hideSettingsIcon;
    this.dov_1 = userAccountIconVisible;
    this.eov_1 = searchState;
    this.fov_1 = actionBarButtonState;
    this.gov_1 = overflowItems;
    this.hov_1 = hideAppBar;
    this.iov_1 = actionButtons;
    this.jov_1 = leadingActionButton;
    this.kov_1 = appBarColors;
  }
  protoOf(AppUiState).lov = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    return new AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).mov = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors, $super) {
    fabState = fabState === VOID ? this.xou_1 : fabState;
    loadingState = loadingState === VOID ? this.you_1 : loadingState;
    title = title === VOID ? this.zou_1 : title;
    navigationVisible = navigationVisible === VOID ? this.aov_1 : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? this.bov_1 : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? this.cov_1 : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? this.dov_1 : userAccountIconVisible;
    searchState = searchState === VOID ? this.eov_1 : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? this.fov_1 : actionBarButtonState;
    overflowItems = overflowItems === VOID ? this.gov_1 : overflowItems;
    hideAppBar = hideAppBar === VOID ? this.hov_1 : hideAppBar;
    actionButtons = actionButtons === VOID ? this.iov_1 : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? this.jov_1 : leadingActionButton;
    appBarColors = appBarColors === VOID ? this.kov_1 : appBarColors;
    return $super === VOID ? this.lov(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) : $super.lov.call(this, fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).toString = function () {
    return 'AppUiState(fabState=' + this.xou_1 + ', loadingState=' + this.you_1 + ', title=' + this.zou_1 + ', navigationVisible=' + this.aov_1 + ', hideBottomNavigation=' + this.bov_1 + ', hideSettingsIcon=' + this.cov_1 + ', userAccountIconVisible=' + this.dov_1 + ', searchState=' + this.eov_1 + ', actionBarButtonState=' + this.fov_1 + ', overflowItems=' + this.gov_1 + ', hideAppBar=' + this.hov_1 + ', actionButtons=' + this.iov_1 + ', leadingActionButton=' + this.jov_1 + ', appBarColors=' + this.kov_1 + ')';
  };
  protoOf(AppUiState).hashCode = function () {
    var result = this.xou_1.hashCode();
    result = imul(result, 31) + this.you_1.hashCode() | 0;
    result = imul(result, 31) + (this.zou_1 == null ? 0 : getStringHashCode(this.zou_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aov_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bov_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cov_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dov_1) | 0;
    result = imul(result, 31) + this.eov_1.hashCode() | 0;
    result = imul(result, 31) + this.fov_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.gov_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hov_1) | 0;
    result = imul(result, 31) + hashCode(this.iov_1) | 0;
    result = imul(result, 31) + (this.jov_1 == null ? 0 : this.jov_1.hashCode()) | 0;
    result = imul(result, 31) + this.kov_1.hashCode() | 0;
    return result;
  };
  protoOf(AppUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppUiState ? other : THROW_CCE();
    if (!this.xou_1.equals(tmp0_other_with_cast.xou_1))
      return false;
    if (!this.you_1.equals(tmp0_other_with_cast.you_1))
      return false;
    if (!(this.zou_1 == tmp0_other_with_cast.zou_1))
      return false;
    if (!(this.aov_1 === tmp0_other_with_cast.aov_1))
      return false;
    if (!(this.bov_1 === tmp0_other_with_cast.bov_1))
      return false;
    if (!(this.cov_1 === tmp0_other_with_cast.cov_1))
      return false;
    if (!(this.dov_1 === tmp0_other_with_cast.dov_1))
      return false;
    if (!this.eov_1.equals(tmp0_other_with_cast.eov_1))
      return false;
    if (!this.fov_1.equals(tmp0_other_with_cast.fov_1))
      return false;
    if (!equals(this.gov_1, tmp0_other_with_cast.gov_1))
      return false;
    if (!(this.hov_1 === tmp0_other_with_cast.hov_1))
      return false;
    if (!equals(this.iov_1, tmp0_other_with_cast.iov_1))
      return false;
    if (!equals(this.jov_1, tmp0_other_with_cast.jov_1))
      return false;
    if (!this.kov_1.equals(tmp0_other_with_cast.kov_1))
      return false;
    return true;
  };
  var FabIcon_NONE_instance;
  var FabIcon_ADD_instance;
  var FabIcon_EDIT_instance;
  var FabIcon_entriesInitialized;
  function FabIcon_initEntries() {
    if (FabIcon_entriesInitialized)
      return Unit_instance;
    FabIcon_entriesInitialized = true;
    FabIcon_NONE_instance = new FabIcon('NONE', 0);
    FabIcon_ADD_instance = new FabIcon('ADD', 1);
    FabIcon_EDIT_instance = new FabIcon('EDIT', 2);
  }
  function FabIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function FabUiState$_init_$lambda_e3ylcb() {
    return Unit_instance;
  }
  function FabIcon_NONE_getInstance() {
    FabIcon_initEntries();
    return FabIcon_NONE_instance;
  }
  function FabIcon_ADD_getInstance() {
    FabIcon_initEntries();
    return FabIcon_ADD_instance;
  }
  function FabIcon_EDIT_getInstance() {
    FabIcon_initEntries();
    return FabIcon_EDIT_instance;
  }
  function FabUiState(visible, text, icon, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    icon = icon === VOID ? FabIcon_NONE_getInstance() : icon;
    var tmp;
    if (onClick === VOID) {
      tmp = FabUiState$_init_$lambda_e3ylcb;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.nov_1 = visible;
    this.oov_1 = text;
    this.pov_1 = icon;
    this.qov_1 = onClick;
  }
  protoOf(FabUiState).rov = function (visible, text, icon, onClick) {
    return new FabUiState(visible, text, icon, onClick);
  };
  protoOf(FabUiState).sov = function (visible, text, icon, onClick, $super) {
    visible = visible === VOID ? this.nov_1 : visible;
    text = text === VOID ? this.oov_1 : text;
    icon = icon === VOID ? this.pov_1 : icon;
    onClick = onClick === VOID ? this.qov_1 : onClick;
    return $super === VOID ? this.rov(visible, text, icon, onClick) : $super.rov.call(this, visible, text, icon, onClick);
  };
  protoOf(FabUiState).toString = function () {
    return 'FabUiState(visible=' + this.nov_1 + ', text=' + this.oov_1 + ', icon=' + this.pov_1 + ', onClick=' + this.qov_1 + ')';
  };
  protoOf(FabUiState).hashCode = function () {
    var result = getBooleanHashCode(this.nov_1);
    result = imul(result, 31) + (this.oov_1 == null ? 0 : getStringHashCode(this.oov_1)) | 0;
    result = imul(result, 31) + this.pov_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.qov_1) | 0;
    return result;
  };
  protoOf(FabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof FabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof FabUiState ? other : THROW_CCE();
    if (!(this.nov_1 === tmp0_other_with_cast.nov_1))
      return false;
    if (!(this.oov_1 == tmp0_other_with_cast.oov_1))
      return false;
    if (!this.pov_1.equals(tmp0_other_with_cast.pov_1))
      return false;
    if (!equals(this.qov_1, tmp0_other_with_cast.qov_1))
      return false;
    return true;
  };
  var State_NOT_LOADING_instance;
  var State_INDETERMINATE_instance;
  var State_entriesInitialized;
  function State_initEntries() {
    if (State_entriesInitialized)
      return Unit_instance;
    State_entriesInitialized = true;
    State_NOT_LOADING_instance = new State('NOT_LOADING', 0);
    State_INDETERMINATE_instance = new State('INDETERMINATE', 1);
  }
  function State(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function Companion_75() {
    Companion_instance_123 = this;
    this.tov_1 = new LoadingUiState(State_INDETERMINATE_getInstance());
    this.uov_1 = new LoadingUiState(State_NOT_LOADING_getInstance());
  }
  var Companion_instance_123;
  function Companion_getInstance_93() {
    if (Companion_instance_123 == null)
      new Companion_75();
    return Companion_instance_123;
  }
  function State_NOT_LOADING_getInstance() {
    State_initEntries();
    return State_NOT_LOADING_instance;
  }
  function State_INDETERMINATE_getInstance() {
    State_initEntries();
    return State_INDETERMINATE_instance;
  }
  function LoadingUiState(loadingState) {
    Companion_getInstance_93();
    loadingState = loadingState === VOID ? State_NOT_LOADING_getInstance() : loadingState;
    this.vov_1 = loadingState;
  }
  protoOf(LoadingUiState).toString = function () {
    return 'LoadingUiState(loadingState=' + this.vov_1 + ')';
  };
  protoOf(LoadingUiState).hashCode = function () {
    return this.vov_1.hashCode();
  };
  protoOf(LoadingUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoadingUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoadingUiState ? other : THROW_CCE();
    if (!this.vov_1.equals(tmp0_other_with_cast.vov_1))
      return false;
    return true;
  };
  function OverflowItem(label, onClick) {
    this.wov_1 = label;
    this.xov_1 = onClick;
  }
  protoOf(OverflowItem).toString = function () {
    return 'OverflowItem(label=' + this.wov_1 + ', onClick=' + this.xov_1 + ')';
  };
  protoOf(OverflowItem).hashCode = function () {
    var result = getStringHashCode(this.wov_1);
    result = imul(result, 31) + hashCode(this.xov_1) | 0;
    return result;
  };
  protoOf(OverflowItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OverflowItem))
      return false;
    var tmp0_other_with_cast = other instanceof OverflowItem ? other : THROW_CCE();
    if (!(this.wov_1 === tmp0_other_with_cast.wov_1))
      return false;
    if (!equals(this.xov_1, tmp0_other_with_cast.xov_1))
      return false;
    return true;
  };
  function Snack(message, action, onAction) {
    action = action === VOID ? null : action;
    onAction = onAction === VOID ? null : onAction;
    this.yov_1 = message;
    this.zov_1 = action;
    this.aow_1 = onAction;
  }
  protoOf(Snack).toString = function () {
    return 'Snack(message=' + this.yov_1 + ', action=' + this.zov_1 + ', onAction=' + this.aow_1 + ')';
  };
  protoOf(Snack).hashCode = function () {
    var result = getStringHashCode(this.yov_1);
    result = imul(result, 31) + (this.zov_1 == null ? 0 : getStringHashCode(this.zov_1)) | 0;
    result = imul(result, 31) + (this.aow_1 == null ? 0 : hashCode(this.aow_1)) | 0;
    return result;
  };
  protoOf(Snack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Snack))
      return false;
    var tmp0_other_with_cast = other instanceof Snack ? other : THROW_CCE();
    if (!(this.yov_1 === tmp0_other_with_cast.yov_1))
      return false;
    if (!(this.zov_1 == tmp0_other_with_cast.zov_1))
      return false;
    if (!equals(this.aow_1, tmp0_other_with_cast.aow_1))
      return false;
    return true;
  };
  function SnackBarDispatcher() {
  }
  function TabItem(viewName, args, label) {
    this.cow_1 = viewName;
    this.dow_1 = args;
    this.eow_1 = label;
  }
  protoOf(TabItem).toString = function () {
    return 'TabItem(viewName=' + this.cow_1 + ', args=' + this.dow_1 + ', label=' + this.eow_1 + ')';
  };
  protoOf(TabItem).hashCode = function () {
    var result = getStringHashCode(this.cow_1);
    result = imul(result, 31) + hashCode(this.dow_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.eow_1) | 0;
    return result;
  };
  protoOf(TabItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TabItem))
      return false;
    var tmp0_other_with_cast = other instanceof TabItem ? other : THROW_CCE();
    if (!(this.cow_1 === tmp0_other_with_cast.cow_1))
      return false;
    if (!equals(this.dow_1, tmp0_other_with_cast.dow_1))
      return false;
    if (!(this.eow_1 === tmp0_other_with_cast.eow_1))
      return false;
    return true;
  };
  function UstadContextMenuItem(label, onClick) {
    this.fow_1 = label;
    this.gow_1 = onClick;
  }
  protoOf(UstadContextMenuItem).toString = function () {
    return 'UstadContextMenuItem(label=' + this.fow_1 + ', onClick=' + this.gow_1 + ')';
  };
  protoOf(UstadContextMenuItem).hashCode = function () {
    var result = getStringHashCode(this.fow_1);
    result = imul(result, 31) + hashCode(this.gow_1) | 0;
    return result;
  };
  protoOf(UstadContextMenuItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadContextMenuItem))
      return false;
    var tmp0_other_with_cast = other instanceof UstadContextMenuItem ? other : THROW_CCE();
    if (!(this.fow_1 === tmp0_other_with_cast.fow_1))
      return false;
    if (!equals(this.gow_1, tmp0_other_with_cast.gow_1))
      return false;
    return true;
  };
  function ApiUrlConfig(presetApiUrl) {
    this.fn5_1 = presetApiUrl;
    this.gn5_1 = this.fn5_1 == null;
  }
  protoOf(ApiUrlConfig).toString = function () {
    return 'ApiUrlConfig(presetApiUrl=' + this.fn5_1 + ')';
  };
  protoOf(ApiUrlConfig).hashCode = function () {
    return this.fn5_1 == null ? 0 : getStringHashCode(this.fn5_1);
  };
  protoOf(ApiUrlConfig).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ApiUrlConfig))
      return false;
    var tmp0_other_with_cast = other instanceof ApiUrlConfig ? other : THROW_CCE();
    if (!(this.fn5_1 == tmp0_other_with_cast.fn5_1))
      return false;
    return true;
  };
  function AppConfig() {
  }
  function AppConfigMap(delegate) {
    this.how_1 = delegate;
  }
  function Companion_76() {
    this.iow_1 = '1,2,4';
  }
  var Companion_instance_124;
  function Companion_getInstance_94() {
    return Companion_instance_124;
  }
  function GenderConfig(genderConfigStr) {
    genderConfigStr = genderConfigStr === VOID ? '1,2,4' : genderConfigStr;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = split(genderConfigStr, [',']);
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(element)) {
        destination.i1(element);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var item = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      var tmp$ret$4 = toInt(item);
      destination_0.i1(tmp$ret$4);
    }
    tmp.jow_1 = destination_0;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_1 = PersonConstants_getInstance_0().mow_1;
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = this_1.w();
    while (tmp0_iterator_1.f()) {
      var element_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderMessageIds.<anonymous>' call
      if (this.jow_1.a1(element_0.pow_1)) {
        destination_1.i1(element_0);
      }
    }
    tmp_0.kow_1 = destination_1;
    var tmp_1 = this;
    var tmp_2 = strings_getInstance().wli_1;
    tmp_1.low_1 = plus(this.kow_1, listOf_0(new MessageIdOption2(tmp_2, 0)));
  }
  function SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, $this) {
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    SupportedLanguagesConfig.call($this, systemLocales, new SettingsLocaleSettingDelegate(settings), availableLanguagesConfig, fallbackLocaleCode);
    return $this;
  }
  function SupportedLanguagesConfig_init_$Create$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode) {
    return SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, objectCreate(protoOf(SupportedLanguagesConfig)));
  }
  function SettingsLocaleSettingDelegate(settings) {
    this.qow_1 = settings;
  }
  protoOf(SettingsLocaleSettingDelegate).row = function (value) {
    if (!(value == null)) {
      this.qow_1.ml8('locale', value);
    } else {
      this.qow_1.e2q('locale');
    }
  };
  protoOf(SettingsLocaleSettingDelegate).sow = function () {
    return this.qow_1.nl8('locale');
  };
  function displayLocaleForLangSetting($this, setting) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (setting == null ? true : charSequenceLength(setting) === 0) {
      tmp = $this.tow().hot_1;
    } else {
      tmp = setting;
    }
    return tmp;
  }
  function Companion_77() {
    this.uow_1 = 'locale';
    this.vow_1 = 'com.ustadmobile.presetlocale';
    this.wow_1 = 'localePresetDone';
    this.xow_1 = 'en,fa,ps,ar,tg,bn,ne,my,rw,ru';
    this.yow_1 = '';
  }
  var Companion_instance_125;
  function Companion_getInstance_95() {
    return Companion_instance_125;
  }
  function SupportedLanguagesConfig(systemLocales, localeSettingDelegate, availableLanguagesConfig, fallbackLocaleCode) {
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    this.uoc_1 = systemLocales;
    this.voc_1 = localeSettingDelegate;
    this.woc_1 = availableLanguagesConfig;
    this.xoc_1 = fallbackLocaleCode;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = sorted(split(this.woc_1, [',']));
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedUiLanguages.<anonymous>' call
      var tmp0_elvis_lhs = UstadMobileConstants_getInstance().wos_1.q(item);
      var tmp$ret$0 = new UiLanguage(item, tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    tmp.yoc_1 = destination;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_1 = this.yoc_1;
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination_0 = LinkedHashMap_init_$Create$_0(capacity);
    var tmp0_iterator_0 = this_1.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedLangMap.<anonymous>' call
      var tmp$ret$3 = element.hot_1;
      destination_0.s(tmp$ret$3, element);
    }
    tmp_0.zoc_1 = destination_0;
    this.aod_1 = displayLocaleForLangSetting(this, this.sow());
    if (!this.zoc_1.r(this.xoc_1))
      throw IllegalStateException_init_$Create$('available languages ' + this.woc_1 + ' does not ' + ("include fallback: '" + this.xoc_1 + "'"));
  }
  protoOf(SupportedLanguagesConfig).row = function (value) {
    this.voc_1.row(value);
    this.aod_1 = displayLocaleForLangSetting(this, value);
  };
  protoOf(SupportedLanguagesConfig).sow = function () {
    return this.voc_1.sow();
  };
  protoOf(SupportedLanguagesConfig).zow = function (systemImpl) {
    var tmp0_elvis_lhs = this.sow();
    var currentLocaleSetting = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.aox(systemImpl).w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.getCurrentLanguage.<anonymous>' call
        if (element.hot_1 === currentLocaleSetting) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(SupportedLanguagesConfig).box = function (useDeviceLangDisplay) {
    Companion_getInstance_92();
    return plus(listOf_0(new UiLanguage('', useDeviceLangDisplay)), this.yoc_1);
  };
  protoOf(SupportedLanguagesConfig).aox = function (systemImpl) {
    return this.box(systemImpl.rnd(strings_getInstance().nm4_1));
  };
  protoOf(SupportedLanguagesConfig).cox = function (preferredLocales) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.yoc_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      var tmp$ret$0 = item.hot_1;
      destination.i1(tmp$ret$0);
    }
    var supportedLocaleCodes = destination;
    var tmp$ret$6;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_0 = preferredLocales.w();
      while (tmp0_iterator_0.f()) {
        var element = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$4 = element.substring(0, 2);
        if (supportedLocaleCodes.a1(tmp$ret$4)) {
          tmp$ret$6 = element;
          break $l$block;
        }
      }
      tmp$ret$6 = null;
    }
    var tmp0_safe_receiver = tmp$ret$6;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$8 = tmp0_safe_receiver.substring(0, 2);
      tmp = ensureNotNull(this.zoc_1.q(tmp$ret$8));
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? ensureNotNull(this.zoc_1.q(this.xoc_1)) : tmp1_elvis_lhs;
  };
  protoOf(SupportedLanguagesConfig).tow = function (preferredLocales, $super) {
    preferredLocales = preferredLocales === VOID ? this.uoc_1 : preferredLocales;
    return $super === VOID ? this.cox(preferredLocales) : $super.cox.call(this, preferredLocales);
  };
  function commonDomainDiModule(endpointScope) {
    return Module_init_$Create$('CommonDomain', VOID, VOID, commonDomainDiModule$lambda(endpointScope));
  }
  function commonDomainDiModule$lambda$lambda($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.i5e(tmp$ret$2, 2);
    return new EnrolIntoCourseUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_0($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_repo = tmp.i5e(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp1_db = tmp_1.i5e(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp2_enrolIntoCourseUseCase = tmp_3.i5e(tmp$ret$4, null);
    return new ApproveOrDeclinePendingEnrolmentUseCase(tmp1_db, tmp0_repo, tmp2_enrolIntoCourseUseCase);
  }
  function commonDomainDiModule$lambda$lambda_1($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instanceOrNull' call
    var tmp_2 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.j5e(tmp$ret$2, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.i5e(tmp$ret$4, null);
    return new SaveContentEntryUseCase(tmp_1, tmp_4, tmp$ret$5);
  }
  function commonDomainDiModule$lambda$lambda_2($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = $this$provider.od();
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.m5d(tmp$ret$0, context);
    var tmp_2 = tmp.h5e(tmp$ret$1).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.i5e(tmp$ret$3, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$6 = tmp_5.i5e(tmp$ret$5, null);
    return new GetAssignmentSubmitterNameUseCase(tmp_4, tmp$ret$6);
  }
  function commonDomainDiModule$lambda$lambda_3($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = $this$provider.od();
    var tmp_2 = $this$provider.k5e();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_3 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.m5d(tmp$ret$2, context);
    var tmp_5 = tmp_2.h5e(tmp$ret$3).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$6 = tmp_5.i5e(tmp$ret$5, 2);
    return new GetLocaleForSiteTermsUseCase(tmp_1, tmp$ret$6);
  }
  function commonDomainDiModule$lambda$lambda_4($this$provider) {
    return new DefaultLaunchContentEntryVersionUseCase();
  }
  function commonDomainDiModule$lambda$lambda_5($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, 2);
    return new RequestEnrolmentUseCase(tmp$ret$1);
  }
  function commonDomainDiModule$lambda$lambda_6($this$singleton) {
    return new MakeLinkUseCase($this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_7($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, 2);
    return new CreateNewClazzUseCase(tmp$ret$1);
  }
  function commonDomainDiModule$lambda$lambda_8($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.i5e(tmp$ret$2, 2);
    return new AddNewPersonUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_9($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 2);
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.i5e(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp_8 = tmp_6.i5e(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp_11 = tmp_9.i5e(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    var tmp$ret$9 = tmp_12.i5e(tmp$ret$8, null);
    return new SubmitMarkUseCase(tmp_1, tmp_2, tmp_5, tmp_8, tmp_11, tmp$ret$9);
  }
  function commonDomainDiModule$lambda$lambda_10($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 2);
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.i5e(tmp$ret$2, null);
    return new CreateXapiGroupForCourseGroupUseCase(tmp_1, tmp_2, tmp$ret$3);
  }
  function commonDomainDiModule$lambda($endpointScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.t5c(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var this_0 = new ImplWithScope(tmp$ret$2, scope);
      var creator = commonDomainDiModule$lambda$lambda;
      var tmp_2 = this_0.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
      var tmp$ret$5 = new Provider(tmp_2, tmp$ret$4, creator);
      tmp_0.h5h(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.t5c(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$8, scope_0);
      var creator_0 = commonDomainDiModule$lambda$lambda_0;
      var tmp_7 = this_1.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_8 = typeToken(createKType(getKClass(ApproveOrDeclinePendingEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
      var tmp$ret$11 = new Provider(tmp_7, tmp$ret$10, creator_0);
      tmp_5.h5h(tmp$ret$11);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_9 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
      var tmp_10 = $this$$receiver.t5c(tmp$ret$12, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_1 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_11 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$14 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
      var this_2 = new ImplWithScope(tmp$ret$14, scope_1);
      var creator_1 = commonDomainDiModule$lambda$lambda_1;
      var tmp_12 = this_2.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$16 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      var tmp$ret$17 = new Provider(tmp_12, tmp$ret$16, creator_1);
      tmp_10.h5h(tmp$ret$17);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_14 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
      var tmp$ret$18 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
      var tmp_15 = $this$$receiver.t5c(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_2 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_16 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$20 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
      var this_3 = new ImplWithScope(tmp$ret$20, scope_2);
      var creator_2 = commonDomainDiModule$lambda$lambda_2;
      var tmp_17 = this_3.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_18 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
      var tmp$ret$22 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
      var tmp$ret$23 = new Provider(tmp_17, tmp$ret$22, creator_2);
      tmp_15.h5h(tmp$ret$23);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
      var tmp$ret$24 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      var tmp_20 = $this$$receiver.t5c(tmp$ret$24, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_3 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_21 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$26 = isInterface(tmp_21, TypeToken) ? tmp_21 : THROW_CCE();
      var this_4 = new ImplWithScope(tmp$ret$26, scope_3);
      var creator_3 = commonDomainDiModule$lambda$lambda_3;
      var tmp_22 = this_4.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_23 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
      var tmp$ret$28 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
      var tmp$ret$29 = new Provider(tmp_22, tmp$ret$28, creator_3);
      tmp_20.h5h(tmp$ret$29);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_24 = typeToken(createKType(getKClass(LaunchContentEntryVersionUseCase), arrayOf([]), false));
      var tmp$ret$30 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
      var tmp_25 = $this$$receiver.t5c(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_4 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_26 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$32 = isInterface(tmp_26, TypeToken) ? tmp_26 : THROW_CCE();
      var this_5 = new ImplWithScope(tmp$ret$32, scope_4);
      var creator_4 = commonDomainDiModule$lambda$lambda_4;
      var tmp_27 = this_5.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_28 = typeToken(createKType(getKClass(DefaultLaunchContentEntryVersionUseCase), arrayOf([]), false));
      var tmp$ret$34 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
      var tmp$ret$35 = new Provider(tmp_27, tmp$ret$34, creator_4);
      tmp_25.h5h(tmp$ret$35);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_29 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$36 = isInterface(tmp_29, TypeToken) ? tmp_29 : THROW_CCE();
      var tmp_30 = $this$$receiver.t5c(tmp$ret$36, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_5 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$38 = isInterface(tmp_31, TypeToken) ? tmp_31 : THROW_CCE();
      var this_6 = new ImplWithScope(tmp$ret$38, scope_5);
      var creator_5 = commonDomainDiModule$lambda$lambda_5;
      var tmp_32 = this_6.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_33 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$40 = isInterface(tmp_33, TypeToken) ? tmp_33 : THROW_CCE();
      var tmp$ret$41 = new Provider(tmp_32, tmp$ret$40, creator_5);
      tmp_30.h5h(tmp$ret$41);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_34 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
      var tmp$ret$42 = isInterface(tmp_34, TypeToken) ? tmp_34 : THROW_CCE();
      var tmp_35 = $this$$receiver.t5c(tmp$ret$42, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_6 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$44 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
      var this_7 = new ImplWithScope(tmp$ret$44, scope_6);
      var creator_6 = commonDomainDiModule$lambda$lambda_6;
      var tmp_37 = this_7.h5c();
      var tmp_38 = this_7.g5c();
      var tmp_39 = this_7.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_40 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
      var tmp$ret$46 = isInterface(tmp_40, TypeToken) ? tmp_40 : THROW_CCE();
      var tmp$ret$47 = new Singleton(tmp_37, tmp_38, tmp_39, tmp$ret$46, null, true, creator_6);
      tmp_35.h5h(tmp$ret$47);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_41 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
      var tmp$ret$48 = isInterface(tmp_41, TypeToken) ? tmp_41 : THROW_CCE();
      var tmp_42 = $this$$receiver.t5c(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_7 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_43 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$50 = isInterface(tmp_43, TypeToken) ? tmp_43 : THROW_CCE();
      var this_8 = new ImplWithScope(tmp$ret$50, scope_7);
      var creator_7 = commonDomainDiModule$lambda$lambda_7;
      var tmp_44 = this_8.h5c();
      var tmp_45 = this_8.g5c();
      var tmp_46 = this_8.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_47 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
      var tmp$ret$52 = isInterface(tmp_47, TypeToken) ? tmp_47 : THROW_CCE();
      var tmp$ret$53 = new Singleton(tmp_44, tmp_45, tmp_46, tmp$ret$52, null, true, creator_7);
      tmp_42.h5h(tmp$ret$53);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_48 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var tmp_49 = $this$$receiver.t5c(tmp$ret$54, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_50 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$56 = isInterface(tmp_50, TypeToken) ? tmp_50 : THROW_CCE();
      var this_9 = new ImplWithScope(tmp$ret$56, scope_8);
      var creator_8 = commonDomainDiModule$lambda$lambda_8;
      var tmp_51 = this_9.h5c();
      var tmp_52 = this_9.g5c();
      var tmp_53 = this_9.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_54 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_54, TypeToken) ? tmp_54 : THROW_CCE();
      var tmp$ret$59 = new Singleton(tmp_51, tmp_52, tmp_53, tmp$ret$58, null, true, creator_8);
      tmp_49.h5h(tmp$ret$59);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_55 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_55, TypeToken) ? tmp_55 : THROW_CCE();
      var tmp_56 = $this$$receiver.t5c(tmp$ret$60, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_57 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_57, TypeToken) ? tmp_57 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$62, scope_9);
      var creator_9 = commonDomainDiModule$lambda$lambda_9;
      var tmp_58 = this_10.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_59 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_59, TypeToken) ? tmp_59 : THROW_CCE();
      var tmp$ret$65 = new Provider(tmp_58, tmp$ret$64, creator_9);
      tmp_56.h5h(tmp$ret$65);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_60 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_60, TypeToken) ? tmp_60 : THROW_CCE();
      var tmp_61 = $this$$receiver.t5c(tmp$ret$66, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_62 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_62, TypeToken) ? tmp_62 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$68, scope_10);
      var creator_10 = commonDomainDiModule$lambda$lambda_10;
      var tmp_63 = this_11.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_64 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_64, TypeToken) ? tmp_64 : THROW_CCE();
      var tmp$ret$71 = new Provider(tmp_63, tmp$ret$70, creator_10);
      tmp_61.h5h(tmp$ret$71);
      return Unit_instance;
    };
  }
  function CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, $this) {
    CourseTerminologyStrings.call($this, toTerminologyEntries(courseTerminology, json, systemImpl), courseTerminology.k8m_1);
    return $this;
  }
  function CourseTerminologyStrings_init_$Create$(courseTerminology, systemImpl, json) {
    return CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, objectCreate(protoOf(CourseTerminologyStrings)));
  }
  function Companion_78() {
    Companion_instance_126 = this;
    this.dox_1 = new CourseTerminologyStrings(emptyList());
  }
  var Companion_instance_126;
  function Companion_getInstance_96() {
    if (Companion_instance_126 == null)
      new Companion_78();
    return Companion_instance_126;
  }
  function CourseTerminologyStrings(terminologyEntries, terminologyKey) {
    Companion_getInstance_96();
    terminologyKey = terminologyKey === VOID ? null : terminologyKey;
    this.eox_1 = terminologyEntries;
    this.fox_1 = terminologyKey;
  }
  protoOf(CourseTerminologyStrings).gox = function (messageId) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.eox_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.locale.CourseTerminologyStrings.get.<anonymous>' call
        if (element.iox_1.equals(messageId)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jox_1;
  };
  protoOf(CourseTerminologyStrings).equals = function (other) {
    var tmp0_safe_receiver = other instanceof CourseTerminologyStrings ? other : null;
    return equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eox_1, this.eox_1);
  };
  protoOf(CourseTerminologyStrings).hashCode = function () {
    return hashCode(this.eox_1);
  };
  function mapLookup(_this__u8e3s4, key, map, fallback) {
    var tmp;
    if (fallback === VOID) {
      tmp = mapLookup$lambda;
    } else {
      tmp = fallback;
    }
    fallback = tmp;
    var tmp0_safe_receiver = map.q(key);
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.impl.locale.mapLookup.<anonymous>' call
      tmp_0 = _this__u8e3s4.gox(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp_0;
    return tmp1_elvis_lhs == null ? fallback(key) : tmp1_elvis_lhs;
  }
  function mapLookup$lambda(it) {
    return '';
  }
  function TerminologyEntry(id, stringResource, term, errorMessage) {
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.hox_1 = id;
    this.iox_1 = stringResource;
    this.jox_1 = term;
    this.kox_1 = errorMessage;
  }
  protoOf(TerminologyEntry).lox = function (id, stringResource, term, errorMessage) {
    return new TerminologyEntry(id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).mox = function (id, stringResource, term, errorMessage, $super) {
    id = id === VOID ? this.hox_1 : id;
    stringResource = stringResource === VOID ? this.iox_1 : stringResource;
    term = term === VOID ? this.jox_1 : term;
    errorMessage = errorMessage === VOID ? this.kox_1 : errorMessage;
    return $super === VOID ? this.lox(id, stringResource, term, errorMessage) : $super.lox.call(this, id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).toString = function () {
    return 'TerminologyEntry(id=' + this.hox_1 + ', stringResource=' + this.iox_1 + ', term=' + this.jox_1 + ', errorMessage=' + this.kox_1 + ')';
  };
  protoOf(TerminologyEntry).hashCode = function () {
    var result = getStringHashCode(this.hox_1);
    result = imul(result, 31) + this.iox_1.hashCode() | 0;
    result = imul(result, 31) + (this.jox_1 == null ? 0 : getStringHashCode(this.jox_1)) | 0;
    result = imul(result, 31) + (this.kox_1 == null ? 0 : getStringHashCode(this.kox_1)) | 0;
    return result;
  };
  protoOf(TerminologyEntry).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TerminologyEntry))
      return false;
    var tmp0_other_with_cast = other instanceof TerminologyEntry ? other : THROW_CCE();
    if (!(this.hox_1 === tmp0_other_with_cast.hox_1))
      return false;
    if (!this.iox_1.equals(tmp0_other_with_cast.iox_1))
      return false;
    if (!(this.jox_1 == tmp0_other_with_cast.jox_1))
      return false;
    if (!(this.kox_1 == tmp0_other_with_cast.kox_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListConstants() {
    ClazzEnrolmentListConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1000, strings_getInstance().hm5_1);
    var tmp_1 = to(1001, strings_getInstance().uly_1);
    var tmp_2 = to(1003, strings_getInstance().wmf_1);
    tmp.nox_1 = mapOf([tmp_0, tmp_1, tmp_2, to(1002, strings_getInstance().rm8_1)]);
    var tmp_3 = this;
    var tmp_4 = to(202, strings_getInstance().jly_1);
    var tmp_5 = to(201, strings_getInstance().tlx_1);
    var tmp_6 = to(203, strings_getInstance().ulx_1);
    tmp_3.oox_1 = mapOf([tmp_4, tmp_5, tmp_6, to(200, strings_getInstance().ily_1)]);
  }
  var ClazzEnrolmentListConstants_instance;
  function ClazzEnrolmentListConstants_getInstance() {
    if (ClazzEnrolmentListConstants_instance == null)
      new ClazzEnrolmentListConstants();
    return ClazzEnrolmentListConstants_instance;
  }
  function ConditionConstants() {
    ConditionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().clt_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().dlt_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().elt_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().flt_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 203);
    var tmp_8 = strings_getInstance().ilt_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 205);
    var tmp_10 = strings_getInstance().glt_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 206);
    var tmp_12 = strings_getInstance().hlt_1;
    tmp.pox_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, new MessageIdOption2(tmp_12, 207)]);
  }
  var ConditionConstants_instance;
  function ConditionConstants_getInstance() {
    if (ConditionConstants_instance == null)
      new ConditionConstants();
    return ConditionConstants_instance;
  }
  function ContentCompletionStatusConstants() {
    ContentCompletionStatusConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().zlm_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().wlm_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 102);
    var tmp_4 = strings_getInstance().vlm_1;
    tmp.qox_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 103)]);
  }
  var ContentCompletionStatusConstants_instance;
  function ContentCompletionStatusConstants_getInstance() {
    if (ContentCompletionStatusConstants_instance == null)
      new ContentCompletionStatusConstants();
    return ContentCompletionStatusConstants_instance;
  }
  function EnrolmentPolicyConstants() {
    EnrolmentPolicyConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().bmi_1;
    Companion_getInstance_4();
    var tmp_1 = new MessageIdOption2(tmp_0, 102);
    var tmp_2 = strings_getInstance().bmk_1;
    Companion_getInstance_4();
    tmp.rox_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 100)]);
  }
  var EnrolmentPolicyConstants_instance;
  function EnrolmentPolicyConstants_getInstance() {
    if (EnrolmentPolicyConstants_instance == null)
      new EnrolmentPolicyConstants();
    return EnrolmentPolicyConstants_instance;
  }
  function FieldConstants() {
    FieldConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().wls_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().xls_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 101);
    var tmp_4 = strings_getInstance().yls_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 102);
    var tmp_6 = strings_getInstance().zls_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 103);
    var tmp_8 = strings_getInstance().alt_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 104);
    var tmp_10 = strings_getInstance().blt_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 105);
    var tmp_12 = strings_getInstance().gly_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 106);
    var tmp_14 = strings_getInstance().hly_1;
    tmp.sox_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, new MessageIdOption2(tmp_14, 107)]);
  }
  var FieldConstants_instance;
  function FieldConstants_getInstance() {
    if (FieldConstants_instance == null)
      new FieldConstants();
    return FieldConstants_instance;
  }
  function LicenceConstants() {
    LicenceConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().llu_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().mlu_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().nlu_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 3);
    var tmp_6 = strings_getInstance().olu_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 4);
    var tmp_8 = strings_getInstance().rlu_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 5);
    var tmp_10 = strings_getInstance().plu_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 6);
    var tmp_12 = strings_getInstance().qlu_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 7);
    var tmp_14 = strings_getInstance().dll_1;
    var tmp_15 = new MessageIdOption2(tmp_14, 8);
    var tmp_16 = strings_getInstance().slu_1;
    var tmp_17 = new MessageIdOption2(tmp_16, 9);
    var tmp_18 = strings_getInstance().ell_1;
    tmp.tox_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, new MessageIdOption2(tmp_18, 0)]);
  }
  var LicenceConstants_instance;
  function LicenceConstants_getInstance() {
    if (LicenceConstants_instance == null)
      new LicenceConstants();
    return LicenceConstants_instance;
  }
  function OutcomeConstants() {
    OutcomeConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().ily_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().tlx_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().vlm_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().ulx_1;
    tmp.uox_1 = listOf([tmp_1, tmp_3, tmp_5, new MessageIdOption2(tmp_6, 203)]);
  }
  var OutcomeConstants_instance;
  function OutcomeConstants_getInstance() {
    if (OutcomeConstants_instance == null)
      new OutcomeConstants();
    return OutcomeConstants_instance;
  }
  function PersonConstants_0() {
    PersonConstants_instance_0 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().cll_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().bll_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().dll_1;
    tmp.mow_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 4)]);
    var tmp_5 = this;
    var tmp_6 = strings_getInstance().ell_1;
    tmp_5.now_1 = plus(listOf_0(new MessageIdOption2(tmp_6, 0)), this.mow_1);
  }
  var PersonConstants_instance_0;
  function PersonConstants_getInstance_0() {
    if (PersonConstants_instance_0 == null)
      new PersonConstants_0();
    return PersonConstants_instance_0;
  }
  function PersonParentJoinConstants() {
    PersonParentJoinConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().nlv_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().mlv_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().rmb_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 4);
    var tmp_6 = strings_getInstance().dll_1;
    tmp.vox_1 = listOf([tmp_1, tmp_3, tmp_5, new MessageIdOption2(tmp_6, 8)]);
  }
  var PersonParentJoinConstants_instance;
  function PersonParentJoinConstants_getInstance() {
    if (PersonParentJoinConstants_instance == null)
      new PersonParentJoinConstants();
    return PersonParentJoinConstants_instance;
  }
  function RoleConstants() {
    RoleConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().hm5_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1000);
    var tmp_2 = strings_getInstance().uly_1;
    tmp.wox_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 1001)]);
  }
  var RoleConstants_instance;
  function RoleConstants_getInstance() {
    if (RoleConstants_instance == null)
      new RoleConstants();
    return RoleConstants_instance;
  }
  function ScheduleConstants() {
    ScheduleConstants_instance = this;
    this.xox_1 = listOf([new MessageIdOption2(strings_getInstance().wlw_1, Companion_instance_28.ljy_1), new MessageIdOption2(strings_getInstance().xlw_1, Companion_instance_28.fjy_1), new MessageIdOption2(strings_getInstance().ylw_1, Companion_instance_28.gjy_1), new MessageIdOption2(strings_getInstance().zlw_1, Companion_instance_28.hjy_1), new MessageIdOption2(strings_getInstance().alx_1, Companion_instance_28.ijy_1), new MessageIdOption2(strings_getInstance().blx_1, Companion_instance_28.jjy_1), new MessageIdOption2(strings_getInstance().clx_1, Companion_instance_28.kjy_1)]);
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.xox_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.locale.entityconstants.ScheduleConstants.DAY_MESSAGE_ID_MAP.<anonymous>' call
      var tmp$ret$0 = to(item.pow_1, item.oow_1);
      destination.i1(tmp$ret$0);
    }
    tmp.yox_1 = toMap(destination);
    this.zox_1 = mapOf([to(Companion_instance_28.ajy_1, strings_getInstance().tlw_1), to(Companion_instance_28.bjy_1, strings_getInstance().rlw_1)]);
  }
  var ScheduleConstants_instance;
  function ScheduleConstants_getInstance() {
    if (ScheduleConstants_instance == null)
      new ScheduleConstants();
    return ScheduleConstants_instance;
  }
  function SubmissionPolicyConstants() {
    SubmissionPolicyConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().dmk_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().emk_1;
    tmp.aoy_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 2)]);
  }
  var SubmissionPolicyConstants_instance;
  function SubmissionPolicyConstants_getInstance() {
    if (SubmissionPolicyConstants_instance == null)
      new SubmissionPolicyConstants();
    return SubmissionPolicyConstants_instance;
  }
  function CommandFlowUstadNavController() {
    this.boy_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.coy_1 = asSharedFlow(this.boy_1);
  }
  protoOf(CommandFlowUstadNavController).doy = function (viewName, args, goOptions) {
    this.boy_1.i1h(new NavigateNavCommand(viewName, args, goOptions));
  };
  protoOf(CommandFlowUstadNavController).eoy = function (viewName, inclusive) {
    this.boy_1.i1h(new PopNavCommand(viewName, inclusive));
  };
  function NavCommand(timestamp) {
    this.foy_1 = timestamp;
  }
  function NavigateNavCommand(viewName, args, goOptions) {
    NavCommand.call(this, systemTimeInMillis());
    this.hoy_1 = viewName;
    this.ioy_1 = args;
    this.joy_1 = goOptions;
  }
  protoOf(NavigateNavCommand).toString = function () {
    return 'NavigateNavCommand(viewName=' + this.hoy_1 + ', args=' + this.ioy_1 + ', goOptions=' + this.joy_1 + ')';
  };
  protoOf(NavigateNavCommand).hashCode = function () {
    var result = getStringHashCode(this.hoy_1);
    result = imul(result, 31) + hashCode(this.ioy_1) | 0;
    result = imul(result, 31) + this.joy_1.hashCode() | 0;
    return result;
  };
  protoOf(NavigateNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavigateNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof NavigateNavCommand ? other : THROW_CCE();
    if (!(this.hoy_1 === tmp0_other_with_cast.hoy_1))
      return false;
    if (!equals(this.ioy_1, tmp0_other_with_cast.ioy_1))
      return false;
    if (!this.joy_1.equals(tmp0_other_with_cast.joy_1))
      return false;
    return true;
  };
  function PopNavCommand(viewName, inclusive) {
    NavCommand.call(this, systemTimeInMillis());
    this.loy_1 = viewName;
    this.moy_1 = inclusive;
  }
  protoOf(PopNavCommand).toString = function () {
    return 'PopNavCommand(viewName=' + this.loy_1 + ', inclusive=' + this.moy_1 + ')';
  };
  protoOf(PopNavCommand).hashCode = function () {
    var result = getStringHashCode(this.loy_1);
    result = imul(result, 31) + getBooleanHashCode(this.moy_1) | 0;
    return result;
  };
  protoOf(PopNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PopNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof PopNavCommand ? other : THROW_CCE();
    if (!(this.loy_1 === tmp0_other_with_cast.loy_1))
      return false;
    if (!(this.moy_1 === tmp0_other_with_cast.moy_1))
      return false;
    return true;
  };
  function NavResult(key, timestamp, result) {
    this.noy_1 = key;
    this.ooy_1 = timestamp;
    this.poy_1 = result;
  }
  protoOf(NavResult).toString = function () {
    return 'NavResult(key=' + this.noy_1 + ', timestamp=' + this.ooy_1.toString() + ', result=' + toString_0(this.poy_1) + ')';
  };
  protoOf(NavResult).hashCode = function () {
    var result = getStringHashCode(this.noy_1);
    result = imul(result, 31) + this.ooy_1.hashCode() | 0;
    result = imul(result, 31) + (this.poy_1 == null ? 0 : hashCode(this.poy_1)) | 0;
    return result;
  };
  protoOf(NavResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavResult))
      return false;
    var tmp0_other_with_cast = other instanceof NavResult ? other : THROW_CCE();
    if (!(this.noy_1 === tmp0_other_with_cast.noy_1))
      return false;
    if (!this.ooy_1.equals(tmp0_other_with_cast.ooy_1))
      return false;
    if (!equals(this.poy_1, tmp0_other_with_cast.poy_1))
      return false;
    return true;
  };
  function NavResultDest(viewName, key) {
    this.qoy_1 = viewName;
    this.roy_1 = key;
  }
  function NavResultReturner() {
  }
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation) {
    this.coz_1 = $$this$unsafeFlow;
    this.doz_1 = $key;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).ioz = function (value, $completion) {
    var tmp = this.joz(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.goz_1 = this.coz_1;
            var tmp_1 = this;
            tmp_1.hoz_1 = this.eoz_1;
            if (this.hoz_1.noy_1 === this.doz_1) {
              this.hd_1 = 3;
              suspendResult = this.goz_1.t1d(this.hoz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.foz_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).joz = function (value, completion) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda(this.coz_1, this.doz_1, completion);
    i.eoz_1 = value;
    return i;
  };
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0($$this$unsafeFlow, $key, resultContinuation) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation);
    var l = function (value, $completion) {
      return i.ioz(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$43(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.soz_1 = _this__u8e3s4;
    this.toz_1 = collector;
  }
  protoOf($collectCOROUTINE$43).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.uoz_1 = this.toz_1;
            this.hd_1 = 1;
            var tmp_1 = NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0(this.uoz_1, this.soz_1.woz_1, null);
            suspendResult = this.soz_1.voz_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_1(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 sam$kotlinx_coroutines_flow_FlowCollector$0_1(function_0) {
    this.xoz_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_1).t1d = function (value, $completion) {
    return this.xoz_1(value, $completion);
  };
  function _no_name_provided__qut3iv_0($this, $key) {
    this.voz_1 = $this;
    this.woz_1 = $key;
  }
  protoOf(_no_name_provided__qut3iv_0).yoz = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$43(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_0).z1b = function (collector, $completion) {
    return this.yoz(collector, $completion);
  };
  function NavResultReturnerImpl() {
    this.zoz_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
  }
  protoOf(NavResultReturnerImpl).soy = function (key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = this.zoz_1;
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_0(this_0, key);
  };
  protoOf(NavResultReturnerImpl).toy = function (result) {
    this.zoz_1.i1h(result);
  };
  function UstadNavController() {
  }
  function BitmaskFlag(flagVal, stringResource, enabled) {
    enabled = enabled === VOID ? false : enabled;
    this.ap0_1 = flagVal;
    this.bp0_1 = stringResource;
    this.cp0_1 = enabled;
  }
  protoOf(BitmaskFlag).dp0 = function (flagVal, stringResource, enabled) {
    return new BitmaskFlag(flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).ep0 = function (flagVal, stringResource, enabled, $super) {
    flagVal = flagVal === VOID ? this.ap0_1 : flagVal;
    stringResource = stringResource === VOID ? this.bp0_1 : stringResource;
    enabled = enabled === VOID ? this.cp0_1 : enabled;
    return $super === VOID ? this.dp0(flagVal, stringResource, enabled) : $super.dp0.call(this, flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).toString = function () {
    return 'BitmaskFlag(flagVal=' + this.ap0_1.toString() + ', stringResource=' + this.bp0_1 + ', enabled=' + this.cp0_1 + ')';
  };
  protoOf(BitmaskFlag).hashCode = function () {
    var result = this.ap0_1.hashCode();
    result = imul(result, 31) + this.bp0_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cp0_1) | 0;
    return result;
  };
  protoOf(BitmaskFlag).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BitmaskFlag))
      return false;
    var tmp0_other_with_cast = other instanceof BitmaskFlag ? other : THROW_CCE();
    if (!this.ap0_1.equals(tmp0_other_with_cast.ap0_1))
      return false;
    if (!this.bp0_1.equals(tmp0_other_with_cast.bp0_1))
      return false;
    if (!(this.cp0_1 === tmp0_other_with_cast.cp0_1))
      return false;
    return true;
  };
  function ListPagingSource(list) {
    PagingSource.call(this);
    this.gp0_1 = list;
  }
  protoOf(ListPagingSource).h5y = function (params, $completion) {
    var tmp0_elvis_lhs = params.s2();
    var startFrom = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
    var loadSize = params.m5a_1;
    var tmp1_elvis_lhs = params.s2();
    var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    // Inline function 'kotlin.math.min' call
    var a = this.gp0_1.u();
    var b = startFrom + loadSize | 0;
    var tmp$ret$0 = Math.min(a, b);
    var subList = this.gp0_1.z(tmp, tmp$ret$0);
    var tmp_0;
    if (startFrom > 0) {
      // Inline function 'kotlin.math.max' call
      var b_0 = startFrom - loadSize | 0;
      tmp_0 = Math.max(0, b_0);
    } else {
      tmp_0 = null;
    }
    var tmp_1 = tmp_0;
    var tmp_2;
    if ((startFrom + loadSize | 0) < this.gp0_1.u()) {
      tmp_2 = startFrom + loadSize | 0;
    } else {
      tmp_2 = null;
    }
    var tmp_3 = Page_init_$Create$(subList, tmp_1, tmp_2);
    return tmp_3 instanceof LoadResult ? tmp_3 : THROW_CCE();
  };
  protoOf(ListPagingSource).u5a = function (params, $completion) {
    return this.h5y(params, $completion);
  };
  function RefreshCommand(time) {
    time = time === VOID ? systemTimeInMillis() : time;
    this.hp0_1 = time;
  }
  function ClazzLogCreatorManager() {
  }
  function generateUid(_this__u8e3s4) {
    return toLong(_this__u8e3s4.s9w_1.hashCode()).rc(32).vc(toLong(_this__u8e3s4.t9w_1.hashCode()));
  }
  function get_totalAttendeeStatusRecorded(_this__u8e3s4) {
    return (_this__u8e3s4.y9w_1 + _this__u8e3s4.a9x_1 | 0) + _this__u8e3s4.z9w_1 | 0;
  }
  function Activity(id, aType, lang) {
    lang = lang === VOID ? 'en' : lang;
    this.zo2_1 = aType;
    this.ao3_1 = lang;
    this.co3_1 = null;
    this.do3_1 = null;
    this.eo3_1 = null;
    this.fo3_1 = null;
    this.go3_1 = new JsonObject(mapOf_0(to('id', JsonPrimitive_0(id))));
    this.bo3_1 = id;
  }
  protoOf(Activity).jp0 = function (key, value) {
    // Inline function 'kotlin.collections.isNullOrEmpty' call
    var this_0 = this.fo3_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : this_0.c1()) {
      var tmp = this;
      // Inline function 'kotlin.collections.mutableMapOf' call
      tmp.fo3_1 = LinkedHashMap_init_$Create$();
    }
    // Inline function 'kotlin.collections.set' call
    ensureNotNull(this.fo3_1).s(key, value);
  };
  function Companion_79() {
    this.uo2_1 = 1;
  }
  protoOf(Companion_79).kp0 = function (xpp, parseFlags) {
    var tcxml = new TinCanXML();
    var activity = null;
    var evtType = xpp.q7j();
    var storeActivities = (parseFlags & this.uo2_1) === this.uo2_1;
    var inExtensions = false;
    var tagName;
    var extKey;
    var extVal;
    $l$1: do {
      $l$0: do {
        var tmp;
        var tmp_0 = evtType;
        if (tmp_0 === 2) {
          tmp = !(xpp.p7j() == null);
        } else {
          tmp = false;
        }
        if (tmp) {
          tagName = ensureNotNull(xpp.p7j());
          if (!inExtensions) {
            if (tagName === 'activity') {
              activity = new Activity(ensureNotNull(xpp.r7j(null, 'id')), ensureNotNull(xpp.r7j(null, 'type')));
            } else {
              var tmp_1;
              if (tagName === 'launch') {
                var tmp_2 = xpp.e();
                tmp_1 = tmp_2 === 4;
              } else {
                tmp_1 = false;
              }
              if (tmp_1) {
                ensureNotNull(activity).eo3_1 = xpp.o7j();
              } else {
                var tmp_3;
                if (tagName === 'name') {
                  var tmp_4 = xpp.e();
                  tmp_3 = tmp_4 === 4;
                } else {
                  tmp_3 = false;
                }
                if (tmp_3) {
                  ensureNotNull(activity).do3_1 = xpp.o7j();
                } else {
                  var tmp_5;
                  if (tagName === 'description') {
                    var tmp_6 = xpp.e();
                    tmp_5 = tmp_6 === 4;
                  } else {
                    tmp_5 = false;
                  }
                  if (tmp_5) {
                    ensureNotNull(activity).co3_1 = xpp.o7j();
                  } else {
                    if (xpp.p7j() === 'extensions') {
                      inExtensions = true;
                    }
                  }
                }
              }
            }
          } else {
            if (tagName === 'extension') {
              extKey = ensureNotNull(xpp.r7j(null, 'key'));
              var tmp_7;
              var tmp_8 = xpp.e();
              if (tmp_8 === 4) {
                var tmp0_elvis_lhs = xpp.o7j();
                tmp_7 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              } else {
                tmp_7 = '';
              }
              extVal = tmp_7;
              ensureNotNull(activity).jp0(extKey, extVal);
            }
          }
        } else {
          var tmp_9 = evtType;
          if (tmp_9 === 3) {
            if (!(xpp.p7j() == null)) {
              if (xpp.p7j() === 'activity') {
                if (!(ensureNotNull(activity).eo3_1 == null)) {
                  tcxml.wo2_1 = activity;
                  if (!storeActivities) {
                    break $l$1;
                  }
                }
              } else if (xpp.p7j() === 'extensions') {
                inExtensions = false;
              }
            }
          }
        }
        evtType = xpp.e();
      }
       while (false);
      var tmp_10 = evtType;
    }
     while (!(tmp_10 === 1));
    return tcxml;
  };
  protoOf(Companion_79).vo2 = function (xpp, parseFlags, $super) {
    parseFlags = parseFlags === VOID ? 0 : parseFlags;
    return $super === VOID ? this.kp0(xpp, parseFlags) : $super.kp0.call(this, xpp, parseFlags);
  };
  var Companion_instance_127;
  function Companion_getInstance_97() {
    return Companion_instance_127;
  }
  function TinCanXML() {
    this.wo2_1 = null;
    this.xo2_1 = false;
    this.yo2_1 = null;
  }
  function UriHelper() {
  }
  function avatarColorForName(name) {
    var hash = 0;
    // Inline function 'kotlin.text.forEach' call
    var inductionVariable = 0;
    while (inductionVariable < charSequenceLength(name)) {
      var element = charSequenceGet(name, inductionVariable);
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.util.avatarColorForName.<anonymous>' call
      // Inline function 'kotlin.code' call
      hash = Char__toInt_impl_vasixd(element) + ((hash << 5) - hash | 0) | 0;
    }
    var colorInt = hash | 255;
    return colorInt;
  }
  function requireEntryByUri(_this__u8e3s4, uri) {
    var tmp0_elvis_lhs = entryByUri(_this__u8e3s4, uri);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('Manifest has no entry for ' + uri);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function entryByUri(_this__u8e3s4, uri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.una_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.entryByUri.<anonymous>' call
        if (element.yna_1 === uri) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  }
  function bodyDataUrlForUri(_this__u8e3s4, uri) {
    var tmp0_safe_receiver = entryByUri(_this__u8e3s4, uri);
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gnb_1;
  }
  function requireBodyUrlForUri(_this__u8e3s4, uri) {
    return requireEntryByUri(_this__u8e3s4, uri).gnb_1;
  }
  function DiTag() {
    this.lp0_1 = 13;
    this.mp0_1 = 81;
    this.np0_1 = 12;
    this.op0_1 = 1;
    this.pp0_1 = 0;
    this.qp0_1 = 32;
    this.rp0_1 = 42;
  }
  var DiTag_instance;
  function DiTag_getInstance() {
    return DiTag_instance;
  }
  function tryReceiveAll(_this__u8e3s4, $this) {
    var resultList = mutableLinkedListOf([]);
    while (true) {
      var result = _this__u8e3s4.a1a();
      if (_ChannelResult___get_isSuccess__impl__odq1z9(result)) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = ChannelResult__getOrThrow_impl_od1axs(result);
        resultList.i1(element);
      } else
        return resultList;
    }
  }
  function EventCollator2$receiveEvent$slambda(this$0, resultContinuation) {
    this.ap1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EventCollator2$receiveEvent$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EventCollator2$receiveEvent$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EventCollator2$receiveEvent$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = delay(this.ap1_1.cp1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ap1_1.gp1_1 = null;
            this.hd_1 = 2;
            suspendResult = this.ap1_1.ep1_1(tryReceiveAll(this.ap1_1.fp1_1, this.ap1_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EventCollator2$receiveEvent$slambda).v1m = function ($this$launch, completion) {
    var i = new EventCollator2$receiveEvent$slambda(this.ap1_1, completion);
    i.bp1_1 = $this$launch;
    return i;
  };
  function EventCollator2$receiveEvent$slambda_0(this$0, resultContinuation) {
    var i = new EventCollator2$receiveEvent$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EventCollator2(maxWaitTime, coroutineScope, capacity, onBufferOverflow, onCollate) {
    this.cp1_1 = maxWaitTime;
    this.dp1_1 = coroutineScope;
    this.ep1_1 = onCollate;
    this.fp1_1 = Channel(capacity, onBufferOverflow);
    this.gp1_1 = null;
  }
  protoOf(EventCollator2).x73 = function (event) {
    this.fp1_1.w19(event);
    if (this.gp1_1 == null) {
      var tmp = this;
      tmp.gp1_1 = launch(this.dp1_1, VOID, VOID, EventCollator2$receiveEvent$slambda_0(this, null));
    }
  };
  function Companion_80() {
    Companion_instance_128 = this;
    this.hp1_1 = -1;
    this.ip1_1 = new MessageIdOption2(strings_getInstance().ell_1, this.hp1_1);
  }
  var Companion_instance_128;
  function Companion_getInstance_98() {
    if (Companion_instance_128 == null)
      new Companion_80();
    return Companion_instance_128;
  }
  function MessageIdOption2(stringResource, value) {
    Companion_getInstance_98();
    this.oow_1 = stringResource;
    this.pow_1 = value;
  }
  protoOf(MessageIdOption2).toString = function () {
    return 'MessageIdOption2(stringResource=' + this.oow_1 + ', value=' + this.pow_1 + ')';
  };
  protoOf(MessageIdOption2).hashCode = function () {
    var result = this.oow_1.hashCode();
    result = imul(result, 31) + this.pow_1 | 0;
    return result;
  };
  protoOf(MessageIdOption2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageIdOption2))
      return false;
    var tmp0_other_with_cast = other instanceof MessageIdOption2 ? other : THROW_CCE();
    if (!this.oow_1.equals(tmp0_other_with_cast.oow_1))
      return false;
    if (!(this.pow_1 === tmp0_other_with_cast.pow_1))
      return false;
    return true;
  };
  function get_MS_PER_HOUR() {
    return MS_PER_HOUR;
  }
  var MS_PER_HOUR;
  function get_MS_PER_MIN() {
    return MS_PER_MIN;
  }
  var MS_PER_MIN;
  function SortOrderOption(fieldMessageId, flag, order) {
    this.jp1_1 = fieldMessageId;
    this.kp1_1 = flag;
    this.lp1_1 = order;
  }
  protoOf(SortOrderOption).toString = function () {
    return 'SortOrderOption(fieldMessageId=' + this.jp1_1 + ', flag=' + this.kp1_1 + ', order=' + this.lp1_1 + ')';
  };
  protoOf(SortOrderOption).hashCode = function () {
    var result = this.jp1_1.hashCode();
    result = imul(result, 31) + this.kp1_1 | 0;
    result = imul(result, 31) + (this.lp1_1 == null ? 0 : getBooleanHashCode(this.lp1_1)) | 0;
    return result;
  };
  protoOf(SortOrderOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SortOrderOption))
      return false;
    var tmp0_other_with_cast = other instanceof SortOrderOption ? other : THROW_CCE();
    if (!this.jp1_1.equals(tmp0_other_with_cast.jp1_1))
      return false;
    if (!(this.kp1_1 === tmp0_other_with_cast.kp1_1))
      return false;
    if (!(this.lp1_1 == tmp0_other_with_cast.lp1_1))
      return false;
    return true;
  };
  function splitString($this, str, splitChar) {
    var numParts = countChar($this, str, splitChar);
    // Inline function 'kotlin.arrayOfNulls' call
    var size = numParts + 1 | 0;
    var splitStr = fillArrayVal(Array(size), null);
    var buffer = StringBuilder_init_$Create$();
    var partCounter = 0;
    var currentChar;
    var inductionVariable = 0;
    var last = str.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        currentChar = charSequenceGet(str, i);
        if (currentChar === splitChar) {
          splitStr[partCounter] = buffer.toString();
          partCounter = partCounter + 1 | 0;
          buffer = StringBuilder_init_$Create$();
        } else {
          buffer.z5(currentChar);
        }
      }
       while (inductionVariable < last);
    splitStr[partCounter] = buffer.toString();
    return splitStr;
  }
  function countChar($this, str, c) {
    var count = 0;
    var strLen = str.length;
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (charSequenceGet(str, i) === c) {
          count = count + 1 | 0;
        }
      }
       while (inductionVariable < strLen);
    return count;
  }
  function isWhiteSpace($this, c) {
    return ((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(9)) ? true : c === _Char___init__impl__6a9atx(13);
  }
  function UMFileUtil() {
    UMFileUtil_instance = this;
    this.jo3_1 = _Char___init__impl__6a9atx(47);
    this.ko3_1 = 'file:///';
    this.lo3_1 = new Long(1073741824, 0);
    this.mo3_1 = new Long(1048576, 0);
    this.no3_1 = new Long(1024, 0);
  }
  protoOf(UMFileUtil).ho9 = function (paths) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>' call
    // Inline function 'kotlin.collections.forEachIndexed' call
    var index = 0;
    var inductionVariable = 0;
    var last = paths.length;
    while (inductionVariable < last) {
      var item = paths[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var tmp;
      if (tmp1 > 0) {
        tmp = removePrefix(item, '/');
      } else {
        tmp = item;
      }
      this_0.y5(tmp);
      if (tmp1 < (paths.length - 1 | 0) ? !endsWith(item, '/') : false) {
        this_0.z5(_Char___init__impl__6a9atx(47));
      }
    }
    return this_0.toString();
  };
  protoOf(UMFileUtil).oo3 = function (baseLink, link) {
    var base = baseLink;
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var linkLower = link.toLowerCase();
    var charFoundIndex;
    charFoundIndex = indexOf_0(linkLower, '://');
    if (!(charFoundIndex === -1)) {
      var isAllChars = true;
      var cc;
      var inductionVariable = 0;
      var last = charFoundIndex;
      if (inductionVariable < last)
        do {
          var i = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          cc = charSequenceGet(linkLower, i);
          isAllChars = !!(isAllChars & (((((Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(97)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(122)) < 0 : false) ? true : Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(48)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(57)) < 0 : false) ? true : cc === _Char___init__impl__6a9atx(43)) ? true : cc === _Char___init__impl__6a9atx(46)) ? true : cc === _Char___init__impl__6a9atx(45)));
        }
         while (inductionVariable < last);
      if (isAllChars) {
        return link;
      }
    }
    if (startsWith(link, 'data:')) {
      return link;
    }
    if ((link.length > 2 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) ? charSequenceGet(link, 1) === _Char___init__impl__6a9atx(47) : false) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = base;
      var endIndex = indexOf(base, _Char___init__impl__6a9atx(58)) + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      return this_0.substring(0, endIndex) + link;
    }
    if (link.length > 1 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) {
      var serverStartPos = indexOf_0(base, '://') + 3 | 0;
      var serverFinishPos = indexOf(base, _Char___init__impl__6a9atx(47), serverStartPos + 1 | 0);
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      return base.substring(0, serverFinishPos) + link;
    }
    charFoundIndex = indexOf(base, _Char___init__impl__6a9atx(63));
    if (!(charFoundIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_1 = base;
      var endIndex_0 = charFoundIndex;
      // Inline function 'kotlin.js.asDynamic' call
      base = this_1.substring(0, endIndex_0);
    }
    charFoundIndex = lastIndexOf(base, _Char___init__impl__6a9atx(47));
    if (charFoundIndex === -1) {
      return link;
    }
    // Inline function 'kotlin.text.substring' call
    var this_2 = base;
    var endIndex_1 = charFoundIndex;
    // Inline function 'kotlin.js.asDynamic' call
    base = this_2.substring(0, endIndex_1);
    var baseParts = splitString(this, base, _Char___init__impl__6a9atx(47));
    var linkParts = splitString(this, link, _Char___init__impl__6a9atx(47));
    // Inline function 'kotlin.collections.mutableListOf' call
    var resultVector = ArrayList_init_$Create$();
    var inductionVariable_0 = 0;
    var last_0 = baseParts.length - 1 | 0;
    if (inductionVariable_0 <= last_0)
      do {
        var i_0 = inductionVariable_0;
        inductionVariable_0 = inductionVariable_0 + 1 | 0;
        resultVector.i1(ensureNotNull(baseParts[i_0]));
      }
       while (inductionVariable_0 <= last_0);
    var inductionVariable_1 = 0;
    var last_1 = linkParts.length - 1 | 0;
    if (inductionVariable_1 <= last_1)
      $l$loop: do {
        var i_1 = inductionVariable_1;
        inductionVariable_1 = inductionVariable_1 + 1 | 0;
        if (linkParts[i_1] === '.') {
          continue $l$loop;
        }
        if (linkParts[i_1] === '..') {
          resultVector.s1(resultVector.u() - 1 | 0);
        } else {
          resultVector.i1(ensureNotNull(linkParts[i_1]));
        }
      }
       while (inductionVariable_1 <= last_1);
    var resultSB = StringBuilder_init_$Create$();
    var numElements = resultVector.u();
    var inductionVariable_2 = 0;
    if (inductionVariable_2 < numElements)
      do {
        var i_2 = inductionVariable_2;
        inductionVariable_2 = inductionVariable_2 + 1 | 0;
        // Inline function 'kotlin.collections.elementAt' call
        var tmp$ret$11 = resultVector.v(i_2);
        resultSB.y5(tmp$ret$11);
        if (i_2 < (numElements - 1 | 0)) {
          resultSB.z5(_Char___init__impl__6a9atx(47));
        }
      }
       while (inductionVariable_2 < numElements);
    return resultSB.toString();
  };
  protoOf(UMFileUtil).mp1 = function (str, deliminator) {
    var paramName = null;
    var params = HashMap_init_$Create$();
    var inQuotes = false;
    var strLen = str.length;
    var sb = StringBuilder_init_$Create$();
    var c;
    var lastChar = _Char___init__impl__6a9atx(0);
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        c = charSequenceGet(str, i);
        if (c === _Char___init__impl__6a9atx(34)) {
          if (!inQuotes) {
            inQuotes = true;
          } else if (inQuotes ? !(lastChar === _Char___init__impl__6a9atx(92)) : false) {
            inQuotes = false;
          }
        }
        if (!((isWhiteSpace(this, c) ? !inQuotes : false) ? true : c === _Char___init__impl__6a9atx(34) ? i < (strLen - 1 | 0) : false))
          if (c === deliminator ? true : i === (strLen - 1 | 0)) {
            if (i === (strLen - 1 | 0) ? !(c === _Char___init__impl__6a9atx(34)) : false) {
              sb.z5(c);
            }
            if (!(paramName == null)) {
              // Inline function 'kotlin.collections.set' call
              var key = paramName;
              var value = sb.toString();
              params.s(key, value);
            } else {
              // Inline function 'kotlin.collections.set' call
              var key_0 = sb.toString();
              params.s(key_0, '');
            }
            sb = StringBuilder_init_$Create$();
            paramName = null;
          } else if (c === _Char___init__impl__6a9atx(61)) {
            paramName = sb.toString();
            sb = StringBuilder_init_$Create$();
          } else {
            sb.z5(c);
          }
        lastChar = c;
      }
       while (inductionVariable < strLen);
    return params;
  };
  protoOf(UMFileUtil).parseURLQueryString = function (urlQuery) {
    var retVal = urlQuery;
    var queryPos = indexOf(retVal, _Char___init__impl__6a9atx(63));
    if (!(queryPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = retVal;
      var startIndex = queryPos + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      retVal = this_0.substring(startIndex);
    }
    var parsedParams = this.mp1(retVal, _Char___init__impl__6a9atx(38));
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(parsedParams.u());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = parsedParams.q2().w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.parseURLQueryString.<anonymous>' call
      var tmp$ret$3 = to(Companion_instance_239.np1(item.s2()), Companion_instance_239.np1(item.t2()));
      destination.i1(tmp$ret$3);
    }
    return toMap(destination);
  };
  protoOf(UMFileUtil).mapToQueryString = function (ht) {
    var sb = StringBuilder_init_$Create$();
    if (ht.c1()) {
      return '';
    }
    var keys = ht.o2().w();
    var key;
    var firstEl = true;
    while (keys.f()) {
      if (!firstEl) {
        sb.z5(_Char___init__impl__6a9atx(38));
      } else {
        firstEl = false;
      }
      key = keys.e();
      sb.y5(Companion_instance_239.op1(key)).z5(_Char___init__impl__6a9atx(61));
      var tmp = Companion_instance_239;
      var tmp_0 = ht.q(key);
      sb.y5(tmp.op1((!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE()));
    }
    return sb.toString();
  };
  protoOf(UMFileUtil).pp1 = function (fileSize) {
    var unit;
    var factor;
    if (fileSize.c7(new Long(1073741824, 0)) > 0) {
      factor = new Long(1073741824, 0);
      unit = 'GB';
    } else if (fileSize.c7(new Long(1048576, 0)) > 0) {
      factor = new Long(1048576, 0);
      unit = 'MB';
    } else if (fileSize.c7(new Long(1024, 0)) > 0) {
      factor = new Long(1024, 0);
      unit = 'kB';
    } else {
      factor = new Long(1, 0);
      unit = 'bytes';
    }
    var unitSize = fileSize.a7() / factor.a7();
    unitSize = round(unitSize * 100) / 100.0;
    return '' + unitSize + ' ' + unit;
  };
  protoOf(UMFileUtil).qp1 = function (fileSize) {
    var fileSizeMb = roundTo(fileSize.zc() / 1048576, 2);
    return '' + fileSizeMb + ' MB';
  };
  var UMFileUtil_instance;
  function UMFileUtil_getInstance() {
    if (UMFileUtil_instance == null)
      new UMFileUtil();
    return UMFileUtil_instance;
  }
  function Companion_81() {
    this.rp1_1 = '/#/';
  }
  protoOf(Companion_81).sp1 = function (url, divider) {
    var dividerIndex = indexOf_0(url, divider);
    if (dividerIndex === -1)
      throw IllegalArgumentException_init_$Create$('Not a valid UstadUrl: ' + url);
    // Inline function 'kotlin.text.substring' call
    var endIndex = dividerIndex + 1 | 0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$1 = url.substring(0, endIndex);
    var endpoint = removeSuffix(tmp$ret$1, 'umapp/');
    var queryIndex = indexOf_0(url, '?', dividerIndex);
    var viewName;
    var queryString;
    if (queryIndex === -1 ? true : queryIndex === (url.length - 1 | 0)) {
      // Inline function 'kotlin.text.substring' call
      var startIndex = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = url.substring(startIndex);
      viewName = removeSuffix(tmp$ret$3, '?');
      queryString = '';
    } else {
      // Inline function 'kotlin.text.substring' call
      var startIndex_0 = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      viewName = url.substring(startIndex_0, queryIndex);
      // Inline function 'kotlin.text.substring' call
      var startIndex_1 = queryIndex + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      queryString = url.substring(startIndex_1);
    }
    return new UstadUrlComponents(endpoint, viewName, queryString);
  };
  protoOf(Companion_81).tp1 = function (url, divider, $super) {
    divider = divider === VOID ? '/#/' : divider;
    return $super === VOID ? this.sp1(url, divider) : $super.sp1.call(this, url, divider);
  };
  var Companion_instance_129;
  function Companion_getInstance_99() {
    return Companion_instance_129;
  }
  function UstadUrlComponents$arguments$delegate$lambda(this$0) {
    return function () {
      var parsedParams = UMFileUtil_getInstance().mp1(this$0.sng_1, _Char___init__impl__6a9atx(38));
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(parsedParams.u());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = parsedParams.q2().w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.UstadUrlComponents.arguments$delegate.<anonymous>.<anonymous>' call
        var tmp$ret$1 = to(Companion_instance_239.np1(item.s2()), Companion_instance_239.np1(item.t2()));
        destination.i1(tmp$ret$1);
      }
      return toMap(destination);
    };
  }
  function UstadUrlComponents$viewUri$delegate$lambda(this$0) {
    return function () {
      var tmp;
      // Inline function 'kotlin.text.isEmpty' call
      var this_0 = this$0.sng_1;
      if (charSequenceLength(this_0) === 0) {
        tmp = this$0.rng_1;
      } else {
        tmp = this$0.rng_1 + '?' + this$0.sng_1;
      }
      return tmp;
    };
  }
  function UstadUrlComponents(endpoint, viewName, queryString) {
    this.qng_1 = endpoint;
    this.rng_1 = viewName;
    this.sng_1 = queryString;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.tng_1 = lazy(tmp_0, UstadUrlComponents$arguments$delegate$lambda(this));
    var tmp_1 = this;
    tmp_1.ung_1 = lazy_0(UstadUrlComponents$viewUri$delegate$lambda(this));
  }
  protoOf(UstadUrlComponents).up1 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.ung_1;
    viewUri$factory();
    return this_0.t2();
  };
  protoOf(UstadUrlComponents).vp1 = function (divider) {
    return UMFileUtil_getInstance().ho9([this.qng_1, divider, this.up1()]);
  };
  protoOf(UstadUrlComponents).vng = function (divider, $super) {
    var tmp;
    if (divider === VOID) {
      Companion_getInstance_92();
      tmp = '/umapp/#/';
    } else {
      tmp = divider;
    }
    divider = tmp;
    return $super === VOID ? this.vp1(divider) : $super.vp1.call(this, divider);
  };
  protoOf(UstadUrlComponents).toString = function () {
    return 'UstadUrlComponents(endpoint=' + this.qng_1 + ', viewName=' + this.rng_1 + ', queryString=' + this.sng_1 + ')';
  };
  protoOf(UstadUrlComponents).hashCode = function () {
    var result = getStringHashCode(this.qng_1);
    result = imul(result, 31) + getStringHashCode(this.rng_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.sng_1) | 0;
    return result;
  };
  protoOf(UstadUrlComponents).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadUrlComponents))
      return false;
    var tmp0_other_with_cast = other instanceof UstadUrlComponents ? other : THROW_CCE();
    if (!(this.qng_1 === tmp0_other_with_cast.qng_1))
      return false;
    if (!(this.rng_1 === tmp0_other_with_cast.rng_1))
      return false;
    if (!(this.sng_1 === tmp0_other_with_cast.sng_1))
      return false;
    return true;
  };
  function viewUri$factory() {
    return getPropertyCallableRef('viewUri', 1, KProperty1, function (receiver) {
      return receiver.up1();
    }, null);
  }
  function roundTo(_this__u8e3s4, decimalPlaces) {
    decimalPlaces = decimalPlaces === VOID ? 0 : decimalPlaces;
    // Inline function 'kotlin.math.pow' call
    var factor = Math.pow(10.0, decimalPlaces);
    return roundToInt(_this__u8e3s4 * factor) / factor;
  }
  function toDisplayString(_this__u8e3s4, decimalPlaces) {
    decimalPlaces = decimalPlaces === VOID ? 2 : decimalPlaces;
    var strVal = _this__u8e3s4.toString();
    var tmp;
    // Inline function 'kotlin.math.round' call
    if (round(_this__u8e3s4) === _this__u8e3s4) {
      tmp = substringBefore(strVal, _Char___init__impl__6a9atx(46));
    } else {
      tmp = removeSuffix(roundTo(_this__u8e3s4, decimalPlaces).toString(), '0');
    }
    return tmp;
  }
  function paramSubtitles(_this__u8e3s4, json) {
    var tmp0_safe_receiver = paramMap(_this__u8e3s4, json);
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = tmp0_safe_receiver.q('subtitles');
    }
    var tmp1_safe_receiver = tmp;
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramSubtitles.<anonymous>' call
      tmp_0 = json.x4b(ListSerializer(Companion_instance_79.s4x()), tmp1_safe_receiver);
    }
    return tmp_0;
  }
  function paramMap(_this__u8e3s4, json) {
    var tmp0_safe_receiver = _this__u8e3s4.tb4_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramMap.<anonymous>' call
      tmp = json.x4b(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), tmp0_safe_receiver);
    }
    return tmp;
  }
  function penaltyPercentage(_this__u8e3s4) {
    // Inline function 'kotlin.math.roundToInt' call
    var this_0 = _this__u8e3s4.cbo_1 * 100 / (_this__u8e3s4.abo_1 + _this__u8e3s4.cbo_1);
    return roundToInt(this_0);
  }
  function textLength(_this__u8e3s4, limitType) {
    var tmp;
    if (limitType === 1) {
      var tmp0_safe_receiver = _this__u8e3s4.dbu_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : countWords(tmp1_safe_receiver);
      tmp = tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
    } else {
      if (limitType === 2) {
        var tmp3_safe_receiver = _this__u8e3s4.dbu_1;
        var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : htmlToPlainText(tmp3_safe_receiver);
        var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.length;
        tmp = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function lastPossibleSubmissionTime(_this__u8e3s4) {
    if (isDateSet(_this__u8e3s4.y83_1) ? _this__u8e3s4.y83_1.c7(_this__u8e3s4.w83_1) > 0 : false)
      return _this__u8e3s4.y83_1;
    else
      return _this__u8e3s4.w83_1;
  }
  function maxScoreSummedIfModule(_this__u8e3s4, allBlocks) {
    var tmp = _this__u8e3s4.p83_1;
    if (!(tmp === 100))
      return _this__u8e3s4.z83_1;
    var totalModPoints = 0.0;
    var numModBlocks = 0;
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = allBlocks.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.maxScoreSummedIfModule.<anonymous>' call
      if (element.r83_1.equals(_this__u8e3s4.o83_1)) {
        numModBlocks = numModBlocks + 1 | 0;
        var tmp_0 = totalModPoints;
        var tmp1_elvis_lhs = element.z83_1;
        totalModPoints = tmp_0 + (tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs);
      }
    }
    return (numModBlocks > 0 ? totalModPoints > 0.0 : false) ? totalModPoints : null;
  }
  function toTerminologyEntries(_this__u8e3s4, json, systemImpl) {
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.j8m_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      tmp = decodeStringMapFromString(json, tmp1_safe_receiver);
    }
    var tmp2_elvis_lhs = tmp;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      // Inline function 'kotlin.collections.mapOf' call
      tmp_0 = emptyMap();
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var termMap = tmp_0;
    // Inline function 'kotlin.collections.map' call
    var this_0 = TerminologyKeys_getInstance().pnc_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(this_0.u());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = this_0.q2().w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      var tmp_1 = item.s2();
      var tmp_2 = item.t2();
      var tmp1_elvis_lhs = termMap.q(item.s2());
      var tmp_3;
      if (tmp1_elvis_lhs == null) {
        tmp_3 = systemImpl == null ? null : systemImpl.rnd(item.t2());
      } else {
        tmp_3 = tmp1_elvis_lhs;
      }
      var tmp$ret$4 = new TerminologyEntry(tmp_1, tmp_2, tmp_3);
      destination.i1(tmp$ret$4);
    }
    return destination;
  }
  function encodeToStringMap(_this__u8e3s4, json) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.encodeToStringMap.<anonymous>' call
      var tmp0_elvis_lhs = item.jox_1;
      var tmp$ret$0 = to(item.hox_1, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    return encodeStringMapToString(json, toMap(destination));
  }
  function onActiveEndpoint(_this__u8e3s4) {
    // Inline function 'org.kodein.di.on' call
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(_this__u8e3s4).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var context = tmp.i5e(tmp$ret$0, null).kn5();
    var trigger = _this__u8e3s4.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_1 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp$ret$3 = tmp_1.m5d(tmp$ret$2, context);
    return On(_this__u8e3s4, tmp$ret$3, trigger);
  }
  function get_dayStringResource(_this__u8e3s4) {
    switch (_this__u8e3s4.za_1) {
      case 0:
        return strings_getInstance().xlw_1;
      case 1:
        return strings_getInstance().ylw_1;
      case 2:
        return strings_getInstance().zlw_1;
      case 3:
        return strings_getInstance().alx_1;
      case 4:
        return strings_getInstance().blx_1;
      case 5:
        return strings_getInstance().clx_1;
      case 6:
        return strings_getInstance().wlw_1;
      default:
        return strings_getInstance().wli_1;
    }
  }
  function verifySite(_this__u8e3s4, endpointUrl, timeout, json, $completion) {
    timeout = timeout === VOID ? new Long(30000, 0) : timeout;
    var tmp = new $verifySiteCOROUTINE$44(_this__u8e3s4, endpointUrl, timeout, json, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function verifySite$lambda($timeout) {
    return function ($this$timeout) {
      $this$timeout.p3w($timeout);
      return Unit_instance;
    };
  }
  function $verifySiteCOROUTINE$44(_this__u8e3s4, endpointUrl, timeout, json, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ep2_1 = _this__u8e3s4;
    this.fp2_1 = endpointUrl;
    this.gp2_1 = timeout;
    this.hp2_1 = json;
  }
  protoOf($verifySiteCOROUTINE$44).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.ip2_1 = UMFileUtil_getInstance().ho9([this.fp2_1, 'Site', 'verify']);
            var tmp_0 = this;
            tmp_0.jp2_1 = this.ep2_1;
            var tmp_1 = this;
            tmp_1.kp2_1 = this.ip2_1;
            var tmp_2 = this;
            tmp_2.lp2_1 = this.jp2_1;
            var tmp_3 = this;
            tmp_3.mp2_1 = this.lp2_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.kp2_1);
            header(this_0, 'cache-control', 'no-cache');
            timeout(this_0, verifySite$lambda(this.gp2_1));
            tmp_4.np2_1 = this_0;
            this.np2_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_5 = this;
            tmp_5.op2_1 = this.mp2_1;
            var tmp_6 = this;
            tmp_6.pp2_1 = this.np2_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.pp2_1, this.op2_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qp2_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.qp2_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var responseStr = suspendResult;
            return this.hp2_1.x4b(Companion_instance_30.s4x(), responseStr);
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function toMap_1(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4 instanceof MapStringValues) {
      tmp = _this__u8e3s4.rp2_1;
    } else {
      // Inline function 'kotlin.collections.map' call
      var this_0 = _this__u8e3s4.s2p();
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.ext.toMap.<anonymous>' call
        var tmp$ret$0 = to(item, _this__u8e3s4.r2p(item));
        destination.i1(tmp$ret$0);
      }
      tmp = toMap(destination);
    }
    return tmp;
  }
  function toLocalMidnight(_this__u8e3s4, timeZoneId) {
    return toLocalMidnight_0(_this__u8e3s4, Companion_getInstance_9().klh(timeZoneId));
  }
  function toLocalEndOfDay(_this__u8e3s4, timeZoneId) {
    return toLocalEndOfDay_0(_this__u8e3s4, Companion_getInstance_9().klh(timeZoneId));
  }
  function isDateOfBirthAnAdult(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) >= UstadMobileConstants_getInstance().zos_1;
  }
  function isDateOfBirthAMinor(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) < UstadMobileConstants_getInstance().yos_1;
  }
  function toLocalMidnight_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalMidnight_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function toLocalEndOfDay_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalEndOfDay_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function ageInYears(_this__u8e3s4) {
    return periodUntil(_this__u8e3s4, System_instance.nle(), Companion_getInstance_9().jlh_1).vle();
  }
  function hasFlag(_this__u8e3s4, flag) {
    return (_this__u8e3s4 & flag) === flag;
  }
  function decodeStringMapFromString(_this__u8e3s4, string) {
    return _this__u8e3s4.x4b(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), string);
  }
  function encodeStringMapToString(_this__u8e3s4, stringMap) {
    return _this__u8e3s4.w4b(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), stringMap);
  }
  function decodeListOrSingleObjectAsList(_this__u8e3s4, serializer, element) {
    var tmp;
    if (element instanceof JsonArray) {
      tmp = _this__u8e3s4.t4v(ListSerializer(serializer), element);
    } else {
      if (element instanceof JsonObject) {
        tmp = listOf_0(_this__u8e3s4.t4v(serializer, element));
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function replaceOrAppend(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    var tmp;
    if (replaceIndex >= 0) {
      // Inline function 'kotlin.also' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.replaceOrAppend.<anonymous>' call
      this_0.f1(replaceIndex, element);
      tmp = toList(this_0);
    } else {
      tmp = plus_1(_this__u8e3s4, element);
    }
    return tmp;
  }
  function findKeysNotInOtherList(_this__u8e3s4, otherList, key) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(otherList, 10));
    var tmp0_iterator = otherList.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      destination.i1(key(item));
    }
    var otherListKeys = destination;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator_0 = _this__u8e3s4.w();
    while (tmp0_iterator_0.f()) {
      var item_0 = tmp0_iterator_0.e();
      destination_0.i1(key(item_0));
    }
    var thisListKeys = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = thisListKeys.w();
    while (tmp0_iterator_1.f()) {
      var element = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.util.ext.findKeysNotInOtherList.<anonymous>' call
      if (!otherListKeys.a1(element)) {
        destination_1.i1(element);
      }
    }
    return destination_1;
  }
  function replace_0(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    if (replaceIndex === -1)
      throw IllegalArgumentException_init_$Create$('element to replace not found');
    // Inline function 'kotlin.also' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.replace.<anonymous>' call
    this_0.f1(replaceIndex, element);
    return toList(this_0);
  }
  function trimToSize(_this__u8e3s4, maxSize) {
    var tmp;
    if (_this__u8e3s4.u() > maxSize) {
      tmp = _this__u8e3s4.z(0, maxSize);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function toEmptyIfNull(_this__u8e3s4) {
    return _this__u8e3s4 == null ? emptyList() : _this__u8e3s4;
  }
  function filterByFlags(_this__u8e3s4, value) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.filterByFlags.<anonymous>' call
      if (hasFlag_0(value, element.x6_1)) {
        destination.i1(element);
      }
    }
    return destination;
  }
  function toLocalMidnight_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.hli(), LocalTime_init_$Create$(0, 0, 0));
  }
  function toLocalEndOfDay_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.hli(), LocalTime_init_$Create$(23, 59, 59));
  }
  function chopOffSeconds(_this__u8e3s4) {
    if (_this__u8e3s4.fli() > 0 ? true : _this__u8e3s4.gli() > 0) {
      return LocalDateTime_init_$Create$(_this__u8e3s4.hli(), LocalTime_init_$Create$(_this__u8e3s4.dli(), _this__u8e3s4.eli()));
    } else {
      return _this__u8e3s4;
    }
  }
  function chopOffSeconds_0(_this__u8e3s4) {
    if (_this__u8e3s4.fli() > 0 ? true : _this__u8e3s4.gli() > 0)
      return LocalTime_init_$Create$(_this__u8e3s4.dli(), _this__u8e3s4.eli());
    else
      return _this__u8e3s4;
  }
  function hasFlag_0(_this__u8e3s4, flag) {
    return _this__u8e3s4.uc(flag).equals(flag);
  }
  function toggleFlag(_this__u8e3s4, flag) {
    var tmp;
    if (hasFlag_0(_this__u8e3s4, flag)) {
      tmp = _this__u8e3s4.uc(flag.qc());
    } else {
      tmp = _this__u8e3s4.vc(flag);
    }
    return tmp;
  }
  function isDateSet(_this__u8e3s4) {
    return (!(_this__u8e3s4 == null) ? _this__u8e3s4.c7(new Long(0, 0)) > 0 : false) ? _this__u8e3s4.c7(new Long(-376330240, 1689)) < 0 : false;
  }
  function get_UNSET_DISTANT_FUTURE() {
    return UNSET_DISTANT_FUTURE;
  }
  var UNSET_DISTANT_FUTURE;
  function toByteArray(_this__u8e3s4) {
    var buffer = new Int8Array(8);
    var temp = _this__u8e3s4;
    var inductionVariable = 0;
    if (inductionVariable < 8)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        buffer[7 - i | 0] = temp.uc(new Long(255, 0)).xc();
        temp = temp.sc(8);
      }
       while (inductionVariable < 8);
    return buffer;
  }
  function putFromSavedStateIfPresent(_this__u8e3s4, savedState, key) {
    var tmp0_safe_receiver = savedState.ba(key);
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.putFromSavedStateIfPresent.<anonymous>' call
      _this__u8e3s4.s(key, tmp0_safe_receiver);
    }
  }
  function toQueryString(_this__u8e3s4) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.q2();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.toQueryString.<anonymous>' call
      var tmp$ret$0 = Companion_instance_239.op1(item.s2()) + '=' + Companion_instance_239.op1(item.t2());
      destination.i1(tmp$ret$0);
    }
    return joinToString(destination, '&');
  }
  function whenSubscribed(_this__u8e3s4, block, $completion) {
    // Inline function 'kotlinx.coroutines.flow.map' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.n1h();
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    var tmp$ret$2 = new _no_name_provided__qut3iv_1(this_0);
    var tmp = distinctUntilChanged(tmp$ret$2);
    return collectLatest(tmp, whenSubscribed$slambda_0(block, null), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_2(function_0) {
    this.sp2_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_2).t1d = function (value, $completion) {
    return this.sp2_1(value, $completion);
  };
  function whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.bp3_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$o$collect$slambda).i1i = function (value, $completion) {
    var tmp = this.j1i(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$o$collect$slambda).he = function (p1, $completion) {
    return this.i1i((!(p1 == null) ? typeof p1 === 'number' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.dp3_1 = this.bp3_1;
            var tmp_1 = this;
            tmp_1.ep3_1 = this.cp3_1;
            this.hd_1 = 1;
            var it = this.ep3_1;
            suspendResult = this.dp3_1.t1d(it > 0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(whenSubscribed$o$collect$slambda).j1i = function (value, completion) {
    var i = new whenSubscribed$o$collect$slambda(this.bp3_1, completion);
    i.cp3_1 = value;
    return i;
  };
  function whenSubscribed$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.i1i(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$45(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.np3_1 = _this__u8e3s4;
    this.op3_1 = collector;
  }
  protoOf($collectCOROUTINE$45).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.pp3_1 = this.op3_1;
            this.hd_1 = 1;
            var tmp_1 = whenSubscribed$o$collect$slambda_0(this.pp3_1, null);
            suspendResult = this.np3_1.qp3_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_2(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 _no_name_provided__qut3iv_1($this) {
    this.qp3_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_1).rp3 = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$45(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_1).z1b = function (collector, $completion) {
    return this.rp3(collector, $completion);
  };
  function whenSubscribed$slambda($block, resultContinuation) {
    this.ap4_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$slambda).cp4 = function (active, $completion) {
    var tmp = this.dp4(active, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.bp4_1) {
              this.hd_1 = 1;
              suspendResult = this.ap4_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(whenSubscribed$slambda).dp4 = function (active, completion) {
    var i = new whenSubscribed$slambda(this.ap4_1, completion);
    i.bp4_1 = active;
    return i;
  };
  function whenSubscribed$slambda_0($block, resultContinuation) {
    var i = new whenSubscribed$slambda($block, resultContinuation);
    var l = function (active, $completion) {
      return i.cp4(active, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function navigateToLink(_this__u8e3s4, link, accountManager, openExternalLinkUseCase, goOptions, forceAccountSelection, userCanSelectServer, accountName, scope, linkTarget, dontSetCurrentSession) {
    goOptions = goOptions === VOID ? Companion_getInstance_91().cot_1 : goOptions;
    forceAccountSelection = forceAccountSelection === VOID ? false : forceAccountSelection;
    userCanSelectServer = userCanSelectServer === VOID ? true : userCanSelectServer;
    accountName = accountName === VOID ? null : accountName;
    scope = scope === VOID ? GlobalScope_instance : scope;
    linkTarget = linkTarget === VOID ? LinkTarget_DEFAULT_getInstance() : linkTarget;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    var endpointUrl = {_v: null};
    var viewUri = {_v: null};
    var tmp;
    if (startsWithHttpProtocol(link)) {
      tmp = contains(link, '/#/');
    } else {
      tmp = false;
    }
    if (tmp) {
      var urlComponents = Companion_instance_129.tp1(link);
      endpointUrl._v = urlComponents.qng_1;
      viewUri._v = urlComponents.up1();
    } else {
      if (!startsWithHttpProtocol(link)) {
        viewUri._v = link;
      }
    }
    var tmp_0;
    var tmp0_safe_receiver = viewUri._v;
    var tmp_1;
    if (tmp0_safe_receiver == null) {
      tmp_1 = null;
    } else {
      tmp_1 = startsWith(tmp0_safe_receiver, 'ParentalConsentManagement');
    }
    if (tmp_1 === true) {
      tmp_0 = minus(System_instance.nle(), UstadMobileConstants_getInstance().zos_1, Companion_getInstance_10().ylf_1, Companion_getInstance_9().jlh_1).tlh();
    } else {
      tmp_0 = new Long(0, 0);
    }
    var maxDateOfBirth = tmp_0;
    var tmp_2;
    if (viewUri._v == null ? true : (!userCanSelectServer ? !(endpointUrl._v == null) : false) ? !(endpointUrl._v === accountManager.kn5().hmr_1) : false) {
      openExternalLinkUseCase.mo9(link, linkTarget);
      tmp_2 = null;
    } else {
      tmp_2 = launch(scope, VOID, VOID, navigateToLink$slambda_0(accountName, endpointUrl, accountManager, dontSetCurrentSession, _this__u8e3s4, viewUri, goOptions, forceAccountSelection, maxDateOfBirth, userCanSelectServer, null));
    }
    return tmp_2;
  }
  function navigateToViewUri(_this__u8e3s4, viewUri, goOptions) {
    var questionIndex = indexOf(viewUri, _Char___init__impl__6a9atx(63));
    var tmp;
    if (!(questionIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = viewUri.substring(0, questionIndex);
    } else {
      tmp = viewUri;
    }
    var viewName = tmp;
    var tmp_0;
    if (questionIndex > 0) {
      var tmp_1 = UMFileUtil_getInstance();
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = viewUri.substring(questionIndex);
      tmp_0 = tmp_1.parseURLQueryString(tmp$ret$3);
    } else {
      tmp_0 = emptyMap();
    }
    var args = tmp_0;
    _this__u8e3s4.doy(viewName, args, goOptions);
  }
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(function_0) {
    this.ep4_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1).qmx = function (endpointUrl) {
    return this.ep4_1(endpointUrl);
  };
  function navigateToLink$slambda$lambda($endpointUrl) {
    return function (filterUrl) {
      return filterUrl === $endpointUrl._v;
    };
  }
  function navigateToLink$slambda$lambda_0($endpointUrl) {
    return function (it) {
      return it === $endpointUrl._v;
    };
  }
  function navigateToLink$slambda($accountName, $endpointUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $userCanSelectServer, resultContinuation) {
    this.np4_1 = $accountName;
    this.op4_1 = $endpointUrl;
    this.pp4_1 = $accountManager;
    this.qp4_1 = $dontSetCurrentSession;
    this.rp4_1 = $this_navigateToLink;
    this.sp4_1 = $viewUri;
    this.tp4_1 = $goOptions;
    this.up4_1 = $forceAccountSelection;
    this.vp4_1 = $maxDateOfBirth;
    this.wp4_1 = $userCanSelectServer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(navigateToLink$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(navigateToLink$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(navigateToLink$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 17;
            if (!(this.np4_1 == null) ? !(this.op4_1._v == null) : false) {
              this.hd_1 = 10;
              continue $sm;
            } else {
              if ((!this.up4_1 ? !isTemporary(this.pp4_1.rn4().wmr_1) : false) ? this.op4_1._v == null ? true : this.pp4_1.kn5().hmr_1 === this.op4_1._v : false) {
                navigateToViewUri(this.rp4_1, this.sp4_1._v, this.tp4_1);
                this.hd_1 = 16;
                continue $sm;
              } else {
                if (!(this.op4_1._v == null)) {
                  this.hd_1 = 1;
                  var tmp_0 = navigateToLink$slambda$lambda_0(this.op4_1);
                  suspendResult = this.pp4_1.ln5(this.vp4_1, new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.ap5_1 = false;
                  this.hd_1 = 2;
                  continue $sm;
                }
              }
            }

          case 1:
            this.bp5_1 = suspendResult;
            this.ap5_1 = this.bp5_1 === 0;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.ap5_1) {
              this.zp4_1 = true;
              this.hd_1 = 6;
              continue $sm;
            } else {
              if (this.op4_1._v == null) {
                this.hd_1 = 3;
                suspendResult = this.pp4_1.mn5(this.vp4_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.dp5_1 = false;
                this.hd_1 = 4;
                continue $sm;
              }
            }

          case 3:
            this.ep5_1 = suspendResult;
            this.dp5_1 = this.ep5_1 === 0;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (this.dp5_1) {
              this.cp5_1 = !this.wp4_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.cp5_1 = false;
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            this.zp4_1 = this.cp5_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            if (this.zp4_1) {
              Companion_getInstance_110();
              var tmp_1 = to('next', this.sp4_1._v);
              Companion_getInstance_120();
              var args = mutableMapOf([tmp_1, to('noSessionChange', this.qp4_1.toString())]);
              if (!(this.op4_1._v == null)) {
                Companion_getInstance_110();
                var key = 'serverUrl';
                var value = this.op4_1._v;
                args.s(key, value);
              }
              this.rp4_1.doy('Login', toMap_0(args), this.tp4_1);
              this.hd_1 = 16;
              continue $sm;
            } else {
              if (this.op4_1._v == null) {
                this.hd_1 = 7;
                suspendResult = this.pp4_1.mn5(this.vp4_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.gp5_1 = false;
                this.hd_1 = 8;
                continue $sm;
              }
            }

          case 7:
            this.hp5_1 = suspendResult;
            this.gp5_1 = this.hp5_1 === 0;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            if (this.gp5_1) {
              this.fp5_1 = this.wp4_1;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.fp5_1 = false;
              this.hd_1 = 9;
              continue $sm;
            }

          case 9:
            if (this.fp5_1) {
              Companion_getInstance_200();
              Companion_getInstance_110();
              var tmp_2 = to('next', this.sp4_1._v);
              Companion_getInstance_120();
              this.rp4_1.doy('SiteEnterLink', mapOf([tmp_2, to('noSessionChange', this.qp4_1.toString())]), this.tp4_1);
              this.hd_1 = 16;
              continue $sm;
            } else {
              Companion_getInstance_110();
              var tmp_3 = to('next', this.sp4_1._v);
              Companion_getInstance_120();
              var args_0 = mutableMapOf([tmp_3, to('noSessionChange', this.qp4_1.toString())]);
              if (!(this.op4_1._v == null)) {
                var key_0 = 'filterByEndpoint';
                var value_0 = this.op4_1._v;
                args_0.s(key_0, value_0);
              }
              var key_1 = 'activeAccountMode';
              args_0.s(key_1, 'inlist');
              Companion_getInstance_110();
              var key_2 = 'listMode';
              var value_1 = ListViewMode_PICKER_getInstance().toString();
              args_0.s(key_2, value_1);
              Companion_getInstance_110();
              var value_2 = this.vp4_1.toString();
              args_0.s('maxDob', value_2);
              this.rp4_1.doy('AccountList', toMap_0(args_0), this.tp4_1);
              this.hd_1 = 16;
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            var tmp_4 = navigateToLink$slambda$lambda(this.op4_1);
            suspendResult = this.pp4_1.sn4(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            var tmp0_iterator = suspendResult.w();
            this.hd_1 = 12;
            continue $sm;
          case 12:
            if (!tmp0_iterator.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            var element = tmp0_iterator.e();
            if (element.xmr_1.y9b_1 === substringBefore_0(this.np4_1, '@')) {
              this.yp4_1 = element;
              this.hd_1 = 15;
              continue $sm;
            } else {
              this.hd_1 = 13;
              continue $sm;
            }

          case 13:
            this.hd_1 = 12;
            continue $sm;
          case 14:
            this.yp4_1 = null;
            if (false) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.hd_1 = 15;
            continue $sm;
          case 15:
            var session = this.yp4_1;
            if (!(session == null)) {
              var this_0 = this.pp4_1;
              var tmp_5;
              if (!this.qp4_1) {
                tmp_5 = this_0;
              } else {
                tmp_5 = null;
              }
              var tmp0_safe_receiver = tmp_5;
              if (tmp0_safe_receiver != null) {
                tmp0_safe_receiver.wmu(session);
              }
              navigateToViewUri(this.rp4_1, this.sp4_1._v, this.tp4_1);
            }

            this.hd_1 = 16;
            continue $sm;
          case 16:
            return Unit_instance;
          case 17:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 17) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(navigateToLink$slambda).v1m = function ($this$launch, completion) {
    var i = new navigateToLink$slambda(this.np4_1, this.op4_1, this.pp4_1, this.qp4_1, this.rp4_1, this.sp4_1, this.tp4_1, this.up4_1, this.vp4_1, this.wp4_1, completion);
    i.xp4_1 = $this$launch;
    return i;
  };
  function navigateToLink$slambda_0($accountName, $endpointUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $userCanSelectServer, resultContinuation) {
    var i = new navigateToLink$slambda($accountName, $endpointUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $userCanSelectServer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function isGuestUser(_this__u8e3s4) {
    return _this__u8e3s4.y9b_1 == null;
  }
  function toUmAccount(_this__u8e3s4, endpointUrl) {
    return new UmAccount(_this__u8e3s4.x9b_1, _this__u8e3s4.y9b_1, '', endpointUrl, _this__u8e3s4.z9b_1, _this__u8e3s4.a9c_1);
  }
  function personFullName(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.z9b_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.a9c_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  }
  function toXapiAgent(_this__u8e3s4, endpoint) {
    var tmp = personFullName(_this__u8e3s4);
    var tmp0_elvis_lhs = _this__u8e3s4.y9b_1;
    var tmp1_name = tmp0_elvis_lhs == null ? _this__u8e3s4.x9b_1.toString() : tmp0_elvis_lhs;
    var tmp2_homePage = endpoint.hmr_1;
    return new XapiAgent(tmp, VOID, VOID, VOID, VOID, new XapiAccount(tmp2_homePage, tmp1_name));
  }
  function toggle(_this__u8e3s4, item) {
    var tmp;
    if (_this__u8e3s4.a1(item)) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
        if (!equals(element, item)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    } else {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableSet(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
      this_0.i1(item);
      tmp = toSet(this_0);
    }
    return tmp;
  }
  function toQueryLikeParam(_this__u8e3s4) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (_this__u8e3s4 == null ? true : charSequenceLength(_this__u8e3s4) === 0) {
      tmp = '%';
    } else {
      tmp = '%' + _this__u8e3s4 + '%';
    }
    return tmp;
  }
  function capitalizeFirstLetter(_this__u8e3s4) {
    // Inline function 'kotlin.text.replaceFirstChar' call
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(_this__u8e3s4) > 0) {
      // Inline function 'com.ustadmobile.core.util.ext.capitalizeFirstLetter.<anonymous>' call
      var it = charSequenceGet(_this__u8e3s4, 0);
      var tmp$ret$1 = isLowerCase(it) ? titlecase(it) : toString_1(it);
      var tmp_0 = toString(tmp$ret$1);
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp_0 + _this__u8e3s4.substring(1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function appendQueryArgs(_this__u8e3s4, args) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!args.c1()) {
      tmp = appendQueryArgs_0(_this__u8e3s4, toQueryString(args));
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function appendQueryArgs_0(_this__u8e3s4, queryArgs) {
    var retVal = _this__u8e3s4;
    if (contains(_this__u8e3s4, '?'))
      retVal = retVal + '&';
    else
      retVal = retVal + '?';
    retVal = retVal + queryArgs;
    return retVal;
  }
  function countWords(_this__u8e3s4) {
    var lastCharWasWhitespace = true;
    var wordCount = 0;
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var thisCharWhitespace = isWhitespace(charSequenceGet(_this__u8e3s4, i));
        if (!thisCharWhitespace ? lastCharWasWhitespace : false) {
          wordCount = wordCount + 1 | 0;
        }
        lastCharWasWhitespace = thisCharWhitespace;
      }
       while (inductionVariable < last);
    return wordCount;
  }
  function startsWithHttpProtocol(_this__u8e3s4) {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.startsWithHttpProtocol.<anonymous>' call
    var it = _this__u8e3s4.toLowerCase();
    return startsWith(it, 'http://') ? true : startsWith(it, 'https://');
  }
  function requirePostfix(_this__u8e3s4, postFix, ignoreCase) {
    ignoreCase = ignoreCase === VOID ? false : ignoreCase;
    return endsWith(_this__u8e3s4, postFix, ignoreCase) ? _this__u8e3s4 : _this__u8e3s4 + postFix;
  }
  function appendSelectedAccount(_this__u8e3s4, personUid, endpoint) {
    Companion_getInstance_120();
    var tmp = to('selectedAccountPersonUid', personUid.toString());
    Companion_getInstance_120();
    return appendQueryArgs(_this__u8e3s4, mapOf([tmp, to('selectedAccountEndpointUrl', endpoint.hmr_1)]));
  }
  function requireHttpPrefix(_this__u8e3s4, defaultProtocol) {
    defaultProtocol = defaultProtocol === VOID ? 'https' : defaultProtocol;
    return startsWithHttpProtocol(_this__u8e3s4) ? _this__u8e3s4 : defaultProtocol + '://' + _this__u8e3s4;
  }
  function toNullIfBlank(_this__u8e3s4) {
    var tmp;
    if (isBlank(_this__u8e3s4)) {
      tmp = null;
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function trimExcessWhiteSpace(_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 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!isWhitespace(it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var firstNonWhiteSpace = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlin.text.indexOfLast' call
      var inductionVariable_0 = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (0 <= inductionVariable_0)
        do {
          var index_0 = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + -1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it_0 = charSequenceGet(_this__u8e3s4, index_0);
          if (!isWhitespace(it_0)) {
            tmp$ret$3 = index_0;
            break $l$block_0;
          }
        }
         while (0 <= inductionVariable_0);
      tmp$ret$3 = -1;
    }
    var lastNonWhiteSpace = tmp$ret$3;
    // Inline function 'kotlin.math.max' call
    var b = firstNonWhiteSpace - 1 | 0;
    var startPos = Math.max(0, b);
    // Inline function 'kotlin.math.min' call
    var a = _this__u8e3s4.length;
    var b_0 = lastNonWhiteSpace + 2 | 0;
    var endPos = Math.min(a, b_0);
    var tmp;
    if (!(startPos === 0) ? true : !(endPos === _this__u8e3s4.length)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = _this__u8e3s4.substring(startPos, endPos);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function initial(_this__u8e3s4) {
    var tmp0_safe_receiver = firstNonWhiteSpaceChar(_this__u8e3s4);
    var tmp;
    var tmp_0 = tmp0_safe_receiver;
    if ((tmp_0 == null ? null : new Char(tmp_0)) == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.uppercase' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = toString_1(tmp0_safe_receiver).toUpperCase();
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
  }
  function firstNonWhiteSpaceChar(_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 'com.ustadmobile.core.util.ext.firstNonWhiteSpaceChar.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!isWhitespace(it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var index_0 = tmp$ret$1;
    return !(index_0 === -1) ? charSequenceGet(_this__u8e3s4, index_0) : null;
  }
  function formattedString(_this__u8e3s4, instant) {
    instant = instant === VOID ? System_instance.nle() : instant;
    return gmtOffsetString(offsetAt(_this__u8e3s4, instant)) + ' ' + _this__u8e3s4.nlh();
  }
  function get_progressAsFloat(_this__u8e3s4) {
    var tmp = _this__u8e3s4.qc3_1.zc();
    // Inline function 'kotlin.takeIf' call
    var this_0 = _this__u8e3s4.pc3_1.zc();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.util.ext.<get-progressAsFloat>.<anonymous>' call
    if (!(this_0 === 0.0)) {
      tmp_0 = this_0;
    } else {
      tmp_0 = null;
    }
    var tmp0_elvis_lhs = tmp_0;
    return tmp / (tmp0_elvis_lhs == null ? 1.0 : tmp0_elvis_lhs);
  }
  function insertPersonAndGroup(_this__u8e3s4, entity, groupFlag, $completion) {
    var tmp;
    if (groupFlag === VOID) {
      tmp = 1;
    } else {
      tmp = groupFlag;
    }
    groupFlag = tmp;
    var tmp_0 = new $insertPersonAndGroupCOROUTINE$46(_this__u8e3s4, entity, groupFlag, $completion);
    tmp_0.jd_1 = Unit_instance;
    tmp_0.kd_1 = null;
    return tmp_0.ud();
  }
  function localFirstThenRepoIfFalse(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfFalseCOROUTINE$47(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function ScopedGrantResult(sgUid) {
    this.mp6_1 = sgUid;
  }
  protoOf(ScopedGrantResult).toString = function () {
    return 'ScopedGrantResult(sgUid=' + this.mp6_1.toString() + ')';
  };
  protoOf(ScopedGrantResult).hashCode = function () {
    return this.mp6_1.hashCode();
  };
  protoOf(ScopedGrantResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantResult))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantResult ? other : THROW_CCE();
    if (!this.mp6_1.equals(tmp0_other_with_cast.mp6_1))
      return false;
    return true;
  };
  function grantScopedPermission(_this__u8e3s4, toPerson, permissions, scopeTableId, scopeEntityUid, $completion) {
    return grantScopedPermission_0(_this__u8e3s4, toPerson.i9c_1, permissions, scopeTableId, scopeEntityUid, $completion);
  }
  function grantScopedPermission_0(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion) {
    var tmp = new $grantScopedPermissionCOROUTINE$48(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function localFirstThenRepoIfNull(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfNullCOROUTINE$49(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertPersonAndGroupCOROUTINE$46(_this__u8e3s4, entity, groupFlag, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qp5_1 = _this__u8e3s4;
    this.rp5_1 = entity;
    this.sp5_1 = groupFlag;
  }
  protoOf($insertPersonAndGroupCOROUTINE$46).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = new PersonGroup();
            this_0.ofz_1 = 'Person individual group';
            this_0.qfz_1 = this.sp5_1;
            tmp_0.tp5_1 = this_0;
            this.hd_1 = 1;
            suspendResult = this.qp5_1.i7k().insertAsync(this.tp5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.up5_1 = suspendResult;
            this.tp5_1.jfz_1 = this.up5_1;
            this.rp5_1.i9c_1 = this.tp5_1.jfz_1;
            this.hd_1 = 2;
            suspendResult = this.qp5_1.s7j().insertAsync(this.rp5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.vp5_1 = suspendResult;
            this.rp5_1.x9b_1 = this.vp5_1;
            this.hd_1 = 3;
            suspendResult = this.qp5_1.j7k().insertAsync(PersonGroupMember_init_$Create$(this.rp5_1.x9b_1, this.rp5_1.i9c_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            Companion_getInstance_2();
            var tmp_1 = new Long(-1, 2147483647);
            suspendResult = grantScopedPermission(this.qp5_1, this.rp5_1, tmp_1, 9, this.rp5_1.x9b_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return this.rp5_1;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $localFirstThenRepoIfFalseCOROUTINE$47(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ep6_1 = _this__u8e3s4;
    this.fp6_1 = block;
  }
  protoOf($localFirstThenRepoIfFalseCOROUTINE$47).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.ep6_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c5p();
            tmp_0.gp6_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.hp6_1 = this.gp6_1;
            if (this.hp6_1 == null) {
              this.ip6_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.jp6_1 = this.hp6_1;
              var tmp_4 = this;
              tmp_4.kp6_1 = this.jp6_1;
              this.hd_1 = 1;
              suspendResult = this.fp6_1(this.kp6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ip6_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.lp6_1 = this.ip6_1;
            if (this.lp6_1 === true)
              return this.lp6_1;
            this.hd_1 = 3;
            suspendResult = this.fp6_1(this.ep6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $grantScopedPermissionCOROUTINE$48(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vp6_1 = _this__u8e3s4;
    this.wp6_1 = toGroupUid;
    this.xp6_1 = permissions;
    this.yp6_1 = scopeTableId;
    this.zp6_1 = scopeEntityUid;
  }
  protoOf($grantScopedPermissionCOROUTINE$48).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;
            var tmp_0 = this.vp6_1.d7l();
            var this_0 = new ScopedGrant();
            this_0.lh4_1 = this.wp6_1;
            this_0.kh4_1 = this.xp6_1;
            this_0.ih4_1 = this.yp6_1;
            this_0.jh4_1 = this.zp6_1;
            suspendResult = tmp_0.oh3(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var sgUid = suspendResult;
            return new ScopedGrantResult(sgUid);
          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 $localFirstThenRepoIfNullCOROUTINE$49(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ip7_1 = _this__u8e3s4;
    this.jp7_1 = block;
  }
  protoOf($localFirstThenRepoIfNullCOROUTINE$49).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.ip7_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c5p();
            tmp_0.kp7_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.lp7_1 = this.kp7_1;
            if (this.lp7_1 == null) {
              this.mp7_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.np7_1 = this.lp7_1;
              var tmp_4 = this;
              tmp_4.op7_1 = this.np7_1;
              this.hd_1 = 1;
              suspendResult = this.jp7_1(this.op7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.mp7_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.pp7_1 = this.mp7_1;
            if (!(this.pp7_1 == null))
              return this.pp7_1;
            this.hd_1 = 3;
            suspendResult = this.jp7_1(this.ip7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function withEndpoint(_this__u8e3s4, endpoint) {
    var tmp0_elvis_lhs = _this__u8e3s4.yi2_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint : usersession must not be null');
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var tmp_0 = tmp;
    var tmp1_elvis_lhs = _this__u8e3s4.wi2_1;
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint: person msut not be null');
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    return new UserSessionWithPersonAndEndpoint(tmp_0, tmp_1, endpoint);
  }
  function isTemporary(_this__u8e3s4) {
    var tmp = _this__u8e3s4.vi2_1;
    var tmp_0 = tmp & 8;
    return tmp_0 === 8;
  }
  function setIfNoValueSetYet(_this__u8e3s4, key, value) {
    if (_this__u8e3s4.ba(key) == null) {
      _this__u8e3s4.qp7(key, value);
    }
  }
  function require_0(_this__u8e3s4, key) {
    var tmp0_elvis_lhs = _this__u8e3s4.ba(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('SavedStateHandle: required key not found: ' + key);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function gmtOffsetString(_this__u8e3s4) {
    var hours = _this__u8e3s4.rli() / 3600 | 0;
    // Inline function 'kotlin.mod' call
    var r = _this__u8e3s4.rli() % 3600 | 0;
    var minutes = r + (3600 & ((r ^ 3600) & (r | (-r | 0))) >> 31) | 0;
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.gmtOffsetString.<anonymous>' call
    this_0.y5('GMT');
    if (hours >= 0) {
      this_0.y5('+');
    } else {
      this_0.y5('-');
    }
    // Inline function 'kotlin.math.absoluteValue' call
    var tmp$ret$1 = abs(hours);
    this_0.y5(padStart(tmp$ret$1.toString(), 2, _Char___init__impl__6a9atx(48)));
    this_0.y5(':');
    // Inline function 'kotlin.math.absoluteValue' call
    var tmp$ret$2 = abs(minutes);
    this_0.y5(padStart(tmp$ret$2.toString(), 2, _Char___init__impl__6a9atx(48)));
    return this_0.toString();
  }
  function xhtmlContentToText(_this__u8e3s4) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>' call
    var initTagName = _this__u8e3s4.dc();
    var initDepth = _this__u8e3s4.jk6();
    while (!((_this__u8e3s4.e().equals(EventType_END_ELEMENT_getInstance()) ? _this__u8e3s4.jk6() === (initDepth - 1 | 0) : false) ? _this__u8e3s4.dc().equals(initTagName) : false)) {
      switch (_this__u8e3s4.ok6().za_1) {
        case 1:
          if (_this__u8e3s4.dc().fka() === 'img') {
            var tmp1_elvis_lhs = _this__u8e3s4.r7j(null, 'alt');
            var textVal = tmp1_elvis_lhs == null ? _this__u8e3s4.r7j(null, 'title') : tmp1_elvis_lhs;
            if (textVal == null)
              null;
            else {
              // Inline function 'kotlin.also' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>.<anonymous>' call
              this_0.y5(textVal);
            }
          }

          break;
        case 4:
          this_0.y5(trimExcessWhiteSpace(_this__u8e3s4.mk6()));
          break;
        default:
          break;
      }
    }
    return this_0.toString();
  }
  function emptyStringValues() {
    return new MapStringValues(emptyMap());
  }
  function Companion_82() {
  }
  protoOf(Companion_82).g4k = function () {
    return new MapStringValues(emptyMap());
  };
  protoOf(Companion_82).s4x = function () {
    return new StringValuesSerializer();
  };
  protoOf(Companion_82).a4n = function (typeParamsSerializers) {
    return this.s4x();
  };
  var Companion_instance_130;
  function Companion_getInstance_100() {
    return Companion_instance_130;
  }
  function IStringValues() {
  }
  function MapStringValues(map) {
    this.rp2_1 = map;
  }
  protoOf(MapStringValues).r2p = function (key) {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.rp2_1.q2();
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      if (equals_0(element.s2(), key, true)) {
        destination.i1(element);
      }
    }
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_0 = ArrayList_init_$Create$();
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      var list = element_0.t2();
      addAll(destination_0, list);
    }
    return destination_0;
  };
  protoOf(MapStringValues).s2p = function () {
    return this.rp2_1.o2();
  };
  function asIStringValues(_this__u8e3s4) {
    return new MapStringValues(_this__u8e3s4);
  }
  function StringValuesSerializer() {
    this.rp7_1 = MapSerializer(serializer_0(StringCompanionObject_instance), ListSerializer(serializer_0(StringCompanionObject_instance)));
    this.sp7_1 = SerialDescriptor('StringValuesSerializer', this.rp7_1.v4a());
  }
  protoOf(StringValuesSerializer).v4a = function () {
    return this.sp7_1;
  };
  protoOf(StringValuesSerializer).x4a = function (decoder) {
    var stringMap = decoder.m4e(this.rp7_1);
    return new MapStringValues(stringMap);
  };
  protoOf(StringValuesSerializer).tp7 = function (encoder, value) {
    encoder.e4g(this.rp7_1, toMap_1(value));
  };
  protoOf(StringValuesSerializer).w4a = function (encoder, value) {
    return this.tp7(encoder, (!(value == null) ? isInterface(value, IStringValues) : false) ? value : THROW_CCE());
  };
  function Companion_83() {
    this.up7_1 = 'errCode';
    this.vp7_1 = 'msg';
    this.wp7_1 = 'stacktraceKey';
    this.xp7_1 = 'fromUri';
    this.yp7_1 = 'ErrorReport';
  }
  var Companion_instance_131;
  function Companion_getInstance_101() {
    return Companion_instance_131;
  }
  function Companion_84() {
    this.zp7_1 = 'HolidayCalendarDetail';
  }
  var Companion_instance_132;
  function Companion_getInstance_102() {
    return Companion_instance_132;
  }
  function Companion_85() {
    this.ap8_1 = 'InviteViaLink';
  }
  var Companion_instance_133;
  function Companion_getInstance_103() {
    return Companion_instance_133;
  }
  function Companion_86() {
    this.bp8_1 = 'JoinWithCode';
  }
  var Companion_instance_134;
  function Companion_getInstance_104() {
    return Companion_instance_134;
  }
  function Companion_87() {
    this.cp8_1 = 'LanguageDetailView';
  }
  var Companion_instance_135;
  function Companion_getInstance_105() {
    return Companion_instance_135;
  }
  function Companion_88() {
    this.dp8_1 = 'LanguageEditEditView';
  }
  var Companion_instance_136;
  function Companion_getInstance_106() {
    return Companion_instance_136;
  }
  function Companion_89() {
    this.ep8_1 = 'ScopedGrantDetail';
  }
  var Companion_instance_137;
  function Companion_getInstance_107() {
    return Companion_instance_137;
  }
  function Companion_90() {
    this.fp8_1 = 'SiteTermsDetailView';
    this.gp8_1 = 'SiteTermsDetailAcceptTerms';
    this.hp8_1 = 'useDisplayLocale';
    this.ip8_1 = 'showAccept';
  }
  var Companion_instance_138;
  function Companion_getInstance_108() {
    return Companion_instance_138;
  }
  function Companion_91() {
    Companion_instance_139 = this;
    this.jp8_1 = 'entity';
    this.kp8_1 = new Long(200, 0);
  }
  var Companion_instance_139;
  function Companion_getInstance_109() {
    if (Companion_instance_139 == null)
      new Companion_91();
    return Companion_instance_139;
  }
  var ListViewMode_BROWSER_instance;
  var ListViewMode_PICKER_instance;
  var ListViewMode_entriesInitialized;
  function ListViewMode_initEntries() {
    if (ListViewMode_entriesInitialized)
      return Unit_instance;
    ListViewMode_entriesInitialized = true;
    ListViewMode_BROWSER_instance = new ListViewMode('BROWSER', 0, 'BROWSER');
    ListViewMode_PICKER_instance = new ListViewMode('PICKER', 1, 'PICKER');
  }
  function ListViewMode(name, ordinal, mode) {
    Enum.call(this, name, ordinal);
    this.np8_1 = mode;
  }
  function ListViewMode_BROWSER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_BROWSER_instance;
  }
  function ListViewMode_PICKER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_PICKER_instance;
  }
  function Companion_92() {
    Companion_instance_140 = this;
    this.op8_1 = 'entityUid';
    this.pp8_1 = 'containerUid';
    this.qp8_1 = 'parentUid';
    this.rp8_1 = 'parentTitle';
    this.sp8_1 = 'entryid';
    this.tp8_1 = 'learnerGroupUid';
    this.up8_1 = 'noiframe';
    this.vp8_1 = 'schoolUid';
    this.wp8_1 = 'content_type';
    this.xp8_1 = 'filterBySchoolUid';
    this.yp8_1 = 'filterByRole';
    this.zp8_1 = 'listMode';
    this.ap9_1 = 'getResultMode';
    this.bp9_1 = 'listAddMode';
    this.cp9_1 = 'filterByPermission';
    this.dp9_1 = 'clazzUid';
    this.ep9_1 = 'filterByPersonGroupUid';
    this.fp9_1 = 'filterByEnrolmentRole';
    this.gp9_1 = 'clazzAssignmentUid';
    this.hp9_1 = 'clazzAssignmentSubmitterUid';
    this.ip9_1 = 'personUid';
    this.jp9_1 = 'next';
    this.kp9_1 = 'site';
    this.lp9_1 = 'serverUrl';
    this.mp9_1 = 'openLink';
    this.np9_1 = 'account';
    this.op9_1 = 'accountEndpoint';
    this.pp9_1 = 'snack_message';
    this.qp9_1 = 'argCode';
    this.rp9_1 = 'argCodeTable';
    this.sp9_1 = 'argEntityName';
    this.tp9_1 = '';
    this.up9_1 = 'root';
    this.vp9_1 = 'current';
    this.wp9_1 = 'goToComplete';
    this.xp9_1 = 'saveDb';
    this.yp9_1 = 'popUpToOnFinish';
    this.zp9_1 = 'result_dest';
    this.apa_1 = 'result_viewname';
    this.bpa_1 = 'registration_allowed';
    this.cpa_1 = 'result_key';
    this.dpa_1 = 'intMsg';
    this.epa_1 = 'title';
    this.fpa_1 = 'navChild';
    this.gpa_1 = 'activeTabIndex';
    this.hpa_1 = 'maxDob';
    this.ipa_1 = new Long(1, -955361223);
  }
  var Companion_instance_140;
  function Companion_getInstance_110() {
    if (Companion_instance_140 == null)
      new Companion_92();
    return Companion_instance_140;
  }
  function DetailViewModel(di, savedStateHandle, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.epb_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function ErrorReportUiState(errorReport, fieldsEnabled) {
    errorReport = errorReport === VOID ? null : errorReport;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.bpd_1 = errorReport;
    this.cpd_1 = fieldsEnabled;
  }
  protoOf(ErrorReportUiState).toString = function () {
    return 'ErrorReportUiState(errorReport=' + this.bpd_1 + ', fieldsEnabled=' + this.cpd_1 + ')';
  };
  protoOf(ErrorReportUiState).hashCode = function () {
    var result = this.bpd_1 == null ? 0 : hashCode(this.bpd_1);
    result = imul(result, 31) + getBooleanHashCode(this.cpd_1) | 0;
    return result;
  };
  protoOf(ErrorReportUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ErrorReportUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ErrorReportUiState ? other : THROW_CCE();
    if (!equals(this.bpd_1, tmp0_other_with_cast.bpd_1))
      return false;
    if (!(this.cpd_1 === tmp0_other_with_cast.cpd_1))
      return false;
    return true;
  };
  function HolidayCalendarDetailUIState(holidayCalendar, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.dpd_1 = holidayCalendar;
    this.epd_1 = holidayList;
  }
  protoOf(HolidayCalendarDetailUIState).toString = function () {
    return 'HolidayCalendarDetailUIState(holidayCalendar=' + this.dpd_1 + ', holidayList=' + this.epd_1 + ')';
  };
  protoOf(HolidayCalendarDetailUIState).hashCode = function () {
    var result = this.dpd_1 == null ? 0 : hashCode(this.dpd_1);
    result = imul(result, 31) + hashCode(this.epd_1) | 0;
    return result;
  };
  protoOf(HolidayCalendarDetailUIState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarDetailUIState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarDetailUIState ? other : THROW_CCE();
    if (!equals(this.dpd_1, tmp0_other_with_cast.dpd_1))
      return false;
    if (!equals(this.epd_1, tmp0_other_with_cast.epd_1))
      return false;
    return true;
  };
  function Companion_93() {
    this.fpd_1 = 'HolidayCalendarEdit';
  }
  var Companion_instance_141;
  function Companion_getInstance_111() {
    return Companion_instance_141;
  }
  function HolidayCalendarEditUiState(holidayCalendar, fieldsEnabled, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.gpd_1 = holidayCalendar;
    this.hpd_1 = fieldsEnabled;
    this.ipd_1 = holidayList;
  }
  protoOf(HolidayCalendarEditUiState).toString = function () {
    return 'HolidayCalendarEditUiState(holidayCalendar=' + this.gpd_1 + ', fieldsEnabled=' + this.hpd_1 + ', holidayList=' + this.ipd_1 + ')';
  };
  protoOf(HolidayCalendarEditUiState).hashCode = function () {
    var result = this.gpd_1 == null ? 0 : hashCode(this.gpd_1);
    result = imul(result, 31) + getBooleanHashCode(this.hpd_1) | 0;
    result = imul(result, 31) + (this.ipd_1 == null ? 0 : hashCode(this.ipd_1)) | 0;
    return result;
  };
  protoOf(HolidayCalendarEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarEditUiState ? other : THROW_CCE();
    if (!equals(this.gpd_1, tmp0_other_with_cast.gpd_1))
      return false;
    if (!(this.hpd_1 === tmp0_other_with_cast.hpd_1))
      return false;
    if (!equals(this.ipd_1, tmp0_other_with_cast.ipd_1))
      return false;
    return true;
  };
  function Companion_94() {
    this.jpd_1 = 'HolidayCalendarList';
  }
  var Companion_instance_142;
  function Companion_getInstance_112() {
    return Companion_instance_142;
  }
  function HolidayCalendarListUiState(holidayCalendarList) {
    var tmp;
    if (holidayCalendarList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = holidayCalendarList;
    }
    holidayCalendarList = tmp;
    this.kpd_1 = holidayCalendarList;
  }
  protoOf(HolidayCalendarListUiState).toString = function () {
    return 'HolidayCalendarListUiState(holidayCalendarList=' + this.kpd_1 + ')';
  };
  protoOf(HolidayCalendarListUiState).hashCode = function () {
    return hashCode(this.kpd_1);
  };
  protoOf(HolidayCalendarListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarListUiState ? other : THROW_CCE();
    if (!equals(this.kpd_1, tmp0_other_with_cast.kpd_1))
      return false;
    return true;
  };
  function LanguageDetailUiState(language) {
    language = language === VOID ? null : language;
    this.lpd_1 = language;
  }
  protoOf(LanguageDetailUiState).toString = function () {
    return 'LanguageDetailUiState(language=' + this.lpd_1 + ')';
  };
  protoOf(LanguageDetailUiState).hashCode = function () {
    return this.lpd_1 == null ? 0 : this.lpd_1.hashCode();
  };
  protoOf(LanguageDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageDetailUiState ? other : THROW_CCE();
    if (!equals(this.lpd_1, tmp0_other_with_cast.lpd_1))
      return false;
    return true;
  };
  function LanguageEditUiState(language, fieldsEnabled, languageNameError, twoLettersCodeError, threeLettersCodeError) {
    language = language === VOID ? null : language;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    languageNameError = languageNameError === VOID ? null : languageNameError;
    twoLettersCodeError = twoLettersCodeError === VOID ? null : twoLettersCodeError;
    threeLettersCodeError = threeLettersCodeError === VOID ? null : threeLettersCodeError;
    this.mpd_1 = language;
    this.npd_1 = fieldsEnabled;
    this.opd_1 = languageNameError;
    this.ppd_1 = twoLettersCodeError;
    this.qpd_1 = threeLettersCodeError;
  }
  protoOf(LanguageEditUiState).toString = function () {
    return 'LanguageEditUiState(language=' + this.mpd_1 + ', fieldsEnabled=' + this.npd_1 + ', languageNameError=' + this.opd_1 + ', twoLettersCodeError=' + this.ppd_1 + ', threeLettersCodeError=' + this.qpd_1 + ')';
  };
  protoOf(LanguageEditUiState).hashCode = function () {
    var result = this.mpd_1 == null ? 0 : this.mpd_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.npd_1) | 0;
    result = imul(result, 31) + (this.opd_1 == null ? 0 : getStringHashCode(this.opd_1)) | 0;
    result = imul(result, 31) + (this.ppd_1 == null ? 0 : getStringHashCode(this.ppd_1)) | 0;
    result = imul(result, 31) + (this.qpd_1 == null ? 0 : getStringHashCode(this.qpd_1)) | 0;
    return result;
  };
  protoOf(LanguageEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageEditUiState ? other : THROW_CCE();
    if (!equals(this.mpd_1, tmp0_other_with_cast.mpd_1))
      return false;
    if (!(this.npd_1 === tmp0_other_with_cast.npd_1))
      return false;
    if (!(this.opd_1 == tmp0_other_with_cast.opd_1))
      return false;
    if (!(this.ppd_1 == tmp0_other_with_cast.ppd_1))
      return false;
    if (!(this.qpd_1 == tmp0_other_with_cast.qpd_1))
      return false;
    return true;
  };
  function Companion_95() {
    this.rpd_1 = 'LanguageList';
  }
  var Companion_instance_143;
  function Companion_getInstance_113() {
    return Companion_instance_143;
  }
  function LanguageListUiState(languageList, sortOptions, sortOrder) {
    languageList = languageList === VOID ? emptyList() : languageList;
    var tmp;
    if (sortOptions === VOID) {
      var tmp_0 = strings_getInstance().zlk_1;
      var tmp_1 = new SortOrderOption(tmp_0, 1, true);
      var tmp_2 = strings_getInstance().zlk_1;
      var tmp_3 = new SortOrderOption(tmp_2, 2, false);
      var tmp_4 = strings_getInstance().mll_1;
      var tmp_5 = new SortOrderOption(tmp_4, 3, true);
      var tmp_6 = strings_getInstance().mll_1;
      var tmp_7 = new SortOrderOption(tmp_6, 4, false);
      var tmp_8 = strings_getInstance().nll_1;
      var tmp_9 = new SortOrderOption(tmp_8, 5, true);
      var tmp_10 = strings_getInstance().nll_1;
      tmp = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, new SortOrderOption(tmp_10, 6, false)]);
    } else {
      tmp = sortOptions;
    }
    sortOptions = tmp;
    sortOrder = sortOrder === VOID ? first_0(sortOptions) : sortOrder;
    this.spd_1 = languageList;
    this.tpd_1 = sortOptions;
    this.upd_1 = sortOrder;
  }
  protoOf(LanguageListUiState).toString = function () {
    return 'LanguageListUiState(languageList=' + this.spd_1 + ', sortOptions=' + this.tpd_1 + ', sortOrder=' + this.upd_1 + ')';
  };
  protoOf(LanguageListUiState).hashCode = function () {
    var result = hashCode(this.spd_1);
    result = imul(result, 31) + hashCode(this.tpd_1) | 0;
    result = imul(result, 31) + this.upd_1.hashCode() | 0;
    return result;
  };
  protoOf(LanguageListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageListUiState ? other : THROW_CCE();
    if (!equals(this.spd_1, tmp0_other_with_cast.spd_1))
      return false;
    if (!equals(this.tpd_1, tmp0_other_with_cast.tpd_1))
      return false;
    if (!this.upd_1.equals(tmp0_other_with_cast.upd_1))
      return false;
    return true;
  };
  function LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation) {
    this.dpe_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda).fpe = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.fpe(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).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;
            var tmp_0 = this.epe_1.z7j();
            Companion_getInstance_110();
            var tmp0_safe_receiver = this.dpe_1.ba('entityUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.mf9(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).tmw = function (it, completion) {
    var i = new LeavingReasonEditViewModel$slambda$slambda(this.dpe_1, completion);
    i.epe_1 = it;
    return i;
  };
  function LeavingReasonEditViewModel$slambda$slambda_0($savedStateHandle, resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation);
    var l = function (it, $completion) {
      return i.fpe(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).ope = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.ope($completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new LeavingReason();
          this_0.m9a_1 = '';
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new LeavingReasonEditViewModel$slambda$slambda_1(completion);
  };
  function LeavingReasonEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.ope($completion);
    };
    l.$arity = 0;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mpf_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.rpf(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_96() {
    this.spf_1 = 'LeavingReasonEdit';
  }
  var Companion_instance_144;
  function Companion_getInstance_114() {
    return Companion_instance_144;
  }
  function LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.bpg_1 = this$0;
    this.cpg_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.epg_1 = Companion_getInstance_11().s4x();
            this.hd_1 = 1;
            var tmp_0 = LeavingReasonEditViewModel$slambda$slambda_0(this.cpg_1, null);
            var tmp_1 = LeavingReasonEditViewModel$slambda$slambda_2(null);
            suspendResult = this.bpg_1.spc(this.epg_1, VOID, VOID, tmp_0, tmp_1, LeavingReasonEditViewModel$slambda$lambda(this.bpg_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.bpg_1.mpf_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.rpf(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(LeavingReasonEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LeavingReasonEditViewModel$slambda(this.bpg_1, this.cpg_1, completion);
    i.dpg_1 = $this$launch;
    return i;
  };
  function LeavingReasonEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.npg_1 = $commitDelay;
    this.opg_1 = $entity;
    this.ppg_1 = $this;
    this.qpg_1 = $key;
    this.rpg_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.npg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.opg_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ppg_1.opc(this.ppg_1.kpb_1, this.qpg_1, this.rpg_1, this.opg_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new LeavingReasonEditViewModel$onEntityChanged$slambda(this.npg_1, this.opg_1, this.ppg_1, this.qpg_1, this.rpg_1, completion);
    i.spg_1 = $this$launch;
    return i;
  };
  function LeavingReasonEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new LeavingReasonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'LeavingReasonEdit');
    this.mpf_1 = MutableStateFlow(new LeavingReasonEditUiState(VOID, VOID, false));
    this.npf_1 = asStateFlow(this.mpf_1);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, LeavingReasonEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(LeavingReasonEditViewModel).tpg = function (leavingReason) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mpf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.rpf(leavingReason);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_11().s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver = this.pph_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.bpc();
    tmp.pph_1 = launch(tmp_0, VOID, VOID, LeavingReasonEditViewModel$onEntityChanged$slambda_0(commitDelay, leavingReason, this, key, serializer, null));
  };
  function LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled) {
    leavingReason = leavingReason === VOID ? null : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? null : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.opf_1 = leavingReason;
    this.ppf_1 = reasonTitleError;
    this.qpf_1 = fieldsEnabled;
  }
  protoOf(LeavingReasonEditUiState).uph = function (leavingReason, reasonTitleError, fieldsEnabled) {
    return new LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).rpf = function (leavingReason, reasonTitleError, fieldsEnabled, $super) {
    leavingReason = leavingReason === VOID ? this.opf_1 : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? this.ppf_1 : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.qpf_1 : fieldsEnabled;
    return $super === VOID ? this.uph(leavingReason, reasonTitleError, fieldsEnabled) : $super.uph.call(this, leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).toString = function () {
    return 'LeavingReasonEditUiState(leavingReason=' + this.opf_1 + ', reasonTitleError=' + this.ppf_1 + ', fieldsEnabled=' + this.qpf_1 + ')';
  };
  protoOf(LeavingReasonEditUiState).hashCode = function () {
    var result = this.opf_1 == null ? 0 : hashCode(this.opf_1);
    result = imul(result, 31) + (this.ppf_1 == null ? 0 : getStringHashCode(this.ppf_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qpf_1) | 0;
    return result;
  };
  protoOf(LeavingReasonEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LeavingReasonEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LeavingReasonEditUiState ? other : THROW_CCE();
    if (!equals(this.opf_1, tmp0_other_with_cast.opf_1))
      return false;
    if (!(this.ppf_1 == tmp0_other_with_cast.ppf_1))
      return false;
    if (!(this.qpf_1 === tmp0_other_with_cast.qpf_1))
      return false;
    return true;
  };
  function Companion_97() {
    this.vph_1 = 'Onboarding';
    this.wph_1 = 'onboaring_screen';
  }
  var Companion_instance_145;
  function Companion_getInstance_115() {
    return Companion_instance_145;
  }
  function Companion_98() {
    this.xph_1 = 'ReportFilterEdit';
  }
  var Companion_instance_146;
  function Companion_getInstance_116() {
    return Companion_instance_146;
  }
  function ReportFilterEditUiState(fieldError, conditionsError, valuesError, fieldsEnabled, reportFilter, uidAndLabelList, createNewFilter, reportFilterValueVisible, reportFilterBetweenValueVisible, reportFilterUidAndLabelListVisible) {
    fieldError = fieldError === VOID ? null : fieldError;
    conditionsError = conditionsError === VOID ? null : conditionsError;
    valuesError = valuesError === VOID ? null : valuesError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    reportFilter = reportFilter === VOID ? null : reportFilter;
    uidAndLabelList = uidAndLabelList === VOID ? emptyList() : uidAndLabelList;
    createNewFilter = createNewFilter === VOID ? '' : createNewFilter;
    reportFilterValueVisible = reportFilterValueVisible === VOID ? true : reportFilterValueVisible;
    reportFilterBetweenValueVisible = reportFilterBetweenValueVisible === VOID ? true : reportFilterBetweenValueVisible;
    reportFilterUidAndLabelListVisible = reportFilterUidAndLabelListVisible === VOID ? true : reportFilterUidAndLabelListVisible;
    this.yph_1 = fieldError;
    this.zph_1 = conditionsError;
    this.api_1 = valuesError;
    this.bpi_1 = fieldsEnabled;
    this.cpi_1 = reportFilter;
    this.dpi_1 = uidAndLabelList;
    this.epi_1 = createNewFilter;
    this.fpi_1 = reportFilterValueVisible;
    this.gpi_1 = reportFilterBetweenValueVisible;
    this.hpi_1 = reportFilterUidAndLabelListVisible;
  }
  protoOf(ReportFilterEditUiState).toString = function () {
    return 'ReportFilterEditUiState(fieldError=' + this.yph_1 + ', conditionsError=' + this.zph_1 + ', valuesError=' + this.api_1 + ', fieldsEnabled=' + this.bpi_1 + ', reportFilter=' + this.cpi_1 + ', uidAndLabelList=' + this.dpi_1 + ', createNewFilter=' + this.epi_1 + ', reportFilterValueVisible=' + this.fpi_1 + ', reportFilterBetweenValueVisible=' + this.gpi_1 + ', reportFilterUidAndLabelListVisible=' + this.hpi_1 + ')';
  };
  protoOf(ReportFilterEditUiState).hashCode = function () {
    var result = this.yph_1 == null ? 0 : getStringHashCode(this.yph_1);
    result = imul(result, 31) + (this.zph_1 == null ? 0 : getStringHashCode(this.zph_1)) | 0;
    result = imul(result, 31) + (this.api_1 == null ? 0 : getStringHashCode(this.api_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bpi_1) | 0;
    result = imul(result, 31) + (this.cpi_1 == null ? 0 : this.cpi_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.dpi_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.epi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fpi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gpi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hpi_1) | 0;
    return result;
  };
  protoOf(ReportFilterEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ReportFilterEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ReportFilterEditUiState ? other : THROW_CCE();
    if (!(this.yph_1 == tmp0_other_with_cast.yph_1))
      return false;
    if (!(this.zph_1 == tmp0_other_with_cast.zph_1))
      return false;
    if (!(this.api_1 == tmp0_other_with_cast.api_1))
      return false;
    if (!(this.bpi_1 === tmp0_other_with_cast.bpi_1))
      return false;
    if (!equals(this.cpi_1, tmp0_other_with_cast.cpi_1))
      return false;
    if (!equals(this.dpi_1, tmp0_other_with_cast.dpi_1))
      return false;
    if (!(this.epi_1 === tmp0_other_with_cast.epi_1))
      return false;
    if (!(this.fpi_1 === tmp0_other_with_cast.fpi_1))
      return false;
    if (!(this.gpi_1 === tmp0_other_with_cast.gpi_1))
      return false;
    if (!(this.hpi_1 === tmp0_other_with_cast.hpi_1))
      return false;
    return true;
  };
  function ScopedGrantDetailUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    bitmaskList = bitmaskList === VOID ? emptyList() : bitmaskList;
    this.ipi_1 = entity;
    this.jpi_1 = bitmaskList;
  }
  protoOf(ScopedGrantDetailUiState).toString = function () {
    return 'ScopedGrantDetailUiState(entity=' + this.ipi_1 + ', bitmaskList=' + this.jpi_1 + ')';
  };
  protoOf(ScopedGrantDetailUiState).hashCode = function () {
    var result = this.ipi_1 == null ? 0 : hashCode(this.ipi_1);
    result = imul(result, 31) + hashCode(this.jpi_1) | 0;
    return result;
  };
  protoOf(ScopedGrantDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantDetailUiState ? other : THROW_CCE();
    if (!equals(this.ipi_1, tmp0_other_with_cast.ipi_1))
      return false;
    if (!equals(this.jpi_1, tmp0_other_with_cast.jpi_1))
      return false;
    return true;
  };
  function Companion_99() {
    this.kpi_1 = 'ScopedGrantEdit';
    this.lpi_1 = 'grantToGroup';
    this.mpi_1 = 'grantToName';
    this.npi_1 = 'grantTableId';
    this.opi_1 = 'grantEntityUid';
    this.ppi_1 = 'permissionList';
  }
  var Companion_instance_147;
  function Companion_getInstance_117() {
    return Companion_instance_147;
  }
  function ScopedGrantEditUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    var tmp;
    if (bitmaskList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = bitmaskList;
    }
    bitmaskList = tmp;
    this.qpi_1 = entity;
    this.rpi_1 = bitmaskList;
  }
  protoOf(ScopedGrantEditUiState).toString = function () {
    return 'ScopedGrantEditUiState(entity=' + this.qpi_1 + ', bitmaskList=' + this.rpi_1 + ')';
  };
  protoOf(ScopedGrantEditUiState).hashCode = function () {
    var result = this.qpi_1 == null ? 0 : hashCode(this.qpi_1);
    result = imul(result, 31) + hashCode(this.rpi_1) | 0;
    return result;
  };
  protoOf(ScopedGrantEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantEditUiState ? other : THROW_CCE();
    if (!equals(this.qpi_1, tmp0_other_with_cast.qpi_1))
      return false;
    if (!equals(this.rpi_1, tmp0_other_with_cast.rpi_1))
      return false;
    return true;
  };
  function Companion_100() {
    Companion_instance_148 = this;
    this.spi_1 = new Long(200, 0);
    this.tpi_1 = 'initPicUri';
  }
  var Companion_instance_148;
  function Companion_getInstance_118() {
    if (Companion_instance_148 == null)
      new Companion_100();
    return Companion_instance_148;
  }
  function UstadEditViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_118();
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.pph_1 = null;
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.qph_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  protoOf(UstadEditViewModel).rph = function (detailViewName, entityUid, result, detailViewExtraArgs) {
    Companion_getInstance_110();
    var popUpToViewName = this.kpb_1.ba('result_viewname');
    Companion_getInstance_110();
    var saveToKey = this.kpb_1.ba('result_key');
    Companion_getInstance_120();
    var createdNewEntity = this.kpb_1.ba('entityUid') == null;
    var returnResultExpected = !(popUpToViewName == null) ? !(saveToKey == null) : false;
    if (createdNewEntity ? !returnResultExpected : false) {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.finishWithResult.<anonymous>' call
      this_0.r2(detailViewExtraArgs);
      Companion_getInstance_120();
      this_0.s('entityUid', entityUid.toString());
      var tmp = this_0.f3();
      Companion_getInstance_110();
      this.mpb_1.doy(detailViewName, tmp, new UstadGoOptions('', true));
    } else {
      this.tph(result);
    }
  };
  protoOf(UstadEditViewModel).sph = function (detailViewName, entityUid, result, detailViewExtraArgs, $super) {
    detailViewExtraArgs = detailViewExtraArgs === VOID ? emptyMap() : detailViewExtraArgs;
    var tmp;
    if ($super === VOID) {
      this.rph(detailViewName, entityUid, result, detailViewExtraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.rph.call(this, detailViewName, entityUid, result, detailViewExtraArgs);
    }
    return tmp;
  };
  protoOf(UstadEditViewModel).upi = function (newEntityStringResource, editEntityStringResource) {
    var tmp;
    if (!this.qph_1.equals(new Long(0, 0))) {
      tmp = true;
    } else {
      Companion_getInstance_109();
      tmp = !(this.kpb_1.ba('entity') == null);
    }
    var isEditing = tmp;
    var tmp_0 = this.ipc();
    var tmp_1;
    if (isEditing) {
      tmp_1 = editEntityStringResource;
    } else {
      tmp_1 = newEntityStringResource;
    }
    return tmp_0.rnd(tmp_1);
  };
  protoOf(UstadEditViewModel).vpi = function (prevFieldValue, currentFieldValue, currentErrorMessage) {
    return currentErrorMessage == null ? null : !equals(prevFieldValue, currentFieldValue) ? null : currentErrorMessage;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.gpj_1 = this$0;
    this.hpj_1 = $fabStringResource;
    this.ipj_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).cp4 = function (hasAddPermission, $completion) {
    var tmp = this.dp4(hasAddPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          setAddNewItemUiState(this.gpj_1, this.jpj_1, this.hpj_1, this.ipj_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).dp4 = function (hasAddPermission, completion) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this.gpj_1, this.hpj_1, this.ipj_1, completion);
    i.jpj_1 = hasAddPermission;
    return i;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function (hasAddPermission, $completion) {
      return i.cp4(hasAddPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function setAddNewItemUiState($this, hasAddPermission, fabStringResource, onSetAddItemVisibility) {
    var tmp;
    if (hasAddPermission ? $this.kpk().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var tmp_0 = $this.ipc().rnd(fabStringResource);
      var tmp_1 = FabIcon_ADD_getInstance();
      tmp = new FabUiState(true, tmp_0, tmp_1, UstadListViewModel$onClickAdd$ref($this));
    } else {
      tmp = new FabUiState(false);
    }
    var fabState = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.setAddNewItemUiState.<anonymous>' call
        var nextValue = prevValue.mov(fabState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    onSetAddItemVisibility(hasAddPermission ? $this.kpk().equals(ListViewMode_PICKER_getInstance()) : false);
  }
  function Companion_101() {
    this.lpk_1 = 'listMode';
  }
  var Companion_instance_149;
  function Companion_getInstance_119() {
    return Companion_instance_149;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_3(function_0) {
    this.mpk_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_3).t1d = function (value, $completion) {
    return this.mpk_1(value, $completion);
  };
  function UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation) {
    this.vpk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$searchEvtCollator$slambda).xpk = function (it, $completion) {
    var tmp = this.ypk(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).he = function (p1, $completion) {
    return this.xpk((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_elvis_lhs = lastOrNull(this.wpk_1);
          this.vpk_1.zpk(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).ypk = function (it, completion) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this.vpk_1, completion);
    i.wpk_1 = it;
    return i;
  };
  function UstadListViewModel$searchEvtCollator$slambda_0(this$0, resultContinuation) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.xpk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadListViewModel$createSearchEnabledState$lambda(this$0) {
    return function (searchText) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.createSearchEnabledState.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.eov_1.wou(VOID, searchText));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this$0.jpk_1.x73(searchText);
      return Unit_instance;
    };
  }
  function UstadListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.apl();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.jpl_1 = $hasPermissionFlow;
    this.kpl_1 = this$0;
    this.lpl_1 = $fabStringResource;
    this.mpl_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).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;
            var tmp_0 = distinctUntilChanged(this.jpl_1());
            var tmp_1 = UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this.kpl_1, this.lpl_1, this.mpl_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_3(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).q7e = function (completion) {
    return new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda(this.jpl_1, this.kpl_1, this.lpl_1, this.mpl_1, completion);
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadListViewModel$onClickAdd$ref_0($boundThis) {
    var l = function () {
      $boundThis.apl();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel(di, savedStateHandle, initialState, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.fpk_1 = MutableStateFlow(initialState);
    this.gpk_1 = asStateFlow(this.fpk_1);
    this.hpk_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.ipk_1 = asSharedFlow(this.hpk_1);
    var tmp = this;
    var tmp_0 = new Long(200, 0);
    var tmp_1 = this.bpc();
    var tmp_2 = BufferOverflow_DROP_OLDEST_getInstance();
    tmp.jpk_1 = new EventCollator2(tmp_0, tmp_1, 1, tmp_2, UstadListViewModel$searchEvtCollator$slambda_0(this, null));
  }
  protoOf(UstadListViewModel).kpk = function () {
    var tmp;
    var tmp_0;
    Companion_getInstance_110();
    if (this.kpb_1.ba('listMode') === ListViewMode_PICKER_getInstance().np8_1) {
      tmp_0 = true;
    } else {
      var tmp_1;
      Companion_getInstance_110();
      if (!(this.kpb_1.ba('result_viewname') == null)) {
        Companion_getInstance_110();
        tmp_1 = !(this.kpb_1.ba('result_key') == null);
      } else {
        tmp_1 = false;
      }
      tmp_0 = tmp_1;
    }
    if (tmp_0) {
      tmp = ListViewMode_PICKER_getInstance();
    } else {
      tmp = ListViewMode_BROWSER_getInstance();
    }
    return tmp;
  };
  protoOf(UstadListViewModel).npl = function (visible) {
    return new AppBarSearchUiState(visible, VOID, UstadListViewModel$createSearchEnabledState$lambda(this));
  };
  protoOf(UstadListViewModel).opl = function (visible, $super) {
    visible = visible === VOID ? true : visible;
    return $super === VOID ? this.npl(visible) : $super.npl.call(this, visible);
  };
  protoOf(UstadListViewModel).ppl = function (hasPermissionFlow, fabStringResource, onSetAddListItemVisibility, $completion) {
    return whenSubscribed(this.fpk_1, UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0(hasPermissionFlow, this, fabStringResource, onSetAddListItemVisibility, null), $completion);
  };
  protoOf(UstadListViewModel).qpl = function (hasAddPermission, stringResource, onClick) {
    var tmp;
    if (hasAddPermission ? this.kpk().equals(ListViewMode_BROWSER_getInstance()) : false) {
      tmp = new FabUiState(true, this.ipc().rnd(stringResource), FabIcon_ADD_getInstance(), onClick);
    } else {
      tmp = new FabUiState(false);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).rpl = function (hasAddPermission, stringResource, onClick, $super) {
    var tmp;
    if (onClick === VOID) {
      tmp = UstadListViewModel$onClickAdd$ref_0(this);
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    return $super === VOID ? this.qpl(hasAddPermission, stringResource, onClick) : $super.qpl.call(this, hasAddPermission, stringResource, onClick);
  };
  protoOf(UstadListViewModel).spl = function (editViewName, extraArgs) {
    var resultDest = this.jpc();
    var tmp;
    if (!(resultDest == null)) {
      Companion_getInstance_110();
      var tmp_0 = to('result_viewname', resultDest.qoy_1);
      Companion_getInstance_110();
      tmp = plus_0(mapOf([tmp_0, to('result_key', resultDest.roy_1)]), extraArgs);
    } else {
      tmp = extraArgs;
    }
    var args = tmp;
    this.mpb_1.fo0(editViewName, args);
  };
  protoOf(UstadListViewModel).tpl = function (editViewName, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.spl(editViewName, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.spl.call(this, editViewName, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).upl = function (detailViewName, entityUid, result, extraArgs) {
    var resultDest = this.jpc();
    if (!(resultDest == null)) {
      this.tph(result);
    } else {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.navigateOnItemClicked.<anonymous>' call
      this_0.r2(extraArgs);
      Companion_getInstance_120();
      this_0.s('entityUid', entityUid.toString());
      var tmp$ret$2 = this_0.f3();
      this.mpb_1.fo0(detailViewName, tmp$ret$2);
    }
  };
  protoOf(UstadListViewModel).vpl = function (detailViewName, entityUid, result, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.upl(detailViewName, entityUid, result, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.upl.call(this, detailViewName, entityUid, result, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).wpl = function (browseStringResource, selectStringResource) {
    var tmp = this.ipc();
    var tmp_0;
    if (this.kpk().equals(ListViewMode_BROWSER_getInstance())) {
      tmp_0 = browseStringResource;
    } else {
      tmp_0 = selectStringResource;
    }
    return tmp.rnd(tmp_0);
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation) {
    this.fpm_1 = $$this$unsafeFlow;
    this.gpm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).ioz = function (value, $completion) {
    var tmp = this.joz(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.jpm_1 = this.fpm_1;
            var tmp_1 = this;
            tmp_1.kpm_1 = this.hpm_1;
            var it = this.kpm_1;
            var isNew = it.ooy_1.c7(this.gpm_1.zpb_1) > 0;
            if (isNew) {
              _set_lastNavResultTimestampCollected__txfbew(this.gpm_1, it.ooy_1);
            }

            if (isNew) {
              this.hd_1 = 3;
              suspendResult = this.jpm_1.t1d(this.kpm_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.ipm_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).joz = function (value, completion) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda(this.fpm_1, this.gpm_1, completion);
    i.hpm_1 = value;
    return i;
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0($$this$unsafeFlow, this$0, resultContinuation) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation);
    var l = function (value, $completion) {
      return i.ioz(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$53(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tpm_1 = _this__u8e3s4;
    this.upm_1 = collector;
  }
  protoOf($collectCOROUTINE$53).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.vpm_1 = this.upm_1;
            this.hd_1 = 1;
            var tmp_1 = UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0(this.vpm_1, this.tpm_1.xpm_1, null);
            suspendResult = this.tpm_1.wpm_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_4(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 _set_lastNavResultTimestampCollected__txfbew($this, value) {
    $this.zpb_1 = value;
    $this.kpb_1.qp7('collectedTs', value.toString());
  }
  function Companion_102() {
    Companion_instance_150 = this;
    this.ypm_1 = 'entityState';
    this.zpm_1 = 'collectedTs';
    this.apn_1 = 'initState';
    this.bpn_1 = 'timeZone';
    this.cpn_1 = 'parentUid';
    this.dpn_1 = 'courseBlockUid';
    this.epn_1 = 'entityUid';
    this.fpn_1 = 'serverUrl';
    this.gpn_1 = 'next';
    this.hpn_1 = 'maxDob';
    var tmp = this;
    Companion_getInstance_132();
    Companion_getInstance_158();
    Companion_getInstance_179();
    Companion_getInstance_190();
    tmp.ipn_1 = listOf(['CourseListHome', 'ContentEntryListHome', 'ConversationListHome', 'PersonListHome']);
    this.jpn_1 = 'openLink';
    this.kpn_1 = 'account';
    this.lpn_1 = 'popUpToOnFinish';
    this.mpn_1 = 'inviteCode';
    this.npn_1 = 'clazzUid';
    this.opn_1 = 'entryid';
    this.ppn_1 = 'personUid';
    this.qpn_1 = 't';
    this.rpn_1 = 'noSessionChange';
    this.spn_1 = 'selectedAccountPersonUid';
    this.tpn_1 = 'selectedAccountEndpointUrl';
    this.upn_1 = 'result_viewname';
    this.vpn_1 = 'result_key';
  }
  var Companion_instance_150;
  function Companion_getInstance_120() {
    if (Companion_instance_150 == null)
      new Companion_102();
    return Companion_instance_150;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_4(function_0) {
    this.wpn_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_4).t1d = function (value, $completion) {
    return this.wpn_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(function_0) {
    this.xpn_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0).mo9 = function (url, target) {
    return this.xpn_1(url, target);
  };
  function ifLoggedInElseNavigateToLoginWithNextDestSet$lambda($apiUrlConfig$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $apiUrlConfig$delegate.t2();
  }
  function UstadViewModel$onClickLinkUseCase$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.apc();
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(this$0.f5d()).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.i5e(tmp$ret$0, null);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(this$0.f5d()).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.i5e(tmp$ret$2, null);
      return OnClickLinkUseCase_init_$Create$(this$0.mpb_1, tmp, tmp_2, tmp$ret$3);
    };
  }
  function _no_name_provided__qut3iv_2($this, this$0) {
    this.wpm_1 = $this;
    this.xpm_1 = this$0;
  }
  protoOf(_no_name_provided__qut3iv_2).yoz = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$53(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_2).z1b = function (collector, $completion) {
    return this.yoz(collector, $completion);
  };
  function UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation) {
    this.gpo_1 = this$0;
    this.hpo_1 = $deserializer;
    this.ipo_1 = $jsonStr;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$getJson$slambda).kpo = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$getJson$slambda).he = function (p1, $completion) {
    return this.kpo((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$getJson$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.gpo_1.r4x().x4b(this.hpo_1, this.ipo_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$getJson$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadViewModel$getJson$slambda(this.gpo_1, this.hpo_1, this.ipo_1, completion);
    i.jpo_1 = $this$withContext;
    return i;
  };
  function UstadViewModel$getJson$slambda_0(this$0, $deserializer, $jsonStr, resultContinuation) {
    var i = new UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.kpo($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation) {
    this.tpo_1 = this$0;
    this.upo_1 = $serializer;
    this.vpo_1 = $value;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$setJson$slambda).xpo = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$setJson$slambda).he = function (p1, $completion) {
    return this.xpo((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$setJson$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.tpo_1.r4x().w4b(this.upo_1, this.vpo_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$setJson$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadViewModel$setJson$slambda(this.tpo_1, this.upo_1, this.vpo_1, completion);
    i.wpo_1 = $this$withContext;
    return i;
  };
  function UstadViewModel$setJson$slambda_0(this$0, $serializer, $value, resultContinuation) {
    var i = new UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.xpo($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    this.gpp_1 = this$0;
    this.hpp_1 = $permissionCheck;
    this.ipp_1 = $block;
    this.jpp_1 = $onSetFieldsEnabled;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchIfHasPermission$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.hd_1 = 2;
            suspendResult = localFirstThenRepoIfFalse(this.gpp_1.epc(), this.hpp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.mpp_1 = suspendResult;
            if (!this.mpp_1) {
              this.gpp_1.mpb_1.doy('Error', emptyMap(), new UstadGoOptions(this.gpp_1.lpb_1, true));
              this.hd_1 = 4;
              continue $sm;
            } else {
              this.hd_1 = 3;
              suspendResult = this.ipp_1(this.kpp_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.lpp_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.id_1 = 7;
            l$ret$5: do {
              var this_0 = this.gpp_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mov(VOID, Companion_getInstance_93().uov_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            var tmp0_safe_receiver = this.jpp_1;
            if (tmp0_safe_receiver == null)
              null;
            else
              tmp0_safe_receiver(true);
            return Unit_instance;
          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            l$ret$3: do {
              var this_1 = this.gpp_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mov(VOID, Companion_getInstance_93().uov_1);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp0_safe_receiver_0 = this.jpp_1;
            if (tmp0_safe_receiver_0 == null)
              null;
            else
              tmp0_safe_receiver_0(true);
            throw t;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this.gpp_1, this.hpp_1, this.ipp_1, this.jpp_1, completion);
    i.kpp_1 = $this$launch;
    return i;
  };
  function UstadViewModel$launchIfHasPermission$slambda_0(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    this.vpp_1 = $onSetFieldsEnabled;
    this.wpp_1 = this$0;
    this.xpp_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.vpp_1(false);
            l$ret$1: do {
              var this_0 = this.wpp_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mov(VOID, Companion_getInstance_93().tov_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.fov_1.nou(VOID, VOID, false));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.xpp_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.zpp_1 = suspendResult;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.vpp_1(true);
            l$ret$7: do {
              var this_1 = this.wpp_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mov(VOID, Companion_getInstance_93().uov_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.fov_1.nou(VOID, VOID, true));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.vpp_1(true);
            l$ret$5: do {
              var this_2 = this.wpp_1.opb_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.mov(VOID, Companion_getInstance_93().uov_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.fov_1.nou(VOID, VOID, true));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda(this.vpp_1, this.wpp_1, this.xpp_1, completion);
    i.ypp_1 = $this$launch;
    return i;
  };
  function UstadViewModel$launchWithLoadingIndicator$slambda_0($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function $getJsonCOROUTINE$50(_this__u8e3s4, _this__u8e3s4_0, key, deserializer, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ipq_1 = _this__u8e3s4;
    this.jpq_1 = _this__u8e3s4_0;
    this.kpq_1 = key;
    this.lpq_1 = deserializer;
  }
  protoOf($getJsonCOROUTINE$50).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.mpq_1 = this.jpq_1.ba(this.kpq_1);
            if (!(this.mpq_1 == null)) {
              this.hd_1 = 1;
              var tmp_0 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_0, UstadViewModel$getJson$slambda_0(this.ipq_1, this.lpq_1, this.mpq_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.npq_1 = null;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.npq_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.npq_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $setJsonCOROUTINE$51(_this__u8e3s4, _this__u8e3s4_0, key, serializer, value, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wpq_1 = _this__u8e3s4;
    this.xpq_1 = _this__u8e3s4_0;
    this.ypq_1 = key;
    this.zpq_1 = serializer;
    this.apr_1 = value;
  }
  protoOf($setJsonCOROUTINE$51).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;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, UstadViewModel$setJson$slambda_0(this.wpq_1, this.zpq_1, this.apr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var jsonStr = suspendResult;
            this.xpq_1.qp7(this.ypq_1, jsonStr);
            return Unit_instance;
          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 $loadEntityCOROUTINE$52(_this__u8e3s4, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jpr_1 = _this__u8e3s4;
    this.kpr_1 = serializer;
    this.lpr_1 = loadFromStateKeys;
    this.mpr_1 = savedStateKey;
    this.npr_1 = onLoadFromDb;
    this.opr_1 = makeDefault;
    this.ppr_1 = uiUpdate;
  }
  protoOf($loadEntityCOROUTINE$52).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp_0 = this;
            tmp_0.qpr_1 = this.lpr_1;
            this.rpr_1 = this.qpr_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.rpr_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.spr_1 = this.rpr_1.e();
            var tmp_1 = this;
            tmp_1.tpr_1 = this.spr_1;
            this.hd_1 = 2;
            suspendResult = this.jpr_1.npc(this.jpr_1.kpb_1, this.tpr_1, this.kpr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.upr_1 = suspendResult;
            if (!(this.upr_1 == null)) {
              this.ppr_1(this.upr_1);
              return this.upr_1;
            }

            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.vpr_1 = this.npr_1;
            if (this.vpr_1 == null) {
              this.wpr_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.vpr_1(this.jpr_1.dpc(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.wpr_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.xpr_1 = this.wpr_1;
            if (!(this.xpr_1 == null)) {
              this.ppr_1(this.xpr_1);
            }

            this.id_1 = 12;
            this.zpr_1 = this.npr_1;
            if (this.zpr_1 == null) {
              this.aps_1 = null;
              this.hd_1 = 7;
              continue $sm;
            } else {
              this.hd_1 = 6;
              suspendResult = this.zpr_1(this.jpr_1.epc(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 6:
            this.aps_1 = suspendResult;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.bps_1 = this.aps_1;
            if (this.bps_1 == null) {
              this.hd_1 = 8;
              suspendResult = this.opr_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.cps_1 = this.bps_1;
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            this.cps_1 = suspendResult;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.dps_1 = this.cps_1;
            if (!(this.dps_1 == null)) {
              this.hd_1 = 10;
              suspendResult = this.jpr_1.opc(this.jpr_1.kpb_1, this.mpr_1, this.kpr_1, this.dps_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 11;
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            continue $sm;
          case 11:
            this.ppr_1(this.dps_1);
            this.ypr_1 = this.dps_1;
            this.id_1 = 18;
            this.hd_1 = 17;
            continue $sm;
          case 12:
            this.id_1 = 18;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Exception) {
              this.eps_1 = this.kd_1;
              if (!(this.xpr_1 == null)) {
                this.hd_1 = 13;
                suspendResult = this.jpr_1.opc(this.jpr_1.kpb_1, this.mpr_1, this.kpr_1, this.xpr_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 14;
                continue $sm;
              }
            } else {
              throw this.kd_1;
            }

          case 13:
            this.hd_1 = 14;
            continue $sm;
          case 14:
            this.fps_1 = this.xpr_1;
            if (this.fps_1 == null) {
              this.hd_1 = 15;
              suspendResult = this.opr_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.gps_1 = this.fps_1;
              this.hd_1 = 16;
              continue $sm;
            }

          case 15:
            var this_0 = suspendResult;
            this.ppr_1(this_0);
            this.gps_1 = this_0;
            this.hd_1 = 16;
            continue $sm;
          case 16:
            this.ypr_1 = this.gps_1;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            this.id_1 = 18;
            return this.ypr_1;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UstadViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_120();
    ViewModel_init_$Init$(this);
    this.jpb_1 = di;
    this.kpb_1 = savedStateHandle;
    this.lpb_1 = destinationName;
    this.mpb_1 = new CommandFlowUstadNavController();
    this.npb_1 = this.mpb_1.coy_1;
    this.opb_1 = MutableStateFlow(new AppUiState());
    this.ppb_1 = asStateFlow(this.opb_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.qpb_1 = Instance(this, tmp$ret$0, null).f5j(this, accountManager$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_2 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.m5d(tmp$ret$2, context);
    var this_0 = On(this, tmp$ret$3, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_1.rpb_1 = Instance(this_0, tmp$ret$5, 1).f5j(this, activeDb$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.apc().kn5();
    var trigger_0 = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$8 = tmp_6.m5d(tmp$ret$7, context_0);
    var this_1 = On(this, tmp$ret$8, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_5.spb_1 = Instance(this_1, tmp$ret$10, 2).f5j(this, activeRepo$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.tpb_1 = Instance(this, tmp$ret$12, null).f5j(this, navResultReturner$factory());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.upb_1 = Instance(this, tmp$ret$14, null).f5j(this, json$factory_1());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.vpb_1 = Instance(this, tmp$ret$16, null).f5j(this, snackDispatcher$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.wpb_1 = Instance(this, tmp$ret$18, null).f5j(this, resultReturner$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.xpb_1 = Instance(this, tmp$ret$20, null).f5j(this, systemImpl$factory());
    var tmp_19 = this;
    tmp_19.ypb_1 = lazy_0(UstadViewModel$onClickLinkUseCase$delegate$lambda(this));
    var tmp_20 = this;
    var tmp0_safe_receiver = this.kpb_1.ba('collectedTs');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_20.zpb_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    if (this.zpb_1.equals(new Long(0, 0))) {
      _set_lastNavResultTimestampCollected__txfbew(this, systemTimeInMillis());
    }
  }
  protoOf(UstadViewModel).f5d = function () {
    return this.jpb_1;
  };
  protoOf(UstadViewModel).apc = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.qpb_1;
    accountManager$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).bpc = function () {
    return get_viewModelScope(this);
  };
  protoOf(UstadViewModel).cpc = function () {
    return this.apc().rn4().xmr_1.x9b_1;
  };
  protoOf(UstadViewModel).dpc = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.rpb_1;
    activeDb$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).epc = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.spb_1;
    activeRepo$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).fpc = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.tpb_1;
    navResultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).r4x = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.upb_1;
    json$factory_2();
    return this_0.t2();
  };
  protoOf(UstadViewModel).gpc = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.vpb_1;
    snackDispatcher$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).hpc = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.wpb_1;
    resultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).ipc = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.xpb_1;
    systemImpl$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).jpc = function () {
    var popUpToViewName = this.kpb_1.ba('result_viewname');
    var saveToKey = this.kpb_1.ba('result_key');
    var tmp;
    if (!(popUpToViewName == null) ? !(saveToKey == null) : false) {
      tmp = new NavResultDest(popUpToViewName, saveToKey);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UstadViewModel).kpc = function (value) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.<set-loadingState>.<anonymous>' call
        var nextValue = prevValue.mov(VOID, value);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(UstadViewModel).lpc = function () {
    return this.opb_1.t2().you_1;
  };
  protoOf(UstadViewModel).mpc = function (_this__u8e3s4, key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.soy(key);
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_2(this_0, this);
  };
  protoOf(UstadViewModel).npc = function (_this__u8e3s4, key, deserializer, $completion) {
    var tmp = new $getJsonCOROUTINE$50(this, _this__u8e3s4, key, deserializer, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).opc = function (_this__u8e3s4, key, serializer, value, $completion) {
    var tmp = new $setJsonCOROUTINE$51(this, _this__u8e3s4, key, serializer, value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).wpi = function (_this__u8e3s4, viewUri, goOptions) {
    var viewName = substringBefore_0(viewUri, '?');
    var tmp;
    if (contains(viewUri, '?')) {
      tmp = UMFileUtil_getInstance().parseURLQueryString(viewUri);
    } else {
      // Inline function 'kotlin.collections.mapOf' call
      tmp = emptyMap();
    }
    var args = tmp;
    _this__u8e3s4.doy(viewName, args, goOptions);
  };
  protoOf(UstadViewModel).tph = function (result) {
    var resultDest = this.jpc();
    if (!(resultDest == null)) {
      this.fpc().toy(new NavResult(resultDest.roy_1, systemTimeInMillis(), result));
      this.mpb_1.eoy(resultDest.qoy_1, false);
    } else {
      Companion_getInstance_110();
      this.mpb_1.eoy('', true);
    }
  };
  protoOf(UstadViewModel).ppc = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination) {
    var navArgs = toMutableMap(args);
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp = navArgs;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      this.vpc(tmp0_safe_receiver, 'result_key');
    }
    if (!navArgs.r('result_key') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_0 = 'result_key';
      navArgs.s(key_0, key);
    }
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp_0 = navArgs;
    } else {
      tmp_0 = null;
    }
    var tmp1_safe_receiver = tmp_0;
    if (tmp1_safe_receiver == null)
      null;
    else {
      this.vpc(tmp1_safe_receiver, 'result_viewname');
    }
    if (!navArgs.r('result_viewname') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_1 = 'result_viewname';
      var value = this.lpb_1;
      navArgs.s(key_1, value);
    }
    if (!(currentValue == null)) {
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_109();
      var value_0 = this.r4x().w4b(serializer, currentValue);
      navArgs.s('entity', value_0);
    }
    this.mpb_1.doy(nextViewName, toMap_0(navArgs), goOptions);
  };
  protoOf(UstadViewModel).qpc = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination, $super) {
    args = args === VOID ? emptyMap() : args;
    goOptions = goOptions === VOID ? Companion_getInstance_91().cot_1 : goOptions;
    var tmp;
    if (overwriteDestination === VOID) {
      tmp = this instanceof UstadEditViewModel;
    } else {
      tmp = overwriteDestination;
    }
    overwriteDestination = tmp;
    var tmp_0;
    if ($super === VOID) {
      this.ppc(nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.ppc.call(this, nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
    }
    return tmp_0;
  };
  protoOf(UstadViewModel).rpc = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) {
    var tmp = new $loadEntityCOROUTINE$52(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).spc = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion, $super) {
    var tmp;
    if (loadFromStateKeys === VOID) {
      Companion_getInstance_109();
      tmp = listOf(['entityState', 'entity']);
    } else {
      tmp = loadFromStateKeys;
    }
    loadFromStateKeys = tmp;
    savedStateKey = savedStateKey === VOID ? first_0(loadFromStateKeys) : savedStateKey;
    return $super === VOID ? this.rpc(serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) : $super.rpc.call(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
  };
  protoOf(UstadViewModel).tpc = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block) {
    if (setLoadingState) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.launchIfHasPermission.<anonymous>' call
          var nextValue = prevValue.mov(VOID, Companion_getInstance_93().tov_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (onSetFieldsEnabled == null)
      null;
    else
      onSetFieldsEnabled(false);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, UstadViewModel$launchIfHasPermission$slambda_0(this, permissionCheck, block, onSetFieldsEnabled, null));
  };
  protoOf(UstadViewModel).upc = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block, $super) {
    setLoadingState = setLoadingState === VOID ? false : setLoadingState;
    onSetFieldsEnabled = onSetFieldsEnabled === VOID ? null : onSetFieldsEnabled;
    var tmp;
    if ($super === VOID) {
      this.tpc(permissionCheck, setLoadingState, onSetFieldsEnabled, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.tpc.call(this, permissionCheck, setLoadingState, onSetFieldsEnabled, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).vpc = function (_this__u8e3s4, key) {
    putFromSavedStateIfPresent(_this__u8e3s4, this.kpb_1, key);
  };
  protoOf(UstadViewModel).wpc = function (_this__u8e3s4, keys) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = keys.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.putFromSavedStateIfPresent.<anonymous>' call
      this.vpc(_this__u8e3s4, element);
    }
  };
  protoOf(UstadViewModel).xpi = function (onSetFieldsEnabled, block) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, UstadViewModel$launchWithLoadingIndicator$slambda_0(onSetFieldsEnabled, this, block, null));
  };
  protoOf(UstadViewModel).xpc = function (requireAdultAccount, args, block) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var apiUrlConfig$delegate = Instance(this, tmp$ret$0, null).f5j(null, getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.ifLoggedInElseNavigateToLoginWithNextDestSet.<anonymous>' call
    var it = this.apc().rn4().xmr_1;
    if (isGuestUser(it) ? true : requireAdultAccount ? !isDateOfBirthAnAdult(Companion_getInstance_6().ulh(it.f9c_1)) : false) {
      var tmp_0 = this.lpb_1 + '?' + toQueryString(args);
      var tmp_1 = this.apc();
      var tmp_2 = UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda;
      navigateToLink(this.mpb_1, tmp_0, tmp_1, new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(tmp_2), new UstadGoOptions(this.lpb_1, true), VOID, ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(apiUrlConfig$delegate).gn5_1);
    } else {
      block();
    }
  };
  protoOf(UstadViewModel).ypc = function (requireAdultAccount, args, block, $super) {
    requireAdultAccount = requireAdultAccount === VOID ? false : requireAdultAccount;
    var tmp;
    if ($super === VOID) {
      this.xpc(requireAdultAccount, args, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.xpc.call(this, requireAdultAccount, args, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).zpc = function (contentEntryUid, clazzUid, cbUid) {
    var registrationUuid = uuid4();
    var activityId = this.apc().kn5().hmr_1 + 'ns/xapi/contentEntry/' + contentEntryUid.toString();
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this.f5d()).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var xxStringHasher = tmp.i5e(tmp$ret$0, null);
    var tmp_1 = get_doorPrimaryKeyManager(this.dpc());
    var tmp1_xseUid = tmp_1.s68(400122);
    var tmp2_xseAccountPersonUid = this.cpc();
    var tmp0_elvis_lhs = this.apc().rn4().xmr_1.y9b_1;
    var tmp3_xseAccountUsername = tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs;
    var tmp4_xseRootActivityUid = xxStringHasher.ton(activityId);
    var tmp5_xseRegistrationHi = registrationUuid.kle();
    var tmp6_xseRegistrationLo = registrationUuid.lle();
    return new XapiSessionEntity(tmp1_xseUid, VOID, tmp5_xseRegistrationHi, tmp6_xseRegistrationLo, VOID, tmp2_xseAccountPersonUid, VOID, tmp3_xseAccountUsername, clazzUid, cbUid, contentEntryUid, VOID, activityId, tmp4_xseRootActivityUid);
  };
  protoOf(UstadViewModel).apd = function (contentEntryUid, clazzUid, cbUid, $super) {
    contentEntryUid = contentEntryUid === VOID ? new Long(0, 0) : contentEntryUid;
    var tmp;
    if (clazzUid === VOID) {
      var tmp0_safe_receiver = this.kpb_1.ba('clazzUid');
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
      tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    } else {
      tmp = clazzUid;
    }
    clazzUid = tmp;
    var tmp_0;
    if (cbUid === VOID) {
      var tmp2_safe_receiver = this.kpb_1.ba('courseBlockUid');
      var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
      tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    } else {
      tmp_0 = cbUid;
    }
    cbUid = tmp_0;
    return $super === VOID ? this.zpc(contentEntryUid, clazzUid, cbUid) : $super.zpc.call(this, contentEntryUid, clazzUid, cbUid);
  };
  function accountManager$factory() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.apc();
    }, null);
  }
  function activeDb$factory() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.dpc();
    }, null);
  }
  function activeRepo$factory() {
    return getPropertyCallableRef('activeRepo', 1, KProperty1, function (receiver) {
      return receiver.epc();
    }, null);
  }
  function navResultReturner$factory() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.fpc();
    }, null);
  }
  function json$factory_1() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.r4x();
    }, null);
  }
  function snackDispatcher$factory() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.gpc();
    }, null);
  }
  function resultReturner$factory() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.hpc();
    }, null);
  }
  function systemImpl$factory() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.ipc();
    }, null);
  }
  function accountManager$factory_0() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.apc();
    }, null);
  }
  function activeDb$factory_0() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.dpc();
    }, null);
  }
  function activeRepo$factory_0() {
    return getPropertyCallableRef('activeRepo', 1, KProperty1, function (receiver) {
      return receiver.epc();
    }, null);
  }
  function navResultReturner$factory_0() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.fpc();
    }, null);
  }
  function json$factory_2() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.r4x();
    }, null);
  }
  function snackDispatcher$factory_0() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.gpc();
    }, null);
  }
  function resultReturner$factory_0() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.hpc();
    }, null);
  }
  function systemImpl$factory_0() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.ipc();
    }, null);
  }
  function Companion_103() {
    this.hps_1 = 'OpenLicenses';
  }
  var Companion_instance_151;
  function Companion_getInstance_121() {
    return Companion_instance_151;
  }
  function OpenLicensesViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'EpubContent');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.about.OpenLicensesViewModel.<anonymous>' call
        var tmp0_title = this.ipc().rnd(strings_getInstance().xmm_1);
        var nextValue = prevValue.mov(VOID, VOID, tmp0_title, false, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function AccountListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.qps_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda).imv = function (it, $completion) {
    var tmp = this.jmv(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.imv(p1 instanceof UserSessionWithPersonAndEndpoint ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.qps_1.tpt_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.gpu(this.rps_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda).jmv = function (it, completion) {
    var i = new AccountListViewModel$slambda$slambda(this.qps_1, completion);
    i.rps_1 = it;
    return i;
  };
  function AccountListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.imv(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ppu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda$slambda).rpu = function (accountList, $completion) {
    var tmp = this.spu(accountList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.rpu((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var currentUserSessionUid = this.ppu_1.apc().rn4().wmr_1.ji2_1;
          var this_0 = this.qpu_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var isFilteredOutActiveAccount = this.ppu_1.ppt_1 === 'header' ? element.wmr_1.ji2_1.equals(currentUserSessionUid) : false;
            var isFilteredOutByEndpoint = !(this.ppu_1.opt_1 == null) ? !(element.ymr_1.hmr_1 === this.ppu_1.opt_1) : false;
            var isFilteredOutByDateOfBirth = this.ppu_1.qpt_1.c7(new Long(0, 0)) > 0 ? element.xmr_1.f9c_1.c7(this.ppu_1.qpt_1) > 0 : false;
            if (!(((isFilteredOutActiveAccount ? true : isFilteredOutByEndpoint) ? true : isFilteredOutByDateOfBirth) ? true : isTemporary(element.wmr_1))) {
              destination.i1(element);
            }
          }
          var accountsToDisplay = destination;
          l$ret$1: do {
            var this_1 = this.ppu_1.tpt_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.gpu(VOID, accountsToDisplay);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).spu = function (accountList, completion) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this.ppu_1, completion);
    i.qpu_1 = accountList;
    return i;
  };
  function AccountListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (accountList, $completion) {
      return i.rpu(accountList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.bpv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda_1).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).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;
            var tmp_0 = this.bpv_1.apc().jn5();
            var tmp_1 = AccountListViewModel$slambda$slambda$slambda_0(this.bpv_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_5(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).q7e = function (completion) {
    return new AccountListViewModel$slambda$slambda_1(this.bpv_1, completion);
  };
  function AccountListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function _get_apiUrlConfig__mldllg_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rpt_1;
    apiUrlConfig$factory_2();
    return this_0.t2();
  }
  function _get_shareAppUseCase__louoas($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.spt_1;
    shareAppUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vpt_1;
    getVersionUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchOpenLicensesUseCase__f5qz1z($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wpt_1;
    launchOpenLicensesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xpt_1;
    getShowPoweredByUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_104() {
    this.cpv_1 = 'AccountList';
    this.dpv_1 = 'filterByEndpoint';
    this.epv_1 = 'activeAccountMode';
    this.fpv_1 = 'header';
    this.gpv_1 = 'inlist';
  }
  var Companion_instance_152;
  function Companion_getInstance_122() {
    return Companion_instance_152;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_5(function_0) {
    this.hpv_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_5).t1d = function (value, $completion) {
    return this.hpv_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(function_0) {
    this.ipv_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0).mo9 = function (url, target) {
    return this.ipv_1(url, target);
  };
  function AccountListViewModel$slambda(this$0, resultContinuation) {
    this.rpv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda).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;
            var tmp_0 = this.rpv_1.apc().hn5();
            var tmp_1 = AccountListViewModel$slambda$slambda_0(this.rpv_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_5(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(AccountListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda(this.rpv_1, completion);
    i.spv_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda_1(this$0, resultContinuation) {
    this.bpw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda_1).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 = whenSubscribed(this.bpw_1.tpt_1, AccountListViewModel$slambda$slambda_2(this.bpw_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(AccountListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda_1(this.bpw_1, completion);
    i.cpw_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation) {
    this.lpw_1 = this$0;
    this.mpw_1 = $currentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickLogout$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).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.lpw_1.apc().pn5(this.mpw_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_$receiver = this.lpw_1.mpb_1;
            Companion_getInstance_132();
            var tmp1_link = 'CourseListHome';
            var tmp2_accountManager = this.lpw_1.apc();
            var tmp_0 = AccountListViewModel$onClickLogout$slambda$lambda;
            var tmp3_openExternalLinkUseCase = new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(tmp_0);
            var tmp4_userCanSelectServer = _get_apiUrlConfig__mldllg_0(this.lpw_1).gn5_1;
            var tmp5_goOptions = new UstadGoOptions(VOID, VOID, true);
            navigateToLink(tmp0_$receiver, tmp1_link, tmp2_accountManager, tmp3_openExternalLinkUseCase, tmp5_goOptions, VOID, tmp4_userCanSelectServer);
            return Unit_instance;
          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);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickLogout$slambda(this.lpw_1, this.mpw_1, completion);
    i.npw_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickLogout$slambda_0(this$0, $currentSession, resultContinuation) {
    var i = new AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation) {
    this.wpw_1 = this$0;
    this.xpw_1 = $session;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).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.wpw_1.apc().pn5(this.xpw_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this.wpw_1, this.xpw_1, completion);
    i.ypw_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickDeleteAccount$slambda_0(this$0, $session, resultContinuation) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation) {
    this.hpx_1 = $launchUseCaseVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).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.hpx_1.e8d(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda(this.hpx_1, completion);
    i.ipx_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickOpenLicenses$slambda_0($launchUseCaseVal, resultContinuation) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel(di, savedStateHandle, startUserSessionUseCase) {
    var tmp;
    if (startUserSessionUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.i5e(tmp$ret$0, null);
      tmp = new StartUserSessionUseCase(tmp$ret$1);
    } else {
      tmp = startUserSessionUseCase;
    }
    startUserSessionUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'AccountList');
    this.npt_1 = startUserSessionUseCase;
    this.opt_1 = savedStateHandle.ba('filterByEndpoint');
    var tmp_2 = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('activeAccountMode');
    tmp_2.ppt_1 = tmp0_elvis_lhs == null ? 'header' : tmp0_elvis_lhs;
    var tmp_3 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('maxDob');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.qpt_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.rpt_1 = Instance(this, tmp$ret$2, null).f5j(this, apiUrlConfig$factory_1());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(ShareAppUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.spt_1 = InstanceOrNull(this, tmp$ret$4, null).f5j(this, shareAppUseCase$factory());
    this.tpt_1 = MutableStateFlow(new AccountListUiState(VOID, VOID, _get_apiUrlConfig__mldllg_0(this).gn5_1, VOID, VOID, !(_get_shareAppUseCase__louoas(this) == null)));
    this.upt_1 = asStateFlow(this.tpt_1);
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.vpt_1 = InstanceOrNull(this, tmp$ret$6, null).f5j(this, getVersionUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(LaunchOpenLicensesUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.wpt_1 = InstanceOrNull(this, tmp$ret$8, null).f5j(this, launchOpenLicensesUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.xpt_1 = InstanceOrNull(this, tmp$ret$10, null).f5j(this, getShowPoweredByUseCase$factory());
    var tmp_14 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    tmp_14.ypt_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_15;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().np8_1) {
      tmp_15 = this.ipc().rnd(strings_getInstance().vma_1);
    } else {
      tmp_15 = this.ipc().rnd(strings_getInstance().nlm_1);
    }
    var tmp0_title = tmp_15;
    this.opb_1.x1k(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.tpt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.accountlist.AccountListViewModel.<anonymous>' call
        var tmp0_safe_receiver_1 = _get_getVersionUseCase__n7x57g(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.to8();
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ro8_1;
        var tmp_16 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
        var tmp3_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e(this);
        var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.to8();
        var nextValue = prevValue.gpu(VOID, VOID, VOID, tmp_16, tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'kotlin.takeIf' call
    var this_1 = this.bpc();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_17;
    // Inline function 'com.ustadmobile.core.viewmodel.accountlist.AccountListViewModel.<anonymous>' call
    if (this.ppt_1 === 'header') {
      tmp_17 = this_1;
    } else {
      tmp_17 = null;
    }
    var tmp1_safe_receiver_0 = tmp_17;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      launch(tmp1_safe_receiver_0, VOID, VOID, AccountListViewModel$slambda_0(this, null));
    }
    var tmp_18 = this.bpc();
    launch(tmp_18, VOID, VOID, AccountListViewModel$slambda_2(this, null));
  }
  protoOf(AccountListViewModel).jpx = function () {
    var tmp0_elvis_lhs = this.tpt_1.t2().zpt_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSession = tmp;
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, AccountListViewModel$onClickLogout$slambda_0(this, currentSession, null));
  };
  protoOf(AccountListViewModel).kpx = function () {
    var tmp0_safe_receiver = this.tpt_1.t2().zpt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xmr_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.x9b_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var personUid = tmp;
    Companion_getInstance_120();
    this.mpb_1.fo0('PersonDetailView', mapOf_0(to('entityUid', personUid.toString())));
  };
  protoOf(AccountListViewModel).lpx = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.accountlist.AccountListViewModel.onClickAddAccount.<anonymous>' call
    if (!(this.opt_1 == null)) {
      Companion_getInstance_120();
      this_0.s('serverUrl', this.opt_1);
    }
    Companion_getInstance_120();
    Companion_getInstance_120();
    this.wpc(this_0, listOf(['next', 'noSessionChange']));
    Companion_getInstance_120();
    Companion_getInstance_120();
    var tmp0_elvis_lhs = this.kpb_1.ba('maxDob');
    this_0.s('maxDob', tmp0_elvis_lhs == null ? '0' : tmp0_elvis_lhs);
    var args = this_0.f3();
    if (!(this.opt_1 == null) ? true : !_get_apiUrlConfig__mldllg_0(this).gn5_1) {
      this.mpb_1.fo0('Login', args);
    } else {
      Companion_getInstance_200();
      this.mpb_1.fo0('SiteEnterLink', args);
    }
  };
  protoOf(AccountListViewModel).mpx = function (sessionWithPersonAndEndpoint) {
    var tmp1_$this = this.npt_1;
    var tmp2_navController = this.mpb_1;
    Companion_getInstance_120();
    var tmp0_elvis_lhs = this.kpb_1.ba('next');
    var tmp;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_132();
      tmp = 'CourseListHome';
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var tmp3_nextDest = tmp;
    var tmp4_dontSetCurrentSession = this.ypt_1;
    tmp1_$this.poe(sessionWithPersonAndEndpoint, tmp3_nextDest, tmp2_navController, VOID, tmp4_dontSetCurrentSession);
  };
  protoOf(AccountListViewModel).npx = function (session) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickDeleteAccount$slambda_0(this, session, null));
  };
  protoOf(AccountListViewModel).opx = function () {
    var launchUseCaseVal = _get_launchOpenLicensesUseCase__f5qz1z(this);
    if (!(launchUseCaseVal == null)) {
      var tmp = this.bpc();
      launch(tmp, VOID, VOID, AccountListViewModel$onClickOpenLicenses$slambda_0(launchUseCaseVal, null));
    } else {
      this.mpb_1.fo0('OpenLicenses', emptyMap());
    }
  };
  function AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    headerAccount = headerAccount === VOID ? null : headerAccount;
    accountsList = accountsList === VOID ? emptyList() : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? false : showAccountEndpoint;
    version = version === VOID ? '' : version;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? false : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? false : shareAppBottomSheetVisible;
    this.zpt_1 = headerAccount;
    this.apu_1 = accountsList;
    this.bpu_1 = showAccountEndpoint;
    this.cpu_1 = version;
    this.dpu_1 = showPoweredBy;
    this.epu_1 = shareAppOptionVisible;
    this.fpu_1 = shareAppBottomSheetVisible;
  }
  protoOf(AccountListUiState).ppx = function () {
    return !(this.zpt_1 == null) ? !this.zpt_1.xmr_1.x9b_1.equals(new Long(0, 0)) : false;
  };
  protoOf(AccountListUiState).qpx = function () {
    return !(this.zpt_1 == null) ? !isGuestUser(this.zpt_1.xmr_1) : false;
  };
  protoOf(AccountListUiState).rpx = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    return new AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).gpu = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible, $super) {
    headerAccount = headerAccount === VOID ? this.zpt_1 : headerAccount;
    accountsList = accountsList === VOID ? this.apu_1 : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? this.bpu_1 : showAccountEndpoint;
    version = version === VOID ? this.cpu_1 : version;
    showPoweredBy = showPoweredBy === VOID ? this.dpu_1 : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? this.epu_1 : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? this.fpu_1 : shareAppBottomSheetVisible;
    return $super === VOID ? this.rpx(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) : $super.rpx.call(this, headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).toString = function () {
    return 'AccountListUiState(headerAccount=' + this.zpt_1 + ', accountsList=' + this.apu_1 + ', showAccountEndpoint=' + this.bpu_1 + ', version=' + this.cpu_1 + ', showPoweredBy=' + this.dpu_1 + ', shareAppOptionVisible=' + this.epu_1 + ', shareAppBottomSheetVisible=' + this.fpu_1 + ')';
  };
  protoOf(AccountListUiState).hashCode = function () {
    var result = this.zpt_1 == null ? 0 : this.zpt_1.hashCode();
    result = imul(result, 31) + hashCode(this.apu_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bpu_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.cpu_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dpu_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.epu_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fpu_1) | 0;
    return result;
  };
  protoOf(AccountListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AccountListUiState ? other : THROW_CCE();
    if (!equals(this.zpt_1, tmp0_other_with_cast.zpt_1))
      return false;
    if (!equals(this.apu_1, tmp0_other_with_cast.apu_1))
      return false;
    if (!(this.bpu_1 === tmp0_other_with_cast.bpu_1))
      return false;
    if (!(this.cpu_1 === tmp0_other_with_cast.cpu_1))
      return false;
    if (!(this.dpu_1 === tmp0_other_with_cast.dpu_1))
      return false;
    if (!(this.epu_1 === tmp0_other_with_cast.epu_1))
      return false;
    if (!(this.fpu_1 === tmp0_other_with_cast.fpu_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_1() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function shareAppUseCase$factory() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function apiUrlConfig$factory_2() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function shareAppUseCase$factory_0() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory_0() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory_0() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_0() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function Companion_105() {
    this.spx_1 = 'AppearanceDetailView';
  }
  var Companion_instance_153;
  function Companion_getInstance_123() {
    return Companion_instance_153;
  }
  function AppearanceDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.spy();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function AppearanceDetailViewModel$slambda(this$0, resultContinuation) {
    this.bpz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AppearanceDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AppearanceDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AppearanceDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.bpz_1.qpy_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.hpz(this.bpz_1.ipc().rnd(strings_getInstance().vli_1), VOID, this.bpz_1.ipc().rnd(strings_getInstance().yli_1), this.bpz_1.ipc().rnd(strings_getInstance().zli_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AppearanceDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new AppearanceDetailViewModel$slambda(this.bpz_1, completion);
    i.cpz_1 = $this$launch;
    return i;
  };
  function AppearanceDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new AppearanceDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AppearanceDetailViewModel(di, savedStateHandle, destName) {
    destName = destName === VOID ? 'AppearanceDetailView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.qpy_1 = MutableStateFlow(new AppearanceDetailUiState());
    this.rpy_1 = asStateFlow(this.qpy_1);
    this.kpc(Companion_getInstance_93().uov_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceDetailViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, this.ipc().rnd(strings_getInstance().fma_1), VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceDetailViewModel.<anonymous>' call
        var tmp = this.ipc().rnd(strings_getInstance().tlv_1);
        var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp, VOID, AppearanceDetailViewModel$onClickEdit$ref(this)));
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, AppearanceDetailViewModel$slambda_0(this, null));
  }
  protoOf(AppearanceDetailViewModel).spy = function () {
    this.mpb_1.fo0('AppearanceEditView', emptyMap());
  };
  function AppearanceDetailUiState(organisationName, organisationLogo, jetpackComposeTheme, muiTheme) {
    organisationName = organisationName === VOID ? null : organisationName;
    organisationLogo = organisationLogo === VOID ? null : organisationLogo;
    jetpackComposeTheme = jetpackComposeTheme === VOID ? null : jetpackComposeTheme;
    muiTheme = muiTheme === VOID ? null : muiTheme;
    this.dpz_1 = organisationName;
    this.epz_1 = organisationLogo;
    this.fpz_1 = jetpackComposeTheme;
    this.gpz_1 = muiTheme;
  }
  protoOf(AppearanceDetailUiState).ipz = function (organisationName, organisationLogo, jetpackComposeTheme, muiTheme) {
    return new AppearanceDetailUiState(organisationName, organisationLogo, jetpackComposeTheme, muiTheme);
  };
  protoOf(AppearanceDetailUiState).hpz = function (organisationName, organisationLogo, jetpackComposeTheme, muiTheme, $super) {
    organisationName = organisationName === VOID ? this.dpz_1 : organisationName;
    organisationLogo = organisationLogo === VOID ? this.epz_1 : organisationLogo;
    jetpackComposeTheme = jetpackComposeTheme === VOID ? this.fpz_1 : jetpackComposeTheme;
    muiTheme = muiTheme === VOID ? this.gpz_1 : muiTheme;
    return $super === VOID ? this.ipz(organisationName, organisationLogo, jetpackComposeTheme, muiTheme) : $super.ipz.call(this, organisationName, organisationLogo, jetpackComposeTheme, muiTheme);
  };
  protoOf(AppearanceDetailUiState).toString = function () {
    return 'AppearanceDetailUiState(organisationName=' + this.dpz_1 + ', organisationLogo=' + this.epz_1 + ', jetpackComposeTheme=' + this.fpz_1 + ', muiTheme=' + this.gpz_1 + ')';
  };
  protoOf(AppearanceDetailUiState).hashCode = function () {
    var result = this.dpz_1 == null ? 0 : getStringHashCode(this.dpz_1);
    result = imul(result, 31) + (this.epz_1 == null ? 0 : getStringHashCode(this.epz_1)) | 0;
    result = imul(result, 31) + (this.fpz_1 == null ? 0 : getStringHashCode(this.fpz_1)) | 0;
    result = imul(result, 31) + (this.gpz_1 == null ? 0 : getStringHashCode(this.gpz_1)) | 0;
    return result;
  };
  protoOf(AppearanceDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppearanceDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppearanceDetailUiState ? other : THROW_CCE();
    if (!(this.dpz_1 == tmp0_other_with_cast.dpz_1))
      return false;
    if (!(this.epz_1 == tmp0_other_with_cast.epz_1))
      return false;
    if (!(this.fpz_1 == tmp0_other_with_cast.fpz_1))
      return false;
    if (!(this.gpz_1 == tmp0_other_with_cast.gpz_1))
      return false;
    return true;
  };
  function AppearanceEditViewModel$onClickSave$slambda$lambda() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda$lambda(it) {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_0($uriFileData) {
    return function () {
      // Inline function 'io.ktor.utils.io.core.ByteReadPacket' call
      var array = $uriFileData.yo6_1;
      var length = array.length;
      return ByteReadPacket(array, 0, length, AppearanceEditViewModel$onClickSave$slambda$lambda$lambda);
    };
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_1() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_2() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_3() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_0(it) {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_4($fileBytes) {
    return function () {
      // Inline function 'io.ktor.utils.io.core.ByteReadPacket' call
      var array = $fileBytes;
      var length = array.length;
      return ByteReadPacket(array, 0, length, AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_0);
    };
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_5() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_1(it) {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_6($uriFileData) {
    return function () {
      // Inline function 'io.ktor.utils.io.core.ByteReadPacket' call
      var array = $uriFileData.yo6_1;
      var length = array.length;
      return ByteReadPacket(array, 0, length, AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_1);
    };
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_7() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_8() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_2(it) {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_9($fileBytes) {
    return function () {
      // Inline function 'io.ktor.utils.io.core.ByteReadPacket' call
      var array = $fileBytes;
      var length = array.length;
      return ByteReadPacket(array, 0, length, AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_2);
    };
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_10() {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_3(it) {
    return Unit_instance;
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_11($uriFileData) {
    return function () {
      // Inline function 'io.ktor.utils.io.core.ByteReadPacket' call
      var array = $uriFileData.yo6_1;
      var length = array.length;
      return ByteReadPacket(array, 0, length, AppearanceEditViewModel$onClickSave$slambda$lambda$lambda_3);
    };
  }
  function AppearanceEditViewModel$onClickSave$slambda$lambda_12() {
    return Unit_instance;
  }
  function _get_httpClient__2ty1zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.iq0_1;
    httpClient$factory_2();
    return this_0.t2();
  }
  function _get_uriFileUseCase__4dtah0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jq0_1;
    uriFileUseCase$factory_0();
    return this_0.t2();
  }
  function _get_blobFileUseCase__kmqft9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kq0_1;
    blobFileUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_106() {
    this.lq0_1 = 'AppearanceEditView';
  }
  var Companion_instance_154;
  function Companion_getInstance_124() {
    return Companion_instance_154;
  }
  function AppearanceEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function AppearanceEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.vq0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AppearanceEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AppearanceEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AppearanceEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            this.id_1 = 13;
            this.vq0_1.kpc(Companion_getInstance_93().tov_1);
            l$ret$1: do {
              var this_0 = this.vq0_1.gq0_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mq2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.xq0_1 = this.vq0_1.apc().kn5().hmr_1;
            var tmp_0 = this;
            tmp_0.yq0_1 = ArrayList_init_$Create$();
            var tmp0_safe_receiver = this.vq0_1.gq0_1.t2().cq2_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              var tmp_1 = AppearanceEditViewModel$onClickSave$slambda$lambda;
              Companion_getInstance_12();
              var this_1 = new HeadersBuilder();
              this_1.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="organisationName"');
              this.yq0_1.i1(new FormItem(tmp0_safe_receiver, tmp_1, this_1.f3()));
            }

            this.zq0_1 = this.vq0_1.gq0_1.t2().dq2_1;
            if (this.zq0_1 == null) {
              this.aq1_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.bq1_1 = this.zq0_1;
              var tmp_3 = this;
              tmp_3.cq1_1 = this.bq1_1;
              this.hd_1 = 1;
              suspendResult = _get_uriFileUseCase__4dtah0(this.vq0_1).ko8(this.cq1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.dq1_1 = suspendResult;
            var tmp_4 = this;
            var tmp_5;
            if (!(this.dq1_1.yo6_1 == null)) {
              var tmp_6 = AppearanceEditViewModel$onClickSave$slambda$lambda_0(this.dq1_1);
              var tmp_7 = AppearanceEditViewModel$onClickSave$slambda$lambda_1;
              Companion_getInstance_12();
              var this_2 = new HeadersBuilder();
              this_2.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="orgLogo"; filename="' + this.dq1_1.zo6_1 + '"');
              this_2.c2q(HttpHeaders_getInstance().a2x_1, this.dq1_1.ao7_1);
              tmp_5 = this.yq0_1.i1(new FileItem(tmp_6, tmp_7, this_2.f3()));
            } else {
              var tmp_8 = AppearanceEditViewModel$onClickSave$slambda$lambda_2;
              Companion_getInstance_12();
              var this_3 = new HeadersBuilder();
              tmp_5 = this.yq0_1.i1(new FormItem(this.cq1_1, tmp_8, this_3.f3()));
            }

            tmp_4.aq1_1 = tmp_5;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.eq1_1 = this.vq0_1.gq0_1.t2().eq2_1;
            if (this.eq1_1 == null) {
              this.fq1_1 = null;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_9 = this;
              tmp_9.gq1_1 = this.eq1_1;
              var tmp_10 = this;
              tmp_10.hq1_1 = this.gq1_1;
              var tmp_11 = this;
              var tmp0_elvis_lhs = this.vq0_1.gq0_1.t2().fq2_1;
              tmp_11.iq1_1 = tmp0_elvis_lhs == null ? substringBefore_0(substringAfterLast_0(this.hq1_1, '/'), '.') : tmp0_elvis_lhs;
              var tmp_12 = AppearanceEditViewModel$onClickSave$slambda$lambda_3;
              Companion_getInstance_12();
              var this_4 = new HeadersBuilder();
              this_4.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="jetpackComposeThemeName"');
              this.yq0_1.i1(new FormItem(this.iq1_1, tmp_12, this_4.f3()));
              if (startsWith(this.hq1_1, 'blob:')) {
                this.hd_1 = 4;
                suspendResult = _get_blobFileUseCase__kmqft9(this.vq0_1).vo6(this.hq1_1, this.iq1_1, 'application/zip', this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 3;
                suspendResult = _get_uriFileUseCase__4dtah0(this.vq0_1).ko8(this.hq1_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 3:
            this.jq1_1 = suspendResult;
            if (!(this.jq1_1.yo6_1 == null)) {
              var tmp_13 = AppearanceEditViewModel$onClickSave$slambda$lambda_6(this.jq1_1);
              var tmp_14 = AppearanceEditViewModel$onClickSave$slambda$lambda_7;
              Companion_getInstance_12();
              var this_5 = new HeadersBuilder();
              this_5.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="jetpackComposeTheme"; filename="' + this.jq1_1.zo6_1 + '"');
              this_5.c2q(HttpHeaders_getInstance().a2x_1, this.jq1_1.ao7_1);
              this.yq0_1.i1(new FileItem(tmp_13, tmp_14, this_5.f3()));
            }

            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.kq1_1 = suspendResult;
            if (!(this.kq1_1 == null)) {
              var tmp_15 = AppearanceEditViewModel$onClickSave$slambda$lambda_4(this.kq1_1);
              var tmp_16 = AppearanceEditViewModel$onClickSave$slambda$lambda_5;
              Companion_getInstance_12();
              var this_6 = new HeadersBuilder();
              this_6.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="jetpackComposeTheme"; filename="' + this.iq1_1 + '"');
              this_6.c2q(HttpHeaders_getInstance().a2x_1, 'application/zip');
              this.yq0_1.i1(new FileItem(tmp_15, tmp_16, this_6.f3()));
            }

            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.fq1_1 = Unit_instance;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.lq1_1 = this.vq0_1.gq0_1.t2().gq2_1;
            if (this.lq1_1 == null) {
              this.mq1_1 = null;
              this.hd_1 = 10;
              continue $sm;
            } else {
              var tmp_17 = this;
              tmp_17.nq1_1 = this.lq1_1;
              var tmp_18 = this;
              tmp_18.oq1_1 = this.nq1_1;
              var tmp_19 = this;
              var tmp0_elvis_lhs_0 = this.vq0_1.gq0_1.t2().hq2_1;
              tmp_19.pq1_1 = tmp0_elvis_lhs_0 == null ? substringBefore_0(substringAfterLast_0(this.oq1_1, '/'), '.') : tmp0_elvis_lhs_0;
              var tmp_20 = AppearanceEditViewModel$onClickSave$slambda$lambda_8;
              Companion_getInstance_12();
              var this_7 = new HeadersBuilder();
              this_7.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="muiThemeName"');
              this.yq0_1.i1(new FormItem(this.pq1_1, tmp_20, this_7.f3()));
              if (startsWith(this.oq1_1, 'blob:')) {
                this.hd_1 = 8;
                suspendResult = _get_blobFileUseCase__kmqft9(this.vq0_1).vo6(this.oq1_1, this.pq1_1, 'application/json', this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 7;
                suspendResult = _get_uriFileUseCase__4dtah0(this.vq0_1).ko8(this.oq1_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 7:
            this.qq1_1 = suspendResult;
            if (!(this.qq1_1.yo6_1 == null)) {
              var tmp_21 = AppearanceEditViewModel$onClickSave$slambda$lambda_11(this.qq1_1);
              var tmp_22 = AppearanceEditViewModel$onClickSave$slambda$lambda_12;
              Companion_getInstance_12();
              var this_8 = new HeadersBuilder();
              this_8.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="muiTheme"; filename="' + this.qq1_1.zo6_1 + '"');
              this_8.c2q(HttpHeaders_getInstance().a2x_1, this.qq1_1.ao7_1);
              this.yq0_1.i1(new FileItem(tmp_21, tmp_22, this_8.f3()));
            }

            this.hd_1 = 9;
            continue $sm;
          case 8:
            this.rq1_1 = suspendResult;
            if (!(this.rq1_1 == null)) {
              var tmp_23 = AppearanceEditViewModel$onClickSave$slambda$lambda_9(this.rq1_1);
              var tmp_24 = AppearanceEditViewModel$onClickSave$slambda$lambda_10;
              Companion_getInstance_12();
              var this_9 = new HeadersBuilder();
              this_9.c2q(HttpHeaders_getInstance().u2w_1, 'form-data; name="muiTheme"; filename="' + this.pq1_1 + '"');
              this_9.c2q(HttpHeaders_getInstance().a2x_1, 'application/json');
              this.yq0_1.i1(new FileItem(tmp_23, tmp_24, this_9.f3()));
            }

            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.mq1_1 = Unit_instance;
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.sq1_1 = new MultiPartFormDataContent(this.yq0_1);
            var tmp_25 = this;
            tmp_25.tq1_1 = _get_httpClient__2ty1zc_0(this.vq0_1);
            var tmp_26 = this;
            tmp_26.uq1_1 = this.xq0_1 + 'api/theme/upload';
            var tmp_27 = this;
            tmp_27.vq1_1 = this.tq1_1;
            var tmp_28 = this;
            tmp_28.wq1_1 = this.vq1_1;
            var tmp_29 = this;
            var this_10 = new HttpRequestBuilder();
            url(this_10, this.uq1_1);
            var body = this.sq1_1;
            if (body == null) {
              this_10.p3c_1 = NullBody_instance;
              var tmp_30 = JsType_instance;
              var tmp_31 = getKClass(MultiPartFormDataContent);
              var tmp_32;
              try {
                tmp_32 = createKType(getKClass(MultiPartFormDataContent), arrayOf([]), false);
              } catch ($p) {
                var tmp_33;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_33 = null;
                } else {
                  throw $p;
                }
                tmp_32 = tmp_33;
              }
              this_10.m3i(typeInfoImpl(tmp_30, tmp_31, tmp_32));
            } else {
              if (body instanceof OutgoingContent) {
                this_10.p3c_1 = body;
                this_10.m3i(null);
              } else {
                this_10.p3c_1 = body;
                var tmp_34 = JsType_instance;
                var tmp_35 = getKClass(MultiPartFormDataContent);
                var tmp_36;
                try {
                  tmp_36 = createKType(getKClass(MultiPartFormDataContent), arrayOf([]), false);
                } catch ($p) {
                  var tmp_37;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_37 = null;
                  } else {
                    throw $p;
                  }
                  tmp_36 = tmp_37;
                }
                this_10.m3i(typeInfoImpl(tmp_34, tmp_35, tmp_36));
              }
            }

            tmp_29.xq1_1 = this_10;
            this.xq1_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_38 = this;
            tmp_38.yq1_1 = this.wq1_1;
            var tmp_39 = this;
            tmp_39.zq1_1 = this.xq1_1;
            this.hd_1 = 11;
            suspendResult = (new HttpStatement(this.zq1_1, this.yq1_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            this.aq2_1 = suspendResult;
            var tmp_40 = this;
            tmp_40.bq2_1 = this.aq2_1;
            this.hd_1 = 12;
            var tmp_41 = this.bq2_1.v3f();
            var tmp_42 = JsType_instance;
            var tmp_43 = getKClass(ThemeUploadResponse);
            var tmp_44;
            try {
              tmp_44 = createKType(getKClass(ThemeUploadResponse), arrayOf([]), false);
            } catch ($p) {
              var tmp_45;
              if ($p instanceof Error) {
                var cause_1 = $p;
                tmp_45 = null;
              } else {
                throw $p;
              }
              tmp_44 = tmp_45;
            }

            suspendResult = tmp_41.y3e(typeInfoImpl(tmp_42, tmp_43, tmp_44), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 12:
            var result = suspendResult instanceof ThemeUploadResponse ? suspendResult : THROW_CCE();
            if (isSuccess(this.aq2_1.a3f()) ? result.sod_1 : false) {
              this.vq0_1.kpc(Companion_getInstance_93().uov_1);
              l$ret$3: do {
                var this_11 = this.vq0_1.gq0_1;
                while (true) {
                  var prevValue_0 = this_11.t2();
                  var nextValue_0 = prevValue_0.mq2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null, true);
                  if (this_11.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            } else {
              this.vq0_1.kpc(Companion_getInstance_93().uov_1);
              l$ret$5: do {
                var this_12 = this.vq0_1.gq0_1;
                while (true) {
                  var prevValue_1 = this_12.t2();
                  var nextValue_1 = prevValue_1.mq2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result.tod_1);
                  if (this_12.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
            }

            this.id_1 = 14;
            this.hd_1 = 15;
            continue $sm;
          case 13:
            this.id_1 = 14;
            var tmp_46 = this.kd_1;
            if (tmp_46 instanceof Exception) {
              var e = this.kd_1;
              printStackTrace(e);
              this.vq0_1.kpc(Companion_getInstance_93().uov_1);
              l$ret$7: do {
                var this_13 = this.vq0_1.gq0_1;
                while (true) {
                  var prevValue_2 = this_13.t2();
                  var nextValue_2 = prevValue_2.mq2(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, e.message);
                  if (this_13.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 15;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 14:
            throw this.kd_1;
          case 15:
            this.id_1 = 14;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(AppearanceEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new AppearanceEditViewModel$onClickSave$slambda(this.vq0_1, completion);
    i.wq0_1 = $this$launch;
    return i;
  };
  function AppearanceEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new AppearanceEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AppearanceEditViewModel(di, savedStateHandle, destName) {
    destName = destName === VOID ? 'AppearanceEditView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.gq0_1 = MutableStateFlow(new AppearanceEditUiState());
    this.hq0_1 = asStateFlow(this.gq0_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.iq0_1 = Instance(this, tmp$ret$0, null).f5j(this, httpClient$factory_1());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UriFileUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.jq0_1 = Instance(this, tmp$ret$2, null).f5j(this, uriFileUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(BlobFileUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.kq0_1 = Instance(di, tmp$ret$4, null).f5j(this, blobFileUseCase$factory());
    this.kpc(Companion_getInstance_93().uov_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceEditViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, this.ipc().rnd(strings_getInstance().fma_1), VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceEditViewModel.<anonymous>' call
        var tmp_5 = this.ipc().rnd(strings_getInstance().hm3_1);
        var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, AppearanceEditViewModel$onClickSave$ref(this)));
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(AppearanceEditViewModel).nq2 = function (name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gq0_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceEditViewModel.onOrganisationNameChanged.<anonymous>' call
        var nextValue = prevValue.mq2(name, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(AppearanceEditViewModel).oq2 = function (logoUri) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gq0_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceEditViewModel.onOrganisationLogoChanged.<anonymous>' call
        var nextValue = prevValue.mq2(VOID, logoUri, VOID, VOID, VOID, VOID, VOID, VOID, null, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(AppearanceEditViewModel).pq2 = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gq0_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceEditViewModel.onJetpackComposeThemeChanged.<anonymous>' call
        var nextValue = prevValue.mq2(VOID, VOID, uri, name, VOID, VOID, VOID, VOID, null, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(AppearanceEditViewModel).qq2 = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gq0_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.appearance.AppearanceEditViewModel.onMuiThemeChanged.<anonymous>' call
        var nextValue = prevValue.mq2(VOID, VOID, VOID, VOID, uri, name, VOID, VOID, null, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(AppearanceEditViewModel).mq0 = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, AppearanceEditViewModel$onClickSave$slambda_0(this, null));
  };
  function AppearanceEditUiState(organisationName, organisationLogo, jetpackComposeTheme, jetpackComposeThemeName, muiTheme, muiThemeName, fieldsEnabled, isLoading, errorMessage, showSuccessMessage) {
    organisationName = organisationName === VOID ? null : organisationName;
    organisationLogo = organisationLogo === VOID ? null : organisationLogo;
    jetpackComposeTheme = jetpackComposeTheme === VOID ? null : jetpackComposeTheme;
    jetpackComposeThemeName = jetpackComposeThemeName === VOID ? null : jetpackComposeThemeName;
    muiTheme = muiTheme === VOID ? null : muiTheme;
    muiThemeName = muiThemeName === VOID ? null : muiThemeName;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    isLoading = isLoading === VOID ? false : isLoading;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    showSuccessMessage = showSuccessMessage === VOID ? false : showSuccessMessage;
    this.cq2_1 = organisationName;
    this.dq2_1 = organisationLogo;
    this.eq2_1 = jetpackComposeTheme;
    this.fq2_1 = jetpackComposeThemeName;
    this.gq2_1 = muiTheme;
    this.hq2_1 = muiThemeName;
    this.iq2_1 = fieldsEnabled;
    this.jq2_1 = isLoading;
    this.kq2_1 = errorMessage;
    this.lq2_1 = showSuccessMessage;
  }
  protoOf(AppearanceEditUiState).rq2 = function (organisationName, organisationLogo, jetpackComposeTheme, jetpackComposeThemeName, muiTheme, muiThemeName, fieldsEnabled, isLoading, errorMessage, showSuccessMessage) {
    return new AppearanceEditUiState(organisationName, organisationLogo, jetpackComposeTheme, jetpackComposeThemeName, muiTheme, muiThemeName, fieldsEnabled, isLoading, errorMessage, showSuccessMessage);
  };
  protoOf(AppearanceEditUiState).mq2 = function (organisationName, organisationLogo, jetpackComposeTheme, jetpackComposeThemeName, muiTheme, muiThemeName, fieldsEnabled, isLoading, errorMessage, showSuccessMessage, $super) {
    organisationName = organisationName === VOID ? this.cq2_1 : organisationName;
    organisationLogo = organisationLogo === VOID ? this.dq2_1 : organisationLogo;
    jetpackComposeTheme = jetpackComposeTheme === VOID ? this.eq2_1 : jetpackComposeTheme;
    jetpackComposeThemeName = jetpackComposeThemeName === VOID ? this.fq2_1 : jetpackComposeThemeName;
    muiTheme = muiTheme === VOID ? this.gq2_1 : muiTheme;
    muiThemeName = muiThemeName === VOID ? this.hq2_1 : muiThemeName;
    fieldsEnabled = fieldsEnabled === VOID ? this.iq2_1 : fieldsEnabled;
    isLoading = isLoading === VOID ? this.jq2_1 : isLoading;
    errorMessage = errorMessage === VOID ? this.kq2_1 : errorMessage;
    showSuccessMessage = showSuccessMessage === VOID ? this.lq2_1 : showSuccessMessage;
    return $super === VOID ? this.rq2(organisationName, organisationLogo, jetpackComposeTheme, jetpackComposeThemeName, muiTheme, muiThemeName, fieldsEnabled, isLoading, errorMessage, showSuccessMessage) : $super.rq2.call(this, organisationName, organisationLogo, jetpackComposeTheme, jetpackComposeThemeName, muiTheme, muiThemeName, fieldsEnabled, isLoading, errorMessage, showSuccessMessage);
  };
  protoOf(AppearanceEditUiState).toString = function () {
    return 'AppearanceEditUiState(organisationName=' + this.cq2_1 + ', organisationLogo=' + this.dq2_1 + ', jetpackComposeTheme=' + this.eq2_1 + ', jetpackComposeThemeName=' + this.fq2_1 + ', muiTheme=' + this.gq2_1 + ', muiThemeName=' + this.hq2_1 + ', fieldsEnabled=' + this.iq2_1 + ', isLoading=' + this.jq2_1 + ', errorMessage=' + this.kq2_1 + ', showSuccessMessage=' + this.lq2_1 + ')';
  };
  protoOf(AppearanceEditUiState).hashCode = function () {
    var result = this.cq2_1 == null ? 0 : getStringHashCode(this.cq2_1);
    result = imul(result, 31) + (this.dq2_1 == null ? 0 : getStringHashCode(this.dq2_1)) | 0;
    result = imul(result, 31) + (this.eq2_1 == null ? 0 : getStringHashCode(this.eq2_1)) | 0;
    result = imul(result, 31) + (this.fq2_1 == null ? 0 : getStringHashCode(this.fq2_1)) | 0;
    result = imul(result, 31) + (this.gq2_1 == null ? 0 : getStringHashCode(this.gq2_1)) | 0;
    result = imul(result, 31) + (this.hq2_1 == null ? 0 : getStringHashCode(this.hq2_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.iq2_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jq2_1) | 0;
    result = imul(result, 31) + (this.kq2_1 == null ? 0 : getStringHashCode(this.kq2_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lq2_1) | 0;
    return result;
  };
  protoOf(AppearanceEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppearanceEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppearanceEditUiState ? other : THROW_CCE();
    if (!(this.cq2_1 == tmp0_other_with_cast.cq2_1))
      return false;
    if (!(this.dq2_1 == tmp0_other_with_cast.dq2_1))
      return false;
    if (!(this.eq2_1 == tmp0_other_with_cast.eq2_1))
      return false;
    if (!(this.fq2_1 == tmp0_other_with_cast.fq2_1))
      return false;
    if (!(this.gq2_1 == tmp0_other_with_cast.gq2_1))
      return false;
    if (!(this.hq2_1 == tmp0_other_with_cast.hq2_1))
      return false;
    if (!(this.iq2_1 === tmp0_other_with_cast.iq2_1))
      return false;
    if (!(this.jq2_1 === tmp0_other_with_cast.jq2_1))
      return false;
    if (!(this.kq2_1 == tmp0_other_with_cast.kq2_1))
      return false;
    if (!(this.lq2_1 === tmp0_other_with_cast.lq2_1))
      return false;
    return true;
  };
  function httpClient$factory_1() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(receiver);
    }, null);
  }
  function uriFileUseCase$factory() {
    return getPropertyCallableRef('uriFileUseCase', 1, KProperty1, function (receiver) {
      return _get_uriFileUseCase__4dtah0(receiver);
    }, null);
  }
  function blobFileUseCase$factory() {
    return getPropertyCallableRef('blobFileUseCase', 1, KProperty1, function (receiver) {
      return _get_blobFileUseCase__kmqft9(receiver);
    }, null);
  }
  function httpClient$factory_2() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(receiver);
    }, null);
  }
  function uriFileUseCase$factory_0() {
    return getPropertyCallableRef('uriFileUseCase', 1, KProperty1, function (receiver) {
      return _get_uriFileUseCase__4dtah0(receiver);
    }, null);
  }
  function blobFileUseCase$factory_0() {
    return getPropertyCallableRef('blobFileUseCase', 1, KProperty1, function (receiver) {
      return _get_blobFileUseCase__kmqft9(receiver);
    }, null);
  }
  function launchSetTitleFromClazzUid(_this__u8e3s4, clazzUid, updateUi) {
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(_this__u8e3s4.f5d());
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var repo$delegate = Instance(this_0, tmp$ret$0, 2).f5j(null, getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.takeIf' call
    var this_1 = _this__u8e3s4.bpc();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.launchSetTitleFromClazzUid.<anonymous>' call
    if (!clazzUid.equals(new Long(0, 0))) {
      tmp_0 = this_1;
    } else {
      tmp_0 = null;
    }
    var tmp0_safe_receiver = tmp_0;
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, VOID, VOID, launchSetTitleFromClazzUid$slambda_0(clazzUid, repo$delegate, updateUi, null));
    }
  }
  function launchSetTitleFromClazzUid$lambda($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_6(function_0) {
    this.sq2_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_6).t1d = function (value, $completion) {
    return this.sq2_1(value, $completion);
  };
  function launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation) {
    this.bq3_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).dq3 = function (it, $completion) {
    var tmp = this.eq3(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).he = function (p1, $completion) {
    return this.dq3((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          this.bq3_1(this.cq3_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).eq3 = function (it, completion) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda(this.bq3_1, completion);
    i.cq3_1 = it;
    return i;
  };
  function launchSetTitleFromClazzUid$slambda$slambda_0($updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation);
    var l = function (it, $completion) {
      return i.dq3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function launchSetTitleFromClazzUid$slambda($clazzUid, $repo$delegate, $updateUi, resultContinuation) {
    this.nq3_1 = $clazzUid;
    this.oq3_1 = $repo$delegate;
    this.pq3_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).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;
            var tmp_0 = launchSetTitleFromClazzUid$lambda(this.oq3_1).t7j().u8i(this.nq3_1);
            var tmp_1 = launchSetTitleFromClazzUid$slambda$slambda_0(this.pq3_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_6(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).v1m = function ($this$launch, completion) {
    var i = new launchSetTitleFromClazzUid$slambda(this.nq3_1, this.oq3_1, this.pq3_1, completion);
    i.qq3_1 = $this$launch;
    return i;
  };
  function launchSetTitleFromClazzUid$slambda_0($clazzUid, $repo$delegate, $updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda($clazzUid, $repo$delegate, $updateUi, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function parseAndUpdateTerminologyStringsIfNeeded(currentTerminologyStrings, terminology, systemImpl, json, onUpdate) {
    var tmp = currentTerminologyStrings == null ? null : currentTerminologyStrings.fox_1;
    if (!equals(tmp, terminology == null ? null : terminology.k8m_1)) {
      var tmp_0;
      if (terminology == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.parseAndUpdateTerminologyStringsIfNeeded.<anonymous>' call
        tmp_0 = CourseTerminologyStrings_init_$Create$(terminology, systemImpl, json);
      }
      var courseTerminologyStrings = tmp_0;
      onUpdate(courseTerminologyStrings);
    }
  }
  function collectClazzNameAndUpdateTitle(clazzUid, activeDb, appUiState, $completion) {
    var tmp = activeDb.t7j().u8i(clazzUid);
    var tmp_0 = collectClazzNameAndUpdateTitle$slambda_0(appUiState, null);
    return tmp.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_7(tmp_0), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_7(function_0) {
    this.rq3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_7).t1d = function (value, $completion) {
    return this.rq3_1(value, $completion);
  };
  function collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation) {
    this.aq4_1 = $appUiState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectClazzNameAndUpdateTitle$slambda).dq3 = function (clazzTitle, $completion) {
    var tmp = this.eq3(clazzTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).he = function (p1, $completion) {
    return this.dq3((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.aq4_1;
          var tmp_0;
          if (!(this.aq4_1.t2().zou_1 == this.bq4_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.t2();
                var nextValue = prevValue.mov(VOID, VOID, this.bq4_1);
                if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).eq3 = function (clazzTitle, completion) {
    var i = new collectClazzNameAndUpdateTitle$slambda(this.aq4_1, completion);
    i.bq4_1 = clazzTitle;
    return i;
  };
  function collectClazzNameAndUpdateTitle$slambda_0($appUiState, resultContinuation) {
    var i = new collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation);
    var l = function (clazzTitle, $completion) {
      return i.dq3(clazzTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function get_blockTypeStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.p83_1;
    var tmp;
    if (tmp0_subject === 102) {
      tmp = strings_getInstance().vm2_1;
    } else {
      if (tmp0_subject === 104) {
        tmp = strings_getInstance().im4_1;
      } else {
        if (tmp0_subject === 100) {
          tmp = strings_getInstance().nmh_1;
        } else {
          if (tmp0_subject === 103) {
            tmp = strings_getInstance().vm3_1;
          } else {
            if (tmp0_subject === 105) {
              tmp = strings_getInstance().smh_1;
            } else {
              tmp = strings_getInstance().wli_1;
            }
          }
        }
      }
    }
    return tmp;
  }
  function CoursePermissionConstants() {
    CoursePermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().qmn_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1, 0));
    var tmp_2 = strings_getInstance().wmn_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().nmj_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(2, 0));
    var tmp_6 = strings_getInstance().rmn_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(4, 0));
    var tmp_8 = strings_getInstance().smn_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(8, 0));
    var tmp_10 = strings_getInstance().tmn_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(16, 0));
    var tmp_12 = strings_getInstance().gm2_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(32, 0));
    var tmp_14 = strings_getInstance().im2_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(64, 0));
    var tmp_16 = strings_getInstance().umn_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(128, 0));
    var tmp_18 = strings_getInstance().vmn_1;
    PermissionFlags_getInstance();
    tmp.cq4_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, to(tmp_18, new Long(256, 0))]);
  }
  var CoursePermissionConstants_instance;
  function CoursePermissionConstants_getInstance() {
    if (CoursePermissionConstants_instance == null)
      new CoursePermissionConstants();
    return CoursePermissionConstants_instance;
  }
  function getTitleForCoursePermission(_this__u8e3s4, entity, $completion) {
    var tmp = new $getTitleForCoursePermissionCOROUTINE$54(_this__u8e3s4, entity, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function titleStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.rdc_1;
    var tmp;
    if (tmp0_subject === 1000) {
      tmp = strings_getInstance().ilm_1;
    } else {
      if (tmp0_subject === 1001) {
        tmp = strings_getInstance().xly_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function getTitleForCoursePermission$slambda($entity, resultContinuation) {
    this.yq4_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda).aq5 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda).he = function (p1, $completion) {
    return this.aq5(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda).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.zq4_1.v7j().vdy(this.yq4_1.qdc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(getTitleForCoursePermission$slambda).tmw = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda(this.yq4_1, completion);
    i.zq4_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_0($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.aq5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function getTitleForCoursePermission$slambda_1($entity, resultContinuation) {
    this.jq5_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda_1).lq5 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda_1).he = function (p1, $completion) {
    return this.lq5(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda_1).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;
            var tmp_0 = this.kq5_1.s7j();
            var tmp0_safe_receiver = this.jq5_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sdc_1;
            suspendResult = tmp_0.kfu(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp2_safe_receiver = suspendResult;
            return tmp2_safe_receiver == null ? null : personFullName(tmp2_safe_receiver);
          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);
  };
  protoOf(getTitleForCoursePermission$slambda_1).tmw = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda_1(this.jq5_1, completion);
    i.kq5_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_2($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda_1($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.lq5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $getTitleForCoursePermissionCOROUTINE$54(_this__u8e3s4, entity, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lq4_1 = _this__u8e3s4;
    this.mq4_1 = entity;
  }
  protoOf($getTitleForCoursePermissionCOROUTINE$54).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.lq4_1.f5d()).k5e();
            var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
            tmp_0.nq4_1 = tmp_1.i5e(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            var tmp0_safe_receiver = this.mq4_1;
            tmp_3.oq4_1 = tmp0_safe_receiver == null ? null : titleStringResource(tmp0_safe_receiver);
            if (!(this.oq4_1 == null)) {
              this.hd_1 = 2;
              var tmp_4 = this.lq4_1.epc();
              suspendResult = localFirstThenRepoIfNull(tmp_4, getTitleForCoursePermission$slambda_0(this.mq4_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_5 = this.lq4_1.epc();
              suspendResult = localFirstThenRepoIfNull(tmp_5, getTitleForCoursePermission$slambda_2(this.mq4_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp5_elvis_lhs = suspendResult;
            this.pq4_1 = tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var terminology = suspendResult;
            var tmp2_elvis_lhs = terminology == null ? null : toTerminologyEntries(terminology, this.nq4_1, this.lq4_1.ipc());
            var terminologyEntries = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = terminologyEntries.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.iox_1.equals(this.oq4_1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp3_safe_receiver = tmp$ret$0;
            var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.jox_1;
            tmp_6.pq4_1 = tmp4_elvis_lhs == null ? this.lq4_1.ipc().rnd(this.oq4_1) : tmp4_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.pq4_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function defaultCourseBannerImageIndex(courseName) {
    // Inline function 'kotlin.mod' call
    var r = avatarColorForName(courseName == null ? '' : courseName) % 5 | 0;
    return r + (5 & ((r ^ 5) & (r | (-r | 0))) >> 31) | 0;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.uq5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).wq5 = function (it, $completion) {
    var tmp = this.xq5(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wq5((p1 == null ? true : p1 instanceof ClazzAndDetailPermissions) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_safe_receiver = this.vq5_1;
          var clazz = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t8p_1;
          var tmp_0;
          if (clazz == null) {
            tmp_0 = emptyList();
          } else {
            var tmp_1;
            var tmp_2 = clazz.w8j_1;
            Companion_getInstance_4();
            if (hasFlag_0(tmp_2, new Long(1, 0))) {
              tmp_1 = this.vq5_1.u8p_1;
            } else {
              tmp_1 = false;
            }
            tmp_0 = createTabList(this.uq5_1, tmp_1, this.vq5_1.v8p_1, this.vq5_1.w8p_1);
          }
          var tabList = tmp_0;
          l$ret$1: do {
            var this_0 = this.uq5_1.uq6_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.xq6(tabList);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).xq5 = function (it, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this.uq5_1, completion);
    i.vq5_1 = it;
    return i;
  };
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wq5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.gq7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = this.gq7_1.dpc().t7j().s8i(this.gq7_1.cpc(), this.gq7_1.epb_1);
            var tmp_1 = ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this.gq7_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this.gq7_1, completion);
    i.hq7_1 = $this$launch;
    return i;
  };
  function ClazzDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.qq7_1 = $this_launch;
    this.rq7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.qq7_1, VOID, VOID, ClazzDetailViewModel$slambda$slambda$slambda_0(this.rq7_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzDetailViewModel$slambda$slambda(this.qq7_1, this.rq7_1, completion);
  };
  function ClazzDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function createTabList($this, showAttendance, showMembers, showProgressReport) {
    Companion_getInstance_110();
    var tabs = mutableListOf([new TabItem('CourseDetailOverviewView', mapOf_0(to('entityUid', $this.epb_1.toString())), $this.ipc().rnd(strings_getInstance().zmi_1))]);
    if (showMembers) {
      Companion_getInstance_110();
      tabs.i1(new TabItem('CourseMembers', mapOf_0(to('clazzUid', $this.epb_1.toString())), capitalizeFirstLetter($this.ipc().rnd(strings_getInstance().nm1_1))));
    }
    if (showProgressReport) {
      Companion_getInstance_110();
      tabs.i1(new TabItem('Gradebook', mapOf_0(to('clazzUid', $this.epb_1.toString())), $this.ipc().rnd(strings_getInstance().pmp_1)));
    }
    if (showAttendance) {
      Companion_getInstance_110();
      tabs.i1(new TabItem('CourseLogListAttendanceView', mapOf_0(to('clazzUid', $this.epb_1.toString())), $this.ipc().rnd(strings_getInstance().vll_1)));
    }
    Companion_getInstance_110();
    tabs.i1(new TabItem('CourseGroups', mapOf_0(to('clazzUid', $this.epb_1.toString())), $this.ipc().rnd(strings_getInstance().xm0_1)));
    return toList(tabs);
  }
  function Companion_107() {
    this.sq7_1 = 'Course';
  }
  var Companion_instance_155;
  function Companion_getInstance_125() {
    return Companion_instance_155;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_8(function_0) {
    this.tq7_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_8).t1d = function (value, $completion) {
    return this.tq7_1(value, $completion);
  };
  function ClazzDetailViewModel$slambda(this$0, resultContinuation) {
    this.cq8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda).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 = whenSubscribed(this.cq8_1.uq6_1, ClazzDetailViewModel$slambda$slambda_0(this.dq8_1, this.cq8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda(this.cq8_1, completion);
    i.dq8_1 = $this$launch;
    return i;
  };
  function ClazzDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Course');
    this.uq6_1 = MutableStateFlow(new ClazzDetailUiState());
    this.vq6_1 = asStateFlow(this.uq6_1);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzDetailViewModel$slambda_0(this, null));
  }
  function ClazzDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.wq6_1 = tabs;
  }
  protoOf(ClazzDetailUiState).xq6 = function (tabs) {
    return new ClazzDetailUiState(tabs);
  };
  protoOf(ClazzDetailUiState).toString = function () {
    return 'ClazzDetailUiState(tabs=' + this.wq6_1 + ')';
  };
  protoOf(ClazzDetailUiState).hashCode = function () {
    return hashCode(this.wq6_1);
  };
  protoOf(ClazzDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailUiState ? other : THROW_CCE();
    if (!equals(this.wq6_1, tmp0_other_with_cast.wq6_1))
      return false;
    return true;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.mq8_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).qq8 = function (value, $completion) {
    var tmp = this.rq8(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.qq8(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.oq8_1 = this.mq8_1;
            var tmp_1 = this;
            tmp_1.pq8_1 = this.nq8_1;
            this.hd_1 = 1;
            var it = this.pq8_1;
            suspendResult = this.oq8_1.t1d(it.mdf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).rq8 = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.mq8_1, completion);
    i.nq8_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.qq8(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$55(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.aq9_1 = _this__u8e3s4;
    this.bq9_1 = collector;
  }
  protoOf($collectCOROUTINE$55).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.cq9_1 = this.bq9_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.cq9_1, null);
            suspendResult = this.aq9_1.dq9_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mq9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).oq9 = function (courseBlockList, $completion) {
    var tmp = this.pq9(courseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.oq9((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.mq9_1.mqa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.aqb(VOID, VOID, this.nq9_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).pq9 = function (courseBlockList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.mq9_1, completion);
    i.nq9_1 = courseBlockList;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.oq9(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.jqb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).lqb = function (blockStatuses, $completion) {
    var tmp = this.mqb(blockStatuses, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.lqb((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.jqb_1.mqa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.aqb(VOID, VOID, VOID, this.kqb_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).mqb = function (blockStatuses, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this.jqb_1, completion);
    i.kqb_1 = blockStatuses;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (blockStatuses, $completion) {
      return i.lqb(blockStatuses, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.vqb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).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;
            var tmp_0 = this.vqb_1.epc().u7j().xcc(this.vqb_1.epb_1, false, false, systemTimeInMillis(), this.vqb_1.cpc());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.vqb_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.vqb_1, completion);
    i.wqb_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.fqc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).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;
            var tmp_0 = this.fqc_1.epc().o7k().giv(this.fqc_1.epb_1, listOf_0(this.fqc_1.cpc()), this.fqc_1.cpc());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this.fqc_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this.fqc_1, completion);
    i.gqc_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_3($this) {
    this.dq9_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_3).rp3 = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$55(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_3).z1b = function (collector, $completion) {
    return this.rp3(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.pqc_1 = $this_launch;
    this.qqc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).cp4 = function (hasViewPermission, $completion) {
    var tmp = this.dp4(hasViewPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (this.rqc_1) {
            launch(this.pqc_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.qqc_1, null));
            launch(this.pqc_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this.qqc_1, null));
          } else {
            l$ret$1: do {
              var this_0 = this.qqc_1.mqa_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.aqb(VOID, VOID, emptyList());
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).dp4 = function (hasViewPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.pqc_1, this.qqc_1, completion);
    i.rqc_1 = hasViewPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function (hasViewPermission, $completion) {
      return i.cp4(hasViewPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mqa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.aqb(VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).cqd = function (clazzWithDisplayDetails, permissions, $completion) {
    var tmp = this.dqd(clazzWithDisplayDetails, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE();
    return this.cqd(tmp, p2 instanceof PermissionTriple ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.aqd_1;
          var tmp_0;
          if (this.bqd_1.mdf_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).dqd = function (clazzWithDisplayDetails, permissions, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.aqd_1 = clazzWithDisplayDetails;
    i.bqd_1 = permissions;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (clazzWithDisplayDetails, permissions, $completion) {
      return i.cqd(clazzWithDisplayDetails, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.mqd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).oqd = function (it, $completion) {
    var tmp = this.pqd(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.oqd((p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.mqd_1.mqa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.aqb(this.nqd_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          var tmp1_currentTerminologyStrings = this.mqd_1.mqa_1.t2().xqa_1;
          var tmp0_safe_receiver = this.nqd_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k8q_1;
          var tmp3_json = this.mqd_1.r4x();
          var tmp4_systemImpl = this.mqd_1.ipc();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this.mqd_1));
          l$ret$3: do {
            var this_1 = this.mqd_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.nqd_1;
              var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.j8q_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n8j_1;
              var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).pqd = function (it, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.mqd_1, completion);
    i.nqd_1 = it;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.oqd(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation) {
    this.yqd_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).qq8 = function (value, $completion) {
    var tmp = this.rq8(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).he = function (p1, $completion) {
    return this.qq8(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.aqe_1 = this.yqd_1;
            var tmp_1 = this;
            tmp_1.bqe_1 = this.zqd_1;
            this.hd_1 = 1;
            var it = this.bqe_1;
            suspendResult = this.aqe_1.t1d(it.ndf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).rq8 = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1(this.yqd_1, completion);
    i.zqd_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.qq8(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$56(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kqe_1 = _this__u8e3s4;
    this.lqe_1 = collector;
  }
  protoOf($collectCOROUTINE$56).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.mqe_1 = this.lqe_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2(this.mqe_1, null);
            suspendResult = this.kqe_1.nqe_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 _no_name_provided__qut3iv_4($this) {
    this.nqe_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_4).rp3 = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$56(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_4).z1b = function (collector, $completion) {
    return this.rp3(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.wqe_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).cp4 = function (hasEditPermission, $completion) {
    var tmp = this.dp4(hasEditPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.wqe_1.opb_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mov(prevValue.xou_1.sov(this.xqe_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.wqe_1.mqa_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.aqb(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.xqe_1);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).dp4 = function (hasEditPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.wqe_1, completion);
    i.xqe_1 = hasEditPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.cp4(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation) {
    this.gqf_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).qq8 = function (value, $completion) {
    var tmp = this.rq8(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).he = function (p1, $completion) {
    return this.qq8(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.iqf_1 = this.gqf_1;
            var tmp_1 = this;
            tmp_1.jqf_1 = this.hqf_1;
            this.hd_1 = 1;
            var it = this.jqf_1;
            suspendResult = this.iqf_1.t1d(it.odf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).rq8 = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3(this.gqf_1, completion);
    i.hqf_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.qq8(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$57(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.sqf_1 = _this__u8e3s4;
    this.tqf_1 = collector;
  }
  protoOf($collectCOROUTINE$57).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.uqf_1 = this.tqf_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4(this.uqf_1, null);
            suspendResult = this.sqf_1.vqf_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 _no_name_provided__qut3iv_5($this) {
    this.vqf_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_5).rp3 = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$57(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_5).z1b = function (collector, $completion) {
    return this.rp3(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.eqg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).cp4 = function (canAddStudent, $completion) {
    var tmp = this.dp4(canAddStudent, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.eqg_1.mqa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.aqb(VOID, VOID, VOID, VOID, this.fqg_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).dp4 = function (canAddStudent, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.eqg_1, completion);
    i.fqg_1 = canAddStudent;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (canAddStudent, $completion) {
      return i.cp4(canAddStudent, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.oqg_1 = $permissionFlow;
    this.pqg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).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;
            var this_0 = this.oqg_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_3(this_0));
            suspendResult = collectLatest(tmp_0, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.qqg_1, this.pqg_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this.oqg_1, this.pqg_1, completion);
    i.qqg_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_0($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, $permissionFlow, resultContinuation) {
    this.zqg_1 = this$0;
    this.aqh_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = this.zqg_1.epc().t7j().t8i(this.zqg_1.epb_1, systemTimeInMillis(), this.zqg_1.cpc());
            var tmp_1 = combine(tmp_0, this.aqh_1, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_2 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.zqg_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this.zqg_1, this.aqh_1, completion);
    i.bqh_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_3($permissionFlow, this$0, resultContinuation) {
    this.kqh_1 = $permissionFlow;
    this.lqh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).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;
            var this_0 = this.kqh_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_4(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.lqh_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this.kqh_1, this.lqh_1, completion);
    i.mqh_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_4($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation) {
    this.vqh_1 = $permissionFlow;
    this.wqh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).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;
            var this_0 = this.vqh_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_5(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.wqh_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5(this.vqh_1, this.wqh_1, completion);
    i.xqh_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_6($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.gqi_1 = $this_launch;
    this.hqi_1 = $permissionFlow;
    this.iqi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.gqi_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this.hqi_1, this.iqi_1, null));
          launch(this.gqi_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this.iqi_1, this.hqi_1, null));
          launch(this.gqi_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this.hqi_1, this.iqi_1, null));
          launch(this.gqi_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_6(this.hqi_1, this.iqi_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda(this.gqi_1, this.hqi_1, this.iqi_1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_0($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.oqa_1;
    setClipboardStringUseCase$factory_0();
    return this_0.t2();
  }
  function onClickEdit($this) {
    Companion_getInstance_110();
    $this.mpb_1.fo0('CourseEdit', mapOf_0(to('entityUid', $this.epb_1.toString())));
  }
  function Companion_108() {
    this.jqi_1 = 'CourseDetailOverviewView';
  }
  var Companion_instance_156;
  function Companion_getInstance_126() {
    return Companion_instance_156;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_9(function_0) {
    this.kqi_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_9).t1d = function (value, $completion) {
    return this.kqi_1(value, $completion);
  };
  function ClazzDetailOverviewViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.tqi_1 = this$0;
    this.uqi_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).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 = whenSubscribed(this.tqi_1.mqa_1, ClazzDetailOverviewViewModel$slambda$slambda_0(this.vqi_1, this.uqi_1, this.tqi_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda(this.tqi_1, this.uqi_1, completion);
    i.vqi_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda_0(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'CourseDetailOverviewView' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    this.mqa_1 = MutableStateFlow(new ClazzDetailOverviewUiState());
    this.nqa_1 = asStateFlow(this.mqa_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.oqa_1 = Instance(this, tmp$ret$0, null).f5j(this, setClipboardStringUseCase$factory());
    this.pqa_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.qqa_1 = asSharedFlow(this.pqa_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>' call
        var tmp_1 = this.ipc().rnd(strings_getInstance().tlv_1);
        var tmp_2 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mov(new FabUiState(false, tmp_1, tmp_2, ClazzDetailOverviewViewModel$onClickEdit$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.epc().t7l();
    var tmp_4 = this.cpc();
    PermissionFlags_getInstance();
    var tmp_5 = new Long(1, 0);
    PermissionFlags_getInstance();
    var tmp_6 = new Long(2, 0);
    PermissionFlags_getInstance();
    var permissionFlow = shareIn(tmp_3.xdb(tmp_4, this.epb_1, tmp_5, tmp_6, new Long(8, 0)), this.bpc(), Companion_getInstance_13().v1h());
    var tmp_7 = this.bpc();
    launch(tmp_7, VOID, VOID, ClazzDetailOverviewViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzDetailOverviewViewModel).wqi = function (code) {
    _get_setClipboardStringUseCase__31i1s1(this).knv(code);
    this.gpc().bow(new Snack(this.ipc().rnd(strings_getInstance().vm8_1)));
  };
  protoOf(ClazzDetailOverviewViewModel).xqi = function (courseBlock) {
    Companion_getInstance_120();
    var tmp = to('entityUid', courseBlock.o83_1.toString());
    Companion_getInstance_120();
    var navArgs = mapOf([tmp, to('clazzUid', this.epb_1.toString())]);
    var tmp0_subject = courseBlock.p83_1;
    if (tmp0_subject === 100) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.mqa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.onClickCourseBlock.<anonymous>' call
          var nextValue = prevValue.aqb(VOID, VOID, VOID, VOID, VOID, toggle(prevValue.wqa_1, courseBlock.o83_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this.pqa_1.i1h(new RefreshCommand());
    } else {
      if (tmp0_subject === 102) {
        this.mpb_1.fo0('CourseText', navArgs);
      } else {
        if (tmp0_subject === 103) {
          this.mpb_1.fo0('CourseAssignment', navArgs);
        } else {
          if (tmp0_subject === 105) {
            this.mpb_1.fo0('CourseDiscussion', navArgs);
          } else {
            if (tmp0_subject === 104) {
              Companion_getInstance_152();
              Companion_getInstance_120();
              var tmp_0 = to('entityUid', courseBlock.g84_1.toString());
              Companion_getInstance_120();
              var tmp_1 = to('clazzUid', this.epb_1.toString());
              Companion_getInstance_120();
              this.mpb_1.fo0('ContentEntry', mapOf([tmp_0, tmp_1, to('courseBlockUid', courseBlock.o83_1.toString())]));
            }
          }
        }
      }
    }
  };
  protoOf(ClazzDetailOverviewViewModel).yqi = function () {
    Companion_getInstance_120();
    this.mpb_1.fo0('CoursePermissionList', mapOf_0(to('clazzUid', this.epb_1.toString())));
  };
  function ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this$0) {
    return function () {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var this_0 = this$0.tqa_1;
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.displayBlockList$delegate.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.ocf_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r83_1;
        if (!this$0.wqa_1.a1(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible) {
    clazzAndDetail = clazzAndDetail === VOID ? null : clazzAndDetail;
    scheduleList = scheduleList === VOID ? emptyList() : scheduleList;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? emptyList() : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? false : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? emptySet() : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? false : managePermissionVisible;
    this.rqa_1 = clazzAndDetail;
    this.sqa_1 = scheduleList;
    this.tqa_1 = courseBlockList;
    this.uqa_1 = blockStatusesForActiveUser;
    this.vqa_1 = clazzCodeVisible;
    this.wqa_1 = collapsedBlockUids;
    this.xqa_1 = terminologyStrings;
    this.yqa_1 = managePermissionVisible;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.zqa_1 = lazy(tmp_0, ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this));
  }
  protoOf(ClazzDetailOverviewUiState).zqi = function () {
    var tmp0_safe_receiver = this.rqa_1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j8q_1;
  };
  protoOf(ClazzDetailOverviewUiState).aqj = function () {
    var tmp;
    var tmp0_safe_receiver = this.rqa_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j8q_1;
    if (isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u8j_1)) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.rqa_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.j8q_1;
      tmp = isDateSet(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.v8j_1);
    }
    return tmp;
  };
  protoOf(ClazzDetailOverviewUiState).bqj = function () {
    var tmp0_safe_receiver = this.rqa_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m8q_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).cqj = function () {
    var tmp0_safe_receiver = this.rqa_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n8q_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).dqj = function () {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.tqa_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 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.<get-hasModules>.<anonymous>' call
        var tmp0_safe_receiver = element.ocf_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p83_1;
        if (tmp_0 === 100) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  protoOf(ClazzDetailOverviewUiState).eqj = function () {
    var tmp2_safe_receiver = this.xqa_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.gox(strings_getInstance().xly_1);
    var tmp = (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs) + ': ' + this.cqj() + ', ';
    var tmp0_safe_receiver = this.xqa_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gox(strings_getInstance().ilm_1);
    return tmp + ((tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs) + ': ' + this.bqj());
  };
  protoOf(ClazzDetailOverviewUiState).fqj = function () {
    return this.yqa_1;
  };
  protoOf(ClazzDetailOverviewUiState).gqj = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.zqa_1;
    displayBlockList$factory();
    return this_0.t2();
  };
  protoOf(ClazzDetailOverviewUiState).hqj = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible) {
    return new ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible);
  };
  protoOf(ClazzDetailOverviewUiState).aqb = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, $super) {
    clazzAndDetail = clazzAndDetail === VOID ? this.rqa_1 : clazzAndDetail;
    scheduleList = scheduleList === VOID ? this.sqa_1 : scheduleList;
    courseBlockList = courseBlockList === VOID ? this.tqa_1 : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? this.uqa_1 : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? this.vqa_1 : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? this.wqa_1 : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? this.xqa_1 : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? this.yqa_1 : managePermissionVisible;
    return $super === VOID ? this.hqj(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible) : $super.hqj.call(this, clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible);
  };
  protoOf(ClazzDetailOverviewUiState).toString = function () {
    return 'ClazzDetailOverviewUiState(clazzAndDetail=' + this.rqa_1 + ', scheduleList=' + this.sqa_1 + ', courseBlockList=' + this.tqa_1 + ', blockStatusesForActiveUser=' + this.uqa_1 + ', clazzCodeVisible=' + this.vqa_1 + ', collapsedBlockUids=' + this.wqa_1 + ', terminologyStrings=' + this.xqa_1 + ', managePermissionVisible=' + this.yqa_1 + ')';
  };
  protoOf(ClazzDetailOverviewUiState).hashCode = function () {
    var result = this.rqa_1 == null ? 0 : this.rqa_1.hashCode();
    result = imul(result, 31) + hashCode(this.sqa_1) | 0;
    result = imul(result, 31) + hashCode(this.tqa_1) | 0;
    result = imul(result, 31) + hashCode(this.uqa_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vqa_1) | 0;
    result = imul(result, 31) + hashCode(this.wqa_1) | 0;
    result = imul(result, 31) + (this.xqa_1 == null ? 0 : this.xqa_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yqa_1) | 0;
    return result;
  };
  protoOf(ClazzDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.rqa_1, tmp0_other_with_cast.rqa_1))
      return false;
    if (!equals(this.sqa_1, tmp0_other_with_cast.sqa_1))
      return false;
    if (!equals(this.tqa_1, tmp0_other_with_cast.tqa_1))
      return false;
    if (!equals(this.uqa_1, tmp0_other_with_cast.uqa_1))
      return false;
    if (!(this.vqa_1 === tmp0_other_with_cast.vqa_1))
      return false;
    if (!equals(this.wqa_1, tmp0_other_with_cast.wqa_1))
      return false;
    if (!equals(this.xqa_1, tmp0_other_with_cast.xqa_1))
      return false;
    if (!(this.yqa_1 === tmp0_other_with_cast.yqa_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_0() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function displayBlockList$factory() {
    return getPropertyCallableRef('displayBlockList', 1, KProperty1, function (receiver) {
      return receiver.gqj();
    }, null);
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda(this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.g8m_1 = new CoursePicture(this$0.qph_1);
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.qqj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).uqj = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.uqj(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.rqj_1.t7j();
            var tmp_1;
            if (!this.qqj_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.sqj_1 = tmp_1;
            if (this.sqj_1 == null) {
              this.tqj_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.sqj_1.p8i(this.qqj_1.qph_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.tqj_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var dbResult = this.tqj_1;
            var hasPicture = !((dbResult == null ? null : dbResult.g8m_1) == null);
            var tmp_2;
            if (dbResult == null ? true : hasPicture) {
              tmp_2 = dbResult;
            } else {
              tmp_2 = shallowCopy_3(dbResult, ClazzEditViewModel$slambda$slambda$slambda$lambda(this.qqj_1));
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).tmw = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this.qqj_1, completion);
    i.rqj_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.uqj(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.dqk_1 = this$0;
    this.eqk_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).jqk = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).r7e = function ($completion) {
    return this.jqk($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.fqk_1 = new ClazzWithHolidayCalendarAndAndTerminology();
            var tmp_1 = this;
            tmp_1.gqk_1 = this.fqk_1;
            this.gqk_1.m8j_1 = this.dqk_1.oql_1;
            this.gqk_1.n8j_1 = '';
            this.gqk_1.s8j_1 = true;
            this.gqk_1.u8j_1 = systemTimeInMillis();
            this.gqk_1.e8k_1 = getDefaultTimeZoneId();
            var tmp_2 = this.gqk_1;
            Companion_getInstance_110();
            var tmp0_safe_receiver = this.eqk_1.ba('schoolUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            tmp_2.x8j_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp_3 = this;
            var this_0 = this.dqk_1.epc().v7j();
            var tmp_4;
            if (!this.gqk_1.z8j_1.equals(new Long(0, 0))) {
              tmp_4 = this_0;
            } else {
              tmp_4 = null;
            }

            tmp_3.hqk_1 = tmp_4;
            if (this.hqk_1 == null) {
              this.iqk_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.hqk_1.vdy(this.gqk_1.z8j_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.iqk_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.iqk_1;
            this.gqk_1.f8m_1 = ARGUMENT;
            this.gqk_1.g8m_1 = new CoursePicture(this.dqk_1.oql_1);
            this.gqk_1.k8k_1 = this.dqk_1.cpc();
            return this.fqk_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).q7e = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_1(this.dqk_1, this.eqk_1, completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.jqk($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mql_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.yql(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.hqm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).lqm = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.lqm(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.iqm_1.s7k();
            var tmp_1;
            if (!this.hqm_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.jqm_1 = tmp_1;
            if (this.jqm_1 == null) {
              this.kqm_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.jqm_1.ngx(this.hqm_1.qph_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.kqm_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.kqm_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).tmw = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this.hqm_1, completion);
    i.iqm_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.lqm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).uqm = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).r7e = function ($completion) {
    return this.uqm($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).q7e = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.uqm($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mql_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.yql(VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.dqn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).lqn = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.lqn(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = this.eqn_1.u7j();
            var tmp_1;
            if (!this.dqn_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.fqn_1 = tmp_1;
            if (this.fqn_1 == null) {
              this.gqn_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.fqn_1.wcc(this.dqn_1.qph_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.gqn_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hqn_1 = this.gqn_1;
            this.iqn_1 = this.hqn_1 == null ? emptyList() : this.hqn_1;
            var tmp_2 = this;
            var this_1 = this.eqn_1.l7l();
            var tmp_3;
            if (!this.dqn_1.qph_1.equals(new Long(0, 0))) {
              tmp_3 = this_1;
            } else {
              tmp_3 = null;
            }

            tmp_2.jqn_1 = tmp_3;
            if (this.jqn_1 == null) {
              this.kqn_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              this.hd_1 = 3;
              suspendResult = this.jqn_1.hfl(this.dqn_1.qph_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.kqn_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp3_elvis_lhs = this.kqn_1;
            var assignmentPeerAllocations = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            var this_2 = this.iqn_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator = this_2.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp_4 = ensureNotNull(item.xce_1);
              var tmp0_elvis_lhs = item.yce_1;
              var tmp_5 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.xce_1).o83_1) : tmp0_elvis_lhs;
              var tmp_6 = item.zce_1;
              var tmp_7 = item.acf_1;
              var tmp_8 = item.bcf_1;
              var tmp_9 = item.ccf_1;
              var destination_0 = ArrayList_init_$Create$();
              var tmp0_iterator_0 = assignmentPeerAllocations.w();
              while (tmp0_iterator_0.f()) {
                var element = tmp0_iterator_0.e();
                var tmp_10 = element.ffm_1;
                var tmp0_safe_receiver = item.bcf_1;
                if (tmp_10.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.i7z_1)) {
                  destination_0.i1(element);
                }
              }
              destination.i1(new CourseBlockAndEditEntities(tmp_4, tmp_5, tmp_6, VOID, VOID, VOID, tmp_7, tmp_8, tmp_9, destination_0));
            }

            return destination;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).tmw = function (db, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this.dqn_1, completion);
    i.eqn_1 = db;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.lqn(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).uqn = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).r7e = function ($completion) {
    return this.uqn($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).q7e = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_9(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_10(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation);
    var l = function ($completion) {
      return i.uqn($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_1(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mql_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.yql(VOID, VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_0($returnedSchedule) {
    return function (it) {
      return it.hgy_1.equals($returnedSchedule.hgy_1);
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation) {
    this.dqo_1 = this$0;
    this.eqo_1 = $newSchedules;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).xpo = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.xpo((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.dqo_1.r4x().w4b(ListSerializer(Companion_instance_28.s4x()), this.eqo_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this.dqo_1, this.eqo_1, completion);
    i.fqo_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this$0, $newSchedules, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.xpo($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation) {
    this.oqo_1 = this$0;
    this.pqo_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.qqo_1.poy_1;
            var tmp0_elvis_lhs = tmp_1 instanceof Schedule ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.rqo_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.oqo_1.mql_1.t2().vql_1;
            tmp_3.sqo_1 = replaceOrAppend(tmp_4, this.rqo_1, ClazzEditViewModel$slambda$slambda$slambda$lambda_0(this.rqo_1));
            l$ret$1: do {
              var this_0 = this.oqo_1.mql_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.yql(VOID, VOID, VOID, VOID, VOID, this.sqo_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 1;
            var tmp_5 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_5, ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this.oqo_1, this.sqo_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.pqo_1.qp7('schedule', ARGUMENT);
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).joz = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this.oqo_1, this.pqo_1, completion);
    i.qqo_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_12(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation) {
    this.bqp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.cqp_1.poy_1;
            var tmp0_elvis_lhs = tmp_1 instanceof CourseBlockAndEditEntities ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.dqp_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.bqp_1.mql_1.t2().wql_1;
            var tmp1_safe_receiver = this.bqp_1.mql_1.t2().rql_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.m8j_1;
            tmp_3.eqp_1 = this.bqp_1.hql_1.ao5(tmp_4, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.dqp_1);
            this.hd_1 = 1;
            suspendResult = updateCourseBlockList(this.bqp_1, this.eqp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).joz = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this.bqp_1, completion);
    i.cqp_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_1($timeZoneId) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.e8k_1 = $timeZoneId;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation) {
    this.nqp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.oqp_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var timeZoneId = tmp_1;
          var tmp1_safe_receiver = this.nqp_1.mql_1.t2().rql_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_3(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_1(timeZoneId));
          }
          this.nqp_1.pqp(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).joz = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this.nqp_1, completion);
    i.oqp_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_2($newTerminology) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.z8j_1 = $newTerminology.h8m_1;
      $this$shallowCopy.f8m_1 = $newTerminology;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation) {
    this.yqp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.zqp_1.poy_1;
          var tmp0_elvis_lhs = tmp_0 instanceof CourseTerminology ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newTerminology = tmp_1;
          var tmp1_safe_receiver = this.yqp_1.mql_1.t2().rql_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_3(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_2(newTerminology));
          }
          this.yqp_1.pqp(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).joz = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this.yqp_1, completion);
    i.zqp_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_18(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_3($newDescription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.o8j_1 = $newDescription;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation) {
    this.iqq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.jqq_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDescription = tmp_1;
          var tmp1_safe_receiver = this.iqq_1.mql_1.t2().rql_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_3(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_3(newDescription));
          }
          this.iqq_1.pqp(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).joz = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this.iqq_1, completion);
    i.jqq_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_20(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.sqq_1 = this$0;
    this.tqq_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda).vqq = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.vqq((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).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;
            var tmp_0 = Companion_instance_32.s4x();
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_0(this.sqq_1, null);
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_2(this.sqq_1, this.tqq_1, null);
            suspendResult = this.sqq_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEditViewModel$slambda$slambda$lambda(this.sqq_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_118();
            var tmp1_safe_receiver = this_0 == null ? null : this_0.g8m_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n8m_1;
            setIfNoValueSetYet(this.tqq_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            return this_0;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda(this.sqq_1, this.tqq_1, completion);
    i.uqq_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.vqq($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.eqr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_1).gqr = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.gqr((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).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;
            var tmp_0 = ListSerializer(Companion_instance_28.s4x());
            var tmp_1 = listOf_0('schedule');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_4(this.eqr_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.eqr_1.spc(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_0(this.eqr_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this.eqr_1, completion);
    i.fqr_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.gqr($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.pqr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_3).rqr = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.rqr((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).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;
            var tmp_0 = ListSerializer(Companion_getInstance_14().s4x());
            var tmp_1 = listOf_0('courseblocks');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_8(this.pqr_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_10(null);
            suspendResult = this.pqr_1.spc(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_1(this.pqr_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this.pqr_1, completion);
    i.qqr_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.rqr($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.aqs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_5).xpo = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.xpo((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.aqs_1.r4x();
          var value = this.aqs_1.mql_1.t2();
          var this_1 = this_0.y4b();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzEditUiState), arrayOf([]), false));
          return this_0.w4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this.aqs_1, completion);
    i.bqs_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.xpo($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation) {
    this.kqs_1 = this$0;
    this.lqs_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).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;
            var tmp_0 = this.kqs_1.mpc(this.kqs_1.hpc(), 'Schedule');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_12(this.kqs_1, this.lqs_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this.kqs_1, this.lqs_1, completion);
    i.mqs_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_8(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.vqs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).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;
            var tmp_0 = this.vqs_1.mpc(this.vqs_1.hpc(), 'courseblock');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_14(this.vqs_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this.vqs_1, completion);
    i.wqs_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.fqt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).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;
            var tmp_0 = this.fqt_1.mpc(this.fqt_1.hpc(), 'timeZone');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_16(this.fqt_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this.fqt_1, completion);
    i.gqt_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation) {
    this.pqt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_13).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).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;
            var tmp_0 = this.pqt_1.mpc(this.pqt_1.hpc(), 'terminology');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_18(this.pqt_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this.pqt_1, completion);
    i.qqt_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation) {
    this.zqt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_15).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).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;
            var tmp_0 = this.zqt_1.mpc(this.zqt_1.hpc(), 'clazzDescriptionHtml');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_20(this.zqt_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this.zqt_1, completion);
    i.aqu_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda($clazzUid) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.ogy_1 = $clazzUid;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0(it) {
    return it.hgy_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1(it) {
    return it.rjc_1.o83_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2(it) {
    return it.i7z_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3(it) {
    return it.cfm_1;
  }
  function invoke$lambda_1($clazzLogCreatorManager$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('clazzLogCreatorManager', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $clazzLogCreatorManager$delegate.t2();
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    this.jqu_1 = this$0;
    this.kqu_1 = $initEntity;
    this.lqu_1 = $updateImage;
    this.mqu_1 = $coursePictureVal;
    this.nqu_1 = $entity;
    this.oqu_1 = $initState;
    this.pqu_1 = $courseBlockListVal;
    this.qqu_1 = $updatedCourseBlockPictures;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 20;
            if (this.jqu_1.qph_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_createNewClazzUseCase__mo489e(this.jqu_1).yns(this.kqu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.jqu_1.epc().t7j().q8i(this.kqu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.lqu_1 ? !(this.mqu_1 == null) : false) {
              this.mqu_1.m8m_1 = systemTimeInMillis();
              this.hd_1 = 4;
              suspendResult = this.jqu_1.dpc().i7l().vdv(this.mqu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.squ_1 = this.nqu_1.m8j_1;
            var tmp_0 = this;
            var this_0 = this.jqu_1.mql_1.t2().vql_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(shallowCopy_4(item, ClazzEditViewModel$onClickSave$slambda$slambda$lambda(this.squ_1)));
            }

            tmp_0.tqu_1 = destination;
            this.hd_1 = 6;
            suspendResult = this.jqu_1.epc().s7k().lgx(this.tqu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.jqu_1.epc().s7k();
            suspendResult = deactivateByUids(tmp_1, findKeysNotInOtherList(this.oqu_1.vql_1, this.tqu_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.uqu_1 = this.jqu_1.iql_1.co5(this.pqu_1);
            this.hd_1 = 8;
            var tmp_2 = this.jqu_1.epc().u7j();
            var this_1 = this.uqu_1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var item_0 = tmp0_iterator_0.e();
              destination_0.i1(item_0.rjc_1);
            }

            suspendResult = tmp_2.zcc(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.hd_1 = 9;
            var tmp_3 = this.jqu_1.epc().u7j();
            suspendResult = deactivateByUids_0(tmp_3, findKeysNotInOtherList(this.oqu_1.wql_1, this.uqu_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            var tmp_4 = this;
            var this_2 = this.pqu_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element = tmp0_iterator_1.e();
              var tmp0_safe_receiver = element.yjc_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_1.i1(tmp0_safe_receiver);
              }
            }

            tmp_4.vqu_1 = destination_1;
            this.hd_1 = 10;
            suspendResult = this.jqu_1.epc().v7k().m7y(this.vqu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var this_3 = this.oqu_1.wql_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_0 = tmp0_iterator_2.e();
              var tmp0_safe_receiver_0 = element_0.yjc_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_2.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_5.wqu_1 = findKeysNotInOtherList(destination_2, this.vqu_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2);
            var tmp_6 = this;
            var this_4 = this.jqu_1.epc().v7k();
            var tmp_7;
            if (!this.wqu_1.c1()) {
              tmp_7 = this_4;
            } else {
              tmp_7 = null;
            }

            tmp_6.xqu_1 = tmp_7;
            if (this.xqu_1 == null) {
              this.yqu_1 = null;
              this.hd_1 = 12;
              continue $sm;
            } else {
              this.hd_1 = 11;
              suspendResult = this.xqu_1.n7y(this.wqu_1, false, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 11:
            var tmp_8 = this;
            tmp_8.yqu_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            var tmp_9 = this;
            var this_5 = this.pqu_1;
            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_3 = this_5.w();
            while (tmp0_iterator_3.f()) {
              var element_1 = tmp0_iterator_3.e();
              var list = element_1.ajd_1;
              addAll(destination_3, list);
            }

            tmp_9.zqu_1 = destination_3;
            var tmp_10 = this;
            var this_6 = this.oqu_1.wql_1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_6.w();
            while (tmp0_iterator_4.f()) {
              var element_2 = tmp0_iterator_4.e();
              var list_0 = element_2.ajd_1;
              addAll(destination_4, list_0);
            }

            tmp_10.aqv_1 = destination_4;
            this.hd_1 = 13;
            var tmp_11 = this.jqu_1.epc().l7l();
            suspendResult = deactivateByUids_1(tmp_11, findKeysNotInOtherList(this.aqv_1, this.zqu_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.hd_1 = 14;
            suspendResult = this.jqu_1.epc().l7l().ifl(this.zqu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 14:
            var tmp_12 = this;
            var this_7 = this.pqu_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_7.w();
            while (tmp0_iterator_5.f()) {
              var element_3 = tmp0_iterator_5.e();
              var tmp0_safe_receiver_1 = element_3.vjc_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_5.i1(tmp0_safe_receiver_1);
              }
            }

            tmp_12.bqv_1 = destination_5;
            this.cqv_1 = this.bqv_1.w();
            this.hd_1 = 15;
            continue $sm;
          case 15:
            if (!this.cqv_1.f()) {
              this.hd_1 = 17;
              continue $sm;
            }

            this.dqv_1 = this.cqv_1.e();
            var tmp_13 = this;
            tmp_13.eqv_1 = this.dqv_1;
            this.hd_1 = 16;
            suspendResult = this.jqu_1.kql_1.gnz(this.eqv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.hd_1 = 15;
            continue $sm;
          case 17:
            var tmp_14 = this;
            var this_8 = this.jqu_1.dpc().v7l();
            var tmp_15;
            if (!this.qqu_1.c1()) {
              tmp_15 = this_8;
            } else {
              tmp_15 = null;
            }

            tmp_14.fqv_1 = tmp_15;
            if (this.fqv_1 == null) {
              this.gqv_1 = null;
              this.hd_1 = 19;
              continue $sm;
            } else {
              this.hd_1 = 18;
              suspendResult = this.fqv_1.wcs(this.qqu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 18:
            var tmp_16 = this;
            tmp_16.gqv_1 = Unit_instance;
            this.hd_1 = 19;
            continue $sm;
          case 19:
            Napier_getInstance().n5k('onClickSave: transaction block done');
            return Unit_instance;
          case 20:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 20) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this.jqu_1, this.kqu_1, this.lqu_1, this.mqu_1, this.nqu_1, this.oqu_1, this.pqu_1, this.qqu_1, completion);
    i.rqu_1 = it;
    return i;
  };
  function ClazzEditViewModel$onClickSave$slambda$slambda_0(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda$lambda($updatedBlock) {
    return function (it) {
      return it.rjc_1.o83_1.equals($updatedBlock.rjc_1.o83_1);
    };
  }
  function _get_createNewClazzUseCase__mo489e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pql_1;
    createNewClazzUseCase$factory_0();
    return this_0.t2();
  }
  function updateCourseBlockList($this, newCourseBlockList, $completion) {
    var tmp = new $updateCourseBlockListCOROUTINE$58($this, newCourseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function hasErrors(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.sql_1 == null) ? true : !(_this__u8e3s4.tql_1 == null)) ? true : !(_this__u8e3s4.uql_1 == null);
  }
  function updateCourseBlock($this, updatedBlock) {
    var tmp = $this.bpc();
    launch(tmp, VOID, VOID, ClazzEditViewModel$updateCourseBlock$slambda_0($this, updatedBlock, null));
  }
  function Companion_109() {
    this.sqv_1 = 'CourseEdit';
    this.tqv_1 = 'Schedule';
    this.uqv_1 = 'schedule';
    this.vqv_1 = 'courseblock';
    this.wqv_1 = 'timeZone';
    this.xqv_1 = 'terminology';
    this.yqv_1 = 'courseblocks';
    this.zqv_1 = 'clazzDescriptionHtml';
  }
  var Companion_instance_157;
  function Companion_getInstance_127() {
    return Companion_instance_157;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_10(function_0) {
    this.aqw_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_10).t1d = function (value, $completion) {
    return this.aqw_1(value, $completion);
  };
  function ClazzEditViewModel$slambda(this$0, resultContinuation) {
    this.jqw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda).mqw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (!this.jqw_1.qph_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              var tmp_0 = this.kqw_1.t7l();
              var tmp_1 = this.jqw_1.cpc();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.ydb(tmp_1, this.jqw_1.qph_1, new Long(2, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_2 = this.kqw_1.u7l();
              var tmp_3 = this.jqw_1.cpc();
              PermissionFlags_getInstance();
              suspendResult = tmp_2.lhj(tmp_3, new Long(512, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lqw_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.lqw_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.lqw_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda).tmw = function (it, completion) {
    var i = new ClazzEditViewModel$slambda(this.jqw_1, completion);
    i.kqw_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mqw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.vqw_1 = $savedStateHandle;
    this.wqw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            var tmp_0 = async(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_0(this.wqw_1, this.vqw_1, null));
            var tmp_1 = async(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_2(this.wqw_1, null));
            suspendResult = awaitAll([tmp_0, tmp_1, async(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_4(this.wqw_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_120();
            if (this.vqw_1.ba('initState') == null) {
              var tmp_2 = this;
              Companion_getInstance_120();
              tmp_2.yqw_1 = 'initState';
              this.hd_1 = 2;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzEditViewModel$slambda$slambda_6(this.wqw_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            this.vqw_1.qp7(this.yqw_1, ARGUMENT);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            launch(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_8(this.wqw_1, this.vqw_1, null));
            launch(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_10(this.wqw_1, null));
            launch(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_12(this.wqw_1, null));
            launch(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_14(this.wqw_1, null));
            launch(this.xqw_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_16(this.wqw_1, null));
            l$ret$1: do {
              var this_0 = this.wqw_1.mql_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.yql(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.wqw_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_4 = Companion_getInstance_93().uov_1;
                var tmp_5 = this.wqw_1.ipc().rnd(strings_getInstance().hm3_1);
                var nextValue_0 = prevValue_0.mov(VOID, tmp_4, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, ClazzEditViewModel$onClickSave$ref(this.wqw_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEditViewModel$slambda_1(this.vqw_1, this.wqw_1, completion);
    i.xqw_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzEditViewModel$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation) {
    this.hqx_1 = this$0;
    this.iqx_1 = $newCourseBlockList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).xpo = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).he = function (p1, $completion) {
    return this.xpo((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.hqx_1.r4x().w4b(ListSerializer(Companion_getInstance_14().s4x()), this.iqx_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this.hqx_1, this.iqx_1, completion);
    i.jqx_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$updateCourseBlockList$slambda_0(this$0, $newCourseBlockList, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.xpo($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.sqx_1 = $commitDelay;
    this.tqx_1 = $entity;
    this.uqx_1 = $this;
    this.vqx_1 = $key;
    this.wqx_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.sqx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.tqx_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.uqx_1.opc(this.uqx_1.kpb_1, this.vqx_1, this.wqx_1, this.tqx_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda(this.sqx_1, this.tqx_1, this.uqx_1, this.vqx_1, this.wqx_1, completion);
    i.xqx_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onCheckedAttendanceChanged$lambda($checked) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp_0;
      if ($checked) {
        Companion_getInstance_4();
        tmp_0 = new Long(1, 0);
      } else {
        tmp_0 = new Long(0, 0);
      }
      tmp.w8j_1 = tmp_0;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$lambda($initEntity) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = $this$shallowCopy.n8j_1;
      var tmp_0;
      if (tmp0_safe_receiver == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.text.trim' call
        tmp_0 = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
      }
      tmp.n8j_1 = tmp_0;
      var tmp_1 = $this$shallowCopy;
      var tmp_2 = Companion_getInstance_6().ulh($initEntity.u8j_1);
      // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
      var tmp0_elvis_lhs = $initEntity.e8k_1;
      var tmp$ret$1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
      tmp_1.u8j_1 = toLocalMidnight(tmp_2, tmp$ret$1).tlh();
      var tmp_3;
      var tmp_4 = $this$shallowCopy.v8j_1;
      Companion_getInstance_2();
      if (!tmp_4.equals(new Long(-1, 2147483647))) {
        var tmp_5 = $this$shallowCopy;
        var tmp_6 = Companion_getInstance_6().ulh($initEntity.v8j_1);
        // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
        var tmp0_elvis_lhs_0 = $initEntity.e8k_1;
        var tmp$ret$2 = tmp0_elvis_lhs_0 == null ? 'UTC' : tmp0_elvis_lhs_0;
        tmp_5.v8j_1 = toLocalEndOfDay(tmp_6, tmp$ret$2).tlh();
        tmp_3 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mql_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.yql(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation) {
    this.gqy_1 = this$0;
    this.hqy_1 = $entity;
    this.iqy_1 = $initEntity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 12;
            this.hd_1 = 1;
            Companion_getInstance_120();
            suspendResult = this.gqy_1.npc(this.gqy_1.kpb_1, 'initState', Companion_getInstance_128().s4x(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jqy_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.jqy_1 == null) {
              return Unit_instance;
            } else {
              tmp_1 = this.jqy_1;
            }

            tmp_0.kqy_1 = tmp_1;
            Napier_getInstance().n5k('onClickSave: start transaction');
            this.lqy_1 = this.gqy_1.mql_1.t2().wql_1;
            this.mqy_1 = this.hqy_1.g8m_1;
            var tmp_2 = this;
            var tmp_3;
            if (!(this.mqy_1 == null)) {
              Companion_getInstance_118();
              var tmp_4 = this.gqy_1.kpb_1.ba('initPicUri');
              var tmp1_safe_receiver = this.hqy_1.g8m_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n8m_1;
              tmp_3 = !(tmp_4 === (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs));
            } else {
              tmp_3 = false;
            }

            tmp_2.nqy_1 = tmp_3;
            var tmp_5 = this;
            var this_0 = this.lqy_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp0_safe_receiver = element.sjc_1;
              var imageUriNow = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t84_1;
              var tmp$ret$0;
              l$ret$1: do {
                var tmp0_iterator_0 = this.kqy_1.wql_1.w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  var tmp0_safe_receiver_0 = element_0.sjc_1;
                  var tmp_6 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.r84_1;
                  var tmp1_safe_receiver_0 = element.sjc_1;
                  if (equals(tmp_6, tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.r84_1)) {
                    tmp$ret$0 = element_0;
                    break l$ret$1;
                  }
                }
                tmp$ret$0 = null;
              }
               while (false);
              var tmp1_safe_receiver_1 = tmp$ret$0;
              var tmp2_safe_receiver = tmp1_safe_receiver_1 == null ? null : tmp1_safe_receiver_1.sjc_1;
              var initImageUri = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.t84_1;
              var tmp3_safe_receiver = element.sjc_1;
              var tmp_7;
              if (tmp3_safe_receiver == null) {
                tmp_7 = null;
              } else {
                var tmp_8;
                if (!(imageUriNow == initImageUri)) {
                  tmp_8 = tmp3_safe_receiver;
                } else {
                  tmp_8 = null;
                }
                tmp_7 = tmp_8;
              }
              var tmp0_safe_receiver_1 = tmp_7;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_1);
              }
            }

            tmp_5.oqy_1 = destination;
            this.hd_1 = 2;
            var tmp_9 = this.gqy_1.dpc();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzEditViewModel$onClickSave$slambda$slambda_0(this.gqy_1, this.iqy_1, this.nqy_1, this.mqy_1, this.hqy_1, this.kqy_1, this.lqy_1, this.oqy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Napier_getInstance().n5k('onClickSave: transaction done');
            var tmp_10 = this;
            tmp_10.pqy_1 = this.lqy_1;
            this.qqy_1 = this.pqy_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.qqy_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.rqy_1 = this.qqy_1.e();
            var tmp_11 = this;
            tmp_11.sqy_1 = this.rqy_1;
            this.tqy_1 = this.sqy_1.tjc_1;
            if (this.tqy_1 == null) {
              this.uqy_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.vqy_1 = this.tqy_1;
              var tmp_13 = this;
              tmp_13.wqy_1 = this.vqy_1;
              this.hd_1 = 4;
              var tmp$ret$2;
              l$ret$3: do {
                var tmp0_iterator_1 = this.kqy_1.wql_1.w();
                while (tmp0_iterator_1.f()) {
                  var element_1 = tmp0_iterator_1.e();
                  var tmp0_safe_receiver_2 = element_1.sjc_1;
                  var tmp_14 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.r84_1;
                  var tmp1_safe_receiver_2 = this.sqy_1.sjc_1;
                  if (equals(tmp_14, tmp1_safe_receiver_2 == null ? null : tmp1_safe_receiver_2.r84_1)) {
                    tmp$ret$2 = element_1;
                    break l$ret$3;
                  }
                }
                tmp$ret$2 = null;
              }
               while (false);
              var tmp0_safe_receiver_3 = tmp$ret$2;
              var tmp1_safe_receiver_3 = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.sjc_1;
              suspendResult = this.gqy_1.jql_1.zo4(this.wqy_1, null, this.sqy_1.ujc_1, tmp1_safe_receiver_3 == null ? null : tmp1_safe_receiver_3.t84_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.uqy_1 = this.vqy_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.hd_1 = 3;
            continue $sm;
          case 6:
            var tmp_15 = this;
            var this_1 = this.gqy_1.lql_1;
            var tmp_16;
            if (this.nqy_1) {
              tmp_16 = this_1;
            } else {
              tmp_16 = null;
            }

            tmp_15.xqy_1 = tmp_16;
            if (this.xqy_1 == null) {
              this.yqy_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 7;
              var tmp_17 = this.hqy_1.m8j_1;
              var tmp3_safe_receiver_0 = this.mqy_1;
              suspendResult = this.xqy_1.cnm(tmp_17, 125, tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.n8m_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 7:
            var tmp_18 = this;
            tmp_18.yqy_1 = Unit_instance;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_19 = this;
            tmp_19.zqy_1 = this.oqy_1;
            this.aqz_1 = this.zqy_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.aqz_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.bqz_1 = this.aqz_1.e();
            var tmp_20 = this;
            tmp_20.cqz_1 = this.bqz_1;
            this.hd_1 = 10;
            var tmp_21 = this.cqz_1.r84_1;
            suspendResult = this.gqy_1.lql_1.cnm(tmp_21, 6677, this.cqz_1.t84_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.hd_1 = 9;
            continue $sm;
          case 11:
            var tmp_22 = Companion_getInstance_9();
            var tmp0_elvis_lhs = this.hqy_1.e8k_1;
            var entityTimeZone = tmp_22.klh(tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs);
            var fromLocalDate = toLocalMidnight_1(toLocalDateTime(System_instance.nle(), entityTimeZone));
            var this_2 = this.gqy_1.f5d();
            var tmp_23 = typeToken(createKType(getKClass(ClazzLogCreatorManager), arrayOf([]), false));
            var clazzLogCreatorManager$delegate = Instance(this_2, isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE(), null).f5j(null, getLocalDelegateReference('clazzLogCreatorManager', KProperty0, false, function () {
              return THROW_ISE();
            }));
            invoke$lambda_1(clazzLogCreatorManager$delegate).ip0(this.hqy_1.m8j_1, this.gqy_1.apc().in5().ck1_1, toInstant(fromLocalDate, entityTimeZone).tlh(), toInstant(toLocalEndOfDay_1(fromLocalDate), entityTimeZone).tlh());
            Napier_getInstance().n5k('onClickSave: done');
            this.gqy_1.sph('Course', this.hqy_1.m8j_1, this.hqy_1);
            return Unit_instance;
          case 12:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 12) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).q7e = function (completion) {
    return new ClazzEditViewModel$onClickSave$slambda(this.gqy_1, this.hqy_1, this.iqy_1, completion);
  };
  function ClazzEditViewModel$onClickSave$slambda_0(this$0, $entity, $initEntity, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation) {
    this.nqz_1 = this$0;
    this.oqz_1 = $newList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).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 = updateCourseBlockList(this.nqz_1, this.oqz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this.nqz_1, this.oqz_1, completion);
    i.pqz_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onCourseBlockMoved$slambda_0(this$0, $newList, resultContinuation) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation) {
    this.yqz_1 = this$0;
    this.zqz_1 = $updatedBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).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;
            var tmp_0 = this.yqz_1.mql_1.t2().wql_1;
            suspendResult = updateCourseBlockList(this.yqz_1, replace_0(tmp_0, this.zqz_1, ClazzEditViewModel$updateCourseBlock$slambda$lambda(this.zqz_1)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this.yqz_1, this.zqz_1, completion);
    i.ar0_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$updateCourseBlock$slambda_0(this$0, $updatedBlock, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation) {
    this.jr0_1 = this$0;
    this.kr0_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).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;
            var this_0 = this.jr0_1.mql_1.t2().wql_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (!element.rjc_1.o83_1.equals(this.kr0_1.rjc_1.o83_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateCourseBlockList(this.jr0_1, destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this.jr0_1, this.kr0_1, completion);
    i.lr0_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this$0, $block, resultContinuation) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateCourseBlockListCOROUTINE$58(_this__u8e3s4, newCourseBlockList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pqv_1 = _this__u8e3s4;
    this.qqv_1 = newCourseBlockList;
  }
  protoOf($updateCourseBlockListCOROUTINE$58).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            l$ret$1: do {
              var this_0 = this.pqv_1.mql_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.yql(VOID, VOID, VOID, VOID, VOID, VOID, this.qqv_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.rqv_1 = this.pqv_1.kpb_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, ClazzEditViewModel$updateCourseBlockList$slambda_0(this.pqv_1, this.qqv_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.rqv_1.qp7('courseblocks', ARGUMENT);
            return Unit_instance;
          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 ClazzEditViewModel(di, savedStateHandle, addOrUpdateCourseBlockUseCase, updateCourseBlocksOnReorderOrCommitUseCase, saveContentEntryUseCase, importContentUseCase, enqueueSavePictureUseCase) {
    addOrUpdateCourseBlockUseCase = addOrUpdateCourseBlockUseCase === VOID ? new AddOrUpdateCourseBlockUseCase() : addOrUpdateCourseBlockUseCase;
    updateCourseBlocksOnReorderOrCommitUseCase = updateCourseBlocksOnReorderOrCommitUseCase === VOID ? new UpdateCourseBlocksOnReorderOrCommitUseCase() : updateCourseBlocksOnReorderOrCommitUseCase;
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.i5e(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instanceOrNull' call
      var tmp_3 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = tmp_3.j5e(tmp$ret$2, 2);
      // Inline function 'org.kodein.di.instance' call
      var tmp_6 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$5 = tmp_6.i5e(tmp$ret$4, null);
      tmp = new SaveContentEntryUseCase(tmp_2, tmp_5, tmp$ret$5);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_8;
    if (importContentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_9 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_10 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      tmp_8 = tmp_9.i5e(tmp$ret$0_0, null);
    } else {
      tmp_8 = importContentUseCase;
    }
    importContentUseCase = tmp_8;
    var tmp_11;
    if (enqueueSavePictureUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_12 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$0_1 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      tmp_11 = tmp_12.i5e(tmp$ret$0_1, null);
    } else {
      tmp_11 = enqueueSavePictureUseCase;
    }
    enqueueSavePictureUseCase = tmp_11;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseEdit');
    this.hql_1 = addOrUpdateCourseBlockUseCase;
    this.iql_1 = updateCourseBlocksOnReorderOrCommitUseCase;
    this.jql_1 = saveContentEntryUseCase;
    this.kql_1 = importContentUseCase;
    this.lql_1 = enqueueSavePictureUseCase;
    this.mql_1 = MutableStateFlow(new ClazzEditUiState());
    this.nql_1 = asStateFlow(this.mql_1);
    var tmp_14 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_15;
    if (tmp1_elvis_lhs == null) {
      var tmp_16 = get_doorPrimaryKeyManager(this.dpc());
      Companion_getInstance_4();
      tmp_15 = tmp_16.s68(6);
    } else {
      tmp_15 = tmp1_elvis_lhs;
    }
    tmp_14.oql_1 = tmp_15;
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.pql_1 = Instance(this_0, tmp$ret$10, null).f5j(this, createNewClazzUseCase$factory());
    var title = this.upi(strings_getInstance().lmj_1, strings_getInstance().nmj_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_93().tov_1;
        var nextValue = new AppUiState(VOID, tmp0_loadingState, title, VOID, true);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_19 = ClazzEditViewModel$slambda_0(this, null);
    this.upc(tmp_19, VOID, VOID, ClazzEditViewModel$slambda_2(savedStateHandle, this, null));
  }
  protoOf(ClazzEditViewModel).pqp = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mql_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.rql_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.v8j_1;
        var tmp6_clazzEndDateError = this.vpi(tmp, entity == null ? null : entity.v8j_1, prevValue.tql_1);
        var tmp0_safe_receiver = prevValue.rql_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u8j_1;
        var tmp7_clazzStartDateError = this.vpi(tmp_0, entity == null ? null : entity.u8j_1, prevValue.sql_1);
        var tmp4_safe_receiver = prevValue.rql_1;
        var tmp_1 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.n8j_1;
        var tmp8_clazzNameError = this.vpi(tmp_1, entity == null ? null : entity.n8j_1, prevValue.uql_1);
        var nextValue = prevValue.yql(VOID, entity, tmp7_clazzStartDateError, tmp6_clazzEndDateError, tmp8_clazzNameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_32.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.bpc();
    tmp_2.pph_1 = launch(tmp_3, VOID, VOID, ClazzEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEditViewModel).mr0 = function (checked) {
    var tmp0_safe_receiver = this.mql_1.t2().rql_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy_3(tmp0_safe_receiver, ClazzEditViewModel$onCheckedAttendanceChanged$lambda(checked));
    }
    this.pqp(tmp);
  };
  protoOf(ClazzEditViewModel).nr0 = function () {
    this.qpc('ScheduleEdit', 'Schedule', null, Companion_instance_28.s4x());
  };
  protoOf(ClazzEditViewModel).or0 = function (schedule) {
    this.qpc('ScheduleEdit', 'Schedule', schedule, Companion_instance_28.s4x());
  };
  protoOf(ClazzEditViewModel).pr0 = function (schedule) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.mql_1.t2().vql_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
      if (!element.hgy_1.equals(schedule.hgy_1)) {
        destination.i1(element);
      }
    }
    var newSchedules = destination;
    this.kpb_1.qp7('schedule', this.r4x().w4b(ListSerializer(Companion_instance_28.s4x()), newSchedules));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.mql_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
        var nextValue = prevValue.yql(VOID, VOID, VOID, VOID, VOID, newSchedules);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzEditViewModel).qr0 = function (blockType) {
    if (blockType === 104) {
      Companion_getInstance_158();
      var tmp = Companion_getInstance_14().s4x();
      Companion_getInstance_110();
      var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().toString());
      Companion_getInstance_110();
      var tmp_1 = to('clazzUid', this.oql_1.toString());
      Companion_getInstance_163();
      var tmp_2 = to('blockType', (104).toString());
      this.qpc('ContentEntries', 'courseblock', null, tmp, mapOf([tmp_0, tmp_1, tmp_2, to('goToOnContentEntryDone', (1).toString())]));
      return Unit_instance;
    }
    var tmp_3;
    var tmp_4;
    var tmp_5;
    if (blockType === 105) {
      tmp_5 = true;
    } else {
      tmp_5 = blockType === 102;
    }
    if (tmp_5) {
      tmp_4 = true;
    } else {
      tmp_4 = blockType === 100;
    }
    if (tmp_4) {
      Companion_getInstance_163();
      tmp_3 = to('CourseBlockEdit', 'courseblock');
    } else {
      if (blockType === 103) {
        tmp_3 = to('CourseAssignmentEdit', 'courseblock');
      } else {
        return Unit_instance;
      }
    }
    var tmp1_container = tmp_3;
    var viewName = tmp1_container.y6();
    var keyName = tmp1_container.z6();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>' call
    Companion_getInstance_163();
    this_0.s('blockType', blockType.toString());
    Companion_getInstance_110();
    this_0.s('clazzUid', this.oql_1.toString());
    if (blockType === 103) {
      var tmp0_safe_receiver = this.mql_1.t2().rql_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f8m_1;
      if (tmp1_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.also' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>.<anonymous>' call
        this_0.s('terminology', this.r4x().w4b(Companion_instance_33.s4x(), tmp1_safe_receiver));
      }
    }
    var tmp2_args = this_0.f3();
    var tmp3_serializer = Companion_getInstance_14().s4x();
    this.qpc(viewName, keyName, null, tmp3_serializer, tmp2_args);
  };
  protoOf(ClazzEditViewModel).mq0 = function () {
    var tmp0_elvis_lhs = this.mql_1.t2().rql_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var initEntity = tmp;
    if (this.lpc().equals(Companion_getInstance_93().tov_1)) {
      Napier_getInstance().n5k('onClickSave: indeterminate');
      return Unit_instance;
    }
    if (initEntity.u8j_1.equals(new Long(0, 0))) {
      Napier_getInstance().n5k('onClickSave: clazzstarttime = 0');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.mql_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.yql(VOID, VOID, this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (initEntity.v8j_1.c7(initEntity.u8j_1) <= 0) {
      Napier_getInstance().n5k('onClickSave: endbeforestart');
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.mql_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.yql(VOID, VOID, VOID, this.ipc().rnd(strings_getInstance().rml_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_2 = initEntity.n8j_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_2 == null ? true : isBlank(this_2)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.mql_1;
        while (true) {
          var prevValue_1 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.yql(VOID, VOID, VOID, VOID, this.ipc().rnd(strings_getInstance().bmm_1));
          if (this_3.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (hasErrors(this.mql_1.t2(), this)) {
      Napier_getInstance().n5k('onClickSave: hasErrors');
      return Unit_instance;
    }
    var entity = shallowCopy_3(initEntity, ClazzEditViewModel$onClickSave$lambda(initEntity));
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.mql_1;
      while (true) {
        var prevValue_2 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
        var nextValue_2 = prevValue_2.yql(VOID, entity);
        if (this_4.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_0 = ClazzEditViewModel$onClickSave$lambda_0(this);
    this.xpi(tmp_0, ClazzEditViewModel$onClickSave$slambda_0(this, entity, initEntity, null));
  };
  protoOf(ClazzEditViewModel).rr0 = function (from, to) {
    // Inline function 'kotlin.apply' call
    var this_0 = toMutableList(this.mql_1.t2().wql_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onCourseBlockMoved.<anonymous>' call
    this_0.c2(to, this_0.s1(from));
    var reorderedList = toList(this_0);
    var newList = this.iql_1.bo5(reorderedList, to);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onCourseBlockMoved$slambda_0(this, newList, null));
  };
  protoOf(ClazzEditViewModel).sr0 = function () {
    Companion_getInstance_110();
    var tmp = to('result_key', 'timeZone');
    Companion_getInstance_110();
    this.mpb_1.fo0('TimeZoneList', mapOf([tmp, to('result_viewname', this.lpb_1)]));
  };
  protoOf(ClazzEditViewModel).tr0 = function () {
  };
  protoOf(ClazzEditViewModel).ur0 = function () {
    this.qpc('CourseTerminologyList', 'terminology', null, Companion_instance_33.s4x());
  };
  protoOf(ClazzEditViewModel).vr0 = function (block) {
    updateCourseBlock(this, block.djd(block.rjc_1.vjo(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true)));
  };
  protoOf(ClazzEditViewModel).wr0 = function (block) {
    updateCourseBlock(this, block.djd(block.rjc_1.vjo(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false)));
  };
  protoOf(ClazzEditViewModel).xr0 = function (block) {
    updateCourseBlock(this, block.djd(block.rjc_1.vjo(VOID, VOID, block.rjc_1.q83_1 + 1 | 0)));
  };
  protoOf(ClazzEditViewModel).yr0 = function (block) {
    updateCourseBlock(this, block.djd(block.rjc_1.vjo(VOID, VOID, block.rjc_1.q83_1 - 1 | 0)));
  };
  protoOf(ClazzEditViewModel).zr0 = function (block) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this, block, null));
  };
  protoOf(ClazzEditViewModel).ar1 = function (block) {
    var tmp0_subject = block.rjc_1.p83_1;
    var tmp;
    var tmp_0;
    var tmp_1;
    if (tmp0_subject === 104) {
      tmp_1 = true;
    } else {
      tmp_1 = tmp0_subject === 105;
    }
    if (tmp_1) {
      tmp_0 = true;
    } else {
      tmp_0 = tmp0_subject === 102;
    }
    if (tmp_0) {
      tmp = true;
    } else {
      tmp = tmp0_subject === 100;
    }
    if (tmp) {
      Companion_getInstance_163();
      var tmp1_nextViewName = 'CourseBlockEdit';
      var tmp2_key = 'courseblock';
      var tmp3_serializer = Companion_getInstance_14().s4x();
      this.qpc(tmp1_nextViewName, tmp2_key, block, tmp3_serializer);
    } else {
      if (tmp0_subject === 103) {
        var tmp4_nextViewName = 'CourseAssignmentEdit';
        var tmp5_key = 'courseblock';
        var tmp6_serializer = Companion_getInstance_14().s4x();
        // Inline function 'kotlin.collections.buildMap' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'kotlin.collections.buildMapInternal' call
        // Inline function 'kotlin.apply' call
        var this_0 = LinkedHashMap_init_$Create$();
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>' call
        Companion_getInstance_110();
        this_0.s('clazzUid', this.oql_1.toString());
        var tmp0_safe_receiver = this.mql_1.t2().rql_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f8m_1;
        if (tmp1_safe_receiver == null)
          null;
        else {
          // Inline function 'kotlin.also' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>.<anonymous>' call
          this_0.s('terminology', this.r4x().w4b(Companion_instance_33.s4x(), tmp1_safe_receiver));
        }
        var tmp7_args = this_0.f3();
        this.qpc(tmp4_nextViewName, tmp5_key, block, tmp6_serializer, tmp7_args);
      }
    }
  };
  function CourseBlockUiState(block) {
    this.br1_1 = block;
  }
  protoOf(CourseBlockUiState).cr1 = function () {
    var tmp;
    var tmp_0 = this.br1_1.rjc_1.p83_1;
    if (!(tmp_0 === 100)) {
      tmp = this.br1_1.rjc_1.q83_1 < 3;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockUiState).dr1 = function () {
    return this.br1_1.rjc_1.q83_1 > 0;
  };
  protoOf(CourseBlockUiState).er1 = function () {
    return !this.br1_1.rjc_1.f84_1;
  };
  protoOf(CourseBlockUiState).fr1 = function () {
    return this.br1_1.rjc_1.f84_1;
  };
  function Companion_110() {
    Companion_instance_158 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.dqz_1 = [null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_7()), new ArrayListSerializer($serializer_getInstance_8()), null];
    this.eqz_1 = 3;
  }
  protoOf(Companion_110).s4x = function () {
    return $serializer_getInstance_65();
  };
  var Companion_instance_158;
  function Companion_getInstance_128() {
    if (Companion_instance_158 == null)
      new Companion_110();
    return Companion_instance_158;
  }
  function $serializer_53() {
    $serializer_instance_53 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditUiState', this, 8);
    tmp0_serialDesc.y4l('fieldsEnabled', true);
    tmp0_serialDesc.y4l('entity', true);
    tmp0_serialDesc.y4l('clazzStartDateError', true);
    tmp0_serialDesc.y4l('clazzEndDateError', true);
    tmp0_serialDesc.y4l('clazzNameError', true);
    tmp0_serialDesc.y4l('clazzSchedules', true);
    tmp0_serialDesc.y4l('courseBlockList', true);
    tmp0_serialDesc.y4l('timeZone', true);
    this.gr1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_53).v4a = function () {
    return this.gr1_1;
  };
  protoOf($serializer_53).p4m = function () {
    var tmp0_cached = Companion_getInstance_128().dqz_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), get_nullable($serializer_getInstance_9()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), tmp0_cached[5], tmp0_cached[6], StringSerializer_getInstance()];
  };
  protoOf($serializer_53).x4a = function (decoder) {
    var tmp0_desc = this.gr1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_input = decoder.n4e(tmp0_desc);
    var tmp13_cached = Companion_getInstance_128().dqz_1;
    if (tmp12_input.c4f()) {
      tmp4_local0 = tmp12_input.p4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.b4f(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.z4e(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.z4e(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.x4e(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.p4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.b4f(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.b4f(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.z4e(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.z4e(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.x4e(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.o4e(tmp0_desc);
    return ClazzEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_53).hr1 = function (encoder, value) {
    var tmp0_desc = this.gr1_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_128().dqz_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.qql_1 === false)) {
      tmp1_output.t4f(tmp0_desc, 0, value.qql_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.rql_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 1, $serializer_getInstance_9(), value.rql_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.sql_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 2, StringSerializer_getInstance(), value.sql_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.tql_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, StringSerializer_getInstance(), value.tql_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.uql_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, StringSerializer_getInstance(), value.uql_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !equals(value.vql_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 5, tmp2_cached[5], value.vql_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !equals(value.wql_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 6, tmp2_cached[6], value.wql_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 7) ? true : !(value.xql_1 === 'UTC')) {
      tmp1_output.b4g(tmp0_desc, 7, value.xql_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_53).w4a = function (encoder, value) {
    return this.hr1(encoder, value instanceof ClazzEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_53;
  function $serializer_getInstance_65() {
    if ($serializer_instance_53 == null)
      new $serializer_53();
    return $serializer_instance_53;
  }
  function ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_65().gr1_1);
    }
    if (0 === (seen1 & 1))
      $this.qql_1 = false;
    else
      $this.qql_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.rql_1 = null;
    else
      $this.rql_1 = entity;
    if (0 === (seen1 & 4))
      $this.sql_1 = null;
    else
      $this.sql_1 = clazzStartDateError;
    if (0 === (seen1 & 8))
      $this.tql_1 = null;
    else
      $this.tql_1 = clazzEndDateError;
    if (0 === (seen1 & 16))
      $this.uql_1 = null;
    else
      $this.uql_1 = clazzNameError;
    if (0 === (seen1 & 32))
      $this.vql_1 = emptyList();
    else
      $this.vql_1 = clazzSchedules;
    if (0 === (seen1 & 64))
      $this.wql_1 = emptyList();
    else
      $this.wql_1 = courseBlockList;
    if (0 === (seen1 & 128))
      $this.xql_1 = 'UTC';
    else
      $this.xql_1 = timeZone;
    return $this;
  }
  function ClazzEditUiState_init_$Create$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker) {
    return ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, objectCreate(protoOf(ClazzEditUiState)));
  }
  function ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    Companion_getInstance_128();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    entity = entity === VOID ? null : entity;
    clazzStartDateError = clazzStartDateError === VOID ? null : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? null : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? null : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? emptyList() : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.qql_1 = fieldsEnabled;
    this.rql_1 = entity;
    this.sql_1 = clazzStartDateError;
    this.tql_1 = clazzEndDateError;
    this.uql_1 = clazzNameError;
    this.vql_1 = clazzSchedules;
    this.wql_1 = courseBlockList;
    this.xql_1 = timeZone;
  }
  protoOf(ClazzEditUiState).ir1 = function () {
    var tmp;
    var tmp0_safe_receiver = this.rql_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w8j_1;
    Companion_getInstance_4();
    if (equals(tmp_0, new Long(1, 0))) {
      Companion_getInstance_4();
      var tmp_1 = new Long(1, 0);
      Companion_getInstance_4();
      tmp = tmp_1.equals(new Long(1, 0));
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzEditUiState).jr1 = function (courseBlockAndEditEntities) {
    return new CourseBlockUiState(courseBlockAndEditEntities);
  };
  protoOf(ClazzEditUiState).kr1 = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    return new ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).yql = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.qql_1 : fieldsEnabled;
    entity = entity === VOID ? this.rql_1 : entity;
    clazzStartDateError = clazzStartDateError === VOID ? this.sql_1 : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? this.tql_1 : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? this.uql_1 : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? this.vql_1 : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? this.wql_1 : courseBlockList;
    timeZone = timeZone === VOID ? this.xql_1 : timeZone;
    return $super === VOID ? this.kr1(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) : $super.kr1.call(this, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).toString = function () {
    return 'ClazzEditUiState(fieldsEnabled=' + this.qql_1 + ', entity=' + this.rql_1 + ', clazzStartDateError=' + this.sql_1 + ', clazzEndDateError=' + this.tql_1 + ', clazzNameError=' + this.uql_1 + ', clazzSchedules=' + this.vql_1 + ', courseBlockList=' + this.wql_1 + ', timeZone=' + this.xql_1 + ')';
  };
  protoOf(ClazzEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.qql_1);
    result = imul(result, 31) + (this.rql_1 == null ? 0 : this.rql_1.hashCode()) | 0;
    result = imul(result, 31) + (this.sql_1 == null ? 0 : getStringHashCode(this.sql_1)) | 0;
    result = imul(result, 31) + (this.tql_1 == null ? 0 : getStringHashCode(this.tql_1)) | 0;
    result = imul(result, 31) + (this.uql_1 == null ? 0 : getStringHashCode(this.uql_1)) | 0;
    result = imul(result, 31) + hashCode(this.vql_1) | 0;
    result = imul(result, 31) + hashCode(this.wql_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.xql_1) | 0;
    return result;
  };
  protoOf(ClazzEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEditUiState ? other : THROW_CCE();
    if (!(this.qql_1 === tmp0_other_with_cast.qql_1))
      return false;
    if (!equals(this.rql_1, tmp0_other_with_cast.rql_1))
      return false;
    if (!(this.sql_1 == tmp0_other_with_cast.sql_1))
      return false;
    if (!(this.tql_1 == tmp0_other_with_cast.tql_1))
      return false;
    if (!(this.uql_1 == tmp0_other_with_cast.uql_1))
      return false;
    if (!equals(this.vql_1, tmp0_other_with_cast.vql_1))
      return false;
    if (!equals(this.wql_1, tmp0_other_with_cast.wql_1))
      return false;
    if (!(this.xql_1 === tmp0_other_with_cast.xql_1))
      return false;
    return true;
  };
  function createNewClazzUseCase$factory() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function createNewClazzUseCase$factory_0() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function get_COMPLETABLE_BLOCK_TYPES() {
    _init_properties_BlockStatusExt_kt__pb774u();
    return COMPLETABLE_BLOCK_TYPES;
  }
  var COMPLETABLE_BLOCK_TYPES;
  function aggregateIfModule(_this__u8e3s4, blockUid, blocks) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = blocks.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (element.o83_1.equals(blockUid)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return null;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var block = tmp;
    var tmp_0;
    var tmp_1 = block.p83_1;
    if (tmp_1 === 100) {
      var tmp$ret$2;
      $l$block_0: {
        // Inline function 'kotlin.collections.count' call
        var tmp_2;
        if (isInterface(blocks, Collection)) {
          tmp_2 = blocks.c1();
        } else {
          tmp_2 = false;
        }
        if (tmp_2) {
          tmp$ret$2 = 0;
          break $l$block_0;
        }
        var count = 0;
        var tmp0_iterator_0 = blocks.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
          if (element_0.r83_1.equals(blockUid)) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$2 = count;
      }
      var moduleBlockCount = tmp$ret$2;
      if (moduleBlockCount === 0)
        return null;
      // Inline function 'kotlin.collections.associateBy' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator_1 = blocks.w();
      while (tmp0_iterator_1.f()) {
        var element_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (element_1.r83_1.equals(blockUid)) {
          destination.i1(element_1);
        }
      }
      var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);
      // Inline function 'kotlin.collections.associateByTo' call
      var destination_0 = LinkedHashMap_init_$Create$_0(capacity);
      var tmp0_iterator_2 = destination.w();
      while (tmp0_iterator_2.f()) {
        var element_2 = tmp0_iterator_2.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        var tmp$ret$7 = element_2.o83_1;
        destination_0.s(tmp$ret$7, element_2);
      }
      var moduleBlockUids = destination_0;
      var numBlocksWithScoreResult = 0;
      var numBlocksWithScore = 0;
      var numModsComplete = 0;
      var numBlocksSuccessSet = 0;
      var numBlocksSuccess = 0;
      var numBlocksFailed = 0;
      var totalPointsScored = 0.0;
      var maxPointsInModule = 0.0;
      var numCompleteableBlocksInModule = 0;
      // Inline function 'kotlin.collections.forEach' call
      var tmp0_iterator_3 = _this__u8e3s4.w();
      while (tmp0_iterator_3.f()) {
        var element_3 = tmp0_iterator_3.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (moduleBlockUids.o2().a1(element_3.haq_1)) {
          var blockForStatus = moduleBlockUids.q(element_3.haq_1);
          if ((blockForStatus == null ? null : isCompleteable(blockForStatus)) === true) {
            numCompleteableBlocksInModule = numCompleteableBlocksInModule + 1 | 0;
          }
          var tmp3_safe_receiver = blockForStatus == null ? null : blockForStatus.z83_1;
          if (tmp3_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            maxPointsInModule = maxPointsInModule + tmp3_safe_receiver;
            numBlocksWithScore = numBlocksWithScore + 1 | 0;
          }
          var tmp4_safe_receiver = element_3.laq_1;
          if (tmp4_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            var tmp_3 = totalPointsScored;
            var tmp1_elvis_lhs = blockForStatus == null ? null : blockForStatus.z83_1;
            totalPointsScored = tmp_3 + tmp4_safe_receiver * (tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs);
            numBlocksWithScoreResult = numBlocksWithScoreResult + 1 | 0;
          }
          if (element_3.jaq_1) {
            numModsComplete = numModsComplete + 1 | 0;
          }
          var tmp6_safe_receiver = element_3.kaq_1;
          if (tmp6_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            numBlocksSuccessSet = numBlocksSuccessSet + 1 | 0;
            if (tmp6_safe_receiver) {
              numBlocksSuccess = numBlocksSuccess + 1 | 0;
            } else {
              numBlocksFailed = numBlocksFailed + 1 | 0;
            }
          }
        }
      }
      var isModuleComplete = numCompleteableBlocksInModule > 0 ? numCompleteableBlocksInModule === numModsComplete : false;
      var tmp1_safe_receiver = firstOrNull(_this__u8e3s4);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gaq_1;
      var tmp3_sPersonUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
      var tmp_4;
      if (!(maxPointsInModule === 0.0)) {
        tmp_4 = totalPointsScored / maxPointsInModule;
      } else {
        tmp_4 = null;
      }
      var tmp4_sScoreScaled = tmp_4;
      var tmp5_sIsSuccess = (isModuleComplete ? numBlocksSuccess === numBlocksSuccessSet : false) ? true : (isModuleComplete ? numBlocksFailed > 0 : false) ? false : null;
      tmp_0 = new BlockStatus(tmp3_sPersonUid, blockUid, VOID, isModuleComplete, tmp5_sIsSuccess, tmp4_sScoreScaled);
    } else {
      var tmp$ret$14;
      $l$block_1: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_4 = _this__u8e3s4.w();
        while (tmp0_iterator_4.f()) {
          var element_4 = tmp0_iterator_4.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
          if (element_4.haq_1.equals(blockUid)) {
            tmp$ret$14 = element_4;
            break $l$block_1;
          }
        }
        tmp$ret$14 = null;
      }
      tmp_0 = tmp$ret$14;
    }
    return tmp_0;
  }
  function displayMarkFor(_this__u8e3s4, maxPoints) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var tmp0_safe_receiver = markFor(_this__u8e3s4, maxPoints);
    return tmp0_safe_receiver == null ? null : toDisplayString(tmp0_safe_receiver);
  }
  function isCompleteable(_this__u8e3s4) {
    _init_properties_BlockStatusExt_kt__pb774u();
    return get_COMPLETABLE_BLOCK_TYPES().a1(_this__u8e3s4.p83_1);
  }
  function markFor(_this__u8e3s4, maxPoints) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var scaledMarkVal = _this__u8e3s4.laq_1;
    var tmp;
    if (!(scaledMarkVal == null) ? !(maxPoints == null) : false) {
      tmp = scaledMarkVal * maxPoints;
    } else {
      tmp = null;
    }
    return tmp;
  }
  var properties_initialized_BlockStatusExt_kt_h05ldo;
  function _init_properties_BlockStatusExt_kt__pb774u() {
    if (!properties_initialized_BlockStatusExt_kt_h05ldo) {
      properties_initialized_BlockStatusExt_kt_h05ldo = true;
      COMPLETABLE_BLOCK_TYPES = listOf([104, 103]);
    }
  }
  function $loadCOROUTINE$59(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tr1_1 = _this__u8e3s4;
    this.ur1_1 = params;
  }
  protoOf($loadCOROUTINE$59).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.tr1_1.o6i();
            this.hd_1 = 1;
            suspendResult = this.tr1_1.br2_1.u5a(this.ur1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vr1_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.tr1_1.cr2_1.o7k();
            var tmp_1 = this.vr1_1;
            var tmp0_safe_receiver = tmp_1 instanceof Page ? tmp_1 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h5a_1;
            var tmp_2;
            if (tmp1_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp1_safe_receiver.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_safe_receiver_0 = element.s9b_1;
                var tmp0_safe_receiver_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.x9b_1;
                if (tmp0_safe_receiver_1 == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver_1);
                }
              }
              tmp_2 = destination;
            }

            var tmp2_elvis_lhs = tmp_2;
            suspendResult = tmp_0.fiv(this.tr1_1.dr2_1, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs, this.tr1_1.er2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var blockResults = suspendResult;
            var tmp3_subject = this.vr1_1;
            var tmp_3;
            if (tmp3_subject instanceof Page) {
              var tmp_4 = this.vr1_1;
              var studentListResultCasted = tmp_4 instanceof Page ? tmp_4 : THROW_CCE();
              var this_0 = studentListResultCasted.h5a_1;
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
              var tmp0_iterator_0 = this_0.w();
              while (tmp0_iterator_0.f()) {
                var item = tmp0_iterator_0.e();
                var destination_1 = ArrayList_init_$Create$();
                var tmp0_iterator_1 = blockResults.w();
                while (tmp0_iterator_1.f()) {
                  var element_0 = tmp0_iterator_1.e();
                  var tmp_5 = element_0.gaq_1;
                  var tmp0_safe_receiver_2 = item.s9b_1;
                  if (tmp_5.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.x9b_1)) {
                    destination_1.i1(element_0);
                  }
                }
                destination_0.i1(new StudentAndBlockStatuses(item, destination_1));
              }
              tmp_3 = new Page(destination_0, studentListResultCasted.i5a_1, studentListResultCasted.j5a_1, studentListResultCasted.k5a_1, studentListResultCasted.l5a_1);
            } else {
              if (tmp3_subject instanceof Error_0) {
                tmp_3 = new Error_0(this.vr1_1.g5a_1);
              } else {
                if (tmp3_subject instanceof Invalid) {
                  tmp_3 = new Invalid();
                } else {
                  throw IllegalStateException_init_$Create$("Cant get here really, but compiler doesn't know that");
                }
              }
            }

            var tmp_6 = tmp_3;
            return tmp_6 instanceof LoadResult ? tmp_6 : THROW_CCE();
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $loadHttpCOROUTINE$60(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.nr2_1 = _this__u8e3s4;
    this.or2_1 = params;
  }
  protoOf($loadHttpCOROUTINE$60).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.nr2_1.br2_1;
            tmp_0.pr2_1 = isInterface(tmp_1, PagingSourceWithHttpLoader) ? tmp_1 : null;
            if (this.pr2_1 == null) {
              this.qr2_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.pr2_1.d6l(this.or2_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.qr2_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_elvis_lhs = this.qr2_1;
            return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzGradebookPagingSource(studentListPagingSource, db, clazzUid, accountPersonUid) {
    DelegatedInvalidationPagingSource.call(this, studentListPagingSource);
    this.br2_1 = studentListPagingSource;
    this.cr2_1 = db;
    this.dr2_1 = clazzUid;
    this.er2_1 = accountPersonUid;
  }
  protoOf(ClazzGradebookPagingSource).rr2 = function (params, $completion) {
    var tmp = new $loadCOROUTINE$59(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).u5a = function (params, $completion) {
    return this.rr2(params, $completion);
  };
  protoOf(ClazzGradebookPagingSource).c6l = function (params, $completion) {
    var tmp = new $loadHttpCOROUTINE$60(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).d6l = function (params, $completion) {
    return this.c6l(params, $completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ar3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).cr3 = function (courseBlockList, $completion) {
    var tmp = this.dr3(courseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.cr3((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ar3_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.kr4(this.br3_1, this.ar3_1.fr4_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).dr3 = function (courseBlockList, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this.ar3_1, completion);
    i.br3_1 = courseBlockList;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.cr3(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.tr4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).dq3 = function (it, $completion) {
    var tmp = this.eq3(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.dq3((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.tr4_1.opb_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mov(VOID, VOID, this.ur4_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).eq3 = function (it, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this.tr4_1, completion);
    i.ur4_1 = it;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.dq3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.dr5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).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;
            var tmp_0 = distinctUntilChanged(this.dr5_1.epc().u7j().dcd(this.dr5_1.er4_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this.dr5_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_11(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this.dr5_1, completion);
    i.er5_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.nr5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = distinctUntilChanged(this.nr5_1.epc().t7j().w8i(this.nr5_1.er4_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this.nr5_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_11(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this.nr5_1, completion);
    i.or5_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.xr5_1 = $this_launch;
    this.yr5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.xr5_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_0(this.yr5_1, null));
          launch(this.xr5_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_2(this.yr5_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzGradebookViewModel$slambda$slambda(this.xr5_1, this.yr5_1, completion);
  };
  function ClazzGradebookViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_111() {
    this.zr5_1 = 'Gradebook';
  }
  var Companion_instance_159;
  function Companion_getInstance_129() {
    return Companion_instance_159;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_11(function_0) {
    this.ar6_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_11).t1d = function (value, $completion) {
    return this.ar6_1(value, $completion);
  };
  function ClazzGradebookViewModel$studentPagingSource$lambda(this$0) {
    return function () {
      var tmp = this$0.epc().y7j();
      return new ClazzGradebookPagingSource(tmp.e99(this$0.er4_1, 1000, 1, '%', 0, this$0.cpc(), systemTimeInMillis()), this$0.dpc(), this$0.er4_1, this$0.cpc());
    };
  }
  function ClazzGradebookViewModel$slambda(this$0, resultContinuation) {
    this.jr6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda).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 = whenSubscribed(this.jr6_1.fpk_1, ClazzGradebookViewModel$slambda$slambda_0(this.kr6_1, this.jr6_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzGradebookViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda(this.jr6_1, completion);
    i.kr6_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzGradebookUiState(), 'Gradebook');
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.er4_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.fr4_1 = ClazzGradebookViewModel$studentPagingSource$lambda(this);
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, ClazzGradebookViewModel$slambda_0(this, null));
  }
  protoOf(ClazzGradebookViewModel).zpk = function (searchText) {
  };
  protoOf(ClazzGradebookViewModel).apl = function () {
  };
  function ClazzGradebookUiState$_init_$lambda_aseg4q() {
    return new EmptyPagingSource();
  }
  function ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale) {
    courseBlocks = courseBlocks === VOID ? emptyList() : courseBlocks;
    var tmp;
    if (results === VOID) {
      tmp = ClazzGradebookUiState$_init_$lambda_aseg4q;
    } else {
      tmp = results;
    }
    results = tmp;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    scale = scale === VOID ? 1.0 : scale;
    this.gr4_1 = courseBlocks;
    this.hr4_1 = results;
    this.ir4_1 = isFullScreen;
    this.jr4_1 = scale;
  }
  protoOf(ClazzGradebookUiState).lr6 = function (courseBlocks, results, isFullScreen, scale) {
    return new ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).kr4 = function (courseBlocks, results, isFullScreen, scale, $super) {
    courseBlocks = courseBlocks === VOID ? this.gr4_1 : courseBlocks;
    results = results === VOID ? this.hr4_1 : results;
    isFullScreen = isFullScreen === VOID ? this.ir4_1 : isFullScreen;
    scale = scale === VOID ? this.jr4_1 : scale;
    return $super === VOID ? this.lr6(courseBlocks, results, isFullScreen, scale) : $super.lr6.call(this, courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).toString = function () {
    return 'ClazzGradebookUiState(courseBlocks=' + this.gr4_1 + ', results=' + this.hr4_1 + ', isFullScreen=' + this.ir4_1 + ', scale=' + this.jr4_1 + ')';
  };
  protoOf(ClazzGradebookUiState).hashCode = function () {
    var result = hashCode(this.gr4_1);
    result = imul(result, 31) + hashCode(this.hr4_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ir4_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.jr4_1) | 0;
    return result;
  };
  protoOf(ClazzGradebookUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzGradebookUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzGradebookUiState ? other : THROW_CCE();
    if (!equals(this.gr4_1, tmp0_other_with_cast.gr4_1))
      return false;
    if (!equals(this.hr4_1, tmp0_other_with_cast.hr4_1))
      return false;
    if (!(this.ir4_1 === tmp0_other_with_cast.ir4_1))
      return false;
    if (!equals(this.jr4_1, tmp0_other_with_cast.jr4_1))
      return false;
    return true;
  };
  function get_thumbnailUri(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.xcg_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u84_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.zcg_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.qap_1;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    return tmp;
  }
  function maxScoreForBlock(_this__u8e3s4, block) {
    var blockVal = block.wcg_1;
    var tmp;
    var tmp_0 = blockVal == null ? null : blockVal.p83_1;
    if (tmp_0 === 100) {
      var tmp$ret$0;
      $l$block: {
        // Inline function 'kotlin.collections.count' call
        var tmp_1;
        if (isInterface(_this__u8e3s4, Collection)) {
          tmp_1 = _this__u8e3s4.c1();
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp$ret$0 = 0;
          break $l$block;
        }
        var count = 0;
        var tmp0_iterator = _this__u8e3s4.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>' call
          var tmp_2;
          var tmp0_safe_receiver = element.wcg_1;
          if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r83_1, blockVal.o83_1)) {
            var tmp1_safe_receiver = element.wcg_1;
            tmp_2 = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z83_1) == null);
          } else {
            tmp_2 = false;
          }
          if (tmp_2) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      var numBlocksWithScore = tmp$ret$0;
      var tmp_3;
      if (numBlocksWithScore === 0) {
        tmp_3 = null;
      } else {
        // Inline function 'kotlin.collections.sumOf' call
        var sum = 0.0;
        var tmp0_iterator_0 = _this__u8e3s4.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          var tmp_4 = sum;
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>' call
          var tmp0_safe_receiver_0 = element_0.wcg_1;
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.z83_1;
          var tmp_5;
          if (tmp1_safe_receiver_0 == null) {
            tmp_5 = null;
          } else {
            // Inline function 'kotlin.takeIf' call
            // Inline function 'kotlin.contracts.contract' call
            var tmp_6;
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>.<anonymous>' call
            var tmp0_safe_receiver_1 = element_0.wcg_1;
            if (equals(tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.r83_1, blockVal.o83_1)) {
              tmp_6 = tmp1_safe_receiver_0;
            } else {
              tmp_6 = null;
            }
            tmp_5 = tmp_6;
          }
          var tmp2_safe_receiver = tmp_5;
          var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver;
          sum = tmp_4 + (tmp3_elvis_lhs == null ? 0.0 : tmp3_elvis_lhs);
        }
        tmp_3 = sum;
      }
      tmp = tmp_3;
    } else {
      tmp = blockVal == null ? null : blockVal.z83_1;
    }
    return tmp;
  }
  function _get_makeLinkUseCase__qbv742($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jr7_1;
    makeLinkUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setClipboardStringUseCase__31i1s1_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lr7_1;
    setClipboardStringUseCase$factory_2();
    return this_0.t2();
  }
  function _get_shareTextUseCase__god44g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mr7_1;
    shareTextUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_112() {
    this.or7_1 = 'InviteWithLink';
  }
  var Companion_instance_160;
  function Companion_getInstance_130() {
    return Companion_instance_160;
  }
  function InviteViaLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'InviteWithLink');
    this.hr7_1 = MutableStateFlow(new InviteViaLinkUiState());
    this.ir7_1 = asStateFlow(this.hr7_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.jr7_1 = Instance(this_0, tmp$ret$0, null).f5j(this, makeLinkUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_120();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('no invite code');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    tmp_1.kr7_1 = tmp_2;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.lr7_1 = Instance(this, tmp$ret$2, null).f5j(this, setClipboardStringUseCase$factory_1());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(ShareTextUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.mr7_1 = InstanceOrNull(this, tmp$ret$4, null).f5j(this, shareTextUseCase$factory());
    var tmp_7 = this;
    var tmp_8 = _get_makeLinkUseCase__qbv742(this);
    Companion_getInstance_120();
    tmp_7.nr7_1 = tmp_8.go9('JoinWithCode', mapOf_0(to('inviteCode', this.kr7_1)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.InviteViaLinkViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().am9_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.hr7_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.InviteViaLinkViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.rr7(this.nr7_1, !(_get_shareTextUseCase__god44g(this) == null));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(InviteViaLinkViewModel).sr7 = function () {
    _get_setClipboardStringUseCase__31i1s1_0(this).knv(this.nr7_1);
    this.gpc().bow(new Snack(this.ipc().rnd(strings_getInstance().vm8_1)));
  };
  function InviteViaLinkUiState(inviteLink, showShareLinkButton) {
    inviteLink = inviteLink === VOID ? null : inviteLink;
    showShareLinkButton = showShareLinkButton === VOID ? false : showShareLinkButton;
    this.pr7_1 = inviteLink;
    this.qr7_1 = showShareLinkButton;
  }
  protoOf(InviteViaLinkUiState).rr7 = function (inviteLink, showShareLinkButton) {
    return new InviteViaLinkUiState(inviteLink, showShareLinkButton);
  };
  protoOf(InviteViaLinkUiState).toString = function () {
    return 'InviteViaLinkUiState(inviteLink=' + this.pr7_1 + ', showShareLinkButton=' + this.qr7_1 + ')';
  };
  protoOf(InviteViaLinkUiState).hashCode = function () {
    var result = this.pr7_1 == null ? 0 : getStringHashCode(this.pr7_1);
    result = imul(result, 31) + getBooleanHashCode(this.qr7_1) | 0;
    return result;
  };
  protoOf(InviteViaLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof InviteViaLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof InviteViaLinkUiState ? other : THROW_CCE();
    if (!(this.pr7_1 == tmp0_other_with_cast.pr7_1))
      return false;
    if (!(this.qr7_1 === tmp0_other_with_cast.qr7_1))
      return false;
    return true;
  };
  function makeLinkUseCase$factory() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_1() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function makeLinkUseCase$factory_0() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_2() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory_0() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function _get_requestEnrolmentUseCase__62wq8f($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qr8_1;
    requestEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_113() {
    this.rr8_1 = 'JoinWithCode';
  }
  var Companion_instance_161;
  function Companion_getInstance_131() {
    return Companion_instance_161;
  }
  function JoinWithCodeViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, this$0.ipc().rnd(strings_getInstance().mmj_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.or8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onClickJoin.<anonymous>.<anonymous>' call
          var nextValue = prevValue.vr8(VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation) {
    this.er9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_requestEnrolmentUseCase__62wq8f(this.er9_1);
            var tmp_1 = this.er9_1.or8_1.t2().tr8_1;
            var tmp_2 = this.er9_1.apc().rn4().xmr_1;
            suspendResult = tmp_0.jnv(tmp_1, tmp_2, 1000, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.er9_1.gpc().bow(new Snack(this.er9_1.ipc().rnd(strings_getInstance().mmn_1)));
            if (!(this.er9_1.jpc() == null)) {
              this.er9_1.tph(null);
            } else {
              Companion_getInstance_132();
              this.er9_1.mpb_1.doy('CourseListHome', emptyMap(), new UstadGoOptions(VOID, VOID, true));
            }

            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              var tmp_4;
              if (e instanceof IllegalArgumentException) {
                tmp_4 = strings_getInstance().smo_1;
              } else {
                if (e instanceof AlreadyHasPendingRequestException) {
                  tmp_4 = strings_getInstance().lmn_1;
                } else {
                  if (e instanceof AlreadyEnroledInClassException) {
                    tmp_4 = strings_getInstance().yma_1;
                  } else {
                    tmp_4 = strings_getInstance().hlj_1;
                  }
                }
              }
              var errorMessage = tmp_4;
              l$ret$1: do {
                var this_0 = this.er9_1.or8_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_5 = this.er9_1.ipc().rnd(errorMessage);
                  var tmp0_safe_receiver = e.message;
                  var tmp_6;
                  if (tmp0_safe_receiver == null) {
                    tmp_6 = null;
                  } else {
                    tmp_6 = ' :' + tmp0_safe_receiver;
                  }
                  var tmp1_elvis_lhs = tmp_6;
                  var nextValue = prevValue.vr8(tmp_5 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).q7e = function (completion) {
    return new JoinWithCodeViewModel$onClickJoin$slambda(this.er9_1, completion);
  };
  function JoinWithCodeViewModel$onClickJoin$slambda_0(this$0, resultContinuation) {
    var i = new JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function JoinWithCodeViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'JoinWithCode');
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    tmp.or8_1 = MutableStateFlow(new JoinWithCodeUiState(VOID, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
    this.pr8_1 = asStateFlow(this.or8_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.qr8_1 = Instance(this_0, tmp$ret$0, null).f5j(this, requestEnrolmentUseCase$factory());
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_1 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>' call
    Companion_getInstance_120();
    this.vpc(this_1, 'inviteCode');
    var tmp_2 = this_1.f3();
    this.ypc(VOID, tmp_2, JoinWithCodeViewModel$lambda(this));
  }
  protoOf(JoinWithCodeViewModel).fr9 = function (codeVal) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.or8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onCodeValueChange.<anonymous>' call
        var nextValue = prevValue.vr8(null, codeVal);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(JoinWithCodeViewModel).gr9 = function () {
    var tmp = JoinWithCodeViewModel$onClickJoin$lambda(this);
    this.xpi(tmp, JoinWithCodeViewModel$onClickJoin$slambda_0(this, null));
  };
  function JoinWithCodeUiState(codeError, code, fieldsEnabled) {
    codeError = codeError === VOID ? null : codeError;
    code = code === VOID ? '' : code;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.sr8_1 = codeError;
    this.tr8_1 = code;
    this.ur8_1 = fieldsEnabled;
  }
  protoOf(JoinWithCodeUiState).hr9 = function (codeError, code, fieldsEnabled) {
    return new JoinWithCodeUiState(codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).vr8 = function (codeError, code, fieldsEnabled, $super) {
    codeError = codeError === VOID ? this.sr8_1 : codeError;
    code = code === VOID ? this.tr8_1 : code;
    fieldsEnabled = fieldsEnabled === VOID ? this.ur8_1 : fieldsEnabled;
    return $super === VOID ? this.hr9(codeError, code, fieldsEnabled) : $super.hr9.call(this, codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).toString = function () {
    return 'JoinWithCodeUiState(codeError=' + this.sr8_1 + ', code=' + this.tr8_1 + ', fieldsEnabled=' + this.ur8_1 + ')';
  };
  protoOf(JoinWithCodeUiState).hashCode = function () {
    var result = this.sr8_1 == null ? 0 : getStringHashCode(this.sr8_1);
    result = imul(result, 31) + getStringHashCode(this.tr8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ur8_1) | 0;
    return result;
  };
  protoOf(JoinWithCodeUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof JoinWithCodeUiState))
      return false;
    var tmp0_other_with_cast = other instanceof JoinWithCodeUiState ? other : THROW_CCE();
    if (!(this.sr8_1 == tmp0_other_with_cast.sr8_1))
      return false;
    if (!(this.tr8_1 === tmp0_other_with_cast.tr8_1))
      return false;
    if (!(this.ur8_1 === tmp0_other_with_cast.ur8_1))
      return false;
    return true;
  };
  function requestEnrolmentUseCase$factory() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function requestEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.qr9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda).cp4 = function (hasPermission, $completion) {
    var tmp = this.dp4(hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.qr9_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_newClazzListOptionVisible = this.rr9_1 ? this.qr9_1.kpk().equals(ListViewMode_PICKER_getInstance()) : false;
              var nextValue = prevValue.dra(tmp0_newClazzListOptionVisible, VOID, VOID, VOID, VOID, VOID, this.rr9_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).dp4 = function (hasPermission, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this.qr9_1, completion);
    i.rr9_1 = hasPermission;
    return i;
  };
  function ClazzListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermission, $completion) {
      return i.cp4(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.mra_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda).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;
            var tmp_0 = this.mra_1.epc().u7l();
            var tmp_1 = this.mra_1.apc().in5().zk0_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.mhj(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_0(this.mra_1, null);
            suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzListViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzListViewModel$slambda$slambda(this.mra_1, completion);
  };
  function ClazzListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.vra_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).xra = function (it, $completion) {
    var tmp = this.yra(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.xra((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.vra_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.dra(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.wra_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).yra = function (it, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this.vra_1, completion);
    i.wra_1 = it;
    return i;
  };
  function ClazzListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.xra(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.hrb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda_1).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).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;
            var tmp_0 = this.hrb_1.epc().s7l();
            var tmp_1 = this.hrb_1.cpc();
            var tmp_2 = tmp_0.iep(tmp_1, 1);
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_2(this.hrb_1, null);
            suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ClazzListViewModel$slambda$slambda_1(this.hrb_1, completion);
  };
  function ClazzListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_114() {
    Companion_instance_162 = this;
    this.irb_1 = 'CourseList';
    this.jrb_1 = 'CourseListHome';
    this.krb_1 = listOf(['CourseList', 'CourseListHome']);
    this.lrb_1 = 'excludeAlreadySelectedClazzList';
  }
  var Companion_instance_162;
  function Companion_getInstance_132() {
    if (Companion_instance_162 == null)
      new Companion_114();
    return Companion_instance_162;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_12(function_0) {
    this.mrb_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_12).t1d = function (value, $completion) {
    return this.mrb_1(value, $completion);
  };
  function ClazzListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().t7j().r8i(toQueryLikeParam(this$0.opb_1.t2().eov_1.tou_1), this$0.apc().in5().zk0_1, this$0.nrc_1, this$0.fpk_1.t2().vr9_1.kp1_1, this$0.fpk_1.t2().xr9_1, systemTimeInMillis(), this$0.orc_1);
    };
  }
  function ClazzListViewModel$slambda(this$0, resultContinuation) {
    this.yrc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda).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 = whenSubscribed(this.yrc_1.fpk_1, ClazzListViewModel$slambda$slambda_0(this.yrc_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda(this.yrc_1, completion);
    i.zrc_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda_1(this$0, resultContinuation) {
    this.ird_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda_1).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 = whenSubscribed(this.ird_1.fpk_1, ClazzListViewModel$slambda$slambda_2(this.ird_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda_1(this.ird_1, completion);
    i.jrd_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation) {
    this.srd_1 = this$0;
    this.trd_1 = $enrolmentRequest;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).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;
            var tmp_0 = this.srd_1.epc().s7l();
            var tmp_1 = this.trd_1.zep_1;
            suspendResult = tmp_0.jep(tmp_1, 4, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.srd_1.gpc().bow(new Snack(this.srd_1.ipc().rnd(strings_getInstance().nmn_1)));
            return Unit_instance;
          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);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this.srd_1, this.trd_1, completion);
    i.urd_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this$0, $enrolmentRequest, resultContinuation) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_132();
    destinationName = destinationName === VOID ? 'CourseList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('excludeAlreadySelectedClazzList');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, [',']);
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.i1(element);
        }
      }
      tmp_0 = destination;
    }
    var tmp2_safe_receiver = tmp_0;
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.i1(tmp$ret$5);
      }
      tmp_1 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_2 = emptyList();
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    tmp.nrc_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('filterByPermission');
    var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_4;
    if (tmp1_elvis_lhs == null) {
      PermissionFlags_getInstance();
      tmp_4 = new Long(1, 0);
    } else {
      tmp_4 = tmp1_elvis_lhs;
    }
    tmp_3.orc_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.prc_1 = ClazzListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        var tmp0_searchState = this.opl();
        var tmp1_title = this.wpl(strings_getInstance().ymi_1, strings_getInstance().ymi_1);
        var tmp2_fabState = this.rpl(!this.cpc().equals(new Long(0, 0)), strings_getInstance().zmi_1);
        var nextValue = prevValue.mov(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fpk_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element_0 = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$11 = this.ipc().rnd(get_dayStringResource(element_0));
          result.s(element_0, tmp$ret$11);
        }
        var tmp1_clazzList = this.prc_1;
        var nextValue_0 = prevValue_0.dra(VOID, tmp1_clazzList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.bpc();
    launch(tmp_6, VOID, VOID, ClazzListViewModel$slambda_0(this, null));
    var tmp_7 = this.bpc();
    launch(tmp_7, VOID, VOID, ClazzListViewModel$slambda_2(this, null));
  }
  protoOf(ClazzListViewModel).zpk = function (searchText) {
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).apl = function () {
    this.tpl('CourseEdit');
  };
  protoOf(ClazzListViewModel).vrd = function () {
    Companion_getInstance_110();
    Companion_getInstance_4();
    this.mpb_1.fo0('JoinWithCode', mapOf_0(to('argCodeTable', (6).toString())));
  };
  protoOf(ClazzListViewModel).wrd = function (entry) {
    this.vpl('Course', entry.m8j_1, entry);
  };
  protoOf(ClazzListViewModel).xrd = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.dra(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).yrd = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.dra(VOID, VOID, VOID, VOID, VOID, filterOption.pow_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).zrd = function (enrolmentRequest) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this, enrolmentRequest, null));
  };
  function Companion_115() {
    Companion_instance_163 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().zlk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().zlk_1;
    var tmp_3 = new SortOrderOption(tmp_2, 2, false);
    var tmp_4 = strings_getInstance().vll_1;
    var tmp_5 = new SortOrderOption(tmp_4, 3, true);
    var tmp_6 = strings_getInstance().vll_1;
    tmp.are_1 = listOf([tmp_1, tmp_3, tmp_5, new SortOrderOption(tmp_6, 4, false)]);
  }
  var Companion_instance_163;
  function Companion_getInstance_133() {
    if (Companion_instance_163 == null)
      new Companion_115();
    return Companion_instance_163;
  }
  function ClazzListUiState$_init_$lambda_r0y0x0() {
    return new EmptyPagingSource();
  }
  function ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    Companion_getInstance_133();
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? true : newClazzListOptionVisible;
    var tmp;
    if (clazzList === VOID) {
      tmp = ClazzListUiState$_init_$lambda_r0y0x0;
    } else {
      tmp = clazzList;
    }
    clazzList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_133().are_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_0;
    if (selectedChipId === VOID) {
      tmp_0 = 5;
    } else {
      tmp_0 = selectedChipId;
    }
    selectedChipId = tmp_0;
    canAddNewCourse = canAddNewCourse === VOID ? false : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? emptyList() : pendingEnrolments;
    var tmp_1;
    if (filterOptions === VOID) {
      var tmp_2 = strings_getInstance().omj_1;
      tmp_1 = listOf([new MessageIdOption2(tmp_2, 5), new MessageIdOption2(strings_getInstance().zlz_1, 0)]);
    } else {
      tmp_1 = filterOptions;
    }
    filterOptions = tmp_1;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    this.sr9_1 = newClazzListOptionVisible;
    this.tr9_1 = clazzList;
    this.ur9_1 = sortOptions;
    this.vr9_1 = activeSortOrderOption;
    this.wr9_1 = fieldsEnabled;
    this.xr9_1 = selectedChipId;
    this.yr9_1 = canAddNewCourse;
    this.zr9_1 = pendingEnrolments;
    this.ara_1 = filterOptions;
    this.bra_1 = dayOfWeekStrings;
    this.cra_1 = localDateTimeNow;
  }
  protoOf(ClazzListUiState).bre = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    return new ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).dra = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow, $super) {
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? this.sr9_1 : newClazzListOptionVisible;
    clazzList = clazzList === VOID ? this.tr9_1 : clazzList;
    sortOptions = sortOptions === VOID ? this.ur9_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.vr9_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.wr9_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.xr9_1 : selectedChipId;
    canAddNewCourse = canAddNewCourse === VOID ? this.yr9_1 : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? this.zr9_1 : pendingEnrolments;
    filterOptions = filterOptions === VOID ? this.ara_1 : filterOptions;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.bra_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.cra_1 : localDateTimeNow;
    return $super === VOID ? this.bre(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) : $super.bre.call(this, newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).toString = function () {
    return 'ClazzListUiState(newClazzListOptionVisible=' + this.sr9_1 + ', clazzList=' + this.tr9_1 + ', sortOptions=' + this.ur9_1 + ', activeSortOrderOption=' + this.vr9_1 + ', fieldsEnabled=' + this.wr9_1 + ', selectedChipId=' + this.xr9_1 + ', canAddNewCourse=' + this.yr9_1 + ', pendingEnrolments=' + this.zr9_1 + ', filterOptions=' + this.ara_1 + ', dayOfWeekStrings=' + this.bra_1 + ', localDateTimeNow=' + this.cra_1 + ')';
  };
  protoOf(ClazzListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.sr9_1);
    result = imul(result, 31) + hashCode(this.tr9_1) | 0;
    result = imul(result, 31) + hashCode(this.ur9_1) | 0;
    result = imul(result, 31) + this.vr9_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wr9_1) | 0;
    result = imul(result, 31) + this.xr9_1 | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yr9_1) | 0;
    result = imul(result, 31) + hashCode(this.zr9_1) | 0;
    result = imul(result, 31) + hashCode(this.ara_1) | 0;
    result = imul(result, 31) + hashCode(this.bra_1) | 0;
    result = imul(result, 31) + this.cra_1.hashCode() | 0;
    return result;
  };
  protoOf(ClazzListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzListUiState ? other : THROW_CCE();
    if (!(this.sr9_1 === tmp0_other_with_cast.sr9_1))
      return false;
    if (!equals(this.tr9_1, tmp0_other_with_cast.tr9_1))
      return false;
    if (!equals(this.ur9_1, tmp0_other_with_cast.ur9_1))
      return false;
    if (!this.vr9_1.equals(tmp0_other_with_cast.vr9_1))
      return false;
    if (!(this.wr9_1 === tmp0_other_with_cast.wr9_1))
      return false;
    if (!(this.xr9_1 === tmp0_other_with_cast.xr9_1))
      return false;
    if (!(this.yr9_1 === tmp0_other_with_cast.yr9_1))
      return false;
    if (!equals(this.zr9_1, tmp0_other_with_cast.zr9_1))
      return false;
    if (!equals(this.ara_1, tmp0_other_with_cast.ara_1))
      return false;
    if (!equals(this.bra_1, tmp0_other_with_cast.bra_1))
      return false;
    if (!this.cra_1.equals(tmp0_other_with_cast.cra_1))
      return false;
    return true;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).mre = function (entity, permissions, $completion) {
    var tmp = this.nre(entity, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CoursePermission) ? p1 : THROW_CCE();
    return this.mre(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.kre_1;
          var tmp_0;
          if (this.lre_1.wde_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return new Pair(tmp_0, this.lre_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).nre = function (entity, permissions, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.kre_1 = entity;
    i.lre_1 = permissions;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.mre(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.wre_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).drf = function (it, $completion) {
    var tmp = this.erf(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.drf(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.yre_1 = this.xre_1;
            this.zre_1 = this.yre_1.y6();
            this.arf_1 = this.yre_1.z6();
            this.brf_1 = this.arf_1;
            this.crf_1 = this.brf_1.z6();
            l$ret$1: do {
              var this_0 = this.wre_1.brg_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.zre_1 == null)) {
                  tmp_0 = CoursePermissionConstants_getInstance().cq4_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.grg(this.zre_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.wre_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mov(prevValue_0.xou_1.sov(this.crf_1));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.zre_1 == null)) {
              this.hd_1 = 1;
              suspendResult = getTitleForCoursePermission(this.wre_1, this.zre_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$5: do {
              var this_2 = this.wre_1.opb_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.mov(VOID, VOID, title);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).erf = function (it, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.wre_1, completion);
    i.xre_1 = it;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.drf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.prg_1 = $entityFlow;
    this.qrg_1 = $permissionFlow;
    this.rrg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = distinctUntilChanged(combine(this.prg_1, this.qrg_1, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            suspendResult = collectLatest(tmp_0, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.rrg_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda(this.prg_1, this.qrg_1, this.rrg_1, completion);
    i.srg_1 = $this$launch;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.brh_1 = $this_launch;
    this.crh_1 = $entityFlow;
    this.drh_1 = $permissionFlow;
    this.erh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.brh_1, VOID, VOID, CoursePermissionDetailViewModel$slambda$slambda$slambda_0(this.crh_1, this.drh_1, this.erh_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new CoursePermissionDetailViewModel$slambda$slambda(this.brh_1, this.crh_1, this.drh_1, this.erh_1, completion);
  };
  function CoursePermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function onClickEdit_0($this) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.onClickEdit.<anonymous>' call
    Companion_getInstance_120();
    var tmp0_safe_receiver = $this.brg_1.t2().erg_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.odc_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this_0.s('entityUid', tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs);
    Companion_getInstance_120();
    $this.vpc(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    $this.mpb_1.fo0('CoursePermissionEdit', tmp$ret$2);
  }
  function Companion_116() {
    this.frh_1 = 'CoursePermissionDetail';
  }
  var Companion_instance_164;
  function Companion_getInstance_134() {
    return Companion_instance_164;
  }
  function CoursePermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_0($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    this.orh_1 = this$0;
    this.prh_1 = $entityFlow;
    this.qrh_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).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 = whenSubscribed(this.orh_1.brg_1, CoursePermissionDetailViewModel$slambda$slambda_0(this.rrh_1, this.prh_1, this.qrh_1, this.orh_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda(this.orh_1, this.prh_1, this.qrh_1, completion);
    i.rrh_1 = $this$launch;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda_0(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CoursePermissionDetail');
    this.brg_1 = MutableStateFlow(new CoursePermissionDetailUiState());
    this.crg_1 = asStateFlow(this.brg_1);
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.drg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var entityFlow = this.epc().t7l().k7y(this.epb_1, this.drg_1);
    var tmp_0 = this.epc().t7l();
    var tmp_1 = this.cpc();
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = tmp_0.vdb(tmp_1, this.drg_1, tmp_2, new Long(2, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.<anonymous>' call
        var tmp_3 = this.ipc().rnd(strings_getInstance().tlv_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mov(new FabUiState(VOID, tmp_3, tmp_4, CoursePermissionDetailViewModel$onClickEdit$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.bpc();
    launch(tmp_5, VOID, VOID, CoursePermissionDetailViewModel$slambda_0(this, entityFlow, permissionFlow, null));
  }
  function CoursePermissionDetailUiState(coursePermission, permissionLabels) {
    coursePermission = coursePermission === VOID ? null : coursePermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.erg_1 = coursePermission;
    this.frg_1 = permissionLabels;
  }
  protoOf(CoursePermissionDetailUiState).grg = function (coursePermission, permissionLabels) {
    return new CoursePermissionDetailUiState(coursePermission, permissionLabels);
  };
  protoOf(CoursePermissionDetailUiState).toString = function () {
    return 'CoursePermissionDetailUiState(coursePermission=' + this.erg_1 + ', permissionLabels=' + this.frg_1 + ')';
  };
  protoOf(CoursePermissionDetailUiState).hashCode = function () {
    var result = this.erg_1 == null ? 0 : this.erg_1.hashCode();
    result = imul(result, 31) + hashCode(this.frg_1) | 0;
    return result;
  };
  protoOf(CoursePermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.erg_1, tmp0_other_with_cast.erg_1))
      return false;
    if (!equals(this.frg_1, tmp0_other_with_cast.frg_1))
      return false;
    return true;
  };
  function CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ari_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda).cri = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.cri(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).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.bri_1.t7l().rdb(this.ari_1.qph_1, this.ari_1.crj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this.ari_1, completion);
    i.bri_1 = db;
    return i;
  };
  function CoursePermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.cri(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.lrj_1 = this$0;
    this.mrj_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).hdi = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.hdi($completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).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;
            var tmp_0 = get_doorPrimaryKeyManager(this.lrj_1.dpc());
            Companion_getInstance_5();
            suspendResult = tmp_0.t68(10012, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            Companion_getInstance_120();
            var tmp0_safe_receiver = this.mrj_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp2_safe_receiver = this.mrj_1.ba('grantToRole');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toInt(tmp2_safe_receiver);
            var tmp_2 = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;
            Companion_getInstance_120();
            var tmp4_safe_receiver = this.mrj_1.ba('personUid');
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
            return new CoursePermission(ARGUMENT, VOID, tmp_1, tmp_2, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
          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);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new CoursePermissionEditViewModel$slambda$slambda_1(this.lrj_1, this.mrj_1, completion);
  };
  function CoursePermissionEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.hdi($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.arj_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.qrj(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.zrj_1 = this$0;
    this.ark_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).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.zrj_1.epc().t7l().sdb(this.ark_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this.zrj_1, this.ark_1, completion);
    i.brk_1 = it;
    return i;
  };
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_117() {
    this.crk_1 = 'CoursePermissionEdit';
    this.drk_1 = 'grantToRole';
  }
  var Companion_instance_165;
  function Companion_getInstance_135() {
    return Companion_instance_165;
  }
  function CoursePermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.mrk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda).mqw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda).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;
            var tmp_0 = this.nrk_1.t7l();
            var tmp_1 = this.mrk_1.cpc();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ydb(tmp_1, this.mrk_1.crj_1, new Long(2, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(CoursePermissionEditViewModel$slambda).tmw = function (it, completion) {
    var i = new CoursePermissionEditViewModel$slambda(this.mrk_1, completion);
    i.nrk_1 = it;
    return i;
  };
  function CoursePermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mqw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.arj_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.qrj(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.wrk_1 = this$0;
    this.xrk_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_getInstance_5().s4x();
            var tmp_1 = CoursePermissionEditViewModel$slambda$slambda_0(this.wrk_1, null);
            var tmp_2 = CoursePermissionEditViewModel$slambda$slambda_2(this.wrk_1, this.xrk_1, null);
            suspendResult = this.wrk_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, CoursePermissionEditViewModel$slambda$lambda(this.wrk_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zrk_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getTitleForCoursePermission(this.wrk_1, this.zrk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$1: do {
              var this_0 = this.wrk_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.wrk_1.ipc().rnd(strings_getInstance().hm3_1);
                var nextValue = prevValue.mov(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, CoursePermissionEditViewModel$onClickSave$ref(this.wrk_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.wrk_1.arj_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.qrj(VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new CoursePermissionEditViewModel$slambda_1(this.wrk_1, this.xrk_1, completion);
    i.yrk_1 = $this$launchIfHasPermission;
    return i;
  };
  function CoursePermissionEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.arj_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.qrj(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.irl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.irl_1.arj_1.t2().nrj_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.jrl_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.irl_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this.irl_1, this.jrl_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_110();
            var popUpToOnFinish = this.irl_1.kpb_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.irl_1.mpb_1.eoy(popUpToOnFinish, false);
            } else {
              this.irl_1.sph('CoursePermissionDetail', this.jrl_1.odc_1, this.jrl_1);
            }

            return Unit_instance;
          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);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).q7e = function (completion) {
    return new CoursePermissionEditViewModel$onClickSave$slambda(this.irl_1, completion);
  };
  function CoursePermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CoursePermissionEdit');
    this.arj_1 = MutableStateFlow(new CoursePermissionEditUiState());
    this.brj_1 = asStateFlow(this.arj_1);
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.crj_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.arj_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.qrj(VOID, VOID, CoursePermissionConstants_getInstance().cq4_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, VOID, true);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = CoursePermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = CoursePermissionEditViewModel$lambda(this);
    this.upc(tmp_0, VOID, tmp_1, CoursePermissionEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(CoursePermissionEditViewModel).krl = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.arj_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onTogglePermission.<anonymous>' call
        var entityVal = prevValue.nrj_1;
        var tmp;
        if (!(entityVal == null)) {
          tmp = prevValue.qrj(entityVal.qjp(VOID, VOID, VOID, VOID, VOID, VOID, toggleFlag(entityVal.udc_1, flag)));
        } else {
          tmp = prevValue;
        }
        var nextValue = tmp;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(CoursePermissionEditViewModel).mq0 = function () {
    var tmp = CoursePermissionEditViewModel$onClickSave$lambda(this);
    this.xpi(tmp, CoursePermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.nrj_1 = entity;
    this.orj_1 = fieldsEnabled;
    this.prj_1 = permissionLabels;
  }
  protoOf(CoursePermissionEditUiState).lrl = function (entity, fieldsEnabled, permissionLabels) {
    return new CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).qrj = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.nrj_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.orj_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.prj_1 : permissionLabels;
    return $super === VOID ? this.lrl(entity, fieldsEnabled, permissionLabels) : $super.lrl.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).toString = function () {
    return 'CoursePermissionEditUiState(entity=' + this.nrj_1 + ', fieldsEnabled=' + this.orj_1 + ', permissionLabels=' + this.prj_1 + ')';
  };
  protoOf(CoursePermissionEditUiState).hashCode = function () {
    var result = this.nrj_1 == null ? 0 : this.nrj_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.orj_1) | 0;
    result = imul(result, 31) + hashCode(this.prj_1) | 0;
    return result;
  };
  protoOf(CoursePermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.nrj_1, tmp0_other_with_cast.nrj_1))
      return false;
    if (!(this.orj_1 === tmp0_other_with_cast.orj_1))
      return false;
    if (!equals(this.prj_1, tmp0_other_with_cast.prj_1))
      return false;
    return true;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.url_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).wrl = function (it, $completion) {
    var tmp = this.xrl(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wrl(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.vrl_1;
          var hasViewPermission = tmp0_container.y6();
          var hasEditPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.url_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp1_permissionLabels = CoursePermissionConstants_getInstance().cq4_1;
              var this_1 = this.url_1.zrm_1;
              var tmp_0;
              if (hasViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var tmp_1;
              if (tmp0_elvis_lhs == null) {
                tmp_1 = CoursePermissionListViewModel$slambda$slambda$slambda$lambda;
              } else {
                tmp_1 = tmp0_elvis_lhs;
              }
              var tmp2_permissionsList = tmp_1;
              var nextValue = prevValue.ern(tmp2_permissionsList, tmp1_permissionLabels, VOID, hasEditPermission);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.url_1.opb_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var nextValue_0 = prevValue_0.mov(prevValue_0.xou_1.sov(hasEditPermission));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).xrl = function (it, completion) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this.url_1, completion);
    i.vrl_1 = it;
    return i;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wrl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.nrn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).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;
            var tmp_0 = this.nrn_1.epc().t7l();
            var tmp_1 = this.nrn_1.cpc();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.vdb(tmp_1, this.nrn_1.yrm_1, tmp_2, new Long(2, 0)));
            var tmp_4 = CoursePermissionListViewModel$slambda$slambda$slambda_0(this.nrn_1, null);
            suspendResult = tmp_3.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_13(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).q7e = function (completion) {
    return new CoursePermissionListViewModel$slambda$slambda(this.nrn_1, completion);
  };
  function CoursePermissionListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_118() {
    this.orn_1 = 'CoursePermissionList';
    this.prn_1 = 'permissionResult';
  }
  var Companion_instance_166;
  function Companion_getInstance_136() {
    return Companion_instance_166;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_13(function_0) {
    this.qrn_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_13).t1d = function (value, $completion) {
    return this.qrn_1(value, $completion);
  };
  function CoursePermissionListViewModel$pagingSource$lambda(this$0) {
    return function () {
      return this$0.epc().t7l().qdb(this$0.yrm_1, false);
    };
  }
  function CoursePermissionListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.apl();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CoursePermissionListViewModel$slambda(this$0, resultContinuation) {
    this.zrn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda).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 = whenSubscribed(this.zrn_1.fpk_1, CoursePermissionListViewModel$slambda$slambda_0(this.zrn_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CoursePermissionListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$slambda(this.zrn_1, completion);
    i.aro_1 = $this$launch;
    return i;
  };
  function CoursePermissionListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation) {
    this.jro_1 = this$0;
    this.kro_1 = $coursePermission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).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.jro_1.epc().t7l().tc1(this.kro_1.odc_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this.jro_1, this.kro_1, completion);
    i.lro_1 = $this$launch;
    return i;
  };
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this$0, $coursePermission, resultContinuation) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CoursePermissionListUiState(), 'CoursePermissionList');
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.yrm_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.zrm_1 = CoursePermissionListViewModel$pagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.<anonymous>' call
        var tmp3_title = this.ipc().rnd(strings_getInstance().lm1_1);
        var tmp0_text = this.ipc().rnd(strings_getInstance().lm1_1);
        var tmp1_icon = FabIcon_ADD_getInstance();
        var tmp2_onClick = CoursePermissionListViewModel$onClickAdd$ref(this);
        var tmp4_fabState = new FabUiState(false, tmp0_text, tmp1_icon, tmp2_onClick);
        var nextValue = prevValue.mov(tmp4_fabState, VOID, tmp3_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, CoursePermissionListViewModel$slambda_0(this, null));
  }
  protoOf(CoursePermissionListViewModel).zpk = function (searchText) {
  };
  protoOf(CoursePermissionListViewModel).apl = function () {
    Companion_getInstance_110();
    var tmp = to('clazzUid', this.yrm_1.toString());
    Companion_getInstance_110();
    var goToOnPersonSelectedArg = appendQueryArgs('CoursePermissionEdit', mapOf([tmp, to('popUpToOnFinish', this.lpb_1)]));
    Companion_getInstance_190();
    var tmp_0 = Companion_getInstance_5().s4x();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickAdd.<anonymous>' call
    Companion_getInstance_110();
    this_0.s('listMode', ListViewMode_PICKER_getInstance().np8_1);
    this_0.s('goToOnPersonSelected', goToOnPersonSelectedArg);
    var tmp$ret$2 = this_0.f3();
    this.qpc('People', 'permissionResult', null, tmp_0, tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).mro = function (coursePermission) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickEntry.<anonymous>' call
    Companion_getInstance_120();
    this_0.s('entityUid', coursePermission.odc_1.toString());
    Companion_getInstance_120();
    this.vpc(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    this.mpb_1.fo0('CoursePermissionDetail', tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).nro = function (coursePermission) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this, coursePermission, null));
  };
  function CoursePermissionListUiState$_init_$lambda_czupre() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    var tmp;
    if (permissionsList === VOID) {
      tmp = CoursePermissionListUiState$_init_$lambda_czupre;
    } else {
      tmp = permissionsList;
    }
    permissionsList = tmp;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? false : showDeleteOption;
    this.arn_1 = permissionsList;
    this.brn_1 = permissionLabels;
    this.crn_1 = courseTerminology;
    this.drn_1 = showDeleteOption;
  }
  protoOf(CoursePermissionListUiState).oro = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    return new CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).ern = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption, $super) {
    permissionsList = permissionsList === VOID ? this.arn_1 : permissionsList;
    permissionLabels = permissionLabels === VOID ? this.brn_1 : permissionLabels;
    courseTerminology = courseTerminology === VOID ? this.crn_1 : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? this.drn_1 : showDeleteOption;
    return $super === VOID ? this.oro(permissionsList, permissionLabels, courseTerminology, showDeleteOption) : $super.oro.call(this, permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).toString = function () {
    return 'CoursePermissionListUiState(permissionsList=' + this.arn_1 + ', permissionLabels=' + this.brn_1 + ', courseTerminology=' + this.crn_1 + ', showDeleteOption=' + this.drn_1 + ')';
  };
  protoOf(CoursePermissionListUiState).hashCode = function () {
    var result = hashCode(this.arn_1);
    result = imul(result, 31) + hashCode(this.brn_1) | 0;
    result = imul(result, 31) + (this.crn_1 == null ? 0 : hashCode(this.crn_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.drn_1) | 0;
    return result;
  };
  protoOf(CoursePermissionListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionListUiState ? other : THROW_CCE();
    if (!equals(this.arn_1, tmp0_other_with_cast.arn_1))
      return false;
    if (!equals(this.brn_1, tmp0_other_with_cast.brn_1))
      return false;
    if (!equals(this.crn_1, tmp0_other_with_cast.crn_1))
      return false;
    if (!(this.drn_1 === tmp0_other_with_cast.drn_1))
      return false;
    return true;
  };
  function avatarName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.m81_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.n81_1;
    } else {
      tmp = _this__u8e3s4.m81_1.toString();
    }
    return tmp;
  }
  function avatarColorName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.m81_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.n81_1;
    } else {
      tmp = _this__u8e3s4.m81_1.rc(16).toString();
    }
    return tmp;
  }
  var TextLimitType_LIMIT_WORDS_instance;
  var TextLimitType_LIMIT_CHARS_instance;
  function values_2() {
    return [TextLimitType_LIMIT_WORDS_getInstance(), TextLimitType_LIMIT_CHARS_getInstance()];
  }
  var TextLimitType_entriesInitialized;
  function TextLimitType_initEntries() {
    if (TextLimitType_entriesInitialized)
      return Unit_instance;
    TextLimitType_entriesInitialized = true;
    var tmp = strings_getInstance().dmh_1;
    TextLimitType_LIMIT_WORDS_instance = new TextLimitType('LIMIT_WORDS', 0, tmp, 1);
    var tmp_0 = strings_getInstance().emh_1;
    TextLimitType_LIMIT_CHARS_instance = new TextLimitType('LIMIT_CHARS', 1, tmp_0, 2);
  }
  var MarkingType_TEACHER_instance;
  var MarkingType_PEERS_instance;
  function Companion_119() {
  }
  protoOf(Companion_119).fjf = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var indexedObject = values_3();
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var element = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.Companion.valueOf.<anonymous>' call
        if (element.rro_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? first_1(values_3()) : tmp0_elvis_lhs;
  };
  var Companion_instance_167;
  function Companion_getInstance_137() {
    return Companion_instance_167;
  }
  function values_3() {
    return [MarkingType_TEACHER_getInstance(), MarkingType_PEERS_getInstance()];
  }
  function get_entries_1() {
    if ($ENTRIES_1 == null)
      $ENTRIES_1 = enumEntries(values_3());
    return $ENTRIES_1;
  }
  var MarkingType_entriesInitialized;
  function MarkingType_initEntries() {
    if (MarkingType_entriesInitialized)
      return Unit_instance;
    MarkingType_entriesInitialized = true;
    MarkingType_TEACHER_instance = new MarkingType('TEACHER', 0, 1);
    MarkingType_PEERS_instance = new MarkingType('PEERS', 1, 2);
  }
  var $ENTRIES_1;
  function TextLimitType(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.uro_1 = stringResource;
    this.vro_1 = value;
  }
  function MarkingType(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.rro_1 = value;
  }
  function TextLimitType_LIMIT_WORDS_getInstance() {
    TextLimitType_initEntries();
    return TextLimitType_LIMIT_WORDS_instance;
  }
  function TextLimitType_LIMIT_CHARS_getInstance() {
    TextLimitType_initEntries();
    return TextLimitType_LIMIT_CHARS_instance;
  }
  function MarkingType_TEACHER_getInstance() {
    MarkingType_initEntries();
    return MarkingType_TEACHER_instance;
  }
  function MarkingType_PEERS_getInstance() {
    MarkingType_initEntries();
    return MarkingType_PEERS_instance;
  }
  function ClazzAssignmentViewModelConstants() {
    ClazzAssignmentViewModelConstants_instance = this;
    var tmp = this;
    Companion_getInstance_1();
    var tmp_0 = to(1, strings_getInstance().pm6_1);
    Companion_getInstance_1();
    var tmp_1 = to(2, strings_getInstance().om6_1);
    Companion_getInstance_1();
    tmp.wro_1 = mapOf([tmp_0, tmp_1, to(0, strings_getInstance().qm6_1)]);
  }
  var ClazzAssignmentViewModelConstants_instance;
  function ClazzAssignmentViewModelConstants_getInstance() {
    if (ClazzAssignmentViewModelConstants_instance == null)
      new ClazzAssignmentViewModelConstants();
    return ClazzAssignmentViewModelConstants_instance;
  }
  function get_isFromSubmitterGroup(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4.wa5_1.c7(new Long(0, 0)) > 0) {
      var tmp_0 = _this__u8e3s4.wa5_1;
      Companion_getInstance_1();
      tmp = tmp_0.c7(toLong(10000)) < 0;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function asBlobOpenItem(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.uc2_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.sc2_1;
    var tmp_0 = tmp1_elvis_lhs == null ? 'application/octet-stream' : tmp1_elvis_lhs;
    var tmp2_elvis_lhs = _this__u8e3s4.tc2_1;
    return new OpenBlobItem(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, toLong(_this__u8e3s4.vc2_1));
  }
  function submissionStatusFor(markList, submissionList) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!markList.c1()) {
      Companion_getInstance_1();
      tmp = 2;
    } else {
      // Inline function 'kotlin.collections.isNotEmpty' call
      if (!submissionList.c1()) {
        Companion_getInstance_1();
        tmp = 1;
      } else {
        Companion_getInstance_1();
        tmp = 0;
      }
    }
    return tmp;
  }
  function latestUniqueMarksByMarker(_this__u8e3s4) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>' call
      // Inline function 'kotlin.collections.maxOf' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = _this__u8e3s4.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element_0.gbo_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xbn_1;
        var tmp1_safe_receiver = element.gbo_1;
        if (equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xbn_1)) {
          destination_0.i1(element_0);
        }
      }
      var iterator = destination_0.w();
      if (!iterator.f())
        throw NoSuchElementException_init_$Create$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = iterator.e().gbo_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.dbo_1;
      var maxValue = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
      while (iterator.f()) {
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver_1 = iterator.e().gbo_1;
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.dbo_1;
        var v = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        if (compareTo(maxValue, v) < 0) {
          maxValue = v;
        }
      }
      var mostRecentTsForSubmitterUid = maxValue;
      var tmp0_safe_receiver_2 = element.gbo_1;
      if (equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.dbo_1, mostRecentTsForSubmitterUid)) {
        destination.i1(element);
      }
    }
    return destination;
  }
  function hasUpdatedMarks(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      // Inline function 'kotlin.collections.groupingBy' call
      var tmp$ret$0 = new _no_name_provided__qut3iv_6(_this__u8e3s4);
      var this_0 = eachCount(tmp$ret$0);
      if (this_0.c1()) {
        tmp$ret$1 = false;
        break $l$block_0;
      }
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = this_0.q2().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
        if (element.t2() > 1) {
          tmp$ret$1 = true;
          break $l$block_0;
        }
      }
      tmp$ret$1 = false;
    }
    return tmp$ret$1;
  }
  function averageMark(_this__u8e3s4) {
    var latestUnique = latestUniqueMarksByMarker(_this__u8e3s4);
    if (latestUnique.c1())
      return null;
    // Inline function 'kotlin.apply' call
    var this_0 = new AverageCourseAssignmentMark();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>' call
    var tmp = this_0;
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUnique.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      var tmp_0 = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.gbo_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.abo_1;
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp_0 + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    tmp.wjf_1 = sum / latestUnique.u();
    var tmp_1 = this_0;
    // Inline function 'kotlin.collections.sumOf' call
    var sum_0 = 0.0;
    var tmp0_iterator_0 = latestUnique.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      var tmp_2 = sum_0;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = element_0.gbo_1;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.cbo_1;
      var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0;
      sum_0 = tmp_2 + (tmp2_elvis_lhs_0 == null ? 0.0 : tmp2_elvis_lhs_0);
    }
    var tmp$ret$3 = sum_0;
    tmp_1.xjf_1 = roundToInt(tmp$ret$3 / latestUnique.u());
    return this_0;
  }
  function _no_name_provided__qut3iv_6($this) {
    this.xro_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_6).o = function () {
    return this.xro_1.w();
  };
  protoOf(_no_name_provided__qut3iv_6).yro = function (element) {
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
    var tmp0_safe_receiver = element.gbo_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xbn_1;
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  };
  protoOf(_no_name_provided__qut3iv_6).p = function (element) {
    return this.yro(element instanceof CourseAssignmentMarkAndMarkerName ? element : THROW_CCE());
  };
  function combineWithSubmissionFiles(_this__u8e3s4, submissionFiles) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = submissionFiles.w();
      while (tmp0_iterator_0.f()) {
        var element = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.lc3_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oc2_1, item.zbt_1)) {
          destination_0.i1(element);
        }
      }
      var tmp$ret$3 = new SubmissionAndFiles(item, destination_0);
      destination.i1(tmp$ret$3);
    }
    return destination;
  }
  function UstadAssignmentSubmissionHeaderUiState(block, assignmentMark, assignmentStatus) {
    block = block === VOID ? null : block;
    assignmentMark = assignmentMark === VOID ? null : assignmentMark;
    assignmentStatus = assignmentStatus === VOID ? null : assignmentStatus;
    this.zro_1 = block;
    this.arp_1 = assignmentMark;
    this.brp_1 = assignmentStatus;
  }
  protoOf(UstadAssignmentSubmissionHeaderUiState).toString = function () {
    return 'UstadAssignmentSubmissionHeaderUiState(block=' + this.zro_1 + ', assignmentMark=' + this.arp_1 + ', assignmentStatus=' + this.brp_1 + ')';
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).hashCode = function () {
    var result = this.zro_1 == null ? 0 : this.zro_1.hashCode();
    result = imul(result, 31) + (this.arp_1 == null ? 0 : this.arp_1.hashCode()) | 0;
    result = imul(result, 31) + (this.brp_1 == null ? 0 : this.brp_1) | 0;
    return result;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadAssignmentSubmissionHeaderUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadAssignmentSubmissionHeaderUiState ? other : THROW_CCE();
    if (!equals(this.zro_1, tmp0_other_with_cast.zro_1))
      return false;
    if (!equals(this.arp_1, tmp0_other_with_cast.arp_1))
      return false;
    if (!(this.brp_1 == tmp0_other_with_cast.brp_1))
      return false;
    return true;
  };
  function UstadCourseAssignmentMarkListItemUiState(mark, localDateTimeNow, dayOfWeekStrings) {
    mark = mark === VOID ? new CourseAssignmentMarkAndMarkerName() : mark;
    this.crp_1 = mark;
    this.drp_1 = localDateTimeNow;
    this.erp_1 = dayOfWeekStrings;
  }
  protoOf(UstadCourseAssignmentMarkListItemUiState).frp = function () {
    var tmp0_safe_receiver = this.crp_1.gbo_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xbn_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      Companion_getInstance_2();
      tmp = new Long(-1, 2147483647);
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var markerSubmitterUid = tmp;
    var tmp_0;
    Companion_getInstance_1();
    if (markerSubmitterUid.c7(toLong(10000)) < 0) {
      tmp_0 = markerSubmitterUid.mb();
    } else {
      tmp_0 = 0;
    }
    return tmp_0;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).grp = function () {
    var tmp0_elvis_lhs = this.crp_1.hbo_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = this.crp_1.ibo_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).hrp = function () {
    return !(this.frp() === 0);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).irp = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.crp_1.gbo_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.UstadCourseAssignmentMarkListItemUiState.<get-camPenaltyVisible>.<anonymous>' call
    var it = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cbo_1;
    return !(it == null) ? !(it === 0.0) : false;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).toString = function () {
    return 'UstadCourseAssignmentMarkListItemUiState(mark=' + this.crp_1 + ', localDateTimeNow=' + this.drp_1 + ', dayOfWeekStrings=' + this.erp_1 + ')';
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).hashCode = function () {
    var result = this.crp_1.hashCode();
    result = imul(result, 31) + this.drp_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.erp_1) | 0;
    return result;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadCourseAssignmentMarkListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadCourseAssignmentMarkListItemUiState ? other : THROW_CCE();
    if (!this.crp_1.equals(tmp0_other_with_cast.crp_1))
      return false;
    if (!this.drp_1.equals(tmp0_other_with_cast.drp_1))
      return false;
    if (!equals(this.erp_1, tmp0_other_with_cast.erp_1))
      return false;
    return true;
  };
  function Companion_120() {
    this.jrp_1 = 'CourseAssignment';
  }
  var Companion_instance_168;
  function Companion_getInstance_138() {
    return Companion_instance_168;
  }
  function ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation) {
    this.srp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailViewModel$slambda).vrp = function (clazzAssignment, permissionPair, $completion) {
    var tmp = this.wrp(clazzAssignment, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAssignment) ? p1 : THROW_CCE();
    return this.vrp(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.urp_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasLearnerRecordPermission = tmp0_container.z6();
          var tmp_0;
          if (hasCourseViewPermission) {
            var tmp_1;
            var tmp1_safe_receiver = this.trp_1;
            var tmp_2 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v7z_1;
            if (tmp_2 === 2) {
              tmp_1 = true;
            } else {
              tmp_1 = hasLearnerRecordPermission;
            }
            var hasSubmissionsTab = tmp_1;
            Companion_getInstance_120();
            var tmp_3 = to('entityUid', this.srp_1.epb_1.toString());
            Companion_getInstance_120();
            var tabArgs = mapOf([tmp_3, to('clazzUid', this.srp_1.urq_1.toString())]);
            var tabs = mutableListOf([new TabItem('CourseAssignmentDetailOverviewView', tabArgs, this.srp_1.ipc().rnd(strings_getInstance().xm5_1))]);
            if (hasSubmissionsTab) {
              var tmp_4;
              var tmp_5;
              if (!hasLearnerRecordPermission) {
                var tmp2_safe_receiver = this.trp_1;
                var tmp_6 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.v7z_1;
                tmp_5 = tmp_6 === 2;
              } else {
                tmp_5 = false;
              }
              if (tmp_5) {
                tmp_4 = this.srp_1.ipc().rnd(strings_getInstance().tmg_1);
              } else {
                tmp_4 = this.srp_1.ipc().rnd(strings_getInstance().imh_1);
              }
              var tabName = tmp_4;
              tabs.i1(new TabItem('CourseAssignmentSubmissionsTab', tabArgs, tabName));
            }
            tmp_0 = new ClazzAssignmentDetailUiState(toList(tabs));
          } else {
            tmp_0 = new ClazzAssignmentDetailUiState(emptyList());
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).wrp = function (clazzAssignment, permissionPair, completion) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this.srp_1, completion);
    i.trp_1 = clazzAssignment;
    i.urp_1 = permissionPair;
    return i;
  };
  function ClazzAssignmentDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation);
    var l = function (clazzAssignment, permissionPair, $completion) {
      return i.vrp(clazzAssignment, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.urq_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var assignmentFlow = this.epc().v7k().k7y(this.epb_1, this.urq_1);
    var tmp_0 = this.epc().t7l();
    var tmp_1 = this.apc().in5().zk0_1;
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = distinctUntilChanged(tmp_0.vdb(tmp_1, this.urq_1, tmp_2, new Long(128, 0)));
    var tmp_3 = this;
    tmp_3.trq_1 = combine(assignmentFlow, permissionFlow, ClazzAssignmentDetailViewModel$slambda_0(this, null));
  }
  function ClazzAssignmentDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.vrq_1 = tabs;
  }
  protoOf(ClazzAssignmentDetailUiState).toString = function () {
    return 'ClazzAssignmentDetailUiState(tabs=' + this.vrq_1 + ')';
  };
  protoOf(ClazzAssignmentDetailUiState).hashCode = function () {
    return hashCode(this.vrq_1);
  };
  protoOf(ClazzAssignmentDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailUiState ? other : THROW_CCE();
    if (!equals(this.vrq_1, tmp0_other_with_cast.vrq_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.err_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).grr = function (it, $completion) {
    var tmp = this.hrr(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.grr((p1 == null ? true : p1 instanceof AssignmentProgressSummary) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.err_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nrr(this.frr_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).hrr = function (it, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this.err_1, completion);
    i.frr_1 = it;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.grr(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wrr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).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;
            var tmp_0 = this.wrr_1.epc().v7k().f7y(this.wrr_1.yrs_1, this.wrr_1.zrs_1, this.wrr_1.cpc(), this.wrr_1.ipc().rnd(strings_getInstance().dmg_1));
            var tmp_1 = ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this.wrr_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_14(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this.wrr_1, completion);
    i.xrr_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation) {
    this.jrt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).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.jrt_1.epc().v7j().udy(this.jrt_1.yrs_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.jrt_1.fpk_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nrr(VOID, VOID, VOID, VOID, terminology);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this.jrt_1, completion);
    i.krt_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation) {
    this.trt_1 = $this_launch;
    this.urt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.trt_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this.urt_1, null));
          launchSetTitleFromClazzUid(this.urt_1, this.urt_1.zrs_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this.urt_1));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1(this.trt_1, this.urt_1, completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2($this_launch, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_121() {
    this.vrt_1 = 'CourseAssignmentSubmissionsTab';
  }
  var Companion_instance_169;
  function Companion_getInstance_139() {
    return Companion_instance_169;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_14(function_0) {
    this.wrt_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_14).t1d = function (value, $completion) {
    return this.wrt_1(value, $completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().v7k().g7y(this$0.yrs_1, this$0.zrs_1, this$0.cpc(), this$0.ipc().rnd(strings_getInstance().dmg_1), toQueryLikeParam(this$0.opb_1.t2().eov_1.tou_1), this$0.fpk_1.t2().lrr_1.kp1_1);
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation) {
    this.fru_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            launch(this.gru_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this.fru_1, null));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.fru_1.fpk_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2(this.gru_1, this.fru_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this.fru_1, completion);
    i.gru_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel(di, savedStateHandle) {
    var tmp = new ClazzAssignmentDetailSubmissionsTabUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'CourseAssignment');
    var tmp_0 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.yrs_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_2;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No ClazzUid provided');
    } else {
      tmp_2 = tmp1_elvis_lhs_0;
    }
    tmp_1.zrs_1 = tmp_2;
    var tmp_3 = this;
    tmp_3.art_1 = ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue = prevValue.nrr(VOID, this.art_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.opl());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_4 = this.bpc();
    launch(tmp_4, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this, null));
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).hru = function (assignmentSubmitter) {
    var tmp = to('assignmentUid', this.yrs_1.toString());
    var tmp_0 = to('submitterUid', assignmentSubmitter.m81_1.toString());
    Companion_getInstance_120();
    this.mpb_1.fo0('CourseAssignmentSubmitter', mapOf([tmp, tmp_0, to('clazzUid', this.zrs_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).iru = function (sortOrderOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.onChangeSortOption.<anonymous>' call
        var nextValue = prevValue.nrr(VOID, VOID, VOID, sortOrderOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).zpk = function (searchText) {
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).apl = function () {
  };
  function Companion_122() {
    Companion_instance_170 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().zlk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 5, true);
    var tmp_2 = strings_getInstance().zlk_1;
    tmp.jru_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 6, false)]);
  }
  var Companion_instance_170;
  function Companion_getInstance_140() {
    if (Companion_instance_170 == null)
      new Companion_122();
    return Companion_instance_170;
  }
  function ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    Companion_getInstance_140();
    progressSummary = progressSummary === VOID ? null : progressSummary;
    var tmp;
    if (assignmentSubmitterList === VOID) {
      tmp = ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q;
    } else {
      tmp = assignmentSubmitterList;
    }
    assignmentSubmitterList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_140().jru_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    this.irr_1 = progressSummary;
    this.jrr_1 = assignmentSubmitterList;
    this.krr_1 = sortOptions;
    this.lrr_1 = sortOption;
    this.mrr_1 = courseTerminology;
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).kru = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    return new ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).nrr = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology, $super) {
    progressSummary = progressSummary === VOID ? this.irr_1 : progressSummary;
    assignmentSubmitterList = assignmentSubmitterList === VOID ? this.jrr_1 : assignmentSubmitterList;
    sortOptions = sortOptions === VOID ? this.krr_1 : sortOptions;
    sortOption = sortOption === VOID ? this.lrr_1 : sortOption;
    courseTerminology = courseTerminology === VOID ? this.mrr_1 : courseTerminology;
    return $super === VOID ? this.kru(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) : $super.kru.call(this, progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).toString = function () {
    return 'ClazzAssignmentDetailSubmissionsTabUiState(progressSummary=' + this.irr_1 + ', assignmentSubmitterList=' + this.jrr_1 + ', sortOptions=' + this.krr_1 + ', sortOption=' + this.lrr_1 + ', courseTerminology=' + this.mrr_1 + ')';
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).hashCode = function () {
    var result = this.irr_1 == null ? 0 : hashCode(this.irr_1);
    result = imul(result, 31) + hashCode(this.jrr_1) | 0;
    result = imul(result, 31) + hashCode(this.krr_1) | 0;
    result = imul(result, 31) + this.lrr_1.hashCode() | 0;
    result = imul(result, 31) + (this.mrr_1 == null ? 0 : hashCode(this.mrr_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailSubmissionsTabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailSubmissionsTabUiState ? other : THROW_CCE();
    if (!equals(this.irr_1, tmp0_other_with_cast.irr_1))
      return false;
    if (!equals(this.jrr_1, tmp0_other_with_cast.jrr_1))
      return false;
    if (!equals(this.krr_1, tmp0_other_with_cast.krr_1))
      return false;
    if (!this.lrr_1.equals(tmp0_other_with_cast.lrr_1))
      return false;
    if (!equals(this.mrr_1, tmp0_other_with_cast.mrr_1))
      return false;
    return true;
  };
  function _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(person) {
    return person;
  }
  function _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this) {
    return $this;
  }
  function _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0($this) {
    var tmp = _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this).q81_1;
    Companion_getInstance_1();
    return !(tmp === 0);
  }
  function _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0($this) {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this).p81_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  }
  function AssignmentSubmitterSummaryUiState__toString_impl_fdil8u($this) {
    return 'AssignmentSubmitterSummaryUiState(person=' + $this + ')';
  }
  function AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1($this) {
    return $this.hashCode();
  }
  function AssignmentSubmitterSummaryUiState__equals_impl_zhk063($this, other) {
    if (!(other instanceof AssignmentSubmitterSummaryUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AssignmentSubmitterSummaryUiState ? other.lru_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function AssignmentSubmitterSummaryUiState(person) {
    this.lru_1 = person;
  }
  protoOf(AssignmentSubmitterSummaryUiState).toString = function () {
    return AssignmentSubmitterSummaryUiState__toString_impl_fdil8u(this.lru_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).hashCode = function () {
    return AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1(this.lru_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).equals = function (other) {
    return AssignmentSubmitterSummaryUiState__equals_impl_zhk063(this.lru_1, other);
  };
  function get_listItemUiState(_this__u8e3s4) {
    return _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(_this__u8e3s4);
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.uru_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).ioz = function (it, $completion) {
    var tmp = this.joz(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.vru_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubmissionHtml = tmp_1;
          this.uru_1.nrw(newSubmissionHtml);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).joz = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this.uru_1, completion);
    i.vru_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ioz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wrw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).yrw = function (assignmentData, $completion) {
    var tmp = this.zrw(assignmentData, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.yrw((p1 == null ? true : p1 instanceof ClazzAssignmentCourseBlockAndSubmitterUid) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.wrw_1.trv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.xrw_1;
              var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p84_1;
              Companion_getInstance_1();
              var isEnrolledButNotInGroup = equals(tmp_0, new Long(-1, -1));
              var tmp1_safe_receiver = this.xrw_1;
              var tmp9_assignment = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l84_1;
              var tmp2_safe_receiver = this.xrw_1;
              var tmp10_courseBlock = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.m84_1;
              var tmp3_safe_receiver = this.xrw_1;
              var tmp11_courseBlockPicture = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.n84_1;
              var tmp5_safe_receiver = this.xrw_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.p84_1;
              var tmp12_submitterUid = tmp6_elvis_lhs == null ? new Long(0, 0) : tmp6_elvis_lhs;
              var tmp4_safe_receiver = this.xrw_1;
              var tmp13_courseGroupSet = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.o84_1;
              var tmp_1;
              if (isEnrolledButNotInGroup) {
                tmp_1 = this.wrw_1.ipc().rnd(strings_getInstance().smk_1);
              } else {
                tmp_1 = null;
              }
              var tmp14_unassignedError = tmp_1;
              var tmp7_safe_receiver = this.xrw_1;
              var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.q84_1;
              var tmp15_showModerateOptions = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
              var nextValue = prevValue.bry(tmp9_assignment, tmp10_courseBlock, tmp11_courseBlockPicture, tmp13_courseGroupSet, tmp12_submitterUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp14_unassignedError, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp15_showModerateOptions);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).zrw = function (assignmentData, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.wrw_1, completion);
    i.xrw_1 = assignmentData;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (assignmentData, $completion) {
      return i.yrw(assignmentData, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).mry = function (submissions, submissionFiles, $completion) {
    var tmp = this.nry(submissions, submissionFiles, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.mry(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return combineWithSubmissionFiles(this.kry_1, this.lry_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).nry = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.kry_1 = submissions;
    i.lry_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.mry(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.wry_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).yry = function (it, $completion) {
    var tmp = this.zry(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.yry((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.wry_1.trv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.xry_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).zry = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.wry_1, completion);
    i.xry_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.yry(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.irz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).krz = function (it, $completion) {
    var tmp = this.lrz(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.krz((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.irz_1.trv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.jrz_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).lrz = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.irz_1, completion);
    i.jrz_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.krz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.urz_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).yrz = function (value, $completion) {
    var tmp = this.zrz(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.yrz(p1 instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.wrz_1 = this.urz_1;
            var tmp_1 = this;
            tmp_1.xrz_1 = this.vrz_1;
            this.hd_1 = 1;
            var tmp0_safe_receiver = this.xrz_1.as0_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zbt_1;
            suspendResult = this.wrz_1.t1d(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).zrz = function (value, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.urz_1, completion);
    i.vrz_1 = value;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.yrz(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$61(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.js0_1 = _this__u8e3s4;
    this.ks0_1 = collector;
  }
  protoOf($collectCOROUTINE$61).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ls0_1 = this.ks0_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.ls0_1, null);
            suspendResult = this.js0_1.ms0_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.vs0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).xs0 = function (it, $completion) {
    var tmp = this.ys0(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.xs0((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.vs0_1.trv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, this.ws0_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ys0 = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.vs0_1, completion);
    i.ws0_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.xs0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_7($this) {
    this.ms0_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_7).zs0 = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$61(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_7).z1b = function (collector, $completion) {
    return this.zs0(collector, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.is1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ks1 = function (submissionUid, $completion) {
    var tmp = this.ls1(submissionUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.ks1(p1 instanceof Long ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).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;
            var tmp_0 = distinctUntilChanged(this.is1_1.dpc().x7k().pc1(this.js1_1));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.is1_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ls1 = function (submissionUid, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.is1_1, completion);
    i.js1_1 = submissionUid;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (submissionUid, $completion) {
      return i.ks1(submissionUid, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation) {
    this.us1_1 = $entityFlow;
    this.vs1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.vs1_1, null);
            suspendResult = this.us1_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1(this.us1_1, this.vs1_1, completion);
    i.ws1_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2($entityFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.fs2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hs2_1 = this.fs2_1.epc().w7k().kbt(this.fs2_1.cpc(), this.fs2_1.epb_1);
            this.is2_1 = this.fs2_1.epc().x7k().qc1(this.fs2_1.cpc(), this.fs2_1.epb_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.hs2_1, this.is2_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.fs2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this.fs2_1, completion);
    i.gs2_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.rs2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).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;
            var tmp_0 = this.rs2_1.epc().y7k().ebn(this.rs2_1.cpc(), this.rs2_1.epb_1);
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.rs2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this.rs2_1, completion);
    i.ss2_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.bs3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).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;
            var this_0 = this.bs3_1.vrv_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_7(this_0));
            suspendResult = collectLatest(tmp_0, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.bs3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this.bs3_1, completion);
    i.cs3_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ls3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).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;
            var tmp_0 = this.ls3_1.mpc(this.ls3_1.fpc(), 'submissionHtml');
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this.ls3_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this.ls3_1, completion);
    i.ms3_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation) {
    this.vs3_1 = $this_launch;
    this.ws3_1 = this$0;
    this.xs3_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.vs3_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2(this.xs3_1, this.ws3_1, null));
          launchSetTitleFromClazzUid(this.ws3_1, this.ws3_1.erw_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this.ws3_1));
          launch(this.vs3_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this.ws3_1, null));
          launch(this.vs3_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this.ws3_1, null));
          launch(this.vs3_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this.ws3_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1(this.vs3_1, this.ws3_1, this.xs3_1, completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2($this_launch, this$0, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation) {
    this.gs4_1 = this$0;
    this.hs4_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).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;
            var tmp_0 = this.gs4_1.epc().x7k();
            var tmp0_safe_receiver = this.hs4_1.lc3_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nc2_1;
            suspendResult = tmp_0.tc1(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).tmw = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this.gs4_1, this.hs4_1, completion);
    i.is4_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.trv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_saveAndUploadUseCase__bjy5rj($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.frw_1;
    saveAndUploadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelTransferJobUseCase__o6e2y4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.grw_1;
    cancelTransferJobUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hrw_1;
    openBlobUiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_ustadAccountManager__el9prc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jrw_1;
    ustadAccountManager$factory_0();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.krw_1;
    showSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lrw_1;
    dismissSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mrw_1;
    openExternalLinkUseCase$factory_0();
    return this_0.t2();
  }
  function newCourseAssignmentSubmission($this) {
    var tmp = get_doorPrimaryKeyManager($this.dpc());
    Companion_getInstance_1();
    var tmp0_casUid = tmp.s68(522);
    var tmp1_casAssignmentUid = $this.epb_1;
    var tmp2_casClazzUid = $this.erw_1;
    var tmp3_casSubmitterPersonUid = $this.apc().rn4().xmr_1.x9b_1;
    return new CourseAssignmentSubmission(tmp0_casUid, tmp1_casAssignmentUid, VOID, tmp3_casSubmitterPersonUid, '', VOID, VOID, tmp2_casClazzUid);
  }
  function openSubmissionFileAsBlob($this, file, intent) {
    var tmp0_elvis_lhs = file.lc3_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.irw_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.bpc();
    tmp_0.irw_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_123() {
    this.js4_1 = 'latestSubmission';
    this.ks4_1 = 'submissionHtml';
    this.ls4_1 = 'CourseAssignmentDetailOverviewView';
  }
  var Companion_instance_171;
  function Companion_getInstance_141() {
    return Companion_instance_171;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_15(function_0) {
    this.ms4_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_15).t1d = function (value, $completion) {
    return this.ms4_1(value, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().z7k().za4(this$0.cpc(), this$0.epb_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().z7k().ba5(this$0.epb_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    this.vs4_1 = this$0;
    this.ws4_1 = $savedStateHandle;
    this.xs4_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.vs4_1.npc(this.ws4_1, 'latestSubmission', Companion_getInstance_1().s4x(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zs4_1 = suspendResult;
            this.as5_1 = this.zs4_1 == null ? newCourseAssignmentSubmission(this.vs4_1) : this.zs4_1;
            l$ret$1: do {
              var this_0 = this.vs4_1.vrv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.bs5(this.as5_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.ys4_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this.vs4_1, null));
            this.hd_1 = 2;
            suspendResult = whenSubscribed(this.vs4_1.trv_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2(this.ys4_1, this.vs4_1, this.xs4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this.vs4_1, this.ws4_1, this.xs4_1, completion);
    i.ys4_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this$0, resultContinuation) {
    this.ks5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          _get_dismissSocialWarningUseCase__st8mv5(this.ks5_1).knv(toString_0(_get_ustadAccountManager__el9prc(this.ks5_1).rn4().xmr_1.y9b_1));
          l$ret$1: do {
            var this_0 = this.ks5_1.trv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this.ks5_1, completion);
    i.ls5_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda($text) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.dbu_1 = $text;
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation) {
    this.us5_1 = $submissionToSave;
    this.vs5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.us5_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.vs5_1.opc(this.vs5_1.kpb_1, 'latestSubmission', Companion_getInstance_1().s4x(), this.us5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda(this.us5_1, this.vs5_1, completion);
    i.ws5_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0($submissionToSave, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation) {
    this.fs6_1 = this$0;
    this.gs6_1 = $submitterUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.fs6_1.epc().z7k();
            var this_0 = new Comments();
            this_0.va5_1 = this.gs6_1;
            this_0.ua5_1 = this.fs6_1.cpc();
            this_0.wa5_1 = this.fs6_1.trv_1.t2().erx_1;
            this_0.sa5_1 = this.fs6_1.epb_1;
            this_0.ra5_1 = this.fs6_1.xrv_1.t2();
            this_0.za5_1 = systemTimeInMillis();
            suspendResult = tmp_0.xa4(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.fs6_1.xrv_1.x1k('');
            tmp_1.is6_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.fs6_1.kpc(Companion_getInstance_93().uov_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.fs6_1.kpc(Companion_getInstance_93().uov_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this.fs6_1, this.gs6_1, completion);
    i.hs6_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this$0, $submitterUid, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation) {
    this.rs6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.rs6_1.epc().z7k();
            var this_0 = new Comments();
            this_0.va5_1 = new Long(0, 0);
            this_0.ua5_1 = this.rs6_1.cpc();
            this_0.sa5_1 = this.rs6_1.epb_1;
            this_0.ra5_1 = this.rs6_1.zrv_1.t2();
            this_0.za5_1 = systemTimeInMillis();
            suspendResult = tmp_0.xa4(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.rs6_1.zrv_1.x1k('');
            tmp_1.ts6_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.rs6_1.kpc(Companion_getInstance_93().uov_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.rs6_1.kpc(Companion_getInstance_93().uov_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this.rs6_1, completion);
    i.ss6_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    this.cs7_1 = this$0;
    this.ds7_1 = $size;
    this.es7_1 = $mimeType;
    this.fs7_1 = $fileName;
    this.gs7_1 = $uri;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).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;
            var tmp_0 = get_doorPrimaryKeyManager(this.cs7_1.dpc());
            suspendResult = tmp_0.t68(90, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.is7_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.cs7_1.vrv_1.t2().as0_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zbt_1;
            tmp_1.js7_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.ks7_1 = this.cs7_1.trv_1.t2().erx_1;
            this.ls7_1 = this.ds7_1.mb();
            this.ms7_1 = this.cs7_1.epb_1;
            this.ns7_1 = this.cs7_1.erw_1;
            this.os7_1 = new CourseAssignmentSubmissionFile(this.is7_1, this.js7_1, this.ks7_1, this.ms7_1, this.ns7_1, this.es7_1, this.fs7_1, this.gs7_1, this.ls7_1);
            this.hd_1 = 2;
            suspendResult = this.cs7_1.dpc().x7k().oc1(listOf_0(this.os7_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.id_1 = 4;
            this.hd_1 = 3;
            var tmp_2 = _get_saveAndUploadUseCase__bjy5rj(this.cs7_1);
            var tmp_3 = this.os7_1.nc2_1;
            suspendResult = tmp_2.pnl(listOf_0(new SaveLocalUriAsBlobItem(this.gs7_1, tmp_3, 90, this.es7_1, VOID, true)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.id_1 = 6;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 6;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().r5k('WARNING: Exception attempting to save/enqueue submission file', e);
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this.cs7_1, this.ds7_1, this.es7_1, this.fs7_1, this.gs7_1, completion);
    i.hs7_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation) {
    this.xs7_1 = this$0;
    this.ys7_1 = $submission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.id_1 = 5;
            this.hd_1 = 2;
            suspendResult = this.xs7_1.srv_1.tnd(this.xs7_1.epc(), this.xs7_1.trv_1.t2().erx_1, this.xs7_1.epb_1, this.xs7_1.apc().rn4().xmr_1.x9b_1, this.ys7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_0 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.xs7_1.vrv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.bs5(newCourseAssignmentSubmission(this.xs7_1));
                if (this_0.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_0.bs8_1 = tmp$ret$0.as0_1;
            l$ret$3: do {
              var this_1 = this.xs7_1.trv_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.bs8_1 == null)) {
              this.hd_1 = 3;
              suspendResult = this.xs7_1.opc(this.xs7_1.kpb_1, 'latestSubmission', Companion_getInstance_1().s4x(), this.bs8_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp_1 = this;
            this.xs7_1.gpc().bow(new Snack(this.xs7_1.ipc().rnd(strings_getInstance().pm6_1)));
            tmp_1.as8_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 8;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Exception) {
              var e = this.kd_1;
              var tmp_3 = this;
              Napier_getInstance().v5k('Exception submitting assignment: ' + e, e);
              l$ret$7: do {
                var this_2 = this.xs7_1.trv_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, e.message);
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              tmp_3.as8_1 = Unit_instance;
              this.id_1 = 7;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            l$ret$9: do {
              var this_3 = this.xs7_1.trv_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_3.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            this.xs7_1.kpc(Companion_getInstance_93().uov_1);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            l$ret$11: do {
              var this_4 = this.xs7_1.trv_1;
              while (true) {
                var prevValue_3 = this_4.t2();
                var nextValue_3 = prevValue_3.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_4.y1k(prevValue_3, nextValue_3)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            this.xs7_1.kpc(Companion_getInstance_93().uov_1);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 7) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this.xs7_1, this.ys7_1, completion);
    i.zs7_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this$0, $submission, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation) {
    this.ks8_1 = this$0;
    this.ls8_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            var tmp_0 = this.ks8_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this.ks8_1, this.ls8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp0_safe_receiver = this.ls8_1.mc3_1;
            tmp_1.ns8_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oc3_1;
            if (this.ns8_1 == null) {
              this.os8_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.ps8_1 = this.ns8_1;
              var tmp_3 = this;
              tmp_3.qs8_1 = this.ps8_1;
              this.rs8_1 = _get_cancelTransferJobUseCase__o6e2y4(this.ks8_1);
              if (this.rs8_1 == null) {
                this.ss8_1 = null;
                this.hd_1 = 3;
                continue $sm;
              } else {
                this.hd_1 = 2;
                suspendResult = this.rs8_1.i1i(this.qs8_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 2:
            var tmp_4 = this;
            tmp_4.ss8_1 = Unit_instance;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.os8_1 = this.ps8_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this.ks8_1, this.ls8_1, completion);
    i.ms8_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.bs9_1 = this$0;
    this.cs9_1 = $submissionFile;
    this.ds9_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.fs9_1 = _get_openBlobUiUseCase__fzusqz(this.bs9_1);
            if (this.fs9_1 == null) {
              this.gs9_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.cs9_1);
              suspendResult = this.fs9_1.tnj(tmp_0, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this.bs9_1), this.ds9_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.gs9_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this.bs9_1, this.cs9_1, this.ds9_1, completion);
    i.es9_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.ps9_1 = this$0;
    this.qs9_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).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.ps9_1.epc().z7k().ya4(this.qs9_1.qa5_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ps9_1.gpc().bow(new Snack(this.ps9_1.ipc().rnd(strings_getInstance().alk_1)));
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this.ps9_1, this.qs9_1, completion);
    i.rs9_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel(di, savedStateHandle, submitAssignmentUseCase) {
    var tmp;
    if (submitAssignmentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.i5e(tmp$ret$0, null);
      tmp = new SubmitAssignmentUseCase(tmp$ret$1);
    } else {
      tmp = submitAssignmentUseCase;
    }
    submitAssignmentUseCase = tmp;
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    this.srv_1 = submitAssignmentUseCase;
    this.trv_1 = MutableStateFlow(new ClazzAssignmentDetailOverviewUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ipc().hou()));
    this.urv_1 = asStateFlow(this.trv_1);
    this.vrv_1 = MutableStateFlow(new ClazzAssignmentDetailoverviewSubmissionUiState());
    this.wrv_1 = asStateFlow(this.vrv_1);
    this.xrv_1 = MutableStateFlow('');
    this.yrv_1 = asStateFlow(this.xrv_1);
    this.zrv_1 = MutableStateFlow('');
    this.arw_1 = asStateFlow(this.zrv_1);
    var tmp_2 = this;
    tmp_2.brw_1 = ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_3 = this;
    tmp_3.crw_1 = ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this);
    this.drw_1 = null;
    var tmp_4 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_5;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('clazzUid arg is required');
    } else {
      tmp_5 = tmp1_elvis_lhs;
    }
    tmp_4.erw_1 = tmp_5;
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.frw_1 = Instance(this_0, tmp$ret$2, null).f5j(this, saveAndUploadUseCase$factory());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(CancelBlobUploadClientUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.grw_1 = InstanceOrNull(this_1, tmp$ret$4, null).f5j(this, cancelTransferJobUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_2 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.hrw_1 = InstanceOrNull(this_2, tmp$ret$6, null).f5j(this, openBlobUiUseCase$factory());
    this.irw_1 = null;
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.jrw_1 = Instance(di, tmp$ret$8, null).f5j(this, ustadAccountManager$factory());
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_15 = typeToken(createKType(getKClass(ShowSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
    tmp_14.krw_1 = Instance(di, tmp$ret$10, null).f5j(this, showSocialWarningUseCase$factory());
    var tmp_16 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_17 = typeToken(createKType(getKClass(DismissSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    tmp_16.lrw_1 = Instance(di, tmp$ret$12, null).f5j(this, dismissSocialWarningUseCase$factory());
    var tmp_18 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    tmp_18.mrw_1 = Instance(di, tmp$ret$14, null).f5j(this, openExternalLinkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.trv_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp_20 = this.cpc();
        var tmp_21 = this.apc().rn4().xmr_1.qjt();
        var tmp0_safe_receiver_0 = this.apc().rn4().zmr_1;
        var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_20, tmp_21, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.x9c_1, VOID, VOID, VOID, VOID, VOID, VOID, _get_showSocialWarningUseCase__ft8jc6(this).io3(toString_0(_get_ustadAccountManager__el9prc(this).rn4().xmr_1.y9b_1)));
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var entityFlow = shareIn(this.epc().v7k().o7y(this.epb_1, this.erw_1, this.apc().in5().zk0_1), this.bpc(), Companion_getInstance_13().v1h());
    var tmp_22 = this.bpc();
    launch(tmp_22, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda_0(this, savedStateHandle, entityFlow, null));
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.trv_1;
      while (true) {
        var prevValue_0 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp0_privateComments = this.brw_1;
        var tmp1_courseComments = this.crw_1;
        var nextValue_0 = prevValue_0.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_courseComments, tmp0_privateComments);
        if (this_4.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel).ss9 = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ts9 = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.trv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickMarksFilterChip.<anonymous>' call
        var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.pow_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).nrw = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.vrv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onChangeSubmissionText.<anonymous>' call
        var tmp0_safe_receiver = prevValue.as0_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_0(tmp0_safe_receiver, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda(text));
        }
        var nextValue = prevValue.bs5(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var submissionToSave = tmp$ret$1.as0_1;
    var tmp0_safe_receiver_0 = this.drw_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.bpc();
    tmp_0.drw_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0(submissionToSave, this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).us9 = function (text) {
    this.xrv_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).vs9 = function () {
    var submitterUid = this.trv_1.t2().erx_1;
    if (submitterUid.c7(new Long(0, 0)) <= 0)
      return Unit_instance;
    if (this.lpc().equals(Companion_getInstance_93().tov_1))
      return Unit_instance;
    this.kpc(Companion_getInstance_93().tov_1);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this, submitterUid, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ws9 = function (text) {
    this.zrv_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).xs9 = function () {
    if (this.lpc().equals(Companion_getInstance_93().tov_1))
      return Unit_instance;
    this.kpc(Companion_getInstance_93().tov_1);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ys9 = function (uri, fileName, mimeType, size) {
    var tmp0_safe_receiver = this.trv_1.t2().arx_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s7z_1;
    var assignmentSizeLimit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (size.c7(toLong(imul(imul(assignmentSizeLimit, 1024), 1024))) > 0) {
      this.gpc().bow(new Snack(this.ipc().rnd(strings_getInstance().blu_1)));
      return Unit_instance;
    }
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this, size, mimeType, fileName, uri, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).zs9 = function () {
    if (!this.trv_1.t2().lrx_1)
      return Unit_instance;
    var tmp0_elvis_lhs = this.vrv_1.t2().as0_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submission = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.trv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickSubmit.<anonymous>' call
        var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.kpc(Companion_getInstance_93().tov_1);
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this, submission, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).asa = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.trv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.bry(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle(prevValue.xrx_1, submission.zbt_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).bsa = function () {
    Companion_getInstance_120();
    var tmp0_safe_receiver = this.trv_1.t2().drx_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v84_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    var tmp = to('entityUid', tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs);
    Companion_getInstance_120();
    this.mpb_1.fo0('CourseGroupSet', mapOf([tmp, to('clazzUid', this.erw_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).csa = function (file) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this, file, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).dsa = function (file) {
    openSubmissionFileAsBlob(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).esa = function (comments) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq($this) {
    return latestUniqueMarksByMarker($this.irx_1);
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) {
    assignment = assignment === VOID ? null : assignment;
    courseBlock = courseBlock === VOID ? null : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? null : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    submitterUid = submitterUid === VOID ? new Long(0, 0) : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? emptyList() : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? false : submissionTooLong;
    submissions = submissions === VOID ? emptyList() : submissions;
    markList = markList === VOID ? emptyList() : markList;
    var tmp;
    if (courseComments === VOID) {
      tmp = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn;
    } else {
      tmp = courseComments;
    }
    courseComments = tmp;
    var tmp_0;
    if (privateComments === VOID) {
      tmp_0 = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0;
    } else {
      tmp_0 = privateComments;
    }
    privateComments = tmp_0;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_1;
    if (selectedChipId === VOID) {
      tmp_1 = 1;
    } else {
      tmp_1 = selectedChipId;
    }
    selectedChipId = tmp_1;
    var tmp_2;
    if (gradeFilterChips === VOID) {
      var tmp_3 = strings_getInstance().lml_1;
      var tmp_4 = new MessageIdOption2(tmp_3, 1);
      var tmp_5 = strings_getInstance().zlz_1;
      tmp_2 = listOf([tmp_4, new MessageIdOption2(tmp_5, 0)]);
    } else {
      tmp_2 = gradeFilterChips;
    }
    gradeFilterChips = tmp_2;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? new UstadAssignmentSubmissionHeaderUiState() : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? null : unassignedError;
    submissionError = submissionError === VOID ? null : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? emptyMap() : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? null : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.arx_1 = assignment;
    this.brx_1 = courseBlock;
    this.crx_1 = courseBlockPicture;
    this.drx_1 = courseGroupSet;
    this.erx_1 = submitterUid;
    this.frx_1 = editableSubmissionFiles;
    this.grx_1 = submissionTooLong;
    this.hrx_1 = submissions;
    this.irx_1 = markList;
    this.jrx_1 = courseComments;
    this.krx_1 = privateComments;
    this.lrx_1 = fieldsEnabled;
    this.mrx_1 = selectedChipId;
    this.nrx_1 = gradeFilterChips;
    this.orx_1 = submissionHeaderUiState;
    this.prx_1 = unassignedError;
    this.qrx_1 = submissionError;
    this.rrx_1 = activeUserPersonUid;
    this.srx_1 = activeUserPersonName;
    this.trx_1 = activeUserPictureUri;
    this.urx_1 = courseTerminology;
    this.vrx_1 = localDateTimeNow;
    this.wrx_1 = dayOfWeekStringMap;
    this.xrx_1 = collapsedSubmissions;
    this.yrx_1 = openingFileSubmissionState;
    this.zrx_1 = showModerateOptions;
    this.ary_1 = showSocialWarning;
  }
  protoOf(ClazzAssignmentDetailOverviewUiState).fsa = function () {
    var tmp0_safe_receiver = this.brx_1;
    return isDateSet(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w83_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).gsa = function () {
    return this.hsa();
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).isa = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = this.prx_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).jsa = function () {
    var tmp0_safe_receiver = this.arx_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n7z_1) === true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ksa = function () {
    return this.erx_1.c7(new Long(0, 0)) > 0;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).lsa = function () {
    var tmp;
    if (this.ksa()) {
      var tmp0_safe_receiver = this.arx_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o7z_1) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).msa = function () {
    var timeNow = systemTimeInMillis();
    var tmp0_safe_receiver = this.brx_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w83_1;
    if (timeNow.c7(tmp1_elvis_lhs == null ? get_UNSET_DISTANT_FUTURE() : tmp1_elvis_lhs) < 0) {
      return true;
    }
    var tmp;
    var tmp2_safe_receiver = this.brx_1;
    if (isDateSet(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.y83_1)) {
      var tmp3_safe_receiver = this.brx_1;
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.y83_1;
      tmp = timeNow.c7(tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs) <= 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      return true;
    }
    return false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hsa = function () {
    if (!this.ksa())
      return false;
    if (!this.msa())
      return false;
    var tmp;
    var tmp0_safe_receiver = this.arx_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7z_1;
    if (tmp_0 === 1) {
      // Inline function 'kotlin.collections.isNotEmpty' call
      tmp = !this.hrx_1.c1();
    } else {
      tmp = false;
    }
    if (tmp) {
      return false;
    }
    return true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).nsa = function () {
    var tmp;
    var tmp_0;
    if (this.hsa()) {
      var tmp0_safe_receiver = this.arx_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q7z_1) === true;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.frx_1.u() < this.arx_1.t7z_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).osa = function () {
    return this.ksa() ? submissionStatusFor(this.irx_1, this.hrx_1) : null;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).psa = function () {
    return !(this.qsa() == null);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).rsa = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-latePenaltyVisible>.<anonymous>' call
    var it = this.qsa();
    return !(it == null) ? !(it.xjf_1 === 0) : false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ssa = function () {
    var tmp;
    var tmp0_safe_receiver = this.arx_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w7z_1) === true) {
      tmp = this.hsa();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).tsa = function () {
    var tmp;
    if (this.mrx_1 === 1) {
      tmp = _get_latestUniqueMarksByMarker__e0a3pq(this);
    } else {
      tmp = this.irx_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).qsa = function () {
    return averageMark(this.irx_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).usa = function () {
    var tmp0_safe_receiver = this.arx_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l7z_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-isGroupSubmission>.<anonymous>' call
      tmp = !tmp1_safe_receiver.equals(new Long(0, 0));
    }
    var tmp2_elvis_lhs = tmp;
    return tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).vsa = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) {
    return new ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).bry = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning, $super) {
    assignment = assignment === VOID ? this.arx_1 : assignment;
    courseBlock = courseBlock === VOID ? this.brx_1 : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? this.crx_1 : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? this.drx_1 : courseGroupSet;
    submitterUid = submitterUid === VOID ? this.erx_1 : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? this.frx_1 : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? this.grx_1 : submissionTooLong;
    submissions = submissions === VOID ? this.hrx_1 : submissions;
    markList = markList === VOID ? this.irx_1 : markList;
    courseComments = courseComments === VOID ? this.jrx_1 : courseComments;
    privateComments = privateComments === VOID ? this.krx_1 : privateComments;
    fieldsEnabled = fieldsEnabled === VOID ? this.lrx_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.mrx_1 : selectedChipId;
    gradeFilterChips = gradeFilterChips === VOID ? this.nrx_1 : gradeFilterChips;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? this.orx_1 : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? this.prx_1 : unassignedError;
    submissionError = submissionError === VOID ? this.qrx_1 : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.rrx_1 : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? this.srx_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.trx_1 : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? this.urx_1 : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? this.vrx_1 : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? this.wrx_1 : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.xrx_1 : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? this.yrx_1 : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? this.zrx_1 : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? this.ary_1 : showSocialWarning;
    return $super === VOID ? this.vsa(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning) : $super.vsa.call(this, assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, showSocialWarning);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).toString = function () {
    return 'ClazzAssignmentDetailOverviewUiState(assignment=' + this.arx_1 + ', courseBlock=' + this.brx_1 + ', courseBlockPicture=' + this.crx_1 + ', courseGroupSet=' + this.drx_1 + ', submitterUid=' + this.erx_1.toString() + ', editableSubmissionFiles=' + this.frx_1 + ', submissionTooLong=' + this.grx_1 + ', submissions=' + this.hrx_1 + ', markList=' + this.irx_1 + ', courseComments=' + this.jrx_1 + ', privateComments=' + this.krx_1 + ', fieldsEnabled=' + this.lrx_1 + ', selectedChipId=' + this.mrx_1 + ', gradeFilterChips=' + this.nrx_1 + ', submissionHeaderUiState=' + this.orx_1 + ', unassignedError=' + this.prx_1 + ', submissionError=' + this.qrx_1 + ', activeUserPersonUid=' + this.rrx_1.toString() + ', activeUserPersonName=' + this.srx_1 + ', activeUserPictureUri=' + this.trx_1 + ', courseTerminology=' + this.urx_1 + ', localDateTimeNow=' + this.vrx_1 + ', dayOfWeekStringMap=' + this.wrx_1 + ', collapsedSubmissions=' + this.xrx_1 + ', openingFileSubmissionState=' + this.yrx_1 + ', showModerateOptions=' + this.zrx_1 + ', showSocialWarning=' + this.ary_1 + ')';
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hashCode = function () {
    var result = this.arx_1 == null ? 0 : this.arx_1.hashCode();
    result = imul(result, 31) + (this.brx_1 == null ? 0 : this.brx_1.hashCode()) | 0;
    result = imul(result, 31) + (this.crx_1 == null ? 0 : this.crx_1.hashCode()) | 0;
    result = imul(result, 31) + (this.drx_1 == null ? 0 : hashCode(this.drx_1)) | 0;
    result = imul(result, 31) + this.erx_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.frx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.grx_1) | 0;
    result = imul(result, 31) + hashCode(this.hrx_1) | 0;
    result = imul(result, 31) + hashCode(this.irx_1) | 0;
    result = imul(result, 31) + hashCode(this.jrx_1) | 0;
    result = imul(result, 31) + hashCode(this.krx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lrx_1) | 0;
    result = imul(result, 31) + this.mrx_1 | 0;
    result = imul(result, 31) + hashCode(this.nrx_1) | 0;
    result = imul(result, 31) + this.orx_1.hashCode() | 0;
    result = imul(result, 31) + (this.prx_1 == null ? 0 : getStringHashCode(this.prx_1)) | 0;
    result = imul(result, 31) + (this.qrx_1 == null ? 0 : getStringHashCode(this.qrx_1)) | 0;
    result = imul(result, 31) + this.rrx_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.srx_1) | 0;
    result = imul(result, 31) + (this.trx_1 == null ? 0 : getStringHashCode(this.trx_1)) | 0;
    result = imul(result, 31) + (this.urx_1 == null ? 0 : hashCode(this.urx_1)) | 0;
    result = imul(result, 31) + this.vrx_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.wrx_1) | 0;
    result = imul(result, 31) + hashCode(this.xrx_1) | 0;
    result = imul(result, 31) + (this.yrx_1 == null ? 0 : this.yrx_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zrx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ary_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.arx_1, tmp0_other_with_cast.arx_1))
      return false;
    if (!equals(this.brx_1, tmp0_other_with_cast.brx_1))
      return false;
    if (!equals(this.crx_1, tmp0_other_with_cast.crx_1))
      return false;
    if (!equals(this.drx_1, tmp0_other_with_cast.drx_1))
      return false;
    if (!this.erx_1.equals(tmp0_other_with_cast.erx_1))
      return false;
    if (!equals(this.frx_1, tmp0_other_with_cast.frx_1))
      return false;
    if (!(this.grx_1 === tmp0_other_with_cast.grx_1))
      return false;
    if (!equals(this.hrx_1, tmp0_other_with_cast.hrx_1))
      return false;
    if (!equals(this.irx_1, tmp0_other_with_cast.irx_1))
      return false;
    if (!equals(this.jrx_1, tmp0_other_with_cast.jrx_1))
      return false;
    if (!equals(this.krx_1, tmp0_other_with_cast.krx_1))
      return false;
    if (!(this.lrx_1 === tmp0_other_with_cast.lrx_1))
      return false;
    if (!(this.mrx_1 === tmp0_other_with_cast.mrx_1))
      return false;
    if (!equals(this.nrx_1, tmp0_other_with_cast.nrx_1))
      return false;
    if (!this.orx_1.equals(tmp0_other_with_cast.orx_1))
      return false;
    if (!(this.prx_1 == tmp0_other_with_cast.prx_1))
      return false;
    if (!(this.qrx_1 == tmp0_other_with_cast.qrx_1))
      return false;
    if (!this.rrx_1.equals(tmp0_other_with_cast.rrx_1))
      return false;
    if (!(this.srx_1 === tmp0_other_with_cast.srx_1))
      return false;
    if (!(this.trx_1 == tmp0_other_with_cast.trx_1))
      return false;
    if (!equals(this.urx_1, tmp0_other_with_cast.urx_1))
      return false;
    if (!this.vrx_1.equals(tmp0_other_with_cast.vrx_1))
      return false;
    if (!equals(this.wrx_1, tmp0_other_with_cast.wrx_1))
      return false;
    if (!equals(this.xrx_1, tmp0_other_with_cast.xrx_1))
      return false;
    if (!equals(this.yrx_1, tmp0_other_with_cast.yrx_1))
      return false;
    if (!(this.zrx_1 === tmp0_other_with_cast.zrx_1))
      return false;
    if (!(this.ary_1 === tmp0_other_with_cast.ary_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission) {
    editableSubmission = editableSubmission === VOID ? null : editableSubmission;
    this.as0_1 = editableSubmission;
  }
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).bs5 = function (editableSubmission) {
    return new ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission);
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).toString = function () {
    return 'ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission=' + this.as0_1 + ')';
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).hashCode = function () {
    return this.as0_1 == null ? 0 : this.as0_1.hashCode();
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailoverviewSubmissionUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? other : THROW_CCE();
    if (!equals(this.as0_1, tmp0_other_with_cast.as0_1))
      return false;
    return true;
  };
  function saveAndUploadUseCase$factory() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function ustadAccountManager$factory() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07(receiver);
    }, null);
  }
  function saveAndUploadUseCase$factory_0() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory_0() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_0() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function ustadAccountManager$factory_0() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_0() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_0() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_0() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07(receiver);
    }, null);
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.esb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).cp4 = function (noSubmissions, $completion) {
    var tmp = this.dp4(noSubmissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (!this.fsb_1 ? this.esb_1.esc_1.t2().ksc_1 : false) {
            l$ret$1: do {
              var this_0 = this.esb_1.esc_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ssc(VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).dp4 = function (noSubmissions, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this.esb_1, completion);
    i.fsb_1 = noSubmissions;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (noSubmissions, $completion) {
      return i.cp4(noSubmissions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.bsd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).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;
            var tmp_0 = this.bsd_1.dpc().w7k();
            var tmp0_safe_receiver = this.bsd_1.esc_1.t2().csd();
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i7z_1;
            var tmp_1 = tmp_0.jbt(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this.bsd_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).q7e = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this.bsd_1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.lsd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.msd_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.lsd_1.esc_1.t2().csd();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rjc_1;
          this.lsd_1.nsd(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vjo(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).joz = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this.lsd_1, completion);
    i.msd_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda($groupSet) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.l7z_1 = $groupSet.v84_1;
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.wsd_1 = $commitDelay;
    this.xsd_1 = $entity;
    this.ysd_1 = $this;
    this.zsd_1 = $key;
    this.ase_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.wsd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.xsd_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ysd_1.opc(this.ysd_1.kpb_1, this.zsd_1, this.ase_1, this.xsd_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1(this.wsd_1, this.xsd_1, this.ysd_1, this.zsd_1, this.ase_1, completion);
    i.bse_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.kse_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.lse_1.poy_1;
          var tmp0_elvis_lhs = tmp_0 instanceof CourseGroupSet ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var groupSet = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.kse_1.esc_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp3_safe_receiver = prevValue.csd();
              var tmp_2;
              if (tmp3_safe_receiver == null) {
                tmp_2 = null;
              } else {
                var tmp0_safe_receiver = prevValue.csd();
                var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
                var tmp_3;
                if (tmp1_safe_receiver == null) {
                  tmp_3 = null;
                } else {
                  tmp_3 = shallowCopy_5(tmp1_safe_receiver, ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda(groupSet));
                }
                var tmp_4 = tmp_3;
                var tmp_5;
                if (!groupSet.v84_1.equals(new Long(0, 0))) {
                  tmp_5 = groupSet;
                } else {
                  tmp_5 = null;
                }
                var tmp2_safe_receiver = tmp_5;
                tmp_2 = tmp3_safe_receiver.djd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_4, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.w84_1);
              }
              var nextValue = prevValue.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.psc_1.xse(tmp_2), VOID, null);
              if (this_0.y1k(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.kse_1;
          var entity = newState.csd();
          var serializer = Companion_getInstance_14().s4x();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_120();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.pph_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_6 = this_1;
          var tmp_7 = this_1.bpc();
          tmp_6.pph_1 = launch(tmp_7, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2(commitDelay, entity, this_1, key, serializer, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).joz = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this.kse_1, completion);
    i.lse_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.gsf_1 = $commitDelay;
    this.hsf_1 = $entity;
    this.isf_1 = $this;
    this.jsf_1 = $key;
    this.ksf_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.gsf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.hsf_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.isf_1.opc(this.isf_1.kpb_1, this.jsf_1, this.ksf_1, this.hsf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3(this.gsf_1, this.hsf_1, this.isf_1, this.jsf_1, this.ksf_1, completion);
    i.lsf_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.usf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.vsf_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? isInterface(tmp_0, List) : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var allocations = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.usf_1.esc_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.psc_1.mse_1;
              var nextValue = prevValue.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.psc_1.xse(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.djd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, allocations)));
              if (this_0.y1k(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.usf_1;
          var entity = newState.csd();
          var serializer = Companion_getInstance_14().s4x();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_120();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.pph_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_2 = this_1;
          var tmp_3 = this_1.bpc();
          tmp_2.pph_1 = launch(tmp_3, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4(commitDelay, entity, this_1, key, serializer, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).joz = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this.usf_1, completion);
    i.vsf_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).fsg = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.fsg(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).tmw = function (it, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(completion);
    i.esg_1 = it;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.fsg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.osg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).psg = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.psg($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = get_doorPrimaryKeyManager(this.osg_1.dpc());
          var assignmentUid = tmp_0.s68(520);
          var this_0 = new CourseBlock();
          var tmp_1 = this_0;
          var tmp_2 = get_doorPrimaryKeyManager(this.osg_1.dpc());
          tmp_1.o83_1 = tmp_2.s68(124);
          var tmp_3 = this_0;
          tmp_3.p83_1 = 103;
          this_0.g84_1 = assignmentUid;
          var tmp_4 = this_0;
          tmp_4.u83_1 = 102;
          this_0.z83_1 = 10.0;
          this_0.a84_1 = 0.0;
          var this_1 = new ClazzAssignment();
          this_1.i7z_1 = assignmentUid;
          this_1.a80_1 = this.osg_1.hsc_1;
          return new CourseBlockAndEditEntities(this_0, VOID, VOID, VOID, VOID, VOID, VOID, this_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda_1(this.osg_1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.psg($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$lambda($savedStateHandle, this$0, $courseTerminology) {
    return function (it) {
      var groupSubmissionOn = $savedStateHandle.ba('groupSubmissionOn');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.esc_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = prevValue.psc_1.xse(it);
          var tmp4_elvis_lhs = groupSubmissionOn == null ? null : toBoolean(groupSubmissionOn);
          var tmp_0;
          if (tmp4_elvis_lhs == null) {
            var tmp2_safe_receiver = it == null ? null : it.yjc_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l7z_1;
            var tmp_1;
            if (tmp3_safe_receiver == null) {
              tmp_1 = null;
            } else {
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
              tmp_1 = !tmp3_safe_receiver.equals(new Long(0, 0));
            }
            tmp_0 = tmp_1;
          } else {
            tmp_0 = tmp4_elvis_lhs;
          }
          var tmp5_elvis_lhs = tmp_0;
          var nextValue = prevValue.ssc(VOID, VOID, VOID, VOID, $courseTerminology, VOID, VOID, tmp, tmp5_elvis_lhs == null ? false : tmp5_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.ysg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).xpo = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.xpo((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.ysg_1.r4x();
          var value = this.ysg_1.esc_1.t2();
          var this_1 = this_0.y4b();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzAssignmentEditUiState), arrayOf([]), false));
          return this_0.w4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).v1m = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this.ysg_1, completion);
    i.zsg_1 = $this$withContext;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.xpo($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.ish_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).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 = whenSubscribed(this.ish_1.esc_1, ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this.ish_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this.ish_1, completion);
    i.jsh_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.ssh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).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;
            var tmp_0 = this.ssh_1.fpc();
            Companion_getInstance_163();
            var tmp_1 = this.ssh_1.mpc(tmp_0, 'courseBlockDesc');
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this.ssh_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this.ssh_1, completion);
    i.tsh_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.csi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).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;
            var tmp_0 = this.csi_1.mpc(this.csi_1.fpc(), 'groupSet');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this.csi_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this.csi_1, completion);
    i.dsi_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.msi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).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;
            var tmp_0 = this.msi_1.mpc(this.msi_1.fpc(), 'peerAllocationsResult');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this.msi_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this.msi_1, completion);
    i.nsi_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation) {
    this.wsi_1 = this$0;
    this.xsi_1 = $initStateJson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).zsi = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.zsi((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.wsi_1.r4x().x4b(Companion_getInstance_143().s4x(), this.xsi_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this.wsi_1, this.xsi_1, completion);
    i.ysi_1 = $this$withContext;
    return i;
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this$0, $initStateJson, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.zsi($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$lambda($this$shallowCopy) {
    $this$shallowCopy.l7z_1 = new Long(0, 0);
    return Unit_instance;
  }
  function _get_snackDisaptcher__bp310a($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gsc_1;
    snackDisaptcher$factory_0();
    return this_0.t2();
  }
  function hasErrors_0(_this__u8e3s4, $this) {
    return ((((((!(_this__u8e3s4.nsc_1 == null) ? true : !(_this__u8e3s4.psc_1.tse_1 == null)) ? true : !(_this__u8e3s4.psc_1.sse_1 == null)) ? true : !(_this__u8e3s4.psc_1.vse_1 == null)) ? true : !(_this__u8e3s4.lsc_1 == null)) ? true : !(_this__u8e3s4.osc_1 == null)) ? true : !(_this__u8e3s4.rsc_1 == null)) ? true : _this__u8e3s4.psc_1.bsj();
  }
  function checkNoSubmissionsMade($this, $completion) {
    var tmp = $this.dpc().w7k();
    var tmp0_safe_receiver = $this.esc_1.t2().csd();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i7z_1;
    return tmp.ibt(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, $completion);
  }
  function Companion_124() {
    this.csj_1 = 'groupSet';
    this.dsj_1 = 'peerAllocationsResult';
    this.esj_1 = 'terminology';
    this.fsj_1 = 'CourseAssignmentEdit';
    this.gsj_1 = 5;
    this.hsj_1 = 100;
    this.isj_1 = 'groupSubmissionOn';
  }
  var Companion_instance_172;
  function Companion_getInstance_142() {
    return Companion_instance_172;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_16(function_0) {
    this.jsj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_16).t1d = function (value, $completion) {
    return this.jsj_1(value, $completion);
  };
  function ClazzAssignmentEditViewModel$_init_$lambda_wdhfey(db, systemImpl) {
    return new UpdatePeerReviewAllocationUseCase(db, systemImpl);
  }
  function ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.ssj_1 = this$0;
    this.tsj_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.ssj_1.npc(this.tsj_1, 'terminology', Companion_instance_33.s4x(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vsj_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = Companion_getInstance_14().s4x();
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda_2(this.ssj_1, null);
            suspendResult = this.ssj_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzAssignmentEditViewModel$slambda$lambda(this.tsj_1, this.ssj_1, this.vsj_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Companion_getInstance_120();
            if (this.tsj_1.ba('initState') == null) {
              var tmp_3 = this;
              Companion_getInstance_120();
              tmp_3.wsj_1 = 'initState';
              this.hd_1 = 3;
              var tmp_4 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_4, ClazzAssignmentEditViewModel$slambda$slambda_4(this.ssj_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.tsj_1.qp7(this.wsj_1, ARGUMENT);
            this.hd_1 = 4;
            continue $sm;
          case 4:
            l$ret$1: do {
              var this_0 = this.ssj_1.esc_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xsj(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.ssj_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_5 = Companion_getInstance_93().uov_1;
                var tmp_6 = this.ssj_1.ipc().rnd(strings_getInstance().vlr_1);
                var nextValue_0 = prevValue_0.mov(VOID, tmp_5, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_6, VOID, ClazzAssignmentEditViewModel$onClickSave$ref(this.ssj_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.usj_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_6(this.ssj_1, null));
            launch(this.usj_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_8(this.ssj_1, null));
            launch(this.usj_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_10(this.ssj_1, null));
            launch(this.usj_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_12(this.ssj_1, null));
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda(this.ssj_1, this.tsj_1, completion);
    i.usj_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.gsk_1 = $commitDelay;
    this.hsk_1 = $entity;
    this.isk_1 = $this;
    this.jsk_1 = $key;
    this.ksk_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.gsk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.hsk_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.isk_1.opc(this.isk_1.kpb_1, this.jsk_1, this.ksk_1, this.hsk_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda(this.gsk_1, this.hsk_1, this.isk_1, this.jsk_1, this.ksk_1, completion);
    i.lsk_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.usk_1 = $commitDelay;
    this.vsk_1 = $entity;
    this.wsk_1 = $this;
    this.xsk_1 = $key;
    this.ysk_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.usk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.vsk_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.wsk_1.opc(this.wsk_1.kpb_1, this.xsk_1, this.ysk_1, this.vsk_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda(this.usk_1, this.vsk_1, this.wsk_1, this.xsk_1, this.ysk_1, completion);
    i.zsk_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.isl_1 = $commitDelay;
    this.jsl_1 = $entity;
    this.ksl_1 = $this;
    this.lsl_1 = $key;
    this.msl_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.isl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.jsl_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ksl_1.opc(this.ksl_1.kpb_1, this.lsl_1, this.msl_1, this.jsl_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda(this.isl_1, this.jsl_1, this.ksl_1, this.lsl_1, this.msl_1, completion);
    i.nsl_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.esc_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xsj(true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.wsl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            Companion_getInstance_120();
            tmp_0.xsl_1 = this.wsl_1.kpb_1.ba('initState');
            if (this.xsl_1 == null) {
              this.ysl_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.zsl_1 = this.xsl_1;
              var tmp_2 = this;
              tmp_2.asm_1 = this.zsl_1;
              this.hd_1 = 1;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this.wsl_1, this.asm_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ysl_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.bsm_1 = this.ysl_1;
            var tmp_4 = this;
            var tmp_5;
            if (this.bsm_1 == null) {
              return Unit_instance;
            } else {
              tmp_5 = this.bsm_1;
            }

            tmp_4.csm_1 = tmp_5;
            var tmp_6 = this;
            var tmp2_safe_receiver = this.wsl_1.esc_1.t2().csd();
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.yjc_1;
            var tmp_7;
            if (tmp3_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_7 = tmp3_elvis_lhs;
            }

            tmp_6.dsm_1 = tmp_7;
            var tmp_8 = this;
            var tmp4_safe_receiver = this.wsl_1.esc_1.t2().csd();
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.rjc_1;
            var tmp_9;
            if (tmp5_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_9 = tmp5_elvis_lhs;
            }

            tmp_8.esm_1 = tmp_9;
            if (!this.dsm_1.q7z_1 ? !this.dsm_1.w7z_1 : false) {
              l$ret$1: do {
                var this_0 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.ssc(VOID, VOID, VOID, VOID, VOID, this.wsl_1.ipc().rnd(strings_getInstance().cmk_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            }

            var it = this.esm_1.z83_1;
            if (it == null ? true : it <= 0.0) {
              l$ret$3: do {
                var this_1 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.psc_1.xse(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.wsl_1.ipc().rnd(strings_getInstance().ilo_1)));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.esm_1.w83_1.c7(this.esm_1.v83_1) <= 0) {
              l$ret$5: do {
                var this_2 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.psc_1.xse(VOID, VOID, VOID, VOID, VOID, VOID, this.wsl_1.ipc().rnd(strings_getInstance().sm9_1)));
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
            }

            if (this.esm_1.y83_1.c7(this.esm_1.w83_1) < 0) {
              l$ret$7: do {
                var this_3 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_2.psc_1.xse(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.wsl_1.ipc().rnd(strings_getInstance().gm6_1)));
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
            }

            var containsArg = this.dsm_1.s7z_1;
            if (!(5 <= containsArg ? containsArg <= 100 : false)) {
              l$ret$9: do {
                var this_4 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue_3 = this_4.t2();
                  var nextValue_3 = prevValue_3.ssc(VOID, VOID, VOID, VOID, VOID, VOID, this.wsl_1.ipc().snd(strings_getInstance().kmg_1, ['5', '100']));
                  if (this_4.y1k(prevValue_3, nextValue_3)) {
                    break l$ret$9;
                  }
                }
              }
               while (false);
            }

            var this_5 = this.esm_1.s83_1;
            if (this_5 == null ? true : isBlank(this_5)) {
              l$ret$11: do {
                var this_6 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue_4 = this_6.t2();
                  var nextValue_4 = prevValue_4.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_4.psc_1.xse(VOID, VOID, VOID, VOID, VOID, this.wsl_1.ipc().rnd(strings_getInstance().bmm_1)));
                  if (this_6.y1k(prevValue_4, nextValue_4)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
            }

            if (this.wsl_1.esc_1.t2().qsc_1 ? this.dsm_1.l7z_1.equals(new Long(0, 0)) : false) {
              l$ret$13: do {
                var this_7 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue_5 = this_7.t2();
                  var nextValue_5 = prevValue_5.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.wsl_1.ipc().rnd(strings_getInstance().ilo_1));
                  if (this_7.y1k(prevValue_5, nextValue_5)) {
                    break l$ret$13;
                  }
                }
              }
               while (false);
            }

            this.fsm_1 = null;
            var tmp6_safe_receiver = this.csm_1.csd();
            var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.yjc_1;
            if (!equals(tmp7_safe_receiver == null ? null : tmp7_safe_receiver.l7z_1, this.dsm_1.l7z_1)) {
              this.hd_1 = 3;
              suspendResult = checkNoSubmissionsMade(this.wsl_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.gsm_1 = false;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hsm_1 = suspendResult;
            this.gsm_1 = !this.hsm_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (this.gsm_1) {
              this.fsm_1 = this.wsl_1.ipc().rnd(strings_getInstance().hlj_1) + 'Cannot change groups after submissions made';
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            var tmp_10;
            var tmp8_safe_receiver = this.csm_1.csd();
            var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.yjc_1;
            if (!((tmp9_safe_receiver == null ? null : tmp9_safe_receiver.v7z_1) === this.dsm_1.v7z_1)) {
              tmp_10 = this.fsm_1 == null;
            } else {
              tmp_10 = false;
            }

            if (tmp_10) {
              this.hd_1 = 6;
              suspendResult = checkNoSubmissionsMade(this.wsl_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.ism_1 = false;
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.jsm_1 = suspendResult;
            this.ism_1 = !this.jsm_1;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (this.ism_1) {
              this.fsm_1 = this.wsl_1.ipc().rnd(strings_getInstance().hlj_1) + 'Cannot change marking type after submissions made';
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 8;
              continue $sm;
            }

          case 8:
            var tmp_11;
            var tmp_12 = this.dsm_1.v7z_1;
            if (tmp_12 === 2) {
              tmp_11 = this.dsm_1.b80_1 < 1;
            } else {
              tmp_11 = false;
            }

            if (tmp_11) {
              l$ret$15: do {
                var this_8 = this.wsl_1.esc_1;
                while (true) {
                  var prevValue_6 = this_8.t2();
                  var nextValue_6 = prevValue_6.ssc(VOID, VOID, VOID, this.wsl_1.ipc().rnd(strings_getInstance().cmh_1));
                  if (this_8.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$15;
                  }
                }
              }
               while (false);
            }

            this.ksm_1 = this.fsm_1;
            if (hasErrors_0(this.wsl_1.esc_1.t2(), this.wsl_1) ? true : !(this.ksm_1 == null)) {
              var tmp10_safe_receiver = this.ksm_1;
              if (tmp10_safe_receiver == null)
                null;
              else {
                _get_snackDisaptcher__bp310a(this.wsl_1).bow(new Snack(tmp10_safe_receiver));
              }
              return Unit_instance;
            }

            var tmp_13;
            var tmp_14 = this.dsm_1.v7z_1;
            if (tmp_14 === 2) {
              var tmp11_safe_receiver = this.csm_1.csd();
              var tmp12_safe_receiver = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.yjc_1;
              tmp_13 = !((tmp12_safe_receiver == null ? null : tmp12_safe_receiver.b80_1) === this.dsm_1.b80_1);
            } else {
              tmp_13 = false;
            }

            if (tmp_13) {
              this.hd_1 = 9;
              var tmp_15 = this.wsl_1.dsc_1(this.wsl_1.dpc(), this.wsl_1.ipc());
              var tmp13_safe_receiver = this.wsl_1.esc_1.t2().csd();
              var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.ajd_1;
              suspendResult = tmp_15.aob(tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs, this.dsm_1.l7z_1, this.dsm_1.a80_1, this.dsm_1.i7z_1, this.dsm_1.b80_1, true, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            var newAllocations = suspendResult;
            l$ret$17: do {
              var this_9 = this.wsl_1.esc_1;
              while (true) {
                var prevValue_7 = this_9.t2();
                var tmp0_safe_receiver = prevValue_7.psc_1.mse_1;
                var nextValue_7 = prevValue_7.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_7.psc_1.xse(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.djd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, newAllocations)));
                if (this_9.y1k(prevValue_7, nextValue_7)) {
                  break l$ret$17;
                }
              }
            }
             while (false);
            this.hd_1 = 10;
            continue $sm;
          case 10:
            var this_10 = this.wsl_1.esc_1;
            var tmp_16;
            var tmp_17;
            var tmp0_safe_receiver_0 = this_10.t2().csd();
            var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.yjc_1;
            if (!equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l7z_1, new Long(0, 0))) {
              tmp_17 = !this_10.t2().qsc_1;
            } else {
              tmp_17 = false;
            }

            if (tmp_17) {
              tmp_16 = this_10;
            } else {
              tmp_16 = null;
            }

            var tmp15_safe_receiver = tmp_16;
            if (tmp15_safe_receiver == null)
              null;
            else {
              l$ret$19: do {
                while (true) {
                  var prevValue_8 = tmp15_safe_receiver.t2();
                  var tmp1_safe_receiver_0 = prevValue_8.psc_1.mse_1;
                  var tmp_18;
                  if (tmp1_safe_receiver_0 == null) {
                    tmp_18 = null;
                  } else {
                    var tmp0_safe_receiver_1 = prevValue_8.psc_1.mse_1.yjc_1;
                    var tmp_19;
                    if (tmp0_safe_receiver_1 == null) {
                      tmp_19 = null;
                    } else {
                      tmp_19 = shallowCopy_5(tmp0_safe_receiver_1, ClazzAssignmentEditViewModel$onClickSave$slambda$lambda);
                    }
                    tmp_18 = tmp1_safe_receiver_0.djd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_19, null);
                  }
                  var nextValue_8 = prevValue_8.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_8.psc_1.xse(tmp_18));
                  if (tmp15_safe_receiver.y1k(prevValue_8, nextValue_8)) {
                    break l$ret$19;
                  }
                }
              }
               while (false);
            }

            this.wsl_1.tph(this.wsl_1.esc_1.t2().csd());
            return Unit_instance;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).q7e = function (completion) {
    return new ClazzAssignmentEditViewModel$onClickSave$slambda(this.wsl_1, completion);
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel(di, savedStateHandle, peerReviewAllocationUseCaseFactory) {
    var tmp;
    if (peerReviewAllocationUseCaseFactory === VOID) {
      tmp = ClazzAssignmentEditViewModel$_init_$lambda_wdhfey;
    } else {
      tmp = peerReviewAllocationUseCaseFactory;
    }
    peerReviewAllocationUseCaseFactory = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseAssignmentEdit');
    this.dsc_1 = peerReviewAllocationUseCaseFactory;
    var tmp_0 = this;
    var tmp0_completionCriteriaOptions = Companion_getInstance_143().asj_1;
    var tmp1_timeZone = Companion_getInstance_9().mli().nlh();
    tmp_0.esc_1 = MutableStateFlow(new ClazzAssignmentEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, new CourseBlockEditUiState(VOID, VOID, tmp0_completionCriteriaOptions, VOID, VOID, VOID, VOID, VOID, true, VOID, tmp1_timeZone)));
    this.fsc_1 = asStateFlow(this.esc_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.gsc_1 = Instance(this, tmp$ret$0, null).f5j(this, snackDisaptcher$factory());
    var tmp_3 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.hsc_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_93().tov_1;
        var tmp1_title = this.upi(strings_getInstance().ym5_1, strings_getInstance().zm5_1);
        var nextValue = prevValue.mov(VOID, tmp0_loadingState, tmp1_title, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_4 = this.bpc();
    launch(tmp_4, VOID, VOID, ClazzAssignmentEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ClazzAssignmentEditViewModel).lsm = function (groupSubmissionOn) {
    this.kpb_1.qp7('groupSubmissionOn', groupSubmissionOn.toString());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.esc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onGroupSubmissionOnChanged.<anonymous>' call
        var tmp;
        if (!(prevValue.rsc_1 == null) ? groupSubmissionOn : false) {
          tmp = prevValue.rsc_1;
        } else {
          tmp = null;
        }
        var nextValue = prevValue.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, groupSubmissionOn, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentEditViewModel).msm = function (assignment) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.esc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onAssignmentChanged.<anonymous>' call
        var tmp8_safe_receiver = prevValue.psc_1.mse_1;
        var tmp9_courseBlockEditUiState = prevValue.psc_1.xse(tmp8_safe_receiver == null ? null : tmp8_safe_receiver.djd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, assignment));
        var tmp;
        var tmp_0;
        if (!(prevValue.osc_1 == null)) {
          var tmp_1 = assignment == null ? null : assignment.s7z_1;
          var tmp6_safe_receiver = prevValue.csd();
          var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.yjc_1;
          tmp_0 = tmp_1 == (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.s7z_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.osc_1;
        } else {
          tmp = null;
        }
        var tmp10_sizeLimitError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.nsc_1 == null)) {
          tmp_4 = (assignment == null ? null : assignment.q7z_1) === false;
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = !assignment.w7z_1;
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.nsc_1;
        } else {
          tmp_2 = null;
        }
        var tmp11_submissionRequiredError = tmp_2;
        var tmp_5;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.lsc_1 == null)) {
          var tmp_8 = assignment == null ? null : assignment.b80_1;
          var tmp1_safe_receiver = prevValue.csd();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.yjc_1;
          tmp_7 = tmp_8 == (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.b80_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          var tmp_9 = assignment == null ? null : assignment.v7z_1;
          tmp_6 = tmp_9 === 2;
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = prevValue.lsc_1;
        } else {
          tmp_5 = null;
        }
        var tmp12_reviewerCountError = tmp_5;
        var nextValue = prevValue.ssc(VOID, VOID, VOID, tmp12_reviewerCountError, VOID, tmp11_submissionRequiredError, tmp10_sizeLimitError, tmp9_courseBlockEditUiState);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.csd();
    var serializer = Companion_getInstance_14().s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver = this.pph_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_10 = this;
    var tmp_11 = this.bpc();
    tmp_10.pph_1 = launch(tmp_11, VOID, VOID, ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).nsd = function (courseBlock) {
    if (courseBlock == null) {
      Napier_getInstance().r5k('Change courseblock shoudl not really be null');
      return Unit_instance;
    }
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.esc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onCourseBlockChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.csd();
        var prevBlock = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rjc_1;
        var tmp8_$this = prevValue.psc_1;
        var tmp1_safe_receiver = prevValue.csd();
        var tmp9_block = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.djd(courseBlock);
        var tmp5_safe_receiver = prevValue.psc_1.mse_1;
        var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.rjc_1;
        var tmp10_caMaxPointsError = this.vpi(tmp6_safe_receiver == null ? null : tmp6_safe_receiver.z83_1, courseBlock.z83_1, prevValue.psc_1.tse_1);
        var tmp;
        var tmp_0;
        var tmp_1;
        if (!(prevValue.psc_1.sse_1 == null)) {
          tmp_1 = equals(prevBlock == null ? null : prevBlock.w83_1, courseBlock.w83_1);
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp_0 = prevBlock.v83_1.equals(courseBlock.v83_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.psc_1.sse_1;
        } else {
          tmp = null;
        }
        var tmp11_caDeadlineError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.psc_1.vse_1 == null)) {
          tmp_4 = equals(prevBlock == null ? null : prevBlock.w83_1, courseBlock.w83_1);
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = prevBlock.y83_1.equals(courseBlock.y83_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.psc_1.vse_1;
        } else {
          tmp_2 = null;
        }
        var tmp12_caGracePeriodError = tmp_2;
        var tmp2_safe_receiver = prevValue.psc_1.mse_1;
        var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.rjc_1;
        var tmp13_caTitleError = this.vpi(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.s83_1, courseBlock.s83_1, prevValue.psc_1.rse_1);
        var nextValue = prevValue.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp8_$this.xse(tmp9_block, VOID, VOID, VOID, VOID, tmp13_caTitleError, tmp11_caDeadlineError, tmp10_caMaxPointsError, VOID, tmp12_caGracePeriodError));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.csd();
    var serializer = Companion_getInstance_14().s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_5 = this;
    var tmp_6 = this.bpc();
    tmp_5.pph_1 = launch(tmp_6, VOID, VOID, ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).nsm = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.esc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.psc_1.mse_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.psc_1.mse_1.sjc_1;
          tmp = tmp1_safe_receiver.djd(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zjo(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.ssc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.psc_1.xse(tmp));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.csd();
    var serializer = Companion_getInstance_14().s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.bpc();
    tmp_0.pph_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentEditViewModel$onPictureChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).osm = function () {
    var tmp = serializer_0(StringCompanionObject_instance);
    Companion_getInstance_120();
    var tmp0_safe_receiver = this.esc_1.t2().csd();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a80_1;
    this.qpc('CourseGroups', 'groupSet', null, tmp, mapOf_0(to('clazzUid', (tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs).toString())));
  };
  protoOf(ClazzAssignmentEditViewModel).psm = function () {
    var tmp0_safe_receiver = this.esc_1.t2().csd();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var assignmentVal = tmp;
    var tmp_0 = ListSerializer(Companion_instance_17.s4x());
    var tmp_1 = this.r4x();
    var tmp_2 = ListSerializer(Companion_instance_17.s4x());
    var tmp2_safe_receiver = this.esc_1.t2().csd();
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ajd_1;
    var tmp_3 = to('allocations', tmp_1.w4b(tmp_2, tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs));
    var tmp_4 = to('groupSetUid', assignmentVal.l7z_1.toString());
    Companion_getInstance_120();
    var tmp_5 = to('clazzUid', assignmentVal.a80_1.toString());
    var tmp_6 = to('numReviewers', assignmentVal.b80_1.toString());
    Companion_getInstance_110();
    this.qpc('PeerReviewerAllocationEdit', 'peerAllocationsResult', null, tmp_0, mapOf([tmp_3, tmp_4, tmp_5, tmp_6, to('clazzAssignmentUid', assignmentVal.i7z_1.toString())]));
  };
  protoOf(ClazzAssignmentEditViewModel).mq0 = function () {
    if (!this.esc_1.t2().isc_1)
      return Unit_instance;
    var tmp = ClazzAssignmentEditViewModel$onClickSave$lambda(this);
    this.xpi(tmp, ClazzAssignmentEditViewModel$onClickSave$slambda_0(this, null));
  };
  function Companion_125() {
    Companion_instance_173 = this;
    this.asj_1 = listOf([CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()]);
  }
  protoOf(Companion_125).s4x = function () {
    return $serializer_getInstance_66();
  };
  var Companion_instance_173;
  function Companion_getInstance_143() {
    if (Companion_instance_173 == null)
      new Companion_125();
    return Companion_instance_173;
  }
  function $serializer_54() {
    $serializer_instance_54 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditUiState', this, 10);
    tmp0_serialDesc.y4l('fieldsEnabled', true);
    tmp0_serialDesc.y4l('markingTypeEnabled', true);
    tmp0_serialDesc.y4l('groupSetEnabled', true);
    tmp0_serialDesc.y4l('reviewerCountError', true);
    tmp0_serialDesc.y4l('courseTerminology', true);
    tmp0_serialDesc.y4l('submissionRequiredError', true);
    tmp0_serialDesc.y4l('sizeLimitError', true);
    tmp0_serialDesc.y4l('courseBlockEditUiState', true);
    tmp0_serialDesc.y4l('groupSubmissionOn', true);
    tmp0_serialDesc.y4l('groupSetError', true);
    this.qsm_1 = tmp0_serialDesc;
  }
  protoOf($serializer_54).v4a = function () {
    return this.qsm_1;
  };
  protoOf($serializer_54).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_10()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_68(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_54).x4a = function (decoder) {
    var tmp0_desc = this.qsm_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = false;
    var tmp6_local2 = false;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_input = decoder.n4e(tmp0_desc);
    if (tmp14_input.c4f()) {
      tmp4_local0 = tmp14_input.p4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp14_input.p4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp14_input.p4e(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp14_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp14_input.b4f(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp14_input.b4f(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp14_input.b4f(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp14_input.z4e(tmp0_desc, 7, $serializer_getInstance_68(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp14_input.p4e(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp14_input.b4f(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp14_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp14_input.p4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp14_input.p4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp14_input.p4e(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp14_input.b4f(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp14_input.b4f(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp14_input.b4f(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp14_input.b4f(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp14_input.z4e(tmp0_desc, 7, $serializer_getInstance_68(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp14_input.p4e(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp14_input.b4f(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp14_input.o4e(tmp0_desc);
    return ClazzAssignmentEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null);
  };
  protoOf($serializer_54).rsm = function (encoder, value) {
    var tmp0_desc = this.qsm_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.isc_1 === false)) {
      tmp1_output.t4f(tmp0_desc, 0, value.isc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.jsc_1 === true)) {
      tmp1_output.t4f(tmp0_desc, 1, value.jsc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.ksc_1 === true)) {
      tmp1_output.t4f(tmp0_desc, 2, value.ksc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.lsc_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 3, StringSerializer_getInstance(), value.lsc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.msc_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, $serializer_getInstance_10(), value.msc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.nsc_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, StringSerializer_getInstance(), value.nsc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !(value.osc_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 6, StringSerializer_getInstance(), value.osc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 7) ? true : !value.psc_1.equals(new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_143().asj_1))) {
      tmp1_output.d4g(tmp0_desc, 7, $serializer_getInstance_68(), value.psc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 8) ? true : !(value.qsc_1 === false)) {
      tmp1_output.t4f(tmp0_desc, 8, value.qsc_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 9) ? true : !(value.rsc_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 9, StringSerializer_getInstance(), value.rsc_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_54).w4a = function (encoder, value) {
    return this.rsm(encoder, value instanceof ClazzAssignmentEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_54;
  function $serializer_getInstance_66() {
    if ($serializer_instance_54 == null)
      new $serializer_54();
    return $serializer_instance_54;
  }
  function ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_66().qsm_1);
    }
    if (0 === (seen1 & 1))
      $this.isc_1 = false;
    else
      $this.isc_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.jsc_1 = true;
    else
      $this.jsc_1 = markingTypeEnabled;
    if (0 === (seen1 & 4))
      $this.ksc_1 = true;
    else
      $this.ksc_1 = groupSetEnabled;
    if (0 === (seen1 & 8))
      $this.lsc_1 = null;
    else
      $this.lsc_1 = reviewerCountError;
    if (0 === (seen1 & 16))
      $this.msc_1 = null;
    else
      $this.msc_1 = courseTerminology;
    if (0 === (seen1 & 32))
      $this.nsc_1 = null;
    else
      $this.nsc_1 = submissionRequiredError;
    if (0 === (seen1 & 64))
      $this.osc_1 = null;
    else
      $this.osc_1 = sizeLimitError;
    if (0 === (seen1 & 128))
      $this.psc_1 = new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_143().asj_1);
    else
      $this.psc_1 = courseBlockEditUiState;
    if (0 === (seen1 & 256))
      $this.qsc_1 = false;
    else
      $this.qsc_1 = groupSubmissionOn;
    if (0 === (seen1 & 512))
      $this.rsc_1 = null;
    else
      $this.rsc_1 = groupSetError;
    return $this;
  }
  function ClazzAssignmentEditUiState_init_$Create$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker) {
    return ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, objectCreate(protoOf(ClazzAssignmentEditUiState)));
  }
  function ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    Companion_getInstance_143();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? true : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? true : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? null : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? null : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? null : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_143().asj_1) : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? false : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? null : groupSetError;
    this.isc_1 = fieldsEnabled;
    this.jsc_1 = markingTypeEnabled;
    this.ksc_1 = groupSetEnabled;
    this.lsc_1 = reviewerCountError;
    this.msc_1 = courseTerminology;
    this.nsc_1 = submissionRequiredError;
    this.osc_1 = sizeLimitError;
    this.psc_1 = courseBlockEditUiState;
    this.qsc_1 = groupSubmissionOn;
    this.rsc_1 = groupSetError;
  }
  protoOf(ClazzAssignmentEditUiState).csd = function () {
    return this.psc_1.mse_1;
  };
  protoOf(ClazzAssignmentEditUiState).ssm = function () {
    var tmp0_safe_receiver = this.csd();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v7z_1;
    return tmp === 2;
  };
  protoOf(ClazzAssignmentEditUiState).tsm = function () {
    var tmp0_safe_receiver = this.csd();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.w7z_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).usm = function () {
    var tmp0_safe_receiver = this.csd();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yjc_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7z_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).xsj = function (fieldsEnabled) {
    return this.ssc(fieldsEnabled, VOID, VOID, VOID, VOID, VOID, VOID, this.psc_1.xse(VOID, VOID, VOID, fieldsEnabled));
  };
  protoOf(ClazzAssignmentEditUiState).vsm = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    return new ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).ssc = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.isc_1 : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? this.jsc_1 : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? this.ksc_1 : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? this.lsc_1 : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? this.msc_1 : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? this.nsc_1 : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? this.osc_1 : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.psc_1 : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? this.qsc_1 : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? this.rsc_1 : groupSetError;
    return $super === VOID ? this.vsm(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) : $super.vsm.call(this, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).toString = function () {
    return 'ClazzAssignmentEditUiState(fieldsEnabled=' + this.isc_1 + ', markingTypeEnabled=' + this.jsc_1 + ', groupSetEnabled=' + this.ksc_1 + ', reviewerCountError=' + this.lsc_1 + ', courseTerminology=' + this.msc_1 + ', submissionRequiredError=' + this.nsc_1 + ', sizeLimitError=' + this.osc_1 + ', courseBlockEditUiState=' + this.psc_1 + ', groupSubmissionOn=' + this.qsc_1 + ', groupSetError=' + this.rsc_1 + ')';
  };
  protoOf(ClazzAssignmentEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.isc_1);
    result = imul(result, 31) + getBooleanHashCode(this.jsc_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ksc_1) | 0;
    result = imul(result, 31) + (this.lsc_1 == null ? 0 : getStringHashCode(this.lsc_1)) | 0;
    result = imul(result, 31) + (this.msc_1 == null ? 0 : hashCode(this.msc_1)) | 0;
    result = imul(result, 31) + (this.nsc_1 == null ? 0 : getStringHashCode(this.nsc_1)) | 0;
    result = imul(result, 31) + (this.osc_1 == null ? 0 : getStringHashCode(this.osc_1)) | 0;
    result = imul(result, 31) + this.psc_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qsc_1) | 0;
    result = imul(result, 31) + (this.rsc_1 == null ? 0 : getStringHashCode(this.rsc_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentEditUiState ? other : THROW_CCE();
    if (!(this.isc_1 === tmp0_other_with_cast.isc_1))
      return false;
    if (!(this.jsc_1 === tmp0_other_with_cast.jsc_1))
      return false;
    if (!(this.ksc_1 === tmp0_other_with_cast.ksc_1))
      return false;
    if (!(this.lsc_1 == tmp0_other_with_cast.lsc_1))
      return false;
    if (!equals(this.msc_1, tmp0_other_with_cast.msc_1))
      return false;
    if (!(this.nsc_1 == tmp0_other_with_cast.nsc_1))
      return false;
    if (!(this.osc_1 == tmp0_other_with_cast.osc_1))
      return false;
    if (!this.psc_1.equals(tmp0_other_with_cast.psc_1))
      return false;
    if (!(this.qsc_1 === tmp0_other_with_cast.qsc_1))
      return false;
    if (!(this.rsc_1 == tmp0_other_with_cast.rsc_1))
      return false;
    return true;
  };
  function snackDisaptcher$factory() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function snackDisaptcher$factory_0() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    this.esn_1 = this$0;
    this.fsn_1 = $savedStateHandle;
    this.gsn_1 = $primaryKeyManager;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).aso = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.aso(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.hd_1 = 1;
            suspendResult = this.esn_1.npc(this.fsn_1, 'allocations', ListSerializer(Companion_instance_17.s4x()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.isn_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.hsn_1.v7k().i7y(this.esn_1.bsp_1, this.esn_1.esp_1, systemTimeInMillis(), this.esn_1.ipc().rnd(strings_getInstance().dmg_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.jsn_1 = suspendResult;
            Napier_getInstance().n5k('Number of submitters: ' + this.jsn_1.u());
            var tmp_0 = this;
            tmp_0.ksn_1 = this.jsn_1;
            var tmp_1 = this;
            tmp_1.lsn_1 = this.ksn_1;
            var tmp_2 = this;
            tmp_2.msn_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ksn_1, 10));
            this.nsn_1 = this.lsn_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.nsn_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.osn_1 = this.nsn_1.e();
            var tmp_3 = this;
            tmp_3.psn_1 = this.osn_1;
            this.qsn_1 = new AssignmentSubmitterSummary(this.psn_1.z82_1, this.psn_1.y82_1);
            var tmp_4 = this;
            var tmp0_safe_receiver = this.isn_1;
            var tmp_5;
            if (tmp0_safe_receiver == null) {
              tmp_5 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp0_safe_receiver.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.efm_1.equals(this.psn_1.z82_1)) {
                  destination.i1(element);
                }
              }
              tmp_5 = destination;
            }

            var tmp1_elvis_lhs = tmp_5;
            tmp_4.rsn_1 = trimToSize(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.esn_1.csp_1);
            var tmp_6 = this;
            tmp_6.ssn_1 = this.esn_1.csp_1;
            if (this.rsn_1.u() < this.ssn_1) {
              var tmp_7 = this;
              tmp_7.usn_1 = until(this.rsn_1.u(), this.ssn_1);
              var tmp_8 = this;
              tmp_8.vsn_1 = this.usn_1;
              var tmp_9 = this;
              tmp_9.wsn_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.usn_1, 10));
              this.xsn_1 = this.vsn_1.w();
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.tsn_1 = this.rsn_1;
              this.hd_1 = 7;
              continue $sm;
            }

          case 4:
            if (!this.xsn_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.ysn_1 = this.xsn_1.e();
            var tmp_11 = this;
            tmp_11.zsn_1 = this.ysn_1;
            this.hd_1 = 5;
            suspendResult = this.gsn_1.t68(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = new PeerReviewerAllocation(ARGUMENT, VOID, this.psn_1.z82_1, this.esn_1.dsp_1);
            this.wsn_1.i1(ARGUMENT_0);
            this.hd_1 = 4;
            continue $sm;
          case 6:
            var ARGUMENT_1 = this.wsn_1;
            this.tsn_1 = plus(this.rsn_1, ARGUMENT_1);
            this.hd_1 = 7;
            continue $sm;
          case 7:
            var ARGUMENT_2 = this.tsn_1;
            var ARGUMENT_3 = new AssignmentSubmitterAndAllocations(this.qsn_1, ARGUMENT_2);
            this.msn_1.i1(ARGUMENT_3);
            this.hd_1 = 3;
            continue $sm;
          case 8:
            return this.msn_1;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this.esn_1, this.fsn_1, this.gsn_1, completion);
    i.hsn_1 = db;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation);
    var l = function (db, $completion) {
      return i.aso(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).nsp = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.nsp($completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new PeerReviewerAllocationEditViewModel$slambda$slambda_1(completion);
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.nsp($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.zso_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.psp(it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PeerReviewerAllocationEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_126() {
    this.qsp_1 = 'allocations';
    this.rsp_1 = 'groupSetUid';
    this.ssp_1 = 'numReviewers';
    this.tsp_1 = 'PeerReviewerAllocationEdit';
  }
  var Companion_instance_174;
  function Companion_getInstance_144() {
    return Companion_instance_174;
  }
  function PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.csq_1 = this$0;
    this.dsq_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.fsq_1 = get_doorPrimaryKeyManager(this.csq_1.dpc());
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_getInstance_15().s4x());
            var tmp_1 = PeerReviewerAllocationEditViewModel$slambda$slambda_0(this.csq_1, this.dsq_1, this.fsq_1, null);
            var tmp_2 = PeerReviewerAllocationEditViewModel$slambda$slambda_2(null);
            suspendResult = this.csq_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, PeerReviewerAllocationEditViewModel$slambda$lambda(this.csq_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.csq_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.csq_1.ipc().rnd(strings_getInstance().vlr_1);
                var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, true, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, PeerReviewerAllocationEditViewModel$onClickSave$ref(this.csq_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this.csq_1, this.dsq_1, completion);
    i.esq_1 = $this$launch;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda($allocation) {
    return function (it) {
      return it.cfm_1.equals($allocation.cfm_1);
    };
  }
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation) {
    this.osq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).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;
            var this_0 = this.osq_1.zso_1.t2().osp_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var list = element.pjf_1;
              addAll(destination, list);
            }

            suspendResult = this.osq_1.yso_1.zoa(destination, this.osq_1.esp_1, this.osq_1.bsp_1, this.osq_1.dsp_1, this.osq_1.csp_1, true, true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newAllocations = suspendResult;
            l$ret$1: do {
              var this_1 = this.osq_1.zso_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = prevValue.osp_1;
                var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_0 = this_2.w();
                while (tmp0_iterator_0.f()) {
                  var item = tmp0_iterator_0.e();
                  var destination_1 = ArrayList_init_$Create$();
                  var tmp0_iterator_1 = newAllocations.w();
                  while (tmp0_iterator_1.f()) {
                    var element_0 = tmp0_iterator_1.e();
                    if (element_0.efm_1.equals(item.ojf_1.m81_1)) {
                      destination_1.i1(element_0);
                    }
                  }
                  destination_0.i1(new AssignmentSubmitterAndAllocations(item.ojf_1, destination_1));
                }
                var nextValue = prevValue.psp(destination_0);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).v1m = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this.osq_1, completion);
    i.psq_1 = $this$launch;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this$0, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel(di, savedStateHandle, updatePeerReviewAllocationUseCase) {
    var tmp;
    if (updatePeerReviewAllocationUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.i5e(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(di).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.i5e(tmp$ret$2, null);
      tmp = new UpdatePeerReviewAllocationUseCase(tmp_2, tmp$ret$3);
    } else {
      tmp = updatePeerReviewAllocationUseCase;
    }
    updatePeerReviewAllocationUseCase = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'PeerReviewerAllocationEdit');
    this.yso_1 = updatePeerReviewAllocationUseCase;
    this.zso_1 = MutableStateFlow(new PeerReviewerAllocationEditUIState());
    this.asp_1 = asStateFlow(this.zso_1);
    var tmp_5 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_5.bsp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_6 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('numReviewers');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0);
    tmp_6.csp_1 = tmp1_elvis_lhs_0 == null ? 1 : tmp1_elvis_lhs_0;
    var tmp_7 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('clazzAssignmentUid');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_7.dsp_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_8 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.ba('groupSetUid');
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_8.esp_1 = tmp1_elvis_lhs_2 == null ? new Long(0, 0) : tmp1_elvis_lhs_2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().wmk_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.bpc();
    launch(tmp_9, VOID, VOID, PeerReviewerAllocationEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(PeerReviewerAllocationEditViewModel).qsq = function (allocation) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zso_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.osp_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.w();
        while (tmp0_iterator.f()) {
          var item = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>.<anonymous>' call
          var tmp;
          if (item.ojf_1.m81_1.equals(allocation.efm_1)) {
            tmp = item.rjf(VOID, replace_0(item.pjf_1, allocation, PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda(allocation)));
          } else {
            tmp = item;
          }
          var tmp$ret$0 = tmp;
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.psp(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PeerReviewerAllocationEditViewModel).rsq = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this, null));
  };
  protoOf(PeerReviewerAllocationEditViewModel).mq0 = function () {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var this_0 = this.zso_1.t2().osp_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onClickSave.<anonymous>' call
      var list = element.pjf_1;
      addAll(destination, list);
    }
    this.tph(destination);
  };
  function PeerReviewerAllocationEditUIState(submitterListWithAllocations) {
    submitterListWithAllocations = submitterListWithAllocations === VOID ? emptyList() : submitterListWithAllocations;
    this.osp_1 = submitterListWithAllocations;
  }
  protoOf(PeerReviewerAllocationEditUIState).ssq = function (allocation) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.osp_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
        if (element.ojf_1.m81_1.equals(allocation.efm_1)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pjf_1;
    var existingAllocationsForSubmitter = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator_0 = existingAllocationsForSubmitter.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_0.cfm_1.equals(allocation.cfm_1)) {
        destination.i1(element_0);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_1 = destination.w();
    while (tmp0_iterator_1.f()) {
      var item = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      var tmp$ret$5 = item.dfm_1;
      destination_0.i1(tmp$ret$5);
    }
    var otherMarkersAlreadySelected = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.osp_1;
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_2 = this_0.w();
    while (tmp0_iterator_2.f()) {
      var element_1 = tmp0_iterator_2.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_1.ojf_1.m81_1.equals(allocation.efm_1) ? !otherMarkersAlreadySelected.a1(element_1.ojf_1.m81_1) : false) {
        destination_1.i1(element_1);
      }
    }
    return destination_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).psp = function (submitterListWithAllocations) {
    return new PeerReviewerAllocationEditUIState(submitterListWithAllocations);
  };
  protoOf(PeerReviewerAllocationEditUIState).toString = function () {
    return 'PeerReviewerAllocationEditUIState(submitterListWithAllocations=' + this.osp_1 + ')';
  };
  protoOf(PeerReviewerAllocationEditUIState).hashCode = function () {
    return hashCode(this.osp_1);
  };
  protoOf(PeerReviewerAllocationEditUIState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PeerReviewerAllocationEditUIState))
      return false;
    var tmp0_other_with_cast = other instanceof PeerReviewerAllocationEditUIState ? other : THROW_CCE();
    if (!equals(this.osp_1, tmp0_other_with_cast.osp_1))
      return false;
    return true;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.bsr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).dsr = function (it, $completion) {
    var tmp = this.esr(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dsr((p1 == null ? true : p1 instanceof CourseBlockAndAssignment) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.bsr_1.bss_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.kst(VOID, this.csr_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).esr = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this.bsr_1, completion);
    i.csr_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.dsr(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.tst_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).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;
            var tmp_0 = this.tst_1.epc().u7j().ccd(this.tst_1.fss_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this.tst_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.tst_1, completion);
    i.ust_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).mry = function (submissions, submissionFiles, $completion) {
    var tmp = this.nry(submissions, submissionFiles, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.mry(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return combineWithSubmissionFiles(this.dsu_1, this.esu_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).nry = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(completion);
    i.dsu_1 = submissions;
    i.esu_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.mry(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.nsu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).yry = function (it, $completion) {
    var tmp = this.zry(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.yry((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.nsu_1.bss_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.kst(VOID, VOID, VOID, this.osu_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).zry = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.nsu_1, completion);
    i.osu_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.yry(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.xsu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).krz = function (it, $completion) {
    var tmp = this.lrz(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.krz((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.xsu_1.bss_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.kst(VOID, VOID, VOID, VOID, VOID, this.ysu_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).lrz = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this.xsu_1, completion);
    i.ysu_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.krz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.hsv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).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 = _get_assignmentSubmitterNameUseCase__ts4wyt(this.hsv_1).nni(this.hsv_1.gss_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var submitterName = suspendResult;
            l$ret$1: do {
              var this_0 = this.hsv_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mov(VOID, VOID, submitterName);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.hsv_1, completion);
    i.isv_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.rsv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.ssv_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.rsv_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.rsv_1, completion);
    i.ssv_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.bsw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.dsw_1 = this.bsw_1.epc().w7k().gbt(this.bsw_1.gss_1, this.bsw_1.fss_1);
            this.esw_1 = this.bsw_1.epc().x7k().rc1(this.bsw_1.gss_1, this.bsw_1.fss_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.dsw_1, this.esw_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.bsw_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this.bsw_1, completion);
    i.csw_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.nsw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).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;
            var tmp_0 = this.nsw_1.epc().y7k().fbn(this.nsw_1.gss_1, this.nsw_1.fss_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this.nsw_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this.nsw_1, completion);
    i.osw_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation) {
    this.xsw_1 = this$0;
    this.ysw_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).asx = function (permissionPair, $completion) {
    var tmp = this.bsx(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.asx(p1 instanceof AssignmentPermissionAndActiveUserSubmitterUid ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (this.zsw_1.fdg_1) {
            l$ret$1: do {
              var this_0 = this.xsw_1.bss_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_privateCommentsList = this.xsw_1.iss_1;
                var tmp1_activeUserPersonUid = this.xsw_1.cpc();
                var tmp2_activeUserSubmitterId = this.zsw_1.hdg_1;
                var tmp_0;
                if (this.zsw_1.edg_1) {
                  var this_1 = new CourseAssignmentMark();
                  this_1.abo_1 = -1.0;
                  tmp_0 = this_1;
                } else {
                  tmp_0 = null;
                }
                var tmp3_draftMark = tmp_0;
                var tmp4_showModerateOptions = this.zsw_1.gdg_1;
                var nextValue = prevValue.kst(VOID, VOID, VOID, VOID, VOID, VOID, tmp3_draftMark, VOID, VOID, VOID, VOID, VOID, tmp0_privateCommentsList, true, tmp1_activeUserPersonUid, tmp2_activeUserSubmitterId, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_showModerateOptions);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.ysw_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.xsw_1, null));
            launch(this.ysw_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.xsw_1, null));
            launch(this.ysw_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this.xsw_1, null));
            launch(this.ysw_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this.xsw_1, null));
          } else {
            l$ret$3: do {
              var this_2 = this.xsw_1.bss_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp0_submissionList = emptyList();
                var tmp1_marks = emptyList();
                var nextValue_0 = prevValue_0.kst(VOID, null, VOID, tmp0_submissionList, VOID, tmp1_marks, VOID, VOID, VOID, VOID, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda, false, VOID, new Long(0, 0));
                if (this_2.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).bsx = function (permissionPair, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this.xsw_1, this.ysw_1, completion);
    i.zsw_1 = permissionPair;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, $this_launch, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.asx(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.ksx_1 = $permissionFlow;
    this.lsx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = distinctUntilChanged(this.ksx_1);
            suspendResult = collectLatest(tmp_0, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this.lsx_1, this.msx_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda(this.ksx_1, this.lsx_1, completion);
    i.msx_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.vsx_1 = $this_launch;
    this.wsx_1 = $permissionFlow;
    this.xsx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.vsx_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0(this.wsx_1, this.xsx_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda(this.vsx_1, this.wsx_1, this.xsx_1, completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.bss_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.kst(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_assignmentSubmitterNameUseCase__ts4wyt($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jss_1;
    assignmentSubmitterNameUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lss_1;
    openBlobUiUseCase$factory_2();
    return this_0.t2();
  }
  function _get_submitMarkUseCase__y8b5kx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mss_1;
    submitMarkUseCase$factory_0();
    return this_0.t2();
  }
  function openSubmissionFileAsBlob_0($this, file, intent) {
    var tmp0_elvis_lhs = file.lc3_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.kss_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.bpc();
    tmp_0.kss_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_127() {
    this.ysx_1 = 'assignmentUid';
    this.zsx_1 = 'submitterUid';
    this.asy_1 = 'CourseAssignmentSubmitter';
  }
  var Companion_instance_175;
  function Companion_getInstance_145() {
    return Companion_instance_175;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_17(function_0) {
    this.bsy_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_17).t1d = function (value, $completion) {
    return this.bsy_1(value, $completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().z7k().aa5(this$0.gss_1, this$0.fss_1, false);
    };
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.ksy_1 = this$0;
    this.lsy_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).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 = whenSubscribed(this.ksy_1.bss_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0(this.msy_1, this.lsy_1, this.ksy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this.ksy_1, this.lsy_1, completion);
    i.msy_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda_0(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation) {
    this.vsy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.vsy_1.epc().z7k();
            var this_0 = new Comments();
            this_0.va5_1 = this.vsy_1.gss_1;
            this_0.wa5_1 = this.vsy_1.bss_1.t2().cst_1;
            this_0.ua5_1 = this.vsy_1.cpc();
            this_0.sa5_1 = this.vsy_1.fss_1;
            this_0.ra5_1 = this.vsy_1.dss_1.t2();
            this_0.za5_1 = systemTimeInMillis();
            suspendResult = tmp_0.xa4(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.vsy_1.dss_1.x1k('');
            tmp_1.xsy_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.vsy_1.kpc(Companion_getInstance_93().uov_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.vsy_1.kpc(Companion_getInstance_93().uov_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this.vsy_1, completion);
    i.wsy_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    this.gsz_1 = this$0;
    this.hsz_1 = $assignment;
    this.isz_1 = $draftMark;
    this.jsz_1 = $submissions;
    this.ksz_1 = $courseBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            var tmp_0 = _get_submitMarkUseCase__y8b5kx(this.gsz_1);
            var tmp_1 = this.gsz_1.apc().rn4().xmr_1;
            var this_0 = this.jsz_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.wje_1);
            }

            suspendResult = tmp_0.wng(tmp_1, this.hsz_1, this.gsz_1.hss_1, this.gsz_1.gss_1, this.isz_1, destination, this.ksz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_2 = this;
            l$ret$1: do {
              var this_1 = this.gsz_1.bss_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = new CourseAssignmentMark();
                this_2.abo_1 = -1.0;
                var nextValue = prevValue.kst(VOID, VOID, VOID, VOID, VOID, VOID, this_2);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_2.msz_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Exception) {
              var e = this.kd_1;
              var tmp_4 = this;
              this.gsz_1.gpc().bow(new Snack('Error: ' + e.message));
              Napier_getInstance().r5k('Exception submitting mark:', e);
              tmp_4.msz_1 = Unit_instance;
              this.id_1 = 5;
              this.hd_1 = 6;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            l$ret$5: do {
              var this_3 = this.gsz_1.bss_1;
              while (true) {
                var prevValue_0 = this_3.t2();
                var nextValue_0 = prevValue_0.kst(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_3.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            l$ret$7: do {
              var this_4 = this.gsz_1.bss_1;
              while (true) {
                var prevValue_1 = this_4.t2();
                var nextValue_1 = prevValue_1.kst(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_4.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 5) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this.gsz_1, this.hsz_1, this.isz_1, this.jsz_1, this.ksz_1, completion);
    i.lsz_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.vsz_1 = this$0;
    this.wsz_1 = $submissionFile;
    this.xsz_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.zsz_1 = _get_openBlobUiUseCase__fzusqz_0(this.vsz_1);
            if (this.zsz_1 == null) {
              this.at0_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.wsz_1);
              suspendResult = this.zsz_1.tnj(tmp_0, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this.vsz_1), this.xsz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.at0_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this.vsz_1, this.wsz_1, this.xsz_1, completion);
    i.ysz_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.jt0_1 = this$0;
    this.kt0_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).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.jt0_1.epc().z7k().ya4(this.kt0_1.qa5_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jt0_1.gpc().bow(new Snack(this.jt0_1.ipc().rnd(strings_getInstance().alk_1)));
            return Unit_instance;
          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);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this.jt0_1, this.kt0_1, completion);
    i.lt0_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignmentSubmitter');
    this.bss_1 = MutableStateFlow(new ClazzAssignmentSubmitterDetailUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ipc().hou()));
    this.css_1 = asStateFlow(this.bss_1);
    this.dss_1 = MutableStateFlow('');
    this.ess_1 = asStateFlow(this.dss_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('assignmentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No assignmentUid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.fss_1 = tmp_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('submitterUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_2;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No submitter uid');
    } else {
      tmp_2 = tmp1_elvis_lhs_0;
    }
    tmp_1.gss_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    var tmp_4;
    if (tmp1_elvis_lhs_1 == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid');
    } else {
      tmp_4 = tmp1_elvis_lhs_1;
    }
    tmp_3.hss_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.iss_1 = ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_7 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$1 = tmp_7.m5d(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_6.jss_1 = Instance(this_0, tmp$ret$3, null).f5j(this, assignmentSubmitterNameUseCase$factory());
    this.kss_1 = null;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.lss_1 = InstanceOrNull(this_1, tmp$ret$5, null).f5j(this, openBlobUiUseCase$factory_1());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.mss_1 = Instance(this_2, tmp$ret$7, null).f5j(this, submitMarkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.bss_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.<anonymous>' call
        var tmp_14 = this.apc().rn4().xmr_1.qjt();
        var tmp0_safe_receiver_2 = this.apc().rn4().zmr_1;
        var nextValue = prevValue.kst(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_14, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.y9c_1);
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var permissionFlow = this.epc().t7l().zdb(this.cpc(), this.fss_1, this.hss_1, this.gss_1);
    var tmp_15 = this.bpc();
    launch(tmp_15, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel).mt0 = function (text) {
    this.dss_1.x1k(text);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).nt0 = function () {
    if (this.lpc().equals(Companion_getInstance_93().tov_1))
      return Unit_instance;
    this.kpc(Companion_getInstance_93().tov_1);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).ot0 = function (draftMark) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bss_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onChangeDraftMark.<anonymous>' call
        var tmp;
        var tmp0_safe_receiver = prevValue.tss_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.abo_1;
        if (tmp_0 == (draftMark == null ? null : draftMark.abo_1)) {
          tmp = prevValue.nss_1;
        } else {
          tmp = null;
        }
        var tmp2_submitMarkError = tmp;
        var nextValue = prevValue.kst(tmp2_submitMarkError, VOID, VOID, VOID, VOID, VOID, draftMark);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).pt0 = function () {
    if (!this.bss_1.t2().qt0())
      return Unit_instance;
    var tmp0_elvis_lhs = this.bss_1.t2().tss_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var draftMark = tmp;
    var submissions = this.bss_1.t2().qss_1;
    var tmp1_elvis_lhs = this.bss_1.t2().oss_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var block = tmp_0;
    var tmp2_elvis_lhs = block.jcg_1;
    var tmp_1;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_1 = tmp2_elvis_lhs;
    }
    var courseBlock = tmp_1;
    var tmp3_elvis_lhs = block.kcg_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    var assignment = tmp_2;
    if (draftMark.abo_1 === -1.0) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.bss_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
          var nextValue = prevValue.kst(this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    } else {
      if (draftMark.abo_1 < 0.0) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_1 = this.bss_1;
          while (true) {
            var prevValue_0 = this_1.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
            var nextValue_0 = prevValue_0.kst(this.ipc().rnd(strings_getInstance().cmh_1));
            if (this_1.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      } else {
        var tmp_3 = draftMark.abo_1;
        var tmp4_elvis_lhs = courseBlock.z83_1;
        if (tmp_3 > (tmp4_elvis_lhs == null ? 0.0 : tmp4_elvis_lhs)) {
          $l$block_1: {
            // Inline function 'kotlinx.coroutines.flow.update' call
            var this_2 = this.bss_1;
            while (true) {
              var prevValue_1 = this_2.t2();
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
              var nextValue_1 = prevValue_1.kst(this.ipc().rnd(strings_getInstance().amm_1));
              if (this_2.y1k(prevValue_1, nextValue_1)) {
                break $l$block_1;
              }
            }
          }
          return Unit_instance;
        }
      }
    }
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.bss_1;
      while (true) {
        var prevValue_2 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
        var nextValue_2 = prevValue_2.kst(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_3.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_4 = this.bpc();
    launch(tmp_4, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this, assignment, draftMark, submissions, courseBlock, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).rt0 = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bss_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickGradeFilterChip.<anonymous>' call
        var nextValue = prevValue.kst(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.pow_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).asa = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bss_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.kst(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle(prevValue.hst_1, submission.zbt_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).dsa = function (file) {
    openSubmissionFileAsBlob_0(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).esa = function (comments) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq_0($this) {
    return latestUniqueMarksByMarker($this.sss_1);
  }
  function sam$kotlin_Comparator$0_1(function_0) {
    this.st0_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_1).pa = function (a, b) {
    return this.st0_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {
    return this.pa(a, b);
  };
  function ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver = b.gbo_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dbo_1;
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver_0 = a.gbo_1;
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.dbo_1;
    var tmp$ret$1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    submitMarkError = submitMarkError === VOID ? null : submitMarkError;
    block = block === VOID ? null : block;
    gradeFilterChips = gradeFilterChips === VOID ? emptyList() : gradeFilterChips;
    submissionList = submissionList === VOID ? emptyList() : submissionList;
    submissionAttachments = submissionAttachments === VOID ? emptyList() : submissionAttachments;
    marks = marks === VOID ? emptyList() : marks;
    draftMark = draftMark === VOID ? null : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? false : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? true : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp;
    if (markListSelectedChipId === VOID) {
      tmp = 1;
    } else {
      tmp = markListSelectedChipId;
    }
    markListSelectedChipId = tmp;
    var tmp_0;
    if (markListFilterOptions === VOID) {
      var tmp_1 = strings_getInstance().lml_1;
      var tmp_2 = new MessageIdOption2(tmp_1, 1);
      var tmp_3 = strings_getInstance().zlz_1;
      tmp_0 = listOf([tmp_2, new MessageIdOption2(tmp_3, 0)]);
    } else {
      tmp_0 = markListFilterOptions;
    }
    markListFilterOptions = tmp_0;
    var tmp_4;
    if (privateCommentsList === VOID) {
      tmp_4 = ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher;
    } else {
      tmp_4 = privateCommentsList;
    }
    privateCommentsList = tmp_4;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? false : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? new Long(0, 0) : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? null : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    this.nss_1 = submitMarkError;
    this.oss_1 = block;
    this.pss_1 = gradeFilterChips;
    this.qss_1 = submissionList;
    this.rss_1 = submissionAttachments;
    this.sss_1 = marks;
    this.tss_1 = draftMark;
    this.uss_1 = markSubmissionInProgress;
    this.vss_1 = markNextStudentVisible;
    this.wss_1 = fieldsEnabled;
    this.xss_1 = markListSelectedChipId;
    this.yss_1 = markListFilterOptions;
    this.zss_1 = privateCommentsList;
    this.ast_1 = newPrivateCommentTextVisible;
    this.bst_1 = activeUserPersonUid;
    this.cst_1 = activeUserSubmitterId;
    this.dst_1 = activeUserPersonName;
    this.est_1 = activeUserPictureUri;
    this.fst_1 = localDateTimeNow;
    this.gst_1 = dayOfWeekStrings;
    this.hst_1 = collapsedSubmissions;
    this.ist_1 = openingFileState;
    this.jst_1 = showModerateOptions;
  }
  protoOf(ClazzAssignmentSubmitterDetailUiState).qt0 = function () {
    var tmp;
    if (!this.uss_1) {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-markFieldsEnabled>.<anonymous>' call
      var it = this.oss_1;
      var tmp_0;
      if (!((it == null ? null : it.kcg_1) == null)) {
        tmp_0 = !(it.jcg_1 == null);
      } else {
        tmp_0 = false;
      }
      tmp = tmp_0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).osa = function () {
    return submissionStatusFor(this.sss_1, this.qss_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).tt0 = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>' call
    var latestUniqueMarks = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUniqueMarks.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      var tmp = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.gbo_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.abo_1;
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    var tmp_0 = sum;
    // Inline function 'kotlin.math.max' call
    var a = latestUniqueMarks.u();
    return tmp_0 / Math.max(a, 1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).ut0 = function (mark) {
    return new UstadCourseAssignmentMarkListItemUiState(mark, this.fst_1, this.gst_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).vt0 = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.sss_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        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 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.gbo_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xbn_1, this.cst_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().jmk_1;
    } else {
      tmp = strings_getInstance().zmg_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).wt0 = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.sss_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        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 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonAndGoNextMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.gbo_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xbn_1, this.cst_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().kmk_1;
    } else {
      tmp = strings_getInstance().amh_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).tsa = function () {
    var tmp;
    if (this.xss_1 === 1) {
      // Inline function 'kotlin.collections.sortedByDescending' call
      var this_0 = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
      // Inline function 'kotlin.comparisons.compareByDescending' call
      var tmp_0 = ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk;
      var tmp$ret$0 = new sam$kotlin_Comparator$0_1(tmp_0);
      tmp = sortedWith(this_0, tmp$ret$0);
    } else {
      tmp = this.sss_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).xt0 = function () {
    return hasUpdatedMarks(this.sss_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).yt0 = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.sss_1.c1();
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).zt0 = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    return new ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).kst = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions, $super) {
    submitMarkError = submitMarkError === VOID ? this.nss_1 : submitMarkError;
    block = block === VOID ? this.oss_1 : block;
    gradeFilterChips = gradeFilterChips === VOID ? this.pss_1 : gradeFilterChips;
    submissionList = submissionList === VOID ? this.qss_1 : submissionList;
    submissionAttachments = submissionAttachments === VOID ? this.rss_1 : submissionAttachments;
    marks = marks === VOID ? this.sss_1 : marks;
    draftMark = draftMark === VOID ? this.tss_1 : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? this.uss_1 : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? this.vss_1 : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? this.wss_1 : fieldsEnabled;
    markListSelectedChipId = markListSelectedChipId === VOID ? this.xss_1 : markListSelectedChipId;
    markListFilterOptions = markListFilterOptions === VOID ? this.yss_1 : markListFilterOptions;
    privateCommentsList = privateCommentsList === VOID ? this.zss_1 : privateCommentsList;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? this.ast_1 : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.bst_1 : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? this.cst_1 : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? this.dst_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.est_1 : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? this.fst_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.gst_1 : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.hst_1 : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? this.ist_1 : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? this.jst_1 : showModerateOptions;
    return $super === VOID ? this.zt0(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) : $super.zt0.call(this, submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).toString = function () {
    return 'ClazzAssignmentSubmitterDetailUiState(submitMarkError=' + this.nss_1 + ', block=' + this.oss_1 + ', gradeFilterChips=' + this.pss_1 + ', submissionList=' + this.qss_1 + ', submissionAttachments=' + this.rss_1 + ', marks=' + this.sss_1 + ', draftMark=' + this.tss_1 + ', markSubmissionInProgress=' + this.uss_1 + ', markNextStudentVisible=' + this.vss_1 + ', fieldsEnabled=' + this.wss_1 + ', markListSelectedChipId=' + this.xss_1 + ', markListFilterOptions=' + this.yss_1 + ', privateCommentsList=' + this.zss_1 + ', newPrivateCommentTextVisible=' + this.ast_1 + ', activeUserPersonUid=' + this.bst_1.toString() + ', activeUserSubmitterId=' + this.cst_1.toString() + ', activeUserPersonName=' + this.dst_1 + ', activeUserPictureUri=' + this.est_1 + ', localDateTimeNow=' + this.fst_1 + ', dayOfWeekStrings=' + this.gst_1 + ', collapsedSubmissions=' + this.hst_1 + ', openingFileState=' + this.ist_1 + ', showModerateOptions=' + this.jst_1 + ')';
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).hashCode = function () {
    var result = this.nss_1 == null ? 0 : getStringHashCode(this.nss_1);
    result = imul(result, 31) + (this.oss_1 == null ? 0 : this.oss_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.pss_1) | 0;
    result = imul(result, 31) + hashCode(this.qss_1) | 0;
    result = imul(result, 31) + hashCode(this.rss_1) | 0;
    result = imul(result, 31) + hashCode(this.sss_1) | 0;
    result = imul(result, 31) + (this.tss_1 == null ? 0 : hashCode(this.tss_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uss_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vss_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wss_1) | 0;
    result = imul(result, 31) + this.xss_1 | 0;
    result = imul(result, 31) + hashCode(this.yss_1) | 0;
    result = imul(result, 31) + hashCode(this.zss_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ast_1) | 0;
    result = imul(result, 31) + this.bst_1.hashCode() | 0;
    result = imul(result, 31) + this.cst_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.dst_1) | 0;
    result = imul(result, 31) + (this.est_1 == null ? 0 : getStringHashCode(this.est_1)) | 0;
    result = imul(result, 31) + this.fst_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.gst_1) | 0;
    result = imul(result, 31) + hashCode(this.hst_1) | 0;
    result = imul(result, 31) + (this.ist_1 == null ? 0 : this.ist_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jst_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentSubmitterDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentSubmitterDetailUiState ? other : THROW_CCE();
    if (!(this.nss_1 == tmp0_other_with_cast.nss_1))
      return false;
    if (!equals(this.oss_1, tmp0_other_with_cast.oss_1))
      return false;
    if (!equals(this.pss_1, tmp0_other_with_cast.pss_1))
      return false;
    if (!equals(this.qss_1, tmp0_other_with_cast.qss_1))
      return false;
    if (!equals(this.rss_1, tmp0_other_with_cast.rss_1))
      return false;
    if (!equals(this.sss_1, tmp0_other_with_cast.sss_1))
      return false;
    if (!equals(this.tss_1, tmp0_other_with_cast.tss_1))
      return false;
    if (!(this.uss_1 === tmp0_other_with_cast.uss_1))
      return false;
    if (!(this.vss_1 === tmp0_other_with_cast.vss_1))
      return false;
    if (!(this.wss_1 === tmp0_other_with_cast.wss_1))
      return false;
    if (!(this.xss_1 === tmp0_other_with_cast.xss_1))
      return false;
    if (!equals(this.yss_1, tmp0_other_with_cast.yss_1))
      return false;
    if (!equals(this.zss_1, tmp0_other_with_cast.zss_1))
      return false;
    if (!(this.ast_1 === tmp0_other_with_cast.ast_1))
      return false;
    if (!this.bst_1.equals(tmp0_other_with_cast.bst_1))
      return false;
    if (!this.cst_1.equals(tmp0_other_with_cast.cst_1))
      return false;
    if (!(this.dst_1 === tmp0_other_with_cast.dst_1))
      return false;
    if (!(this.est_1 == tmp0_other_with_cast.est_1))
      return false;
    if (!this.fst_1.equals(tmp0_other_with_cast.fst_1))
      return false;
    if (!equals(this.gst_1, tmp0_other_with_cast.gst_1))
      return false;
    if (!equals(this.hst_1, tmp0_other_with_cast.hst_1))
      return false;
    if (!equals(this.ist_1, tmp0_other_with_cast.ist_1))
      return false;
    if (!(this.jst_1 === tmp0_other_with_cast.jst_1))
      return false;
    return true;
  };
  function assignmentSubmitterNameUseCase$factory() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_1() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function assignmentSubmitterNameUseCase$factory_0() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_2() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory_0() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.fpk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nt1(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wt1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).yt1 = function (nameAndTerminology, $completion) {
    var tmp = this.zt1(nameAndTerminology, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.yt1((p1 == null ? true : p1 instanceof ClazzNameAndTerminology) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp1_currentTerminologyStrings = this.wt1_1.fpk_1.t2().kt1_1;
          var tmp0_safe_receiver = this.xt1_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o8r_1;
          var tmp3_json = this.wt1_1.r4x();
          var tmp4_systemImpl = this.wt1_1.ipc();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this.wt1_1));
          l$ret$1: do {
            var this_0 = this.wt1_1.opb_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver_0 = this.xt1_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.n8r_1;
              var nextValue = prevValue.mov(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).zt1 = function (nameAndTerminology, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this.wt1_1, completion);
    i.xt1_1 = nameAndTerminology;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (nameAndTerminology, $completion) {
      return i.yt1(nameAndTerminology, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.it2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).wrl = function (it, $completion) {
    var tmp = this.xrl(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.wrl(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.it2_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nt1(VOID, VOID, VOID, this.jt2_1.wde_1, this.jt2_1.xde_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).xrl = function (it, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this.it2_1, completion);
    i.jt2_1 = it;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wrl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.st2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).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;
            var tmp_0 = this.st2_1.epc().t7j().v8i(this.st2_1.vt3_1);
            var tmp_1 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this.st2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this.st2_1, completion);
    i.tt2_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ht4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = this.ht4_1.dpc().t7l();
            var tmp_1 = this.ht4_1.cpc();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.vdb(tmp_1, this.ht4_1.vt3_1, tmp_2, new Long(8, 0)));
            var tmp_4 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this.ht4_1, null);
            suspendResult = tmp_3.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this.ht4_1, completion);
    i.it4_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.rt4_1 = $this_launch;
    this.st4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.rt4_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_0(this.st4_1, null));
          launch(this.rt4_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_2(this.st4_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzMemberListViewModel$slambda$slambda(this.rt4_1, this.st4_1, completion);
  };
  function ClazzMemberListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation) {
    this.bt5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).lq5 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).he = function (p1, $completion) {
    return this.lq5(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).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.ct5_1.t7j().n8i(this.bt5_1.vt3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j8k_1;
          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);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).tmw = function (it, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this.bt5_1, completion);
    i.ct5_1 = it;
    return i;
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.lq5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ut3_1;
    approveOrDeclinePendingEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function getMembersAsPagingSource($this, roleId) {
    var tmp0_$this = $this.epc().y7j();
    var tmp1_clazzUid = $this.vt3_1;
    var tmp2_sortOrder = $this.fpk_1.t2().gt1_1.kp1_1;
    var tmp3_filter = $this.fpk_1.t2().it1_1;
    var tmp4_searchText = toQueryLikeParam($this.opb_1.t2().eov_1.tou_1);
    var tmp5_accountPersonUid = $this.cpc();
    var tmp6_currentTime = systemTimeInMillis();
    PermissionFlags_getInstance();
    var tmp7_permission = new Long(8192, 0);
    return tmp0_$this.d99(tmp1_clazzUid, roleId, tmp2_sortOrder, tmp4_searchText, tmp3_filter, tmp5_accountPersonUid, tmp6_currentTime, tmp7_permission);
  }
  function Companion_128() {
    this.dt5_1 = 'CourseMembers';
  }
  var Companion_instance_176;
  function Companion_getInstance_146() {
    return Companion_instance_176;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_18(function_0) {
    this.et5_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_18).t1d = function (value, $completion) {
    return this.et5_1(value, $completion);
  };
  function ClazzMemberListViewModel$teacherListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, 1001);
    };
  }
  function ClazzMemberListViewModel$studentListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, 1000);
    };
  }
  function ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this$0) {
    return function () {
      var tmp0_$this = this$0.epc().s7l();
      var tmp1_clazzUid = this$0.vt3_1;
      var tmp2_searchText = toQueryLikeParam(this$0.opb_1.t2().eov_1.tou_1);
      var tmp4_sortOrder = this$0.fpk_1.t2().gt1_1.kp1_1;
      return tmp0_$this.kep(tmp1_clazzUid, false, 1, tmp2_searchText, tmp4_sortOrder);
    };
  }
  function ClazzMemberListViewModel$slambda(this$0, resultContinuation) {
    this.nt5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda).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 = whenSubscribed(this.nt5_1.fpk_1, ClazzMemberListViewModel$slambda$slambda_0(this.ot5_1, this.nt5_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzMemberListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda(this.nt5_1, completion);
    i.ot5_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation) {
    this.xt5_1 = this$0;
    this.yt5_1 = $enrolmentDetails;
    this.zt5_1 = $approved;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(this.xt5_1).hnu(this.yt5_1, this.zt5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this.xt5_1.gpc();
            var tmp_1 = this.xt5_1.ipc();
            var tmp_2 = this.zt5_1 ? strings_getInstance().omn_1 : strings_getInstance().pmn_1;
            var tmp0_elvis_lhs = this.yt5_1.deq_1;
            tmp_0.bow(new Snack(tmp_1.snd(tmp_2, [tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs])));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              var tmp_4 = this.xt5_1.gpc();
              var tmp_5 = this.xt5_1.ipc().rnd(strings_getInstance().hlj_1);
              var tmp1_elvis_lhs = e.message;
              tmp_4.bow(new Snack(tmp_5 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this.xt5_1, this.yt5_1, this.zt5_1, completion);
    i.at6_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this$0, $enrolmentDetails, $approved, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation) {
    this.jt6_1 = this$0;
    this.kt6_1 = $role;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.jt6_1.epc();
            var tmp_1;
            if (this.kt6_1 === 1000) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.mt6_1 = tmp_1;
            if (this.mt6_1 == null) {
              this.nt6_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = localFirstThenRepoIfNull(this.mt6_1, ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this.jt6_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.nt6_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var clazzCode = this.nt6_1;
            var tmp_2;
            if (this.kt6_1 === 1000) {
              tmp_2 = strings_getInstance().jlm_1;
            } else {
              tmp_2 = strings_getInstance().vly_1;
            }

            var titleStringResource = tmp_2;
            var tmp1_safe_receiver = this.jt6_1.fpk_1.t2().kt1_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gox(titleStringResource);
            var title = tmp2_elvis_lhs == null ? this.jt6_1.ipc().rnd(titleStringResource) : tmp2_elvis_lhs;
            Companion_getInstance_110();
            var tmp_3 = to('clazzUid', this.jt6_1.vt3_1.toString());
            Companion_getInstance_110();
            var tmp_4 = to('popUpToOnFinish', this.jt6_1.lpb_1);
            var goToOnPersonSelectedArg = appendQueryArgs('EnrolmentEdit', mapOf([tmp_3, tmp_4, to('role', this.kt6_1.toString())]));
            var this_1 = LinkedHashMap_init_$Create$();
            Companion_getInstance_190();
            this_1.s('exlcudeFromClazz', this.jt6_1.vt3_1.toString());
            Companion_getInstance_110();
            this_1.s('listMode', ListViewMode_PICKER_getInstance().np8_1);
            this_1.s('goToOnPersonSelected', goToOnPersonSelectedArg);
            Companion_getInstance_120();
            this_1.s('t', title);
            Companion_getInstance_190();
            PermissionFlags_getInstance();
            this_1.s('rptsl', (new Long(2048, 0)).toString());
            if (!(clazzCode == null)) {
              Companion_getInstance_190();
              this_1.s('showAddViaInviteLink', clazzCode);
            }

            var args = this_1.f3();
            Companion_getInstance_190();
            this.jt6_1.mpb_1.fo0('People', args);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this.jt6_1, this.kt6_1, completion);
    i.lt6_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this$0, $role, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel(di, savedStateHandle) {
    var tmp = new ClazzMemberListUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'Course');
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_1 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp$ret$1 = tmp_1.m5d(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_0.ut3_1 = Instance(this_0, tmp$ret$3, null).f5j(this, approveOrDeclinePendingEnrolmentUseCase$factory());
    var tmp_4 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_5;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_5 = tmp1_elvis_lhs;
    }
    tmp_4.vt3_1 = tmp_5;
    var tmp_6 = this;
    tmp_6.wt3_1 = ClazzMemberListViewModel$teacherListPagingSource$lambda(this);
    var tmp_7 = this;
    tmp_7.xt3_1 = ClazzMemberListViewModel$studentListPagingSource$lambda(this);
    var tmp_8 = this;
    tmp_8.yt3_1 = ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fpk_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$5 = this.ipc().rnd(get_dayStringResource(element));
          result.s(element, tmp$ret$5);
        }
        var nextValue = prevValue.nt1(this.xt3_1, this.wt3_1, this.yt3_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.opb_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, true, VOID, VOID, VOID, this.opl(), new ActionBarButtonUiState(false));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_9 = this.bpc();
    launch(tmp_9, VOID, VOID, ClazzMemberListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzMemberListViewModel).zpk = function (searchText) {
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).apl = function () {
  };
  protoOf(ClazzMemberListViewModel).yrd = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.nt1(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, filterOption.pow_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).ot6 = function (enrolmentDetails, approved) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this, enrolmentDetails, approved, null));
  };
  protoOf(ClazzMemberListViewModel).pt6 = function (role) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this, role, null));
  };
  protoOf(ClazzMemberListViewModel).qt6 = function (entry) {
    Companion_getInstance_110();
    var tmp0_safe_receiver = entry.s9b_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x9b_1;
    var tmp = to('personUid', (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString());
    Companion_getInstance_110();
    this.mpb_1.fo0('CourseEnrolments', mapOf([tmp, to('clazzUid', this.vt3_1.toString())]));
  };
  protoOf(ClazzMemberListViewModel).xrd = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.nt1(VOID, VOID, VOID, VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.hpk_1.i1h(new RefreshCommand());
  };
  function ClazzMemberListUiState$_init_$lambda_dc27oi() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_0() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_1() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState(studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (studentList === VOID) {
      tmp = ClazzMemberListUiState$_init_$lambda_dc27oi;
    } else {
      tmp = studentList;
    }
    studentList = tmp;
    var tmp_0;
    if (teacherList === VOID) {
      tmp_0 = ClazzMemberListUiState$_init_$lambda_dc27oi_0;
    } else {
      tmp_0 = teacherList;
    }
    teacherList = tmp_0;
    var tmp_1;
    if (pendingStudentList === VOID) {
      tmp_1 = ClazzMemberListUiState$_init_$lambda_dc27oi_1;
    } else {
      tmp_1 = pendingStudentList;
    }
    pendingStudentList = tmp_1;
    addTeacherVisible = addTeacherVisible === VOID ? false : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? false : addStudentVisible;
    var tmp_2;
    if (sortOptions === VOID) {
      var tmp_3 = strings_getInstance().rlk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 1, true);
      var tmp_5 = strings_getInstance().rlk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 2, false);
      var tmp_7 = strings_getInstance().qlk_1;
      var tmp_8 = new SortOrderOption(tmp_7, 3, true);
      var tmp_9 = strings_getInstance().qlk_1;
      var tmp_10 = new SortOrderOption(tmp_9, 4, false);
      var tmp_11 = strings_getInstance().plx_1;
      var tmp_12 = new SortOrderOption(tmp_11, 7, true);
      var tmp_13 = strings_getInstance().plx_1;
      var tmp_14 = new SortOrderOption(tmp_13, 8, false);
      var tmp_15 = strings_getInstance().qlx_1;
      var tmp_16 = new SortOrderOption(tmp_15, 9, true);
      var tmp_17 = strings_getInstance().qlx_1;
      tmp_2 = listOf([tmp_4, tmp_6, tmp_8, tmp_10, tmp_12, tmp_14, tmp_16, new SortOrderOption(tmp_17, 10, false)]);
    } else {
      tmp_2 = sortOptions;
    }
    sortOptions = tmp_2;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_18;
    if (selectedChipId === VOID) {
      tmp_18 = 1;
    } else {
      tmp_18 = selectedChipId;
    }
    selectedChipId = tmp_18;
    var tmp_19;
    if (filterOptions === VOID) {
      var tmp_20 = strings_getInstance().gm0_1;
      tmp_19 = listOf([new MessageIdOption2(tmp_20, 1), new MessageIdOption2(strings_getInstance().zlz_1, 0)]);
    } else {
      tmp_19 = filterOptions;
    }
    filterOptions = tmp_19;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.at1_1 = studentList;
    this.bt1_1 = teacherList;
    this.ct1_1 = pendingStudentList;
    this.dt1_1 = addTeacherVisible;
    this.et1_1 = addStudentVisible;
    this.ft1_1 = sortOptions;
    this.gt1_1 = activeSortOrderOption;
    this.ht1_1 = fieldsEnabled;
    this.it1_1 = selectedChipId;
    this.jt1_1 = filterOptions;
    this.kt1_1 = terminologyStrings;
    this.lt1_1 = localDateTimeNow;
    this.mt1_1 = dayOfWeekStrings;
  }
  protoOf(ClazzMemberListUiState).rt6 = function (studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    return new ClazzMemberListUiState(studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).nt1 = function (studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings, $super) {
    studentList = studentList === VOID ? this.at1_1 : studentList;
    teacherList = teacherList === VOID ? this.bt1_1 : teacherList;
    pendingStudentList = pendingStudentList === VOID ? this.ct1_1 : pendingStudentList;
    addTeacherVisible = addTeacherVisible === VOID ? this.dt1_1 : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? this.et1_1 : addStudentVisible;
    sortOptions = sortOptions === VOID ? this.ft1_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.gt1_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.ht1_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.it1_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.jt1_1 : filterOptions;
    terminologyStrings = terminologyStrings === VOID ? this.kt1_1 : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.lt1_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.mt1_1 : dayOfWeekStrings;
    return $super === VOID ? this.rt6(studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) : $super.rt6.call(this, studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).toString = function () {
    return 'ClazzMemberListUiState(studentList=' + this.at1_1 + ', teacherList=' + this.bt1_1 + ', pendingStudentList=' + this.ct1_1 + ', addTeacherVisible=' + this.dt1_1 + ', addStudentVisible=' + this.et1_1 + ', sortOptions=' + this.ft1_1 + ', activeSortOrderOption=' + this.gt1_1 + ', fieldsEnabled=' + this.ht1_1 + ', selectedChipId=' + this.it1_1 + ', filterOptions=' + this.jt1_1 + ', terminologyStrings=' + this.kt1_1 + ', localDateTimeNow=' + this.lt1_1 + ', dayOfWeekStrings=' + this.mt1_1 + ')';
  };
  protoOf(ClazzMemberListUiState).hashCode = function () {
    var result = hashCode(this.at1_1);
    result = imul(result, 31) + hashCode(this.bt1_1) | 0;
    result = imul(result, 31) + hashCode(this.ct1_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dt1_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.et1_1) | 0;
    result = imul(result, 31) + hashCode(this.ft1_1) | 0;
    result = imul(result, 31) + this.gt1_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ht1_1) | 0;
    result = imul(result, 31) + this.it1_1 | 0;
    result = imul(result, 31) + hashCode(this.jt1_1) | 0;
    result = imul(result, 31) + (this.kt1_1 == null ? 0 : this.kt1_1.hashCode()) | 0;
    result = imul(result, 31) + this.lt1_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.mt1_1) | 0;
    return result;
  };
  protoOf(ClazzMemberListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzMemberListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzMemberListUiState ? other : THROW_CCE();
    if (!equals(this.at1_1, tmp0_other_with_cast.at1_1))
      return false;
    if (!equals(this.bt1_1, tmp0_other_with_cast.bt1_1))
      return false;
    if (!equals(this.ct1_1, tmp0_other_with_cast.ct1_1))
      return false;
    if (!(this.dt1_1 === tmp0_other_with_cast.dt1_1))
      return false;
    if (!(this.et1_1 === tmp0_other_with_cast.et1_1))
      return false;
    if (!equals(this.ft1_1, tmp0_other_with_cast.ft1_1))
      return false;
    if (!this.gt1_1.equals(tmp0_other_with_cast.gt1_1))
      return false;
    if (!(this.ht1_1 === tmp0_other_with_cast.ht1_1))
      return false;
    if (!(this.it1_1 === tmp0_other_with_cast.it1_1))
      return false;
    if (!equals(this.jt1_1, tmp0_other_with_cast.jt1_1))
      return false;
    if (!equals(this.kt1_1, tmp0_other_with_cast.kt1_1))
      return false;
    if (!this.lt1_1.equals(tmp0_other_with_cast.lt1_1))
      return false;
    if (!equals(this.mt1_1, tmp0_other_with_cast.mt1_1))
      return false;
    return true;
  };
  function approveOrDeclinePendingEnrolmentUseCase$factory() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function approveOrDeclinePendingEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.at7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).et7 = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.et7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.bt7_1.y7j();
            var tmp_1;
            if (!this.at7_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.ct7_1 = tmp_1;
            if (this.ct7_1 == null) {
              this.dt7_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ct7_1.z98(this.at7_1.qph_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.dt7_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.dt7_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this.at7_1, completion);
    i.bt7_1 = db;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.et7(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.nt7_1 = $savedStateHandle;
    this.ot7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).rt7 = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.rt7($completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.pt7_1 = new ClazzEnrolmentWithLeavingReason();
            var tmp_1 = this;
            tmp_1.qt7_1 = this.pt7_1;
            var tmp_2 = this.qt7_1;
            Companion_getInstance_110();
            var tmp0_safe_receiver = this.nt7_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_3;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No clazzUid for enrolment!');
            } else {
              tmp_3 = tmp1_elvis_lhs;
            }

            tmp_2.y8n_1 = tmp_3;
            var tmp_4 = this.qt7_1;
            Companion_getInstance_110();
            var tmp2_safe_receiver = this.nt7_1.ba('personUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            var tmp_5;
            if (tmp3_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No personuid for enrolment!');
            } else {
              tmp_5 = tmp3_elvis_lhs;
            }

            tmp_4.x8n_1 = tmp_5;
            this.qt7_1.z8n_1 = systemTimeInMillis();
            var tmp_6 = this.qt7_1;
            var tmp4_safe_receiver = this.nt7_1.ba('role');
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toInt(tmp4_safe_receiver);
            var tmp_7;
            if (tmp5_elvis_lhs == null) {
              tmp_7 = 1000;
            } else {
              tmp_7 = tmp5_elvis_lhs;
            }

            tmp_6.b8o_1 = tmp_7;
            this.hd_1 = 1;
            suspendResult = this.ot7_1.epc().t7j().x8i(this.qt7_1.y8n_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp6_elvis_lhs = suspendResult;
            var tmp_8;
            if (tmp6_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not find timezone for clazzUid');
            } else {
              tmp_8 = tmp6_elvis_lhs;
            }

            var ARGUMENT = tmp_8;
            this.qt7_1.k9a_1 = ARGUMENT;
            return this.pt7_1;
          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);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ClazzEnrolmentEditViewModel$slambda$slambda_1(this.nt7_1, this.ot7_1, completion);
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.rt7($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pt8_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zt8(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.it9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).kt9 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.kt9((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).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;
            var tmp_0 = this.it9_1.epc().v7j();
            var tmp0_safe_receiver = this.it9_1.pt8_1.t2().st8_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y8n_1;
            suspendResult = tmp_0.tdy(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).v1m = function ($this$async, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this.it9_1, completion);
    i.jt9_1 = $this$async;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.kt9($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get_enrolIntoCourseUseCase__jh2n4b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rt8_1;
    enrolIntoCourseUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_1(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.tt8_1 == null) ? true : !(_this__u8e3s4.ut8_1 == null)) ? true : !(_this__u8e3s4.vt8_1 == null);
  }
  function Companion_129() {
    this.lt9_1 = 'EnrolmentEdit';
    this.mt9_1 = 'role';
  }
  var Companion_instance_177;
  function Companion_getInstance_147() {
    return Companion_instance_177;
  }
  function ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation) {
    this.vt9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).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.wt9_1.t7l().tdb(this.vt9_1.cpc(), this.vt9_1.qph_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).tmw = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this.vt9_1, completion);
    i.wt9_1 = db;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.fta_1 = this$0;
    this.gta_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_34.s4x();
            var tmp_1 = ClazzEnrolmentEditViewModel$slambda$slambda_0(this.fta_1, null);
            var tmp_2 = ClazzEnrolmentEditViewModel$slambda$slambda_2(this.gta_1, this.fta_1, null);
            suspendResult = this.fta_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEnrolmentEditViewModel$slambda$lambda(this.fta_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = this.fta_1.dpc().t7l();
            var tmp_4 = this.fta_1.cpc();
            var tmp0_safe_receiver = this.fta_1.pt8_1.t2().st8_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y8n_1;
            var tmp_5 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            PermissionFlags_getInstance();
            var tmp_6 = new Long(8, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_3.wdb(tmp_4, tmp_5, tmp_6, new Long(16, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ita_1 = suspendResult;
            this.jta_1 = this.ita_1.y6();
            this.kta_1 = this.ita_1.z6();
            var tmp_7 = this;
            tmp_7.lta_1 = async(this.hta_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda$slambda_4(this.fta_1, null));
            var tmp_8 = this;
            var this_0 = ArrayList_init_$Create$();
            if (this.jta_1) {
              this_0.i1(1000);
            }

            if (this.kta_1) {
              this_0.i1(1001);
            }

            tmp_8.mta_1 = this_0.f3();
            this.hd_1 = 3;
            suspendResult = this.lta_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_safe_receiver = suspendResult;
            var tmp_9;
            if (tmp3_safe_receiver == null) {
              tmp_9 = null;
            } else {
              tmp_9 = CourseTerminologyStrings_init_$Create$(tmp3_safe_receiver, this.fta_1.ipc(), this.fta_1.r4x());
            }

            var terminologyStrings = tmp_9;
            l$ret$1: do {
              var this_1 = this.fta_1.pt8_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.zt8(VOID, VOID, VOID, VOID, true, terminologyStrings, this.mta_1);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_2 = this.fta_1.opb_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp_10 = Companion_getInstance_93().uov_1;
                var tmp_11 = this.fta_1.ipc().rnd(strings_getInstance().hm3_1);
                var nextValue_0 = prevValue_0.mov(VOID, tmp_10, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_11, VOID, ClazzEnrolmentEditViewModel$onClickSave$ref(this.fta_1)));
                if (this_2.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this.fta_1, this.gta_1, completion);
    i.hta_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.vta_1 = $commitDelay;
    this.wta_1 = $entity;
    this.xta_1 = $this;
    this.yta_1 = $key;
    this.zta_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.vta_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.wta_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.xta_1.opc(this.xta_1.kpb_1, this.yta_1, this.zta_1, this.wta_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda(this.vta_1, this.wta_1, this.xta_1, this.yta_1, this.zta_1, completion);
    i.atb_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation) {
    this.jtb_1 = this$0;
    this.ktb_1 = $entity;
    this.ltb_1 = $timeZoneVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (this.jtb_1.qph_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_enrolIntoCourseUseCase__jh2n4b(this.jtb_1).tnt(this.ktb_1, this.ltb_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.jtb_1.dpc().y7j().a99(this.ktb_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            Companion_getInstance_110();
            var popUpToOnFinish = this.jtb_1.kpb_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.jtb_1.mpb_1.eoy(popUpToOnFinish, false);
            } else {
              this.jtb_1.tph(this.ktb_1);
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this.jtb_1, this.ktb_1, this.ltb_1, completion);
    i.mtb_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this$0, $entity, $timeZoneVal, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EnrolmentEdit');
    this.pt8_1 = MutableStateFlow(new ClazzEnrolmentEditUiState(VOID, VOID, VOID, VOID, false));
    this.qt8_1 = asStateFlow(this.pt8_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.rt8_1 = Instance(this_0, tmp$ret$0, null).f5j(this, enrolIntoCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, Companion_getInstance_93().tov_1, this.upi(strings_getInstance().zlx_1, strings_getInstance().ylx_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzEnrolmentEditViewModel$slambda_0(this, null);
    this.upc(tmp_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ClazzEnrolmentEditViewModel).ntb = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pt8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.st8_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b8o_1;
        var tmp_0 = this.vpi(tmp, entity == null ? null : entity.b8o_1, prevValue.tt8_1);
        var tmp2_safe_receiver = prevValue.st8_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.z8n_1;
        var nextValue = prevValue.zt8(entity, tmp_0, this.vpi(tmp_1, entity == null ? null : entity.z8n_1, prevValue.ut8_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_34.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.bpc();
    tmp_2.pph_1 = launch(tmp_3, VOID, VOID, ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEnrolmentEditViewModel).mq0 = function () {
    if (this.lpc().equals(Companion_getInstance_93().tov_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.pt8_1.t2().st8_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    var timeZoneVal = entity.k9a_1;
    if (timeZoneVal == null) {
      this.gpc().bow(new Snack('Error: no time zone for course'));
      return Unit_instance;
    }
    this.kpc(Companion_getInstance_93().tov_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pt8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.zt8(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (entity.b8o_1 === 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.pt8_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.zt8(VOID, this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    if (entity.z8n_1.c7(toLong(imul(get_MS_PER_HOUR(), 24))) <= 0) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.pt8_1;
        while (true) {
          var prevValue_1 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.zt8(VOID, VOID, this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (entity.a8o_1.c7(entity.z8n_1) <= 0) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.pt8_1;
        while (true) {
          var prevValue_2 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.zt8(VOID, VOID, VOID, this.ipc().rnd(strings_getInstance().sm9_1));
          if (this_3.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
    }
    if (hasErrors_1(this.pt8_1.t2(), this)) {
      $l$block_3: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.pt8_1;
        while (true) {
          var prevValue_3 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_3 = prevValue_3.zt8(VOID, VOID, VOID, VOID, true);
          if (this_4.y1k(prevValue_3, nextValue_3)) {
            break $l$block_3;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this, entity, timeZoneVal, null));
  };
  function ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    clazzEnrolment = clazzEnrolment === VOID ? null : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? null : roleSelectedError;
    startDateError = startDateError === VOID ? null : startDateError;
    endDateError = endDateError === VOID ? null : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    var tmp;
    if (roleOptions === VOID) {
      tmp = listOf([1000, 1001]);
    } else {
      tmp = roleOptions;
    }
    roleOptions = tmp;
    this.st8_1 = clazzEnrolment;
    this.tt8_1 = roleSelectedError;
    this.ut8_1 = startDateError;
    this.vt8_1 = endDateError;
    this.wt8_1 = fieldsEnabled;
    this.xt8_1 = courseTerminology;
    this.yt8_1 = roleOptions;
  }
  protoOf(ClazzEnrolmentEditUiState).otb = function () {
    var tmp0_safe_receiver = this.st8_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b8o_1;
    return tmp === 1000;
  };
  protoOf(ClazzEnrolmentEditUiState).ptb = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    return new ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).zt8 = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions, $super) {
    clazzEnrolment = clazzEnrolment === VOID ? this.st8_1 : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? this.tt8_1 : roleSelectedError;
    startDateError = startDateError === VOID ? this.ut8_1 : startDateError;
    endDateError = endDateError === VOID ? this.vt8_1 : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? this.wt8_1 : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? this.xt8_1 : courseTerminology;
    roleOptions = roleOptions === VOID ? this.yt8_1 : roleOptions;
    return $super === VOID ? this.ptb(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) : $super.ptb.call(this, clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).toString = function () {
    return 'ClazzEnrolmentEditUiState(clazzEnrolment=' + this.st8_1 + ', roleSelectedError=' + this.tt8_1 + ', startDateError=' + this.ut8_1 + ', endDateError=' + this.vt8_1 + ', fieldsEnabled=' + this.wt8_1 + ', courseTerminology=' + this.xt8_1 + ', roleOptions=' + this.yt8_1 + ')';
  };
  protoOf(ClazzEnrolmentEditUiState).hashCode = function () {
    var result = this.st8_1 == null ? 0 : hashCode(this.st8_1);
    result = imul(result, 31) + (this.tt8_1 == null ? 0 : getStringHashCode(this.tt8_1)) | 0;
    result = imul(result, 31) + (this.ut8_1 == null ? 0 : getStringHashCode(this.ut8_1)) | 0;
    result = imul(result, 31) + (this.vt8_1 == null ? 0 : getStringHashCode(this.vt8_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wt8_1) | 0;
    result = imul(result, 31) + (this.xt8_1 == null ? 0 : this.xt8_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.yt8_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentEditUiState ? other : THROW_CCE();
    if (!equals(this.st8_1, tmp0_other_with_cast.st8_1))
      return false;
    if (!(this.tt8_1 == tmp0_other_with_cast.tt8_1))
      return false;
    if (!(this.ut8_1 == tmp0_other_with_cast.ut8_1))
      return false;
    if (!(this.vt8_1 == tmp0_other_with_cast.vt8_1))
      return false;
    if (!(this.wt8_1 === tmp0_other_with_cast.wt8_1))
      return false;
    if (!equals(this.xt8_1, tmp0_other_with_cast.xt8_1))
      return false;
    if (!equals(this.yt8_1, tmp0_other_with_cast.yt8_1))
      return false;
    return true;
  };
  function enrolIntoCourseUseCase$factory() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b(receiver);
    }, null);
  }
  function enrolIntoCourseUseCase$factory_0() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b(receiver);
    }, null);
  }
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.ytb_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).qq8 = function (value, $completion) {
    var tmp = this.rq8(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.qq8(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.atc_1 = this.ytb_1;
            var tmp_1 = this;
            tmp_1.btc_1 = this.ztb_1;
            this.hd_1 = 1;
            var it = this.btc_1;
            suspendResult = this.atc_1.t1d(it.odf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).rq8 = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda(this.ytb_1, completion);
    i.ztb_1 = value;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.qq8(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$62(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ktc_1 = _this__u8e3s4;
    this.ltc_1 = collector;
  }
  protoOf($collectCOROUTINE$62).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.mtc_1 = this.ltc_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0(this.mtc_1, null);
            suspendResult = this.ktc_1.ntc_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wtc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).qq8 = function (it, $completion) {
    var tmp = this.rq8(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qq8(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.xtc_1;
          var canEditTeacherEnrolments = tmp0_container.y6();
          var canEditStudentEnrolments = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.wtc_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ftd(VOID, VOID, VOID, canEditTeacherEnrolments, canEditStudentEnrolments);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).rq8 = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this.wtc_1, completion);
    i.xtc_1 = it;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qq8(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.otd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).qtd = function (it, $completion) {
    var tmp = this.rtd(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qtd((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.otd_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ftd(this.ptd_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).rtd = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this.otd_1, completion);
    i.ptd_1 = it;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qtd(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ate_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).cp4 = function (canViewMembers, $completion) {
    var tmp = this.dp4(canViewMembers, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1;
            if (this.bte_1) {
              tmp_1 = this.ate_1.epc().y7j().y98(this.ate_1.etf_1, this.ate_1.dtf_1);
            } else {
              tmp_1 = flowOf(emptyList());
            }

            tmp_0.cte_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this.ate_1, null);
            suspendResult = this.cte_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).dp4 = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this.ate_1, completion);
    i.bte_1 = canViewMembers;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.cp4(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.ntf_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).cp4 = function (value, $completion) {
    var tmp = this.dp4(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.qtf_1 = this.ntf_1;
            var tmp_1 = this;
            tmp_1.rtf_1 = this.otf_1;
            if (this.rtf_1) {
              this.hd_1 = 3;
              suspendResult = this.qtf_1.t1d(this.rtf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.ptf_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).dp4 = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda(this.ntf_1, completion);
    i.otf_1 = value;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.cp4(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$63(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.atg_1 = _this__u8e3s4;
    this.btg_1 = collector;
  }
  protoOf($collectCOROUTINE$63).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ctg_1 = this.btg_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.ctg_1, null);
            suspendResult = this.atg_1.dtg_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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 _no_name_provided__qut3iv_8($this) {
    this.dtg_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_8).rp3 = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$63(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_8).z1b = function (collector, $completion) {
    return this.rp3(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.mtg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).cp4 = function (canViewMembers, $completion) {
    var tmp = this.dp4(canViewMembers, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.ntg_1) {
              this.hd_1 = 1;
              suspendResult = this.mtg_1.epc().y7j().f99(this.mtg_1.etf_1, this.mtg_1.dtf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var courseAndPersonName = suspendResult;
            var tmp_0 = courseAndPersonName == null ? null : courseAndPersonName.v9f_1;
            var personName = '' + tmp_0 + ' ' + (courseAndPersonName == null ? null : courseAndPersonName.w9f_1);
            l$ret$1: do {
              var this_0 = this.mtg_1.fpk_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ftd(VOID, personName, courseAndPersonName == null ? null : courseAndPersonName.u9f_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.mtg_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mov(VOID, VOID, personName);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).dp4 = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this.mtg_1, completion);
    i.ntg_1 = canViewMembers;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.cp4(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wtg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).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.wtg_1.epc().v7j().tdy(this.wtg_1.dtf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.wtg_1.fpk_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ftd(VOID, VOID, VOID, VOID, VOID, terminology);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this.wtg_1, completion);
    i.xtg_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.gth_1 = $permissionFlow;
    this.hth_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = distinctUntilChanged(this.gth_1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this.hth_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1(this.gth_1, this.hth_1, completion);
    i.ith_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_2($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation) {
    this.rth_1 = $canViewMembersFlow;
    this.sth_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).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;
            var tmp_0 = distinctUntilChanged(this.rth_1);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this.sth_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3(this.rth_1, this.sth_1, completion);
    i.tth_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_4($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation) {
    this.cti_1 = $canViewMembersFlow;
    this.dti_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).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;
            var this_0 = distinctUntilChanged(this.cti_1);
            var tmp_0 = new _no_name_provided__qut3iv_8(this_0);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this.dti_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5(this.cti_1, this.dti_1, completion);
    i.eti_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_6($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_9($this) {
    this.ntc_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_9).rp3 = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$62(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_9).z1b = function (collector, $completion) {
    return this.rp3(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    this.nti_1 = $this_launch;
    this.oti_1 = this$0;
    this.pti_1 = $permissionFlow;
    this.qti_1 = $canViewMembersFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.nti_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this.oti_1, null));
          launch(this.nti_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_2(this.pti_1, this.oti_1, null));
          launch(this.nti_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_4(this.qti_1, this.oti_1, null));
          launch(this.nti_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_6(this.qti_1, this.oti_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzEnrolmentListViewModel$slambda$slambda(this.nti_1, this.oti_1, this.pti_1, this.qti_1, completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda_0($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_130() {
    this.rti_1 = 'CourseEnrolments';
  }
  var Companion_instance_178;
  function Companion_getInstance_148() {
    return Companion_instance_178;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_19(function_0) {
    this.sti_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_19).t1d = function (value, $completion) {
    return this.sti_1(value, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation) {
    this.btj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.btj_1.dpc().t7l();
            var tmp_2 = this.btj_1.cpc();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_4 = new Long(8, 0);
            PermissionFlags_getInstance();
            tmp_0.dtj_1 = shareIn(tmp_1.xdb(tmp_2, this.btj_1.dtf_1, tmp_3, tmp_4, new Long(8192, 0)), this.btj_1.bpc(), Companion_getInstance_13().v1h());
            var tmp_5 = this;
            var this_0 = this.dtj_1;
            tmp_5.etj_1 = new _no_name_provided__qut3iv_9(this_0);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.btj_1.fpk_1, ClazzEnrolmentListViewModel$slambda$slambda_0(this.ctj_1, this.btj_1, this.dtj_1, this.etj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda(this.btj_1, completion);
    i.ctj_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzEnrolmentListUiState(), 'CourseEnrolments');
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.dtf_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.etf_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this.bpc();
    launch(tmp_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzEnrolmentListViewModel).ftj = function (enrolment) {
    var tmp = Companion_instance_34.s4x();
    Companion_getInstance_110();
    this.qpc('EnrolmentEdit', '', null, tmp, mapOf_0(to('entityUid', enrolment.w8n_1.toString())), VOID, true);
  };
  protoOf(ClazzEnrolmentListViewModel).gtj = function () {
    Companion_getInstance_110();
    this.mpb_1.fo0('PersonDetailView', mapOf_0(to('entityUid', this.etf_1.toString())));
  };
  protoOf(ClazzEnrolmentListViewModel).zpk = function (searchText) {
  };
  protoOf(ClazzEnrolmentListViewModel).apl = function () {
  };
  function ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    enrolmentList = enrolmentList === VOID ? emptyList() : enrolmentList;
    personName = personName === VOID ? null : personName;
    courseName = courseName === VOID ? null : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? false : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? false : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.ytc_1 = enrolmentList;
    this.ztc_1 = personName;
    this.atd_1 = courseName;
    this.btd_1 = canEditTeacherEnrolments;
    this.ctd_1 = canEditStudentEnrolments;
    this.dtd_1 = courseTerminology;
    this.etd_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListUiState).htj = function (enrolment) {
    var tmp;
    var tmp_0 = enrolment.b8o_1;
    if (tmp_0 === 1001) {
      tmp = this.btd_1;
    } else {
      tmp = this.btd_1;
    }
    var tmp0_canEdit = tmp;
    var tmp1_timeZone = this.etd_1;
    return new ClazzEnrolmentListItemUiState(tmp0_canEdit, enrolment, tmp1_timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).itj = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    return new ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).ftd = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone, $super) {
    enrolmentList = enrolmentList === VOID ? this.ytc_1 : enrolmentList;
    personName = personName === VOID ? this.ztc_1 : personName;
    courseName = courseName === VOID ? this.atd_1 : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? this.btd_1 : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? this.ctd_1 : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? this.dtd_1 : courseTerminology;
    timeZone = timeZone === VOID ? this.etd_1 : timeZone;
    return $super === VOID ? this.itj(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) : $super.itj.call(this, enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).toString = function () {
    return 'ClazzEnrolmentListUiState(enrolmentList=' + this.ytc_1 + ', personName=' + this.ztc_1 + ', courseName=' + this.atd_1 + ', canEditTeacherEnrolments=' + this.btd_1 + ', canEditStudentEnrolments=' + this.ctd_1 + ', courseTerminology=' + this.dtd_1 + ', timeZone=' + this.etd_1 + ')';
  };
  protoOf(ClazzEnrolmentListUiState).hashCode = function () {
    var result = hashCode(this.ytc_1);
    result = imul(result, 31) + (this.ztc_1 == null ? 0 : getStringHashCode(this.ztc_1)) | 0;
    result = imul(result, 31) + (this.atd_1 == null ? 0 : getStringHashCode(this.atd_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.btd_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ctd_1) | 0;
    result = imul(result, 31) + (this.dtd_1 == null ? 0 : hashCode(this.dtd_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.etd_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListUiState ? other : THROW_CCE();
    if (!equals(this.ytc_1, tmp0_other_with_cast.ytc_1))
      return false;
    if (!(this.ztc_1 == tmp0_other_with_cast.ztc_1))
      return false;
    if (!(this.atd_1 == tmp0_other_with_cast.atd_1))
      return false;
    if (!(this.btd_1 === tmp0_other_with_cast.btd_1))
      return false;
    if (!(this.ctd_1 === tmp0_other_with_cast.ctd_1))
      return false;
    if (!equals(this.dtd_1, tmp0_other_with_cast.dtd_1))
      return false;
    if (!(this.etd_1 === tmp0_other_with_cast.etd_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListItemUiState(canEdit, enrolment, timeZone) {
    canEdit = canEdit === VOID ? false : canEdit;
    this.jtj_1 = canEdit;
    this.ktj_1 = enrolment;
    this.ltj_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListItemUiState).toString = function () {
    return 'ClazzEnrolmentListItemUiState(canEdit=' + this.jtj_1 + ', enrolment=' + this.ktj_1 + ', timeZone=' + this.ltj_1 + ')';
  };
  protoOf(ClazzEnrolmentListItemUiState).hashCode = function () {
    var result = getBooleanHashCode(this.jtj_1);
    result = imul(result, 31) + hashCode(this.ktj_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ltj_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListItemUiState ? other : THROW_CCE();
    if (!(this.jtj_1 === tmp0_other_with_cast.jtj_1))
      return false;
    if (!equals(this.ktj_1, tmp0_other_with_cast.ktj_1))
      return false;
    if (!(this.ltj_1 === tmp0_other_with_cast.ltj_1))
      return false;
    return true;
  };
  var RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  var RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  var RecordAttendanceOption_entriesInitialized;
  function RecordAttendanceOption_initEntries() {
    if (RecordAttendanceOption_entriesInitialized)
      return Unit_instance;
    RecordAttendanceOption_entriesInitialized = true;
    RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE', 0, strings_getInstance().tm9_1);
    RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_NEW_SCHEDULE', 1, strings_getInstance().um9_1);
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.utj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).wtj = function (clazz, $completion) {
    var tmp = this.xtj(clazz, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wtj((p1 == null ? true : p1 instanceof Clazz) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.utj_1.fpk_1;
          var tmp_0;
          var tmp_1 = this_0.t2().ztj_1;
          var tmp0_safe_receiver = this.vtj_1;
          if (!(tmp_1 === (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e8k_1))) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver_0 = tmp_0;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver_0.t2();
                var tmp0_safe_receiver_1 = this.vtj_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.e8k_1;
                var nextValue = prevValue.gtk(VOID, tmp1_elvis_lhs == null ? 'UTC' : tmp1_elvis_lhs);
                if (tmp0_safe_receiver_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          var this_1 = this.utj_1.opb_1;
          var tmp_2;
          var tmp_3 = this_1.t2().zou_1;
          var tmp0_safe_receiver_2 = this.vtj_1;
          if (!(tmp_3 == (tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.n8j_1))) {
            tmp_2 = this_1;
          } else {
            tmp_2 = null;
          }
          var tmp1_safe_receiver = tmp_2;
          if (tmp1_safe_receiver == null)
            null;
          else {
            l$ret$3: do {
              while (true) {
                var prevValue_0 = tmp1_safe_receiver.t2();
                var tmp0_safe_receiver_3 = this.vtj_1;
                var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.n8j_1);
                if (tmp1_safe_receiver.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).xtj = function (clazz, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this.utj_1, completion);
    i.vtj_1 = clazz;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (clazz, $completion) {
      return i.wtj(clazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda($options, this$0) {
    return function () {
      var tmp;
      if ($options.u() > 1) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0.fpk_1;
          while (true) {
            var prevValue = this_0.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.gtk(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
            if (this_0.y1k(prevValue, nextValue)) {
              tmp$ret$1 = Unit_instance;
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      } else {
        this$0.jtl(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).utl = function (hasPermission, hasLogs, $completion) {
    var tmp = this.vtl(hasPermission, hasLogs, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE();
    return this.utl(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new PermissionAndExistingLogs(this.stl_1, this.ttl_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).vtl = function (hasPermission, hasLogs, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.stl_1 = hasPermission;
    i.ttl_1 = hasLogs;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (hasPermission, hasLogs, $completion) {
      return i.utl(hasPermission, hasLogs, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.etm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).gtm = function (it, $completion) {
    var tmp = this.htm(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.gtm(p1 instanceof PermissionAndExistingLogs ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = ArrayList_init_$Create$();
          if (this.ftm_1.itm_1) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
          }
          if (this.ftm_1.itm_1 ? this.ftm_1.jtm_1 : false) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance());
          }
          var options = this_0.f3();
          l$ret$1: do {
            var this_1 = this.etm_1.fpk_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.gtk(VOID, VOID, options);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.etm_1.opb_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_0 = !options.c1();
              var tmp_1 = this.etm_1.ipc().rnd(strings_getInstance().wlu_1);
              var tmp_2 = FabIcon_ADD_getInstance();
              var nextValue_0 = prevValue_0.mov(new FabUiState(tmp_0, tmp_1, tmp_2, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda(options, this.etm_1)));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).htm = function (it, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this.etm_1, completion);
    i.ftm_1 = it;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.gtm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.stm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).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;
            var tmp_0 = this.stm_1.epc().t7j().o8i(this.stm_1.htl_1);
            var tmp_1 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this.stm_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this.stm_1, completion);
    i.ttm_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ctn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.ctn_1.epc().t7l();
            var tmp_2 = this.ctn_1.cpc();
            PermissionFlags_getInstance();
            tmp_0.etn_1 = tmp_1.udb(tmp_2, this.ctn_1.htl_1, new Long(64, 0));
            var tmp_3 = this;
            var tmp_4 = this.ctn_1.epc().r7k();
            tmp_3.ftn_1 = tmp_4.v9v(this.ctn_1.htl_1, 8);
            this.hd_1 = 1;
            var tmp_5 = combine(this.etn_1, this.ftn_1, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_6 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this.ctn_1, null);
            suspendResult = tmp_5.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this.ctn_1, completion);
    i.dtn_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.otn_1 = $this_launch;
    this.ptn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.otn_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this.ptn_1, null));
          launch(this.otn_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this.ptn_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).q7e = function (completion) {
    return new ClazzLogListAttendanceViewModel$slambda$slambda(this.otn_1, this.ptn_1, completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function RecordAttendanceOption(name, ordinal, stringResource) {
    Enum.call(this, name, ordinal);
    this.stn_1 = stringResource;
  }
  function PermissionAndExistingLogs(hasRecordPermission, hasExistingLogs) {
    this.itm_1 = hasRecordPermission;
    this.jtm_1 = hasExistingLogs;
  }
  protoOf(PermissionAndExistingLogs).toString = function () {
    return 'PermissionAndExistingLogs(hasRecordPermission=' + this.itm_1 + ', hasExistingLogs=' + this.jtm_1 + ')';
  };
  protoOf(PermissionAndExistingLogs).hashCode = function () {
    var result = getBooleanHashCode(this.itm_1);
    result = imul(result, 31) + getBooleanHashCode(this.jtm_1) | 0;
    return result;
  };
  protoOf(PermissionAndExistingLogs).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PermissionAndExistingLogs))
      return false;
    var tmp0_other_with_cast = other instanceof PermissionAndExistingLogs ? other : THROW_CCE();
    if (!(this.itm_1 === tmp0_other_with_cast.itm_1))
      return false;
    if (!(this.jtm_1 === tmp0_other_with_cast.jtm_1))
      return false;
    return true;
  };
  function Companion_131() {
    this.ttn_1 = 'CourseLogListAttendanceView';
  }
  var Companion_instance_179;
  function Companion_getInstance_149() {
    return Companion_instance_179;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_20(function_0) {
    this.utn_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_20).t1d = function (value, $completion) {
    return this.utn_1(value, $completion);
  };
  function ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp = this$0.epc().r7k();
      return tmp.t9v(this$0.htl_1, 8);
    };
  }
  function ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.dto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).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 = whenSubscribed(this.dto_1.fpk_1, ClazzLogListAttendanceViewModel$slambda$slambda_0(this.eto_1, this.dto_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this.dto_1, completion);
    i.eto_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation) {
    this.nto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).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.nto_1.epc().r7k().w9v(this.nto_1.htl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var mostRecentLogUid = suspendResult;
            var this_0 = this.nto_1.mpb_1;
            var tmp_0;
            if (!mostRecentLogUid.equals(new Long(0, 0))) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver == null)
              null;
            else {
              Companion_getInstance_110();
              tmp0_safe_receiver.fo0('EditAttendance', mapOf_0(to('entityUid', mostRecentLogUid.toString())));
            }

            this.nto_1.pto();
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this.nto_1, completion);
    i.oto_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  }
  function ClazzLogListAttendanceViewModel(di, savedStateHandle) {
    var tmp = new ClazzLogListAttendanceUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'Course');
    var tmp_0 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid specified');
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    tmp_0.htl_1 = tmp_1;
    var tmp_2 = this;
    tmp_2.itl_1 = ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.gtk(VOID, VOID, VOID, this.itl_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.bpc();
    launch(tmp_3, VOID, VOID, ClazzLogListAttendanceViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogListAttendanceViewModel).pto = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.gtk(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).zpk = function (searchText) {
  };
  protoOf(ClazzLogListAttendanceViewModel).apl = function () {
  };
  protoOf(ClazzLogListAttendanceViewModel).jtl = function (option) {
    var tmp0 = option.za_1;
    if (tmp0 === 1) {
      Companion_getInstance_120();
      var tmp = to('timeZone', this.fpk_1.t2().ztj_1);
      Companion_getInstance_110();
      this.spl('ClazzLogEdit', mapOf([tmp, to('clazzUid', this.htl_1.toString())]));
      this.pto();
    } else if (tmp0 === 0) {
      if (this.lpc().equals(Companion_getInstance_93().tov_1))
        return Unit_instance;
      this.kpc(Companion_getInstance_93().tov_1);
      var tmp_0 = this.bpc();
      launch(tmp_0, VOID, VOID, ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this, null));
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).qto = function (clazzLog) {
    Companion_getInstance_110();
    var tmp = to('entityUid', clazzLog.r9w_1.toString());
    Companion_getInstance_120();
    this.mpb_1.fo0('EditAttendance', mapOf([tmp, to('clazzUid', this.htl_1.toString())]));
  };
  function ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v() {
    return new EmptyPagingSource();
  }
  function ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    graphData = graphData === VOID ? null : graphData;
    timeZoneId = timeZoneId === VOID ? Companion_getInstance_9().mli().nlh() : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? emptyList() : recordAttendanceOptions;
    var tmp;
    if (clazzLogsList === VOID) {
      tmp = ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v;
    } else {
      tmp = clazzLogsList;
    }
    clazzLogsList = tmp;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? 7 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? listOf([new MessageIdOption2(strings_getInstance().flv_1, 7), new MessageIdOption2(strings_getInstance().flx_1, 30), new MessageIdOption2(strings_getInstance().rlz_1, 90)]) : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    this.ytj_1 = graphData;
    this.ztj_1 = timeZoneId;
    this.atk_1 = recordAttendanceOptions;
    this.btk_1 = clazzLogsList;
    this.ctk_1 = fieldsEnabled;
    this.dtk_1 = selectedChipId;
    this.etk_1 = viewIdToNumDays;
    this.ftk_1 = createNewOptionsVisible;
  }
  protoOf(ClazzLogListAttendanceUiState).rto = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    return new ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).gtk = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible, $super) {
    graphData = graphData === VOID ? this.ytj_1 : graphData;
    timeZoneId = timeZoneId === VOID ? this.ztj_1 : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? this.atk_1 : recordAttendanceOptions;
    clazzLogsList = clazzLogsList === VOID ? this.btk_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.ctk_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.dtk_1 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? this.etk_1 : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.ftk_1 : createNewOptionsVisible;
    return $super === VOID ? this.rto(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) : $super.rto.call(this, graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).toString = function () {
    return 'ClazzLogListAttendanceUiState(graphData=' + this.ytj_1 + ', timeZoneId=' + this.ztj_1 + ', recordAttendanceOptions=' + this.atk_1 + ', clazzLogsList=' + this.btk_1 + ', fieldsEnabled=' + this.ctk_1 + ', selectedChipId=' + this.dtk_1 + ', viewIdToNumDays=' + this.etk_1 + ', createNewOptionsVisible=' + this.ftk_1 + ')';
  };
  protoOf(ClazzLogListAttendanceUiState).hashCode = function () {
    var result = this.ytj_1 == null ? 0 : this.ytj_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.ztj_1) | 0;
    result = imul(result, 31) + hashCode(this.atk_1) | 0;
    result = imul(result, 31) + hashCode(this.btk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ctk_1) | 0;
    result = imul(result, 31) + this.dtk_1 | 0;
    result = imul(result, 31) + hashCode(this.etk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ftk_1) | 0;
    return result;
  };
  protoOf(ClazzLogListAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogListAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogListAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.ytj_1, tmp0_other_with_cast.ytj_1))
      return false;
    if (!(this.ztj_1 === tmp0_other_with_cast.ztj_1))
      return false;
    if (!equals(this.atk_1, tmp0_other_with_cast.atk_1))
      return false;
    if (!equals(this.btk_1, tmp0_other_with_cast.btk_1))
      return false;
    if (!(this.ctk_1 === tmp0_other_with_cast.ctk_1))
      return false;
    if (!(this.dtk_1 === tmp0_other_with_cast.dtk_1))
      return false;
    if (!equals(this.etk_1, tmp0_other_with_cast.etk_1))
      return false;
    if (!(this.ftk_1 === tmp0_other_with_cast.ftk_1))
      return false;
    return true;
  };
  function ClazzLogEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda).btp = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.btp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).tmw = function (it, completion) {
    var i = new ClazzLogEditViewModel$slambda$slambda(completion);
    i.atp_1 = it;
    return i;
  };
  function ClazzLogEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.btp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.ktp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).ltp = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.ltp($completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new ClazzLog();
          this_0.s9w_1 = this.ktp_1.mtq_1;
          this_0.t9w_1 = systemTimeInMillis();
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ClazzLogEditViewModel$slambda$slambda_1(this.ktp_1, completion);
  };
  function ClazzLogEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.ltp($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ktq_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.rtq(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_132() {
    this.stq_1 = 'ClazzLogEdit';
  }
  var Companion_instance_180;
  function Companion_getInstance_150() {
    return Companion_instance_180;
  }
  function ClazzLogEditViewModel$slambda(this$0, resultContinuation) {
    this.btr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda).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;
            var tmp_0 = Companion_instance_35.s4x();
            var tmp_1 = ClazzLogEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzLogEditViewModel$slambda$slambda_2(this.btr_1, null);
            suspendResult = this.btr_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzLogEditViewModel$slambda$lambda(this.btr_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.btr_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.btr_1.ipc().rnd(strings_getInstance().klk_1);
                var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ClazzLogEditViewModel$onClickSave$ref(this.btr_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.btr_1.ktq_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.rtq(true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$slambda(this.btr_1, completion);
    i.ctr_1 = $this$launch;
    return i;
  };
  function ClazzLogEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ltr_1 = $commitDelay;
    this.mtr_1 = $entity;
    this.ntr_1 = $this;
    this.otr_1 = $key;
    this.ptr_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.ltr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.mtr_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ntr_1.opc(this.ntr_1.kpb_1, this.otr_1, this.ptr_1, this.mtr_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda(this.ltr_1, this.mtr_1, this.ntr_1, this.otr_1, this.ptr_1, completion);
    i.qtr_1 = $this$launch;
    return i;
  };
  function ClazzLogEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onClickSave$lambda($this$shallowCopy) {
    $this$shallowCopy.r9w_1 = generateUid($this$shallowCopy);
    return Unit_instance;
  }
  function ClazzLogEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ClazzLogEdit');
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_elvis_lhs = savedStateHandle.ba('timeZone');
    tmp.jtq_1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
    this.ktq_1 = MutableStateFlow(new ClazzLogEditUiState(VOID, VOID, this.jtq_1));
    this.ltq_1 = asStateFlow(this.ktq_1);
    var tmp_0 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.mtq_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().um9_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.bpc();
    launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogEditViewModel).rtr = function (clazzLog) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ktq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.otq_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t9w_1;
        var nextValue = prevValue.rtq(VOID, clazzLog, VOID, this.vpi(tmp, clazzLog == null ? null : clazzLog.t9w_1, prevValue.qtq_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_35.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.bpc();
    tmp_0.pph_1 = launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$onEntityChanged$slambda_0(commitDelay, clazzLog, this, key, serializer, null));
  };
  protoOf(ClazzLogEditViewModel).mq0 = function () {
    var tmp0_elvis_lhs = this.ktq_1.t2().otq_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var clazzLog = tmp;
    var errorMsg = !isDateSet(clazzLog.t9w_1) ? strings_getInstance().ilo_1 : clazzLog.t9w_1.c7(systemTimeInMillis()) > 0 ? strings_getInstance().ymm_1 : null;
    if (!(errorMsg == null)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.ktq_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.rtq(VOID, VOID, VOID, this.ipc().rnd(errorMsg));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    var clazzLogWithUid = shallowCopy_6(clazzLog, ClazzLogEditViewModel$onClickSave$lambda);
    var newClazzLogJson = this.r4x().w4b(Companion_instance_35.s4x(), clazzLogWithUid);
    var tmp_0 = to('newclazzlog', newClazzLogJson);
    Companion_getInstance_120();
    this.mpb_1.fo0('EditAttendance', mapOf([tmp_0, to('clazzUid', this.mtq_1.toString())]));
  };
  function ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError) {
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    clazzLog = clazzLog === VOID ? null : clazzLog;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    dateError = dateError === VOID ? null : dateError;
    this.ntq_1 = fieldsEnabled;
    this.otq_1 = clazzLog;
    this.ptq_1 = timeZone;
    this.qtq_1 = dateError;
  }
  protoOf(ClazzLogEditUiState).str = function (fieldsEnabled, clazzLog, timeZone, dateError) {
    return new ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).rtq = function (fieldsEnabled, clazzLog, timeZone, dateError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.ntq_1 : fieldsEnabled;
    clazzLog = clazzLog === VOID ? this.otq_1 : clazzLog;
    timeZone = timeZone === VOID ? this.ptq_1 : timeZone;
    dateError = dateError === VOID ? this.qtq_1 : dateError;
    return $super === VOID ? this.str(fieldsEnabled, clazzLog, timeZone, dateError) : $super.str.call(this, fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).toString = function () {
    return 'ClazzLogEditUiState(fieldsEnabled=' + this.ntq_1 + ', clazzLog=' + this.otq_1 + ', timeZone=' + this.ptq_1 + ', dateError=' + this.qtq_1 + ')';
  };
  protoOf(ClazzLogEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.ntq_1);
    result = imul(result, 31) + (this.otq_1 == null ? 0 : this.otq_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.ptq_1) | 0;
    result = imul(result, 31) + (this.qtq_1 == null ? 0 : getStringHashCode(this.qtq_1)) | 0;
    return result;
  };
  protoOf(ClazzLogEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditUiState ? other : THROW_CCE();
    if (!(this.ntq_1 === tmp0_other_with_cast.ntq_1))
      return false;
    if (!equals(this.otq_1, tmp0_other_with_cast.otq_1))
      return false;
    if (!(this.ptq_1 === tmp0_other_with_cast.ptq_1))
      return false;
    if (!(this.qtq_1 == tmp0_other_with_cast.qtq_1))
      return false;
    return true;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.t9w_1;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.t9w_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation) {
    this.bts_1 = this$0;
    this.cts_1 = $newClazzLogVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).ets = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.ets(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).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;
            var tmp_0 = this.dts_1.r7k();
            suspendResult = tmp_0.u9v(this.bts_1.htt_1, 8, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var dbLogList = suspendResult;
            var tmp_1;
            if (!(this.cts_1 == null)) {
              var this_0 = plus(dbLogList, listOf_0(this.cts_1));
              var tmp_2 = ClazzLogEditAttendanceViewModel$slambda$slambda$lambda;
              tmp_1 = sortedWith(this_0, new sam$kotlin_Comparator$0_2(tmp_2));
            } else {
              tmp_1 = dbLogList;
            }

            var list = tmp_1;
            return list;
          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);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this.bts_1, this.cts_1, completion);
    i.dts_1 = db;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_0(this$0, $newClazzLogVal, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation);
    var l = function (db, $completion) {
      return i.ets(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).qtt = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.qtt($completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ClazzLogEditAttendanceViewModel$slambda$slambda_1(completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.qtt($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$lambda(this$0, $hasEditPermission) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ctt_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xtt(VOID, VOID, it == null ? emptyList() : it, VOID, $hasEditPermission);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.gtu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).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.gtu_1.epc().t7j().x8i(this.gtu_1.ctt_1.t2().itu().s9w_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var timeZone = suspendResult;
            l$ret$1: do {
              var this_0 = this.gtu_1.ctt_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xtt(VOID, VOID, VOID, VOID, VOID, timeZone == null ? 'UTC' : timeZone);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this.gtu_1, completion);
    i.htu_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda($logRecords) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp$ret$0;
      $l$block: {
        // Inline function 'kotlin.collections.count' call
        var this_0 = $logRecords;
        var tmp_0;
        if (isInterface(this_0, Collection)) {
          tmp_0 = this_0.c1();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$0 = 0;
          break $l$block;
        }
        var count = 0;
        var tmp0_iterator = this_0.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_1 = element.o9r_1;
          if (tmp_1 === 1) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      tmp.y9w_1 = tmp$ret$0;
      var tmp_2 = $this$shallowCopy;
      var tmp$ret$2;
      $l$block_0: {
        // Inline function 'kotlin.collections.count' call
        var this_1 = $logRecords;
        var tmp_3;
        if (isInterface(this_1, Collection)) {
          tmp_3 = this_1.c1();
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp$ret$2 = 0;
          break $l$block_0;
        }
        var count_0 = 0;
        var tmp0_iterator_0 = this_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_4 = element_0.o9r_1;
          if (tmp_4 === 2) {
            count_0 = count_0 + 1 | 0;
            checkCountOverflow(count_0);
          }
        }
        tmp$ret$2 = count_0;
      }
      tmp_2.z9w_1 = tmp$ret$2;
      var tmp_5 = $this$shallowCopy;
      var tmp$ret$4;
      $l$block_1: {
        // Inline function 'kotlin.collections.count' call
        var this_2 = $logRecords;
        var tmp_6;
        if (isInterface(this_2, Collection)) {
          tmp_6 = this_2.c1();
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp$ret$4 = 0;
          break $l$block_1;
        }
        var count_1 = 0;
        var tmp0_iterator_1 = this_2.w();
        while (tmp0_iterator_1.f()) {
          var element_1 = tmp0_iterator_1.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_7 = element_1.o9r_1;
          if (tmp_7 === 4) {
            count_1 = count_1 + 1 | 0;
            checkCountOverflow(count_1);
          }
        }
        tmp$ret$4 = count_1;
      }
      tmp_5.a9x_1 = tmp$ret$4;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    this.rtu_1 = this$0;
    this.stu_1 = $clazzLogsToSave;
    this.ttu_1 = $attendanceRecordsToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.rtu_1.epc().r7k().x9v(this.stu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.rtu_1.epc().q7k().r9q(this.ttu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this.rtu_1, this.stu_1, this.ttu_1, completion);
    i.utu_1 = it;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_newClazzLog__zdra0r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ett_1;
    newClazzLog$factory();
    return this_0.t2();
  }
  function _set_currentClazzLogIndex__l00dbq($this, value) {
    $this.kpb_1.qp7('activeIndex', toString_0(value));
  }
  function _get_currentClazzLogIndex__yy31c2($this) {
    var tmp0_safe_receiver = $this.kpb_1.ba('activeIndex');
    return tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
  }
  function savePersonAndAttendanceRecords($this, clazzLogUid, records, $completion) {
    var tmp = new $savePersonAndAttendanceRecordsCOROUTINE$64($this, clazzLogUid, records, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function commitAttendanceRecordsToState($this, $completion) {
    var tmp = new $commitAttendanceRecordsToStateCOROUTINE$65($this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_133() {
    this.xtv_1 = 'newclazzlog';
    this.ytv_1 = 'EditAttendance';
    this.ztv_1 = 'activeIndex';
    this.atw_1 = 'log_';
    this.btw_1 = 'logsToSave';
  }
  var Companion_instance_181;
  function Companion_getInstance_151() {
    return Companion_instance_181;
  }
  function sam$kotlin_Comparator$0_2(function_0) {
    this.ctw_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_2).pa = function (a, b) {
    return this.ctw_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {
    return this.pa(a, b);
  };
  function ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda($savedStateHandle, this$0) {
    return function () {
      var tmp0_safe_receiver = $savedStateHandle.ba('newclazzlog');
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.newClazzLog$delegate.<anonymous>.<anonymous>' call
        tmp = this$0.r4x().x4b(Companion_instance_35.s4x(), tmp0_safe_receiver);
      }
      return tmp;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.ltw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).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;
            var tmp_0 = this.mtw_1.t7l();
            var tmp_1 = this.ltw_1.cpc();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ydb(tmp_1, this.ltw_1.htt_1, new Long(32, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).tmw = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this.ltw_1, completion);
    i.mtw_1 = db;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation) {
    this.vtw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.xtw_1 = _get_newClazzLog__zdra0r(this.vtw_1);
            this.hd_1 = 1;
            var tmp_0 = this.vtw_1.dpc().t7l();
            var tmp_1 = this.vtw_1.cpc();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ydb(tmp_1, this.vtw_1.htt_1, new Long(64, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ytw_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = ListSerializer(Companion_instance_35.s4x());
            var tmp_3 = ClazzLogEditAttendanceViewModel$slambda$slambda_0(this.vtw_1, this.xtw_1, null);
            var tmp_4 = ClazzLogEditAttendanceViewModel$slambda$slambda_2(null);
            suspendResult = this.vtw_1.spc(tmp_2, VOID, VOID, tmp_3, tmp_4, ClazzLogEditAttendanceViewModel$slambda$lambda(this.vtw_1, this.ytw_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            launch(this.wtw_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda$slambda_4(this.vtw_1, null));
            var currentClazzLogIndexVal = _get_currentClazzLogIndex__yy31c2(this.vtw_1);
            var tmp_5;
            if (!(currentClazzLogIndexVal == null)) {
              tmp_5 = currentClazzLogIndexVal;
            } else if (!(this.xtw_1 == null)) {
              var tmp0_elvis_lhs = this.vtw_1.ctt_1.t2().ztw(this.xtw_1.r9w_1);
              tmp_5 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
            } else if (!this.vtw_1.qph_1.equals(new Long(0, 0))) {
              var tmp1_elvis_lhs = this.vtw_1.ctt_1.t2().ztw(this.vtw_1.qph_1);
              tmp_5 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            } else {
              tmp_5 = this.vtw_1.ctt_1.t2().ttt_1.u() - 1 | 0;
            }

            var startIndex = tmp_5;
            this.vtw_1.atx(this.vtw_1.ctt_1.t2().ttt_1.v(startIndex), true);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this.vtw_1, completion);
    i.wtw_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation) {
    this.jtx_1 = $clazzLog;
    this.ktx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.mtx_1 = 'log_' + this.jtx_1.r9w_1.toString();
            this.hd_1 = 1;
            suspendResult = this.ktx_1.npc(this.ktx_1.kpb_1, this.mtx_1, ListSerializer(Companion_instance_37.s4x()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ntx_1 = suspendResult;
            if (this.ntx_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.ktx_1.epc().q7k().q9q(this.jtx_1.s9w_1, this.jtx_1.r9w_1, this.jtx_1.t9w_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.otx_1 = this.ntx_1;
              this.hd_1 = 8;
              continue $sm;
            }

          case 2:
            this.ptx_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.qtx_1 = this.ptx_1;
            var tmp_1 = this;
            tmp_1.rtx_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ptx_1, 10));
            this.stx_1 = this.qtx_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.stx_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.ttx_1 = this.stx_1.e();
            var tmp_2 = this;
            tmp_2.utx_1 = this.ttx_1;
            if (this.utx_1.i9s_1 == null) {
              this.wtx_1 = this.utx_1.g9s_1;
              var tmp_3 = this;
              tmp_3.xtx_1 = new ClazzLogAttendanceRecord();
              var tmp_4 = this;
              tmp_4.ytx_1 = this.xtx_1;
              this.hd_1 = 4;
              var tmp_5 = get_doorPrimaryKeyManager(this.ktx_1.dpc());
              suspendResult = tmp_5.t68(15, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_6 = this;
              tmp_6.vtx_1 = this.utx_1;
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.ztx_1 = suspendResult;
            this.ytx_1.l9r_1 = this.ztx_1;
            var tmp_7 = this.ytx_1;
            var tmp0_safe_receiver = this.utx_1.g9s_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x9b_1;
            tmp_7.n9r_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.ytx_1.m9r_1 = this.jtx_1.r9w_1;
            this.aty_1 = this.xtx_1;
            this.bty_1 = this.utx_1.h9s_1;
            this.vtx_1 = new PersonAndClazzLogAttendanceRecord(this.wtx_1, this.bty_1, this.aty_1);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.cty_1 = this.vtx_1;
            this.rtx_1.i1(this.cty_1);
            this.hd_1 = 3;
            continue $sm;
          case 6:
            this.dty_1 = this.rtx_1;
            var tmp_8 = this;
            tmp_8.ety_1 = this.dty_1;
            this.hd_1 = 7;
            suspendResult = savePersonAndAttendanceRecords(this.ktx_1, this.jtx_1.r9w_1, this.ety_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.otx_1 = this.dty_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var personAndAttendanceRecords = this.otx_1;
            l$ret$1: do {
              var this_0 = this.ktx_1.ctt_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xtt(personAndAttendanceRecords, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.ktx_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_9;
                if (!prevValue_0.fov_1.iou_1) {
                  var tmp_10 = this.ktx_1.ctt_1.t2().vtt_1;
                  var tmp_11 = this.ktx_1.ipc().rnd(strings_getInstance().hm3_1);
                  tmp_9 = prevValue_0.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(tmp_10, tmp_11, VOID, ClazzLogEditAttendanceViewModel$onClickSave$ref(this.ktx_1)));
                } else {
                  tmp_9 = prevValue_0;
                }
                var nextValue_0 = tmp_9;
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda(this.jtx_1, this.ktx_1, completion);
    i.ltx_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0($clazzLog, this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda($record) {
    return function (it) {
      var tmp0_safe_receiver = it.g9s_1;
      var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x9b_1;
      var tmp1_safe_receiver = $record.g9s_1;
      return equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.x9b_1);
    };
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation) {
    this.nty_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).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 = commitAttendanceRecordsToState(this.nty_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this.nty_1, completion);
    i.oty_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda($status) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.o9r_1 = $status;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation) {
    this.xty_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).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 = commitAttendanceRecordsToState(this.xty_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this.xty_1, completion);
    i.yty_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.htz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            this.hd_1 = 1;
            suspendResult = delay(new Long(100, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.jtz_1 = this.htz_1.gtt_1;
            var tmp_1 = this;
            tmp_1.ktz_1 = null;
            this.hd_1 = 2;
            suspendResult = this.jtz_1.n23(this.ktz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 10;
            var tmp_2 = this;
            tmp_2.mtz_1 = ArrayList_init_$Create$();
            var tmp_3 = this;
            tmp_3.ntz_1 = ArrayList_init_$Create$();
            this.hd_1 = 4;
            suspendResult = this.htz_1.npc(this.htz_1.kpb_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.otz_1 = suspendResult;
            this.ptz_1 = this.otz_1 == null ? emptyList() : this.otz_1;
            var tmp_4 = this;
            tmp_4.qtz_1 = this.ptz_1;
            this.rtz_1 = this.qtz_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.rtz_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.stz_1 = this.rtz_1.e();
            var tmp_5 = this;
            tmp_5.ttz_1 = this.stz_1;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.htz_1.ctt_1.t2().ttt_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.r9w_1.equals(this.ttz_1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
            }
             while (false);
            tmp_6.utz_1 = tmp$ret$0;
            this.hd_1 = 6;
            suspendResult = this.htz_1.npc(this.htz_1.kpb_1, 'log_' + this.ttz_1.toString(), ListSerializer(Companion_instance_37.s4x()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.vtz_1 = suspendResult;
            var tmp_7 = this;
            var tmp_8;
            if (this.vtz_1 == null) {
              tmp_8 = null;
            } else {
              var this_0 = this.vtz_1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator_0 = this_0.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver = element_0.i9s_1;
                if (tmp0_safe_receiver == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver);
                }
              }
              tmp_8 = destination;
            }

            tmp_7.wtz_1 = tmp_8;
            this.xtz_1 = this.wtz_1 == null ? emptyList() : this.wtz_1;
            var this_1 = this.mtz_1;
            var element_1 = shallowCopy_6(this.utz_1, ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda(this.xtz_1));
            this_1.i1(element_1);
            var this_2 = this.ntz_1;
            var elements = this.xtz_1;
            addAll(this_2, elements);
            this.hd_1 = 5;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            var tmp_9 = this.htz_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this.htz_1, this.mtz_1, this.ntz_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.ltz_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 11;
            this.jtz_1.y22(this.ktz_1);
            if (!(_get_newClazzLog__zdra0r(this.htz_1) == null)) {
              this.htz_1.mpb_1.eoy('ClazzLogEdit', true);
            } else {
              this.htz_1.tph(this.htz_1.ctt_1.t2().itu());
            }

            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.jtz_1.y22(this.ktz_1);
            throw t;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this.htz_1, completion);
    i.itz_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $savePersonAndAttendanceRecordsCOROUTINE$64(_this__u8e3s4, clazzLogUid, records, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.dtv_1 = _this__u8e3s4;
    this.etv_1 = clazzLogUid;
    this.ftv_1 = records;
  }
  protoOf($savePersonAndAttendanceRecordsCOROUTINE$64).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.gtv_1 = 'log_' + this.etv_1.toString();
            this.hd_1 = 1;
            suspendResult = this.dtv_1.opc(this.dtv_1.kpb_1, this.gtv_1, ListSerializer(Companion_instance_37.s4x()), this.ftv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.dtv_1.npc(this.dtv_1.kpb_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.htv_1 = suspendResult;
            this.itv_1 = this.htv_1 == null ? null : toSet(this.htv_1);
            this.jtv_1 = this.itv_1 == null ? emptySet() : this.itv_1;
            if (!this.jtv_1.a1(this.etv_1)) {
              this.ktv_1 = plus_2(this.jtv_1, this.etv_1);
              this.hd_1 = 3;
              suspendResult = this.dtv_1.opc(this.dtv_1.kpb_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), toList(this.ktv_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $commitAttendanceRecordsToStateCOROUTINE$65(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ttv_1 = _this__u8e3s4;
  }
  protoOf($commitAttendanceRecordsToStateCOROUTINE$65).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            tmp_0.utv_1 = this.ttv_1.gtt_1;
            var tmp_1 = this;
            tmp_1.vtv_1 = null;
            this.hd_1 = 1;
            suspendResult = this.utv_1.n23(this.vtv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 5;
            this.hd_1 = 3;
            suspendResult = savePersonAndAttendanceRecords(this.ttv_1, this.ttv_1.ctt_1.t2().itu().r9w_1, this.ttv_1.ctt_1.t2().rtt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.wtv_1 = suspendResult;
            this.id_1 = 6;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.utv_1.y22(this.vtv_1);
            return Unit_instance;
          case 5:
            this.id_1 = 6;
            var t = this.kd_1;
            this.utv_1.y22(this.vtv_1);
            throw t;
          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 ClazzLogEditAttendanceViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EditAttendance');
    this.ctt_1 = MutableStateFlow(new ClazzLogEditAttendanceUiState());
    this.dtt_1 = asStateFlow(this.ctt_1);
    var tmp = this;
    tmp.ett_1 = lazy_0(ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda(savedStateHandle, this));
    this.ftt_1 = null;
    this.gtt_1 = Mutex();
    var tmp_0 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.htt_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().wlu_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzLogEditAttendanceViewModel$slambda_0(this, null);
    this.upc(tmp_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda_2(this, null));
  }
  protoOf(ClazzLogEditAttendanceViewModel).atx = function (clazzLog, forceLoad) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.ctt_1.t2().ttt_1.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        if (item.r9w_1.equals(clazzLog.r9w_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var logIndex = tmp$ret$1;
    if (!forceLoad ? logIndex === this.ctt_1.t2().stt_1 : false)
      return Unit_instance;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ctt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        _set_currentClazzLogIndex__l00dbq(this, logIndex);
        var tmp$ret$3;
        $l$block_0: {
          // Inline function 'kotlin.collections.indexOfFirst' call
          var index_0 = 0;
          var tmp0_iterator_0 = prevValue.ttt_1.w();
          while (tmp0_iterator_0.f()) {
            var item_0 = tmp0_iterator_0.e();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>.<anonymous>' call
            if (item_0.r9w_1.equals(clazzLog.r9w_1)) {
              tmp$ret$3 = index_0;
              break $l$block_0;
            }
            index_0 = index_0 + 1 | 0;
          }
          tmp$ret$3 = -1;
        }
        var nextValue = prevValue.xtt(VOID, tmp$ret$3, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block_1;
        }
      }
    }
    var tmp0_safe_receiver = this.ftt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.bpc();
    tmp.ftt_1 = launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0(clazzLog, this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).ytz = function (clazzLog, forceLoad, $super) {
    forceLoad = forceLoad === VOID ? false : forceLoad;
    var tmp;
    if ($super === VOID) {
      this.atx(clazzLog, forceLoad);
      tmp = Unit_instance;
    } else {
      tmp = $super.atx.call(this, clazzLog, forceLoad);
    }
    return tmp;
  };
  protoOf(ClazzLogEditAttendanceViewModel).ztz = function (record) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ctt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClazzLogAttendanceChanged.<anonymous>' call
        var nextValue = prevValue.xtt(replace_0(prevValue.rtt_1, record, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda(record)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).au0 = function (status) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ctt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.rtt_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.w();
        while (tmp0_iterator.f()) {
          var item = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver = item.i9s_1;
          var tmp;
          if (tmp0_safe_receiver == null) {
            tmp = null;
          } else {
            tmp = shallowCopy_7(tmp0_safe_receiver, ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda(status));
          }
          var tmp$ret$0 = item.fje(VOID, VOID, tmp);
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.xtt(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).mq0 = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this, null));
  };
  function ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? emptyList() : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? 0 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? emptyList() : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    canEdit = canEdit === VOID ? false : canEdit;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.rtt_1 = clazzLogAttendanceRecordList;
    this.stt_1 = currentClazzLogIndex;
    this.ttt_1 = clazzLogsList;
    this.utt_1 = fieldsEnabled;
    this.vtt_1 = canEdit;
    this.wtt_1 = timeZone;
  }
  protoOf(ClazzLogEditAttendanceUiState).ztw = function (clazzLogUid) {
    // Inline function 'kotlin.let' call
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.ttt_1.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
        if (item.r9w_1.equals(clazzLogUid)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
    var it = tmp$ret$1;
    return it >= 0 ? it : null;
  };
  protoOf(ClazzLogEditAttendanceUiState).itu = function () {
    return this.ttt_1.v(this.stt_1);
  };
  protoOf(ClazzLogEditAttendanceUiState).bu0 = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    return new ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).xtt = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone, $super) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? this.rtt_1 : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? this.stt_1 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? this.ttt_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.utt_1 : fieldsEnabled;
    canEdit = canEdit === VOID ? this.vtt_1 : canEdit;
    timeZone = timeZone === VOID ? this.wtt_1 : timeZone;
    return $super === VOID ? this.bu0(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) : $super.bu0.call(this, clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).toString = function () {
    return 'ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList=' + this.rtt_1 + ', currentClazzLogIndex=' + this.stt_1 + ', clazzLogsList=' + this.ttt_1 + ', fieldsEnabled=' + this.utt_1 + ', canEdit=' + this.vtt_1 + ', timeZone=' + this.wtt_1 + ')';
  };
  protoOf(ClazzLogEditAttendanceUiState).hashCode = function () {
    var result = hashCode(this.rtt_1);
    result = imul(result, 31) + this.stt_1 | 0;
    result = imul(result, 31) + hashCode(this.ttt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.utt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vtt_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.wtt_1) | 0;
    return result;
  };
  protoOf(ClazzLogEditAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.rtt_1, tmp0_other_with_cast.rtt_1))
      return false;
    if (!(this.stt_1 === tmp0_other_with_cast.stt_1))
      return false;
    if (!equals(this.ttt_1, tmp0_other_with_cast.ttt_1))
      return false;
    if (!(this.utt_1 === tmp0_other_with_cast.utt_1))
      return false;
    if (!(this.vtt_1 === tmp0_other_with_cast.vtt_1))
      return false;
    if (!(this.wtt_1 === tmp0_other_with_cast.wtt_1))
      return false;
    return true;
  };
  function newClazzLog$factory() {
    return getPropertyCallableRef('newClazzLog', 1, KProperty1, function (receiver) {
      return _get_newClazzLog__zdra0r(receiver);
    }, null);
  }
  function get_stringResource(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 5:
        tmp = strings_getInstance().cmp_1;
        break;
      case 4:
        tmp = strings_getInstance().dmp_1;
        break;
      case 3:
        tmp = strings_getInstance().emp_1;
        break;
      case 2:
        tmp = strings_getInstance().fmp_1;
        break;
      case 1:
        tmp = strings_getInstance().gmp_1;
        break;
      case 0:
        tmp = strings_getInstance().hmp_1;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function get_contentTypeStringResource(_this__u8e3s4) {
    var tmp;
    if (!_this__u8e3s4.mao_1) {
      tmp = strings_getInstance().jmd_1;
    } else {
      var tmp0_subject = _this__u8e3s4.rao_1;
      var tmp_0;
      if (tmp0_subject === 1) {
        tmp_0 = strings_getInstance().oln_1;
      } else {
        if (tmp0_subject === 2) {
          tmp_0 = strings_getInstance().mln_1;
        } else {
          if (tmp0_subject === 3) {
            tmp_0 = strings_getInstance().nln_1;
          } else {
            if (tmp0_subject === 4) {
              tmp_0 = strings_getInstance().oma_1;
            } else {
              if (tmp0_subject === 5) {
                tmp_0 = strings_getInstance().rln_1;
              } else {
                if (tmp0_subject === 6) {
                  tmp_0 = strings_getInstance().pln_1;
                } else {
                  if (tmp0_subject === 7) {
                    tmp_0 = strings_getInstance().qln_1;
                  } else {
                    tmp_0 = strings_getInstance().wli_1;
                  }
                }
              }
            }
          }
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function Companion_134() {
    Companion_instance_182 = this;
    this.cu0_1 = 'ContentEntry';
    var tmp = this;
    Companion_getInstance_120();
    Companion_getInstance_120();
    Companion_getInstance_120();
    Companion_getInstance_120();
    tmp.du0_1 = listOf(['entityUid', 'clazzUid', 'parentUid', 'courseBlockUid']);
  }
  var Companion_instance_182;
  function Companion_getInstance_152() {
    if (Companion_instance_182 == null)
      new Companion_134();
    return Companion_instance_182;
  }
  function ContentEntryDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_152();
    DetailViewModel.call(this, di, savedStateHandle, 'ContentEntryDetailOverviewView');
    var tmp = this;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.detail.ContentEntryDetailViewModel._uiState.<anonymous>' call
    this.wpc(this_0, Companion_getInstance_152().du0_1);
    var tmp$ret$2 = this_0.f3();
    tmp.au1_1 = MutableStateFlow(new ContentEntryDetailUiState(listOf_0(new TabItem('ContentEntryDetailOverviewView', tmp$ret$2, this.ipc().rnd(strings_getInstance().bm5_1)))));
    this.bu1_1 = asStateFlow(this.au1_1);
  }
  function ContentEntryDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.cu1_1 = tabs;
  }
  protoOf(ContentEntryDetailUiState).toString = function () {
    return 'ContentEntryDetailUiState(tabs=' + this.cu1_1 + ')';
  };
  protoOf(ContentEntryDetailUiState).hashCode = function () {
    return hashCode(this.cu1_1);
  };
  protoOf(ContentEntryDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailUiState ? other : THROW_CCE();
    if (!equals(this.cu1_1, tmp0_other_with_cast.cu1_1))
      return false;
    return true;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lu1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).nu1 = function (it, $completion) {
    var tmp = this.ou1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.nu1((p1 == null ? true : p1 instanceof ContentEntryAndDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.lu1_1.lu2_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ou3(VOID, this.mu1_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).ou1 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.lu1_1, completion);
    i.mu1_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.nu1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.xu3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).lq5 = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.lq5(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).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.yu3_1.a7k().fan(this.xu3_1.zu2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).tmw = function (db, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this.xu3_1, completion);
    i.yu3_1 = db;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.lq5(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.hu4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ju4 = function (it, $completion) {
    var tmp = this.ku4(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.ju4((p1 == null ? true : p1 instanceof ContentEntryVersion) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.hu4_1.lu2_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ou3(VOID, VOID, this.iu4_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ku4 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.hu4_1, completion);
    i.iu4_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ju4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.tu4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).vu4 = function (it, $completion) {
    var tmp = this.wu4(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.vu4((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.tu4_1.lu2_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.uu4_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).wu4 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.tu4_1, completion);
    i.uu4_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.vu4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.fu5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).hu5 = function (it, $completion) {
    var tmp = this.iu5(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.hu5((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.fu5_1.lu2_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.gu5_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).iu5 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.fu5_1, completion);
    i.gu5_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.hu5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.ru5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).tu5 = function (it, $completion) {
    var tmp = this.uu5(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).he = function (p1, $completion) {
    return this.tu5((p1 == null ? true : p1 instanceof OfflineItemAndState) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ru5_1.lu2_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.su5_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).uu5 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this.ru5_1, completion);
    i.su5_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.tu5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda() {
    return 'Could not get list of jobs';
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.du6_1 = this$0;
    this.eu6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).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;
            var tmp_0 = this.du6_1.epc().a7k();
            Companion_getInstance_120();
            var tmp0_safe_receiver = this.eu6_1.ba('courseBlockUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp_0.ean(this.du6_1.epb_1, this.du6_1.yu2_1, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.du6_1.cpc());
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.du6_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this.du6_1, this.eu6_1, completion);
    i.fu6_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ou6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            Companion_getInstance_158();
            if (this.ou6_1.zu2_1.equals(new Long(1, 0))) {
              var tmp_0 = this;
              tmp_0.qu6_1 = this.ou6_1.ipc().rnd(strings_getInstance().xmi_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.ou6_1.epc();
              suspendResult = localFirstThenRepoIfNull(tmp_1, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this.ou6_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.qu6_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var parentTitle = this.qu6_1;
            l$ret$1: do {
              var this_0 = this.ou6_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mov(VOID, VOID, parentTitle);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this.ou6_1, completion);
    i.pu6_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.zu6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).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;
            var tmp_0 = this.zu6_1.epc().n7l().wbh(this.zu6_1.epb_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.zu6_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this.zu6_1, completion);
    i.au7_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.ju7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).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;
            var tmp_0 = this.ju7_1.dpc().o7l();
            var tmp_1 = tmp_0.ehv(this.ju7_1.epb_1, 1);
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.ju7_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this.ju7_1, completion);
    i.ku7_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.tu7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).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;
            var tmp_0 = this.tu7_1.dpc().h7l().db3(this.tu7_1.epb_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.tu7_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this.tu7_1, completion);
    i.uu7_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.du8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).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;
            var tmp_0 = this.du8_1.dpc().q7l().sfi(this.du8_1.epb_1, this.du8_1.fu8().v6a_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this.du8_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this.du8_1, completion);
    i.eu8_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation) {
    this.ou8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.qu8_1 = _get_httpClient__2ty1zc_1(this.ou8_1);
            var tmp_1 = this;
            tmp_1.ru8_1 = this.ou8_1.apc().kn5().hmr_1 + 'api/contententryimportjob/importjobs';
            var tmp_2 = this;
            tmp_2.su8_1 = this.qu8_1;
            var tmp_3 = this;
            tmp_3.tu8_1 = this.su8_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.ru8_1);
            parameter(this_0, 'contententryuid', this.ou8_1.epb_1.toString());
            header(this_0, 'cache-control', 'no-store');
            tmp_4.uu8_1 = this_0;
            this.uu8_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_5 = this;
            tmp_5.vu8_1 = this.tu8_1;
            var tmp_6 = this;
            tmp_6.wu8_1 = this.uu8_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.wu8_1, this.vu8_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.xu8_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.xu8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var remoteImportJobsJson = suspendResult;
            var remoteImportJobs = this.ou8_1.r4x().x4b(ListSerializer(Companion_instance_39.s4x()), remoteImportJobsJson);
            var tmp$ret$0;
            l$ret$1: do {
              var this_1 = this.ou8_1.lu2_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, remoteImportJobs);
                if (this_1.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            var state = tmp$ret$0;
            if (!state.ju3_1.c1()) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.hd_1 = 7;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              var e = this.kd_1;
              var tmp_8 = Napier_getInstance();
              tmp_8.p5k(VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda);
              this.hd_1 = 7;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            throw this.kd_1;
          case 7:
            this.id_1 = 6;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this.ou8_1, completion);
    i.pu8_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation) {
    this.gu9_1 = $this_launch;
    this.hu9_1 = this$0;
    this.iu9_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.gu9_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this.hu9_1, this.iu9_1, null));
          if (this.hu9_1.yu2_1.equals(new Long(0, 0)) ? !this.hu9_1.zu2_1.equals(new Long(0, 0)) : false) {
            launch(this.gu9_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this.hu9_1, null));
          }
          launchSetTitleFromClazzUid(this.hu9_1, this.hu9_1.yu2_1, ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this.hu9_1));
          launch(this.gu9_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this.hu9_1, null));
          launch(this.gu9_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this.hu9_1, null));
          launch(this.gu9_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this.hu9_1, null));
          launch(this.gu9_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this.hu9_1, null));
          launch(this.gu9_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this.hu9_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).q7e = function (completion) {
    return new ContentEntryDetailOverviewViewModel$slambda$slambda(this.gu9_1, this.hu9_1, this.iu9_1, completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda_0($this_launch, this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation) {
    this.ru9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).wo0 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).he = function (p1, $completion) {
    return this.wo0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).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.su9_1.n7l().vbh(this.ru9_1.epb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).tmw = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this.ru9_1, completion);
    i.su9_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wo0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda() {
    return 'ContentEntryDetailoverview: could not dismiss remote error message';
  }
  function _get_makeContentEntryAvailableOfflineUseCase__dvw4p1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mu2_1;
    makeContentEntryAvailableOfflineUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelDownloadUseCase__t8wbc4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nu2_1;
    cancelDownloadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_defaultLaunchContentEntryUseCase__lyydsx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qu2_1;
    defaultLaunchContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchXapiUseCase__jmtlap($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ru2_1;
    launchXapiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchEpubUseCase__sunqd7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.su2_1;
    launchEpubUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelImportContentEntryUseCase__kqom1e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.uu2_1;
    cancelImportContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelRemoteContentEntryImportUseCase__8yb0xk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vu2_1;
    cancelRemoteContentEntryImportUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wu2_1;
    dismissRemoteContentEntryImportErrorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xu2_1;
    httpClient$factory_4();
    return this_0.t2();
  }
  function Companion_135() {
    this.tu9_1 = 'ContentEntryDetailOverviewView';
    this.uu9_1 = 'target';
  }
  var Companion_instance_183;
  function Companion_getInstance_153() {
    return Companion_instance_183;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_21(function_0) {
    this.vu9_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_21).t1d = function (value, $completion) {
    return this.vu9_1(value, $completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.eua_1 = this$0;
    this.fua_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).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 = whenSubscribed(this.eua_1.lu2_1, ContentEntryDetailOverviewViewModel$slambda$slambda_0(this.gua_1, this.eua_1, this.fua_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this.eua_1, this.fua_1, completion);
    i.gua_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation) {
    this.pua_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.id_1 = 5;
            this.pua_1.kpc(Companion_getInstance_93().tov_1);
            Napier_getInstance().n5k('ContentEntryDetailOverviewViewModel: onClickOpen launched');
            l$ret$1: do {
              var this_0 = this.pua_1.lu2_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            var tmp_0 = this.pua_1.epc();
            suspendResult = localFirstThenRepoIfNull(tmp_0, ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this.pua_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.sua_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.pua_1.tu2_1;
            var tmp_2;
            if (tmp0_safe_receiver == null) {
              tmp_2 = null;
            } else {
              tmp_2 = Companion_instance_92.klh(tmp0_safe_receiver);
            }

            var tmp1_elvis_lhs = tmp_2;
            tmp_1.tua_1 = tmp1_elvis_lhs == null ? LinkTarget_DEFAULT_getInstance() : tmp1_elvis_lhs;
            if (!(this.sua_1 == null)) {
              var tmp_3 = this;
              var tmp2_subject = this.sua_1.yap_1;
              var tmp_4;
              if (tmp2_subject === 'xapi') {
                tmp_4 = _get_launchXapiUseCase__jmtlap(this.pua_1);
              } else {
                if (tmp2_subject === 'epub') {
                  tmp_4 = _get_launchEpubUseCase__sunqd7(this.pua_1);
                } else {
                  tmp_4 = null;
                }
              }
              tmp_3.uua_1 = tmp_4;
              var tmp_5 = this;
              var tmp3_elvis_lhs = this.uua_1;
              tmp_5.vua_1 = tmp3_elvis_lhs == null ? _get_defaultLaunchContentEntryUseCase__lyydsx(this.pua_1) : tmp3_elvis_lhs;
              Napier_getInstance().n5k('ContentEntryDetailOverviewViewModel: onClickOpen : Launching using ' + this.vua_1);
              this.hd_1 = 3;
              Companion_getInstance_120();
              var tmp4_safe_receiver = this.pua_1.kpb_1.ba('courseBlockUid');
              var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
              suspendResult = this.vua_1.go0(this.sua_1, this.pua_1.mpb_1, this.pua_1.yu2_1, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs, this.tua_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              Napier_getInstance().n5k('ContentEntryDetailOverviewViewModel: onClickOpen: latestContentEntryVersion = null');
              this.pua_1.gpc().bow(new Snack(this.pua_1.ipc().rnd(strings_getInstance().vmm_1)));
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.rua_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 8;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              var tmp_7 = this;
              this.pua_1.gpc().bow(new Snack(this.pua_1.ipc().rnd(strings_getInstance().hlj_1) + (':' + e.message)));
              Napier_getInstance().r5k('ContentEntryDetailOverview: Exception opening content', e);
              tmp_7.rua_1 = Unit_instance;
              this.id_1 = 7;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            this.pua_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$5: do {
              var this_1 = this.pua_1.lu2_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            this.pua_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$7: do {
              var this_2 = this.pua_1.lu2_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 7) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this.pua_1, completion);
    i.qua_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation) {
    this.eub_1 = this$0;
    this.fub_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_cancelRemoteContentEntryImportUseCase__8yb0xk(this.eub_1).jny(this.fub_1, this.eub_1.cpc(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.eub_1.gpc().bow(new Snack(this.eub_1.ipc().rnd(strings_getInstance().ylj_1)));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              this.eub_1.gpc().bow(new Snack(this.eub_1.ipc().rnd(strings_getInstance().hlj_1)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this.eub_1, this.fub_1, completion);
    i.gub_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation) {
    this.pub_1 = this$0;
    this.qub_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(this.pub_1).jny(this.qub_1, this.pub_1.cpc(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              var tmp_1 = Napier_getInstance();
              tmp_1.t5k(VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda);
              this.pub_1.gpc().bow(new Snack(this.pub_1.ipc().rnd(strings_getInstance().hlj_1)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this.pub_1, this.qub_1, completion);
    i.rub_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'ContentEntryDetailOverviewView');
    this.lu2_1 = MutableStateFlow(new ContentEntryDetailOverviewUiState());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeContentEntryAvailableOfflineUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.mu2_1 = Instance(this_0, tmp$ret$0, null).f5j(this, makeContentEntryAvailableOfflineUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(CancelDownloadUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.nu2_1 = Instance(this_1, tmp$ret$2, null).f5j(this, cancelDownloadUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.ou2_1 = Instance(this_2, tmp$ret$4, null).f5j(this, nodeIdAndAuth$factory());
    this.pu2_1 = asStateFlow(this.lu2_1);
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(LaunchContentEntryVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.qu2_1 = Instance(this_3, tmp$ret$6, null).f5j(this, defaultLaunchContentEntryUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_4 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.ru2_1 = InstanceOrNull(this_4, tmp$ret$8, null).f5j(this, launchXapiUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_5 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(LaunchEpubUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.su2_1 = InstanceOrNull(this_5, tmp$ret$10, null).f5j(this, launchEpubUseCase$factory());
    this.tu2_1 = savedStateHandle.ba('target');
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_6 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(CancelImportContentEntryUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.uu2_1 = InstanceOrNull(this_6, tmp$ret$12, null).f5j(this, cancelImportContentEntryUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_7 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.vu2_1 = Instance(this_7, tmp$ret$14, null).f5j(this, cancelRemoteContentEntryImportUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_8 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.wu2_1 = Instance(this_8, tmp$ret$16, null).f5j(this, dismissRemoteContentEntryImportErrorUseCase$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.xu2_1 = Instance(di, tmp$ret$18, null).f5j(this, httpClient$factory_3());
    var tmp_19 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_19.yu2_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_20 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_20.zu2_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_9 = this.lu2_1;
      while (true) {
        var prevValue = this_9.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>' call
        var nextValue = prevValue.ou3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.cpc());
        if (this_9.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_21 = this.bpc();
    launch(tmp_21, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ContentEntryDetailOverviewViewModel).fu8 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.ou2_1;
    nodeIdAndAuth$factory_0();
    return this_0.t2();
  };
  protoOf(ContentEntryDetailOverviewViewModel).sub = function () {
    Napier_getInstance().n5k('ContentEntryDetailOverviewViewModel: onClickOpen');
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).tub = function (jobUid) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).uub = function (jobUid) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this, jobUid, null));
  };
  function ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) {
    scoreProgress = scoreProgress === VOID ? null : scoreProgress;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? null : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? null : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? false : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? false : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? false : translationVisibile;
    availableTranslations = availableTranslations === VOID ? emptyList() : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? emptyList() : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? emptyList() : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? emptyList() : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? null : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? true : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    this.au3_1 = scoreProgress;
    this.bu3_1 = contentEntry;
    this.cu3_1 = latestContentEntryVersion;
    this.du3_1 = contentEntryButtons;
    this.eu3_1 = locallyAvailable;
    this.fu3_1 = markCompleteVisible;
    this.gu3_1 = translationVisibile;
    this.hu3_1 = availableTranslations;
    this.iu3_1 = activeImportJobs;
    this.ju3_1 = remoteImportJobs;
    this.ku3_1 = activeUploadJobs;
    this.lu3_1 = offlineItemAndState;
    this.mu3_1 = openButtonEnabled;
    this.nu3_1 = activeUserPersonUid;
  }
  protoOf(ContentEntryDetailOverviewUiState).vub = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.bu3_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rap_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.bao_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).wub = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.bu3_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rap_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.cao_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).xub = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.bu3_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rap_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eao_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).yub = function () {
    return false;
  };
  protoOf(ContentEntryDetailOverviewUiState).zub = function () {
    return !(this.au3_1 == null);
  };
  protoOf(ContentEntryDetailOverviewUiState).auc = function () {
    var tmp0_safe_receiver = this.cu3_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-compressedSizeVisible>.<anonymous>' call
      tmp = (tmp0_safe_receiver.eaq_1.c7(new Long(0, 0)) > 0 ? tmp0_safe_receiver.eaq_1.c7(new Long(0, 0)) > 0 : false) ? tmp0_safe_receiver.eaq_1.c7(tmp0_safe_receiver.faq_1) < 0 : false;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).buc = function () {
    var tmp0_safe_receiver = this.cu3_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-sizeVisible>.<anonymous>' call
      tmp = tmp0_safe_receiver.eaq_1.c7(new Long(0, 0)) > 0;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).cuc = function (importJobProgress) {
    return importJobProgress.jb3_1.equals(this.nu3_1);
  };
  protoOf(ContentEntryDetailOverviewUiState).duc = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) {
    return new ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).ou3 = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, $super) {
    scoreProgress = scoreProgress === VOID ? this.au3_1 : scoreProgress;
    contentEntry = contentEntry === VOID ? this.bu3_1 : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? this.cu3_1 : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? this.du3_1 : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? this.eu3_1 : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? this.fu3_1 : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? this.gu3_1 : translationVisibile;
    availableTranslations = availableTranslations === VOID ? this.hu3_1 : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? this.iu3_1 : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? this.ju3_1 : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? this.ku3_1 : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? this.lu3_1 : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? this.mu3_1 : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.nu3_1 : activeUserPersonUid;
    return $super === VOID ? this.duc(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) : $super.duc.call(this, scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).toString = function () {
    return 'ContentEntryDetailOverviewUiState(scoreProgress=' + this.au3_1 + ', contentEntry=' + this.bu3_1 + ', latestContentEntryVersion=' + this.cu3_1 + ', contentEntryButtons=' + this.du3_1 + ', locallyAvailable=' + this.eu3_1 + ', markCompleteVisible=' + this.fu3_1 + ', translationVisibile=' + this.gu3_1 + ', availableTranslations=' + this.hu3_1 + ', activeImportJobs=' + this.iu3_1 + ', remoteImportJobs=' + this.ju3_1 + ', activeUploadJobs=' + this.ku3_1 + ', offlineItemAndState=' + this.lu3_1 + ', openButtonEnabled=' + this.mu3_1 + ', activeUserPersonUid=' + this.nu3_1.toString() + ')';
  };
  protoOf(ContentEntryDetailOverviewUiState).hashCode = function () {
    var result = this.au3_1 == null ? 0 : this.au3_1.hashCode();
    result = imul(result, 31) + (this.bu3_1 == null ? 0 : this.bu3_1.hashCode()) | 0;
    result = imul(result, 31) + (this.cu3_1 == null ? 0 : this.cu3_1.hashCode()) | 0;
    result = imul(result, 31) + (this.du3_1 == null ? 0 : hashCode(this.du3_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.eu3_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fu3_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gu3_1) | 0;
    result = imul(result, 31) + hashCode(this.hu3_1) | 0;
    result = imul(result, 31) + hashCode(this.iu3_1) | 0;
    result = imul(result, 31) + hashCode(this.ju3_1) | 0;
    result = imul(result, 31) + hashCode(this.ku3_1) | 0;
    result = imul(result, 31) + (this.lu3_1 == null ? 0 : this.lu3_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mu3_1) | 0;
    result = imul(result, 31) + this.nu3_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.au3_1, tmp0_other_with_cast.au3_1))
      return false;
    if (!equals(this.bu3_1, tmp0_other_with_cast.bu3_1))
      return false;
    if (!equals(this.cu3_1, tmp0_other_with_cast.cu3_1))
      return false;
    if (!equals(this.du3_1, tmp0_other_with_cast.du3_1))
      return false;
    if (!(this.eu3_1 === tmp0_other_with_cast.eu3_1))
      return false;
    if (!(this.fu3_1 === tmp0_other_with_cast.fu3_1))
      return false;
    if (!(this.gu3_1 === tmp0_other_with_cast.gu3_1))
      return false;
    if (!equals(this.hu3_1, tmp0_other_with_cast.hu3_1))
      return false;
    if (!equals(this.iu3_1, tmp0_other_with_cast.iu3_1))
      return false;
    if (!equals(this.ju3_1, tmp0_other_with_cast.ju3_1))
      return false;
    if (!equals(this.ku3_1, tmp0_other_with_cast.ku3_1))
      return false;
    if (!equals(this.lu3_1, tmp0_other_with_cast.lu3_1))
      return false;
    if (!(this.mu3_1 === tmp0_other_with_cast.mu3_1))
      return false;
    if (!this.nu3_1.equals(tmp0_other_with_cast.nu3_1))
      return false;
    return true;
  };
  function makeContentEntryAvailableOfflineUseCase$factory() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.fu8();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_3() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(receiver);
    }, null);
  }
  function makeContentEntryAvailableOfflineUseCase$factory_0() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory_0() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory_0() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.fu8();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory_0() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory_0() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory_0() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory_0() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_4() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(receiver);
    }, null);
  }
  function get_progress(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4.gb3_1.c7(new Long(0, 0)) > 0) {
      tmp = _this__u8e3s4.fb3_1.zc() / _this__u8e3s4.gb3_1.zc();
    } else {
      tmp = 0.0;
    }
    return tmp;
  }
  function ContentEntryEditViewModel$slambda$slambda$lambda($newContentEntryUid, this$0, $savedStateHandle) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.xan_1 = $newContentEntryUid;
      var tmp;
      if (this$0.gud_1) {
        var tmp_0 = $this$shallowCopy;
        tmp_0.tao_1 = 2;
        var tmp_1 = $this$shallowCopy;
        Companion_getInstance_120();
        var tmp0_safe_receiver = $savedStateHandle.ba('clazzUid');
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        tmp_1.sao_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
        tmp = Unit_instance;
      } else {
        var tmp_2 = $this$shallowCopy;
        tmp_2.tao_1 = 1;
        $this$shallowCopy.sao_1 = this$0.cpc();
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda($newDecription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.zan_1 = $newDecription;
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.pud_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).ioz = function (it, $completion) {
    var tmp = this.joz(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.qud_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDecription = tmp_1;
          var tmp1_safe_receiver = this.pud_1.dud_1.t2().rud_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sjb_1;
          var tmp_2;
          if (tmp2_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_8(tmp2_safe_receiver, ContentEntryEditViewModel$slambda$slambda$slambda$lambda(newDecription));
          }
          this.pud_1.due(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).joz = function (it, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this.pud_1, completion);
    i.qud_1 = it;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ioz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack) {
    return function (it) {
      return it.snb_1 === $newSubtitleTrack.snb_1;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0($newSubtitleTrack) {
    return function (prev) {
      return replaceOrAppend(prev, $newSubtitleTrack, ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack));
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.mue_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).ioz = function (navResult, $completion) {
    var tmp = this.joz(navResult, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.nue_1.poy_1;
          var tmp0_elvis_lhs = tmp_0 instanceof SubtitleTrack ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubtitleTrack = tmp_1;
          updateSubtitles(this.mue_1, ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0(newSubtitleTrack));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).joz = function (navResult, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this.mue_1, completion);
    i.nue_1 = navResult;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (navResult, $completion) {
      return i.ioz(navResult, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.wue_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda).auf = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.auf(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.xue_1;
            var tmp_1;
            if (!this.wue_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.yue_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a7k();
            if (this.yue_1 == null) {
              this.zue_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.yue_1.dan(this.wue_1.qph_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.zue_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp2_safe_receiver = this.zue_1;
            var tmp_2;
            if (tmp2_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var tmp_3;
              if (!(tmp2_safe_receiver.lap_1 == null)) {
                var tmp_4 = tmp2_safe_receiver.lap_1;
                var tmp0_elvis_lhs = tmp2_safe_receiver.map_1;
                tmp_3 = new ContentEntryAndContentJob(tmp_4, VOID, VOID, tmp0_elvis_lhs == null ? new ContentEntryPicture2(this.wue_1.qph_1) : tmp0_elvis_lhs);
              } else {
                tmp_3 = null;
              }
              tmp_2 = tmp_3;
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this.wue_1, completion);
    i.xue_1 = db;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.auf(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.juf_1 = this$0;
    this.kuf_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).muf = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.muf($completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = get_doorPrimaryKeyManager(this.juf_1.dpc());
            tmp_0.luf_1 = tmp_1.s68(42);
            this.hd_1 = 1;
            suspendResult = this.juf_1.npc(this.kuf_1, 'metadata', Companion_instance_80.s4x(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var importedMetaData = suspendResult;
            var tmp_2;
            if (!(importedMetaData == null)) {
              var tmp0_safe_receiver = importedMetaData.fnc_1;
              var pictureUri = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pap_1;
              if (!(pictureUri == null)) {
                Companion_getInstance_118();
                this.kuf_1.qp7('initPicUri', '');
              }
              var tmp_3 = shallowCopy_8(importedMetaData.cnc_1, ContentEntryEditViewModel$slambda$slambda$lambda(this.luf_1, this.juf_1, this.kuf_1));
              var tmp1_cjiPluginId = importedMetaData.dnc_1;
              var tmp2_sourceUri = importedMetaData.cnc_1.gao_1;
              var tmp3_cjiOriginalFilename = importedMetaData.enc_1;
              var tmp4_cjiOwnerPersonUid = this.juf_1.cpc();
              var tmp_4 = new ContentEntryImportJob(VOID, tmp2_sourceUri, tmp3_cjiOriginalFilename, this.luf_1, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_cjiPluginId, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_cjiOwnerPersonUid);
              var tmp5_safe_receiver = importedMetaData.fnc_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.sjk(this.luf_1);
              var this_0 = new ContentEntryAndContentJob(tmp_3, VOID, tmp_4, tmp6_elvis_lhs == null ? new ContentEntryPicture2(this.luf_1) : tmp6_elvis_lhs);
              var tmp_5 = this.juf_1.ipc();
              var tmp_6 = strings_getInstance().pmc_1;
              var tmp0_elvis_lhs = importedMetaData.enc_1;
              var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? importedMetaData.cnc_1.gao_1 : tmp0_elvis_lhs;
              this.kuf_1.qp7('savedTitle', tmp_5.snd(tmp_6, [tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs]));
              tmp_2 = this_0;
            } else {
              var this_1 = new ContentEntry();
              this_1.xan_1 = this.luf_1;
              var tmp_7 = this_1;
              var tmp0_safe_receiver_0 = this.kuf_1.ba('leaf');
              tmp_7.mao_1 = (tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0)) === true;
              this_1.sao_1 = this.juf_1.cpc();
              tmp_2 = new ContentEntryAndContentJob(this_1, VOID, VOID, new ContentEntryPicture2(this.luf_1));
            }

            return tmp_2;
          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);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ContentEntryEditViewModel$slambda$slambda_1(this.juf_1, this.kuf_1, completion);
  };
  function ContentEntryEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.muf($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.dud_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp1_safe_receiver = it == null ? null : it.ujb_1;
          var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramSubtitles(tmp1_safe_receiver, this$0.r4x());
          var nextValue = prevValue.nuf(it, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.wuf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).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;
            var tmp_0 = this.wuf_1.mpc(this.wuf_1.fpc(), 'contentEntryDesc');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_0(this.wuf_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_22(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this.wuf_1, completion);
    i.xuf_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.gug_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).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;
            var tmp_0 = this.gug_1.mpc(this.gug_1.fpc(), 'subtitleKey');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_2(this.gug_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_22(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this.gug_1, completion);
    i.hug_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function updateSubtitles($this, function_0) {
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this.dud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>' call
        var updatedSubtitles = function_0(prevValue.cue_1);
        var tmp0_safe_receiver = prevValue.rud_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ujb_1;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramMap(tmp1_safe_receiver, $this.r4x());
        var prevContentJobParamMap = tmp2_elvis_lhs == null ? emptyMap() : tmp2_elvis_lhs;
        // Inline function 'kotlin.also' call
        var this_1 = toMutableMap(prevContentJobParamMap);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>.<anonymous>' call
        // Inline function 'kotlin.collections.set' call
        var key = 'subtitles';
        var value = $this.r4x().w4b(ListSerializer(Companion_instance_79.s4x()), updatedSubtitles);
        this_1.s(key, value);
        var contentJobParam = this_1;
        var tmp4_safe_receiver = prevValue.rud_1;
        var tmp;
        if (tmp4_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp3_safe_receiver = prevValue.rud_1.ujb_1;
          tmp = tmp4_safe_receiver.xjb(VOID, VOID, tmp3_safe_receiver == null ? null : tmp3_safe_receiver.hjk(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.r4x().w4b(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), contentJobParam)));
        }
        var tmp5_entity = tmp;
        var nextValue = prevValue.nuf(tmp5_entity, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, updatedSubtitles);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$2 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$2;
    scheduleEntityCommit($this, updatedState.rud_1);
  }
  function scheduleEntityCommit($this, entity) {
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_40.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver = $this.pph_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = $this;
    var tmp_0 = $this.bpc();
    tmp.pph_1 = launch(tmp_0, VOID, VOID, ContentEntryEditViewModel$scheduleEntityCommit$slambda_0(commitDelay, entity, $this, key, serializer, null));
  }
  function hasErrors_2(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.yud_1 == null);
  }
  function Companion_136() {
    this.iug_1 = 'leaf';
    this.jug_1 = 'courseBlock';
    this.kug_1 = 'ContentEntryEdit';
    this.lug_1 = 'metadata';
    this.mug_1 = 'savedTitle';
    this.nug_1 = 'goToOnContentEntryDone';
    this.oug_1 = 'contentEntryDesc';
    this.pug_1 = 'subtitleKey';
    this.qug_1 = 1;
    this.rug_1 = 2;
  }
  var Companion_instance_184;
  function Companion_getInstance_154() {
    return Companion_instance_184;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_22(function_0) {
    this.sug_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_22).t1d = function (value, $completion) {
    return this.sug_1(value, $completion);
  };
  function ContentEntryEditViewModel$slambda(this$0, resultContinuation) {
    this.buh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.buh_1.gud_1) {
              this.duh_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = this.cuh_1.u7l();
              var tmp_1 = this.buh_1.cpc();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.lhj(tmp_1, new Long(65536, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.duh_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.duh_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda).tmw = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda(this.buh_1, completion);
    i.cuh_1 = db;
    return i;
  };
  function ContentEntryEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.muh_1 = this$0;
    this.nuh_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).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;
            var tmp_0 = Companion_instance_40.s4x();
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda_0(this.muh_1, null);
            var tmp_2 = ContentEntryEditViewModel$slambda$slambda_2(this.muh_1, this.nuh_1, null);
            suspendResult = this.muh_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, ContentEntryEditViewModel$slambda$lambda(this.muh_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            Companion_getInstance_118();
            var tmp1_safe_receiver = it == null ? null : it.vjb_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pap_1;
            setIfNoValueSetYet(this.nuh_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            var tmp0_safe_receiver = this.muh_1.dud_1.t2().rud_1;
            var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sjb_1;
            var isLeaf = (tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.mao_1) === true;
            var savedStateTitle = this.nuh_1.ba('savedTitle');
            var title = !(savedStateTitle == null) ? savedStateTitle : (this.muh_1.qph_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.muh_1.ipc().rnd(strings_getInstance().pma_1) : (!this.muh_1.qph_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.muh_1.ipc().rnd(strings_getInstance().vml_1) : this.muh_1.ipc().rnd(strings_getInstance().uml_1);
            l$ret$1: do {
              var this_0 = this.muh_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.muh_1.ipc();
                var tmp0_subject = this.muh_1.fud_1;
                var tmp_4 = tmp_3.rnd(tmp0_subject === 1 ? strings_getInstance().klk_1 : tmp0_subject === 2 ? strings_getInstance().vlr_1 : strings_getInstance().hm3_1);
                var nextValue = prevValue.mov(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_4, VOID, ContentEntryEditViewModel$onClickSave$ref(this.muh_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.muh_1.dud_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nuf(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.ouh_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_4(this.muh_1, null));
            launch(this.ouh_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_6(this.muh_1, null));
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ContentEntryEditViewModel$slambda_1(this.muh_1, this.nuh_1, completion);
    i.ouh_1 = $this$launchIfHasPermission;
    return i;
  };
  function ContentEntryEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.xuh_1 = $commitDelay;
    this.yuh_1 = $entity;
    this.zuh_1 = $this;
    this.aui_1 = $key;
    this.bui_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.xuh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.yuh_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.zuh_1.opc(this.zuh_1.kpb_1, this.aui_1, this.bui_1, this.yuh_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda(this.xuh_1, this.yuh_1, this.zuh_1, this.aui_1, this.bui_1, completion);
    i.cui_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda($subtitleTrack) {
    return function (prev) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = prev.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickDeleteSubtitleTrack.<anonymous>.<anonymous>' call
        if (!(element.snb_1 === $subtitleTrack.snb_1)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    this.lui_1 = this$0;
    this.mui_1 = $contentEntryVal;
    this.nui_1 = $entityVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            Companion_getInstance_120();
            var tmp0_safe_receiver = this.lui_1.kpb_1.ba('parentUid');
            tmp_0.pui_1 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            this.hd_1 = 1;
            var tmp_1 = this.lui_1.qph_1.equals(new Long(0, 0)) ? this.pui_1 : null;
            Companion_getInstance_118();
            suspendResult = this.lui_1.bud_1.zo4(this.mui_1, tmp_1, this.nui_1.vjb_1, this.lui_1.kpb_1.ba('initPicUri'), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qui_1 = this.nui_1.ujb_1;
            if (!(this.qui_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.lui_1.cud_1.gnz(this.qui_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            Companion_getInstance_120();
            var popUpToOnFinish = this.lui_1.kpb_1.ba('popUpToOnFinish');
            if (!(this.lui_1.jpc() == null)) {
              this.lui_1.tph(this.mui_1);
            } else {
              this.lui_1.mpb_1.eoy(popUpToOnFinish == null ? this.lui_1.lpb_1 : popUpToOnFinish, true);
            }

            if (hasErrors_2(this.lui_1.dud_1.t2(), this.lui_1)) {
              this.lui_1.kpc(Companion_getInstance_93().uov_1);
              l$ret$1: do {
                var this_0 = this.lui_1.dud_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.nuf(VOID, VOID, VOID, VOID, true);
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              return Unit_instance;
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this.lui_1, this.mui_1, this.nui_1, completion);
    i.oui_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$onClickSave$slambda_0(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel(di, savedStateHandle, saveContentEntryUseCase, enqueueContentEntryImportUseCase) {
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.i5e(tmp$ret$0, null);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_2;
    if (enqueueContentEntryImportUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      tmp_2 = tmp_3.i5e(tmp$ret$0_0, null);
    } else {
      tmp_2 = enqueueContentEntryImportUseCase;
    }
    enqueueContentEntryImportUseCase = tmp_2;
    UstadEditViewModel.call(this, di, savedStateHandle, 'ContentEntryEdit');
    this.bud_1 = saveContentEntryUseCase;
    this.cud_1 = enqueueContentEntryImportUseCase;
    this.dud_1 = MutableStateFlow(new ContentEntryEditUiState());
    this.eud_1 = asStateFlow(this.dud_1);
    var tmp_5 = this;
    var tmp0_safe_receiver = savedStateHandle.ba('goToOnContentEntryDone');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp_5.fud_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    this.gud_1 = this.fud_1 === 1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_6 = ContentEntryEditViewModel$slambda_0(this, null);
    this.upc(tmp_6, VOID, VOID, ContentEntryEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ContentEntryEditViewModel).due = function (contentEntry) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.dud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onContentEntryChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.rud_1;
        var nextValue = prevValue.nuf(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xjb(contentEntry));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.rud_1);
  };
  protoOf(ContentEntryEditViewModel).nsm = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.dud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.rud_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.rud_1.vjb_1;
          tmp = tmp1_safe_receiver.xjb(VOID, VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sjk(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.nuf(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.rud_1);
  };
  protoOf(ContentEntryEditViewModel).rui = function (compressionLevel) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSetCompressionLevel.<anonymous>' call
        var tmp1_safe_receiver = prevValue.rud_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.rud_1.ujb_1;
          tmp = tmp1_safe_receiver.xjb(VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hjk(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, compressionLevel.vnv_1));
        }
        var nextValue = prevValue.nuf(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryEditViewModel).sui = function (uri, fileName) {
    var tmp = Companion_instance_79.s4x();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSubtitleFileAdded.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    this_0.s('uri', uri);
    // Inline function 'kotlin.collections.set' call
    var key = 'filename';
    this_0.s(key, fileName);
    var tmp$ret$2 = this_0.f3();
    this.qpc('GetSubtitle', 'subtitleKey', null, tmp, tmp$ret$2);
  };
  protoOf(ContentEntryEditViewModel).tui = function (subtitleTrack) {
    this.qpc('SubtitleEdit', 'subtitleKey', subtitleTrack, Companion_instance_79.s4x());
  };
  protoOf(ContentEntryEditViewModel).uui = function (subtitleTrack) {
    updateSubtitles(this, ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda(subtitleTrack));
  };
  protoOf(ContentEntryEditViewModel).mq0 = function () {
    var entityVal = this.dud_1.t2().rud_1;
    var tmp0_safe_receiver = this.dud_1.t2().rud_1;
    var contentEntry = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.sjb_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var tmp;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_1 = contentEntry == null ? null : contentEntry.yan_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : isBlank(this_1)) {
          tmp = this.ipc().rnd(strings_getInstance().bmm_1);
        } else {
          tmp = null;
        }
        var nextValue = prevValue.nuf(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_2(this.dud_1.t2(), this)) {
      this.kpc(Companion_getInstance_93().uov_1);
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.dud_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.nuf(VOID, VOID, VOID, VOID, true);
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var tmp2_elvis_lhs = entityVal == null ? null : entityVal.sjb_1;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var contentEntryVal = tmp_0;
    if (!this.dud_1.t2().vud_1) {
      return Unit_instance;
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.dud_1;
      while (true) {
        var prevValue_1 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var nextValue_1 = prevValue_1.nuf(VOID, VOID, VOID, VOID, false);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (this.fud_1 === 1) {
      Companion_getInstance_163();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_4 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_163();
      var key = 'SelectedContentEntry';
      var value = this.r4x().w4b(Companion_instance_40.s4x(), entityVal);
      this_4.s(key, value);
      this.wpc(this_4, Companion_getInstance_163().buj_1);
      var tmp$ret$9 = this_4.f3();
      this.mpb_1.fo0('CourseBlockEdit', tmp$ret$9);
    } else if (this.fud_1 === 2) {
      this.tph(entityVal);
    } else {
      var tmp_1 = this.bpc();
      launch(tmp_1, VOID, VOID, ContentEntryEditViewModel$onClickSave$slambda_0(this, contentEntryVal, entityVal, null));
    }
  };
  function ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    entity = entity === VOID ? null : entity;
    licenceOptions = licenceOptions === VOID ? emptyList() : licenceOptions;
    storageOptions = storageOptions === VOID ? emptyList() : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState() : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? false : updateContentVisible;
    importError = importError === VOID ? null : importError;
    titleError = titleError === VOID ? null : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? null : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? null : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? false : compressionEnabled;
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.rud_1 = entity;
    this.sud_1 = licenceOptions;
    this.tud_1 = storageOptions;
    this.uud_1 = courseBlockEditUiState;
    this.vud_1 = fieldsEnabled;
    this.wud_1 = updateContentVisible;
    this.xud_1 = importError;
    this.yud_1 = titleError;
    this.zud_1 = selectedContainerStorageDir;
    this.aue_1 = metadataResult;
    this.bue_1 = compressionEnabled;
    this.cue_1 = subtitles;
  }
  protoOf(ContentEntryEditUiState).cuj = function () {
    var tmp0_safe_receiver = this.rud_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ujb_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kb4_1;
    return tmp === 101;
  };
  protoOf(ContentEntryEditUiState).duj = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    return new ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).nuf = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles, $super) {
    entity = entity === VOID ? this.rud_1 : entity;
    licenceOptions = licenceOptions === VOID ? this.sud_1 : licenceOptions;
    storageOptions = storageOptions === VOID ? this.tud_1 : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.uud_1 : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? this.vud_1 : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? this.wud_1 : updateContentVisible;
    importError = importError === VOID ? this.xud_1 : importError;
    titleError = titleError === VOID ? this.yud_1 : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? this.zud_1 : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? this.aue_1 : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? this.bue_1 : compressionEnabled;
    subtitles = subtitles === VOID ? this.cue_1 : subtitles;
    return $super === VOID ? this.duj(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) : $super.duj.call(this, entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).toString = function () {
    return 'ContentEntryEditUiState(entity=' + this.rud_1 + ', licenceOptions=' + this.sud_1 + ', storageOptions=' + this.tud_1 + ', courseBlockEditUiState=' + this.uud_1 + ', fieldsEnabled=' + this.vud_1 + ', updateContentVisible=' + this.wud_1 + ', importError=' + this.xud_1 + ', titleError=' + this.yud_1 + ', selectedContainerStorageDir=' + this.zud_1 + ', metadataResult=' + this.aue_1 + ', compressionEnabled=' + this.bue_1 + ', subtitles=' + this.cue_1 + ')';
  };
  protoOf(ContentEntryEditUiState).hashCode = function () {
    var result = this.rud_1 == null ? 0 : this.rud_1.hashCode();
    result = imul(result, 31) + hashCode(this.sud_1) | 0;
    result = imul(result, 31) + hashCode(this.tud_1) | 0;
    result = imul(result, 31) + this.uud_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vud_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wud_1) | 0;
    result = imul(result, 31) + (this.xud_1 == null ? 0 : getStringHashCode(this.xud_1)) | 0;
    result = imul(result, 31) + (this.yud_1 == null ? 0 : getStringHashCode(this.yud_1)) | 0;
    result = imul(result, 31) + (this.zud_1 == null ? 0 : hashCode(this.zud_1)) | 0;
    result = imul(result, 31) + (this.aue_1 == null ? 0 : this.aue_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bue_1) | 0;
    result = imul(result, 31) + hashCode(this.cue_1) | 0;
    return result;
  };
  protoOf(ContentEntryEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryEditUiState ? other : THROW_CCE();
    if (!equals(this.rud_1, tmp0_other_with_cast.rud_1))
      return false;
    if (!equals(this.sud_1, tmp0_other_with_cast.sud_1))
      return false;
    if (!equals(this.tud_1, tmp0_other_with_cast.tud_1))
      return false;
    if (!this.uud_1.equals(tmp0_other_with_cast.uud_1))
      return false;
    if (!(this.vud_1 === tmp0_other_with_cast.vud_1))
      return false;
    if (!(this.wud_1 === tmp0_other_with_cast.wud_1))
      return false;
    if (!(this.xud_1 == tmp0_other_with_cast.xud_1))
      return false;
    if (!(this.yud_1 == tmp0_other_with_cast.yud_1))
      return false;
    if (!equals(this.zud_1, tmp0_other_with_cast.zud_1))
      return false;
    if (!equals(this.aue_1, tmp0_other_with_cast.aue_1))
      return false;
    if (!(this.bue_1 === tmp0_other_with_cast.bue_1))
      return false;
    if (!equals(this.cue_1, tmp0_other_with_cast.cue_1))
      return false;
    return true;
  };
  function ContentEntryGetMetadataViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.auk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.getmetadata.ContentEntryGetMetadataViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.duk(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_137() {
    this.euk_1 = 'uri';
    this.fuk_1 = 'filename';
    this.guk_1 = 'ContentEntryGetMetadata';
  }
  var Companion_instance_185;
  function Companion_getInstance_155() {
    return Companion_instance_185;
  }
  function ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation) {
    this.puk_1 = this$0;
    this.quk_1 = $uriArg;
    this.ruk_1 = $fileName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryGetMetadataViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.tuk_1 = this.puk_1.zuj_1;
            this.uuk_1 = Companion_getInstance_3().q2t(this.quk_1);
            this.vuk_1 = this.puk_1.apc().kn5();
            this.hd_1 = 1;
            suspendResult = this.tuk_1.znw(this.uuk_1, this.ruk_1, this.vuk_1, ContentEntryGetMetadataViewModel$slambda$lambda(this.puk_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var metadataResult = suspendResult;
            var this_0 = LinkedHashMap_init_$Create$();
            this_0.s('metadata', this.puk_1.r4x().w4b(Companion_instance_80.s4x(), metadataResult));
            this.puk_1.wpc(this_0, Companion_getInstance_163().buj_1);
            Companion_getInstance_110();
            this.puk_1.vpc(this_0, 'result_viewname');
            Companion_getInstance_110();
            this.puk_1.vpc(this_0, 'result_key');
            Companion_getInstance_120();
            this.puk_1.vpc(this_0, 'parentUid');
            this.puk_1.mpb_1.doy('ContentEntryEdit', this_0.f3(), new UstadGoOptions('ContentEntryGetMetadata', true));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              var tmp_1;
              if (e instanceof InvalidContentException) {
                tmp_1 = this.puk_1.ipc().rnd(strings_getInstance().ylt_1) + ' : ' + e.message;
              } else {
                if (e instanceof UnsupportedContentException) {
                  var tmp_2 = this.puk_1.ipc();
                  var tmp_3 = strings_getInstance().alu_1;
                  var tmp3_elvis_lhs = e.message;
                  tmp_1 = tmp_2.snd(tmp_3, [tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs]);
                } else {
                  tmp_1 = this.puk_1.ipc().rnd(strings_getInstance().hlj_1) + ' : other: ' + e.message;
                }
              }
              var errorMessage = tmp_1;
              l$ret$1: do {
                var this_1 = this.puk_1.auk_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.duk(prevValue.cuk_1.gnx(VOID, errorMessage));
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this.puk_1, this.quk_1, this.ruk_1, completion);
    i.suk_1 = $this$launch;
    return i;
  };
  function ContentEntryGetMetadataViewModel$slambda_0(this$0, $uriArg, $fileName, resultContinuation) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryGetMetadataViewModel(di, savedStateHandle, contentEntryGetMetaDataFromUriUseCase) {
    var tmp;
    if (contentEntryGetMetaDataFromUriUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.i5e(tmp$ret$0, null);
    } else {
      tmp = contentEntryGetMetaDataFromUriUseCase;
    }
    contentEntryGetMetaDataFromUriUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryGetMetadata');
    this.zuj_1 = contentEntryGetMetaDataFromUriUseCase;
    this.auk_1 = MutableStateFlow(new ContentEntryGetMetadataUiState());
    this.buk_1 = asStateFlow(this.auk_1);
    var tmp0_elvis_lhs = savedStateHandle.ba('uri');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No uri');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    var uriArg = tmp_2;
    var fileName = savedStateHandle.ba('filename');
    var tmp_3 = this.bpc();
    launch(tmp_3, VOID, VOID, ContentEntryGetMetadataViewModel$slambda_0(this, uriArg, fileName, null));
  }
  function ContentEntryGetMetadataUiState(status) {
    status = status === VOID ? new ContentEntryGetMetadataStatus() : status;
    this.cuk_1 = status;
  }
  protoOf(ContentEntryGetMetadataUiState).duk = function (status) {
    return new ContentEntryGetMetadataUiState(status);
  };
  protoOf(ContentEntryGetMetadataUiState).toString = function () {
    return 'ContentEntryGetMetadataUiState(status=' + this.cuk_1 + ')';
  };
  protoOf(ContentEntryGetMetadataUiState).hashCode = function () {
    return this.cuk_1.hashCode();
  };
  protoOf(ContentEntryGetMetadataUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataUiState ? other : THROW_CCE();
    if (!this.cuk_1.equals(tmp0_other_with_cast.cuk_1))
      return false;
    return true;
  };
  function _get_getSubtitleTrackUseCase__ux9onr($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tul_1;
    getSubtitleTrackUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_138() {
    this.uul_1 = 'GetSubtitle';
  }
  var Companion_instance_186;
  function Companion_getInstance_156() {
    return Companion_instance_186;
  }
  function GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.dum_1 = this$0;
    this.eum_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetSubtitleViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(GetSubtitleViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetSubtitleViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_getSubtitleTrackUseCase__ux9onr(this.dum_1);
            var tmp_1 = Companion_getInstance_3();
            var tmp_2 = tmp_1.q2t(require_0(this.eum_1, 'uri'));
            suspendResult = tmp_0.mnx(tmp_2, require_0(this.eum_1, 'filename'), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var subtitleTrack = suspendResult;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_120();
            this_0.s('entityState', this.dum_1.r4x().w4b(Companion_instance_79.s4x(), subtitleTrack));
            Companion_getInstance_120();
            this.dum_1.vpc(this_0, 'result_viewname');
            Companion_getInstance_120();
            this.dum_1.vpc(this_0, 'result_key');
            this.dum_1.mpb_1.doy('SubtitleEdit', this_0.f3(), new UstadGoOptions('GetSubtitle', true));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              l$ret$1: do {
                var this_1 = this.dum_1.rul_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.hum(this.dum_1.ipc().rnd(strings_getInstance().hlj_1) + ': ' + e.message);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(GetSubtitleViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new GetSubtitleViewModel$slambda(this.dum_1, this.eum_1, completion);
    i.fum_1 = $this$launch;
    return i;
  };
  function GetSubtitleViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function GetSubtitleViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'GetSubtitle');
    this.rul_1 = MutableStateFlow(new GetSubtitleUiState());
    this.sul_1 = asStateFlow(this.rul_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.m5d(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.tul_1 = Instance(this_0, tmp$ret$3, null).f5j(this, getSubtitleTrackUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.getsubtitle.GetSubtitleViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().pmc_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.bpc();
    launch(tmp_3, VOID, VOID, GetSubtitleViewModel$slambda_0(this, savedStateHandle, null));
  }
  function GetSubtitleUiState(error) {
    error = error === VOID ? null : error;
    this.gum_1 = error;
  }
  protoOf(GetSubtitleUiState).hum = function (error) {
    return new GetSubtitleUiState(error);
  };
  protoOf(GetSubtitleUiState).toString = function () {
    return 'GetSubtitleUiState(error=' + this.gum_1 + ')';
  };
  protoOf(GetSubtitleUiState).hashCode = function () {
    return this.gum_1 == null ? 0 : getStringHashCode(this.gum_1);
  };
  protoOf(GetSubtitleUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof GetSubtitleUiState))
      return false;
    var tmp0_other_with_cast = other instanceof GetSubtitleUiState ? other : THROW_CCE();
    if (!(this.gum_1 == tmp0_other_with_cast.gum_1))
      return false;
    return true;
  };
  function getSubtitleTrackUseCase$factory() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function getSubtitleTrackUseCase$factory_0() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function _get_httpClient__2ty1zc_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fun_1;
    httpClient$factory_6();
    return this_0.t2();
  }
  function Companion_139() {
    this.iun_1 = 'ContentEntryImportLink';
    this.jun_1 = 'importUrl';
  }
  var Companion_instance_187;
  function Companion_getInstance_157() {
    return Companion_instance_187;
  }
  function ContentEntryImportLinkViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.kun();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation) {
    this.tun_1 = this$0;
    this.uun_1 = $url;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).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 = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tun_1.kpb_1.qp7('importUrl', this.uun_1);
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this.tun_1, this.uun_1, completion);
    i.vun_1 = $this$launch;
    return i;
  };
  function ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this$0, $url, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation) {
    this.euo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.id_1 = 7;
            var tmp_0 = this;
            tmp_0.iuo_1 = _get_httpClient__2ty1zc_2(this.euo_1);
            var tmp_1 = this;
            tmp_1.juo_1 = this.iuo_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.euo_1.apc().kn5().hmr_1 + 'api/import/validateLink');
            parameter(this_0, 'url', this.euo_1.dun_1.t2().puo_1);
            set_expectSuccess(this_0, false);
            tmp_2.kuo_1 = this_0;
            this.kuo_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_3 = this;
            tmp_3.luo_1 = this.juo_1;
            var tmp_4 = this;
            tmp_4.muo_1 = this.kuo_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.muo_1, this.luo_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.nuo_1 = suspendResult;
            if (!this.nuo_1.a3f().equals(Companion_getInstance_0().g31_1)) {
              l$ret$1: do {
                var this_1 = this.euo_1.dun_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.suo(VOID, this.euo_1.ipc().rnd(strings_getInstance().xlt_1), true);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.huo_1 = Unit_instance;
              this.id_1 = 9;
              this.hd_1 = 6;
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            var tmp_5 = this;
            tmp_5.ouo_1 = this.euo_1.r4x();
            this.hd_1 = 5;
            suspendResult = bodyAsText(this.nuo_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var string = suspendResult;
            var this_2 = this.ouo_1.y4b();
            var this_3 = serializer(this_2, createKType(getKClass(MetadataResult), arrayOf([]), false));
            var metadataResult = this.ouo_1.x4b(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            var tmp_6 = this;
            var tmp_7;
            if (this.euo_1.hun_1 === 'ContentEntryEdit') {
              var this_4 = LinkedHashMap_init_$Create$();
              this_4.s('metadata', this.euo_1.r4x().w4b(Companion_instance_80.s4x(), metadataResult));
              this.euo_1.vpc(this_4, 'courseBlock');
              this.euo_1.vpc(this_4, 'goToOnContentEntryDone');
              Companion_getInstance_110();
              this.euo_1.vpc(this_4, 'result_viewname');
              Companion_getInstance_110();
              this.euo_1.vpc(this_4, 'result_key');
              Companion_getInstance_120();
              this.euo_1.vpc(this_4, 'parentUid');
              Companion_getInstance_120();
              this_4.s('popUpToOnFinish', 'ContentEntryImportLink');
              this.euo_1.mpb_1.fo0('ContentEntryEdit', this_4.f3());
              tmp_7 = Unit_instance;
            } else {
              this.euo_1.tph(metadataResult);
              tmp_7 = Unit_instance;
            }

            tmp_6.guo_1 = tmp_7;
            this.id_1 = 9;
            this.hd_1 = 10;
            continue $sm;
          case 6:
            this.id_1 = 9;
            l$ret$9: do {
              var this_5 = this.euo_1.dun_1;
              while (true) {
                var prevValue_0 = this_5.t2();
                var nextValue_0 = prevValue_0.suo(VOID, VOID, true);
                if (this_5.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 7:
            this.id_1 = 8;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Exception) {
              var e = this.kd_1;
              var tmp_9 = this;
              this.euo_1.gpc().bow(new Snack(this.euo_1.ipc().rnd(strings_getInstance().hlj_1) + (': ' + e)));
              tmp_9.guo_1 = Unit_instance;
              this.id_1 = 9;
              this.hd_1 = 10;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            l$ret$7: do {
              var this_6 = this.euo_1.dun_1;
              while (true) {
                var prevValue_1 = this_6.t2();
                var nextValue_1 = prevValue_1.suo(VOID, VOID, true);
                if (this_6.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 9:
            throw this.kd_1;
          case 10:
            this.id_1 = 9;
            l$ret$11: do {
              var this_7 = this.euo_1.dun_1;
              while (true) {
                var prevValue_2 = this_7.t2();
                var nextValue_2 = prevValue_2.suo(VOID, VOID, true);
                if (this_7.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 9) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this.euo_1, completion);
    i.fuo_1 = $this$launch;
    return i;
  };
  function ContentEntryImportLinkViewModel$onClickNext$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryImportLink');
    this.dun_1 = MutableStateFlow(new ContentEntryImportLinkUiState());
    this.eun_1 = asStateFlow(this.dun_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.fun_1 = Instance(this, tmp$ret$0, null).f5j(this, httpClient$factory_5());
    this.gun_1 = null;
    var tmp_1 = this;
    Companion_getInstance_120();
    tmp_1.hun_1 = savedStateHandle.ba('next');
    var tmp_2 = this.ipc().rnd(strings_getInstance().nlt_1);
    var tmp_3 = this.ipc().rnd(strings_getInstance().klk_1);
    this.opb_1.x1k(new AppUiState(VOID, VOID, tmp_2, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ContentEntryImportLinkViewModel$onClickNext$ref(this))));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dun_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba('importUrl');
        var nextValue = prevValue.suo(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(ContentEntryImportLinkViewModel).tuo = function (url) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dun_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onChangeLink.<anonymous>' call
        var nextValue = prevValue.suo(url, !(url === prevValue.puo_1) ? null : prevValue.quo_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.gun_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.bpc();
    tmp.gun_1 = launch(tmp_0, VOID, VOID, ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this, url, null));
  };
  protoOf(ContentEntryImportLinkViewModel).kun = function () {
    if (!this.dun_1.t2().ruo_1) {
      return Unit_instance;
    }
    if (isBlank(this.dun_1.t2().puo_1)) {
      Napier_getInstance().n5k('link is blank');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.dun_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.suo(VOID, this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.dun_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
        var nextValue_0 = prevValue_0.suo(VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.gun_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    this.kpb_1.qp7('importUrl', this.dun_1.t2().puo_1);
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, ContentEntryImportLinkViewModel$onClickNext$slambda_0(this, null));
  };
  function ContentEntryImportLinkUiState(url, linkError, fieldsEnabled) {
    url = url === VOID ? '' : url;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.puo_1 = url;
    this.quo_1 = linkError;
    this.ruo_1 = fieldsEnabled;
  }
  protoOf(ContentEntryImportLinkUiState).uuo = function (url, linkError, fieldsEnabled) {
    return new ContentEntryImportLinkUiState(url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).suo = function (url, linkError, fieldsEnabled, $super) {
    url = url === VOID ? this.puo_1 : url;
    linkError = linkError === VOID ? this.quo_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.ruo_1 : fieldsEnabled;
    return $super === VOID ? this.uuo(url, linkError, fieldsEnabled) : $super.uuo.call(this, url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).toString = function () {
    return 'ContentEntryImportLinkUiState(url=' + this.puo_1 + ', linkError=' + this.quo_1 + ', fieldsEnabled=' + this.ruo_1 + ')';
  };
  protoOf(ContentEntryImportLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.puo_1);
    result = imul(result, 31) + (this.quo_1 == null ? 0 : getStringHashCode(this.quo_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ruo_1) | 0;
    return result;
  };
  protoOf(ContentEntryImportLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryImportLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryImportLinkUiState ? other : THROW_CCE();
    if (!(this.puo_1 === tmp0_other_with_cast.puo_1))
      return false;
    if (!(this.quo_1 == tmp0_other_with_cast.quo_1))
      return false;
    if (!(this.ruo_1 === tmp0_other_with_cast.ruo_1))
      return false;
    return true;
  };
  function httpClient$factory_5() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(receiver);
    }, null);
  }
  function httpClient$factory_6() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(receiver);
    }, null);
  }
  function _ContentEntryListItemUiState___init__impl__r5o9qy(contentEntry) {
    return contentEntry;
  }
  function _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this) {
    return $this;
  }
  function _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083($this) {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this).zan_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  }
  function _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7($this) {
    return _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this).mao_1;
  }
  function ContentEntryListItemUiState__toString_impl_2mjydu($this) {
    return 'ContentEntryListItemUiState(contentEntry=' + $this + ')';
  }
  function ContentEntryListItemUiState__hashCode_impl_odpv6p($this) {
    return $this.hashCode();
  }
  function ContentEntryListItemUiState__equals_impl_d3bksl($this, other) {
    if (!(other instanceof ContentEntryListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListItemUiState ? other.vuo_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function ContentEntryListItemUiState(contentEntry) {
    this.vuo_1 = contentEntry;
  }
  protoOf(ContentEntryListItemUiState).toString = function () {
    return ContentEntryListItemUiState__toString_impl_2mjydu(this.vuo_1);
  };
  protoOf(ContentEntryListItemUiState).hashCode = function () {
    return ContentEntryListItemUiState__hashCode_impl_odpv6p(this.vuo_1);
  };
  protoOf(ContentEntryListItemUiState).equals = function (other) {
    return ContentEntryListItemUiState__equals_impl_d3bksl(this.vuo_1, other);
  };
  function get_listItemUiState_0(_this__u8e3s4) {
    return _ContentEntryListItemUiState___init__impl__r5o9qy(_this__u8e3s4);
  }
  function ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.eup_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).cp4 = function (hasNewContentPermission, $completion) {
    var tmp = this.dp4(hasNewContentPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.eup_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (!(prevValue.vup_1 === this.fup_1)) {
                tmp_0 = prevValue.xup(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.fup_1);
              } else {
                tmp_0 = prevValue;
              }
              var nextValue = tmp_0;
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.eup_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mov(prevValue_0.xou_1.sov(this.fup_1 ? !this.eup_1.dur_1 : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).dp4 = function (hasNewContentPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this.eup_1, completion);
    i.fup_1 = hasNewContentPermission;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasNewContentPermission, $completion) {
      return i.cp4(hasNewContentPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation) {
    this.our_1 = this$0;
    this.pur_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!this.our_1.zuq_1) {
              this.hd_1 = 2;
              var tmp_0 = ContentEntryListViewModel$slambda$slambda$slambda_0(this.our_1, null);
              suspendResult = this.pur_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            return Unit_instance;
          case 2:
            throwKotlinNothingValueException();
            break;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).q7e = function (completion) {
    return new ContentEntryListViewModel$slambda$slambda(this.our_1, this.pur_1, completion);
  };
  function ContentEntryListViewModel$slambda$slambda_0(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.yur_1 = $savedStateHandle;
    this.zur_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_1).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.aus_1.poy_1;
            var tmp0_elvis_lhs = tmp_1 instanceof ContentEntry ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.bus_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_safe_receiver = this.yur_1.ba('entriesToMove');
            var tmp_4;
            if (tmp1_safe_receiver == null) {
              tmp_4 = null;
            } else {
              tmp_4 = this.zur_1.r4x().x4b(ListSerializer(Companion_instance_190.s4x()), tmp1_safe_receiver);
            }

            var tmp2_elvis_lhs = tmp_4;
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_3.cus_1 = tmp_5;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_moveContentEntriesUseCase__fb3hfi(this.zur_1).so3(this.bus_1, toSet(this.cus_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zur_1.gpc().bow(new Snack(this.zur_1.ipc().snd(strings_getInstance().rm9_1, [this.cus_1.u().toString()])));
            this.id_1 = 4;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.id_1 = 4;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().r5k('Could not move entries', e);
              var tmp_7 = this.zur_1.gpc();
              var tmp3_elvis_lhs = e.message;
              tmp_7.bow(new Snack(tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              this.hd_1 = 3;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            this.id_1 = 4;
            setSelectedItems(this.zur_1, emptySet());
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).joz = function (result, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_1(this.yur_1, this.zur_1, completion);
    i.aus_1 = result;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$onClickMoveAction$ref($boundThis) {
    var l = function () {
      onClickMoveAction($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickMoveAction';
    return l;
  }
  function ContentEntryListViewModel$onClickDeleteAction$ref($boundThis) {
    var l = function () {
      onClickDeleteAction($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickDeleteAction';
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_3).nus = function (uiState, hasPermission, $completion) {
    var tmp = this.ous(uiState, hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).um = function (p1, p2, $completion) {
    var tmp = p1 instanceof ContentEntryListUiState ? p1 : THROW_CCE();
    return this.nus(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Pair(this.lus_1, this.mus_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).ous = function (uiState, hasPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(completion);
    i.lus_1 = uiState;
    i.mus_1 = hasPermission;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_4(resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(resultContinuation);
    var l = function (uiState, hasPermission, $completion) {
      return i.nus(uiState, hasPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.xus_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_5).zus = function (it, $completion) {
    var tmp = this.aut(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.zus(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0;
          if (!this.yus_1.w6_1.sup_1.c1()) {
            tmp_0 = this.yus_1.x6_1;
          } else {
            tmp_0 = false;
          }
          var showMoveIcon = tmp_0;
          if (!(showMoveIcon === !this.xus_1.opb_1.t2().iov_1.c1())) {
            l$ret$1: do {
              var this_0 = this.xus_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (showMoveIcon) {
                  var tmp_2 = AppStateIcon_MOVE_getInstance();
                  var tmp_3 = this.xus_1.ipc().rnd(strings_getInstance().sln_1);
                  var tmp_4 = new AppActionButton(tmp_2, tmp_3, ContentEntryListViewModel$onClickMoveAction$ref(this.xus_1), 'action_move');
                  var tmp_5 = AppStateIcon_DELETE_getInstance();
                  var tmp_6 = this.xus_1.ipc().rnd(strings_getInstance().zlj_1);
                  tmp_1 = listOf([tmp_4, new AppActionButton(tmp_5, tmp_6, ContentEntryListViewModel$onClickDeleteAction$ref(this.xus_1), 'action_delete')]);
                } else {
                  tmp_1 = emptyList();
                }
                var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).aut = function (it, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this.xus_1, completion);
    i.yus_1 = it;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.zus(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_moveContentEntriesUseCase__fb3hfi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.eur_1;
    moveContentEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deleteEntriesUseCase__hkwqc9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fur_1;
    deleteEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function setSelectedItems($this, selectedEntries) {
    $this.kpb_1.qp7('selectedEntries', $this.r4x().w4b(ListSerializer(Companion_instance_190.s4x()), toList(selectedEntries)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var nextValue = prevValue.xup(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, selectedEntries);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var numItemsSelected = $this.fpk_1.t2().sup_1.u();
    var hasSelectedItems = numItemsSelected > 0;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = $this.opb_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var tmp0_userAccountIconVisible = !hasSelectedItems;
        var tmp;
        if (hasSelectedItems) {
          tmp = $this.ipc().but(plurals_getInstance().gmq_1, numItemsSelected);
        } else {
          tmp = $this.cur_1;
        }
        var tmp1_title = tmp;
        var tmp_0;
        if (hasSelectedItems) {
          var tmp_1 = AppStateIcon_CLOSE_getInstance();
          var tmp_2 = $this.ipc().rnd(strings_getInstance().bmn_1);
          tmp_0 = new AppActionButton(tmp_1, tmp_2, ContentEntryListViewModel$setSelectedItems$lambda($this), 'clear_selection');
        } else {
          tmp_0 = null;
        }
        var tmp2_leadingActionButton = tmp_0;
        var tmp3_appBarColors = hasSelectedItems ? AppBarColors_SELECTION_MODE_getInstance() : AppBarColors_STANDARD_getInstance();
        var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp1_title, VOID, VOID, hasSelectedItems, tmp0_userAccountIconVisible, VOID, VOID, VOID, VOID, VOID, tmp2_leadingActionButton, tmp3_appBarColors);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  function selectDestinationToMoveEntries($this, entries) {
    $this.kpb_1.qp7('entriesToMove', $this.r4x().w4b(ListSerializer(Companion_instance_190.s4x()), toList(entries)));
    var tmp = Companion_instance_27.s4x();
    $this.qpc('PickContentEntry', 'moveToDestinationResult', null, tmp, mapOf([to('listMode', ListViewMode_PICKER_getInstance().np8_1), to('selectFolder', 'true')]));
  }
  function onClickMoveAction($this) {
    selectDestinationToMoveEntries($this, $this.fpk_1.t2().sup_1);
  }
  function launchDeleteEntries($this, entries) {
    var tmp = $this.bpc();
    launch(tmp, VOID, VOID, ContentEntryListViewModel$launchDeleteEntries$slambda_0($this, entries, null));
  }
  function onClickDeleteAction($this) {
    launchDeleteEntries($this, $this.fpk_1.t2().sup_1);
  }
  function Companion_140() {
    Companion_instance_188 = this;
    this.cut_1 = 'ContentEntries';
    this.dut_1 = 'ContentEntryListHome';
    this.eut_1 = 'PickContentEntry';
    this.fut_1 = listOf(['ContentEntries', 'ContentEntryListHome', 'PickContentEntry']);
    this.gut_1 = 'filter';
    this.hut_1 = 1;
    this.iut_1 = 2;
    this.jut_1 = 3;
    this.kut_1 = 4;
    this.lut_1 = new Long(1, 0);
    this.mut_1 = 'chipId';
    this.nut_1 = 'moveToDestinationResult';
    this.out_1 = 'selectFolder';
    this.put_1 = 'selectedEntries';
    this.qut_1 = 'entriesToMove';
  }
  var Companion_instance_188;
  function Companion_getInstance_158() {
    if (Companion_instance_188 == null)
      new Companion_140();
    return Companion_instance_188;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_23(function_0) {
    this.rut_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_23).t1d = function (value, $completion) {
    return this.rut_1(value, $completion);
  };
  function createContextMenuItemsForEntry$entriesToAction(this$0, rightClickedItem) {
    var selectedEntries = this$0.fpk_1.t2().sup_1;
    var tmp;
    var tmp_0;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!selectedEntries.c1()) {
      tmp_0 = !selectedEntries.a1(rightClickedItem);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      // Inline function 'kotlin.also' call
      var this_0 = toSet(plus_2(selectedEntries, rightClickedItem));
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.createContextMenuItemsForEntry.entriesToAction.<anonymous>' call
      setSelectedItems(this$0, this_0);
      tmp = this_0;
    } else {
      if (selectedEntries.c1()) {
        tmp = setOf_0(rightClickedItem);
      } else {
        tmp = selectedEntries;
      }
    }
    return tmp;
  }
  function ContentEntryListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp;
      switch (this$0.fpk_1.t2().iup_1) {
        case 2:
          tmp = this$0.epc().a7k().ian(this$0.cpc());
          break;
        case 3:
          tmp = this$0.epc().a7k().han(this$0.cpc());
          break;
        case 4:
          tmp = this$0.epc().a7k().gan(this$0.cpc(), this$0.yuq_1, new Long(0, 0), new Long(0, 0), this$0.fpk_1.t2().nup_1.kp1_1, false);
          break;
        case 1:
          tmp = this$0.epc().a7k().gan(this$0.cpc(), this$0.yuq_1, new Long(0, 0), new Long(0, 0), this$0.fpk_1.t2().nup_1.kp1_1, false);
          break;
        default:
          tmp = new EmptyPagingSource();
          break;
      }
      return tmp;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$ref($boundThis) {
    var l = function (p0) {
      return $boundThis.sut(p0);
    };
    l.callableName = 'createContextMenuItemsForEntry';
    return l;
  }
  function ContentEntryListViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.fpk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xup(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$slambda(this$0, resultContinuation) {
    this.buu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!(this.buu_1.jpc() == null) ? !this.buu_1.aur_1 : false) {
              this.duu_1 = this.buu_1.ipc().rnd(strings_getInstance().kme_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              if (this.buu_1.yuq_1.equals(new Long(1, 0))) {
                this.duu_1 = this.buu_1.ipc().rnd(strings_getInstance().xmi_1);
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.buu_1.epc().a7k().fan(this.buu_1.yuq_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp0_elvis_lhs = suspendResult;
            this.duu_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.duu_1;
            this.buu_1.cur_1 = ARGUMENT;
            l$ret$1: do {
              var this_0 = this.buu_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mov(VOID, VOID, this.buu_1.cur_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda(this.buu_1, completion);
    i.cuu_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation) {
    this.muu_1 = this$0;
    this.nuu_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_1).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 = whenSubscribed(this.muu_1.fpk_1, ContentEntryListViewModel$slambda$slambda_0(this.muu_1, this.nuu_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_1(this.muu_1, this.nuu_1, completion);
    i.ouu_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_2(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation) {
    this.xuu_1 = this$0;
    this.yuu_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_3).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;
            var tmp_0 = this.xuu_1.mpc(this.xuu_1.hpc(), 'moveToDestinationResult');
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_2(this.yuu_1, this.xuu_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryListViewModel$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_3(this.xuu_1, this.yuu_1, completion);
    i.zuu_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_4(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation) {
    this.iuv_1 = this$0;
    this.juv_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_5).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;
            var tmp_0 = combine(this.iuv_1.fpk_1, this.juv_1, ContentEntryListViewModel$slambda$slambda_4(null));
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_6(this.iuv_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryListViewModel$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_5(this.iuv_1, this.juv_1, completion);
    i.kuv_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_6(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this$0, $rightClickedItem) {
    return function () {
      selectDestinationToMoveEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this$0, $rightClickedItem) {
    return function () {
      launchDeleteEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$setSelectedItems$lambda(this$0) {
    return function () {
      setSelectedItems(this$0, emptySet());
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation) {
    this.tuv_1 = this$0;
    this.uuv_1 = $entries;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).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 = _get_deleteEntriesUseCase__hkwqc9(this.tuv_1).xnw(this.uuv_1, this.tuv_1.cpc(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            setSelectedItems(this.tuv_1, emptySet());
            this.tuv_1.gpc().bow(new Snack(this.tuv_1.ipc().but(plurals_getInstance().hmq_1, this.uuv_1.u())));
            return Unit_instance;
          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);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this.tuv_1, this.uuv_1, completion);
    i.vuv_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$launchDeleteEntries$slambda_0(this$0, $entries, resultContinuation) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_158();
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryListUiState(), destName);
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.yuq_1 = tmp1_elvis_lhs == null ? new Long(1, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('goToOnContentEntryDone');
    var tmp_1 = tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0);
    tmp_0.zuq_1 = tmp_1 === 1;
    var tmp_2 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.ba('selectFolder');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toBoolean(tmp0_safe_receiver_1);
    tmp_2.aur_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    tmp_3.bur_1 = ContentEntryListViewModel$pagingSourceFactory$lambda(this);
    this.cur_1 = '';
    this.dur_1 = this.aur_1 ? this.kpk().equals(ListViewMode_PICKER_getInstance()) : false;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.eur_1 = Instance(this_0, tmp$ret$0, null).f5j(this, moveContentEntriesUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.fur_1 = Instance(this_1, tmp$ret$2, null).f5j(this, deleteEntriesUseCase$factory());
    var tmp0_safe_receiver_2 = savedStateHandle.ba('selectedEntries');
    var tmp_8;
    if (tmp0_safe_receiver_2 == null) {
      tmp_8 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
      tmp_8 = this.r4x().x4b(ListSerializer(Companion_instance_190.s4x()), tmp0_safe_receiver_2);
    }
    var tmp1_safe_receiver = tmp_8;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toSet(tmp1_safe_receiver);
    var savedStateSelectedEntries = tmp2_elvis_lhs == null ? emptySet() : tmp2_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.fpk_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp0_contentEntryList = this.bur_1;
        var tmp1_showSelectFolderButton = this.dur_1;
        var tmp2_contextMenuItems = ContentEntryListViewModel$createContextMenuItemsForEntry$ref(this);
        var nextValue = prevValue.xup(VOID, tmp0_contentEntryList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, savedStateSelectedEntries, tmp1_showSelectFolderButton, tmp2_contextMenuItems);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.opb_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp_9 = this.ipc().rnd(strings_getInstance().im4_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var nextValue_0 = prevValue_0.mov(new FabUiState(false, tmp_9, tmp_10, ContentEntryListViewModel$lambda(this)), VOID, VOID, VOID, this.kpk().equals(ListViewMode_PICKER_getInstance()));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    if (this.zuq_1 ? this.yuq_1.equals(new Long(1, 0)) : false) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.fpk_1;
        while (true) {
          var prevValue_1 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
          var tmp0_safe_receiver_3 = savedStateHandle.ba('chipId');
          var tmp1_elvis_lhs_1 = tmp0_safe_receiver_3 == null ? null : toInt(tmp0_safe_receiver_3);
          var tmp2_selectedChipId = tmp1_elvis_lhs_1 == null ? 2 : tmp1_elvis_lhs_1;
          var tmp3_filterOptions = listOf([new MessageIdOption2(strings_getInstance().ymd_1, 2), new MessageIdOption2(strings_getInstance().vmk_1, 3), new MessageIdOption2(strings_getInstance().xmi_1, 4)]);
          var nextValue_1 = prevValue_1.xup(VOID, VOID, tmp2_selectedChipId, tmp3_filterOptions, VOID, VOID, VOID, VOID, false, true, true);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    var tmp_11 = this.epc().u7l();
    var tmp_12 = this.apc().in5().zk0_1;
    PermissionFlags_getInstance();
    var hasPermissionFlow = shareIn(tmp_11.mhj(tmp_12, new Long(65536, 0)), this.bpc(), Companion_getInstance_13().v1h());
    var tmp_13 = this.bpc();
    launch(tmp_13, VOID, VOID, ContentEntryListViewModel$slambda_0(this, null));
    var tmp_14 = this.bpc();
    launch(tmp_14, VOID, VOID, ContentEntryListViewModel$slambda_2(this, hasPermissionFlow, null));
    var tmp_15 = this.bpc();
    launch(tmp_15, VOID, VOID, ContentEntryListViewModel$slambda_4(this, savedStateHandle, null));
    var tmp_16 = this.bpc();
    launch(tmp_16, VOID, VOID, ContentEntryListViewModel$slambda_6(this, hasPermissionFlow, null));
  }
  protoOf(ContentEntryListViewModel).sut = function (entry) {
    var uiStateVal = this.fpk_1.t2();
    var tmp;
    if (uiStateVal.vup_1 ? this.kpk().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var rightClickedItem = asSelectedItem(entry);
      if (!uiStateVal.sup_1.a1(rightClickedItem)) {
        setSelectedItems(this, emptySet());
      }
      var tmp_0 = this.ipc().rnd(strings_getInstance().fmn_1);
      var tmp_1 = new UstadContextMenuItem(tmp_0, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this, rightClickedItem));
      var tmp_2 = this.ipc().rnd(strings_getInstance().zlj_1);
      tmp = listOf([tmp_1, new UstadContextMenuItem(tmp_2, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this, rightClickedItem))]);
    } else {
      tmp = emptyList();
    }
    return tmp;
  };
  protoOf(ContentEntryListViewModel).zpk = function (searchText) {
  };
  protoOf(ContentEntryListViewModel).apl = function () {
  };
  protoOf(ContentEntryListViewModel).pto = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.xup(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).wuv = function () {
    this.pto();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickNewFolder.<anonymous>' call
    this_0.s('leaf', 'false');
    Companion_getInstance_120();
    this_0.s('parentUid', this.yuq_1.toString());
    var tmp$ret$2 = this_0.f3();
    this.spl('ContentEntryEdit', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).xuv = function () {
    this.pto();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickImportFromLink.<anonymous>' call
    this_0.s('leaf', 'true');
    Companion_getInstance_120();
    this_0.s('parentUid', this.yuq_1.toString());
    Companion_getInstance_120();
    this_0.s('next', 'ContentEntryEdit');
    this.wpc(this_0, Companion_getInstance_163().buj_1);
    var tmp$ret$2 = this_0.f3();
    this.spl('ContentEntryImportLink', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).yuv = function (fileUri, fileName) {
    this.pto();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onImportFile.<anonymous>' call
    this_0.s('uri', fileUri);
    this_0.s('filename', fileName);
    Companion_getInstance_120();
    this_0.s('parentUid', this.yuq_1.toString());
    this.wpc(this_0, Companion_getInstance_163().buj_1);
    var tmp$ret$2 = this_0.f3();
    this.spl('ContentEntryGetMetadata', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).zuv = function (entry) {
    if (entry == null)
      return Unit_instance;
    var tmp0_safe_receiver = this.kpb_1.ba('goToOnContentEntryDone');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    var goToOnContentEntryEdit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (entry.mao_1 ? this.dur_1 : false)
      return Unit_instance;
    else {
      var tmp;
      if (this.kpk().equals(ListViewMode_PICKER_getInstance()) ? entry.mao_1 : false) {
        tmp = goToOnContentEntryEdit === 1;
      } else {
        tmp = false;
      }
      if (tmp) {
        Companion_getInstance_163();
        var tmp2_nextViewName = 'CourseBlockEdit';
        var tmp3_key = 'courseblock';
        var tmp4_serializer = Companion_getInstance_14().s4x();
        // Inline function 'kotlin.collections.buildMap' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'kotlin.collections.buildMapInternal' call
        // Inline function 'kotlin.apply' call
        var this_0 = LinkedHashMap_init_$Create$();
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
        this.wpc(this_0, Companion_getInstance_163().buj_1);
        Companion_getInstance_163();
        this_0.s('SelectedContentEntry', this.r4x().w4b(Companion_instance_40.s4x(), new ContentEntryAndContentJob(entry)));
        var tmp5_args = this_0.f3();
        this.qpc(tmp2_nextViewName, tmp3_key, null, tmp4_serializer, tmp5_args, VOID, false);
      } else {
        if (entry.mao_1) {
          Companion_getInstance_152();
          Companion_getInstance_110();
          var tmp_0 = to('entityUid', entry.xan_1.toString());
          Companion_getInstance_120();
          this.mpb_1.fo0('ContentEntry', mapOf([tmp_0, to('parentUid', this.yuq_1.toString())]));
        } else {
          var tmp_1;
          if (this.lpb_1 === 'ContentEntryListHome') {
            tmp_1 = 'ContentEntries';
          } else {
            tmp_1 = this.lpb_1;
          }
          var tmp_2 = tmp_1;
          // Inline function 'kotlin.collections.buildMap' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'kotlin.collections.buildMapInternal' call
          // Inline function 'kotlin.apply' call
          var this_1 = LinkedHashMap_init_$Create$();
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
          this_1.s('filter', '1');
          Companion_getInstance_120();
          this_1.s('parentUid', entry.xan_1.toString());
          Companion_getInstance_110();
          this.vpc(this_1, 'result_key');
          Companion_getInstance_110();
          this.vpc(this_1, 'result_viewname');
          this.vpc(this_1, 'selectFolder');
          this.vpc(this_1, 'goToOnContentEntryDone');
          var tmp$ret$5 = this_1.f3();
          this.mpb_1.fo0(tmp_2, tmp$ret$5);
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).auw = function () {
    // Inline function 'kotlin.apply' call
    var this_0 = new ContentEntry();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickSelectThisFolder.<anonymous>' call
    this_0.xan_1 = this.yuq_1;
    this.tph(this_0);
  };
  protoOf(ContentEntryListViewModel).buw = function (entry, selected) {
    var currentSelection = this.fpk_1.t2().sup_1;
    var tmp;
    if (selected) {
      tmp = toSet(plus_2(currentSelection, asSelectedItem(entry)));
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = currentSelection.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onSetSelected.<anonymous>' call
        var tmp0_safe_receiver = entry.aar_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xan_1;
        if (!element.unw_1.equals(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    }
    setSelectedItems(this, tmp);
  };
  protoOf(ContentEntryListViewModel).yrd = function (filterOption) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.fpk_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
    if (!(this_0.t2().iup_1 === filterOption.pow_1)) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
          var nextValue = prevValue.xup(VOID, VOID, filterOption.pow_1);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    this.kpb_1.qp7('chipId', filterOption.pow_1.toString());
    this.hpk_1.i1h(new RefreshCommand());
  };
  function Companion_141() {
    Companion_instance_189 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().kln_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().kln_1;
    tmp.cuw_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_189;
  function Companion_getInstance_159() {
    if (Companion_instance_189 == null)
      new Companion_141();
    return Companion_instance_189;
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3() {
    return new EmptyPagingSource();
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3_0(it) {
    return emptyList();
  }
  function ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    Companion_getInstance_159();
    filterMode = filterMode === VOID ? 1 : filterMode;
    var tmp;
    if (contentEntryList === VOID) {
      tmp = ContentEntryListUiState$_init_$lambda_76lpy3;
    } else {
      tmp = contentEntryList;
    }
    contentEntryList = tmp;
    selectedChipId = selectedChipId === VOID ? 1 : selectedChipId;
    var tmp_0;
    if (filterOptions === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_0 = emptyList();
    } else {
      tmp_0 = filterOptions;
    }
    filterOptions = tmp_0;
    showHiddenEntries = showHiddenEntries === VOID ? false : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? false : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? Companion_getInstance_159().cuw_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? first_0(sortOptions) : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? false : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? false : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? false : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? emptySet() : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? false : showSelectFolderButton;
    var tmp_1;
    if (contextMenuItems === VOID) {
      tmp_1 = ContentEntryListUiState$_init_$lambda_76lpy3_0;
    } else {
      tmp_1 = contextMenuItems;
    }
    contextMenuItems = tmp_1;
    hasWritePermission = hasWritePermission === VOID ? false : hasWritePermission;
    this.gup_1 = filterMode;
    this.hup_1 = contentEntryList;
    this.iup_1 = selectedChipId;
    this.jup_1 = filterOptions;
    this.kup_1 = showHiddenEntries;
    this.lup_1 = onlyFolderFilter;
    this.mup_1 = sortOptions;
    this.nup_1 = activeSortOption;
    this.oup_1 = createNewFolderItemVisible;
    this.pup_1 = importFromLinkItemVisible;
    this.qup_1 = importFromFileItemVisible;
    this.rup_1 = createNewOptionsVisible;
    this.sup_1 = selectedEntries;
    this.tup_1 = showSelectFolderButton;
    this.uup_1 = contextMenuItems;
    this.vup_1 = hasWritePermission;
    var tmp_2 = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.sup_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListUiState.selectedEntryUids.<anonymous>' call
      var tmp$ret$1 = item.unw_1;
      destination.i1(tmp$ret$1);
    }
    tmp_2.wup_1 = toSet(destination);
  }
  protoOf(ContentEntryListUiState).duw = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.jup_1.c1();
  };
  protoOf(ContentEntryListUiState).euw = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    return new ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).xup = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission, $super) {
    filterMode = filterMode === VOID ? this.gup_1 : filterMode;
    contentEntryList = contentEntryList === VOID ? this.hup_1 : contentEntryList;
    selectedChipId = selectedChipId === VOID ? this.iup_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.jup_1 : filterOptions;
    showHiddenEntries = showHiddenEntries === VOID ? this.kup_1 : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? this.lup_1 : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? this.mup_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? this.nup_1 : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? this.oup_1 : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? this.pup_1 : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? this.qup_1 : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.rup_1 : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? this.sup_1 : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? this.tup_1 : showSelectFolderButton;
    contextMenuItems = contextMenuItems === VOID ? this.uup_1 : contextMenuItems;
    hasWritePermission = hasWritePermission === VOID ? this.vup_1 : hasWritePermission;
    return $super === VOID ? this.euw(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) : $super.euw.call(this, filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).toString = function () {
    return 'ContentEntryListUiState(filterMode=' + this.gup_1 + ', contentEntryList=' + this.hup_1 + ', selectedChipId=' + this.iup_1 + ', filterOptions=' + this.jup_1 + ', showHiddenEntries=' + this.kup_1 + ', onlyFolderFilter=' + this.lup_1 + ', sortOptions=' + this.mup_1 + ', activeSortOption=' + this.nup_1 + ', createNewFolderItemVisible=' + this.oup_1 + ', importFromLinkItemVisible=' + this.pup_1 + ', importFromFileItemVisible=' + this.qup_1 + ', createNewOptionsVisible=' + this.rup_1 + ', selectedEntries=' + this.sup_1 + ', showSelectFolderButton=' + this.tup_1 + ', contextMenuItems=' + this.uup_1 + ', hasWritePermission=' + this.vup_1 + ')';
  };
  protoOf(ContentEntryListUiState).hashCode = function () {
    var result = this.gup_1;
    result = imul(result, 31) + hashCode(this.hup_1) | 0;
    result = imul(result, 31) + this.iup_1 | 0;
    result = imul(result, 31) + hashCode(this.jup_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kup_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lup_1) | 0;
    result = imul(result, 31) + hashCode(this.mup_1) | 0;
    result = imul(result, 31) + this.nup_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oup_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pup_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qup_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rup_1) | 0;
    result = imul(result, 31) + hashCode(this.sup_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tup_1) | 0;
    result = imul(result, 31) + hashCode(this.uup_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vup_1) | 0;
    return result;
  };
  protoOf(ContentEntryListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListUiState ? other : THROW_CCE();
    if (!(this.gup_1 === tmp0_other_with_cast.gup_1))
      return false;
    if (!equals(this.hup_1, tmp0_other_with_cast.hup_1))
      return false;
    if (!(this.iup_1 === tmp0_other_with_cast.iup_1))
      return false;
    if (!equals(this.jup_1, tmp0_other_with_cast.jup_1))
      return false;
    if (!(this.kup_1 === tmp0_other_with_cast.kup_1))
      return false;
    if (!(this.lup_1 === tmp0_other_with_cast.lup_1))
      return false;
    if (!equals(this.mup_1, tmp0_other_with_cast.mup_1))
      return false;
    if (!this.nup_1.equals(tmp0_other_with_cast.nup_1))
      return false;
    if (!(this.oup_1 === tmp0_other_with_cast.oup_1))
      return false;
    if (!(this.pup_1 === tmp0_other_with_cast.pup_1))
      return false;
    if (!(this.qup_1 === tmp0_other_with_cast.qup_1))
      return false;
    if (!(this.rup_1 === tmp0_other_with_cast.rup_1))
      return false;
    if (!equals(this.sup_1, tmp0_other_with_cast.sup_1))
      return false;
    if (!(this.tup_1 === tmp0_other_with_cast.tup_1))
      return false;
    if (!equals(this.uup_1, tmp0_other_with_cast.uup_1))
      return false;
    if (!(this.vup_1 === tmp0_other_with_cast.vup_1))
      return false;
    return true;
  };
  function Companion_142() {
  }
  protoOf(Companion_142).s4x = function () {
    return $serializer_getInstance_67();
  };
  var Companion_instance_190;
  function Companion_getInstance_160() {
    return Companion_instance_190;
  }
  function $serializer_55() {
    $serializer_instance_55 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListSelectedItem', this, 3);
    tmp0_serialDesc.y4l('contentEntryUid', false);
    tmp0_serialDesc.y4l('contentEntryParentChildJoinUid', false);
    tmp0_serialDesc.y4l('parentContentEntryUid', false);
    this.fuw_1 = tmp0_serialDesc;
  }
  protoOf($serializer_55).v4a = function () {
    return this.fuw_1;
  };
  protoOf($serializer_55).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_55).x4a = function (decoder) {
    var tmp0_desc = this.fuw_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = new Long(0, 0);
    var tmp7_input = decoder.n4e(tmp0_desc);
    if (tmp7_input.c4f()) {
      tmp4_local0 = tmp7_input.t4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.t4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.t4e(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.t4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.t4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.t4e(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.o4e(tmp0_desc);
    return ContentEntryListSelectedItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_55).guw = function (encoder, value) {
    var tmp0_desc = this.fuw_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    tmp1_output.x4f(tmp0_desc, 0, value.unw_1);
    tmp1_output.x4f(tmp0_desc, 1, value.vnw_1);
    tmp1_output.x4f(tmp0_desc, 2, value.wnw_1);
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_55).w4a = function (encoder, value) {
    return this.guw(encoder, value instanceof ContentEntryListSelectedItem ? value : THROW_CCE());
  };
  var $serializer_instance_55;
  function $serializer_getInstance_67() {
    if ($serializer_instance_55 == null)
      new $serializer_55();
    return $serializer_instance_55;
  }
  function ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_67().fuw_1);
    }
    $this.unw_1 = contentEntryUid;
    $this.vnw_1 = contentEntryParentChildJoinUid;
    $this.wnw_1 = parentContentEntryUid;
    return $this;
  }
  function ContentEntryListSelectedItem_init_$Create$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker) {
    return ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, objectCreate(protoOf(ContentEntryListSelectedItem)));
  }
  function ContentEntryListSelectedItem(contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid) {
    this.unw_1 = contentEntryUid;
    this.vnw_1 = contentEntryParentChildJoinUid;
    this.wnw_1 = parentContentEntryUid;
  }
  protoOf(ContentEntryListSelectedItem).toString = function () {
    return 'ContentEntryListSelectedItem(contentEntryUid=' + this.unw_1.toString() + ', contentEntryParentChildJoinUid=' + this.vnw_1.toString() + ', parentContentEntryUid=' + this.wnw_1.toString() + ')';
  };
  protoOf(ContentEntryListSelectedItem).hashCode = function () {
    var result = this.unw_1.hashCode();
    result = imul(result, 31) + this.vnw_1.hashCode() | 0;
    result = imul(result, 31) + this.wnw_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryListSelectedItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListSelectedItem))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListSelectedItem ? other : THROW_CCE();
    if (!this.unw_1.equals(tmp0_other_with_cast.unw_1))
      return false;
    if (!this.vnw_1.equals(tmp0_other_with_cast.vnw_1))
      return false;
    if (!this.wnw_1.equals(tmp0_other_with_cast.wnw_1))
      return false;
    return true;
  };
  function asSelectedItem(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.aar_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xan_1;
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp2_safe_receiver = _this__u8e3s4.car_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.har_1;
    var tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.car_1;
    var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.ear_1;
    return new ContentEntryListSelectedItem(tmp, tmp_0, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
  }
  function moveContentEntriesUseCase$factory() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function moveContentEntriesUseCase$factory_0() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory_0() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function SubtitleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda).quw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.quw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new SubtitleEditViewModel$slambda$slambda(completion);
    i.puw_1 = db;
    return i;
  };
  function SubtitleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.quw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.zuw_1 = $savedStateHandle;
    this.aux_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda_1).bux = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.bux($completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_elvis_lhs = this.zuw_1.ba('uri');
          var tmp2_uri = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
          var tmp1_elvis_lhs = this.zuw_1.ba('filename');
          var tmp3_title = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
          var tmp4_langCode = _get_supportedLanguagesConfig__bd0744(this.aux_1).aod_1;
          return new SubtitleTrack(tmp2_uri, 'text/vtt', tmp4_langCode, tmp3_title);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new SubtitleEditViewModel$slambda$slambda_1(this.zuw_1, this.aux_1, completion);
  };
  function SubtitleEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.bux($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SubtitleEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.auy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fuy(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_supportedLanguagesConfig__bd0744($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zux_1;
    supportedLanguagesConfig$factory_0();
    return this_0.t2();
  }
  function Companion_143() {
    this.guy_1 = 'uri';
    this.huy_1 = 'filename';
    this.iuy_1 = 'SubtitleEdit';
  }
  var Companion_instance_191;
  function Companion_getInstance_161() {
    return Companion_instance_191;
  }
  function SubtitleEditViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.juy();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.suy_1 = this$0;
    this.tuy_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda).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;
            var tmp_0 = Companion_instance_79.s4x();
            var tmp_1 = SubtitleEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SubtitleEditViewModel$slambda$slambda_2(this.tuy_1, this.suy_1, null);
            suspendResult = this.suy_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, SubtitleEditViewModel$slambda$lambda(this.suy_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.suy_1.auy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.fuy(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.suy_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.fov_1.nou(true));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(SubtitleEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$slambda(this.suy_1, this.tuy_1, completion);
    i.uuy_1 = $this$launch;
    return i;
  };
  function SubtitleEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.duz_1 = $commitDelay;
    this.euz_1 = $entity;
    this.fuz_1 = $this;
    this.guz_1 = $key;
    this.huz_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.duz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.euz_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.fuz_1.opc(this.fuz_1.kpb_1, this.guz_1, this.huz_1, this.euz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda(this.duz_1, this.euz_1, this.fuz_1, this.guz_1, this.huz_1, completion);
    i.iuz_1 = $this$launch;
    return i;
  };
  function SubtitleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SubtitleEdit');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.zux_1 = Instance(this, tmp$ret$0, null).f5j(this, supportedLanguagesConfig$factory());
    this.auy_1 = MutableStateFlow(new SubtitleEditUiState());
    this.buy_1 = asSharedFlow(this.auy_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>' call
        var tmp_1 = this.ipc().rnd(strings_getInstance().xmp_1);
        var tmp_2 = this.ipc().rnd(strings_getInstance().vlr_1);
        var nextValue = prevValue.mov(VOID, VOID, tmp_1, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(VOID, tmp_2, VOID, SubtitleEditViewModel$onClickDone$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.bpc();
    launch(tmp_3, VOID, VOID, SubtitleEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(SubtitleEditViewModel).juz = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.auy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.fuy(entity);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_79.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver = this.pph_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.bpc();
    tmp.pph_1 = launch(tmp_0, VOID, VOID, SubtitleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SubtitleEditViewModel).juy = function () {
    this.tph(this.auy_1.t2().cuy_1);
  };
  function SubtitleEditUiState(entity, titleError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    titleError = titleError === VOID ? null : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.cuy_1 = entity;
    this.duy_1 = titleError;
    this.euy_1 = fieldsEnabled;
  }
  protoOf(SubtitleEditUiState).kuz = function (entity, titleError, fieldsEnabled) {
    return new SubtitleEditUiState(entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).fuy = function (entity, titleError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.cuy_1 : entity;
    titleError = titleError === VOID ? this.duy_1 : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.euy_1 : fieldsEnabled;
    return $super === VOID ? this.kuz(entity, titleError, fieldsEnabled) : $super.kuz.call(this, entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).toString = function () {
    return 'SubtitleEditUiState(entity=' + this.cuy_1 + ', titleError=' + this.duy_1 + ', fieldsEnabled=' + this.euy_1 + ')';
  };
  protoOf(SubtitleEditUiState).hashCode = function () {
    var result = this.cuy_1 == null ? 0 : this.cuy_1.hashCode();
    result = imul(result, 31) + (this.duy_1 == null ? 0 : getStringHashCode(this.duy_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.euy_1) | 0;
    return result;
  };
  protoOf(SubtitleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleEditUiState ? other : THROW_CCE();
    if (!equals(this.cuy_1, tmp0_other_with_cast.cuy_1))
      return false;
    if (!(this.duy_1 == tmp0_other_with_cast.duy_1))
      return false;
    if (!(this.euy_1 === tmp0_other_with_cast.euy_1))
      return false;
    return true;
  };
  function supportedLanguagesConfig$factory() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function supportedLanguagesConfig$factory_0() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function _get_$cachedSerializer__te6jhj_2($this) {
    return $this.luz_1.t2();
  }
  function CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9() {
    return createSimpleEnumSerializer('com.ustadmobile.core.viewmodel.courseblock.CourseBlockViewModelConstants.CompletionCriteria', values_4());
  }
  var CompletionCriteria_AUTOMATIC_instance;
  var CompletionCriteria_MIN_SCORE_instance;
  var CompletionCriteria_STUDENT_SELF_MARKS_instance;
  var CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  var CompletionCriteria_ASSIGNMENT_GRADED_instance;
  function Companion_144() {
    Companion_instance_192 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.luz_1 = lazy(tmp_0, CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9);
  }
  protoOf(Companion_144).fjf = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var indexedObject = values_4();
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var element = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.Companion.valueOf.<anonymous>' call
        if (element.puz_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? first_1(values_4()) : tmp0_elvis_lhs;
  };
  protoOf(Companion_144).s4x = function () {
    return _get_$cachedSerializer__te6jhj_2(this);
  };
  protoOf(Companion_144).a4n = function (typeParamsSerializers) {
    return this.s4x();
  };
  var Companion_instance_192;
  function Companion_getInstance_162() {
    CompletionCriteria_initEntries();
    if (Companion_instance_192 == null)
      new Companion_144();
    return Companion_instance_192;
  }
  function values_4() {
    return [CompletionCriteria_AUTOMATIC_getInstance(), CompletionCriteria_MIN_SCORE_getInstance(), CompletionCriteria_STUDENT_SELF_MARKS_getInstance(), CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()];
  }
  var CompletionCriteria_entriesInitialized;
  function CompletionCriteria_initEntries() {
    if (CompletionCriteria_entriesInitialized)
      return Unit_instance;
    CompletionCriteria_entriesInitialized = true;
    var tmp = strings_getInstance().jm6_1;
    CompletionCriteria_AUTOMATIC_instance = new CompletionCriteria('AUTOMATIC', 0, tmp, 0);
    var tmp_0 = strings_getInstance().im6_1;
    CompletionCriteria_MIN_SCORE_instance = new CompletionCriteria('MIN_SCORE', 1, tmp_0, 1);
    var tmp_1 = strings_getInstance().km6_1;
    CompletionCriteria_STUDENT_SELF_MARKS_instance = new CompletionCriteria('STUDENT_SELF_MARKS', 2, tmp_1, 2);
    var tmp_2 = strings_getInstance().pm6_1;
    CompletionCriteria_ASSIGNMENT_SUBMITTED_instance = new CompletionCriteria('ASSIGNMENT_SUBMITTED', 3, tmp_2, 100);
    var tmp_3 = strings_getInstance().bmh_1;
    CompletionCriteria_ASSIGNMENT_GRADED_instance = new CompletionCriteria('ASSIGNMENT_GRADED', 4, tmp_3, 102);
    Companion_getInstance_162();
  }
  function CompletionCriteria(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.ouz_1 = stringResource;
    this.puz_1 = value;
  }
  function CompletionCriteria_AUTOMATIC_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_AUTOMATIC_instance;
  }
  function CompletionCriteria_MIN_SCORE_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_MIN_SCORE_instance;
  }
  function CompletionCriteria_STUDENT_SELF_MARKS_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_STUDENT_SELF_MARKS_instance;
  }
  function CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  }
  function CompletionCriteria_ASSIGNMENT_GRADED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_GRADED_instance;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yuz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.zuz_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.yuz_1.xv0_1.t2().mse_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rjc_1;
          this.yuz_1.zv0(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vjo(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).joz = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this.yuz_1, completion);
    i.zuz_1 = result;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.iv1_1 = this$0;
    this.jv1_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.kv1_1.poy_1;
          var tmp0_elvis_lhs = tmp_0 instanceof ContentEntryAndContentJob ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var contentEntryResult = tmp_1;
          l$ret$1: do {
            var this_0 = this.iv1_1.xv0_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.mse_1;
              var nextValue = prevValue.xse(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.djd(VOID, VOID, contentEntryResult.sjb_1, VOID, contentEntryResult.ujb_1, contentEntryResult.tjb_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          this.jv1_1.qp7('SavedSelectedContentEntry', this.iv1_1.r4x().w4b(Companion_instance_40.s4x(), contentEntryResult));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).joz = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this.iv1_1, this.jv1_1, completion);
    i.kv1_1 = result;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda).fsg = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.fsg(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).tmw = function (it, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda(completion);
    i.tv1_1 = it;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.fsg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    this.cv2_1 = this$0;
    this.dv2_1 = $savedStateHandle;
    this.ev2_1 = $selectedContentEntry;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).psg = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.psg($completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).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;
            var tmp_0 = get_doorPrimaryKeyManager(this.cv2_1.dpc());
            suspendResult = tmp_0.t68(124, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            var this_0 = new CourseBlock();
            this_0.o83_1 = newUid;
            this_0.e84_1 = true;
            var tmp_1 = this_0;
            var tmp0_safe_receiver = this.dv2_1.ba('blockType');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
            var tmp_2;
            if (tmp1_elvis_lhs == null) {
              tmp_2 = 100;
            } else {
              tmp_2 = tmp1_elvis_lhs;
            }

            tmp_1.p83_1 = tmp_2;
            var tmp_3 = this_0;
            var tmp2_safe_receiver = this.ev2_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.sjb_1;
            tmp_3.s83_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.yan_1;
            var tmp_4 = this_0;
            var tmp4_safe_receiver = this.ev2_1;
            var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.sjb_1;
            tmp_4.t83_1 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.zan_1;
            if (!(this.ev2_1 == null)) {
              var tmp_5 = this_0;
              var tmp6_safe_receiver = this.ev2_1.sjb_1;
              var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.xan_1;
              tmp_5.g84_1 = tmp7_elvis_lhs == null ? new Long(0, 0) : tmp7_elvis_lhs;
              var tmp_6 = this_0;
              tmp_6.p83_1 = 104;
            }

            var tmp0_safe_receiver_0 = this.ev2_1;
            var tmp5_contentEntry = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.sjb_1;
            var tmp3_safe_receiver_0 = this.ev2_1;
            var tmp6_contentJob = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.tjb_1;
            var tmp2_safe_receiver_0 = this.ev2_1;
            var tmp7_contentJobItem = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.ujb_1;
            var tmp8_courseBlockPicture = new CourseBlockPicture(newUid);
            var tmp1_safe_receiver = this.ev2_1;
            var tmp9_contentEntryPicture = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vjb_1;
            return new CourseBlockAndEditEntities(this_0, tmp8_courseBlockPicture, tmp5_contentEntry, tmp9_contentEntryPicture, tmp7_contentJobItem, tmp6_contentJob);
          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);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new CourseBlockEditViewModel$slambda$slambda_1(this.cv2_1, this.dv2_1, this.ev2_1, completion);
  };
  function CourseBlockEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation);
    var l = function ($completion) {
      return i.psg($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseBlockEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.xv0_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xse(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseBlockEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.nv2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).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;
            var tmp_0 = this.nv2_1.mpc(this.nv2_1.hpc(), 'courseBlockDesc');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_0(this.nv2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this.nv2_1, completion);
    i.ov2_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation) {
    this.xv2_1 = this$0;
    this.yv2_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).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;
            var tmp_0 = this.xv2_1.mpc(this.xv2_1.hpc(), 'courseBlockEditContentEntry');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_2(this.xv2_1, this.yv2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this.xv2_1, this.yv2_1, completion);
    i.zv2_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_6(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_145() {
    Companion_instance_193 = this;
    this.vui_1 = 'CourseBlockEdit';
    this.wui_1 = 'SelectedContentEntry';
    this.xui_1 = 'blockType';
    this.yui_1 = 'courseBlockDesc';
    this.zui_1 = 'courseBlockEditContentEntry';
    this.auj_1 = 'SavedSelectedContentEntry';
    var tmp = this;
    Companion_getInstance_120();
    Companion_getInstance_110();
    Companion_getInstance_110();
    tmp.buj_1 = listOf(['blockType', 'clazzUid', 'goToOnContentEntryDone', 'blockType', 'result_viewname', 'result_key', 'listMode']);
  }
  var Companion_instance_193;
  function Companion_getInstance_163() {
    if (Companion_instance_193 == null)
      new Companion_145();
    return Companion_instance_193;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_24(function_0) {
    this.av3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_24).t1d = function (value, $completion) {
    return this.av3_1(value, $completion);
  };
  function CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.jv3_1 = this$0;
    this.kv3_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda).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;
            suspendResult = this.jv3_1.npc(this.kv3_1, 'SelectedContentEntry', Companion_instance_40.s4x(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.mv3_1 = suspendResult;
            this.nv3_1 = Companion_getInstance_14().s4x();
            this.hd_1 = 2;
            var tmp_0 = CourseBlockEditViewModel$slambda$slambda_0(null);
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda_2(this.jv3_1, this.kv3_1, this.mv3_1, null);
            suspendResult = this.jv3_1.spc(this.nv3_1, VOID, VOID, tmp_0, tmp_1, CourseBlockEditViewModel$slambda$lambda(this.jv3_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ov3_1 = suspendResult;
            var tmp_2 = this;
            var tmp1_safe_receiver = this.ov3_1;
            tmp_2.pv3_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tjc_1;
            var tmp_3 = this;
            var tmp2_safe_receiver = this.ov3_1;
            tmp_3.qv3_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.rjc_1;
            if (!(this.pv3_1 == null) ? !(this.qv3_1 == null) : false) {
              Companion_getInstance_109();
              if (this.kv3_1.ba('entity') == null) {
                this.rv3_1 = false;
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4;
                var tmp_5 = this.pv3_1.tao_1;
                if (tmp_5 === 2) {
                  tmp_4 = this.pv3_1.sao_1.equals(this.qv3_1.o83_1);
                } else {
                  tmp_4 = false;
                }
                if (tmp_4) {
                  var tmp_6 = this;
                  tmp_6.rv3_1 = true;
                  this.hd_1 = 4;
                  continue $sm;
                } else {
                  var tmp_7 = this.pv3_1.tao_1;
                  if (tmp_7 === 2) {
                    this.hd_1 = 3;
                    var tmp_8 = this.jv3_1.epc().t7l();
                    var tmp_9 = this.jv3_1.cpc();
                    var tmp_10 = this.pv3_1.sao_1;
                    PermissionFlags_getInstance();
                    suspendResult = tmp_8.ydb(tmp_9, tmp_10, new Long(2, 0), this);
                    if (suspendResult === get_COROUTINE_SUSPENDED()) {
                      return suspendResult;
                    }
                    continue $sm;
                  } else {
                    this.rv3_1 = false;
                    this.hd_1 = 4;
                    continue $sm;
                  }
                }
              }
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 3:
            this.rv3_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var canEditContentEntry = this.rv3_1;
            l$ret$1: do {
              var this_0 = this.jv3_1.xv0_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xse(VOID, canEditContentEntry);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            l$ret$3: do {
              var this_1 = this.jv3_1.xv0_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.xse(VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            l$ret$5: do {
              var this_2 = this.jv3_1.opb_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var tmp0_safe_receiver = this.qv3_1;
                var tmp1_subject = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p83_1;
                var tmp_11;
                if (tmp1_subject === 100) {
                  tmp_11 = this.jv3_1.upi(strings_getInstance().kmj_1, strings_getInstance().vmh_1);
                } else {
                  if (tmp1_subject === 102) {
                    tmp_11 = this.jv3_1.upi(strings_getInstance().jmh_1, strings_getInstance().jmj_1);
                  } else {
                    if (tmp1_subject === 105) {
                      tmp_11 = this.jv3_1.upi(strings_getInstance().lmk_1, strings_getInstance().mmk_1);
                    } else {
                      if (tmp1_subject === 104) {
                        tmp_11 = this.jv3_1.ipc().rnd(strings_getInstance().amp_1);
                      } else {
                        tmp_11 = '';
                      }
                    }
                  }
                }
                var tmp_12 = tmp_11;
                var tmp_13 = this.jv3_1.ipc().rnd(strings_getInstance().vlr_1);
                var nextValue_1 = prevValue_1.mov(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_13, VOID, CourseBlockEditViewModel$onClickSave$ref(this.jv3_1)));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            launch(this.lv3_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_4(this.jv3_1, null));
            launch(this.lv3_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_6(this.jv3_1, this.kv3_1, null));
            return Unit_instance;
          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);
  };
  protoOf(CourseBlockEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda(this.jv3_1, this.kv3_1, completion);
    i.lv3_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.av4_1 = $commitDelay;
    this.bv4_1 = $entity;
    this.cv4_1 = $this;
    this.dv4_1 = $key;
    this.ev4_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.av4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.bv4_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.cv4_1.opc(this.cv4_1.kpb_1, this.dv4_1, this.ev4_1, this.bv4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda(this.av4_1, this.bv4_1, this.cv4_1, this.dv4_1, this.ev4_1, completion);
    i.fv4_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ov4_1 = $commitDelay;
    this.pv4_1 = $entity;
    this.qv4_1 = $this;
    this.rv4_1 = $key;
    this.sv4_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.ov4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.pv4_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.qv4_1.opc(this.qv4_1.kpb_1, this.rv4_1, this.sv4_1, this.pv4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda(this.ov4_1, this.pv4_1, this.qv4_1, this.rv4_1, this.sv4_1, completion);
    i.tv4_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel(di, savedStateHandle) {
    Companion_getInstance_163();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseBlockEdit');
    this.xv0_1 = MutableStateFlow(new CourseBlockEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_getInstance_9().mli().nlh()));
    this.yv0_1 = asStateFlow(this.xv0_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, CourseBlockEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(CourseBlockEditViewModel).zv0 = function (courseBlock) {
    if (courseBlock == null)
      return Unit_instance;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.xv0_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.mse_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.djd(courseBlock);
        var tmp1_safe_receiver = prevValue.mse_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rjc_1;
        var nextValue = prevValue.xse(tmp, VOID, VOID, VOID, VOID, this.vpi(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.s83_1, courseBlock.s83_1, prevValue.rse_1));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.mse_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_14().s4x();
    Companion_getInstance_109();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.bpc();
    tmp_0.pph_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onEntityChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).uv4 = function () {
    var tmp0_safe_receiver = this.xv0_1.t2().mse_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bjd();
    var tmp_0 = Companion_instance_40.s4x();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>' call
    var tmp0_safe_receiver_0 = this.xv0_1.t2().mse_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      var key = 'courseBlock';
      var value = this.r4x().w4b(Companion_instance_14.s4x(), tmp0_safe_receiver_0.rjc_1);
      this_0.s(key, value);
      // Inline function 'kotlin.collections.set' call
      var key_0 = 'goToOnContentEntryDone';
      var value_0 = (2).toString();
      this_0.s(key_0, value_0);
    }
    var tmp$ret$3 = this_0.f3();
    this.qpc('ContentEntryEdit', 'courseBlockEditContentEntry', tmp, tmp_0, tmp$ret$3);
  };
  protoOf(CourseBlockEditViewModel).nsm = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.xv0_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.mse_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.mse_1.sjc_1;
          tmp = tmp1_safe_receiver.djd(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zjo(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.xse(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.mse_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_14().s4x();
    Companion_getInstance_109();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.bpc();
    tmp_0.pph_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onPictureChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).mq0 = function () {
    var tmp0_elvis_lhs = this.xv0_1.t2().mse_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseBlockVal = tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = courseBlockVal.rjc_1.s83_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : isBlank(this_0)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.xv0_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.xse(VOID, VOID, VOID, VOID, VOID, this.ipc().rnd(strings_getInstance().bmm_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (this.xv0_1.t2().bsj())
      return Unit_instance;
    this.tph(this.xv0_1.t2().mse_1);
  };
  function Companion_146() {
    Companion_instance_194 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.vv4_1 = [null, null, new ArrayListSerializer(Companion_getInstance_162().s4x()), null, null, null, null, null, null, null, null];
  }
  var Companion_instance_194;
  function Companion_getInstance_164() {
    if (Companion_instance_194 == null)
      new Companion_146();
    return Companion_instance_194;
  }
  function $serializer_56() {
    $serializer_instance_56 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditUiState', this, 11);
    tmp0_serialDesc.y4l('block', true);
    tmp0_serialDesc.y4l('canEditSelectedContentEntry', true);
    tmp0_serialDesc.y4l('completionCriteriaOptions', true);
    tmp0_serialDesc.y4l('fieldsEnabled', true);
    tmp0_serialDesc.y4l('caHideUntilDateError', true);
    tmp0_serialDesc.y4l('caTitleError', true);
    tmp0_serialDesc.y4l('caDeadlineError', true);
    tmp0_serialDesc.y4l('caMaxPointsError', true);
    tmp0_serialDesc.y4l('maxPointsRequired', true);
    tmp0_serialDesc.y4l('caGracePeriodError', true);
    tmp0_serialDesc.y4l('timeZone', true);
    this.wv4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_56).v4a = function () {
    return this.wv4_1;
  };
  protoOf($serializer_56).p4m = function () {
    var tmp0_cached = Companion_getInstance_164().vv4_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_8()), BooleanSerializer_getInstance(), tmp0_cached[2], BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_56).x4a = function (decoder) {
    var tmp0_desc = this.wv4_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = false;
    var tmp6_local2 = null;
    var tmp7_local3 = false;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_input = decoder.n4e(tmp0_desc);
    var tmp16_cached = Companion_getInstance_164().vv4_1;
    if (tmp15_input.c4f()) {
      tmp4_local0 = tmp15_input.b4f(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp15_input.p4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp15_input.z4e(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp15_input.p4e(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp15_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp15_input.b4f(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp15_input.b4f(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp15_input.b4f(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp15_input.p4e(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp15_input.b4f(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp15_input.x4e(tmp0_desc, 10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp15_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp15_input.b4f(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp15_input.p4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp15_input.z4e(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp15_input.p4e(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp15_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp15_input.b4f(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp15_input.b4f(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp15_input.b4f(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp15_input.p4e(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp15_input.b4f(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp15_input.x4e(tmp0_desc, 10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp15_input.o4e(tmp0_desc);
    return CourseBlockEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, null);
  };
  protoOf($serializer_56).xv4 = function (encoder, value) {
    var tmp0_desc = this.wv4_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_164().vv4_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.mse_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 0, $serializer_getInstance_8(), value.mse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.nse_1 === false)) {
      tmp1_output.t4f(tmp0_desc, 1, value.nse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !equals(value.ose_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 2, tmp2_cached[2], value.ose_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.pse_1 === false)) {
      tmp1_output.t4f(tmp0_desc, 3, value.pse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.qse_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, StringSerializer_getInstance(), value.qse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 5) ? true : !(value.rse_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 5, StringSerializer_getInstance(), value.rse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 6) ? true : !(value.sse_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 6, StringSerializer_getInstance(), value.sse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 7) ? true : !(value.tse_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 7, StringSerializer_getInstance(), value.tse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 8) ? true : !(value.use_1 === false)) {
      tmp1_output.t4f(tmp0_desc, 8, value.use_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 9) ? true : !(value.vse_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 9, StringSerializer_getInstance(), value.vse_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 10) ? true : !(value.wse_1 === 'UTC')) {
      tmp1_output.b4g(tmp0_desc, 10, value.wse_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_56).w4a = function (encoder, value) {
    return this.xv4(encoder, value instanceof CourseBlockEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_56;
  function $serializer_getInstance_68() {
    if ($serializer_instance_56 == null)
      new $serializer_56();
    return $serializer_instance_56;
  }
  function CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_68().wv4_1);
    }
    if (0 === (seen1 & 1))
      $this.mse_1 = null;
    else
      $this.mse_1 = block;
    if (0 === (seen1 & 2))
      $this.nse_1 = false;
    else
      $this.nse_1 = canEditSelectedContentEntry;
    if (0 === (seen1 & 4))
      $this.ose_1 = emptyList();
    else
      $this.ose_1 = completionCriteriaOptions;
    if (0 === (seen1 & 8))
      $this.pse_1 = false;
    else
      $this.pse_1 = fieldsEnabled;
    if (0 === (seen1 & 16))
      $this.qse_1 = null;
    else
      $this.qse_1 = caHideUntilDateError;
    if (0 === (seen1 & 32))
      $this.rse_1 = null;
    else
      $this.rse_1 = caTitleError;
    if (0 === (seen1 & 64))
      $this.sse_1 = null;
    else
      $this.sse_1 = caDeadlineError;
    if (0 === (seen1 & 128))
      $this.tse_1 = null;
    else
      $this.tse_1 = caMaxPointsError;
    if (0 === (seen1 & 256))
      $this.use_1 = false;
    else
      $this.use_1 = maxPointsRequired;
    if (0 === (seen1 & 512))
      $this.vse_1 = null;
    else
      $this.vse_1 = caGracePeriodError;
    if (0 === (seen1 & 1024))
      $this.wse_1 = 'UTC';
    else
      $this.wse_1 = timeZone;
    return $this;
  }
  function CourseBlockEditUiState_init_$Create$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker) {
    return CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, objectCreate(protoOf(CourseBlockEditUiState)));
  }
  function CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    Companion_getInstance_164();
    block = block === VOID ? null : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? false : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? emptyList() : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? null : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? null : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? null : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? null : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? false : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? null : caGracePeriodError;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.mse_1 = block;
    this.nse_1 = canEditSelectedContentEntry;
    this.ose_1 = completionCriteriaOptions;
    this.pse_1 = fieldsEnabled;
    this.qse_1 = caHideUntilDateError;
    this.rse_1 = caTitleError;
    this.sse_1 = caDeadlineError;
    this.tse_1 = caMaxPointsError;
    this.use_1 = maxPointsRequired;
    this.vse_1 = caGracePeriodError;
    this.wse_1 = timeZone;
  }
  protoOf(CourseBlockEditUiState).yv4 = function () {
    var tmp0_safe_receiver = this.mse_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rjc_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u83_1;
    return tmp === 1;
  };
  protoOf(CourseBlockEditUiState).zv4 = function () {
    var tmp;
    if (this.av5()) {
      var tmp0_safe_receiver = this.mse_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rjc_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.w83_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).rsa = function () {
    var tmp;
    if (this.zv4()) {
      var tmp0_safe_receiver = this.mse_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rjc_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y83_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).bv5 = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.ose_1.c1();
  };
  protoOf(CourseBlockEditUiState).av5 = function () {
    var tmp;
    var tmp0_safe_receiver = this.mse_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rjc_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.p83_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.mse_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.rjc_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.p83_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).cv5 = function () {
    var tmp;
    var tmp0_safe_receiver = this.mse_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rjc_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.p83_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.mse_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.rjc_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.p83_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).bsj = function () {
    return ((!(this.rse_1 == null) ? true : !(this.sse_1 == null)) ? true : !(this.vse_1 == null)) ? true : !(this.tse_1 == null);
  };
  protoOf(CourseBlockEditUiState).dv5 = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    return new CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).xse = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, $super) {
    block = block === VOID ? this.mse_1 : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? this.nse_1 : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? this.ose_1 : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? this.pse_1 : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? this.qse_1 : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? this.rse_1 : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? this.sse_1 : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? this.tse_1 : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? this.use_1 : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? this.vse_1 : caGracePeriodError;
    timeZone = timeZone === VOID ? this.wse_1 : timeZone;
    return $super === VOID ? this.dv5(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) : $super.dv5.call(this, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).toString = function () {
    return 'CourseBlockEditUiState(block=' + this.mse_1 + ', canEditSelectedContentEntry=' + this.nse_1 + ', completionCriteriaOptions=' + this.ose_1 + ', fieldsEnabled=' + this.pse_1 + ', caHideUntilDateError=' + this.qse_1 + ', caTitleError=' + this.rse_1 + ', caDeadlineError=' + this.sse_1 + ', caMaxPointsError=' + this.tse_1 + ', maxPointsRequired=' + this.use_1 + ', caGracePeriodError=' + this.vse_1 + ', timeZone=' + this.wse_1 + ')';
  };
  protoOf(CourseBlockEditUiState).hashCode = function () {
    var result = this.mse_1 == null ? 0 : this.mse_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.nse_1) | 0;
    result = imul(result, 31) + hashCode(this.ose_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pse_1) | 0;
    result = imul(result, 31) + (this.qse_1 == null ? 0 : getStringHashCode(this.qse_1)) | 0;
    result = imul(result, 31) + (this.rse_1 == null ? 0 : getStringHashCode(this.rse_1)) | 0;
    result = imul(result, 31) + (this.sse_1 == null ? 0 : getStringHashCode(this.sse_1)) | 0;
    result = imul(result, 31) + (this.tse_1 == null ? 0 : getStringHashCode(this.tse_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.use_1) | 0;
    result = imul(result, 31) + (this.vse_1 == null ? 0 : getStringHashCode(this.vse_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.wse_1) | 0;
    return result;
  };
  protoOf(CourseBlockEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseBlockEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseBlockEditUiState ? other : THROW_CCE();
    if (!equals(this.mse_1, tmp0_other_with_cast.mse_1))
      return false;
    if (!(this.nse_1 === tmp0_other_with_cast.nse_1))
      return false;
    if (!equals(this.ose_1, tmp0_other_with_cast.ose_1))
      return false;
    if (!(this.pse_1 === tmp0_other_with_cast.pse_1))
      return false;
    if (!(this.qse_1 == tmp0_other_with_cast.qse_1))
      return false;
    if (!(this.rse_1 == tmp0_other_with_cast.rse_1))
      return false;
    if (!(this.sse_1 == tmp0_other_with_cast.sse_1))
      return false;
    if (!(this.tse_1 == tmp0_other_with_cast.tse_1))
      return false;
    if (!(this.use_1 === tmp0_other_with_cast.use_1))
      return false;
    if (!(this.vse_1 == tmp0_other_with_cast.vse_1))
      return false;
    if (!(this.wse_1 === tmp0_other_with_cast.wse_1))
      return false;
    return true;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mv5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).ov5 = function (it, $completion) {
    var tmp = this.pv5(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ov5((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.mv5_1.mv6_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.qv6(this.nv5_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).pv5 = function (it, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this.mv5_1, completion);
    i.nv5_1 = it;
    return i;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ov5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.zv6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = this.zv6_1.epc().u7j().vcc(this.zv6_1.epb_1);
            var tmp_1 = TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this.zv6_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_25(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this.zv6_1, completion);
    i.av7_1 = $this$launch;
    return i;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.textblockdetail.TextBlockDetailViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.jv7_1 = $this_launch;
    this.kv7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.jv7_1, VOID, VOID, TextBlockDetailViewModel$slambda$slambda$slambda_0(this.kv7_1, null));
          launchSetTitleFromClazzUid(this.kv7_1, this.kv7_1.ov6_1, TextBlockDetailViewModel$slambda$slambda$lambda(this.kv7_1));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new TextBlockDetailViewModel$slambda$slambda(this.jv7_1, this.kv7_1, completion);
  };
  function TextBlockDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_147() {
    this.lv7_1 = 'CourseText';
  }
  var Companion_instance_195;
  function Companion_getInstance_165() {
    return Companion_instance_195;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_25(function_0) {
    this.mv7_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_25).t1d = function (value, $completion) {
    return this.mv7_1(value, $completion);
  };
  function TextBlockDetailViewModel$slambda(this$0, resultContinuation) {
    this.vv7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda).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 = whenSubscribed(this.vv7_1.mv6_1, TextBlockDetailViewModel$slambda$slambda_0(this.wv7_1, this.vv7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(TextBlockDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda(this.vv7_1, completion);
    i.wv7_1 = $this$launch;
    return i;
  };
  function TextBlockDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseText');
    this.mv6_1 = MutableStateFlow(new TextBlockDetailUiState());
    this.nv6_1 = asStateFlow(this.mv6_1);
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ov6_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, TextBlockDetailViewModel$slambda_0(this, null));
  }
  function TextBlockDetailUiState(courseBlock) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    this.pv6_1 = courseBlock;
  }
  protoOf(TextBlockDetailUiState).qv6 = function (courseBlock) {
    return new TextBlockDetailUiState(courseBlock);
  };
  protoOf(TextBlockDetailUiState).toString = function () {
    return 'TextBlockDetailUiState(courseBlock=' + this.pv6_1 + ')';
  };
  protoOf(TextBlockDetailUiState).hashCode = function () {
    return this.pv6_1 == null ? 0 : this.pv6_1.hashCode();
  };
  protoOf(TextBlockDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TextBlockDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TextBlockDetailUiState ? other : THROW_CCE();
    if (!equals(this.pv6_1, tmp0_other_with_cast.pv6_1))
      return false;
    return true;
  };
  function CourseGroupSetDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.spy();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).gv9 = function (entity, permissionPair, $completion) {
    var tmp = this.hv9(entity, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.gv9(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return to(this.ev9_1, this.fv9_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).hv9 = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.ev9_1 = entity;
    i.fv9_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.gv9(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.qv9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).sv9 = function (it, $completion) {
    var tmp = this.tv9(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.sv9(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.rv9_1.x6_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasManageStudentPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.qv9_1.tv8_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.rv9_1.w6_1;
              var tmp_0;
              if (hasCourseViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var nextValue = prevValue.wv9(VOID, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.qv9_1.opb_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_1 = this.qv9_1.ipc().rnd(strings_getInstance().tlv_1);
              var tmp_2 = FabIcon_EDIT_getInstance();
              var nextValue_0 = prevValue_0.mov(new FabUiState(hasManageStudentPermission, tmp_1, tmp_2, CourseGroupSetDetailViewModel$onClickEdit$ref(this.qv9_1)));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).tv9 = function (it, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this.qv9_1, completion);
    i.rv9_1 = it;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.sv9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).hva = function (entity, permissionPair, $completion) {
    var tmp = this.iva(entity, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE();
    return this.hva(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.fva_1;
          var tmp_0;
          if (this.gva_1.wde_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).iva = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(completion);
    i.fva_1 = entity;
    i.gva_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.hva(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.rva_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).tva = function (courseGroupSet, $completion) {
    var tmp = this.uva(courseGroupSet, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.tva((p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.rva_1.tv8_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.wv9(this.sva_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.rva_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver = this.sva_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w84_1;
              var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).uva = function (courseGroupSet, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this.rva_1, completion);
    i.sva_1 = courseGroupSet;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (courseGroupSet, $completion) {
      return i.tva(courseGroupSet, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    this.dvb_1 = $memberListFlow;
    this.evb_1 = $permissionsFlow;
    this.fvb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = distinctUntilChanged(combine(this.dvb_1, this.evb_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this.fvb_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda(this.dvb_1, this.evb_1, this.fvb_1, completion);
    i.gvb_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_0($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    this.pvb_1 = $entityFlow;
    this.qvb_1 = $permissionsFlow;
    this.rvb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = combine(this.pvb_1, this.qvb_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(null));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this.rvb_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1(this.pvb_1, this.qvb_1, this.rvb_1, completion);
    i.svb_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_2($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    this.bvc_1 = $this_launch;
    this.cvc_1 = $memberListFlow;
    this.dvc_1 = $permissionsFlow;
    this.evc_1 = this$0;
    this.fvc_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.bvc_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_0(this.cvc_1, this.dvc_1, this.evc_1, null));
          launch(this.bvc_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_2(this.fvc_1, this.dvc_1, this.evc_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new CourseGroupSetDetailViewModel$slambda$slambda(this.bvc_1, this.cvc_1, this.dvc_1, this.evc_1, this.fvc_1, completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda_0($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_148() {
    this.gvc_1 = 'CourseGroupSet';
  }
  var Companion_instance_196;
  function Companion_getInstance_166() {
    return Companion_instance_196;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_26(function_0) {
    this.hvc_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_26).t1d = function (value, $completion) {
    return this.hvc_1(value, $completion);
  };
  function CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation) {
    this.qvc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.qvc_1.epc().t7l();
            var tmp_2 = this.qvc_1.cpc();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(1, 0);
            PermissionFlags_getInstance();
            tmp_0.svc_1 = shareIn(tmp_1.vdb(tmp_2, this.qvc_1.vv8_1, tmp_3, new Long(8, 0)), this.qvc_1.bpc(), Companion_getInstance_13().v1h());
            this.tvc_1 = this.qvc_1.epc().x7j().icv(this.qvc_1.epb_1, this.qvc_1.vv8_1, systemTimeInMillis(), 0, this.qvc_1.cpc());
            this.uvc_1 = this.qvc_1.epc().w7j().o8i(this.qvc_1.epb_1);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qvc_1.tv8_1, CourseGroupSetDetailViewModel$slambda$slambda_0(this.rvc_1, this.tvc_1, this.svc_1, this.qvc_1, this.uvc_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda(this.qvc_1, completion);
    i.rvc_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseGroupSet');
    this.tv8_1 = MutableStateFlow(new CourseGroupSetDetailUiState());
    this.uv8_1 = asStateFlow(this.tv8_1);
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.vv8_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, CourseGroupSetDetailViewModel$slambda_0(this, null));
  }
  protoOf(CourseGroupSetDetailViewModel).spy = function () {
    Companion_getInstance_110();
    var tmp = to('entityUid', this.epb_1.toString());
    Companion_getInstance_120();
    this.mpb_1.fo0('CourseGroupsEdit', mapOf([tmp, to('clazzUid', this.vv8_1.toString())]));
  };
  function CourseGroupSetDetailUiState(courseGroupSet, membersList) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    this.uv9_1 = courseGroupSet;
    this.vv9_1 = membersList;
  }
  protoOf(CourseGroupSetDetailUiState).vvc = function (courseGroupSet, membersList) {
    return new CourseGroupSetDetailUiState(courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).wv9 = function (courseGroupSet, membersList, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.uv9_1 : courseGroupSet;
    membersList = membersList === VOID ? this.vv9_1 : membersList;
    return $super === VOID ? this.vvc(courseGroupSet, membersList) : $super.vvc.call(this, courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).toString = function () {
    return 'CourseGroupSetDetailUiState(courseGroupSet=' + this.uv9_1 + ', membersList=' + this.vv9_1 + ')';
  };
  protoOf(CourseGroupSetDetailUiState).hashCode = function () {
    var result = this.uv9_1 == null ? 0 : hashCode(this.uv9_1);
    result = imul(result, 31) + hashCode(this.vv9_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetDetailUiState ? other : THROW_CCE();
    if (!equals(this.uv9_1, tmp0_other_with_cast.uv9_1))
      return false;
    if (!equals(this.vv9_1, tmp0_other_with_cast.vv9_1))
      return false;
    return true;
  };
  function appendGroupNumIfNotInList(_this__u8e3s4, assignedGroupNum) {
    var tmp;
    var tmp0_elvis_lhs = lastOrNull(_this__u8e3s4);
    if ((tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) < assignedGroupNum) {
      tmp = plus(_this__u8e3s4, listOf_0(assignedGroupNum));
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.evd_1 = this$0;
    this.fvd_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).svd = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.svd(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).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;
            suspendResult = this.gvd_1.x7j().hcv(this.evd_1.qph_1, this.evd_1.sve_1, systemTimeInMillis(), 0, this.evd_1.cpc(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hvd_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.ivd_1 = this.hvd_1;
            var tmp_1 = this;
            tmp_1.jvd_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.hvd_1, 10));
            this.kvd_1 = this.ivd_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.kvd_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.lvd_1 = this.kvd_1.e();
            var tmp_2 = this;
            tmp_2.mvd_1 = this.lvd_1;
            if (this.mvd_1.wcw_1 == null) {
              var tmp_3 = this;
              tmp_3.ovd_1 = new CourseGroupMemberAndName();
              var tmp_4 = this;
              tmp_4.pvd_1 = this.ovd_1;
              this.pvd_1.xcw_1 = this.mvd_1.xcw_1;
              this.pvd_1.zcw_1 = this.mvd_1.zcw_1;
              this.pvd_1.ycw_1 = this.mvd_1.ycw_1;
              this.pvd_1.acx_1 = this.mvd_1.acx_1;
              var tmp_5 = this;
              tmp_5.qvd_1 = new CourseGroupMember();
              var tmp_6 = this;
              tmp_6.rvd_1 = this.qvd_1;
              this.hd_1 = 3;
              var tmp_7 = get_doorPrimaryKeyManager(this.evd_1.dpc());
              suspendResult = tmp_7.t68(243, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.nvd_1 = this.mvd_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.rvd_1.ecw_1 = ARGUMENT;
            this.rvd_1.fcw_1 = this.fvd_1;
            this.rvd_1.hcw_1 = this.mvd_1.ycw_1;
            var ARGUMENT_0 = this.qvd_1;
            this.pvd_1.wcw_1 = ARGUMENT_0;
            this.nvd_1 = this.ovd_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var ARGUMENT_1 = this.nvd_1;
            this.jvd_1.i1(ARGUMENT_1);
            this.hd_1 = 2;
            continue $sm;
          case 5:
            return this.jvd_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);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).tmw = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this.evd_1, this.fvd_1, completion);
    i.gvd_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function (db, $completion) {
      return i.svd(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).bvf = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).r7e = function ($completion) {
    return this.bvf($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).q7e = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_2(resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.bvf($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda(this$0) {
    return function (memberList) {
      var tmp;
      if (!(memberList == null)) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0.qve_1;
          while (true) {
            var prevValue = this_0.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.hvf(VOID, memberList);
            if (this_0.y1k(prevValue, nextValue)) {
              tmp$ret$1 = Unit_instance;
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.qvf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).uvf = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.uvf(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.rvf_1;
            var tmp_1;
            if (!this.qvf_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.svf_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w7j();
            if (this.svf_1 == null) {
              this.tvf_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.svf_1.ed4(this.qvf_1.qph_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.tvf_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.tvf_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).tmw = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this.qvf_1, completion);
    i.rvf_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.uvf(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation) {
    this.dvg_1 = $courseGroupSetUid;
    this.evg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).gd8 = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).r7e = function ($completion) {
    return this.gd8($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new CourseGroupSet();
          this_0.v84_1 = this.dvg_1;
          this_0.z84_1 = this.evg_1.sve_1;
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).q7e = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_5(this.dvg_1, this.evg_1, completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_6($courseGroupSetUid, this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation);
    var l = function ($completion) {
      return i.gd8($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.qve_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.hvf(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.nvg_1 = this$0;
    this.ovg_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).qvg = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qvg((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).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;
            var tmp_0 = ListSerializer(Companion_instance_42.s4x());
            var tmp_1 = listOf_0('courseGroupMembers');
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this.nvg_1, this.ovg_1, null);
            var tmp_3 = CourseGroupSetEditViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.nvg_1.spc(tmp_0, tmp_1, VOID, tmp_2, tmp_3, CourseGroupSetEditViewModel$slambda$slambda$lambda(this.nvg_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this.nvg_1, this.ovg_1, completion);
    i.pvg_1 = $this$async;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.qvg($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation) {
    this.zvg_1 = this$0;
    this.avh_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).cvh = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.cvh((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).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;
            var tmp_0 = Companion_instance_43.s4x();
            var tmp_1 = CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this.zvg_1, null);
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_6(this.avh_1, this.zvg_1, null);
            suspendResult = this.zvg_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this.zvg_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this.zvg_1, this.avh_1, completion);
    i.bvh_1 = $this$async;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda_2(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.cvh($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.lvh_1 = this$0;
    this.mvh_1 = $courseGroupSet;
    this.nvh_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.lvh_1.epc().w7j().fd4(this.mvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.lvh_1.epc().x7j().jcv(this.nvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this.lvh_1, this.mvh_1, this.nvh_1, completion);
    i.ovh_1 = it;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_149() {
    this.pvh_1 = 'CourseGroupsEdit';
    this.qvh_1 = 'courseGroupMembers';
  }
  var Companion_instance_197;
  function Companion_getInstance_167() {
    return Companion_instance_197;
  }
  function CourseGroupSetEditViewModel$slambda(this$0, resultContinuation) {
    this.zvh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).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;
            var tmp_0 = this.avi_1.t7l();
            var tmp_1 = this.zvh_1.cpc();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ydb(tmp_1, this.zvh_1.sve_1, new Long(8, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).tmw = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda(this.zvh_1, completion);
    i.avi_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation) {
    this.jvi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (!this.jvi_1.qph_1.equals(new Long(0, 0))) {
              this.lvi_1 = this.jvi_1.qph_1;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = get_doorPrimaryKeyManager(this.jvi_1.dpc());
              suspendResult = tmp_0.t68(242, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lvi_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.mvi_1 = this.lvi_1;
            this.hd_1 = 3;
            var tmp_1 = async(this.kvi_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_0(this.jvi_1, this.mvi_1, null));
            suspendResult = awaitAll([tmp_1, async(this.kvi_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_2(this.jvi_1, this.mvi_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            l$ret$1: do {
              var this_0 = this.jvi_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_2 = this.jvi_1.ipc().rnd(strings_getInstance().hm3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, true, CourseGroupSetEditViewModel$onClickSave$ref(this.jvi_1));
                var tmp1_loadingState = Companion_getInstance_93().uov_1;
                var nextValue = prevValue.mov(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.jvi_1.qve_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.hvf(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this.jvi_1, completion);
    i.kvi_1 = $this$launchIfHasPermission;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.vvi_1 = $commitDelay;
    this.wvi_1 = $entity;
    this.xvi_1 = $this;
    this.yvi_1 = $key;
    this.zvi_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.vvi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.wvi_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.xvi_1.opc(this.xvi_1.kpb_1, this.yvi_1, this.zvi_1, this.wvi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda(this.vvi_1, this.wvi_1, this.xvi_1, this.yvi_1, this.zvi_1, completion);
    i.avj_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda($groupNumber) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.gcw_1 = $groupNumber;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0($personUid) {
    return function (it) {
      return it.ycw_1.equals($personUid);
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation) {
    this.jvj_1 = this$0;
    this.kvj_1 = $newState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).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.jvj_1.opc(this.jvj_1.kpb_1, 'courseGroupMembers', ListSerializer(Companion_instance_42.s4x()), this.kvj_1.dvf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this.jvj_1, this.kvj_1, completion);
    i.lvj_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this$0, $newState, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$lambda($shuffledPersonUidList, $it, $totalGroups) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.gcw_1 = ($shuffledPersonUidList.x($it.ycw_1) % $totalGroups | 0) + 1 | 0;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation) {
    this.uvj_1 = this$0;
    this.vvj_1 = $newMemberList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).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.uvj_1.opc(this.uvj_1.kpb_1, 'courseGroupMembers', ListSerializer(Companion_instance_42.s4x()), this.vvj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this.uvj_1, this.vvj_1, completion);
    i.wvj_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this$0, $newMemberList, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.fvk_1 = this$0;
    this.gvk_1 = $courseGroupSet;
    this.hvk_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).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;
            var tmp_0 = this.fvk_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this.fvk_1, this.gvk_1, this.hvk_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this.gvk_1.v84_1;
            Companion_getInstance_120();
            this.fvk_1.rph('CourseGroupSet', tmp_1, this.gvk_1, mapOf_0(to('clazzUid', this.fvk_1.sve_1.toString())));
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this.fvk_1, this.gvk_1, this.hvk_1, completion);
    i.ivk_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseGroupsEdit');
    this.qve_1 = MutableStateFlow(new CourseGroupSetEditUiState());
    this.rve_1 = asStateFlow(this.qve_1);
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.sve_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>' call
        var tmp0_title = this.upi(strings_getInstance().pmi_1, strings_getInstance().qmi_1);
        var tmp1_loadingState = Companion_getInstance_93().tov_1;
        var nextValue = prevValue.mov(VOID, tmp1_loadingState, tmp0_title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = CourseGroupSetEditViewModel$slambda_0(this, null);
    this.upc(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetEditViewModel).jvk = function (courseGroupSet) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qve_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.cvf_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w84_1;
        var tmp_0 = this.vpi(tmp, courseGroupSet == null ? null : courseGroupSet.w84_1, prevValue.evf_1);
        var tmp2_safe_receiver = prevValue.cvf_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.x84_1;
        var nextValue = prevValue.hvf(courseGroupSet, VOID, tmp_0, this.vpi(tmp_1, courseGroupSet == null ? null : courseGroupSet.x84_1, prevValue.fvf_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_43.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.bpc();
    tmp_2.pph_1 = launch(tmp_3, VOID, VOID, CourseGroupSetEditViewModel$onEntityChanged$slambda_0(commitDelay, courseGroupSet, this, key, serializer, null));
  };
  protoOf(CourseGroupSetEditViewModel).kvk = function (personUid, groupNumber) {
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.qve_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>' call
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlin.collections.first' call
          var tmp0_iterator = prevValue.dvf_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>.<anonymous>' call
            if (element.ycw_1.equals(personUid)) {
              tmp$ret$1 = element;
              break $l$block;
            }
          }
          throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
        }
        var currentGroupMemberAndName = tmp$ret$1;
        var tmp0_safe_receiver = currentGroupMemberAndName.wcw_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_9(tmp0_safe_receiver, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda(groupNumber));
        }
        var tmp_0 = currentGroupMemberAndName.gjp(tmp);
        var nextValue = prevValue.hvf(VOID, replace_0(prevValue.dvf_1, tmp_0, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0(personUid)));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$3 = nextValue;
          break $l$block_0;
        }
      }
    }
    var newState = tmp$ret$3;
    var tmp_1 = this.bpc();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this, newState, null));
  };
  protoOf(CourseGroupSetEditViewModel).lvk = function () {
    var tmp0_safe_receiver = this.qve_1.t2().cvf_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x84_1;
    var totalGroups = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.qve_1.t2().dvf_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp$ret$0 = item.ycw_1;
      destination.i1(tmp$ret$0);
    }
    var shuffledPersonUidList = shuffled(destination);
    // Inline function 'kotlin.collections.map' call
    var this_1 = this.qve_1.t2().dvf_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
    var tmp0_iterator_0 = this_1.w();
    while (tmp0_iterator_0.f()) {
      var item_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp0_safe_receiver_0 = item_0.wcw_1;
      var tmp;
      if (tmp0_safe_receiver_0 == null) {
        tmp = null;
      } else {
        tmp = shallowCopy_9(tmp0_safe_receiver_0, CourseGroupSetEditViewModel$onClickAssignRandomly$lambda(shuffledPersonUidList, item_0, totalGroups));
      }
      var tmp$ret$3 = item_0.gjp(tmp);
      destination_0.i1(tmp$ret$3);
    }
    var newMemberList = destination_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.qve_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
        var nextValue = prevValue.hvf(VOID, newMemberList);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this, newMemberList, null));
  };
  protoOf(CourseGroupSetEditViewModel).mq0 = function () {
    var tmp0_elvis_lhs = this.qve_1.t2().cvf_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseGroupSet = tmp;
    // Inline function 'kotlin.collections.mapNotNull' call
    // Inline function 'kotlin.collections.mapNotNullTo' call
    var this_0 = this.qve_1.t2().dvf_1;
    var destination = ArrayList_init_$Create$();
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
      var tmp0_safe_receiver = element.wcw_1;
      if (tmp0_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        destination.i1(tmp0_safe_receiver);
      }
    }
    var membersToSave = destination;
    var tmp$ret$4;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(membersToSave, Collection)) {
        tmp_0 = membersToSave.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$4 = false;
        break $l$block_0;
      }
      var tmp0_iterator_0 = membersToSave.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
        if (element_0.gcw_1 > courseGroupSet.x84_1) {
          tmp$ret$4 = true;
          break $l$block_0;
        }
      }
      tmp$ret$4 = false;
    }
    var hasInvalidAssignments = tmp$ret$4;
    if (hasInvalidAssignments) {
      this.gpc().bow(new Snack(this.ipc().rnd(strings_getInstance().hlj_1)));
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_1 = courseGroupSet.w84_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_1 == null ? true : isBlank(this_1)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.qve_1;
        while (true) {
          var prevValue = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.hvf(VOID, VOID, this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_2.y1k(prevValue, nextValue)) {
            break $l$block_1;
          }
        }
      }
    }
    if (courseGroupSet.x84_1 < 1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.qve_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.hvf(VOID, VOID, VOID, this.ipc().rnd(strings_getInstance().cmh_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if ((hasInvalidAssignments ? true : !(this.qve_1.t2().fvf_1 == null)) ? true : !(this.qve_1.t2().evf_1 == null)) {
      return Unit_instance;
    }
    var tmp_1 = this.bpc();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onClickSave$slambda_0(this, courseGroupSet, membersToSave, null));
  };
  function CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    courseTitleError = courseTitleError === VOID ? null : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? null : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.cvf_1 = courseGroupSet;
    this.dvf_1 = membersList;
    this.evf_1 = courseTitleError;
    this.fvf_1 = numOfGroupsError;
    this.gvf_1 = fieldsEnabled;
  }
  protoOf(CourseGroupSetEditUiState).mvk = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    return new CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).hvf = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.cvf_1 : courseGroupSet;
    membersList = membersList === VOID ? this.dvf_1 : membersList;
    courseTitleError = courseTitleError === VOID ? this.evf_1 : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? this.fvf_1 : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? this.gvf_1 : fieldsEnabled;
    return $super === VOID ? this.mvk(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) : $super.mvk.call(this, courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).toString = function () {
    return 'CourseGroupSetEditUiState(courseGroupSet=' + this.cvf_1 + ', membersList=' + this.dvf_1 + ', courseTitleError=' + this.evf_1 + ', numOfGroupsError=' + this.fvf_1 + ', fieldsEnabled=' + this.gvf_1 + ')';
  };
  protoOf(CourseGroupSetEditUiState).hashCode = function () {
    var result = this.cvf_1 == null ? 0 : hashCode(this.cvf_1);
    result = imul(result, 31) + hashCode(this.dvf_1) | 0;
    result = imul(result, 31) + (this.evf_1 == null ? 0 : getStringHashCode(this.evf_1)) | 0;
    result = imul(result, 31) + (this.fvf_1 == null ? 0 : getStringHashCode(this.fvf_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gvf_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetEditUiState ? other : THROW_CCE();
    if (!equals(this.cvf_1, tmp0_other_with_cast.cvf_1))
      return false;
    if (!equals(this.dvf_1, tmp0_other_with_cast.dvf_1))
      return false;
    if (!(this.evf_1 == tmp0_other_with_cast.evf_1))
      return false;
    if (!(this.fvf_1 == tmp0_other_with_cast.fvf_1))
      return false;
    if (!(this.gvf_1 === tmp0_other_with_cast.gvf_1))
      return false;
    return true;
  };
  function CourseGroupSetListViewModel$slambda$lambda(this$0) {
    return function () {
      var tmp = this$0.epc().t7l();
      var tmp_0 = this$0.cpc();
      PermissionFlags_getInstance();
      return tmp.udb(tmp_0, this$0.nvl_1, new Long(8, 0));
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda$lambda($visible) {
    return function () {
      return 'CourseGroupSetList: set showAddItem visible = ' + $visible;
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda_0(this$0) {
    return function (visible) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.fpk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = Napier_getInstance();
          tmp.j5k(VOID, VOID, CourseGroupSetListViewModel$slambda$lambda$lambda(visible));
          var nextValue = prevValue.tvl(visible);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.cvm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).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 = collectClazzNameAndUpdateTitle(this.cvm_1.nvl_1, this.cvm_1.dpc(), this.cvm_1.opb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this.cvm_1, completion);
    i.dvm_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.mvm_1 = $this_launch;
    this.nvm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.mvm_1, VOID, VOID, CourseGroupSetListViewModel$slambda$slambda$slambda_0(this.nvm_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).q7e = function (completion) {
    return new CourseGroupSetListViewModel$slambda$slambda(this.mvm_1, this.nvm_1, completion);
  };
  function CourseGroupSetListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_150() {
    this.ovm_1 = 'CourseGroups';
  }
  var Companion_instance_198;
  function Companion_getInstance_168() {
    return Companion_instance_198;
  }
  function CourseGroupSetListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().w7j().dd4(this$0.nvl_1, toQueryLikeParam(this$0.opb_1.t2().eov_1.tou_1), this$0.fpk_1.t2().svl_1.kp1_1);
    };
  }
  function CourseGroupSetListViewModel$slambda(this$0, resultContinuation) {
    this.xvm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda).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;
            var tmp_0 = CourseGroupSetListViewModel$slambda$lambda(this.xvm_1);
            var tmp_1 = strings_getInstance().xm0_1;
            suspendResult = this.xvm_1.ppl(tmp_0, tmp_1, CourseGroupSetListViewModel$slambda$lambda_0(this.xvm_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda(this.xvm_1, completion);
    i.yvm_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation) {
    this.hvn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).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 = whenSubscribed(this.hvn_1.fpk_1, CourseGroupSetListViewModel$slambda$slambda_0(this.ivn_1, this.hvn_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda_1(this.hvn_1, completion);
    i.ivn_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseGroupSetListUiState(), 'CourseGroups');
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nvl_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.ovl_1 = CourseGroupSetListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue = prevValue.tvl(VOID, this.ovl_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, true, VOID, VOID, VOID, this.opl());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.bpc();
    launch(tmp_1, VOID, VOID, CourseGroupSetListViewModel$slambda_0(this, null));
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, CourseGroupSetListViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetListViewModel).zpk = function (searchText) {
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).jvn = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.onSortOptionChanged.<anonymous>' call
        var nextValue = prevValue.tvl(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).apl = function () {
    Companion_getInstance_110();
    this.spl('CourseGroupsEdit', mapOf_0(to('clazzUid', this.nvl_1.toString())));
  };
  protoOf(CourseGroupSetListViewModel).kvn = function (entry) {
    var tmp = entry.v84_1;
    Companion_getInstance_120();
    this.upl('CourseGroupSet', tmp, entry, mapOf_0(to('clazzUid', this.nvl_1.toString())));
  };
  function Companion_151() {
    Companion_instance_199 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().zlk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().zlk_1;
    tmp.lvn_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_199;
  function Companion_getInstance_169() {
    if (Companion_instance_199 == null)
      new Companion_151();
    return Companion_instance_199;
  }
  function CourseGroupSetListUiState$_init_$lambda_2d65m2() {
    return new EmptyPagingSource();
  }
  function CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption) {
    Companion_getInstance_169();
    showAddItem = showAddItem === VOID ? false : showAddItem;
    var tmp;
    if (courseGroupSets === VOID) {
      tmp = CourseGroupSetListUiState$_init_$lambda_2d65m2;
    } else {
      tmp = courseGroupSets;
    }
    courseGroupSets = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_169().lvn_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    this.pvl_1 = showAddItem;
    this.qvl_1 = courseGroupSets;
    this.rvl_1 = sortOptions;
    this.svl_1 = sortOption;
  }
  protoOf(CourseGroupSetListUiState).mvn = function (showAddItem, courseGroupSets, sortOptions, sortOption) {
    return new CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).tvl = function (showAddItem, courseGroupSets, sortOptions, sortOption, $super) {
    showAddItem = showAddItem === VOID ? this.pvl_1 : showAddItem;
    courseGroupSets = courseGroupSets === VOID ? this.qvl_1 : courseGroupSets;
    sortOptions = sortOptions === VOID ? this.rvl_1 : sortOptions;
    sortOption = sortOption === VOID ? this.svl_1 : sortOption;
    return $super === VOID ? this.mvn(showAddItem, courseGroupSets, sortOptions, sortOption) : $super.mvn.call(this, showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).toString = function () {
    return 'CourseGroupSetListUiState(showAddItem=' + this.pvl_1 + ', courseGroupSets=' + this.qvl_1 + ', sortOptions=' + this.rvl_1 + ', sortOption=' + this.svl_1 + ')';
  };
  protoOf(CourseGroupSetListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.pvl_1);
    result = imul(result, 31) + hashCode(this.qvl_1) | 0;
    result = imul(result, 31) + hashCode(this.rvl_1) | 0;
    result = imul(result, 31) + this.svl_1.hashCode() | 0;
    return result;
  };
  protoOf(CourseGroupSetListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetListUiState ? other : THROW_CCE();
    if (!(this.pvl_1 === tmp0_other_with_cast.pvl_1))
      return false;
    if (!equals(this.qvl_1, tmp0_other_with_cast.qvl_1))
      return false;
    if (!equals(this.rvl_1, tmp0_other_with_cast.rvl_1))
      return false;
    if (!this.svl_1.equals(tmp0_other_with_cast.svl_1))
      return false;
    return true;
  };
  function CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.vvn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).aq5 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.aq5(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.wvn_1.v7j();
            var tmp_1;
            if (!this.vvn_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.xvn_1 = tmp_1;
            if (this.xvn_1 == null) {
              this.yvn_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.xvn_1.vdy(this.vvn_1.qph_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.yvn_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.yvn_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).tmw = function (it, completion) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this.vvn_1, completion);
    i.wvn_1 = it;
    return i;
  };
  function CourseTerminologyEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.aq5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.hvo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).kvo = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.kvo($completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ivo_1 = new CourseTerminology();
            var tmp_1 = this;
            tmp_1.jvo_1 = this.ivo_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.hvo_1.dpc());
            suspendResult = tmp_2.t68(450, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.jvo_1.h8m_1 = ARGUMENT;
            return this.ivo_1;
          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);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new CourseTerminologyEditViewModel$slambda$slambda_1(this.hvo_1, completion);
  };
  function CourseTerminologyEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.kvo($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$lambda(this$0) {
    return function (terminology) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ivp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ovp(VOID, terminology, VOID, toTerminologyEntries(terminology, this$0.r4x(), this$0.ipc()));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_152() {
    this.pvp_1 = 'CourseTerminologyEdit';
  }
  var Companion_instance_200;
  function Companion_getInstance_170() {
    return Companion_instance_200;
  }
  function CourseTerminologyEditViewModel$slambda(this$0, resultContinuation) {
    this.yvp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.avq_1 = Companion_instance_33.s4x();
            this.hd_1 = 1;
            var tmp_0 = CourseTerminologyEditViewModel$slambda$slambda_0(this.yvp_1, null);
            var tmp_1 = CourseTerminologyEditViewModel$slambda$slambda_2(this.yvp_1, null);
            suspendResult = this.yvp_1.spc(this.avq_1, VOID, VOID, tmp_0, tmp_1, CourseTerminologyEditViewModel$slambda$lambda(this.yvp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.yvp_1.ivp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ovp(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.yvp_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = this.yvp_1.ipc().rnd(strings_getInstance().hm3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, VOID, CourseTerminologyEditViewModel$onClickSave$ref(this.yvp_1));
                var tmp1_loadingState = Companion_getInstance_93().uov_1;
                var nextValue_0 = prevValue_0.mov(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$slambda(this.yvp_1, completion);
    i.zvp_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.jvq_1 = $commitDelay;
    this.kvq_1 = $entity;
    this.lvq_1 = $this;
    this.mvq_1 = $key;
    this.nvq_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.jvq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.kvq_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.lvq_1.opc(this.lvq_1.kpb_1, this.mvq_1, this.nvq_1, this.kvq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda(this.jvq_1, this.kvq_1, this.lvq_1, this.mvq_1, this.nvq_1, completion);
    i.ovq_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda($terminologyEntry) {
    return function (it) {
      return it.iox_1.equals($terminologyEntry.iox_1);
    };
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0($newTermList, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.j8m_1 = encodeToStringMap($newTermList, this$0.r4x());
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.xvq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.xvq_1.ivp_1.t2().lvp_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.zvq_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.xvq_1.epc().v7j().wdy(this.zvq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.xvq_1.ivp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ovp(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.xvq_1.tph(this.zvq_1);
            return Unit_instance;
          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);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this.xvq_1, completion);
    i.yvq_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseTerminologyEdit');
    this.ivp_1 = MutableStateFlow(new CourseTerminologyEditUiState());
    this.jvp_1 = asStateFlow(this.ivp_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>' call
        var tmp0_title = this.upi(strings_getInstance().jmi_1, strings_getInstance().kmi_1);
        var tmp1_loadingState = Companion_getInstance_93().tov_1;
        var nextValue = prevValue.mov(VOID, tmp1_loadingState, tmp0_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyEditViewModel).avr = function (courseTerminology) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ivp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.ovp(VOID, courseTerminology);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_33.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver = this.pph_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.bpc();
    tmp.pph_1 = launch(tmp_0, VOID, VOID, CourseTerminologyEditViewModel$onEntityChanged$slambda_0(commitDelay, courseTerminology, this, key, serializer, null));
  };
  protoOf(CourseTerminologyEditViewModel).bvr = function (terminologyEntry) {
    var tmp = this.ivp_1.t2().nvp_1;
    var newTermList = replace_0(tmp, terminologyEntry, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda(terminologyEntry));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ivp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onTerminologyTermChanged.<anonymous>' call
        var nextValue = prevValue.ovp(VOID, VOID, VOID, newTermList);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.ivp_1.t2().lvp_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      tmp_0 = shallowCopy_10(tmp0_safe_receiver, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0(newTermList, this));
    }
    this.avr(tmp_0);
  };
  protoOf(CourseTerminologyEditViewModel).mq0 = function () {
    if (!this.ivp_1.t2().mvp_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ivp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.ovp(VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList) {
    titleError = titleError === VOID ? null : titleError;
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? emptyList() : terminologyTermList;
    this.kvp_1 = titleError;
    this.lvp_1 = entity;
    this.mvp_1 = fieldsEnabled;
    this.nvp_1 = terminologyTermList;
  }
  protoOf(CourseTerminologyEditUiState).cvr = function (titleError, entity, fieldsEnabled, terminologyTermList) {
    return new CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).ovp = function (titleError, entity, fieldsEnabled, terminologyTermList, $super) {
    titleError = titleError === VOID ? this.kvp_1 : titleError;
    entity = entity === VOID ? this.lvp_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.mvp_1 : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? this.nvp_1 : terminologyTermList;
    return $super === VOID ? this.cvr(titleError, entity, fieldsEnabled, terminologyTermList) : $super.cvr.call(this, titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).toString = function () {
    return 'CourseTerminologyEditUiState(titleError=' + this.kvp_1 + ', entity=' + this.lvp_1 + ', fieldsEnabled=' + this.mvp_1 + ', terminologyTermList=' + this.nvp_1 + ')';
  };
  protoOf(CourseTerminologyEditUiState).hashCode = function () {
    var result = this.kvp_1 == null ? 0 : getStringHashCode(this.kvp_1);
    result = imul(result, 31) + (this.lvp_1 == null ? 0 : hashCode(this.lvp_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mvp_1) | 0;
    result = imul(result, 31) + hashCode(this.nvp_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyEditUiState ? other : THROW_CCE();
    if (!(this.kvp_1 == tmp0_other_with_cast.kvp_1))
      return false;
    if (!equals(this.lvp_1, tmp0_other_with_cast.lvp_1))
      return false;
    if (!(this.mvp_1 === tmp0_other_with_cast.mvp_1))
      return false;
    if (!equals(this.nvp_1, tmp0_other_with_cast.nvp_1))
      return false;
    return true;
  };
  function CourseTerminologyListViewModel$slambda$lambda() {
    return flowOf(true);
  }
  function CourseTerminologyListViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.fpk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fvr(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_153() {
    this.gvr_1 = 'CourseTerminologyList';
  }
  var Companion_instance_201;
  function Companion_getInstance_171() {
    return Companion_instance_201;
  }
  function CourseTerminologyListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().v7j().sdy();
    };
  }
  function CourseTerminologyListViewModel$slambda(this$0, resultContinuation) {
    this.pvr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyListViewModel$slambda).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;
            var tmp_0 = CourseTerminologyListViewModel$slambda$lambda;
            var tmp_1 = strings_getInstance().hmi_1;
            suspendResult = this.pvr_1.ppl(tmp_0, tmp_1, CourseTerminologyListViewModel$slambda$lambda_0(this.pvr_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseTerminologyListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyListViewModel$slambda(this.pvr_1, completion);
    i.qvr_1 = $this$launch;
    return i;
  };
  function CourseTerminologyListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseTerminologyListUiState(), 'CourseTerminologyList');
    var tmp = this;
    tmp.rvs_1 = CourseTerminologyListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.wpl(strings_getInstance().hmi_1, strings_getInstance().imi_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fpk_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.fvr(this.rvs_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, CourseTerminologyListViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyListViewModel).apl = function () {
    this.tpl('CourseTerminologyEdit');
  };
  protoOf(CourseTerminologyListViewModel).svs = function (entry) {
    this.vpl('CourseTerminologyEdit', entry.h8m_1, entry);
  };
  protoOf(CourseTerminologyListViewModel).zpk = function (searchText) {
  };
  function CourseTerminologyListUiState$_init_$lambda_k6bmuc() {
    return new EmptyPagingSource();
  }
  function CourseTerminologyListUiState(terminologyList, showAddItemInList) {
    var tmp;
    if (terminologyList === VOID) {
      tmp = CourseTerminologyListUiState$_init_$lambda_k6bmuc;
    } else {
      tmp = terminologyList;
    }
    terminologyList = tmp;
    showAddItemInList = showAddItemInList === VOID ? false : showAddItemInList;
    this.dvr_1 = terminologyList;
    this.evr_1 = showAddItemInList;
  }
  protoOf(CourseTerminologyListUiState).tvs = function (terminologyList, showAddItemInList) {
    return new CourseTerminologyListUiState(terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).fvr = function (terminologyList, showAddItemInList, $super) {
    terminologyList = terminologyList === VOID ? this.dvr_1 : terminologyList;
    showAddItemInList = showAddItemInList === VOID ? this.evr_1 : showAddItemInList;
    return $super === VOID ? this.tvs(terminologyList, showAddItemInList) : $super.tvs.call(this, terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).toString = function () {
    return 'CourseTerminologyListUiState(terminologyList=' + this.dvr_1 + ', showAddItemInList=' + this.evr_1 + ')';
  };
  protoOf(CourseTerminologyListUiState).hashCode = function () {
    var result = hashCode(this.dvr_1);
    result = imul(result, 31) + getBooleanHashCode(this.evr_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyListUiState ? other : THROW_CCE();
    if (!equals(this.dvr_1, tmp0_other_with_cast.dvr_1))
      return false;
    if (!(this.evr_1 === tmp0_other_with_cast.evr_1))
      return false;
    return true;
  };
  function get_delItemContentTypeStringResource(_this__u8e3s4) {
    var tmp;
    var tmp_0;
    var tmp_1 = _this__u8e3s4.ze7_1;
    if (tmp_1 === 7) {
      tmp_0 = _this__u8e3s4.de8_1;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = strings_getInstance().jmd_1;
    } else {
      var tmp_2 = _this__u8e3s4.ze7_1;
      if (tmp_2 === 7) {
        tmp = strings_getInstance().im4_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function _get_restoreDeletedItemUseCase__7lscig($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vvt_1;
    restoreDeletedItemUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deletePermanentlyUseCase__wdw610($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wvt_1;
    deletePermanentlyUseCase$factory_0();
    return this_0.t2();
  }
  function restoreItems($this, items) {
    var tmp = $this.bpc();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$restoreItems$slambda_0($this, items, null));
  }
  function Companion_154() {
    this.xvt_1 = 'DeletedItems';
  }
  var Companion_instance_202;
  function Companion_getInstance_172() {
    return Companion_instance_202;
  }
  function DeletedItemListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().r7l().se7(this$0.cpc(), false);
    };
  }
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation) {
    this.gvu_1 = this$0;
    this.hvu_1 = $itemsToDelete;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_deletePermanentlyUseCase__wdw610(this.gvu_1).eo5(this.hvu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gvu_1.gpc().bow(new Snack(this.gvu_1.ipc().but(plurals_getInstance().hmq_1, this.hvu_1.u())));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().v5k('Exception deleting', e);
              this.gvu_1.gpc().bow(new Snack(this.gvu_1.ipc().rnd(strings_getInstance().hlj_1) + ': ' + e.message));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).v1m = function ($this$launch, completion) {
    var i = new DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this.gvu_1, this.hvu_1, completion);
    i.ivu_1 = $this$launch;
    return i;
  };
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this$0, $itemsToDelete, resultContinuation) {
    var i = new DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeletedItemListViewModel$restoreItems$slambda(this$0, $items, resultContinuation) {
    this.rvu_1 = this$0;
    this.svu_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeletedItemListViewModel$restoreItems$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).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 = _get_restoreDeletedItemUseCase__7lscig(this.rvu_1).eo5(this.svu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rvu_1.gpc().bow(new Snack(this.rvu_1.ipc().but(plurals_getInstance().imq_1, this.svu_1.u())));
            return Unit_instance;
          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);
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).v1m = function ($this$launch, completion) {
    var i = new DeletedItemListViewModel$restoreItems$slambda(this.rvu_1, this.svu_1, completion);
    i.tvu_1 = $this$launch;
    return i;
  };
  function DeletedItemListViewModel$restoreItems$slambda_0(this$0, $items, resultContinuation) {
    var i = new DeletedItemListViewModel$restoreItems$slambda(this$0, $items, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeletedItemListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new DeletedItemListUiState(), 'DeletedItems');
    var tmp = this;
    tmp.uvt_1 = DeletedItemListViewModel$pagingSourceFactory$lambda(this);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.vvt_1 = Instance(this_0, tmp$ret$0, null).f5j(this, restoreDeletedItemUseCase$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.wvt_1 = Instance(this_1, tmp$ret$2, null).f5j(this, deletePermanentlyUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.fpk_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue = prevValue.yvu(this.uvt_1);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.opb_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().imn_1));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(DeletedItemListViewModel).zpk = function (searchText) {
  };
  protoOf(DeletedItemListViewModel).zvu = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onDismissConfirmDialog.<anonymous>' call
        var nextValue = prevValue.yvu(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).avv = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onConfirmDeletePermanently.<anonymous>' call
        var nextValue = prevValue.yvu(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var itemsToDelete = tmp$ret$1.xvu_1;
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this, itemsToDelete, null));
  };
  protoOf(DeletedItemListViewModel).bvv = function (item) {
    restoreItems(this, listOf_0(item));
  };
  protoOf(DeletedItemListViewModel).cvv = function (item) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onClickDeletePermanently.<anonymous>' call
        var tmp0_itemsToConfirmDeletion = listOf_0(item);
        var tmp1_deleteConfirmText = this.ipc().but(plurals_getInstance().jmq_1, 1);
        var nextValue = prevValue.yvu(VOID, true, tmp1_deleteConfirmText, tmp0_itemsToConfirmDeletion);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).apl = function () {
  };
  function DeletedItemListUiState$_init_$lambda_114460() {
    return new EmptyPagingSource();
  }
  function DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    var tmp;
    if (deletedItemsList === VOID) {
      tmp = DeletedItemListUiState$_init_$lambda_114460;
    } else {
      tmp = deletedItemsList;
    }
    deletedItemsList = tmp;
    confirmDialogVisible = confirmDialogVisible === VOID ? false : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? null : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? emptyList() : itemsToConfirmDeletion;
    this.uvu_1 = deletedItemsList;
    this.vvu_1 = confirmDialogVisible;
    this.wvu_1 = deleteConfirmText;
    this.xvu_1 = itemsToConfirmDeletion;
  }
  protoOf(DeletedItemListUiState).dvv = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    return new DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).yvu = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion, $super) {
    deletedItemsList = deletedItemsList === VOID ? this.uvu_1 : deletedItemsList;
    confirmDialogVisible = confirmDialogVisible === VOID ? this.vvu_1 : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? this.wvu_1 : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? this.xvu_1 : itemsToConfirmDeletion;
    return $super === VOID ? this.dvv(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) : $super.dvv.call(this, deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).toString = function () {
    return 'DeletedItemListUiState(deletedItemsList=' + this.uvu_1 + ', confirmDialogVisible=' + this.vvu_1 + ', deleteConfirmText=' + this.wvu_1 + ', itemsToConfirmDeletion=' + this.xvu_1 + ')';
  };
  protoOf(DeletedItemListUiState).hashCode = function () {
    var result = hashCode(this.uvu_1);
    result = imul(result, 31) + getBooleanHashCode(this.vvu_1) | 0;
    result = imul(result, 31) + (this.wvu_1 == null ? 0 : getStringHashCode(this.wvu_1)) | 0;
    result = imul(result, 31) + hashCode(this.xvu_1) | 0;
    return result;
  };
  protoOf(DeletedItemListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DeletedItemListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof DeletedItemListUiState ? other : THROW_CCE();
    if (!equals(this.uvu_1, tmp0_other_with_cast.uvu_1))
      return false;
    if (!(this.vvu_1 === tmp0_other_with_cast.vvu_1))
      return false;
    if (!(this.wvu_1 == tmp0_other_with_cast.wvu_1))
      return false;
    if (!equals(this.xvu_1, tmp0_other_with_cast.xvu_1))
      return false;
    return true;
  };
  function restoreDeletedItemUseCase$factory() {
    return getPropertyCallableRef('restoreDeletedItemUseCase', 1, KProperty1, function (receiver) {
      return _get_restoreDeletedItemUseCase__7lscig(receiver);
    }, null);
  }
  function deletePermanentlyUseCase$factory() {
    return getPropertyCallableRef('deletePermanentlyUseCase', 1, KProperty1, function (receiver) {
      return _get_deletePermanentlyUseCase__wdw610(receiver);
    }, null);
  }
  function restoreDeletedItemUseCase$factory_0() {
    return getPropertyCallableRef('restoreDeletedItemUseCase', 1, KProperty1, function (receiver) {
      return _get_restoreDeletedItemUseCase__7lscig(receiver);
    }, null);
  }
  function deletePermanentlyUseCase$factory_0() {
    return getPropertyCallableRef('deletePermanentlyUseCase', 1, KProperty1, function (receiver) {
      return _get_deletePermanentlyUseCase__wdw610(receiver);
    }, null);
  }
  function CourseDiscussionDetailViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.apl();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.pvw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).ov5 = function (it, $completion) {
    var tmp = this.pv5(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ov5((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.pvw_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.wvw(this.qvw_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).pv5 = function (it, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this.pvw_1, completion);
    i.qvw_1 = it;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ov5(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.fvx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).wrl = function (permissionPair, $completion) {
    var tmp = this.xrl(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wrl(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hvx_1 = this.gvx_1;
            this.ivx_1 = this.hvx_1.y6();
            this.jvx_1 = this.hvx_1.z6();
            if (this.ivx_1) {
              l$ret$1: do {
                var this_0 = this.fvx_1.opb_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_0 = this.fvx_1.ipc().rnd(strings_getInstance().xmj_1);
                  var tmp_1 = FabIcon_ADD_getInstance();
                  var nextValue = prevValue.mov(new FabUiState(true, tmp_0, tmp_1, CourseDiscussionDetailViewModel$onClickAdd$ref(this.fvx_1)));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              l$ret$3: do {
                var this_1 = this.fvx_1.fpk_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.wvw(VOID, this.fvx_1.gvw_1, this.jvx_1, VOID, this.fvx_1.ipc().hou());
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 1;
              var tmp_2 = this.fvx_1.epc().u7j().vcc(this.fvx_1.evw_1);
              var tmp_3 = CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this.fvx_1, null);
              suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_27(tmp_3), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$5: do {
                var this_2 = this.fvx_1.opb_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.mov(new FabUiState());
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              l$ret$7: do {
                var this_3 = this.fvx_1.fpk_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.wvw(null, CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda, false);
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).xrl = function (permissionPair, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this.fvx_1, completion);
    i.gvx_1 = permissionPair;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.wrl(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation) {
    this.svx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).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;
            var tmp_0 = this.svx_1.epc().t7l();
            var tmp_1 = this.svx_1.cpc();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.vdb(tmp_1, this.svx_1.fvw_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this.svx_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new CourseDiscussionDetailViewModel$slambda$slambda(this.svx_1, completion);
  };
  function CourseDiscussionDetailViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_155() {
    this.tvx_1 = 'CourseDiscussion';
  }
  var Companion_instance_203;
  function Companion_getInstance_173() {
    return Companion_instance_203;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_27(function_0) {
    this.uvx_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_27).t1d = function (value, $completion) {
    return this.uvx_1(value, $completion);
  };
  function CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().m7l().jed(this$0.evw_1, false);
    };
  }
  function CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation) {
    this.dvy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).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 = whenSubscribed(this.dvy_1.fpk_1, CourseDiscussionDetailViewModel$slambda$slambda_0(this.dvy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda(this.dvy_1, completion);
    i.evy_1 = $this$launch;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.courediscussiondetail.CourseDiscussionDetailViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.nvy_1 = this$0;
    this.ovy_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).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.nvy_1.epc().m7l().ned(this.ovy_1.cee_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nvy_1.gpc().bow(new Snack(this.nvy_1.ipc().rnd(strings_getInstance().alk_1)));
            return Unit_instance;
          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);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this.nvy_1, this.ovy_1, completion);
    i.pvy_1 = $this$launch;
    return i;
  };
  function CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseDiscussionDetailUiState(), 'CourseDiscussion');
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.evw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.fvw_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.gvw_1 = CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this);
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, CourseDiscussionDetailViewModel$slambda_0(this, null));
    launchSetTitleFromClazzUid(this, this.fvw_1, CourseDiscussionDetailViewModel$lambda(this));
  }
  protoOf(CourseDiscussionDetailViewModel).zpk = function (searchText) {
  };
  protoOf(CourseDiscussionDetailViewModel).apl = function () {
    Companion_getInstance_120();
    var tmp = to('courseBlockUid', this.evw_1.toString());
    Companion_getInstance_120();
    this.spl('DiscussionPostEdit', mapOf([tmp, to('clazzUid', this.fvw_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).qvy = function (post) {
    Companion_getInstance_110();
    var tmp = to('entityUid', post.cee_1.toString());
    Companion_getInstance_120();
    this.mpb_1.fo0('CourseDiscussionPost', mapOf([tmp, to('clazzUid', this.fvw_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).rvy = function (post) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function CourseDiscussionDetailUiState$_init_$lambda_ogyezm() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    var tmp;
    if (posts === VOID) {
      tmp = CourseDiscussionDetailUiState$_init_$lambda_ogyezm;
    } else {
      tmp = posts;
    }
    posts = tmp;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.rvw_1 = courseBlock;
    this.svw_1 = posts;
    this.tvw_1 = showModerateOptions;
    this.uvw_1 = localDateTimeNow;
    this.vvw_1 = dayOfWeekStrings;
  }
  protoOf(CourseDiscussionDetailUiState).svy = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).wvw = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    courseBlock = courseBlock === VOID ? this.rvw_1 : courseBlock;
    posts = posts === VOID ? this.svw_1 : posts;
    showModerateOptions = showModerateOptions === VOID ? this.tvw_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.uvw_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.vvw_1 : dayOfWeekStrings;
    return $super === VOID ? this.svy(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.svy.call(this, courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).toString = function () {
    return 'CourseDiscussionDetailUiState(courseBlock=' + this.rvw_1 + ', posts=' + this.svw_1 + ', showModerateOptions=' + this.tvw_1 + ', localDateTimeNow=' + this.uvw_1 + ', dayOfWeekStrings=' + this.vvw_1 + ')';
  };
  protoOf(CourseDiscussionDetailUiState).hashCode = function () {
    var result = this.rvw_1 == null ? 0 : this.rvw_1.hashCode();
    result = imul(result, 31) + hashCode(this.svw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tvw_1) | 0;
    result = imul(result, 31) + this.uvw_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.vvw_1) | 0;
    return result;
  };
  protoOf(CourseDiscussionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseDiscussionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseDiscussionDetailUiState ? other : THROW_CCE();
    if (!equals(this.rvw_1, tmp0_other_with_cast.rvw_1))
      return false;
    if (!equals(this.svw_1, tmp0_other_with_cast.svw_1))
      return false;
    if (!(this.tvw_1 === tmp0_other_with_cast.tvw_1))
      return false;
    if (!this.uvw_1.equals(tmp0_other_with_cast.uvw_1))
      return false;
    if (!equals(this.vvw_1, tmp0_other_with_cast.vvw_1))
      return false;
    return true;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.bvz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).ioz = function (result, $completion) {
    var tmp = this.joz(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.cvz_1.poy_1;
            var tmp0_elvis_lhs = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.dvz_1 = tmp_2;
            this.hd_1 = 1;
            suspendResult = submitReply(this.bvz_1, this.dvz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).joz = function (result, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.bvz_1, completion);
    i.cvz_1 = result;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.ioz(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.mvz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).dq3 = function (postTitle, $completion) {
    var tmp = this.eq3(postTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.dq3((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.mvz_1.opb_1;
          var tmp_0;
          if (!(this_0.t2().zou_1 == this.nvz_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.t2();
                var nextValue = prevValue.mov(VOID, VOID, this.nvz_1);
                if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).eq3 = function (postTitle, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.mvz_1, completion);
    i.nvz_1 = postTitle;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (postTitle, $completion) {
      return i.dq3(postTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wvz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).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;
            var tmp_0 = this.wvz_1.mpc(this.wvz_1.hpc(), 'replyTextResult');
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.wvz_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_28(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this.wvz_1, completion);
    i.xvz_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.gw0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).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;
            var tmp_0 = this.gw0_1.epc().m7l().u8i(this.gw0_1.epb_1);
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.gw0_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_28(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this.gw0_1, completion);
    i.hw0_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.qw0_1 = this$0;
    this.rw0_1 = $savedStateHandle;
    this.sw0_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).wrl = function (permissionPair, $completion) {
    var tmp = this.xrl(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wrl(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.tw0_1;
          var hasViewPermission = tmp0_container.y6();
          var hasModeratePermission = tmp0_container.z6();
          if (hasViewPermission) {
            l$ret$1: do {
              var this_0 = this.qw0_1.rw1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0 = this.qw0_1.cpc();
                var tmp_1 = this.qw0_1.apc().rn4().xmr_1.qjt();
                var tmp0_safe_receiver = this.qw0_1.apc().rn4().zmr_1;
                var nextValue = prevValue.fw2(this.qw0_1.qw1_1, tmp_0, tmp_1, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y9c_1, VOID, hasModeratePermission);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp1_elvis_lhs = this.rw0_1.ba('replyText');
            this.qw0_1.tw1_1.x1k(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            launch(this.sw0_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this.qw0_1, null));
            launch(this.sw0_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this.qw0_1, null));
          } else {
            l$ret$3: do {
              var this_1 = this.qw0_1.rw1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda;
                var tmp_3 = this.qw0_1.cpc();
                var tmp_4 = this.qw0_1.apc().rn4().xmr_1.qjt();
                var tmp0_safe_receiver_0 = this.qw0_1.apc().rn4().zmr_1;
                var nextValue_0 = prevValue_0.fw2(tmp_2, tmp_3, tmp_4, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.y9c_1, VOID, false);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp2_elvis_lhs = this.rw0_1.ba('replyText');
            this.qw0_1.tw1_1.x1k(tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).xrl = function (permissionPair, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this.qw0_1, this.rw0_1, this.sw0_1, completion);
    i.tw0_1 = permissionPair;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.wrl(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.ow2_1 = this$0;
    this.pw2_1 = $savedStateHandle;
    this.qw2_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).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;
            var tmp_0 = this.ow2_1.epc().t7l();
            var tmp_1 = this.ow2_1.cpc();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.vdb(tmp_1, this.ow2_1.ww1_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this.ow2_1, this.pw2_1, this.qw2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new DiscussionPostDetailViewModel$slambda$slambda(this.ow2_1, this.pw2_1, this.qw2_1, completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function submitReply($this, replyText, $completion) {
    var tmp = new $submitReplyCOROUTINE$66($this, replyText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_156() {
    this.hw3_1 = 'replyTextResult';
    this.iw3_1 = 'replyText';
    this.jw3_1 = 'CourseDiscussionPost';
  }
  var Companion_instance_204;
  function Companion_getInstance_174() {
    return Companion_instance_204;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_28(function_0) {
    this.kw3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_28).t1d = function (value, $completion) {
    return this.kw3_1(value, $completion);
  };
  function DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().m7l().led(this$0.epb_1, false);
    };
  }
  function DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.tw3_1 = this$0;
    this.uw3_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).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 = whenSubscribed(this.tw3_1.rw1_1, DiscussionPostDetailViewModel$slambda$slambda_0(this.tw3_1, this.uw3_1, this.vw3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda(this.tw3_1, this.uw3_1, completion);
    i.vw3_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation) {
    this.ew4_1 = this$0;
    this.fw4_1 = $replyText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).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 = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ew4_1.kpb_1.qp7('replyText', this.fw4_1);
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this.ew4_1, this.fw4_1, completion);
    i.gw4_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this$0, $replyText, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation) {
    this.pw4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).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 = submitReply(this.pw4_1, this.pw4_1.tw1_1.t2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this.pw4_1, completion);
    i.qw4_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    this.zw4_1 = this$0;
    this.aw5_1 = $replyText;
    this.bw5_1 = $clazzAndBlockUids;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).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;
            var tmp_0 = this.zw4_1.epc().m7l();
            var this_0 = new DiscussionPost();
            this_0.gee_1 = systemTimeInMillis();
            this_0.dee_1 = this.zw4_1.epb_1;
            this_0.fee_1 = this.aw5_1;
            this_0.jee_1 = this.zw4_1.cpc();
            this_0.kee_1 = this.bw5_1.hcg_1;
            this_0.hee_1 = this.bw5_1.icg_1;
            suspendResult = tmp_0.insertAsync(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zw4_1.dw5('');
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).tmw = function (it, completion) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this.zw4_1, this.aw5_1, this.bw5_1, completion);
    i.cw5_1 = it;
    return i;
  };
  function DiscussionPostDetailViewModel$submitReply$slambda_0(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.mw5_1 = this$0;
    this.nw5_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).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.mw5_1.epc().m7l().ned(this.nw5_1.cee_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.mw5_1.gpc().bow(new Snack(this.mw5_1.ipc().rnd(strings_getInstance().alk_1)));
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this.mw5_1, this.nw5_1, completion);
    i.ow5_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $submitReplyCOROUTINE$66(_this__u8e3s4, replyText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zw2_1 = _this__u8e3s4;
    this.aw3_1 = replyText;
  }
  protoOf($submitReplyCOROUTINE$66).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            l$ret$1: do {
              var this_0 = this.zw2_1.rw1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.fw2(VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.zw2_1.kpc(Companion_getInstance_93().tov_1);
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 10;
            this.hd_1 = 3;
            suspendResult = this.zw2_1.dpc().u7j().acd(this.zw2_1.epb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.dw3_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.ew3_1 = this.dw3_1;
            if ((!(this.ew3_1 == null) ? !this.ew3_1.hcg_1.equals(new Long(0, 0)) : false) ? !this.ew3_1.icg_1.equals(new Long(0, 0)) : false) {
              this.fw3_1 = this.ew3_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.zw2_1.epc().u7j().acd(this.zw2_1.epb_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.fw3_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.gw3_1 = this.fw3_1;
            if ((this.gw3_1 == null ? true : this.gw3_1.icg_1.equals(new Long(0, 0))) ? true : this.gw3_1.hcg_1.equals(new Long(0, 0))) {
              this.zw2_1.gpc().bow(new Snack(this.zw2_1.ipc().rnd(strings_getInstance().hlj_1)));
              this.cw3_1 = Unit_instance;
              this.id_1 = 11;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.zw2_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_1, VOID, DiscussionPostDetailViewModel$submitReply$slambda_0(this.zw2_1, this.aw3_1, this.gw3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.bw3_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 8:
            this.id_1 = 11;
            this.zw2_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$9: do {
              var this_1 = this.zw2_1.rw1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.fw2(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 9:
            this.id_1 = 11;
            this.zw2_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$11: do {
              var this_2 = this.zw2_1.rw1_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.fw2(VOID, VOID, VOID, VOID, true);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.zw2_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$7: do {
              var this_3 = this.zw2_1.rw1_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.fw2(VOID, VOID, VOID, VOID, true);
                if (this_3.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function DiscussionPostDetailViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'CourseDiscussionPost' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    tmp.qw1_1 = DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this);
    this.rw1_1 = MutableStateFlow(new DiscussionPostDetailUiState2());
    this.sw1_1 = asStateFlow(this.rw1_1);
    this.tw1_1 = MutableStateFlow('');
    this.uw1_1 = asStateFlow(this.tw1_1);
    this.vw1_1 = null;
    var tmp_0 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.ww1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this.bpc();
    launch(tmp_1, VOID, VOID, DiscussionPostDetailViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(DiscussionPostDetailViewModel).dw5 = function (replyText) {
    this.tw1_1.x1k(replyText);
    var tmp0_safe_receiver = this.vw1_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.bpc();
    tmp.vw1_1 = launch(tmp_0, VOID, VOID, DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this, replyText, null));
  };
  protoOf(DiscussionPostDetailViewModel).pw5 = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this, null));
  };
  protoOf(DiscussionPostDetailViewModel).rvy = function (post) {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function DiscussionPostDetailUiState2$_init_$lambda_c4cn31() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (discussionPosts === VOID) {
      tmp = DiscussionPostDetailUiState2$_init_$lambda_c4cn31;
    } else {
      tmp = discussionPosts;
    }
    discussionPosts = tmp;
    loggedInPersonUid = loggedInPersonUid === VOID ? new Long(0, 0) : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? '' : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? null : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.xw1_1 = discussionPosts;
    this.yw1_1 = loggedInPersonUid;
    this.zw1_1 = loggedInPersonName;
    this.aw2_1 = loggedInPersonPictureUri;
    this.bw2_1 = fieldsEnabled;
    this.cw2_1 = showModerateOptions;
    this.dw2_1 = localDateTimeNow;
    this.ew2_1 = dayOfWeekStrings;
  }
  protoOf(DiscussionPostDetailUiState2).qw5 = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).fw2 = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    discussionPosts = discussionPosts === VOID ? this.xw1_1 : discussionPosts;
    loggedInPersonUid = loggedInPersonUid === VOID ? this.yw1_1 : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? this.zw1_1 : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? this.aw2_1 : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? this.bw2_1 : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? this.cw2_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.dw2_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.ew2_1 : dayOfWeekStrings;
    return $super === VOID ? this.qw5(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.qw5.call(this, discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).toString = function () {
    return 'DiscussionPostDetailUiState2(discussionPosts=' + this.xw1_1 + ', loggedInPersonUid=' + this.yw1_1.toString() + ', loggedInPersonName=' + this.zw1_1 + ', loggedInPersonPictureUri=' + this.aw2_1 + ', fieldsEnabled=' + this.bw2_1 + ', showModerateOptions=' + this.cw2_1 + ', localDateTimeNow=' + this.dw2_1 + ', dayOfWeekStrings=' + this.ew2_1 + ')';
  };
  protoOf(DiscussionPostDetailUiState2).hashCode = function () {
    var result = hashCode(this.xw1_1);
    result = imul(result, 31) + this.yw1_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.zw1_1) | 0;
    result = imul(result, 31) + (this.aw2_1 == null ? 0 : getStringHashCode(this.aw2_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bw2_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cw2_1) | 0;
    result = imul(result, 31) + this.dw2_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.ew2_1) | 0;
    return result;
  };
  protoOf(DiscussionPostDetailUiState2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostDetailUiState2))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostDetailUiState2 ? other : THROW_CCE();
    if (!equals(this.xw1_1, tmp0_other_with_cast.xw1_1))
      return false;
    if (!this.yw1_1.equals(tmp0_other_with_cast.yw1_1))
      return false;
    if (!(this.zw1_1 === tmp0_other_with_cast.zw1_1))
      return false;
    if (!(this.aw2_1 == tmp0_other_with_cast.aw2_1))
      return false;
    if (!(this.bw2_1 === tmp0_other_with_cast.bw2_1))
      return false;
    if (!(this.cw2_1 === tmp0_other_with_cast.cw2_1))
      return false;
    if (!this.dw2_1.equals(tmp0_other_with_cast.dw2_1))
      return false;
    if (!equals(this.ew2_1, tmp0_other_with_cast.ew2_1))
      return false;
    return true;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.zw5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).dw6 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dw6(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.aw6_1.m7l();
            var tmp_1;
            if (!this.zw5_1.qph_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.bw6_1 = tmp_1;
            if (this.bw6_1 == null) {
              this.cw6_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.bw6_1.ked(this.zw5_1.qph_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.cw6_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.cw6_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).tmw = function (it, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this.zw5_1, completion);
    i.aw6_1 = it;
    return i;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.dw6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.mw6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).pw6 = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).r7e = function ($completion) {
    return this.pw6($completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.nw6_1 = new DiscussionPost();
            var tmp_1 = this;
            tmp_1.ow6_1 = this.nw6_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.mw6_1.dpc());
            suspendResult = tmp_2.t68(132, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.ow6_1.cee_1 = ARGUMENT;
            this.ow6_1.hee_1 = _get_courseBlockUidArg__1bqljt(this.mw6_1);
            this.ow6_1.jee_1 = this.mw6_1.apc().in5().zk0_1;
            this.ow6_1.gee_1 = systemTimeInMillis();
            return this.nw6_1;
          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);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).q7e = function (completion) {
    return new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this.mw6_1, completion);
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.pw6($completion);
    };
    l.$arity = 0;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nw7_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.tw7(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.cw8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda).ew8 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.ew8((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).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;
            var tmp_0 = Companion_instance_44.s4x();
            var tmp_1 = DiscussionPostEditViewModel$slambda$slambda$slambda_0(this.cw8_1, null);
            var tmp_2 = DiscussionPostEditViewModel$slambda$slambda$slambda_2(this.cw8_1, null);
            suspendResult = this.cw8_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, DiscussionPostEditViewModel$slambda$slambda$lambda(this.cw8_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this.cw8_1, completion);
    i.dw8_1 = $this$async;
    return i;
  };
  function DiscussionPostEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.ew8($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation) {
    this.nw8_1 = this$0;
    this.ow8_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).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.nw8_1.epc().m7l().med(this.ow8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this.nw8_1, this.ow8_1, completion);
    i.pw8_1 = it;
    return i;
  };
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_discussionPostUid__impog9($this) {
    Companion_getInstance_110();
    var tmp0_safe_receiver = $this.kpb_1.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_courseBlockUidArg__1bqljt($this) {
    Companion_getInstance_120();
    var tmp0_safe_receiver = $this.kpb_1.ba('courseBlockUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function Companion_157() {
    this.qw8_1 = 'DiscussionPostEdit';
  }
  var Companion_instance_205;
  function Companion_getInstance_175() {
    return Companion_instance_205;
  }
  function DiscussionPostEditViewModel$slambda(this$0, resultContinuation) {
    this.zw8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda).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 = awaitAll([async(this.aw9_1, VOID, VOID, DiscussionPostEditViewModel$slambda$slambda_0(this.zw8_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.zw8_1.nw7_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.tw7(VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.zw8_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_0 = this.zw8_1.ipc().rnd(strings_getInstance().xmj_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$ref(this.zw8_1));
                var tmp1_loadingState = Companion_getInstance_93().uov_1;
                var nextValue_0 = prevValue_0.mov(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$slambda(this.zw8_1, completion);
    i.aw9_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.jw9_1 = $commitDelay;
    this.kw9_1 = $entity;
    this.lw9_1 = $this;
    this.mw9_1 = $key;
    this.nw9_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.jw9_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.kw9_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.lw9_1.opc(this.lw9_1.kpb_1, this.mw9_1, this.nw9_1, this.kw9_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda(this.jw9_1, this.kw9_1, this.lw9_1, this.mw9_1, this.nw9_1, completion);
    i.ow9_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation) {
    this.xw9_1 = this$0;
    this.yw9_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.xw9_1.nw7_1.t2().rw7_1 == null ? this.xw9_1.nw7_1.t2().sw7_1 == null : false) {
              this.hd_1 = 1;
              suspendResult = this.xw9_1.dpc().u7j().bcd(this.yw9_1.hee_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 1:
            this.awa_1 = suspendResult;
            this.yw9_1.kee_1 = this.awa_1;
            if (this.yw9_1.kee_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = this.xw9_1.epc().u7j().bcd(this.yw9_1.hee_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.bwa_1 = suspendResult;
            this.yw9_1.kee_1 = this.bwa_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_0 = this.xw9_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this.xw9_1, this.yw9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_1 = this.yw9_1.cee_1;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_120();
            this.xw9_1.vpc(this_0, 'clazzUid');
            this.xw9_1.rph('CourseDiscussionPost', tmp_1, this.yw9_1, this_0.f3());
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          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);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this.xw9_1, this.yw9_1, completion);
    i.zw9_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$onClickSave$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'DiscussionPostEdit' : destinationName;
    UstadEditViewModel.call(this, di, savedStateHandle, destinationName);
    this.nw7_1 = MutableStateFlow(new DiscussionPostEditUiState());
    this.ow7_1 = asStateFlow(this.nw7_1);
    this.kpc(Companion_getInstance_93().tov_1);
    var title = _get_discussionPostUid__impog9(this).equals(new Long(0, 0)) ? this.ipc().rnd(strings_getInstance().wml_1) : this.ipc().rnd(strings_getInstance().tlv_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, DiscussionPostEditViewModel$slambda_0(this, null));
  }
  protoOf(DiscussionPostEditViewModel).cwa = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nw7_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.pw7_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eee_1;
        var tmp_0 = this.vpi(tmp, entity == null ? null : entity.eee_1, prevValue.rw7_1);
        var tmp2_safe_receiver = prevValue.pw7_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.fee_1;
        var nextValue = prevValue.tw7(entity, VOID, tmp_0, this.vpi(tmp_1, entity == null ? null : entity.fee_1, prevValue.sw7_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_44.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.bpc();
    tmp_2.pph_1 = launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(DiscussionPostEditViewModel).mq0 = function () {
    var tmp0_elvis_lhs = this.nw7_1.t2().pw7_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var post = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nw7_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = post.eee_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = this.ipc().rnd(strings_getInstance().ilo_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = post.fee_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_2 = this.ipc().rnd(strings_getInstance().ilo_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.tw7(VOID, VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.bpc();
    launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onClickSave$slambda_0(this, post, null));
  };
  function DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    discussionPost = discussionPost === VOID ? null : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? null : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? null : discussionPostDescError;
    this.pw7_1 = discussionPost;
    this.qw7_1 = fieldsEnabled;
    this.rw7_1 = discussionPostTitleError;
    this.sw7_1 = discussionPostDescError;
  }
  protoOf(DiscussionPostEditUiState).dwa = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    return new DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).tw7 = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError, $super) {
    discussionPost = discussionPost === VOID ? this.pw7_1 : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? this.qw7_1 : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? this.rw7_1 : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? this.sw7_1 : discussionPostDescError;
    return $super === VOID ? this.dwa(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) : $super.dwa.call(this, discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).toString = function () {
    return 'DiscussionPostEditUiState(discussionPost=' + this.pw7_1 + ', fieldsEnabled=' + this.qw7_1 + ', discussionPostTitleError=' + this.rw7_1 + ', discussionPostDescError=' + this.sw7_1 + ')';
  };
  protoOf(DiscussionPostEditUiState).hashCode = function () {
    var result = this.pw7_1 == null ? 0 : hashCode(this.pw7_1);
    result = imul(result, 31) + getBooleanHashCode(this.qw7_1) | 0;
    result = imul(result, 31) + (this.rw7_1 == null ? 0 : getStringHashCode(this.rw7_1)) | 0;
    result = imul(result, 31) + (this.sw7_1 == null ? 0 : getStringHashCode(this.sw7_1)) | 0;
    return result;
  };
  protoOf(DiscussionPostEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostEditUiState ? other : THROW_CCE();
    if (!equals(this.pw7_1, tmp0_other_with_cast.pw7_1))
      return false;
    if (!(this.qw7_1 === tmp0_other_with_cast.qw7_1))
      return false;
    if (!(this.rw7_1 == tmp0_other_with_cast.rw7_1))
      return false;
    if (!(this.sw7_1 == tmp0_other_with_cast.sw7_1))
      return false;
    return true;
  };
  function invoke$urlToLoad(_this__u8e3s4, cevOpenUri, manifest, this$0, cevManifestUrlObj) {
    var prefix = substringBeforeLast(cevOpenUri, '/', '');
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(prefix) > 0) {
      tmp = prefix + '/' + _this__u8e3s4.cn9_1;
    } else {
      tmp = _this__u8e3s4.cn9_1;
    }
    var pathInManifest = tmp;
    return invoke$urlToLoad_0(requireEntryByUri(manifest, pathInManifest), this$0, cevManifestUrlObj);
  }
  function EpubContentViewModel$slambda$slambda$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.iwb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.wwb(VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    this.fwc_1 = this$0;
    this.gwc_1 = $cevOpenUri;
    this.hwc_1 = $manifest;
    this.iwc_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda$slambda).swc = function (it, $completion) {
    var tmp = this.twc(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.swc(p1 instanceof Item ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.kwc_1 = _get_httpClient__2ty1zc_3(this.fwc_1);
            var tmp_1 = this;
            tmp_1.lwc_1 = invoke$urlToLoad(this.jwc_1, this.gwc_1, this.hwc_1, this.fwc_1, this.iwc_1);
            var tmp_2 = this;
            tmp_2.mwc_1 = this.kwc_1;
            var tmp_3 = this;
            tmp_3.nwc_1 = this.mwc_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.lwc_1);
            tmp_4.owc_1 = this_0;
            this.owc_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_5 = this;
            tmp_5.pwc_1 = this.nwc_1;
            var tmp_6 = this;
            tmp_6.qwc_1 = this.owc_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.qwc_1, this.pwc_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rwc_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.rwc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).twc = function (it, completion) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this.fwc_1, this.gwc_1, this.hwc_1, this.iwc_1, completion);
    i.jwc_1 = it;
    return i;
  };
  function EpubContentViewModel$slambda$slambda$slambda_0(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation);
    var l = function (it, $completion) {
      return i.swc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$urlToLoad_0(_this__u8e3s4, this$0, cevManifestUrlObj) {
    var tmp;
    if (this$0.ewb_1) {
      tmp = _this__u8e3s4.gnb_1;
    } else {
      tmp = cevManifestUrlObj.bnw(_this__u8e3s4.yna_1).toString();
    }
    return tmp;
  }
  function EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    this.cwd_1 = $manifest;
    this.dwd_1 = $cevOpenUri;
    this.ewd_1 = this$0;
    this.fwd_1 = $opfBaseUrl;
    this.gwd_1 = $argTocString;
    this.hwd_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda).u1m = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.id_1 = 4;
            this.jwd_1 = requireEntryByUri(this.cwd_1, this.dwd_1);
            var tmp_0 = this;
            tmp_0.kwd_1 = _get_httpClient__2ty1zc_3(this.ewd_1);
            var tmp_1 = this;
            tmp_1.lwd_1 = invoke$urlToLoad_0(this.jwd_1, this.ewd_1, this.hwd_1);
            var tmp_2 = this;
            tmp_2.mwd_1 = this.kwd_1;
            var tmp_3 = this;
            tmp_3.nwd_1 = this.mwd_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.lwd_1);
            tmp_4.owd_1 = this_0;
            this.owd_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_5 = this;
            tmp_5.pwd_1 = this.nwd_1;
            var tmp_6 = this;
            tmp_6.qwd_1 = this.owd_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.qwd_1, this.pwd_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rwd_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.rwd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.swd_1 = suspendResult;
            this.twd_1 = _get_xml__e6jxp6(this.ewd_1).x4b(Companion_instance_74.s4x(), this.swd_1);
            var tmp_7 = this;
            var this_1 = this.twd_1.gna_1.ln9_1;
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
            var destination = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator = this_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              destination.s(element.bn9_1, element);
            }

            tmp_7.uwd_1 = destination;
            var tmp_8 = this;
            var this_2 = this.twd_1.hna_1.kna_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_2.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = this.uwd_1.q(element_0.hn9_1);
              var tmp_9;
              if (tmp0_safe_receiver == null) {
                tmp_9 = null;
              } else {
                tmp_9 = this.fwd_1.bnw(tmp0_safe_receiver.cn9_1);
              }
              var tmp1_safe_receiver = tmp_9;
              var tmp0_safe_receiver_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_8.vwd_1 = destination_0;
            var tmp_10 = this;
            var tmp0_safe_receiver_1 = this.twd_1.ina();
            var tmp_11;
            if (tmp0_safe_receiver_1 == null) {
              tmp_11 = null;
            } else {
              tmp_11 = this.fwd_1.bnw(tmp0_safe_receiver_1.cn9_1);
            }

            var tmp1_safe_receiver_0 = tmp_11;
            tmp_10.wwd_1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.toString();
            l$ret$1: do {
              var this_3 = this.ewd_1.iwb_1;
              while (true) {
                var prevValue = this_3.t2();
                var tmp0_safe_receiver_2 = firstOrNull(this.twd_1.fna_1.vn9_1);
                var nextValue = prevValue.wwb(VOID, this.vwd_1, VOID, VOID, VOID, this.wwd_1, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.un8_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_4 = this.ewd_1.opb_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp0_safe_receiver_3 = firstOrNull(this.twd_1.fna_1.tn9_1);
                var tmp1_elvis_lhs = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.yn8_1;
                var tmp_12 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
                var tmp2_elvis_lhs = this.gwd_1;
                var tmp_13 = tmp2_elvis_lhs == null ? this.ewd_1.ipc().rnd(strings_getInstance().fmm_1) : tmp2_elvis_lhs;
                var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, VOID, listOf_0(new OverflowItem(tmp_13, EpubContentViewModel$slambda$slambda$lambda(this.ewd_1))));
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp_14 = this.ewd_1;
            var tmp2_safe_receiver = this.twd_1.jna();
            var tmp_15;
            if (tmp2_safe_receiver == null) {
              tmp_15 = null;
            } else {
              tmp_15 = this.fwd_1.bnw(tmp2_safe_receiver.cn9_1).toString();
            }

            tmp_14.nwb_1 = tmp_15;
            this.hd_1 = 3;
            suspendResult = this.ewd_1.dwb_1.uo6(this.twd_1, EpubContentViewModel$slambda$slambda$slambda_0(this.ewd_1, this.dwd_1, this.cwd_1, this.hwd_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_elvis_lhs = suspendResult;
            var tocItems = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            l$ret$5: do {
              var this_5 = this.ewd_1.iwb_1;
              while (true) {
                var prevValue_1 = this_5.t2();
                var nextValue_1 = prevValue_1.wwb(VOID, VOID, tocItems);
                if (this_5.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 4:
            this.id_1 = 5;
            var tmp_16 = this.kd_1;
            if (tmp_16 instanceof Error) {
              var e = this.kd_1;
              printStackTrace(e);
              this.hd_1 = 6;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 5) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new EpubContentViewModel$slambda$slambda(this.cwd_1, this.dwd_1, this.ewd_1, this.fwd_1, this.gwd_1, this.hwd_1, completion);
    i.iwd_1 = $this$withContext;
    return i;
  };
  function EpubContentViewModel$slambda$slambda_0($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_httpClient__2ty1zc_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gwb_1;
    httpClient$factory_8();
    return this_0.t2();
  }
  function _get_xml__e6jxp6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hwb_1;
    xml$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kwb_1;
    openExternalLinkUseCase$factory_2();
    return this_0.t2();
  }
  function Companion_158() {
    this.xwd_1 = 'manifestUrl';
    this.ywd_1 = 'cevUri';
    this.zwd_1 = 'navigationVisible';
    this.awe_1 = 'tocString';
    this.bwe_1 = 'xapiStatementsUrl';
    this.cwe_1 = 'EpubContent';
  }
  var Companion_instance_206;
  function Companion_getInstance_176() {
    return Companion_instance_206;
  }
  function EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    this.lwe_1 = $argManifestUrl;
    this.mwe_1 = $argCevOpenUri;
    this.nwe_1 = this$0;
    this.owe_1 = $argTocString;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (!(this.lwe_1 == null) ? !(this.mwe_1 == null) : false) {
              var tmp_0 = this;
              tmp_0.qwe_1 = to(this.lwe_1, this.mwe_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.nwe_1.epc().n7l().ubh(this.nwe_1.fwb_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.rwe_1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.rwe_1 == null) {
              return Unit_instance;
            } else {
              tmp_2 = this.rwe_1;
            }

            tmp_1.swe_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.swe_1.zap_1;
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.twe_1 = tmp_4;
            var tmp_5 = this;
            var tmp2_elvis_lhs = this.swe_1.xap_1;
            var tmp_6;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_6 = tmp2_elvis_lhs;
            }

            tmp_5.uwe_1 = tmp_6;
            this.qwe_1 = to(this.twe_1, this.uwe_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.vwe_1 = this.qwe_1;
            this.wwe_1 = this.vwe_1.y6();
            this.xwe_1 = this.vwe_1.z6();
            this.ywe_1 = UrlKmp(this.wwe_1);
            this.zwe_1 = this.ywe_1.bnw(this.xwe_1);
            var tmp_7 = this;
            tmp_7.awf_1 = this.nwe_1.r4x();
            var tmp_8 = this;
            tmp_8.bwf_1 = _get_httpClient__2ty1zc_3(this.nwe_1);
            var tmp_9 = this;
            tmp_9.cwf_1 = this.wwe_1;
            var tmp_10 = this;
            tmp_10.dwf_1 = this.bwf_1;
            var tmp_11 = this;
            tmp_11.ewf_1 = this.dwf_1;
            var tmp_12 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.cwf_1);
            tmp_12.fwf_1 = this_0;
            this.fwf_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_13 = this;
            tmp_13.gwf_1 = this.ewf_1;
            var tmp_14 = this;
            tmp_14.hwf_1 = this.fwf_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.hwf_1, this.gwf_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.iwf_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = bodyAsDecodedText(this.iwf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.jwf_1 = suspendResult;
            var tmp_15 = this;
            var this_1 = this.awf_1.y4b();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_15.kwf_1 = this.awf_1.x4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.jwf_1);
            this.hd_1 = 5;
            var tmp_16 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_16, EpubContentViewModel$slambda$slambda_0(this.kwf_1, this.xwe_1, this.nwe_1, this.zwe_1, this.owe_1, this.ywe_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return Unit_instance;
          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);
  };
  protoOf(EpubContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new EpubContentViewModel$slambda(this.lwe_1, this.mwe_1, this.nwe_1, this.owe_1, completion);
    i.pwe_1 = $this$launch;
    return i;
  };
  function EpubContentViewModel$slambda_0($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    var i = new EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EpubContentViewModel(di, savedStateHandle, getEpubTableOfContentsUseCase, useBodyDataUrls) {
    var tmp;
    if (getEpubTableOfContentsUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.i5e(tmp$ret$0, null);
      tmp = new GetEpubTableOfContentsUseCase(tmp$ret$1);
    } else {
      tmp = getEpubTableOfContentsUseCase;
    }
    getEpubTableOfContentsUseCase = tmp;
    useBodyDataUrls = useBodyDataUrls === VOID ? false : useBodyDataUrls;
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'EpubContent');
    this.dwb_1 = getEpubTableOfContentsUseCase;
    this.ewb_1 = useBodyDataUrls;
    var tmp_2 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.fwb_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.gwb_1 = Instance(this, tmp$ret$2, null).f5j(this, httpClient$factory_7());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.hwb_1 = Instance(this, tmp$ret$4, null).f5j(this, xml$factory());
    this.iwb_1 = MutableStateFlow(new EpubContentUiState(this.fwb_1));
    this.jwb_1 = asStateFlow(this.iwb_1);
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.kwb_1 = Instance(this, tmp$ret$6, null).f5j(this, openExternalLinkUseCase$factory_1());
    this.lwb_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.mwb_1 = asSharedFlow(this.lwb_1);
    this.nwb_1 = null;
    var argManifestUrl = savedStateHandle.ba('manifestUrl');
    var argCevOpenUri = savedStateHandle.ba('cevUri');
    var tmp0_safe_receiver_0 = savedStateHandle.ba('navigationVisible');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    var argNavigationVisible = tmp1_elvis_lhs_0 == null ? true : tmp1_elvis_lhs_0;
    var argTocString = savedStateHandle.ba('tocString');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, VOID, argNavigationVisible, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.bpc();
    launch(tmp_9, VOID, VOID, EpubContentViewModel$slambda_0(argManifestUrl, argCevOpenUri, this, argTocString, null));
  }
  protoOf(EpubContentViewModel).lwf = function () {
    var langCodeVal = this.iwb_1.t2().uwb_1;
    var titleVal = this.opb_1.t2().zou_1;
    var tmp;
    if (!(langCodeVal == null) ? !(titleVal == null) : false) {
      tmp = new TitleAndLangCode(titleVal, langCodeVal);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(EpubContentViewModel).mwf = function (baseUrl, href) {
    var url = UrlKmp(baseUrl).bnw(href);
    var urlStr = url.toString();
    var hashIndex = indexOf_0(urlStr, '#');
    var urlWithoutHash = substringBefore_0(urlStr, '#');
    var indexInSpine = this.iwb_1.t2().pwb_1.x(urlWithoutHash);
    if (indexInSpine >= 0) {
      var tmp;
      if (hashIndex > 0) {
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = urlStr.substring(hashIndex);
      } else {
        tmp = null;
      }
      this.lwb_1.i1h(new EpubScrollCommand(indexInSpine, tmp));
    } else {
      _get_openExternalLinkUseCase__ku5z07_0(this).mo9(url.toString(), LinkTarget_BLANK_getInstance());
    }
  };
  protoOf(EpubContentViewModel).nwf = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iwb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickTocItem.<anonymous>' call
        var nextValue = prevValue.wwb(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = this.nwb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var baseHref = tmp;
    var tmp1_elvis_lhs = tocItem.po6_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var itemUrl = tmp_0;
    this.mwf(baseHref, itemUrl);
  };
  protoOf(EpubContentViewModel).owf = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iwb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>' call
        var tmp;
        if (prevValue.swb_1.a1(tocItem.no6_1)) {
          // Inline function 'kotlin.collections.filter' call
          // Inline function 'kotlin.collections.filterTo' call
          var this_1 = prevValue.swb_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>.<anonymous>' call
            if (!(element === tocItem.no6_1)) {
              destination.i1(element);
            }
          }
          tmp = toSet(destination);
        } else {
          tmp = plus_2(prevValue.swb_1, tocItem.no6_1);
        }
        var nextValue = prevValue.wwb(VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).pwf = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iwb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onDismissTableOfContentsDrawer.<anonymous>' call
        var nextValue = prevValue.wwb(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).qwf = function (index) {
    var spineSize = this.iwb_1.t2().pwb_1.u();
    if (spineSize <= 0)
      return Unit_instance;
    if (index === (spineSize - 1 | 0)) {
      this.gos(true);
    } else {
      this.fos(imul(index, 100) / spineSize | 0);
    }
  };
  function EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? emptyList() : spineUrls;
    tableOfContents = tableOfContents === VOID ? emptyList() : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? false : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? emptySet() : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? null : coverImageUrl;
    langCode = langCode === VOID ? null : langCode;
    this.owb_1 = contentEntryVersionUid;
    this.pwb_1 = spineUrls;
    this.qwb_1 = tableOfContents;
    this.rwb_1 = tableOfContentsOpen;
    this.swb_1 = collapsedTocUids;
    this.twb_1 = coverImageUrl;
    this.uwb_1 = langCode;
    var tmp = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.qwb_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>' call
      var tmp$ret$0;
      $l$block_0: {
        // Inline function 'kotlin.collections.any' call
        var this_1 = this.swb_1;
        var tmp_0;
        if (isInterface(this_1, Collection)) {
          tmp_0 = this_1.c1();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
        var tmp0_iterator_0 = this_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>.<anonymous>' call
          if (element.rwg(element_0)) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
        tmp$ret$0 = false;
      }
      if (!tmp$ret$0) {
        destination.i1(element);
      }
    }
    tmp.vwb_1 = destination;
  }
  protoOf(EpubContentUiState).swg = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    return new EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).wwb = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode, $super) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.owb_1 : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? this.pwb_1 : spineUrls;
    tableOfContents = tableOfContents === VOID ? this.qwb_1 : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? this.rwb_1 : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? this.swb_1 : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? this.twb_1 : coverImageUrl;
    langCode = langCode === VOID ? this.uwb_1 : langCode;
    return $super === VOID ? this.swg(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) : $super.swg.call(this, contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).toString = function () {
    return 'EpubContentUiState(contentEntryVersionUid=' + this.owb_1.toString() + ', spineUrls=' + this.pwb_1 + ', tableOfContents=' + this.qwb_1 + ', tableOfContentsOpen=' + this.rwb_1 + ', collapsedTocUids=' + this.swb_1 + ', coverImageUrl=' + this.twb_1 + ', langCode=' + this.uwb_1 + ')';
  };
  protoOf(EpubContentUiState).hashCode = function () {
    var result = this.owb_1.hashCode();
    result = imul(result, 31) + hashCode(this.pwb_1) | 0;
    result = imul(result, 31) + hashCode(this.qwb_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rwb_1) | 0;
    result = imul(result, 31) + hashCode(this.swb_1) | 0;
    result = imul(result, 31) + (this.twb_1 == null ? 0 : getStringHashCode(this.twb_1)) | 0;
    result = imul(result, 31) + (this.uwb_1 == null ? 0 : getStringHashCode(this.uwb_1)) | 0;
    return result;
  };
  protoOf(EpubContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof EpubContentUiState ? other : THROW_CCE();
    if (!this.owb_1.equals(tmp0_other_with_cast.owb_1))
      return false;
    if (!equals(this.pwb_1, tmp0_other_with_cast.pwb_1))
      return false;
    if (!equals(this.qwb_1, tmp0_other_with_cast.qwb_1))
      return false;
    if (!(this.rwb_1 === tmp0_other_with_cast.rwb_1))
      return false;
    if (!equals(this.swb_1, tmp0_other_with_cast.swb_1))
      return false;
    if (!(this.twb_1 == tmp0_other_with_cast.twb_1))
      return false;
    if (!(this.uwb_1 == tmp0_other_with_cast.uwb_1))
      return false;
    return true;
  };
  function EpubScrollCommand(spineIndex, hash) {
    hash = hash === VOID ? null : hash;
    this.twg_1 = spineIndex;
    this.uwg_1 = hash;
  }
  protoOf(EpubScrollCommand).toString = function () {
    return 'EpubScrollCommand(spineIndex=' + this.twg_1 + ', hash=' + this.uwg_1 + ')';
  };
  protoOf(EpubScrollCommand).hashCode = function () {
    var result = this.twg_1;
    result = imul(result, 31) + (this.uwg_1 == null ? 0 : getStringHashCode(this.uwg_1)) | 0;
    return result;
  };
  protoOf(EpubScrollCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubScrollCommand))
      return false;
    var tmp0_other_with_cast = other instanceof EpubScrollCommand ? other : THROW_CCE();
    if (!(this.twg_1 === tmp0_other_with_cast.twg_1))
      return false;
    if (!(this.uwg_1 == tmp0_other_with_cast.uwg_1))
      return false;
    return true;
  };
  function EpubTocItem(uid, label, href, children, parentUids, indentLevel) {
    parentUids = parentUids === VOID ? emptySet() : parentUids;
    indentLevel = indentLevel === VOID ? 0 : indentLevel;
    this.no6_1 = uid;
    this.oo6_1 = label;
    this.po6_1 = href;
    this.qo6_1 = children;
    this.ro6_1 = parentUids;
    this.so6_1 = indentLevel;
    var tmp = this;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp.to6_1 = !this.qo6_1.c1();
  }
  protoOf(EpubTocItem).rwg = function (uid) {
    return this.ro6_1.a1(uid);
  };
  protoOf(EpubTocItem).toString = function () {
    return 'EpubTocItem(uid=' + this.no6_1 + ', label=' + this.oo6_1 + ', href=' + this.po6_1 + ', children=' + this.qo6_1 + ', parentUids=' + this.ro6_1 + ', indentLevel=' + this.so6_1 + ')';
  };
  protoOf(EpubTocItem).hashCode = function () {
    var result = this.no6_1;
    result = imul(result, 31) + getStringHashCode(this.oo6_1) | 0;
    result = imul(result, 31) + (this.po6_1 == null ? 0 : getStringHashCode(this.po6_1)) | 0;
    result = imul(result, 31) + hashCode(this.qo6_1) | 0;
    result = imul(result, 31) + hashCode(this.ro6_1) | 0;
    result = imul(result, 31) + this.so6_1 | 0;
    return result;
  };
  protoOf(EpubTocItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubTocItem))
      return false;
    var tmp0_other_with_cast = other instanceof EpubTocItem ? other : THROW_CCE();
    if (!(this.no6_1 === tmp0_other_with_cast.no6_1))
      return false;
    if (!(this.oo6_1 === tmp0_other_with_cast.oo6_1))
      return false;
    if (!(this.po6_1 == tmp0_other_with_cast.po6_1))
      return false;
    if (!equals(this.qo6_1, tmp0_other_with_cast.qo6_1))
      return false;
    if (!equals(this.ro6_1, tmp0_other_with_cast.ro6_1))
      return false;
    if (!(this.so6_1 === tmp0_other_with_cast.so6_1))
      return false;
    return true;
  };
  function httpClient$factory_7() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function xml$factory() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_1() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_0(receiver);
    }, null);
  }
  function httpClient$factory_8() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function xml$factory_0() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_2() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_0(receiver);
    }, null);
  }
  function Companion_159() {
    this.vwg_1 = 'Error';
  }
  var Companion_instance_207;
  function Companion_getInstance_177() {
    return Companion_instance_207;
  }
  function _get_impl__d88w17($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vwh_1;
    impl$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wwh_1;
    httpClient$factory_10();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xwh_1;
    apiUrlConfig$factory_4();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zwh_1;
    setLanguageUseCase$factory_0();
    return this_0.t2();
  }
  function _get_languagesConfig__hebcss($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.awi_1;
    languagesConfig$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dwi_1;
    getVersionUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ewi_1;
    getShowPoweredByUseCase$factory_2();
    return this_0.t2();
  }
  function onSiteVerified($this, site) {
    $this.ywh_1 = site;
    $this.kpc(Companion_getInstance_93().uov_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.rwh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onSiteVerified.<anonymous>' call
        var tmp0_createAccountVisible = site.ph6_1;
        var tmp1_connectAsGuestVisible = site.oh6_1;
        var nextValue = prevValue.uwi(VOID, VOID, true, VOID, VOID, VOID, tmp0_createAccountVisible, tmp1_connectAsGuestVisible, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function goToNextDestAfterLoginOrGuestSelected($this, personUid) {
    var goOptions = new UstadGoOptions(VOID, VOID, true);
    var tmp = Napier_getInstance();
    tmp.p5k(VOID, VOID, LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda($this));
    $this.wpi($this.mpb_1, appendSelectedAccount($this.twh_1, personUid, new Endpoint($this.uwh_1)), goOptions);
  }
  function Companion_160() {
    this.vwi_1 = 'Login';
  }
  var Companion_instance_208;
  function Companion_getInstance_178() {
    return Companion_instance_208;
  }
  function LoginViewModel$slambda(this$0, resultContinuation) {
    this.ewj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!(this.ewj_1.ywh_1 == null)) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = verifySite(_get_httpClient__2ty1zc_4(this.ewj_1), this.ewj_1.uwh_1, new Long(10000, 0), this.ewj_1.r4x(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.gwj_1 = suspendResult;
            onSiteVerified(this.ewj_1, this.gwj_1);
            this.id_1 = 7;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 7;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Exception) {
              this.hwj_1 = this.kd_1;
              Napier_getInstance().r5k('Could not load site object for ' + this.ewj_1.uwh_1, this.hwj_1);
              l$ret$1: do {
                var this_0 = this.ewj_1.rwh_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.uwi(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, _get_impl__d88w17(this.ewj_1).rnd(strings_getInstance().plj_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              suspendResult = delay(new Long(10000, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 6:
            return Unit_instance;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$slambda(this.ewj_1, completion);
    i.fwj_1 = $this$launch;
    return i;
  };
  function LoginViewModel$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda(this$0) {
    return function () {
      return 'LoginPresenter: go to next destination: ' + this$0.twh_1;
    };
  }
  function LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation) {
    this.qwj_1 = this$0;
    this.rwj_1 = $username;
    this.swj_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickLogin$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$onClickLogin$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.uwj_1 = null;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            var tmp_0 = this.qwj_1.apc();
            var this_0 = this.rwj_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.swj_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            var tmp_3 = this.qwj_1.uwh_1;
            Companion_getInstance_110();
            var tmp0_safe_receiver = this.qwj_1.kpb_1.ba('maxDob');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.qn5(tmp_1, tmp_2, tmp_3, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.qwj_1.fwi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var account = suspendResult;
            var tmp_4 = this;
            goToNextDestAfterLoginOrGuestSelected(this.qwj_1, account.zk0_1);
            tmp_4.vwj_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_5 = this.kd_1;
            if (tmp_5 instanceof AdultAccountRequiredException) {
              var e = this.kd_1;
              var tmp_6 = this;
              this.uwj_1 = _get_impl__d88w17(this.qwj_1).rnd(strings_getInstance().kmf_1);
              tmp_6.vwj_1 = Unit_instance;
              this.id_1 = 5;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_7 = this.kd_1;
              if (tmp_7 instanceof UnauthorizedException) {
                var e_0 = this.kd_1;
                var tmp_8 = this;
                this.uwj_1 = _get_impl__d88w17(this.qwj_1).rnd(strings_getInstance().olj_1);
                tmp_8.vwj_1 = Unit_instance;
                this.id_1 = 5;
                this.hd_1 = 6;
                continue $sm;
              } else {
                var tmp_9 = this.kd_1;
                if (tmp_9 instanceof ConsentNotGrantedException) {
                  var e_1 = this.kd_1;
                  var tmp_10 = this;
                  this.uwj_1 = _get_impl__d88w17(this.qwj_1).rnd(strings_getInstance().jmf_1);
                  tmp_10.vwj_1 = Unit_instance;
                  this.id_1 = 5;
                  this.hd_1 = 6;
                  continue $sm;
                } else {
                  var tmp_11 = this.kd_1;
                  if (tmp_11 instanceof Exception) {
                    var e_2 = this.kd_1;
                    var tmp_12 = this;
                    this.uwj_1 = _get_impl__d88w17(this.qwj_1).rnd(strings_getInstance().plj_1);
                    tmp_12.vwj_1 = Unit_instance;
                    this.id_1 = 5;
                    this.hd_1 = 6;
                    continue $sm;
                  } else {
                    throw this.kd_1;
                  }
                }
              }
            }

          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.qwj_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$3: do {
              var this_2 = this.qwj_1.rwh_1;
              while (true) {
                var prevValue = this_2.t2();
                var nextValue = prevValue.uwi(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, VOID, this.uwj_1);
                if (this_2.y1k(prevValue, nextValue)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            this.qwj_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$5: do {
              var this_3 = this.qwj_1.rwh_1;
              while (true) {
                var prevValue_0 = this_3.t2();
                var nextValue_0 = prevValue_0.uwi(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, VOID, this.uwj_1);
                if (this_3.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_3 = $p;
        if (this.id_1 === 5) {
          throw e_3;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_3;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickLogin$slambda(this.qwj_1, this.rwj_1, this.swj_1, completion);
    i.twj_1 = $this$launch;
    return i;
  };
  function LoginViewModel$onClickLogin$slambda_0(this$0, $username, $password, resultContinuation) {
    var i = new LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation) {
    this.ewk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).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.ewk_1.apc().rn5(this.ewk_1.uwh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var guestPerson = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.ewk_1, guestPerson.xmr_1.x9b_1);
            return Unit_instance;
          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);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this.ewk_1, completion);
    i.fwk_1 = $this$launch;
    return i;
  };
  function LoginViewModel$onClickConnectAsGuest$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'Login');
    this.rwh_1 = MutableStateFlow(new LoginUiState());
    this.swh_1 = asStateFlow(this.rwh_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.vwh_1 = Instance(this, tmp$ret$0, null).f5j(this, impl$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.wwh_1 = Instance(this, tmp$ret$2, null).f5j(this, httpClient$factory_9());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.xwh_1 = Instance(this, tmp$ret$4, null).f5j(this, apiUrlConfig$factory_3());
    this.ywh_1 = null;
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.zwh_1 = Instance(this, tmp$ret$6, null).f5j(this, setLanguageUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.awi_1 = Instance(this, tmp$ret$8, null).f5j(this, languagesConfig$factory());
    this.bwi_1 = new ValidateUsernameUseCase();
    this.cwi_1 = new FilterUsernameUseCase();
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.dwi_1 = InstanceOrNull(this, tmp$ret$10, null).f5j(this, getVersionUseCase$factory_1());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.ewi_1 = InstanceOrNull(this, tmp$ret$12, null).f5j(this, getShowPoweredByUseCase$factory_1());
    var tmp_13 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_13.fwi_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    var tmp_14 = this;
    Companion_getInstance_110();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_15;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_132();
      tmp_15 = 'CourseListHome';
    } else {
      tmp_15 = tmp0_elvis_lhs;
    }
    tmp_14.twh_1 = tmp_15;
    var tmp_16 = this;
    Companion_getInstance_110();
    var tmp1_elvis_lhs_0 = savedStateHandle.ba('serverUrl');
    var tmp2_elvis_lhs = tmp1_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_1(this).fn5_1 : tmp1_elvis_lhs_0;
    tmp_16.uwh_1 = tmp2_elvis_lhs == null ? 'http://localhost' : tmp2_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rwh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
        var tmp_17 = this.ipc().rnd(strings_getInstance().wmm_1) + ': ';
        var tmp0_safe_receiver_0 = _get_getVersionUseCase__n7x57g_0(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.to8();
        var tmp_18 = tmp_17 + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ro8_1);
        Companion_getInstance_110();
        var tmp_19 = savedStateHandle.ba('intMsg');
        var tmp_20 = _get_languagesConfig__hebcss(this).zow(this.ipc());
        var tmp_21 = _get_languagesConfig__hebcss(this).aox(this.ipc());
        var tmp2_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e_0(this);
        var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.to8();
        var nextValue = prevValue.uwi(VOID, VOID, VOID, VOID, VOID, tmp_18, VOID, VOID, tmp_19, VOID, tmp_20, tmp_21, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp3_title = _get_impl__d88w17(this).rnd(strings_getInstance().xli_1);
    var baseAppUiState = new AppUiState(VOID, VOID, tmp3_title, false, VOID, VOID, false);
    this.uwh_1 = requirePostfix(this.uwh_1, '/');
    Companion_getInstance_110();
    var siteJsonStr = savedStateHandle.ba('site');
    if (!(siteJsonStr == null)) {
      this.opb_1.x1k(baseAppUiState);
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_1 = this.r4x();
      // Inline function 'kotlinx.serialization.serializer' call
      var this_2 = this_1.y4b();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_3 = serializer(this_2, createKType(getKClass(Site), arrayOf([]), false));
      var tmp$ret$17 = isInterface(this_3, KSerializer) ? this_3 : THROW_CCE();
      var tmp$ret$18 = this_1.x4b(tmp$ret$17, siteJsonStr);
      onSiteVerified(this, tmp$ret$18);
    } else {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.rwh_1;
        while (true) {
          var prevValue_0 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.uwi(VOID, VOID, false);
          if (this_4.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      this.opb_1.x1k(baseAppUiState.mov(VOID, Companion_getInstance_93().tov_1));
      var tmp_22 = this.bpc();
      launch(tmp_22, VOID, VOID, LoginViewModel$slambda_0(this, null));
    }
  }
  protoOf(LoginViewModel).gwk = function (newValue) {
    var filteredValue = this.cwi_1.po8(newValue, '');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rwh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onUsernameChanged.<anonymous>' call
        var nextValue = prevValue.uwi(filteredValue);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).hwk = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rwh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.uwi(VOID, password);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).iwk = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rwh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var this_1 = prevValue.gwi_1;
        var tmp0_username = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
        // Inline function 'kotlin.text.trim' call
        var this_2 = prevValue.hwi_1;
        var tmp1_password = toString(trim(isCharSequence(this_2) ? this_2 : THROW_CCE()));
        var nextValue = prevValue.uwi(tmp0_username, tmp1_password, false, null, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var username = this.rwh_1.t2().gwi_1;
    var password = this.rwh_1.t2().hwi_1;
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(username) > 0) {
      // Inline function 'kotlin.text.isNotEmpty' call
      tmp = charSequenceLength(password) > 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      var validationResult = this.bwi_1.io3(username);
      if (!validationResult.equals(Companion_getInstance_71().roe_1)) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_3 = this.rwh_1;
          while (true) {
            var prevValue_0 = this_3.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
            var tmp0_safe_receiver = validationResult.woe_1;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>.<anonymous>' call
              tmp_0 = _get_impl__d88w17(this).rnd(tmp0_safe_receiver);
            }
            var nextValue_0 = prevValue_0.uwi(VOID, VOID, true, tmp_0);
            if (this_3.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      }
      this.kpc(Companion_getInstance_93().tov_1);
      var tmp_1 = this.bpc();
      launch(tmp_1, VOID, VOID, LoginViewModel$onClickLogin$slambda_0(this, username, password, null));
    } else {
      this.kpc(Companion_getInstance_93().uov_1);
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.rwh_1;
        while (true) {
          var prevValue_1 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
          var tmp_2;
          // Inline function 'kotlin.text.isEmpty' call
          var this_5 = prevValue_1.gwi_1;
          if (charSequenceLength(this_5) === 0) {
            tmp_2 = _get_impl__d88w17(this).rnd(strings_getInstance().ilo_1);
          } else {
            tmp_2 = null;
          }
          var tmp_3 = tmp_2;
          var tmp_4;
          // Inline function 'kotlin.text.isEmpty' call
          var this_6 = prevValue_1.hwi_1;
          if (charSequenceLength(this_6) === 0) {
            tmp_4 = _get_impl__d88w17(this).rnd(strings_getInstance().ilo_1);
          } else {
            tmp_4 = null;
          }
          var nextValue_1 = prevValue_1.uwi(VOID, VOID, true, tmp_3, tmp_4);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).jwk = function () {
    Companion_getInstance_110();
    var tmp = to('serverUrl', this.uwh_1);
    var tmp_0 = to('showAccept', 'true');
    Companion_getInstance_110();
    Companion_getInstance_110();
    var tmp0_elvis_lhs = this.kpb_1.ba('popUpToOnFinish');
    var args = mutableMapOf([tmp, tmp_0, to('popUpToOnFinish', tmp0_elvis_lhs == null ? 'Login' : tmp0_elvis_lhs)]);
    this.wpc(args, Companion_getInstance_189().uwk_1);
    this.mpb_1.fo0('RegisterAgeRedirect', args);
  };
  protoOf(LoginViewModel).wwk = function (uiLanguage) {
    if (!uiLanguage.equals(this.rwh_1.t2().qwi_1)) {
      var tmp = _get_setLanguageUseCase__st7nci(this);
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
      Companion_getInstance_110();
      this.vpc(this_0, 'next');
      Companion_getInstance_110();
      this.vpc(this_0, 'serverUrl');
      Companion_getInstance_110();
      this.vpc(this_0, 'site');
      var tmp$ret$2 = this_0.f3();
      var result = tmp.do9(uiLanguage, 'Login', this.mpb_1, tmp$ret$2);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.rwh_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
          var nextValue = prevValue.uwi(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, uiLanguage, VOID, result.co9_1);
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).xwk = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, LoginViewModel$onClickConnectAsGuest$slambda_0(this, null));
  };
  function LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordError = passwordError === VOID ? null : passwordError;
    versionInfo = versionInfo === VOID ? 'v42' : versionInfo;
    createAccountVisible = createAccountVisible === VOID ? false : createAccountVisible;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? false : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? null : loginIntentMessage;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    currentLanguage = currentLanguage === VOID ? new UiLanguage('en', 'English') : currentLanguage;
    languageList = languageList === VOID ? listOf_0(currentLanguage) : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? false : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    this.gwi_1 = username;
    this.hwi_1 = password;
    this.iwi_1 = fieldsEnabled;
    this.jwi_1 = usernameError;
    this.kwi_1 = passwordError;
    this.lwi_1 = versionInfo;
    this.mwi_1 = createAccountVisible;
    this.nwi_1 = connectAsGuestVisible;
    this.owi_1 = loginIntentMessage;
    this.pwi_1 = errorMessage;
    this.qwi_1 = currentLanguage;
    this.rwi_1 = languageList;
    this.swi_1 = showWaitForRestart;
    this.twi_1 = showPoweredBy;
  }
  protoOf(LoginUiState).ywk = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy) {
    return new LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy);
  };
  protoOf(LoginUiState).uwi = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, $super) {
    username = username === VOID ? this.gwi_1 : username;
    password = password === VOID ? this.hwi_1 : password;
    fieldsEnabled = fieldsEnabled === VOID ? this.iwi_1 : fieldsEnabled;
    usernameError = usernameError === VOID ? this.jwi_1 : usernameError;
    passwordError = passwordError === VOID ? this.kwi_1 : passwordError;
    versionInfo = versionInfo === VOID ? this.lwi_1 : versionInfo;
    createAccountVisible = createAccountVisible === VOID ? this.mwi_1 : createAccountVisible;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? this.nwi_1 : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? this.owi_1 : loginIntentMessage;
    errorMessage = errorMessage === VOID ? this.pwi_1 : errorMessage;
    currentLanguage = currentLanguage === VOID ? this.qwi_1 : currentLanguage;
    languageList = languageList === VOID ? this.rwi_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.swi_1 : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? this.twi_1 : showPoweredBy;
    return $super === VOID ? this.ywk(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy) : $super.ywk.call(this, username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy);
  };
  protoOf(LoginUiState).toString = function () {
    return 'LoginUiState(username=' + this.gwi_1 + ', password=' + this.hwi_1 + ', fieldsEnabled=' + this.iwi_1 + ', usernameError=' + this.jwi_1 + ', passwordError=' + this.kwi_1 + ', versionInfo=' + this.lwi_1 + ', createAccountVisible=' + this.mwi_1 + ', connectAsGuestVisible=' + this.nwi_1 + ', loginIntentMessage=' + this.owi_1 + ', errorMessage=' + this.pwi_1 + ', currentLanguage=' + this.qwi_1 + ', languageList=' + this.rwi_1 + ', showWaitForRestart=' + this.swi_1 + ', showPoweredBy=' + this.twi_1 + ')';
  };
  protoOf(LoginUiState).hashCode = function () {
    var result = getStringHashCode(this.gwi_1);
    result = imul(result, 31) + getStringHashCode(this.hwi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.iwi_1) | 0;
    result = imul(result, 31) + (this.jwi_1 == null ? 0 : getStringHashCode(this.jwi_1)) | 0;
    result = imul(result, 31) + (this.kwi_1 == null ? 0 : getStringHashCode(this.kwi_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.lwi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mwi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nwi_1) | 0;
    result = imul(result, 31) + (this.owi_1 == null ? 0 : getStringHashCode(this.owi_1)) | 0;
    result = imul(result, 31) + (this.pwi_1 == null ? 0 : getStringHashCode(this.pwi_1)) | 0;
    result = imul(result, 31) + this.qwi_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.rwi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.swi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.twi_1) | 0;
    return result;
  };
  protoOf(LoginUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoginUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoginUiState ? other : THROW_CCE();
    if (!(this.gwi_1 === tmp0_other_with_cast.gwi_1))
      return false;
    if (!(this.hwi_1 === tmp0_other_with_cast.hwi_1))
      return false;
    if (!(this.iwi_1 === tmp0_other_with_cast.iwi_1))
      return false;
    if (!(this.jwi_1 == tmp0_other_with_cast.jwi_1))
      return false;
    if (!(this.kwi_1 == tmp0_other_with_cast.kwi_1))
      return false;
    if (!(this.lwi_1 === tmp0_other_with_cast.lwi_1))
      return false;
    if (!(this.mwi_1 === tmp0_other_with_cast.mwi_1))
      return false;
    if (!(this.nwi_1 === tmp0_other_with_cast.nwi_1))
      return false;
    if (!(this.owi_1 == tmp0_other_with_cast.owi_1))
      return false;
    if (!(this.pwi_1 == tmp0_other_with_cast.pwi_1))
      return false;
    if (!this.qwi_1.equals(tmp0_other_with_cast.qwi_1))
      return false;
    if (!equals(this.rwi_1, tmp0_other_with_cast.rwi_1))
      return false;
    if (!(this.swi_1 === tmp0_other_with_cast.swi_1))
      return false;
    if (!(this.twi_1 === tmp0_other_with_cast.twi_1))
      return false;
    return true;
  };
  function impl$factory() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function httpClient$factory_9() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function apiUrlConfig$factory_3() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function setLanguageUseCase$factory() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function languagesConfig$factory() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_1() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_1() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function impl$factory_0() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function httpClient$factory_10() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function apiUrlConfig$factory_4() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_0() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function languagesConfig$factory_0() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_2() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_2() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function daysUntil_0(_this__u8e3s4, other) {
    return daysUntil(Companion_getInstance_6().ulh(_this__u8e3s4.kfd_1), Companion_getInstance_6().ulh(other.kfd_1), Companion_getInstance_9().mli());
  }
  function Companion_161() {
    Companion_instance_209 = this;
    this.zwk_1 = 'ConversationList';
    this.awl_1 = 'ConversationListHome';
    this.bwl_1 = listOf(['ConversationList', 'ConversationListHome']);
  }
  var Companion_instance_209;
  function Companion_getInstance_179() {
    if (Companion_instance_209 == null)
      new Companion_161();
    return Companion_instance_209;
  }
  function ConversationListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().k7l().qfc(toQueryLikeParam(this$0.opb_1.t2().eov_1.tou_1), this$0.cpc());
    };
  }
  function ConversationListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.apl();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function ConversationListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_179();
    destinationName = destinationName === VOID ? 'ConversationList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ConversationListUiState(), destinationName);
    var tmp = this;
    tmp.cwm_1 = ConversationListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_1 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_1.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_1.length;
        while (inductionVariable < last) {
          var element = this_1[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$0 = this.ipc().rnd(get_dayStringResource(element));
          result.s(element, tmp$ret$0);
        }
        var tmp1_conversations = this.cwm_1;
        var nextValue = prevValue.iwm(tmp1_conversations, VOID, VOID, VOID, result);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.opb_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        var tmp0_searchState = this.opl();
        var tmp1_title = this.wpl(strings_getInstance().vmi_1, strings_getInstance().sml_1);
        var tmp_0 = this.ipc().rnd(strings_getInstance().wmi_1);
        var tmp_1 = FabIcon_ADD_getInstance();
        var tmp2_fabState = new FabUiState(true, tmp_0, tmp_1, ConversationListViewModel$onClickAdd$ref(this));
        var nextValue_0 = prevValue_0.mov(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ConversationListViewModel).zpk = function (searchText) {
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(ConversationListViewModel).apl = function () {
    Companion_getInstance_190();
    var tmp = to('goToOnPersonSelected', 'MessageList');
    Companion_getInstance_110();
    var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().np8_1);
    Companion_getInstance_190();
    var tmp_1 = to('excludeAlreadySelectedList', this.cpc().toString());
    Companion_getInstance_190();
    this.mpb_1.fo0('People', mapOf([tmp, tmp_0, tmp_1, to('popUpToOnPersonSelected', 'People')]));
  };
  protoOf(ConversationListViewModel).jwm = function (entry) {
    Companion_getInstance_110();
    var tmp0_safe_receiver = entry.mfe_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x9b_1;
    this.mpb_1.fo0('MessageList', mapOf_0(to('personUid', (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString())));
  };
  function ConversationListUiState$_init_$lambda_uo1nhr() {
    return new EmptyPagingSource();
  }
  function ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (conversations === VOID) {
      tmp = ConversationListUiState$_init_$lambda_uo1nhr;
    } else {
      tmp = conversations;
    }
    conversations = tmp;
    sortOptions = sortOptions === VOID ? emptyList() : sortOptions;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.dwm_1 = conversations;
    this.ewm_1 = sortOptions;
    this.fwm_1 = showAddItem;
    this.gwm_1 = localDateTimeNow;
    this.hwm_1 = dayOfWeekStrings;
  }
  protoOf(ConversationListUiState).kwm = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    return new ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).iwm = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings, $super) {
    conversations = conversations === VOID ? this.dwm_1 : conversations;
    sortOptions = sortOptions === VOID ? this.ewm_1 : sortOptions;
    showAddItem = showAddItem === VOID ? this.fwm_1 : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? this.gwm_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.hwm_1 : dayOfWeekStrings;
    return $super === VOID ? this.kwm(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) : $super.kwm.call(this, conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).toString = function () {
    return 'ConversationListUiState(conversations=' + this.dwm_1 + ', sortOptions=' + this.ewm_1 + ', showAddItem=' + this.fwm_1 + ', localDateTimeNow=' + this.gwm_1 + ', dayOfWeekStrings=' + this.hwm_1 + ')';
  };
  protoOf(ConversationListUiState).hashCode = function () {
    var result = hashCode(this.dwm_1);
    result = imul(result, 31) + hashCode(this.ewm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fwm_1) | 0;
    result = imul(result, 31) + this.gwm_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.hwm_1) | 0;
    return result;
  };
  protoOf(ConversationListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ConversationListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ConversationListUiState ? other : THROW_CCE();
    if (!equals(this.dwm_1, tmp0_other_with_cast.dwm_1))
      return false;
    if (!equals(this.ewm_1, tmp0_other_with_cast.ewm_1))
      return false;
    if (!(this.fwm_1 === tmp0_other_with_cast.fwm_1))
      return false;
    if (!this.gwm_1.equals(tmp0_other_with_cast.gwm_1))
      return false;
    if (!equals(this.hwm_1, tmp0_other_with_cast.hwm_1))
      return false;
    return true;
  };
  function MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.twm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda$slambda).knh = function (it, $completion) {
    var tmp = this.lnh(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.knh((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.twm_1.opb_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.uwm_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gfy_1;
              var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
              var tmp2_safe_receiver = this.uwm_1;
              var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hfy_1;
              var nextValue = prevValue.mov(VOID, VOID, tmp_0 + ' ' + (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).lnh = function (it, completion) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this.twm_1, completion);
    i.uwm_1 = it;
    return i;
  };
  function MessageListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.knh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.dwn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(MessageListViewModel$slambda$slambda).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;
            var tmp_0 = this.dwn_1.epc().s7j().ofu(this.dwn_1.ewo_1);
            var tmp_1 = MessageListViewModel$slambda$slambda$slambda_0(this.dwn_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_29(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(MessageListViewModel$slambda$slambda).q7e = function (completion) {
    return new MessageListViewModel$slambda$slambda(this.dwn_1, completion);
  };
  function MessageListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_ustadAccountManager__el9prc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fwo_1;
    ustadAccountManager$factory_2();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gwo_1;
    showSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hwo_1;
    dismissSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.iwo_1;
    openExternalLinkUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_162() {
    this.kwo_1 = 'MessageList';
  }
  var Companion_instance_210;
  function Companion_getInstance_180() {
    return Companion_instance_210;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_29(function_0) {
    this.lwo_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_29).t1d = function (value, $completion) {
    return this.lwo_1(value, $completion);
  };
  function MessageListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().k7l().pfc(this$0.cpc(), this$0.ewo_1);
    };
  }
  function MessageListViewModel$slambda(this$0, resultContinuation) {
    this.uwo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda).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 = whenSubscribed(this.uwo_1.fpk_1, MessageListViewModel$slambda$slambda_0(this.uwo_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(MessageListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$slambda(this.uwo_1, completion);
    i.vwo_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$onWarningDismiss$slambda(this$0, resultContinuation) {
    this.ewp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$onWarningDismiss$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          _get_dismissSocialWarningUseCase__st8mv5_0(this.ewp_1).knv(toString_0(_get_ustadAccountManager__el9prc_0(this.ewp_1).rn4().xmr_1.y9b_1));
          l$ret$1: do {
            var this_0 = this.ewp_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mwp(VOID, VOID, VOID, VOID, VOID, false);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(MessageListViewModel$onWarningDismiss$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$onWarningDismiss$slambda(this.ewp_1, completion);
    i.fwp_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$onWarningDismiss$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$onWarningDismiss$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.vwp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$onClickSend$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$onClickSend$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).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;
            var tmp_0 = this.vwp_1.epc().k7l();
            var tmp0_messageSenderPersonUid = this.vwp_1.cpc();
            var this_0 = this.vwp_1.fpk_1.t2().iwp_1;
            var tmp1_messageText = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var tmp2_messageToPersonUid = this.vwp_1.ewo_1;
            var tmp3_messageTimestamp = systemTimeInMillis();
            suspendResult = tmp_0.rfc(new Message(VOID, tmp0_messageSenderPersonUid, tmp2_messageToPersonUid, tmp1_messageText, tmp3_messageTimestamp), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_1 = this.vwp_1.fpk_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.mwp(VOID, VOID, '');
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$onClickSend$slambda(this.vwp_1, completion);
    i.wwp_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$onClickSend$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$onClickSend$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'MessageList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new MessageListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ewo_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.fwo_1 = Instance(di, tmp$ret$0, null).f5j(this, ustadAccountManager$factory_1());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ShowSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.gwo_1 = Instance(di, tmp$ret$2, null).f5j(this, showSocialWarningUseCase$factory_1());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(DismissSocialWarningUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.hwo_1 = Instance(di, tmp$ret$4, null).f5j(this, dismissSocialWarningUseCase$factory_1());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.iwo_1 = Instance(di, tmp$ret$6, null).f5j(this, openExternalLinkUseCase$factory_3());
    var tmp_8 = this;
    tmp_8.jwo_1 = MessageListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, VOID, true, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fpk_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$10 = this.ipc().rnd(get_dayStringResource(element));
          result.s(element, tmp$ret$10);
        }
        var tmp1_messages = this.jwo_1;
        var tmp2_activePersonUid = this.cpc();
        var tmp3_showSocialWarning = _get_showSocialWarningUseCase__ft8jc6_0(this).io3(toString_0(_get_ustadAccountManager__el9prc_0(this).rn4().xmr_1.y9b_1));
        var nextValue_0 = prevValue_0.mwp(tmp1_messages, tmp2_activePersonUid, VOID, result, VOID, tmp3_showSocialWarning);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_9 = this.bpc();
    launch(tmp_9, VOID, VOID, MessageListViewModel$slambda_0(this, null));
  }
  protoOf(MessageListViewModel).ss9 = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, MessageListViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(MessageListViewModel).zpk = function (searchText) {
    // Inline function 'kotlin.TODO' call
    var reason = 'Not yet implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(MessageListViewModel).apl = function () {
  };
  protoOf(MessageListViewModel).xwp = function (text) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.onChangeNewMessageText.<anonymous>' call
        var nextValue = prevValue.mwp(VOID, VOID, text);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(MessageListViewModel).ywp = function () {
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, MessageListViewModel$onClickSend$slambda_0(this, null));
  };
  function MessageListUiState$_init_$lambda_mkfto3() {
    return new EmptyPagingSource();
  }
  function MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    var tmp;
    if (messages === VOID) {
      tmp = MessageListUiState$_init_$lambda_mkfto3;
    } else {
      tmp = messages;
    }
    messages = tmp;
    activePersonUid = activePersonUid === VOID ? new Long(0, 0) : activePersonUid;
    newMessageText = newMessageText === VOID ? '' : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.nle(), Companion_getInstance_9().mli()) : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.gwp_1 = messages;
    this.hwp_1 = activePersonUid;
    this.iwp_1 = newMessageText;
    this.jwp_1 = dayOfWeekStrings;
    this.kwp_1 = localDateTimeNow;
    this.lwp_1 = showSocialWarning;
  }
  protoOf(MessageListUiState).zwp = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    return new MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).mwp = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning, $super) {
    messages = messages === VOID ? this.gwp_1 : messages;
    activePersonUid = activePersonUid === VOID ? this.hwp_1 : activePersonUid;
    newMessageText = newMessageText === VOID ? this.iwp_1 : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.jwp_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.kwp_1 : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? this.lwp_1 : showSocialWarning;
    return $super === VOID ? this.zwp(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) : $super.zwp.call(this, messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).toString = function () {
    return 'MessageListUiState(messages=' + this.gwp_1 + ', activePersonUid=' + this.hwp_1.toString() + ', newMessageText=' + this.iwp_1 + ', dayOfWeekStrings=' + this.jwp_1 + ', localDateTimeNow=' + this.kwp_1 + ', showSocialWarning=' + this.lwp_1 + ')';
  };
  protoOf(MessageListUiState).hashCode = function () {
    var result = hashCode(this.gwp_1);
    result = imul(result, 31) + this.hwp_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.iwp_1) | 0;
    result = imul(result, 31) + hashCode(this.jwp_1) | 0;
    result = imul(result, 31) + this.kwp_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lwp_1) | 0;
    return result;
  };
  protoOf(MessageListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof MessageListUiState ? other : THROW_CCE();
    if (!equals(this.gwp_1, tmp0_other_with_cast.gwp_1))
      return false;
    if (!this.hwp_1.equals(tmp0_other_with_cast.hwp_1))
      return false;
    if (!(this.iwp_1 === tmp0_other_with_cast.iwp_1))
      return false;
    if (!equals(this.jwp_1, tmp0_other_with_cast.jwp_1))
      return false;
    if (!this.kwp_1.equals(tmp0_other_with_cast.kwp_1))
      return false;
    if (!(this.lwp_1 === tmp0_other_with_cast.lwp_1))
      return false;
    return true;
  };
  function ustadAccountManager$factory_1() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc_0(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_1() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6_0(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_1() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5_0(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_3() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_1(receiver);
    }, null);
  }
  function ustadAccountManager$factory_2() {
    return getPropertyCallableRef('ustadAccountManager', 1, KProperty1, function (receiver) {
      return _get_ustadAccountManager__el9prc_0(receiver);
    }, null);
  }
  function showSocialWarningUseCase$factory_2() {
    return getPropertyCallableRef('showSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_showSocialWarningUseCase__ft8jc6_0(receiver);
    }, null);
  }
  function dismissSocialWarningUseCase$factory_2() {
    return getPropertyCallableRef('dismissSocialWarningUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissSocialWarningUseCase__st8mv5_0(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_4() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07_1(receiver);
    }, null);
  }
  function TitleAndLangCode(title, langCode) {
    this.awq_1 = title;
    this.bwq_1 = langCode;
  }
  protoOf(TitleAndLangCode).toString = function () {
    return 'TitleAndLangCode(title=' + this.awq_1 + ', langCode=' + this.bwq_1 + ')';
  };
  protoOf(TitleAndLangCode).hashCode = function () {
    var result = getStringHashCode(this.awq_1);
    result = imul(result, 31) + getStringHashCode(this.bwq_1) | 0;
    return result;
  };
  protoOf(TitleAndLangCode).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TitleAndLangCode))
      return false;
    var tmp0_other_with_cast = other instanceof TitleAndLangCode ? other : THROW_CCE();
    if (!(this.awq_1 === tmp0_other_with_cast.awq_1))
      return false;
    if (!(this.bwq_1 === tmp0_other_with_cast.bwq_1))
      return false;
    return true;
  };
  function _get_statementRecorder__l4o9jw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pwg_1;
    statementRecorder$factory();
    return this_0.t2();
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0) {
    return function () {
      var titleAndLangCodeVal = this$0.lwf();
      var tmp = this$0.owg_1.hj4_1;
      var tmp_0;
      if (!(titleAndLangCodeVal == null)) {
        tmp_0 = mapOf_0(to(titleAndLangCodeVal.bwq_1, titleAndLangCodeVal.awq_1));
      } else {
        tmp_0 = null;
      }
      return new XapiActivityStatementObject(VOID, tmp, new XapiActivity(tmp_0));
    };
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.apd(this$0.nwg_1);
      var tmp_0 = this$0.bpc();
      return this$0.mwg_1.nos(tmp, tmp_0, AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0));
    };
  }
  function AbstractNonInteractiveContentViewModel(di, savedStateHandle, destName) {
    UstadViewModel.call(this, di, savedStateHandle, destName);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = get_direct(onActiveEndpoint(di)).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp.mwg_1 = tmp_0.i5e(tmp$ret$0, null);
    var tmp_2 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.nwg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.owg_1 = this.apd(this.nwg_1);
    var tmp_3 = this;
    tmp_3.pwg_1 = lazy_0(AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this));
  }
  protoOf(AbstractNonInteractiveContentViewModel).gos = function (oneCompletionStatementOnly) {
    _get_statementRecorder__l4o9jw(this).gos(oneCompletionStatementOnly);
  };
  protoOf(AbstractNonInteractiveContentViewModel).qwg = function (oneCompletionStatementOnly, $super) {
    oneCompletionStatementOnly = oneCompletionStatementOnly === VOID ? false : oneCompletionStatementOnly;
    var tmp;
    if ($super === VOID) {
      this.gos(oneCompletionStatementOnly);
      tmp = Unit_instance;
    } else {
      tmp = $super.gos.call(this, oneCompletionStatementOnly);
    }
    return tmp;
  };
  protoOf(AbstractNonInteractiveContentViewModel).fos = function (progress) {
    _get_statementRecorder__l4o9jw(this).fos(progress);
  };
  protoOf(AbstractNonInteractiveContentViewModel).sor = function (active) {
    _get_statementRecorder__l4o9jw(this).sor(active);
  };
  protoOf(AbstractNonInteractiveContentViewModel).jl8 = function () {
    _get_statementRecorder__l4o9jw(this).jl8();
    protoOf(UstadViewModel).jl8.call(this);
  };
  protoOf(AbstractNonInteractiveContentViewModel).ios = function () {
    _get_statementRecorder__l4o9jw(this).ios();
  };
  function statementRecorder$factory() {
    return getPropertyCallableRef('statementRecorder', 1, KProperty1, function (receiver) {
      return _get_statementRecorder__l4o9jw(receiver);
    }, null);
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.kwq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).mwq = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).he = function (p1, $completion) {
    return this.mwq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).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.lwq_1.c7l().rgh(this.kwq_1.qph_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              var tmp_1;
              var tmp0_safe_receiver_0 = tmp0_safe_receiver.igi_1;
              var tmp_2;
              if (tmp0_safe_receiver_0 == null) {
                tmp_2 = null;
              } else {
                tmp_2 = !(!tmp0_safe_receiver_0.lfx_1.equals(new Long(0, 0)) ? !tmp0_safe_receiver_0.lfx_1.equals(this.kwq_1.cpc()) : false);
              }
              var tmp1_elvis_lhs = tmp_2;
              if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {
                tmp_1 = tmp0_safe_receiver;
              } else {
                tmp_1 = null;
              }
              tmp_0 = tmp_1;
            }

            return tmp_0;
          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);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).tmw = function (db, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this.kwq_1, completion);
    i.lwq_1 = db;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mwq(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).vwq = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).r7e = function ($completion) {
    return this.vwq($completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).q7e = function (completion) {
    return new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(completion);
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_2(resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.vwq($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.twr_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bws(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_getLocaleForSiteTermsUseCase__hxw5id($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vwr_1;
    getLocaleForSiteTermsUseCase$factory_0();
    return this_0.t2();
  }
  function updateStatus($this, status) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this.twr_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
        var tmp1_safe_receiver = prevValue.wwr_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.wwr_1.igi_1;
          var tmp_0;
          if (tmp0_safe_receiver == null) {
            tmp_0 = null;
          } else {
            tmp_0 = shallowCopy_11(tmp0_safe_receiver, ParentalConsentManagementViewModel$updateStatus$lambda(status, $this));
          }
          tmp = tmp1_safe_receiver.yju(tmp_0);
        }
        var nextValue = prevValue.bws(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    var tmp0_safe_receiver_0 = newState.wwr_1;
    var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.igi_1;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
      var tmp_1 = $this.bpc();
      launch(tmp_1, VOID, VOID, ParentalConsentManagementViewModel$updateStatus$slambda_0($this, tmp1_safe_receiver_0, null));
    }
    $this.gpc().bow(new Snack($this.ipc().rnd(strings_getInstance().bmg_1)));
  }
  function Companion_163() {
    this.cws_1 = 'ParentalConsentManagement';
  }
  var Companion_instance_211;
  function Companion_getInstance_181() {
    return Companion_instance_211;
  }
  function ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation) {
    this.lws_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).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;
            var tmp_0 = Companion_instance_45.s4x();
            var tmp_1 = ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this.lws_1, null);
            var tmp_2 = ParentalConsentManagementViewModel$lambda$slambda$slambda_2(null);
            suspendResult = this.lws_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, ParentalConsentManagementViewModel$lambda$slambda$lambda(this.lws_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.lws_1.twr_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.bws(VOID, VOID, VOID, !(prevValue.wwr_1 == null));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this.lws_1, completion);
    i.mws_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation) {
    this.vws_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.xws_1 = this.vws_1.epc().b7l();
            this.hd_1 = 1;
            suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id(this.vws_1).dod(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.yws_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.xws_1.bhb(this.yws_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var terms = suspendResult;
            l$ret$1: do {
              var this_0 = this.vws_1.twr_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.bws(VOID, VOID, terms);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this.vws_1, completion);
    i.wws_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda_2(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.opb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mov(VOID, VOID, this$0.ipc().rnd(strings_getInstance().smb_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.bpc();
      launch(tmp, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_0(this$0, null));
      var tmp_0 = this$0.bpc();
      launch(tmp_0, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_2(this$0, null));
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$lambda($status, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.rfx_1 = $status;
      $this$shallowCopy.lfx_1 = this$0.cpc();
      $this$shallowCopy.sfx_1 = systemTimeInMillis();
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation) {
    this.hwt_1 = this$0;
    this.iwt_1 = $personParentJoin;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).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.hwt_1.epc().c7l().sgh(this.iwt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this.hwt_1, this.iwt_1, completion);
    i.jwt_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$updateStatus$slambda_0(this$0, $personParentJoin, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ParentalConsentManagement');
    this.twr_1 = MutableStateFlow(new ParentalConsentManagementUiState());
    this.uwr_1 = asStateFlow(this.twr_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.m5d(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.vwr_1 = Instance(this_0, tmp$ret$3, null).f5j(this, getLocaleForSiteTermsUseCase$factory());
    Companion_getInstance_120();
    var tmp_3 = mapOf_0(to('entityUid', this.qph_1.toString()));
    this.xpc(true, tmp_3, ParentalConsentManagementViewModel$lambda(this));
  }
  protoOf(ParentalConsentManagementViewModel).kwt = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.twr_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.wwr_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yju(personParentJoin);
        var tmp1_safe_receiver = prevValue.wwr_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.igi_1;
        var tmp_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nfx_1;
        var nextValue = prevValue.bws(tmp, this.vpi(tmp_0, personParentJoin == null ? null : personParentJoin.nfx_1, prevValue.xwr_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ParentalConsentManagementViewModel).lwt = function () {
    var tmp0_safe_receiver = this.twr_1.t2().wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nfx_1;
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
      tmp = listOf([1, 2, 4]).a1(tmp2_safe_receiver);
    }
    if (!(tmp === true)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.twr_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
          var nextValue = prevValue.bws(VOID, this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    updateStatus(this, 1);
  };
  protoOf(ParentalConsentManagementViewModel).mwt = function () {
    updateStatus(this, 2);
  };
  protoOf(ParentalConsentManagementViewModel).nwt = function () {
    var tmp0_safe_receiver = this.twr_1.t2().wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rfx_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var currentStatus = tmp;
    var tmp_0;
    if (currentStatus === 2) {
      tmp_0 = 1;
    } else {
      tmp_0 = 2;
    }
    updateStatus(this, tmp_0);
  };
  function ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? null : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? null : relationshipError;
    siteTerms = siteTerms === VOID ? null : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    appName = appName === VOID ? 'Ustad Mobile' : appName;
    this.wwr_1 = parentJoinAndMinor;
    this.xwr_1 = relationshipError;
    this.ywr_1 = siteTerms;
    this.zwr_1 = fieldsEnabled;
    this.aws_1 = appName;
  }
  protoOf(ParentalConsentManagementUiState).owt = function () {
    var tmp0_safe_receiver = this.wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lfx_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).pwt = function () {
    var tmp0_safe_receiver = this.wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lfx_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).qwt = function () {
    var tmp0_safe_receiver = this.wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lfx_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).rwt = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-changeConsentButtonVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lfx_1;
    return !(it == null) ? !equals(it, new Long(0, 0)) : false;
  };
  protoOf(ParentalConsentManagementUiState).swt = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-consentStatusVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rfx_1;
    return !(it == null) ? !(it === 0) : false;
  };
  protoOf(ParentalConsentManagementUiState).twt = function () {
    var tmp0_safe_receiver = this.wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rfx_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().pmb_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().qmb_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).uwt = function () {
    var tmp0_safe_receiver = this.wwr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.igi_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rfx_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().nmb_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().omb_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).vwt = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    return new ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).bws = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName, $super) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? this.wwr_1 : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? this.xwr_1 : relationshipError;
    siteTerms = siteTerms === VOID ? this.ywr_1 : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? this.zwr_1 : fieldsEnabled;
    appName = appName === VOID ? this.aws_1 : appName;
    return $super === VOID ? this.vwt(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) : $super.vwt.call(this, parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).toString = function () {
    return 'ParentalConsentManagementUiState(parentJoinAndMinor=' + this.wwr_1 + ', relationshipError=' + this.xwr_1 + ', siteTerms=' + this.ywr_1 + ', fieldsEnabled=' + this.zwr_1 + ', appName=' + this.aws_1 + ')';
  };
  protoOf(ParentalConsentManagementUiState).hashCode = function () {
    var result = this.wwr_1 == null ? 0 : this.wwr_1.hashCode();
    result = imul(result, 31) + (this.xwr_1 == null ? 0 : getStringHashCode(this.xwr_1)) | 0;
    result = imul(result, 31) + (this.ywr_1 == null ? 0 : hashCode(this.ywr_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zwr_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.aws_1) | 0;
    return result;
  };
  protoOf(ParentalConsentManagementUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ParentalConsentManagementUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ParentalConsentManagementUiState ? other : THROW_CCE();
    if (!equals(this.wwr_1, tmp0_other_with_cast.wwr_1))
      return false;
    if (!(this.xwr_1 == tmp0_other_with_cast.xwr_1))
      return false;
    if (!equals(this.ywr_1, tmp0_other_with_cast.ywr_1))
      return false;
    if (!(this.zwr_1 === tmp0_other_with_cast.zwr_1))
      return false;
    if (!(this.aws_1 === tmp0_other_with_cast.aws_1))
      return false;
    return true;
  };
  function getLocaleForSiteTermsUseCase$factory() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function getLocaleForSiteTermsUseCase$factory_0() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function _get_httpClient__2ty1zc_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ywu_1;
    httpClient$factory_12();
    return this_0.t2();
  }
  function Companion_164() {
    this.zwu_1 = 'PdfContent';
  }
  var Companion_instance_212;
  function Companion_getInstance_182() {
    return Companion_instance_212;
  }
  function PdfContentViewModel$slambda(this$0, resultContinuation) {
    this.iwv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PdfContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PdfContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PdfContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.iwv_1.epc().n7l().ubh(this.iwv_1.vwu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.kwv_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.kwv_1 == null) {
              return Unit_instance;
            } else {
              tmp_1 = this.kwv_1;
            }

            tmp_0.lwv_1 = tmp_1;
            this.mwv_1 = ensureNotNull(this.lwv_1.zap_1);
            var tmp_2 = this;
            tmp_2.nwv_1 = this.iwv_1.r4x();
            var tmp_3 = this;
            tmp_3.owv_1 = _get_httpClient__2ty1zc_5(this.iwv_1);
            var tmp_4 = this;
            tmp_4.pwv_1 = this.mwv_1;
            var tmp_5 = this;
            tmp_5.qwv_1 = this.owv_1;
            var tmp_6 = this;
            tmp_6.rwv_1 = this.qwv_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.pwv_1);
            tmp_7.swv_1 = this_0;
            this.swv_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_8 = this;
            tmp_8.twv_1 = this.rwv_1;
            var tmp_9 = this;
            tmp_9.uwv_1 = this.swv_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.uwv_1, this.twv_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.vwv_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.vwv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.wwv_1 = suspendResult;
            var tmp_10 = this;
            var this_1 = this.nwv_1.y4b();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_10.xwv_1 = this.nwv_1.x4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.wwv_1);
            var tmp_11 = this;
            var tmp1_elvis_lhs = this.lwv_1.xap_1;
            var tmp_12;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_12 = tmp1_elvis_lhs;
            }

            tmp_11.ywv_1 = tmp_12;
            this.zwv_1 = UrlKmp(this.mwv_1).bnw(this.ywv_1).toString();
            this.aww_1 = bodyDataUrlForUri(this.xwv_1, this.ywv_1);
            l$ret$1: do {
              var this_3 = this.iwv_1.wwu_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.eww(this.zwv_1, this.aww_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 4;
            suspendResult = this.iwv_1.epc().a7k().can(this.lwv_1.wap_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var contentEntry = suspendResult;
            l$ret$3: do {
              var this_4 = this.iwv_1.opb_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp1_elvis_lhs_0 = contentEntry == null ? null : contentEntry.yan_1;
                var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp1_elvis_lhs_0 == null ? '' : tmp1_elvis_lhs_0);
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PdfContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PdfContentViewModel$slambda(this.iwv_1, completion);
    i.jwv_1 = $this$launch;
    return i;
  };
  function PdfContentViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PdfContentViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PdfContentViewModel(di, savedStateHandle) {
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'PdfContent');
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.vwu_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.wwu_1 = MutableStateFlow(new PdfContentUiState());
    this.xwu_1 = asStateFlow(this.wwu_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.ywu_1 = Instance(di, tmp$ret$0, null).f5j(this, httpClient$factory_11());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, PdfContentViewModel$slambda_0(this, null));
  }
  protoOf(PdfContentViewModel).lwf = function () {
    var tmp0_safe_receiver = this.wwu_1.t2().dww_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<get-titleAndLangCode>.<anonymous>' call
      var titleVal = tmp0_safe_receiver.yan_1;
      var langVal = 'en';
      var tmp_0;
      if (!(titleVal == null) ? !(langVal == null) : false) {
        tmp_0 = new TitleAndLangCode(titleVal, langVal);
      } else {
        tmp_0 = null;
      }
      tmp = tmp_0;
    }
    return tmp;
  };
  function PdfContentUiState(pdfUrl, dataUrl, contentEntry) {
    pdfUrl = pdfUrl === VOID ? null : pdfUrl;
    dataUrl = dataUrl === VOID ? null : dataUrl;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    this.bww_1 = pdfUrl;
    this.cww_1 = dataUrl;
    this.dww_1 = contentEntry;
  }
  protoOf(PdfContentUiState).fww = function (pdfUrl, dataUrl, contentEntry) {
    return new PdfContentUiState(pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).eww = function (pdfUrl, dataUrl, contentEntry, $super) {
    pdfUrl = pdfUrl === VOID ? this.bww_1 : pdfUrl;
    dataUrl = dataUrl === VOID ? this.cww_1 : dataUrl;
    contentEntry = contentEntry === VOID ? this.dww_1 : contentEntry;
    return $super === VOID ? this.fww(pdfUrl, dataUrl, contentEntry) : $super.fww.call(this, pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).toString = function () {
    return 'PdfContentUiState(pdfUrl=' + this.bww_1 + ', dataUrl=' + this.cww_1 + ', contentEntry=' + this.dww_1 + ')';
  };
  protoOf(PdfContentUiState).hashCode = function () {
    var result = this.bww_1 == null ? 0 : getStringHashCode(this.bww_1);
    result = imul(result, 31) + (this.cww_1 == null ? 0 : getStringHashCode(this.cww_1)) | 0;
    result = imul(result, 31) + (this.dww_1 == null ? 0 : this.dww_1.hashCode()) | 0;
    return result;
  };
  protoOf(PdfContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PdfContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PdfContentUiState ? other : THROW_CCE();
    if (!(this.bww_1 == tmp0_other_with_cast.bww_1))
      return false;
    if (!(this.cww_1 == tmp0_other_with_cast.cww_1))
      return false;
    if (!equals(this.dww_1, tmp0_other_with_cast.dww_1))
      return false;
    return true;
  };
  function httpClient$factory_11() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function httpClient$factory_12() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function PersonViewModelConstants() {
    this.gww_1 = 'goToOnPersonSelected';
    this.hww_1 = 'popUpToOnPersonSelected';
  }
  var PersonViewModelConstants_instance;
  function PersonViewModelConstants_getInstance() {
    return PersonViewModelConstants_instance;
  }
  function PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.qww_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda).tww = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.tww(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.rww_1.s7j().kfu(this.qww_1.qph_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.sww_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.rww_1.u7l();
            var tmp_1 = this.qww_1.cpc();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.lhj(tmp_1, new Long(131072, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var hasResetPermission = suspendResult;
            var tmp_2;
            if (this.sww_1 == null) {
              tmp_2 = null;
            } else {
              var tmp_3 = this.sww_1.y9b_1 == null ? 1 : hasResetPermission ? 2 : 3;
              var tmp_4 = this.sww_1.x9b_1;
              var tmp0_elvis_lhs = this.sww_1.y9b_1;
              tmp_2 = new PersonUsernameAndPasswordModel(tmp_3, tmp_4, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '', '');
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this.qww_1, completion);
    i.rww_1 = db;
    return i;
  };
  function PersonAccountEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.tww(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).cwx = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.cwx($completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new PersonAccountEditViewModel$slambda$slambda_1(completion);
  };
  function PersonAccountEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.cwx($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonAccountEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.awy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mwy(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonAccountEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.vwy_1 = this$0;
    this.wwy_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = _get_authManager__mo6de4(this.vwy_1).emr(this.vwy_1.qph_1, this.wwy_1.cwz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.vwy_1.epc().s7j().qfu(this.vwy_1.qph_1, this.wwy_1.awz_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var numChanges = suspendResult;
            Napier_getInstance().v5k('Updated username: ' + numChanges + ' changes');
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this.vwy_1, this.wwy_1, completion);
    i.xwy_1 = it;
    return i;
  };
  function PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_authManager__mo6de4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cwy_1;
    authManager$factory_0();
    return this_0.t2();
  }
  function _get_setPasswordUseCase__c0ja9b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dwy_1;
    setPasswordUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_165() {
    this.dwz_1 = 'AccountEdit';
    this.ewz_1 = 1;
    this.fwz_1 = 2;
    this.gwz_1 = 3;
  }
  var Companion_instance_213;
  function Companion_getInstance_183() {
    return Companion_instance_213;
  }
  function PersonAccountEditViewModel$slambda(this$0, resultContinuation) {
    this.pwz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.pwz_1.qph_1.equals(this.pwz_1.cpc())) {
              var tmp_0 = this;
              tmp_0.rwz_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.qwz_1.u7l();
              var tmp_2 = this.pwz_1.cpc();
              PermissionFlags_getInstance();
              suspendResult = tmp_1.lhj(tmp_2, new Long(32768, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.rwz_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.rwz_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda).tmw = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda(this.pwz_1, completion);
    i.qwz_1 = db;
    return i;
  };
  function PersonAccountEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda_1(this$0, resultContinuation) {
    this.ax0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).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;
            var tmp_0 = Companion_instance_214.s4x();
            var tmp_1 = PersonAccountEditViewModel$slambda$slambda_0(this.ax0_1, null);
            var tmp_2 = PersonAccountEditViewModel$slambda$slambda_2(null);
            suspendResult = this.ax0_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonAccountEditViewModel$slambda$lambda(this.ax0_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.ax0_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.ax0_1.ipc().rnd(strings_getInstance().hm3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, PersonAccountEditViewModel$onClickSave$ref(this.ax0_1));
                var tmp1_loadingState = Companion_getInstance_93().uov_1;
                var nextValue = prevValue.mov(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.ax0_1.awy_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mwy(VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new PersonAccountEditViewModel$slambda_1(this.ax0_1, completion);
    i.bx0_1 = $this$launchIfHasPermission;
    return i;
  };
  function PersonAccountEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.kx0_1 = $commitDelay;
    this.lx0_1 = $entity;
    this.mx0_1 = $this;
    this.nx0_1 = $key;
    this.ox0_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.kx0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.lx0_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.mx0_1.opc(this.mx0_1.kpb_1, this.nx0_1, this.ox0_1, this.lx0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda(this.kx0_1, this.lx0_1, this.mx0_1, this.nx0_1, this.ox0_1, completion);
    i.px0_1 = $this$launch;
    return i;
  };
  function PersonAccountEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation) {
    this.yx0_1 = $entity;
    this.zx0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            if (this.yx0_1.ywy_1 === 1) {
              var validationResult = this.zx0_1.ewy_1.io3(this.yx0_1.awz_1);
              this.zx0_1.kpc(Companion_getInstance_93().uov_1);
              if (!validationResult.equals(Companion_getInstance_71().roe_1)) {
                l$ret$1: do {
                  var this_0 = this.zx0_1.awy_1;
                  while (true) {
                    var prevValue = this_0.t2();
                    var tmp0_safe_receiver = validationResult.woe_1;
                    var tmp_0;
                    if (tmp0_safe_receiver == null) {
                      tmp_0 = null;
                    } else {
                      tmp_0 = this.zx0_1.ipc().rnd(tmp0_safe_receiver);
                    }
                    var tmp1_usernameError = tmp_0;
                    var nextValue = prevValue.mwy(VOID, tmp1_usernameError, VOID, VOID, VOID, true);
                    if (this_0.y1k(prevValue, nextValue)) {
                      break l$ret$1;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }
            }

            if (isBlank(this.yx0_1.cwz_1)) {
              l$ret$3: do {
                var this_1 = this.zx0_1.awy_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.mwy(VOID, VOID, VOID, this.zx0_1.ipc().rnd(strings_getInstance().ilo_1));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.yx0_1.ywy_1 === 3 ? isBlank(this.yx0_1.bwz_1) : false)
              if (this.zx0_1.awy_1.t2().bsj()) {
                this.zx0_1.kpc(Companion_getInstance_93().uov_1);
                l$ret$5: do {
                  var this_2 = this.zx0_1.awy_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.mwy(VOID, VOID, VOID, VOID, VOID, true);
                    if (this_2.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }

            if (this.yx0_1.ywy_1 === 1) {
              this.hd_1 = 6;
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = _get_setPasswordUseCase__c0ja9b(this.zx0_1).qnc(this.zx0_1.cpc(), this.yx0_1.zwy_1, this.yx0_1.awz_1, this.yx0_1.cwz_1, this.yx0_1.ywy_1 === 3 ? this.yx0_1.bwz_1 : null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.zx0_1.gpc().bow(new Snack(this.zx0_1.ipc().rnd(strings_getInstance().pmm_1)));
            var tmp_1 = this;
            this.zx0_1.tph(null);
            tmp_1.cx1_1 = Unit_instance;
            this.id_1 = 14;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Exception) {
              this.dx1_1 = this.kd_1;
              var tmp_3 = this;
              var tmp_4;
              var tmp_5 = this.dx1_1;
              if (tmp_5 instanceof UnauthorizedException) {
                l$ret$19: do {
                  var this_3 = this.zx0_1.awy_1;
                  while (true) {
                    var prevValue_2 = this_3.t2();
                    var nextValue_2 = prevValue_2.mwy(VOID, VOID, this.zx0_1.ipc().rnd(strings_getInstance().olj_1));
                    if (this_3.y1k(prevValue_2, nextValue_2)) {
                      break l$ret$19;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_instance;
              } else {
                l$ret$21: do {
                  var this_4 = this.zx0_1.awy_1;
                  while (true) {
                    var prevValue_3 = this_4.t2();
                    var nextValue_3 = prevValue_3.mwy(VOID, VOID, VOID, VOID, this.dx1_1.message);
                    if (this_4.y1k(prevValue_3, nextValue_3)) {
                      break l$ret$21;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_instance;
              }
              tmp_3.cx1_1 = tmp_4;
              this.id_1 = 14;
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 14;
            this.ex1_1 = this.kd_1;
            this.zx0_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$23: do {
              var this_5 = this.zx0_1.awy_1;
              while (true) {
                var prevValue_4 = this_5.t2();
                var nextValue_4 = prevValue_4.mwy(VOID, VOID, VOID, VOID, VOID, true);
                if (this_5.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$23;
                }
              }
            }
             while (false);
            throw this.ex1_1;
          case 5:
            this.id_1 = 14;
            this.zx0_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$25: do {
              var this_6 = this.zx0_1.awy_1;
              while (true) {
                var prevValue_5 = this_6.t2();
                var nextValue_5 = prevValue_5.mwy(VOID, VOID, VOID, VOID, VOID, true);
                if (this_6.y1k(prevValue_5, nextValue_5)) {
                  break l$ret$25;
                }
              }
            }
             while (false);
            this.hd_1 = 13;
            continue $sm;
          case 6:
            this.id_1 = 11;
            this.id_1 = 10;
            this.hd_1 = 7;
            suspendResult = this.zx0_1.epc().s7j().ifu(this.yx0_1.awz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.fx1_1 = suspendResult;
            if (this.fx1_1 === 0) {
              this.hd_1 = 8;
              var tmp_6 = this.zx0_1.epc();
              suspendResult = withDoorTransactionAsync(tmp_6, VOID, PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this.zx0_1, this.yx0_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$7: do {
                var this_7 = this.zx0_1.awy_1;
                while (true) {
                  var prevValue_6 = this_7.t2();
                  var nextValue_6 = prevValue_6.mwy(VOID, this.zx0_1.ipc().rnd(strings_getInstance().ym7_1));
                  if (this_7.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            this.zx0_1.tph(null);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.bx1_1 = Unit_instance;
            this.id_1 = 14;
            this.hd_1 = 12;
            continue $sm;
          case 10:
            this.id_1 = 11;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Exception) {
              var e = this.kd_1;
              var tmp_8 = this;
              l$ret$11: do {
                var this_8 = this.zx0_1.awy_1;
                while (true) {
                  var prevValue_7 = this_8.t2();
                  var nextValue_7 = prevValue_7.mwy(VOID, this.zx0_1.ipc().rnd(strings_getInstance().plj_1));
                  if (this_8.y1k(prevValue_7, nextValue_7)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
              tmp_8.bx1_1 = Unit_instance;
              this.id_1 = 14;
              this.hd_1 = 12;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 11:
            this.id_1 = 14;
            var t = this.kd_1;
            this.zx0_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$13: do {
              var this_9 = this.zx0_1.awy_1;
              while (true) {
                var prevValue_8 = this_9.t2();
                var nextValue_8 = prevValue_8.mwy(VOID, VOID, VOID, VOID, VOID, true);
                if (this_9.y1k(prevValue_8, nextValue_8)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            throw t;
          case 12:
            this.id_1 = 14;
            this.zx0_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$15: do {
              var this_10 = this.zx0_1.awy_1;
              while (true) {
                var prevValue_9 = this_10.t2();
                var nextValue_9 = prevValue_9.mwy(VOID, VOID, VOID, VOID, VOID, true);
                if (this_10.y1k(prevValue_9, nextValue_9)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.hd_1 = 13;
            continue $sm;
          case 13:
            return Unit_instance;
          case 14:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda(this.yx0_1, this.zx0_1, completion);
    i.ax1_1 = $this$launch;
    return i;
  };
  function PersonAccountEditViewModel$onClickSave$slambda_0($entity, this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'AccountEdit');
    this.awy_1 = MutableStateFlow(new PersonAccountEditUiState());
    this.bwy_1 = asStateFlow(this.awy_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.m5d(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.cwy_1 = Instance(this_0, tmp$ret$3, null).f5j(this, authManager$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.apc().kn5();
    var trigger_0 = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_4 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$6 = tmp_4.m5d(tmp$ret$5, context_0);
    var this_1 = On(this, tmp$ret$6, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_3.dwy_1 = Instance(this_1, tmp$ret$8, null).f5j(this, setPasswordUseCase$factory());
    this.ewy_1 = new ValidateUsernameUseCase();
    this.fwy_1 = new FilterUsernameUseCase();
    this.opb_1.x1k(new AppUiState(VOID, Companion_getInstance_93().tov_1));
    var tmp_7 = PersonAccountEditViewModel$slambda_0(this, null);
    this.upc(tmp_7, VOID, VOID, PersonAccountEditViewModel$slambda_2(this, null));
  }
  protoOf(PersonAccountEditViewModel).gx1 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.awy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onEntityChanged.<anonymous>' call
        var tmp;
        var tmp_0 = entity == null ? null : entity.awz_1;
        var tmp1_safe_receiver = this.awy_1.t2().gwy_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.awz_1))) {
          tmp = entity == null ? null : entity.hx1(VOID, VOID, this.fwy_1.po8(entity.awz_1, ''));
        } else {
          tmp = entity;
        }
        var tmp_1 = tmp;
        var tmp_2;
        var tmp_3;
        if (!(prevValue.hwy_1 == null)) {
          var tmp3_safe_receiver = prevValue.gwy_1;
          var tmp_4 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.awz_1;
          tmp_3 = tmp_4 == (entity == null ? null : entity.awz_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.hwy_1;
        } else {
          tmp_2 = null;
        }
        var tmp_5 = tmp_2;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.iwy_1 == null)) {
          var tmp5_safe_receiver = prevValue.gwy_1;
          var tmp_8 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.bwz_1;
          tmp_7 = tmp_8 == (entity == null ? null : entity.bwz_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          tmp_6 = prevValue.iwy_1;
        } else {
          tmp_6 = null;
        }
        var tmp_9 = tmp_6;
        var tmp_10;
        var tmp_11;
        if (!(prevValue.jwy_1 == null)) {
          var tmp7_safe_receiver = prevValue.gwy_1;
          var tmp_12 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.cwz_1;
          tmp_11 = tmp_12 == (entity == null ? null : entity.cwz_1);
        } else {
          tmp_11 = false;
        }
        if (tmp_11) {
          tmp_10 = prevValue.jwy_1;
        } else {
          tmp_10 = null;
        }
        var nextValue = prevValue.mwy(tmp_1, tmp_5, tmp_9, tmp_10);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_214.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver = this.pph_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_13 = this;
    var tmp_14 = this.bpc();
    tmp_13.pph_1 = launch(tmp_14, VOID, VOID, PersonAccountEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonAccountEditViewModel).mq0 = function () {
    if (this.lpc().equals(Companion_getInstance_93().tov_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.awy_1.t2().gwy_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    this.kpc(Companion_getInstance_93().tov_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.awy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.mwy(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, PersonAccountEditViewModel$onClickSave$slambda_0(entity, this, null));
  };
  function PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    personAccount = personAccount === VOID ? new PersonUsernameAndPasswordModel() : personAccount;
    usernameError = usernameError === VOID ? null : usernameError;
    currentPasswordError = currentPasswordError === VOID ? null : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? null : newPasswordError;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.gwy_1 = personAccount;
    this.hwy_1 = usernameError;
    this.iwy_1 = currentPasswordError;
    this.jwy_1 = newPasswordError;
    this.kwy_1 = errorMessage;
    this.lwy_1 = fieldsEnabled;
  }
  protoOf(PersonAccountEditUiState).ix1 = function () {
    var tmp0_safe_receiver = this.gwy_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ywy_1) === 1;
  };
  protoOf(PersonAccountEditUiState).jx1 = function () {
    var tmp0_safe_receiver = this.gwy_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ywy_1) === 3;
  };
  protoOf(PersonAccountEditUiState).bsj = function () {
    return (!(this.hwy_1 == null) ? true : !(this.iwy_1 == null)) ? true : !(this.jwy_1 == null);
  };
  protoOf(PersonAccountEditUiState).kx1 = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    return new PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).mwy = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled, $super) {
    personAccount = personAccount === VOID ? this.gwy_1 : personAccount;
    usernameError = usernameError === VOID ? this.hwy_1 : usernameError;
    currentPasswordError = currentPasswordError === VOID ? this.iwy_1 : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? this.jwy_1 : newPasswordError;
    errorMessage = errorMessage === VOID ? this.kwy_1 : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? this.lwy_1 : fieldsEnabled;
    return $super === VOID ? this.kx1(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) : $super.kx1.call(this, personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).toString = function () {
    return 'PersonAccountEditUiState(personAccount=' + this.gwy_1 + ', usernameError=' + this.hwy_1 + ', currentPasswordError=' + this.iwy_1 + ', newPasswordError=' + this.jwy_1 + ', errorMessage=' + this.kwy_1 + ', fieldsEnabled=' + this.lwy_1 + ')';
  };
  protoOf(PersonAccountEditUiState).hashCode = function () {
    var result = this.gwy_1 == null ? 0 : this.gwy_1.hashCode();
    result = imul(result, 31) + (this.hwy_1 == null ? 0 : getStringHashCode(this.hwy_1)) | 0;
    result = imul(result, 31) + (this.iwy_1 == null ? 0 : getStringHashCode(this.iwy_1)) | 0;
    result = imul(result, 31) + (this.jwy_1 == null ? 0 : getStringHashCode(this.jwy_1)) | 0;
    result = imul(result, 31) + (this.kwy_1 == null ? 0 : getStringHashCode(this.kwy_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lwy_1) | 0;
    return result;
  };
  protoOf(PersonAccountEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonAccountEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonAccountEditUiState ? other : THROW_CCE();
    if (!equals(this.gwy_1, tmp0_other_with_cast.gwy_1))
      return false;
    if (!(this.hwy_1 == tmp0_other_with_cast.hwy_1))
      return false;
    if (!(this.iwy_1 == tmp0_other_with_cast.iwy_1))
      return false;
    if (!(this.jwy_1 == tmp0_other_with_cast.jwy_1))
      return false;
    if (!(this.kwy_1 == tmp0_other_with_cast.kwy_1))
      return false;
    if (!(this.lwy_1 === tmp0_other_with_cast.lwy_1))
      return false;
    return true;
  };
  function Companion_166() {
  }
  protoOf(Companion_166).s4x = function () {
    return $serializer_getInstance_69();
  };
  var Companion_instance_214;
  function Companion_getInstance_184() {
    return Companion_instance_214;
  }
  function $serializer_57() {
    $serializer_instance_57 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.accountedit.PersonUsernameAndPasswordModel', this, 5);
    tmp0_serialDesc.y4l('mode', true);
    tmp0_serialDesc.y4l('personUid', true);
    tmp0_serialDesc.y4l('username', true);
    tmp0_serialDesc.y4l('currentPassword', true);
    tmp0_serialDesc.y4l('newPassword', true);
    this.lx1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_57).v4a = function () {
    return this.lx1_1;
  };
  protoOf($serializer_57).p4m = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_57).x4a = function (decoder) {
    var tmp0_desc = this.lx1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.n4e(tmp0_desc);
    if (tmp9_input.c4f()) {
      tmp4_local0 = tmp9_input.s4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.t4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.x4e(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.x4e(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.x4e(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.s4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.t4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.x4e(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.x4e(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.x4e(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.o4e(tmp0_desc);
    return PersonUsernameAndPasswordModel_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_57).mx1 = function (encoder, value) {
    var tmp0_desc = this.lx1_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.ywy_1 === 1)) {
      tmp1_output.w4f(tmp0_desc, 0, value.ywy_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !value.zwy_1.equals(new Long(0, 0))) {
      tmp1_output.x4f(tmp0_desc, 1, value.zwy_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.awz_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 2, value.awz_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !(value.bwz_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 3, value.bwz_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.cwz_1 === '')) {
      tmp1_output.b4g(tmp0_desc, 4, value.cwz_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_57).w4a = function (encoder, value) {
    return this.mx1(encoder, value instanceof PersonUsernameAndPasswordModel ? value : THROW_CCE());
  };
  var $serializer_instance_57;
  function $serializer_getInstance_69() {
    if ($serializer_instance_57 == null)
      new $serializer_57();
    return $serializer_instance_57;
  }
  function PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_69().lx1_1);
    }
    if (0 === (seen1 & 1))
      $this.ywy_1 = 1;
    else
      $this.ywy_1 = mode;
    if (0 === (seen1 & 2))
      $this.zwy_1 = new Long(0, 0);
    else
      $this.zwy_1 = personUid;
    if (0 === (seen1 & 4))
      $this.awz_1 = '';
    else
      $this.awz_1 = username;
    if (0 === (seen1 & 8))
      $this.bwz_1 = '';
    else
      $this.bwz_1 = currentPassword;
    if (0 === (seen1 & 16))
      $this.cwz_1 = '';
    else
      $this.cwz_1 = newPassword;
    return $this;
  }
  function PersonUsernameAndPasswordModel_init_$Create$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker) {
    return PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, objectCreate(protoOf(PersonUsernameAndPasswordModel)));
  }
  function PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword) {
    mode = mode === VOID ? 1 : mode;
    personUid = personUid === VOID ? new Long(0, 0) : personUid;
    username = username === VOID ? '' : username;
    currentPassword = currentPassword === VOID ? '' : currentPassword;
    newPassword = newPassword === VOID ? '' : newPassword;
    this.ywy_1 = mode;
    this.zwy_1 = personUid;
    this.awz_1 = username;
    this.bwz_1 = currentPassword;
    this.cwz_1 = newPassword;
  }
  protoOf(PersonUsernameAndPasswordModel).nx1 = function (mode, personUid, username, currentPassword, newPassword) {
    return new PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).hx1 = function (mode, personUid, username, currentPassword, newPassword, $super) {
    mode = mode === VOID ? this.ywy_1 : mode;
    personUid = personUid === VOID ? this.zwy_1 : personUid;
    username = username === VOID ? this.awz_1 : username;
    currentPassword = currentPassword === VOID ? this.bwz_1 : currentPassword;
    newPassword = newPassword === VOID ? this.cwz_1 : newPassword;
    return $super === VOID ? this.nx1(mode, personUid, username, currentPassword, newPassword) : $super.nx1.call(this, mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).toString = function () {
    return 'PersonUsernameAndPasswordModel(mode=' + this.ywy_1 + ', personUid=' + this.zwy_1.toString() + ', username=' + this.awz_1 + ', currentPassword=' + this.bwz_1 + ', newPassword=' + this.cwz_1 + ')';
  };
  protoOf(PersonUsernameAndPasswordModel).hashCode = function () {
    var result = this.ywy_1;
    result = imul(result, 31) + this.zwy_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.awz_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.bwz_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.cwz_1) | 0;
    return result;
  };
  protoOf(PersonUsernameAndPasswordModel).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonUsernameAndPasswordModel))
      return false;
    var tmp0_other_with_cast = other instanceof PersonUsernameAndPasswordModel ? other : THROW_CCE();
    if (!(this.ywy_1 === tmp0_other_with_cast.ywy_1))
      return false;
    if (!this.zwy_1.equals(tmp0_other_with_cast.zwy_1))
      return false;
    if (!(this.awz_1 === tmp0_other_with_cast.awz_1))
      return false;
    if (!(this.bwz_1 === tmp0_other_with_cast.bwz_1))
      return false;
    if (!(this.cwz_1 === tmp0_other_with_cast.cwz_1))
      return false;
    return true;
  };
  function authManager$factory() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function authManager$factory_0() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory_0() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function BulkAddPersonRunImportViewModel$slambda$lambda(this$0) {
    return function (numImported, totalRecords) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.jx2_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.sx2(VOID, totalRecords, numImported);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_bulkAddFromUriUseCase__ahhheb($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mx2_1;
    bulkAddFromUriUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_167() {
    this.tx2_1 = 'BulkAddPersonRunImport';
    this.ux2_1 = 'uri';
  }
  var Companion_instance_215;
  function Companion_getInstance_185() {
    return Companion_instance_215;
  }
  function sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(function_0) {
    this.vx2_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0).wx2 = function (numImported, totalRecords) {
    return this.vx2_1(numImported, totalRecords);
  };
  function BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation) {
    this.fx3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonRunImportViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_bulkAddFromUriUseCase__ahhheb(this.fx3_1);
            var tmp_1 = Companion_getInstance_3().q2t(this.fx3_1.lx2_1);
            var tmp_2 = this.fx3_1.cpc();
            var tmp_3 = BulkAddPersonRunImportViewModel$slambda$lambda(this.fx3_1);
            suspendResult = tmp_0.boc(tmp_1, tmp_2, new sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            l$ret$1: do {
              var this_0 = this.fx3_1.jx2_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.sx2(false, VOID, result.eoc_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().v5k('Exception running import', e);
              l$ret$3: do {
                var this_1 = this.fx3_1.jx2_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var tmp0_safe_receiver = e instanceof BulkAddPersonException ? e : null;
                  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vob_1;
                  var nextValue_0 = prevValue_0.sx2(false, VOID, VOID, tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, e.message);
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this.fx3_1, completion);
    i.gx3_1 = $this$launch;
    return i;
  };
  function BulkAddPersonRunImportViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonRunImportViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonRunImport');
    this.jx2_1 = MutableStateFlow(new BulkAddPersonRunImportUiState());
    this.kx2_1 = asStateFlow(this.jx2_1);
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('uri');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No fileUri');
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.lx2_1 = tmp_0;
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(BulkAddPersonsFromLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.mx2_1 = Instance(this_0, tmp$ret$0, null).f5j(this, bulkAddFromUriUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().tmo_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.bpc();
    launch(tmp_3, VOID, VOID, BulkAddPersonRunImportViewModel$slambda_0(this, null));
  }
  function Companion_168() {
    Companion_instance_216 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.hx3_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_47()), null];
  }
  var Companion_instance_216;
  function Companion_getInstance_186() {
    if (Companion_instance_216 == null)
      new Companion_168();
    return Companion_instance_216;
  }
  function $serializer_58() {
    $serializer_instance_58 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportUiState', this, 5);
    tmp0_serialDesc.y4l('inProgress', true);
    tmp0_serialDesc.y4l('totalRecords', true);
    tmp0_serialDesc.y4l('numImported', true);
    tmp0_serialDesc.y4l('errors', true);
    tmp0_serialDesc.y4l('errorMessage', true);
    this.ix3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_58).v4a = function () {
    return this.ix3_1;
  };
  protoOf($serializer_58).p4m = function () {
    var tmp0_cached = Companion_getInstance_186().hx3_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), tmp0_cached[3], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_58).x4a = function (decoder) {
    var tmp0_desc = this.ix3_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = 0;
    var tmp6_local2 = 0;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.n4e(tmp0_desc);
    var tmp10_cached = Companion_getInstance_186().hx3_1;
    if (tmp9_input.c4f()) {
      tmp4_local0 = tmp9_input.p4e(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.s4e(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.s4e(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.z4e(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.d4f(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.p4e(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.s4e(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.s4e(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.z4e(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.b4f(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.o4e(tmp0_desc);
    return BulkAddPersonRunImportUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_58).jx3 = function (encoder, value) {
    var tmp0_desc = this.ix3_1;
    var tmp1_output = encoder.n4e(tmp0_desc);
    var tmp2_cached = Companion_getInstance_186().hx3_1;
    if (tmp1_output.j4g(tmp0_desc, 0) ? true : !(value.nx2_1 === true)) {
      tmp1_output.t4f(tmp0_desc, 0, value.nx2_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 1) ? true : !(value.ox2_1 === 0)) {
      tmp1_output.w4f(tmp0_desc, 1, value.ox2_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 2) ? true : !(value.px2_1 === 0)) {
      tmp1_output.w4f(tmp0_desc, 2, value.px2_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 3) ? true : !equals(value.qx2_1, emptyList())) {
      tmp1_output.d4g(tmp0_desc, 3, tmp2_cached[3], value.qx2_1);
    }
    if (tmp1_output.j4g(tmp0_desc, 4) ? true : !(value.rx2_1 == null)) {
      tmp1_output.f4g(tmp0_desc, 4, StringSerializer_getInstance(), value.rx2_1);
    }
    tmp1_output.o4e(tmp0_desc);
  };
  protoOf($serializer_58).w4a = function (encoder, value) {
    return this.jx3(encoder, value instanceof BulkAddPersonRunImportUiState ? value : THROW_CCE());
  };
  var $serializer_instance_58;
  function $serializer_getInstance_70() {
    if ($serializer_instance_58 == null)
      new $serializer_58();
    return $serializer_instance_58;
  }
  function BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_70().ix3_1);
    }
    if (0 === (seen1 & 1))
      $this.nx2_1 = true;
    else
      $this.nx2_1 = inProgress;
    if (0 === (seen1 & 2))
      $this.ox2_1 = 0;
    else
      $this.ox2_1 = totalRecords;
    if (0 === (seen1 & 4))
      $this.px2_1 = 0;
    else
      $this.px2_1 = numImported;
    if (0 === (seen1 & 8))
      $this.qx2_1 = emptyList();
    else
      $this.qx2_1 = errors;
    if (0 === (seen1 & 16))
      $this.rx2_1 = null;
    else
      $this.rx2_1 = errorMessage;
    return $this;
  }
  function BulkAddPersonRunImportUiState_init_$Create$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker) {
    return BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonRunImportUiState)));
  }
  function BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage) {
    Companion_getInstance_186();
    inProgress = inProgress === VOID ? true : inProgress;
    totalRecords = totalRecords === VOID ? 0 : totalRecords;
    numImported = numImported === VOID ? 0 : numImported;
    errors = errors === VOID ? emptyList() : errors;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.nx2_1 = inProgress;
    this.ox2_1 = totalRecords;
    this.px2_1 = numImported;
    this.qx2_1 = errors;
    this.rx2_1 = errorMessage;
  }
  protoOf(BulkAddPersonRunImportUiState).bsj = function () {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.qx2_1.c1()) {
      tmp = true;
    } else {
      tmp = !(this.rx2_1 == null);
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).enx = function () {
    var tmp;
    if (this.ox2_1 > 0) {
      tmp = this.px2_1 / this.ox2_1;
    } else {
      tmp = 0.0;
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).kx3 = function (inProgress, totalRecords, numImported, errors, errorMessage) {
    return new BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).sx2 = function (inProgress, totalRecords, numImported, errors, errorMessage, $super) {
    inProgress = inProgress === VOID ? this.nx2_1 : inProgress;
    totalRecords = totalRecords === VOID ? this.ox2_1 : totalRecords;
    numImported = numImported === VOID ? this.px2_1 : numImported;
    errors = errors === VOID ? this.qx2_1 : errors;
    errorMessage = errorMessage === VOID ? this.rx2_1 : errorMessage;
    return $super === VOID ? this.kx3(inProgress, totalRecords, numImported, errors, errorMessage) : $super.kx3.call(this, inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).toString = function () {
    return 'BulkAddPersonRunImportUiState(inProgress=' + this.nx2_1 + ', totalRecords=' + this.ox2_1 + ', numImported=' + this.px2_1 + ', errors=' + this.qx2_1 + ', errorMessage=' + this.rx2_1 + ')';
  };
  protoOf(BulkAddPersonRunImportUiState).hashCode = function () {
    var result = getBooleanHashCode(this.nx2_1);
    result = imul(result, 31) + this.ox2_1 | 0;
    result = imul(result, 31) + this.px2_1 | 0;
    result = imul(result, 31) + hashCode(this.qx2_1) | 0;
    result = imul(result, 31) + (this.rx2_1 == null ? 0 : getStringHashCode(this.rx2_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonRunImportUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonRunImportUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonRunImportUiState ? other : THROW_CCE();
    if (!(this.nx2_1 === tmp0_other_with_cast.nx2_1))
      return false;
    if (!(this.ox2_1 === tmp0_other_with_cast.ox2_1))
      return false;
    if (!(this.px2_1 === tmp0_other_with_cast.px2_1))
      return false;
    if (!equals(this.qx2_1, tmp0_other_with_cast.qx2_1))
      return false;
    if (!(this.rx2_1 == tmp0_other_with_cast.rx2_1))
      return false;
    return true;
  };
  function bulkAddFromUriUseCase$factory() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function bulkAddFromUriUseCase$factory_0() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda(it) {
    return Unit_instance;
  }
  function _get_openBlobUiUseCase__fzusqz_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ix4_1;
    openBlobUiUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_169() {
    this.jx4_1 = 'BulkAddPersonSelectFile';
  }
  var Companion_instance_217;
  function Companion_getInstance_187() {
    return Companion_instance_217;
  }
  function BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation) {
    this.sx4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).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;
            var tmp_0 = this.tx4_1.u7l();
            var tmp_1 = this.sx4_1.cpc();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ohj(tmp_1, tmp_2, new Long(8192, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            return it.wde_1 ? it.xde_1 : false;
          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);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).tmw = function (db, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this.sx4_1, completion);
    i.tx4_1 = db;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.gx4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.yx4(VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(completion);
    i.hx5_1 = $this$launchIfHasPermission;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$slambda_2(resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation) {
    this.qx5_1 = this$0;
    this.rx5_1 = $templatePath;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_openBlobUiUseCase__fzusqz_1(this.qx5_1);
            var tmp_1 = new OpenBlobItem(this.rx5_1, 'text/csv', 'bulk-add-persons-template.csv', new Long(186, 0));
            suspendResult = tmp_0.tnj(tmp_1, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda, OpenBlobIntent_SEND_getInstance(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              printStackTrace(e);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).v1m = function ($this$launch, completion) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this.qx5_1, this.rx5_1, completion);
    i.sx5_1 = $this$launch;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this$0, $templatePath, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonSelectFile');
    this.gx4_1 = MutableStateFlow(new BulkAddPersonSelectFileUiState());
    this.hx4_1 = asStateFlow(this.gx4_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.ix4_1 = Instance(this_0, tmp$ret$0, null).f5j(this, openBlobUiUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().tmo_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = BulkAddPersonSelectFileViewModel$slambda_0(this, null);
    var tmp_2 = BulkAddPersonSelectFileViewModel$lambda(this);
    this.tpc(tmp_1, true, tmp_2, BulkAddPersonSelectFileViewModel$slambda_2(null));
  }
  protoOf(BulkAddPersonSelectFileViewModel).tx5 = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gx4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.onFileSelected.<anonymous>' call
        var nextValue = prevValue.yx4(uri, name);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(BulkAddPersonSelectFileViewModel).ux5 = function () {
    var tmp0_elvis_lhs = this.gx4_1.t2().ux4_1;
    this.mpb_1.fo0('BulkAddPersonRunImport', mapOf_0(to('uri', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  protoOf(BulkAddPersonSelectFileViewModel).vx5 = function () {
    var templatePath = this.apc().kn5().hmr_1 + 'staticfiles/bulkaddpersons/bulk-add-persons-template.csv';
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this, templatePath, null));
  };
  function BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    selectedFileUri = selectedFileUri === VOID ? null : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? null : selectedFileName;
    fileSelectError = fileSelectError === VOID ? null : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.ux4_1 = selectedFileUri;
    this.vx4_1 = selectedFileName;
    this.wx4_1 = fileSelectError;
    this.xx4_1 = fieldsEnabled;
  }
  protoOf(BulkAddPersonSelectFileUiState).wx5 = function () {
    return !(this.ux4_1 == null) ? this.xx4_1 : false;
  };
  protoOf(BulkAddPersonSelectFileUiState).xx5 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    return new BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).yx4 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled, $super) {
    selectedFileUri = selectedFileUri === VOID ? this.ux4_1 : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? this.vx4_1 : selectedFileName;
    fileSelectError = fileSelectError === VOID ? this.wx4_1 : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? this.xx4_1 : fieldsEnabled;
    return $super === VOID ? this.xx5(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) : $super.xx5.call(this, selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).toString = function () {
    return 'BulkAddPersonSelectFileUiState(selectedFileUri=' + this.ux4_1 + ', selectedFileName=' + this.vx4_1 + ', fileSelectError=' + this.wx4_1 + ', fieldsEnabled=' + this.xx4_1 + ')';
  };
  protoOf(BulkAddPersonSelectFileUiState).hashCode = function () {
    var result = this.ux4_1 == null ? 0 : getStringHashCode(this.ux4_1);
    result = imul(result, 31) + (this.vx4_1 == null ? 0 : getStringHashCode(this.vx4_1)) | 0;
    result = imul(result, 31) + (this.wx4_1 == null ? 0 : getStringHashCode(this.wx4_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xx4_1) | 0;
    return result;
  };
  protoOf(BulkAddPersonSelectFileUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonSelectFileUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonSelectFileUiState ? other : THROW_CCE();
    if (!(this.ux4_1 == tmp0_other_with_cast.ux4_1))
      return false;
    if (!(this.vx4_1 == tmp0_other_with_cast.vx4_1))
      return false;
    if (!(this.wx4_1 == tmp0_other_with_cast.wx4_1))
      return false;
    if (!(this.xx4_1 === tmp0_other_with_cast.xx4_1))
      return false;
    return true;
  };
  function openBlobUiUseCase$factory_3() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_4() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).ix6 = function (entity, permissions, $completion) {
    var tmp = this.jx6(entity, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE();
    return this.ix6(tmp, p2 instanceof EditAndViewPermission ? p2 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.gx6_1;
          var tmp_0;
          if (this.hx6_1.thl_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).jx6 = function (entity, permissions, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.gx6_1 = entity;
    i.hx6_1 = permissions;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.ix6(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.sx6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).ux6 = function (person, $completion) {
    var tmp = this.vx6(person, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.ux6((p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.sx6_1.sx7_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.tx6_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
              var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c9c_1;
              var tmp_0;
              if (tmp2_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = _get_phoneNumberUtil__i6ank8(this.sx6_1);
                tmp_0 = tmp0_safe_receiver_0 == null ? null : formatInternationalOrNull(tmp0_safe_receiver_0, tmp2_safe_receiver);
              }
              var nextValue = prevValue.gx8(this.tx6_1, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.sx6_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_1 = this.tx6_1;
              var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.cfx_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver_0 == null ? null : personFullName(tmp1_safe_receiver_0);
              var tmp3_title = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              var tmp_1;
              if (!(this.tx6_1 == null)) {
                tmp_1 = Companion_getInstance_93().uov_1;
              } else {
                tmp_1 = Companion_getInstance_93().tov_1;
              }
              var tmp4_loadingState = tmp_1;
              var nextValue_0 = prevValue_0.mov(VOID, tmp4_loadingState, tmp3_title);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).vx6 = function (person, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this.sx6_1, completion);
    i.tx6_1 = person;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (person, $completion) {
      return i.ux6(person, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.px8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).cp4 = function (it, $completion) {
    var tmp = this.dp4(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.px8_1.sx7_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.gx8(VOID, VOID, VOID, VOID, VOID, this.qx8_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).dp4 = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this.px8_1, completion);
    i.qx8_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.cp4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.spy();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.zx8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).bx9 = function (it, $completion) {
    var tmp = this.cx9(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.bx9(p1 instanceof EditAndViewPermission ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.zx8_1.sx7_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.gx8(VOID, VOID, VOID, VOID, this.ax9_1.uhl_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.zx8_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp_0;
              if (this.ax9_1.uhl_1) {
                var tmp_1 = this.zx8_1.ipc().rnd(strings_getInstance().tlv_1);
                var tmp_2 = FabIcon_EDIT_getInstance();
                tmp_0 = new FabUiState(true, tmp_1, tmp_2, PersonDetailViewModel$onClickEdit$ref(this.zx8_1));
              } else {
                tmp_0 = new FabUiState();
              }
              var nextValue_0 = prevValue_0.mov(tmp_0);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).cx9 = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this.zx8_1, completion);
    i.ax9_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.bx9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.lx9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).nx9 = function (it, $completion) {
    var tmp = this.ox9(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.nx9((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.lx9_1.sx7_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.gx8(VOID, VOID, VOID, this.mx9_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).ox9 = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this.lx9_1, completion);
    i.mx9_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.nx9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.xx9_1 = $entityFlow;
    this.yx9_1 = $viewAndEditPermissionFlow;
    this.zx9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = combine(this.xx9_1, this.yx9_1, PersonDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this.zx9_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda(this.xx9_1, this.yx9_1, this.zx9_1, completion);
    i.axa_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    this.jxa_1 = $hasManagePermissionsPermissionFlow;
    this.kxa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = distinctUntilChanged(this.jxa_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this.kxa_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1(this.jxa_1, this.kxa_1, completion);
    i.lxa_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_2($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.uxa_1 = $viewAndEditPermissionFlow;
    this.vxa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).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;
            var tmp_0 = PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this.vxa_1, null);
            suspendResult = this.uxa_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          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);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3(this.uxa_1, this.vxa_1, completion);
    i.wxa_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_4($viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.fxb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).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;
            var tmp_0 = this.fxb_1.dpc().y7j().b99(this.fxb_1.cpc(), this.fxb_1.epb_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this.fxb_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this.fxb_1, completion);
    i.gxb_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    this.pxb_1 = $this_launch;
    this.qxb_1 = $entityFlow;
    this.rxb_1 = $viewAndEditPermissionFlow;
    this.sxb_1 = this$0;
    this.txb_1 = $hasManagePermissionsPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.pxb_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_0(this.qxb_1, this.rxb_1, this.sxb_1, null));
          launch(this.pxb_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_2(this.txb_1, this.sxb_1, null));
          launch(this.pxb_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_4(this.rxb_1, this.sxb_1, null));
          launch(this.pxb_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_6(this.sxb_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new PersonDetailViewModel$slambda$slambda(this.pxb_1, this.qxb_1, this.rxb_1, this.sxb_1, this.txb_1, completion);
  };
  function PersonDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_phoneNumberUtil__i6ank8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vx7_1;
    phoneNumberUtil$factory_0();
    return this_0.t2();
  }
  function _get_onClickPhoneNumUseCase__2tcaut($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wx7_1;
    onClickPhoneNumUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickSendSmsUseCase__plj4zm($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xx7_1;
    onClickSendSmsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickEmailUseCase__v8uzjh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yx7_1;
    onClickEmailUseCase$factory_0();
    return this_0.t2();
  }
  function navigateToEditAccount($this) {
    Companion_getInstance_120();
    $this.mpb_1.fo0('AccountEdit', mapOf_0(to('entityUid', $this.ux7_1.toString())));
  }
  function Companion_170() {
    this.uxb_1 = 'PersonDetailView';
  }
  var Companion_instance_218;
  function Companion_getInstance_188() {
    return Companion_instance_218;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_30(function_0) {
    this.vxb_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_30).t1d = function (value, $completion) {
    return this.vxb_1(value, $completion);
  };
  function PersonDetailViewModel$onClickEdit$ref_0($boundThis) {
    var l = function () {
      $boundThis.spy();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda(this$0, resultContinuation) {
    this.exc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.gxc_1 = this.exc_1.epc().s7j().nfu(this.exc_1.epb_1, this.exc_1.cpc());
            this.hxc_1 = shareIn(this.exc_1.epc().u7l().phj(this.exc_1.cpc(), this.exc_1.epb_1), this.exc_1.bpc(), Companion_getInstance_13().v1h());
            var tmp_0 = this;
            var tmp_1 = this.exc_1.dpc().u7l();
            var tmp_2 = this.exc_1.cpc();
            PermissionFlags_getInstance();
            tmp_0.ixc_1 = tmp_1.mhj(tmp_2, new Long(4096, 0));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.exc_1.sx7_1, PersonDetailViewModel$slambda$slambda_0(this.fxc_1, this.gxc_1, this.hxc_1, this.exc_1, this.ixc_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda(this.exc_1, completion);
    i.fxc_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'PersonDetailView');
    this.sx7_1 = MutableStateFlow(new PersonDetailUiState());
    this.tx7_1 = asStateFlow(this.sx7_1);
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ux7_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(IPhoneNumberUtil), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.vx7_1 = InstanceOrNull(this, tmp$ret$0, null).f5j(this, phoneNumberUtil$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.wx7_1 = Instance(this, tmp$ret$2, null).f5j(this, onClickPhoneNumUseCase$factory());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(OnClickSendSmsUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.xx7_1 = InstanceOrNull(this, tmp$ret$4, null).f5j(this, onClickSendSmsUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.yx7_1 = Instance(this, tmp$ret$6, null).f5j(this, onClickEmailUseCase$factory());
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var accountManager$delegate = Instance(this, tmp$ret$8, null).f5j(null, getLocalDelegateReference('accountManager', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_93().tov_1;
        var tmp_9 = this.ipc().rnd(strings_getInstance().tlv_1);
        var tmp_10 = FabIcon_EDIT_getInstance();
        var tmp1_fabState = new FabUiState(false, tmp_9, tmp_10, PersonDetailViewModel$onClickEdit$ref_0(this));
        var nextValue = prevValue.mov(tmp1_fabState, tmp0_loadingState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.sx7_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_isActiveUser = this.epb_1.equals(this.cpc());
        var tmp1_canSendSms = !(_get_onClickSendSmsUseCase__plj4zm(this) == null);
        var nextValue_0 = prevValue_0.gx8(VOID, VOID, tmp1_canSendSms, VOID, VOID, VOID, tmp0_isActiveUser);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_11 = this.bpc();
    launch(tmp_11, VOID, VOID, PersonDetailViewModel$slambda_0(this, null));
  }
  protoOf(PersonDetailViewModel).spy = function () {
    Companion_getInstance_189();
    Companion_getInstance_120();
    this.mpb_1.fo0('PersonEditView', mapOf_0(to('entityUid', this.ux7_1.toString())));
  };
  protoOf(PersonDetailViewModel).jwk = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).jxc = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).kxc = function () {
    Companion_getInstance_110();
    this.mpb_1.fo0('MessageList', mapOf_0(to('personUid', this.ux7_1.toString())));
  };
  protoOf(PersonDetailViewModel).lxc = function () {
    var tmp0_safe_receiver = this.sx7_1.t2().zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c9c_1;
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickDial.<anonymous>' call
      _get_onClickPhoneNumUseCase__2tcaut(this).knv(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).mxc = function () {
    var tmp0_safe_receiver = this.sx7_1.t2().zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b9c_1;
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickEmail.<anonymous>' call
      _get_onClickEmailUseCase__v8uzjh(this).knv(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).yqi = function () {
    Companion_getInstance_120();
    this.mpb_1.fo0('SystemPermission', mapOf_0(to('personUid', this.epb_1.toString())));
  };
  protoOf(PersonDetailViewModel).nxc = function () {
    var tmp0_safe_receiver = this.sx7_1.t2().zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dfx_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gfx_1;
    var ppjUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
    if (!ppjUid.equals(new Long(0, 0))) {
      Companion_getInstance_120();
      var tmp = to('entityUid', ppjUid.toString());
      Companion_getInstance_120();
      Companion_getInstance_110();
      this.mpb_1.fo0('ParentalConsentManagement', mapOf([tmp, to('next', '')]));
    }
  };
  function PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    person = person === VOID ? null : person;
    displayPhoneNum = displayPhoneNum === VOID ? null : displayPhoneNum;
    canSendSms = canSendSms === VOID ? false : canSendSms;
    clazzes = clazzes === VOID ? emptyList() : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? false : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? false : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? false : isActiveUser;
    this.zx7_1 = person;
    this.ax8_1 = displayPhoneNum;
    this.bx8_1 = canSendSms;
    this.cx8_1 = clazzes;
    this.dx8_1 = hasChangePasswordPermission;
    this.ex8_1 = showPermissionButton;
    this.fx8_1 = isActiveUser;
  }
  protoOf(PersonDetailUiState).oxc = function () {
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    return isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f9c_1);
  };
  protoOf(PersonDetailUiState).pxc = function () {
    var tmp;
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d9c_1) == null)) {
      var tmp2_safe_receiver = this.zx7_1.cfx_1;
      tmp = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.d9c_1) === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).qxc = function () {
    var tmp;
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y9b_1) == null)) {
      tmp = this.dx8_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).rxc = function () {
    var tmp;
    var tmp_0;
    if (!(this.zx7_1 == null)) {
      var tmp0_safe_receiver = this.zx7_1.cfx_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y9b_1) == null;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.dx8_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).sxc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g9c_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).txc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c9c_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).uxc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b9c_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).vxc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h9c_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).wxc = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y9b_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).xxc = function () {
    var tmp0_safe_receiver = this.zx7_1;
    return !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dfx_1) == null);
  };
  protoOf(PersonDetailUiState).yxc = function () {
    var tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.zx7_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.cfx_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y9b_1;
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_0 == null ? true : isBlank(this_0))) {
      tmp = !this.fx8_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).zxc = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    return new PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).gx8 = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser, $super) {
    person = person === VOID ? this.zx7_1 : person;
    displayPhoneNum = displayPhoneNum === VOID ? this.ax8_1 : displayPhoneNum;
    canSendSms = canSendSms === VOID ? this.bx8_1 : canSendSms;
    clazzes = clazzes === VOID ? this.cx8_1 : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? this.dx8_1 : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? this.ex8_1 : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? this.fx8_1 : isActiveUser;
    return $super === VOID ? this.zxc(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) : $super.zxc.call(this, person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).toString = function () {
    return 'PersonDetailUiState(person=' + this.zx7_1 + ', displayPhoneNum=' + this.ax8_1 + ', canSendSms=' + this.bx8_1 + ', clazzes=' + this.cx8_1 + ', hasChangePasswordPermission=' + this.dx8_1 + ', showPermissionButton=' + this.ex8_1 + ', isActiveUser=' + this.fx8_1 + ')';
  };
  protoOf(PersonDetailUiState).hashCode = function () {
    var result = this.zx7_1 == null ? 0 : this.zx7_1.hashCode();
    result = imul(result, 31) + (this.ax8_1 == null ? 0 : getStringHashCode(this.ax8_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bx8_1) | 0;
    result = imul(result, 31) + hashCode(this.cx8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dx8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ex8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fx8_1) | 0;
    return result;
  };
  protoOf(PersonDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonDetailUiState ? other : THROW_CCE();
    if (!equals(this.zx7_1, tmp0_other_with_cast.zx7_1))
      return false;
    if (!(this.ax8_1 == tmp0_other_with_cast.ax8_1))
      return false;
    if (!(this.bx8_1 === tmp0_other_with_cast.bx8_1))
      return false;
    if (!equals(this.cx8_1, tmp0_other_with_cast.cx8_1))
      return false;
    if (!(this.dx8_1 === tmp0_other_with_cast.dx8_1))
      return false;
    if (!(this.ex8_1 === tmp0_other_with_cast.ex8_1))
      return false;
    if (!(this.fx8_1 === tmp0_other_with_cast.fx8_1))
      return false;
    return true;
  };
  function phoneNumberUtil$factory() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function phoneNumberUtil$factory_0() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory_0() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory_0() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory_0() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ixd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda).mxd = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.mxd(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.jxd_1.s7j();
            var tmp_1;
            if (!_get_entityUid__ovkepw(this.ixd_1).equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.kxd_1 = tmp_1;
            if (this.kxd_1 == null) {
              this.lxd_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.kxd_1.kfu(_get_entityUid__ovkepw(this.ixd_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lxd_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.lxd_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).tmw = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this.ixd_1, completion);
    i.jxd_1 = it;
    return i;
  };
  function PersonEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mxd(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation) {
    this.vxd_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).wxd = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).r7e = function ($completion) {
    return this.wxd($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new Person();
          var tmp_0 = this_0;
          var tmp0_safe_receiver = this.vxd_1.ba('DateOfBirth');
          var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
          tmp_0.f9c_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).q7e = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_1(this.vxd_1, completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_2($savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.wxd($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.uxe_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bxg(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.kxg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).mxg = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.mxg(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).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.lxg_1.k7k().mgn(_get_entityUid__ovkepw(this.kxg_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).tmw = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this.kxg_1, completion);
    i.lxg_1 = it;
    return i;
  };
  function PersonEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mxg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).vxg = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).r7e = function ($completion) {
    return this.vxg($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).q7e = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.vxg($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (personPicture) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.uxe_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bxg(VOID, VOID, VOID, personPicture);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.exh_1 = this$0;
    this.fxh_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda).hxh = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.hxh((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda).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;
            var tmp_0 = Companion_instance_3.s4x();
            var tmp_1 = PersonEditViewModel$slambda$slambda$slambda_0(this.exh_1, null);
            var tmp_2 = PersonEditViewModel$slambda$slambda$slambda_2(this.fxh_1, null);
            suspendResult = this.exh_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonEditViewModel$slambda$slambda$lambda(this.exh_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(PersonEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda(this.exh_1, this.fxh_1, completion);
    i.gxh_1 = $this$async;
    return i;
  };
  function PersonEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.hxh($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.qxh_1 = this$0;
    this.rxh_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda_1).txh = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.txh((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).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;
            var tmp_0 = Companion_instance_7.s4x();
            var tmp_1 = listOf_0('picState');
            var tmp_2;
            if (!_get_entityUid__ovkepw(this.qxh_1).equals(new Long(0, 0))) {
              tmp_2 = PersonEditViewModel$slambda$slambda$slambda_4(this.qxh_1, null);
            } else {
              tmp_2 = null;
            }

            var tmp_3 = tmp_2;
            var tmp_4 = PersonEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.qxh_1.spc(tmp_0, tmp_1, VOID, tmp_3, tmp_4, PersonEditViewModel$slambda$slambda$lambda_0(this.qxh_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_118();
            var tmp1_elvis_lhs = this_0 == null ? null : this_0.x9c_1;
            setIfNoValueSetYet(this.rxh_1, 'initPicUri', tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            return this_0;
          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);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda_1(this.qxh_1, this.rxh_1, completion);
    i.sxh_1 = $this$async;
    return i;
  };
  function PersonEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.txh($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    this.cxi_1 = this$0;
    this.dxi_1 = $savePerson;
    this.exi_1 = $consentToUpsert;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).lxi = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.lxi(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.cxi_1.qph_1.equals(new Long(0, 0))) {
              this.hd_1 = 4;
              suspendResult = _get_addNewPersonUseCase__raa2qa(this.cxi_1).uob(this.dxi_1, this.cxi_1.cpc(), true, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.cxi_1.epc().s7j().lfu(this.dxi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hxi_1 = this.exi_1;
            if (this.hxi_1 == null) {
              this.ixi_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.jxi_1 = this.hxi_1;
              var tmp_1 = this;
              tmp_1.kxi_1 = this.jxi_1;
              this.hd_1 = 2;
              suspendResult = this.cxi_1.epc().c7l().qgh(this.kxi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.ixi_1 = this.jxi_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.gxi_1 = this.ixi_1;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.gxi_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.gxi_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);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this.cxi_1, this.dxi_1, this.exi_1, completion);
    i.fxi_1 = it;
    return i;
  };
  function PersonEditViewModel$onClickSave$slambda$slambda_0(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation);
    var l = function (it, $completion) {
      return i.lxi(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xxe_1;
    apiUrlConfig$factory_6();
    return this_0.t2();
  }
  function _get_entityUid__ovkepw($this) {
    Companion_getInstance_110();
    var tmp0_safe_receiver = $this.kpb_1.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_phoneNumValidatorUseCase__4guu7i($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.axf_1;
    phoneNumValidatorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.exf_1;
    genderConfig$factory_0();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fxf_1;
    enqueueSavePictureUseCase$factory_0();
    return this_0.t2();
  }
  function _get_addNewPersonUseCase__raa2qa($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gxf_1;
    addNewPersonUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_3(_this__u8e3s4, $this) {
    return ((((((((!(_this__u8e3s4.pxf_1 == null) ? true : !(_this__u8e3s4.rxf_1 == null)) ? true : !(_this__u8e3s4.txf_1 == null)) ? true : !(_this__u8e3s4.uxf_1 == null)) ? true : !(_this__u8e3s4.xxf_1 == null)) ? true : !(_this__u8e3s4.yxf_1 == null)) ? true : !(_this__u8e3s4.wxf_1 == null)) ? true : !(_this__u8e3s4.sxf_1 == null)) ? true : !(_this__u8e3s4.vxf_1 == null)) ? true : !(_this__u8e3s4.zxf_1 == null);
  }
  function Companion_171() {
    Companion_instance_219 = this;
    this.kwk_1 = 'picState';
    this.lwk_1 = 'PersonEditView';
    this.mwk_1 = 'Register';
    this.nwk_1 = listOf(['PersonEditView', 'Register']);
    this.owk_1 = 'RegMode';
    this.pwk_1 = 'DateOfBirth';
    this.qwk_1 = 'RegViaLink';
    this.rwk_1 = 0;
    this.swk_1 = 1;
    this.twk_1 = 2;
    var tmp = this;
    Companion_getInstance_110();
    Companion_getInstance_110();
    Companion_getInstance_120();
    Companion_getInstance_120();
    tmp.uwk_1 = listOf(['serverUrl', 'showAccept', 'popUpToOnFinish', 'next', 'RegViaLink', 'DateOfBirth', 'RegMode', 'noSessionChange']);
    this.vwk_1 = 'initDob';
  }
  var Companion_instance_219;
  function Companion_getInstance_189() {
    if (Companion_instance_219 == null)
      new Companion_171();
    return Companion_instance_219;
  }
  function PersonEditViewModel$slambda(this$0, resultContinuation) {
    this.uxi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!(this.uxi_1.wxe_1 === 0) ? this.uxi_1.qph_1.equals(new Long(0, 0)) : false) {
              this.wxi_1 = true;
              this.hd_1 = 4;
              continue $sm;
            } else {
              if (!this.uxi_1.qph_1.equals(new Long(0, 0)) ? this.uxi_1.cpc().equals(this.uxi_1.qph_1) : false) {
                this.wxi_1 = true;
                this.hd_1 = 4;
                continue $sm;
              } else {
                if (this.uxi_1.qph_1.equals(new Long(0, 0))) {
                  this.hd_1 = 2;
                  var tmp_0 = this.vxi_1.u7l();
                  var tmp_1 = this.uxi_1.cpc();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_0.lhj(tmp_1, new Long(1024, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.hd_1 = 1;
                  var tmp_2 = this.vxi_1.u7l();
                  var tmp_3 = this.uxi_1.cpc();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_2.lhj(tmp_3, new Long(32768, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 1:
            this.wxi_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.wxi_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            throw this.kd_1;
          case 4:
            return this.wxi_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda).tmw = function (db, completion) {
    var i = new PersonEditViewModel$slambda(this.uxi_1, completion);
    i.vxi_1 = db;
    return i;
  };
  function PersonEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.uxe_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bxg(VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.fxj_1 = this$0;
    this.gxj_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda_1).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;
            var tmp_0 = async(this.hxj_1, VOID, VOID, PersonEditViewModel$slambda$slambda_0(this.fxj_1, this.gxj_1, null));
            suspendResult = awaitAll([tmp_0, async(this.hxj_1, VOID, VOID, PersonEditViewModel$slambda$slambda_2(this.fxj_1, this.gxj_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.fxj_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (hasFlag(this.fxj_1.wxe_1, 1)) {
                  tmp_1 = this.fxj_1.ipc().rnd(strings_getInstance().xlk_1);
                } else {
                  tmp_1 = this.fxj_1.ipc().rnd(strings_getInstance().hm3_1);
                }
                var tmp_2 = tmp_1;
                var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_2, VOID, PersonEditViewModel$onClickSave$ref(this.fxj_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_3;
            if (hasFlag(this.fxj_1.wxe_1, 2)) {
              tmp_3 = new PersonParentJoin();
            } else {
              tmp_3 = null;
            }

            var personParentJoin = tmp_3;
            l$ret$3: do {
              var this_1 = this.fxj_1.uxe_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.bxg(VOID, VOID, VOID, VOID, true, personParentJoin);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.fxj_1.kpc(Companion_getInstance_93().uov_1);
            return Unit_instance;
          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);
  };
  protoOf(PersonEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new PersonEditViewModel$slambda_1(this.fxj_1, this.gxj_1, completion);
    i.hxj_1 = $this$launchIfHasPermission;
    return i;
  };
  function PersonEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onEntityChanged$lambda(this$0, $entity) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $entity.y9b_1;
      tmp.y9b_1 = this$0.dxf_1.po8(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '');
      return Unit_instance;
    };
  }
  function PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.qxj_1 = $commitDelay;
    this.rxj_1 = $entity;
    this.sxj_1 = $this;
    this.txj_1 = $key;
    this.uxj_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.qxj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.rxj_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.sxj_1.opc(this.sxj_1.kpb_1, this.txj_1, this.uxj_1, this.rxj_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onEntityChanged$slambda(this.qxj_1, this.rxj_1, this.sxj_1, this.txj_1, this.uxj_1, completion);
    i.vxj_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.exk_1 = this$0;
    this.fxk_1 = $personPicture;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).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.exk_1.opc(this.exk_1.kpb_1, 'picState', Companion_instance_7.s4x(), this.fxk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this.exk_1, this.fxk_1, completion);
    i.gxk_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onPersonPictureChanged$slambda_0(this$0, $personPicture, resultContinuation) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$lambda($this$shallowCopy) {
    var tmp = $this$shallowCopy;
    var tmp0_safe_receiver = $this$shallowCopy.c9c_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var tmp1_safe_receiver = tmp_0;
    tmp.c9c_1 = tmp1_safe_receiver == null ? null : replace(tmp1_safe_receiver, ' ', '');
    var tmp_1 = $this$shallowCopy;
    var tmp2_safe_receiver = $this$shallowCopy.b9c_1;
    var tmp_2;
    if (tmp2_safe_receiver == null) {
      tmp_2 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_2 = toString(trim(isCharSequence(tmp2_safe_receiver) ? tmp2_safe_receiver : THROW_CCE()));
    }
    tmp_1.b9c_1 = tmp_2;
    return Unit_instance;
  }
  function PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    this.pxk_1 = $isRegistrationMode;
    this.qxk_1 = this$0;
    this.rxk_1 = $savePerson;
    this.sxk_1 = $requiredFieldMessage;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            if (this.pxk_1) {
              this.uxk_1 = this.qxk_1.uxe_1.t2().nxf_1;
              this.vxk_1 = this.qxk_1.uxe_1.t2().jxf_1;
              var tmp_0 = this;
              var tmp$ret$0;
              l$ret$1: do {
                var this_0 = this.qxk_1.uxe_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_1;
                  var this_1 = this.rxk_1.y9b_1;
                  if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
                    tmp_1 = this.sxk_1;
                  } else {
                    tmp_1 = null;
                  }
                  var tmp3_usernameError = tmp_1;
                  var tmp_2;
                  var this_2 = this.vxk_1;
                  if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
                    tmp_2 = this.sxk_1;
                  } else {
                    tmp_2 = null;
                  }
                  var tmp4_passwordError = tmp_2;
                  var tmp_3;
                  if (!hasFlag(this.qxk_1.wxe_1, 2)) {
                    tmp_3 = null;
                  } else {
                    var tmp0_safe_receiver = this.uxk_1;
                    var this_3 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ofx_1;
                    if (this_3 == null ? true : charSequenceLength(this_3) === 0) {
                      tmp_3 = this.sxk_1;
                    } else {
                      var tmp1_safe_receiver = this.uxk_1;
                      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ofx_1;
                      var tmp_4;
                      if (tmp2_safe_receiver == null) {
                        tmp_4 = null;
                      } else {
                        tmp_4 = this.qxk_1.bxf_1.io3(tmp2_safe_receiver);
                      }
                      if (tmp_4 == null) {
                        tmp_3 = this.qxk_1.ipc().rnd(strings_getInstance().uma_1);
                      } else {
                        tmp_3 = null;
                      }
                    }
                  }
                  var tmp5_parentContactError = tmp_3;
                  var tmp_5;
                  if (this.rxk_1.f9c_1.equals(new Long(0, 0))) {
                    tmp_5 = this.sxk_1;
                  } else {
                    tmp_5 = null;
                  }
                  var tmp6_dateOfBirthError = tmp_5;
                  var nextValue = prevValue.bxg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_usernameError, VOID, tmp4_passwordError, VOID, VOID, tmp6_dateOfBirthError, tmp5_parentContactError);
                  if (this_0.y1k(prevValue, nextValue)) {
                    tmp$ret$0 = nextValue;
                    break l$ret$1;
                  }
                }
              }
               while (false);
              tmp_0.wxk_1 = tmp$ret$0;
              if (hasErrors_3(this.wxk_1, this.qxk_1) ? true : this.vxk_1 == null) {
                this.qxk_1.kpc(Companion_getInstance_93().uov_1);
                l$ret$3: do {
                  var this_4 = this.qxk_1.uxe_1;
                  while (true) {
                    var prevValue_0 = this_4.t2();
                    var nextValue_0 = prevValue_0.bxg(VOID, VOID, VOID, VOID, true);
                    if (this_4.y1k(prevValue_0, nextValue_0)) {
                      break l$ret$3;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }
              this.hd_1 = 9;
              continue $sm;
            } else {
              var tmp_6;
              if (!this.qxk_1.qph_1.equals(new Long(0, 0)) ? isDateOfBirthAMinor(Companion_getInstance_6().ulh(this.rxk_1.f9c_1)) : false) {
                var tmp_7 = Companion_getInstance_6();
                var tmp0_safe_receiver_0 = this.qxk_1.kpb_1.ba('initDob');
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
                tmp_6 = !isDateOfBirthAMinor(tmp_7.ulh(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
              } else {
                tmp_6 = false;
              }
              if (tmp_6) {
                this.hd_1 = 1;
                suspendResult = this.qxk_1.epc().c7l().tgh(this.rxk_1.x9b_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.zxk_1 = false;
                this.hd_1 = 2;
                continue $sm;
              }
            }

          case 1:
            this.axl_1 = suspendResult;
            this.zxk_1 = !this.axl_1;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.zxk_1) {
              var tmp_8 = this;
              var this_5 = new PersonParentJoin();
              this_5.mfx_1 = this.rxk_1.x9b_1;
              this_5.lfx_1 = this.qxk_1.apc().in5().zk0_1;
              var tmp_9 = this_5;
              tmp_9.rfx_1 = 1;
              this_5.sfx_1 = systemTimeInMillis();
              tmp_8.yxk_1 = this_5;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.yxk_1 = null;
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.bxl_1 = this.yxk_1;
            this.hd_1 = 4;
            var tmp_11 = this.qxk_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_11, VOID, PersonEditViewModel$onClickSave$slambda$slambda_0(this.qxk_1, this.rxk_1, this.bxl_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.cxl_1 = this.qxk_1.uxe_1.t2().lxf_1;
            if (!(this.cxl_1 == null)) {
              this.cxl_1.v9c_1 = this.rxk_1.x9b_1;
              this.cxl_1.w9c_1 = systemTimeInMillis();
              var tmp_12 = this;
              Companion_getInstance_118();
              var tmp2_elvis_lhs = this.qxk_1.kpb_1.ba('initPicUri');
              tmp_12.dxl_1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              this.exl_1 = this.cxl_1.x9c_1;
              if (!(this.dxl_1 === this.exl_1)) {
                this.hd_1 = 5;
                suspendResult = this.qxk_1.dpc().k7k().lgn(this.cxl_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 7;
                continue $sm;
              }
            } else {
              this.hd_1 = 8;
              continue $sm;
            }

          case 5:
            this.hd_1 = 6;
            var tmp_13 = _get_enqueueSavePictureUseCase__rl1s31(this.qxk_1);
            var tmp_14 = this.rxk_1.x9b_1;
            suspendResult = tmp_13.cnm(tmp_14, 50, this.exl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_15 = this;
            tmp_15.fxl_1 = this.qxk_1.kpb_1.ba('goToOnPersonSelected');
            if (!(this.fxl_1 == null)) {
              var tmp_16 = UMFileUtil_getInstance().parseURLQueryString(this.fxl_1);
              Companion_getInstance_110();
              var args = plus_0(tmp_16, mapOf_0(to('personUid', this.rxk_1.x9b_1.toString())));
              this.qxk_1.mpb_1.fo0(substringBefore_0(this.fxl_1, '?'), args);
            } else {
              this.qxk_1.sph('PersonDetailView', this.rxk_1.x9b_1, this.rxk_1);
            }

            this.hd_1 = 17;
            continue $sm;
          case 9:
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.id_1 = 13;
            this.id_1 = 12;
            this.hd_1 = 11;
            suspendResult = this.qxk_1.apc().nn5(this.rxk_1, this.vxk_1, this.qxk_1.yxe_1, new AccountRegisterOptions(!hasFlag(this.qxk_1.wxe_1, 2) ? !this.qxk_1.hxf_1 : false, this.uxk_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            var registeredPerson = suspendResult;
            var tmp_17 = this;
            var tmp_18;
            if (hasFlag(this.qxk_1.wxe_1, 2)) {
              var goOptions = new UstadGoOptions('RegisterAgeRedirect', true);
              var this_6 = LinkedHashMap_init_$Create$();
              var key = 'username';
              var tmp0_elvis_lhs = this.rxk_1.y9b_1;
              var value = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              this_6.s(key, value);
              var key_0 = 'parentContact';
              var tmp1_safe_receiver_0 = this.uxk_1;
              var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.ofx_1;
              var value_0 = tmp2_elvis_lhs_0 == null ? '' : tmp2_elvis_lhs_0;
              this_6.s(key_0, value_0);
              var key_1 = 'password';
              var tmp3_elvis_lhs = this.qxk_1.uxe_1.t2().jxf_1;
              var value_1 = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
              this_6.s(key_1, value_1);
              Companion_getInstance_110();
              putFromSavedStateIfPresent(this_6, this.qxk_1.kpb_1, 'popUpToOnFinish');
              var args_0 = this_6;
              this.qxk_1.mpb_1.doy('WaitForParent', args_0, goOptions);
              tmp_18 = Unit_instance;
            } else {
              this.qxk_1.wpi(this.qxk_1.mpb_1, appendSelectedAccount(this.qxk_1.zxe_1, registeredPerson.x9b_1, new Endpoint(this.qxk_1.yxe_1)), new UstadGoOptions(VOID, VOID, true));
              tmp_18 = Unit_instance;
            }

            tmp_17.xxk_1 = tmp_18;
            this.id_1 = 14;
            this.hd_1 = 16;
            continue $sm;
          case 12:
            this.id_1 = 13;
            var tmp_19 = this.kd_1;
            if (tmp_19 instanceof Exception) {
              var e = this.kd_1;
              if (e instanceof IllegalStateException) {
                l$ret$7: do {
                  var this_7 = this.qxk_1.uxe_1;
                  while (true) {
                    var prevValue_1 = this_7.t2();
                    var nextValue_1 = prevValue_1.bxg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.qxk_1.ipc().rnd(strings_getInstance().ym7_1));
                    if (this_7.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$7;
                    }
                  }
                }
                 while (false);
              } else {
                this.qxk_1.gpc().bow(new Snack(this.qxk_1.ipc().rnd(strings_getInstance().plj_1)));
              }
              this.gxl_1 = Unit_instance;
              this.id_1 = 14;
              this.hd_1 = 15;
              var tmp_20 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 14;
            var t = this.kd_1;
            this.qxk_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$11: do {
              var this_8 = this.qxk_1.uxe_1;
              while (true) {
                var prevValue_2 = this_8.t2();
                var nextValue_2 = prevValue_2.bxg(VOID, VOID, VOID, VOID, true);
                if (this_8.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            throw t;
          case 14:
            throw this.kd_1;
          case 15:
            this.id_1 = 14;
            this.qxk_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$13: do {
              var this_9 = this.qxk_1.uxe_1;
              while (true) {
                var prevValue_3 = this_9.t2();
                var nextValue_3 = prevValue_3.bxg(VOID, VOID, VOID, VOID, true);
                if (this_9.y1k(prevValue_3, nextValue_3)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 16:
            this.id_1 = 14;
            this.qxk_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$15: do {
              var this_10 = this.qxk_1.uxe_1;
              while (true) {
                var prevValue_4 = this_10.t2();
                var nextValue_4 = prevValue_4.bxg(VOID, VOID, VOID, VOID, true);
                if (this_10.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda(this.pxk_1, this.qxk_1, this.rxk_1, this.sxk_1, completion);
    i.txk_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onClickSave$slambda_0($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_189();
    destName = destName === VOID ? 'PersonEditView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.uxe_1 = MutableStateFlow(new PersonEditUiState());
    this.vxe_1 = asStateFlow(this.uxe_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('RegMode');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp.wxe_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.xxe_1 = Instance(this, tmp$ret$0, null).f5j(this, apiUrlConfig$factory_5());
    var tmp_2 = this;
    Companion_getInstance_110();
    var tmp0_elvis_lhs = savedStateHandle.ba('serverUrl');
    var tmp1_elvis_lhs_0 = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg_2(this).fn5_1 : tmp0_elvis_lhs;
    tmp_2.yxe_1 = tmp1_elvis_lhs_0 == null ? 'http://localhost' : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    Companion_getInstance_110();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('next');
    tmp_3.zxe_1 = tmp0_elvis_lhs_0 == null ? this.ipc().gou() : tmp0_elvis_lhs_0;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.axf_1 = Instance(this, tmp$ret$2, null).f5j(this, phoneNumValidatorUseCase$factory());
    this.bxf_1 = new ValidateEmailUseCase();
    this.cxf_1 = new ValidateUsernameUseCase();
    this.dxf_1 = new FilterUsernameUseCase();
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.exf_1 = Instance(this, tmp$ret$4, null).f5j(this, genderConfig$factory());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_9 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.m5d(tmp$ret$6, context);
    var this_0 = On(this, tmp$ret$7, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_8.fxf_1 = Instance(this_0, tmp$ret$9, null).f5j(this, enqueueSavePictureUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$11 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.gxf_1 = Instance(this_1, tmp$ret$11, null).f5j(this, addNewPersonUseCase$factory());
    var tmp_14 = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    tmp_14.hxf_1 = tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1;
    this.kpc(Companion_getInstance_93().tov_1);
    var tmp_15;
    if (hasFlag(this.wxe_1, 1)) {
      tmp_15 = this.ipc().rnd(strings_getInstance().pml_1);
    } else {
      tmp_15 = _get_entityUid__ovkepw(this).equals(new Long(0, 0)) ? this.ipc().rnd(strings_getInstance().tm1_1) : this.ipc().rnd(strings_getInstance().um1_1);
    }
    var title = tmp_15;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.opb_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var tmp0_navigationVisible = !hasFlag(this.wxe_1, 1);
        var nextValue = new AppUiState(VOID, VOID, title, tmp0_navigationVisible, true);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.uxe_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.bxg(VOID, VOID, _get_genderConfig__kyr0zc(this).low_1, VOID, VOID, VOID, this.wxe_1);
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_16 = PersonEditViewModel$slambda_0(this, null);
    var tmp_17 = PersonEditViewModel$lambda(this);
    this.tpc(tmp_16, true, tmp_17, PersonEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(PersonEditViewModel).hxl = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uxe_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onEntityChanged.<anonymous>' call
        var tmp;
        var tmp_0 = entity == null ? null : entity.y9b_1;
        var tmp1_safe_receiver = this.uxe_1.t2().ixf_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y9b_1))) {
          var tmp_1;
          if (entity == null) {
            tmp_1 = null;
          } else {
            tmp_1 = shallowCopy(entity, PersonEditViewModel$onEntityChanged$lambda(this, entity));
          }
          tmp = tmp_1;
        } else {
          tmp = entity;
        }
        var tmp15_person = tmp;
        var tmp7_safe_receiver = prevValue.ixf_1;
        var tmp_2 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.d9c_1;
        var tmp16_genderError = this.vpi(tmp_2, entity == null ? null : entity.d9c_1, prevValue.wxf_1);
        var tmp9_safe_receiver = prevValue.ixf_1;
        var tmp_3 = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.z9b_1;
        var tmp17_firstNameError = this.vpi(tmp_3, entity == null ? null : entity.z9b_1, prevValue.xxf_1);
        var tmp11_safe_receiver = prevValue.ixf_1;
        var tmp_4 = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.a9c_1;
        var tmp18_lastNameError = this.vpi(tmp_4, entity == null ? null : entity.a9c_1, prevValue.yxf_1);
        var tmp13_safe_receiver = prevValue.ixf_1;
        var tmp_5 = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.c9c_1;
        var tmp19_phoneNumError = this.vpi(tmp_5, entity == null ? null : entity.c9c_1, prevValue.zxf_1);
        var tmp5_safe_receiver = prevValue.ixf_1;
        var tmp_6 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.b9c_1;
        var tmp20_emailError = this.vpi(tmp_6, entity == null ? null : entity.b9c_1, prevValue.sxf_1);
        var tmp3_safe_receiver = prevValue.ixf_1;
        var tmp_7 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.y9b_1;
        var tmp21_usernameError = this.vpi(tmp_7, entity == null ? null : entity.y9b_1, prevValue.pxf_1);
        var nextValue = prevValue.bxg(tmp15_person, VOID, VOID, VOID, VOID, VOID, VOID, tmp21_usernameError, VOID, VOID, tmp20_emailError, VOID, VOID, VOID, tmp16_genderError, tmp17_firstNameError, tmp18_lastNameError, tmp19_phoneNumError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver = this.pph_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_8 = this;
    var tmp_9 = this.bpc();
    tmp_8.pph_1 = launch(tmp_9, VOID, VOID, PersonEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonEditViewModel).ixl = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uxe_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.bxg(VOID, password, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).jxl = function (pictureUri) {
    // Inline function 'kotlin.apply' call
    var this_0 = new PersonPicture();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
    var tmp = this_0;
    var tmp0_safe_receiver = this.uxe_1.t2().lxf_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v9c_1;
    tmp.v9c_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this_0.x9c_1 = pictureUri;
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.uxe_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.bxg(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, PersonEditViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(PersonEditViewModel).kxl = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uxe_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onApprovalPersonParentJoinChanged.<anonymous>' call
        var nextValue = prevValue.bxg(VOID, VOID, VOID, VOID, VOID, personParentJoin);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).lxl = function (phoneNumSet) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.uxe_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
    if (!(this_0.t2().axg_1 === phoneNumSet)) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
          var nextValue = prevValue.bxg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, phoneNumSet);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(PersonEditViewModel).mq0 = function () {
    if (!this.uxe_1.t2().mxf_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.uxe_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.bxg(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.kpc(Companion_getInstance_93().tov_1);
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.uxe_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue_0 = prevValue_0.bxg(VOID, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.uxe_1.t2().ixf_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy(tmp0_safe_receiver, PersonEditViewModel$onClickSave$lambda);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var savePerson = tmp_0;
    var requiredFieldMessage = this.ipc().rnd(strings_getInstance().ilo_1);
    var currentTime = systemTimeInMillis();
    var isRegistrationMode = hasFlag(this.wxe_1, 1);
    var tmp2_safe_receiver = savePerson.b9c_1;
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
      tmp_1 = this.bxf_1.io3(tmp2_safe_receiver);
    }
    var validatedEmailAddr = tmp_1;
    var tmp_2;
    if (isRegistrationMode) {
      var tmp3_elvis_lhs = savePerson.y9b_1;
      tmp_2 = this.cxf_1.io3(tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs);
    } else {
      tmp_2 = null;
    }
    var validationResult = tmp_2;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.uxe_1;
      while (true) {
        var prevValue_1 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var tmp_3;
        if (isRegistrationMode) {
          var tmp_4;
          if ((validationResult == null ? null : validationResult.woe_1) == null) {
            tmp_4 = null;
          } else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>.<anonymous>' call
            tmp_4 = this.ipc().rnd(strings_getInstance().mlq_1);
          }
          tmp_3 = tmp_4;
        } else {
          tmp_3 = null;
        }
        var tmp3_usernameError = tmp_3;
        var tmp_5;
        var tmp_6;
        if (isRegistrationMode) {
          // Inline function 'kotlin.text.isNullOrBlank' call
          var this_3 = savePerson.y9b_1;
          // Inline function 'kotlin.contracts.contract' call
          tmp_6 = this_3 == null ? true : isBlank(this_3);
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = this.ipc().rnd(strings_getInstance().ilo_1);
        } else {
          tmp_5 = null;
        }
        var tmp4_passwordError = tmp_5;
        var tmp_7;
        if (savePerson.f9c_1.c7(currentTime) > 0) {
          tmp_7 = this.ipc().rnd(strings_getInstance().mlq_1);
        } else if (isRegistrationMode ? !isDateSet(savePerson.f9c_1) : false) {
          tmp_7 = this.ipc().rnd(strings_getInstance().ilo_1);
        } else {
          tmp_7 = null;
        }
        var tmp5_dateOfBirthError = tmp_7;
        var tmp_8;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_4 = savePerson.z9b_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_4 == null ? true : charSequenceLength(this_4) === 0) {
          tmp_8 = requiredFieldMessage;
        } else {
          tmp_8 = null;
        }
        var tmp6_firstNameError = tmp_8;
        var tmp_9;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_5 = savePerson.a9c_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_5 == null ? true : charSequenceLength(this_5) === 0) {
          tmp_9 = requiredFieldMessage;
        } else {
          tmp_9 = null;
        }
        var tmp7_lastNameError = tmp_9;
        var tmp_10;
        var tmp_11 = savePerson.d9c_1;
        if (tmp_11 === 0) {
          tmp_10 = requiredFieldMessage;
        } else {
          tmp_10 = null;
        }
        var tmp8_genderError = tmp_10;
        var tmp_12;
        var tmp_13;
        if (this.uxe_1.t2().axg_1) {
          var tmp2_safe_receiver_0 = savePerson.c9c_1;
          var tmp_14;
          if (tmp2_safe_receiver_0 == null) {
            tmp_14 = null;
          } else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>.<anonymous>' call
            tmp_14 = _get_phoneNumValidatorUseCase__4guu7i(this).hoc(tmp2_safe_receiver_0);
          }
          tmp_13 = !(tmp_14 === true);
        } else {
          tmp_13 = false;
        }
        if (tmp_13) {
          tmp_12 = this.ipc().rnd(strings_getInstance().mlq_1);
        } else {
          tmp_12 = null;
        }
        var tmp9_phoneNumError = tmp_12;
        var tmp_15;
        var tmp_16;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_6 = savePerson.b9c_1;
        // Inline function 'kotlin.contracts.contract' call
        if (!(this_6 == null ? true : isBlank(this_6))) {
          tmp_16 = validatedEmailAddr == null;
        } else {
          tmp_16 = false;
        }
        if (tmp_16) {
          tmp_15 = this.ipc().rnd(strings_getInstance().mlq_1);
        } else {
          tmp_15 = null;
        }
        var tmp10_emailError = tmp_15;
        var nextValue_1 = prevValue_1.bxg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_usernameError, VOID, tmp4_passwordError, tmp10_emailError, null, tmp5_dateOfBirthError, null, tmp8_genderError, tmp6_firstNameError, tmp7_lastNameError, tmp9_phoneNumError);
        if (this_2.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (hasErrors_3(this.uxe_1.t2(), this)) {
      this.kpc(Companion_getInstance_93().uov_1);
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_7 = this.uxe_1;
        while (true) {
          var prevValue_2 = this_7.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.bxg(VOID, VOID, VOID, VOID, true);
          if (this_7.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_17 = this.bpc();
    launch(tmp_17, VOID, VOID, PersonEditViewModel$onClickSave$slambda_0(isRegistrationMode, this, savePerson, requiredFieldMessage, null));
  };
  function PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().now_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? null : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? null : passwordConfirmedError;
    passwordError = passwordError === VOID ? null : passwordError;
    emailError = emailError === VOID ? null : emailError;
    confirmError = confirmError === VOID ? null : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    parentContactError = parentContactError === VOID ? null : parentContactError;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    phoneNumError = phoneNumError === VOID ? null : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? false : nationalPhoneNumSet;
    this.ixf_1 = person;
    this.jxf_1 = password;
    this.kxf_1 = genderOptions;
    this.lxf_1 = personPicture;
    this.mxf_1 = fieldsEnabled;
    this.nxf_1 = approvalPersonParentJoin;
    this.oxf_1 = registrationMode;
    this.pxf_1 = usernameError;
    this.qxf_1 = passwordConfirmedError;
    this.rxf_1 = passwordError;
    this.sxf_1 = emailError;
    this.txf_1 = confirmError;
    this.uxf_1 = dateOfBirthError;
    this.vxf_1 = parentContactError;
    this.wxf_1 = genderError;
    this.xxf_1 = firstNameError;
    this.yxf_1 = lastNameError;
    this.zxf_1 = phoneNumError;
    this.axg_1 = nationalPhoneNumSet;
  }
  protoOf(PersonEditUiState).mxl = function () {
    return !(this.nxf_1 == null);
  };
  protoOf(PersonEditUiState).oxc = function () {
    return !hasFlag(this.oxf_1, 1);
  };
  protoOf(PersonEditUiState).ix1 = function () {
    return hasFlag(this.oxf_1, 1);
  };
  protoOf(PersonEditUiState).nxl = function () {
    return hasFlag(this.oxf_1, 1);
  };
  protoOf(PersonEditUiState).uxc = function () {
    return !hasFlag(this.oxf_1, 2);
  };
  protoOf(PersonEditUiState).txc = function () {
    return !hasFlag(this.oxf_1, 2);
  };
  protoOf(PersonEditUiState).sxc = function () {
    return !hasFlag(this.oxf_1, 2);
  };
  protoOf(PersonEditUiState).oxl = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    return new PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).bxg = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet, $super) {
    person = person === VOID ? this.ixf_1 : person;
    password = password === VOID ? this.jxf_1 : password;
    genderOptions = genderOptions === VOID ? this.kxf_1 : genderOptions;
    personPicture = personPicture === VOID ? this.lxf_1 : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? this.mxf_1 : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? this.nxf_1 : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? this.oxf_1 : registrationMode;
    usernameError = usernameError === VOID ? this.pxf_1 : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? this.qxf_1 : passwordConfirmedError;
    passwordError = passwordError === VOID ? this.rxf_1 : passwordError;
    emailError = emailError === VOID ? this.sxf_1 : emailError;
    confirmError = confirmError === VOID ? this.txf_1 : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? this.uxf_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.vxf_1 : parentContactError;
    genderError = genderError === VOID ? this.wxf_1 : genderError;
    firstNameError = firstNameError === VOID ? this.xxf_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.yxf_1 : lastNameError;
    phoneNumError = phoneNumError === VOID ? this.zxf_1 : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? this.axg_1 : nationalPhoneNumSet;
    return $super === VOID ? this.oxl(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) : $super.oxl.call(this, person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).toString = function () {
    return 'PersonEditUiState(person=' + this.ixf_1 + ', password=' + this.jxf_1 + ', genderOptions=' + this.kxf_1 + ', personPicture=' + this.lxf_1 + ', fieldsEnabled=' + this.mxf_1 + ', approvalPersonParentJoin=' + this.nxf_1 + ', registrationMode=' + this.oxf_1 + ', usernameError=' + this.pxf_1 + ', passwordConfirmedError=' + this.qxf_1 + ', passwordError=' + this.rxf_1 + ', emailError=' + this.sxf_1 + ', confirmError=' + this.txf_1 + ', dateOfBirthError=' + this.uxf_1 + ', parentContactError=' + this.vxf_1 + ', genderError=' + this.wxf_1 + ', firstNameError=' + this.xxf_1 + ', lastNameError=' + this.yxf_1 + ', phoneNumError=' + this.zxf_1 + ', nationalPhoneNumSet=' + this.axg_1 + ')';
  };
  protoOf(PersonEditUiState).hashCode = function () {
    var result = this.ixf_1 == null ? 0 : this.ixf_1.hashCode();
    result = imul(result, 31) + (this.jxf_1 == null ? 0 : getStringHashCode(this.jxf_1)) | 0;
    result = imul(result, 31) + hashCode(this.kxf_1) | 0;
    result = imul(result, 31) + (this.lxf_1 == null ? 0 : this.lxf_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mxf_1) | 0;
    result = imul(result, 31) + (this.nxf_1 == null ? 0 : this.nxf_1.hashCode()) | 0;
    result = imul(result, 31) + this.oxf_1 | 0;
    result = imul(result, 31) + (this.pxf_1 == null ? 0 : getStringHashCode(this.pxf_1)) | 0;
    result = imul(result, 31) + (this.qxf_1 == null ? 0 : getStringHashCode(this.qxf_1)) | 0;
    result = imul(result, 31) + (this.rxf_1 == null ? 0 : getStringHashCode(this.rxf_1)) | 0;
    result = imul(result, 31) + (this.sxf_1 == null ? 0 : getStringHashCode(this.sxf_1)) | 0;
    result = imul(result, 31) + (this.txf_1 == null ? 0 : getStringHashCode(this.txf_1)) | 0;
    result = imul(result, 31) + (this.uxf_1 == null ? 0 : getStringHashCode(this.uxf_1)) | 0;
    result = imul(result, 31) + (this.vxf_1 == null ? 0 : getStringHashCode(this.vxf_1)) | 0;
    result = imul(result, 31) + (this.wxf_1 == null ? 0 : getStringHashCode(this.wxf_1)) | 0;
    result = imul(result, 31) + (this.xxf_1 == null ? 0 : getStringHashCode(this.xxf_1)) | 0;
    result = imul(result, 31) + (this.yxf_1 == null ? 0 : getStringHashCode(this.yxf_1)) | 0;
    result = imul(result, 31) + (this.zxf_1 == null ? 0 : getStringHashCode(this.zxf_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.axg_1) | 0;
    return result;
  };
  protoOf(PersonEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonEditUiState ? other : THROW_CCE();
    if (!equals(this.ixf_1, tmp0_other_with_cast.ixf_1))
      return false;
    if (!(this.jxf_1 == tmp0_other_with_cast.jxf_1))
      return false;
    if (!equals(this.kxf_1, tmp0_other_with_cast.kxf_1))
      return false;
    if (!equals(this.lxf_1, tmp0_other_with_cast.lxf_1))
      return false;
    if (!(this.mxf_1 === tmp0_other_with_cast.mxf_1))
      return false;
    if (!equals(this.nxf_1, tmp0_other_with_cast.nxf_1))
      return false;
    if (!(this.oxf_1 === tmp0_other_with_cast.oxf_1))
      return false;
    if (!(this.pxf_1 == tmp0_other_with_cast.pxf_1))
      return false;
    if (!(this.qxf_1 == tmp0_other_with_cast.qxf_1))
      return false;
    if (!(this.rxf_1 == tmp0_other_with_cast.rxf_1))
      return false;
    if (!(this.sxf_1 == tmp0_other_with_cast.sxf_1))
      return false;
    if (!(this.txf_1 == tmp0_other_with_cast.txf_1))
      return false;
    if (!(this.uxf_1 == tmp0_other_with_cast.uxf_1))
      return false;
    if (!(this.vxf_1 == tmp0_other_with_cast.vxf_1))
      return false;
    if (!(this.wxf_1 == tmp0_other_with_cast.wxf_1))
      return false;
    if (!(this.xxf_1 == tmp0_other_with_cast.xxf_1))
      return false;
    if (!(this.yxf_1 == tmp0_other_with_cast.yxf_1))
      return false;
    if (!(this.zxf_1 == tmp0_other_with_cast.zxf_1))
      return false;
    if (!(this.axg_1 === tmp0_other_with_cast.axg_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_5() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function apiUrlConfig$factory_6() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory_0() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory_0() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_0() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory_0() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function EmptyPagingSource() {
    PagingSource.call(this);
  }
  protoOf(EmptyPagingSource).u5a = function (params, $completion) {
    var tmp = Page_init_$Create$(emptyList(), null, null);
    return tmp instanceof LoadResult ? tmp : THROW_CCE();
  };
  function PersonListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yxl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda$slambda).cp4 = function (hasPermissionToList, $completion) {
    var tmp = this.dp4(hasPermissionToList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.yxl_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (this.zxl_1) {
                tmp_0 = this.yxl_1.dxn_1;
              } else {
                tmp_0 = PersonListViewModel$slambda$slambda$slambda$lambda;
              }
              var nextValue = prevValue.pxn(tmp_0, VOID, VOID, VOID, !(this.yxl_1.exn_1 == null), this.yxl_1.exn_1, this.zxl_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.yxl_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.eov_1.wou(this.zxl_1));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).dp4 = function (hasPermissionToList, completion) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this.yxl_1, completion);
    i.zxl_1 = hasPermissionToList;
    return i;
  };
  function PersonListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermissionToList, $completion) {
      return i.cp4(hasPermissionToList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation) {
    this.yxn_1 = $hasPermissionToListFlow;
    this.zxn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(PersonListViewModel$slambda$slambda).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;
            var tmp_0 = distinctUntilChanged(this.yxn_1);
            var tmp_1 = PersonListViewModel$slambda$slambda$slambda_0(this.zxn_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_31(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonListViewModel$slambda$slambda).q7e = function (completion) {
    return new PersonListViewModel$slambda$slambda(this.yxn_1, this.zxn_1, completion);
  };
  function PersonListViewModel$slambda$slambda_0($hasPermissionToListFlow, this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.ixo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda_1).wrl = function (it, $completion) {
    var tmp = this.xrl(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.wrl(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.jxo_1;
          var hasAddPermission = tmp0_container.y6();
          var hasViewAllPermission = tmp0_container.z6();
          var hasBulkAddPermission = hasAddPermission ? hasViewAllPermission : false;
          l$ret$1: do {
            var this_0 = this.ixo_1.fpk_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.pxn(VOID, VOID, VOID, this.ixo_1.kpk().equals(ListViewMode_PICKER_getInstance()) ? hasAddPermission : false, VOID, VOID, VOID, VOID, hasBulkAddPermission);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.ixo_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mov(prevValue_0.xou_1.sov(this.ixo_1.kpk().equals(ListViewMode_BROWSER_getInstance()) ? hasAddPermission : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).xrl = function (it, completion) {
    var i = new PersonListViewModel$slambda$slambda_1(this.ixo_1, completion);
    i.jxo_1 = it;
    return i;
  };
  function PersonListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.wrl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fxn_1;
    setClipboardStringUseCase$factory_4();
    return this_0.t2();
  }
  function onClickFab($this) {
    if ($this.fpk_1.t2().oxn_1) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = $this.fpk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickFab.<anonymous>' call
          var nextValue = prevValue.pxn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      $this.apl();
    }
  }
  function Companion_172() {
    Companion_instance_220 = this;
    this.kxo_1 = 'People';
    this.lxo_1 = 'PersonListHome';
    this.mxo_1 = listOf(['People', 'PersonListHome']);
    this.nxo_1 = 'exlcudeFromClazz';
    this.oxo_1 = 'excludeAlreadySelectedList';
    this.pxo_1 = 'showAddViaInviteLink';
    this.qxo_1 = 'rptsl';
  }
  var Companion_instance_220;
  function Companion_getInstance_190() {
    if (Companion_instance_220 == null)
      new Companion_172();
    return Companion_instance_220;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_31(function_0) {
    this.rxo_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_31).t1d = function (value, $completion) {
    return this.rxo_1(value, $completion);
  };
  function PersonListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.epc().s7j().mfu(getSystemTimeInMillis(), this$0.axn_1, this$0.bxn_1, this$0.cpc(), this$0.fpk_1.t2().ixn_1.kp1_1, toQueryLikeParam(this$0.opb_1.t2().eov_1.tou_1));
    };
  }
  function PersonListViewModel$onClickFab$ref($boundThis) {
    var l = function () {
      onClickFab($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickFab';
    return l;
  }
  function PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation) {
    this.axp_1 = this$0;
    this.bxp_1 = $hasPermissionToListFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda).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 = whenSubscribed(this.axp_1.fpk_1, PersonListViewModel$slambda$slambda_0(this.bxp_1, this.axp_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda(this.axp_1, this.bxp_1, completion);
    i.cxp_1 = $this$launch;
    return i;
  };
  function PersonListViewModel$slambda_0(this$0, $hasPermissionToListFlow, resultContinuation) {
    var i = new PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda_1(this$0, resultContinuation) {
    this.lxp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda_1).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;
            var tmp_0 = this.lxp_1.epc().u7l();
            var tmp_1 = this.lxp_1.cpc();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            var tmp_3 = tmp_0.nhj(tmp_1, tmp_2, new Long(8192, 0));
            var tmp_4 = PersonListViewModel$slambda$slambda_2(this.lxp_1, null);
            suspendResult = tmp_3.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_31(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(PersonListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda_1(this.lxp_1, completion);
    i.mxp_1 = $this$launch;
    return i;
  };
  function PersonListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_190();
    destinationName = destinationName === VOID ? 'People' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new PersonListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('exlcudeFromClazz');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.axn_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('excludeAlreadySelectedList');
    var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : split(tmp0_safe_receiver_0, [',']);
    var tmp_1;
    if (tmp1_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.i1(element);
        }
      }
      tmp_1 = destination;
    }
    var tmp2_safe_receiver = tmp_1;
    var tmp_2;
    if (tmp2_safe_receiver == null) {
      tmp_2 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.i1(tmp$ret$5);
      }
      tmp_2 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_2;
    var tmp_3;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_3 = emptyList();
    } else {
      tmp_3 = tmp3_elvis_lhs;
    }
    tmp_0.bxn_1 = tmp_3;
    var tmp_4 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.ba('rptsl');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_4.cxn_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_5 = this;
    tmp_5.dxn_1 = PersonListViewModel$pagingSourceFactory$lambda(this);
    this.exn_1 = savedStateHandle.ba('showAddViaInviteLink');
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.fxn_1 = Instance(this, tmp$ret$9, null).f5j(this, setClipboardStringUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.<anonymous>' call
        var tmp1_searchState = this.npl(false);
        Companion_getInstance_120();
        var tmp0_elvis_lhs = savedStateHandle.ba('t');
        var tmp2_title = tmp0_elvis_lhs == null ? this.wpl(strings_getInstance().vlu_1, strings_getInstance().sml_1) : tmp0_elvis_lhs;
        var tmp_8 = this.ipc().rnd(strings_getInstance().sm1_1);
        var tmp_9 = FabIcon_ADD_getInstance();
        var tmp3_fabState = new FabUiState(VOID, tmp_8, tmp_9, PersonListViewModel$onClickFab$ref(this));
        var nextValue = prevValue.mov(tmp3_fabState, VOID, tmp2_title, true, VOID, VOID, VOID, tmp1_searchState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_10;
    if (this.cxn_1.equals(new Long(0, 0))) {
      tmp_10 = flowOf(true);
    } else {
      tmp_10 = this.epc().u7l().mhj(this.cpc(), this.cxn_1);
    }
    var hasPermissionToListFlow = tmp_10;
    var tmp_11 = this.bpc();
    launch(tmp_11, VOID, VOID, PersonListViewModel$slambda_0(this, hasPermissionToListFlow, null));
    var tmp_12 = this.bpc();
    launch(tmp_12, VOID, VOID, PersonListViewModel$slambda_2(this, null));
  }
  protoOf(PersonListViewModel).zpk = function (searchText) {
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).xrd = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.pxn(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.hpk_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).nxp = function () {
    if (this.exn_1 == null)
      return Unit_instance;
    Companion_getInstance_120();
    this.mpb_1.fo0('InviteWithLink', mapOf_0(to('inviteCode', this.exn_1)));
  };
  protoOf(PersonListViewModel).oxp = function () {
    var tmp0_safe_receiver = this.fpk_1.t2().lxn_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickCopyInviteCode.<anonymous>' call
      _get_setClipboardStringUseCase__31i1s1_1(this).knv(tmp0_safe_receiver);
      this.gpc().bow(new Snack(this.ipc().rnd(strings_getInstance().vm8_1)));
    }
  };
  protoOf(PersonListViewModel).pxp = function () {
    this.mpb_1.fo0('BulkAddPersonSelectFile', emptyMap());
  };
  protoOf(PersonListViewModel).apl = function () {
    Companion_getInstance_189();
    var tmp0_safe_receiver = this.kpb_1.ba('goToOnPersonSelected');
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickAdd.<anonymous>' call
      tmp = mapOf_0(to('goToOnPersonSelected', tmp0_safe_receiver));
    }
    var tmp1_elvis_lhs = tmp;
    this.spl('PersonEditView', tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs);
  };
  protoOf(PersonListViewModel).qxp = function (entry) {
    var goToOnPersonSelected = this.kpb_1.ba('goToOnPersonSelected');
    if (!(goToOnPersonSelected == null)) {
      var tmp = UMFileUtil_getInstance().parseURLQueryString(goToOnPersonSelected);
      Companion_getInstance_110();
      var args = plus_0(tmp, mapOf_0(to('personUid', entry.x9b_1.toString())));
      var goToDestName = substringBefore_0(goToOnPersonSelected, '?');
      var popUpTo = this.kpb_1.ba('popUpToOnPersonSelected');
      this.mpb_1.doy(goToDestName, args, new UstadGoOptions(popUpTo, true));
    } else {
      this.vpl('PersonDetailView', entry.x9b_1, entry);
    }
  };
  protoOf(PersonListViewModel).rxp = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fpk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onDismissAddSheetOrDialog.<anonymous>' call
        var nextValue = prevValue.pxn(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function PersonListUiState$_init_$lambda_st3t8h() {
    return new EmptyPagingSource();
  }
  function PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    var tmp;
    if (personList === VOID) {
      tmp = PersonListUiState$_init_$lambda_st3t8h;
    } else {
      tmp = personList;
    }
    personList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().rlk_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().rlk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().qlk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().qlk_1;
      tmp_0 = listOf([tmp_2, tmp_4, tmp_6, new SortOrderOption(tmp_7, 4, false)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? false : showInviteViaLink;
    inviteCode = inviteCode === VOID ? null : inviteCode;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? false : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? false : hasBulkImportPermission;
    this.gxn_1 = personList;
    this.hxn_1 = sortOptions;
    this.ixn_1 = sortOption;
    this.jxn_1 = showAddItem;
    this.kxn_1 = showInviteViaLink;
    this.lxn_1 = inviteCode;
    this.mxn_1 = showSortOptions;
    this.nxn_1 = addSheetOrDialogVisible;
    this.oxn_1 = hasBulkImportPermission;
  }
  protoOf(PersonListUiState).sxp = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    return new PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).pxn = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission, $super) {
    personList = personList === VOID ? this.gxn_1 : personList;
    sortOptions = sortOptions === VOID ? this.hxn_1 : sortOptions;
    sortOption = sortOption === VOID ? this.ixn_1 : sortOption;
    showAddItem = showAddItem === VOID ? this.jxn_1 : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? this.kxn_1 : showInviteViaLink;
    inviteCode = inviteCode === VOID ? this.lxn_1 : inviteCode;
    showSortOptions = showSortOptions === VOID ? this.mxn_1 : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? this.nxn_1 : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? this.oxn_1 : hasBulkImportPermission;
    return $super === VOID ? this.sxp(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) : $super.sxp.call(this, personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).toString = function () {
    return 'PersonListUiState(personList=' + this.gxn_1 + ', sortOptions=' + this.hxn_1 + ', sortOption=' + this.ixn_1 + ', showAddItem=' + this.jxn_1 + ', showInviteViaLink=' + this.kxn_1 + ', inviteCode=' + this.lxn_1 + ', showSortOptions=' + this.mxn_1 + ', addSheetOrDialogVisible=' + this.nxn_1 + ', hasBulkImportPermission=' + this.oxn_1 + ')';
  };
  protoOf(PersonListUiState).hashCode = function () {
    var result = hashCode(this.gxn_1);
    result = imul(result, 31) + hashCode(this.hxn_1) | 0;
    result = imul(result, 31) + this.ixn_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jxn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kxn_1) | 0;
    result = imul(result, 31) + (this.lxn_1 == null ? 0 : getStringHashCode(this.lxn_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mxn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nxn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oxn_1) | 0;
    return result;
  };
  protoOf(PersonListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonListUiState ? other : THROW_CCE();
    if (!equals(this.gxn_1, tmp0_other_with_cast.gxn_1))
      return false;
    if (!equals(this.hxn_1, tmp0_other_with_cast.hxn_1))
      return false;
    if (!this.ixn_1.equals(tmp0_other_with_cast.ixn_1))
      return false;
    if (!(this.jxn_1 === tmp0_other_with_cast.jxn_1))
      return false;
    if (!(this.kxn_1 === tmp0_other_with_cast.kxn_1))
      return false;
    if (!(this.lxn_1 == tmp0_other_with_cast.lxn_1))
      return false;
    if (!(this.mxn_1 === tmp0_other_with_cast.mxn_1))
      return false;
    if (!(this.nxn_1 === tmp0_other_with_cast.nxn_1))
      return false;
    if (!(this.oxn_1 === tmp0_other_with_cast.oxn_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory_3() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_4() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function Companion_173() {
    this.txp_1 = 'RegisterAgeRedirect';
  }
  var Companion_instance_221;
  function Companion_getInstance_191() {
    return Companion_instance_221;
  }
  function RegisterAgeRedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'RegisterAgeRedirect');
    this.pxq_1 = MutableStateFlow(new RegisterAgeRedirectUiState(VOID, systemTimeInMillis()));
    this.qxq_1 = asStateFlow(this.pxq_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.<anonymous>' call
        var tmp0_title = this.ipc().rnd(strings_getInstance().xlk_1);
        var nextValue = prevValue.mov(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(RegisterAgeRedirectViewModel).rxq = function (date) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pxq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onSetDate.<anonymous>' call
        var nextValue = prevValue.vxq(date, VOID, !prevValue.sxq_1.equals(date) ? null : prevValue.uxq_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(RegisterAgeRedirectViewModel).kun = function () {
    var date = this.pxq_1.t2().sxq_1;
    if (date.equals(new Long(0, 0))) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.pxq_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.vxq(VOID, VOID, this.ipc().rnd(strings_getInstance().ilo_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    // Inline function 'kotlin.Long.minus' call
    var this_1 = systemTimeInMillis();
    var other = imul(24, get_MS_PER_HOUR());
    var tmp$ret$2 = this_1.mc(toLong(other));
    if (date.c7(tmp$ret$2) > 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.pxq_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue_0 = prevValue_0.vxq(VOID, VOID, this.ipc().rnd(strings_getInstance().mlq_1));
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var dateOfBirthInstant = Companion_getInstance_6().ulh(date);
    var isMinor = isDateOfBirthAMinor(dateOfBirthInstant);
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_3 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
    this.wpc(this_3, Companion_getInstance_189().uwk_1);
    var tmp;
    if (isMinor) {
      Companion_getInstance_189();
      Companion_getInstance_189();
      tmp = 1 | 2;
    } else {
      Companion_getInstance_189();
      tmp = 1;
    }
    var registrationMode = tmp;
    Companion_getInstance_189();
    this_3.s('RegMode', registrationMode.toString());
    Companion_getInstance_189();
    this_3.s('DateOfBirth', date.toString());
    var args = this_3.f3();
    if (isMinor) {
      Companion_getInstance_189();
      this.mpb_1.fo0('Register', args);
    } else {
      this.mpb_1.fo0('Terms', args);
    }
  };
  function RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError) {
    dateOfBirth = dateOfBirth === VOID ? new Long(0, 0) : dateOfBirth;
    var tmp;
    if (maxDate === VOID) {
      Companion_getInstance_2();
      tmp = new Long(-1, 2147483647);
    } else {
      tmp = maxDate;
    }
    maxDate = tmp;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    this.sxq_1 = dateOfBirth;
    this.txq_1 = maxDate;
    this.uxq_1 = dateOfBirthError;
  }
  protoOf(RegisterAgeRedirectUiState).wxq = function (dateOfBirth, maxDate, dateOfBirthError) {
    return new RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).vxq = function (dateOfBirth, maxDate, dateOfBirthError, $super) {
    dateOfBirth = dateOfBirth === VOID ? this.sxq_1 : dateOfBirth;
    maxDate = maxDate === VOID ? this.txq_1 : maxDate;
    dateOfBirthError = dateOfBirthError === VOID ? this.uxq_1 : dateOfBirthError;
    return $super === VOID ? this.wxq(dateOfBirth, maxDate, dateOfBirthError) : $super.wxq.call(this, dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).toString = function () {
    return 'RegisterAgeRedirectUiState(dateOfBirth=' + this.sxq_1.toString() + ', maxDate=' + this.txq_1.toString() + ', dateOfBirthError=' + this.uxq_1 + ')';
  };
  protoOf(RegisterAgeRedirectUiState).hashCode = function () {
    var result = this.sxq_1.hashCode();
    result = imul(result, 31) + this.txq_1.hashCode() | 0;
    result = imul(result, 31) + (this.uxq_1 == null ? 0 : getStringHashCode(this.uxq_1)) | 0;
    return result;
  };
  protoOf(RegisterAgeRedirectUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterAgeRedirectUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterAgeRedirectUiState ? other : THROW_CCE();
    if (!this.sxq_1.equals(tmp0_other_with_cast.sxq_1))
      return false;
    if (!this.txq_1.equals(tmp0_other_with_cast.txq_1))
      return false;
    if (!(this.uxq_1 == tmp0_other_with_cast.uxq_1))
      return false;
    return true;
  };
  function Companion_174() {
    this.xxq_1 = 'WaitForParent';
    this.yxq_1 = 'username';
    this.zxq_1 = 'password';
    this.axr_1 = 'parentContact';
  }
  var Companion_instance_222;
  function Companion_getInstance_192() {
    return Companion_instance_222;
  }
  function RegisterMinorWaitForParentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'WaitForParent');
    this.wxr_1 = MutableStateFlow(new RegisterMinorWaitForParentUiState());
    this.xxr_1 = asStateFlow(this.wxr_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().xlk_1), false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.wxr_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba('username');
        var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
        var tmp1_elvis_lhs = savedStateHandle.ba('password');
        var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
        var tmp2_elvis_lhs = savedStateHandle.ba('parentContact');
        var nextValue_0 = prevValue_0.bxs(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(RegisterMinorWaitForParentViewModel).cxs = function () {
    this.mpb_1.eoy('WaitForParent', true);
  };
  function RegisterMinorWaitForParentUiState(username, password, parentContact) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    parentContact = parentContact === VOID ? '' : parentContact;
    this.yxr_1 = username;
    this.zxr_1 = password;
    this.axs_1 = parentContact;
  }
  protoOf(RegisterMinorWaitForParentUiState).bxs = function (username, password, parentContact) {
    return new RegisterMinorWaitForParentUiState(username, password, parentContact);
  };
  protoOf(RegisterMinorWaitForParentUiState).toString = function () {
    return 'RegisterMinorWaitForParentUiState(username=' + this.yxr_1 + ', password=' + this.zxr_1 + ', parentContact=' + this.axs_1 + ')';
  };
  protoOf(RegisterMinorWaitForParentUiState).hashCode = function () {
    var result = getStringHashCode(this.yxr_1);
    result = imul(result, 31) + getStringHashCode(this.zxr_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.axs_1) | 0;
    return result;
  };
  protoOf(RegisterMinorWaitForParentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterMinorWaitForParentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterMinorWaitForParentUiState ? other : THROW_CCE();
    if (!(this.yxr_1 === tmp0_other_with_cast.yxr_1))
      return false;
    if (!(this.zxr_1 === tmp0_other_with_cast.zxr_1))
      return false;
    if (!(this.axs_1 === tmp0_other_with_cast.axs_1))
      return false;
    return true;
  };
  function RedirectViewModel$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function _get_apiUrlConfig__mldllg_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.axt_1;
    apiUrlConfig$factory_8();
    return this_0.t2();
  }
  function _get_settings__lbkut4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bxt_1;
    settings$factory_0();
    return this_0.t2();
  }
  function Companion_175() {
    this.cxt_1 = '';
  }
  var Companion_instance_223;
  function Companion_getInstance_193() {
    return Companion_instance_223;
  }
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(function_0) {
    this.dxt_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1).mo9 = function (url, target) {
    return this.dxt_1(url, target);
  };
  function RedirectViewModel$slambda(this$0, $destinationArg, $destination, resultContinuation) {
    this.mxt_1 = this$0;
    this.nxt_1 = $destinationArg;
    this.oxt_1 = $destination;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RedirectViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RedirectViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(RedirectViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_$receiver = this.mxt_1.mpb_1;
          var tmp1_accountManager = this.mxt_1.apc();
          var tmp_0 = RedirectViewModel$slambda$lambda;
          var tmp2_openExternalLinkUseCase = new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(tmp_0);
          var tmp3_userCanSelectServer = _get_apiUrlConfig__mldllg_3(this.mxt_1).gn5_1;
          var tmp4_goOptions = new UstadGoOptions(VOID, VOID, true);
          var tmp5_forceAccountSelection = !(this.nxt_1 == null);
          navigateToLink(tmp0_$receiver, this.oxt_1, tmp1_accountManager, tmp2_openExternalLinkUseCase, tmp4_goOptions, tmp5_forceAccountSelection, tmp3_userCanSelectServer);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(RedirectViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new RedirectViewModel$slambda(this.mxt_1, this.nxt_1, this.oxt_1, completion);
    i.pxt_1 = $this$launch;
    return i;
  };
  function RedirectViewModel$slambda_0(this$0, $destinationArg, $destination, resultContinuation) {
    var i = new RedirectViewModel$slambda(this$0, $destinationArg, $destination, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, '');
    var tmp = this;
    Companion_getInstance_110();
    tmp.yxs_1 = savedStateHandle.ba('next');
    var tmp_0 = this;
    Companion_getInstance_110();
    tmp_0.zxs_1 = savedStateHandle.ba('openLink');
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.axt_1 = Instance(this, tmp$ret$0, null).f5j(this, apiUrlConfig$factory_7());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Settings), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.bxt_1 = Instance(this, tmp$ret$2, null).f5j(this, settings$factory());
    this.opb_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, VOID, VOID, VOID, VOID, true));
    var tmp0_elvis_lhs = this.zxs_1;
    var destinationArg = tmp0_elvis_lhs == null ? this.yxs_1 : tmp0_elvis_lhs;
    var activeEndpoint = this.apc().kn5();
    if (!contains(activeEndpoint.hmr_1, 'localhost')) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var tmp_5 = get_direct(di).k5e();
      // Inline function 'org.kodein.di.diContext' call
      var tmp_6 = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$5 = tmp_6.m5d(tmp$ret$4, activeEndpoint);
      var tmp_8 = tmp_5.h5e(tmp$ret$5).k5e();
      // Inline function 'org.kodein.type.generic' call
      var tmp_9 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$7 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
      var db = tmp_8.i5e(tmp$ret$7, 1);
      println(db);
    }
    var tmp_10 = _get_settings__lbkut4(this);
    if (!(tmp_10.nl8('onboaring_screen') === 'true')) {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.redirect.RedirectViewModel.<anonymous>' call
      Companion_getInstance_120();
      this.vpc(this_0, 'next');
      Companion_getInstance_120();
      this.vpc(this_0, 'openLink');
      var tmp$ret$11 = this_0.f3();
      this.mpb_1.fo0('Onboarding', tmp$ret$11);
    } else {
      var tmp_11;
      if (destinationArg == null) {
        Companion_getInstance_132();
        tmp_11 = 'CourseListHome';
      } else {
        tmp_11 = destinationArg;
      }
      var destination = tmp_11;
      var tmp_12 = this.bpc();
      launch(tmp_12, VOID, VOID, RedirectViewModel$slambda_0(this, destinationArg, destination, null));
    }
  }
  function apiUrlConfig$factory_7() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function settings$factory() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function apiUrlConfig$factory_8() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function settings$factory_0() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function ScheduleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda).zxt = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.zxt(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).tmw = function (it, completion) {
    var i = new ScheduleEditViewModel$slambda$slambda(completion);
    i.yxt_1 = it;
    return i;
  };
  function ScheduleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.zxt(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.ixu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda_1).lxu = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.lxu($completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.jxu_1 = new Schedule();
            var tmp_1 = this;
            tmp_1.kxu_1 = this.jxu_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.ixu_1.dpc());
            suspendResult = tmp_2.t68(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.kxu_1.hgy_1 = ARGUMENT;
            this.kxu_1.tgy_1 = true;
            this.kxu_1.mgy_1 = Companion_instance_28.bjy_1;
            return this.jxu_1;
          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);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new ScheduleEditViewModel$slambda$slambda_1(this.ixu_1, completion);
  };
  function ScheduleEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.lxu($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ScheduleEditViewModel$slambda$lambda(this$0) {
    return function (schedule) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.jxv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.pxv(schedule);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_176() {
    this.qxv_1 = 'ScheduleEdit';
  }
  var Companion_instance_224;
  function Companion_getInstance_194() {
    return Companion_instance_224;
  }
  function ScheduleEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ScheduleEditViewModel$slambda(this$0, resultContinuation) {
    this.zxv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.bxw_1 = Companion_instance_28.s4x();
            this.hd_1 = 1;
            var tmp_0 = ScheduleEditViewModel$slambda$slambda_0(null);
            var tmp_1 = ScheduleEditViewModel$slambda$slambda_2(this.zxv_1, null);
            suspendResult = this.zxv_1.spc(this.bxw_1, VOID, VOID, tmp_0, tmp_1, ScheduleEditViewModel$slambda$lambda(this.zxv_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.zxv_1.jxv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.pxv(VOID, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(ScheduleEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$slambda(this.zxv_1, completion);
    i.axw_1 = $this$launch;
    return i;
  };
  function ScheduleEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.kxw_1 = $commitDelay;
    this.lxw_1 = $entity;
    this.mxw_1 = $this;
    this.nxw_1 = $key;
    this.oxw_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.kxw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.lxw_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.mxw_1.opc(this.mxw_1.kpb_1, this.nxw_1, this.oxw_1, this.lxw_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda(this.kxw_1, this.lxw_1, this.mxw_1, this.nxw_1, this.oxw_1, completion);
    i.pxw_1 = $this$launch;
    return i;
  };
  function ScheduleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ScheduleEdit');
    this.jxv_1 = MutableStateFlow(new ScheduleEditUiState(VOID, VOID, VOID, false));
    this.kxv_1 = asStateFlow(this.jxv_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>' call
        var tmp0_title = this.upi(strings_getInstance().blv_1, strings_getInstance().clv_1);
        var tmp = this.ipc().rnd(strings_getInstance().vlr_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, ScheduleEditViewModel$onClickSave$ref(this));
        var nextValue = prevValue.mov(VOID, VOID, tmp0_title, VOID, true, VOID, VOID, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, ScheduleEditViewModel$slambda_0(this, null));
  }
  protoOf(ScheduleEditViewModel).qxw = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.jxv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.lxv_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.igy_1;
        var tmp4_toTimeError = this.vpi(tmp, entity == null ? null : entity.igy_1, prevValue.nxv_1);
        var tmp0_safe_receiver = prevValue.lxv_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jgy_1;
        var tmp5_fromTimeError = this.vpi(tmp_0, entity == null ? null : entity.jgy_1, prevValue.mxv_1);
        var nextValue = prevValue.pxv(entity, tmp5_fromTimeError, tmp4_toTimeError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_28.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.bpc();
    tmp_1.pph_1 = launch(tmp_2, VOID, VOID, ScheduleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ScheduleEditViewModel).mq0 = function () {
    var tmp0_elvis_lhs = this.jxv_1.t2().lxv_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var schedule = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.jxv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        if (schedule.igy_1.equals(new Long(0, 0))) {
          tmp_0 = this.ipc().rnd(strings_getInstance().ilo_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        if (schedule.jgy_1.equals(new Long(0, 0))) {
          tmp_2 = this.ipc().rnd(strings_getInstance().ilo_1);
        } else if (schedule.jgy_1.c7(schedule.igy_1) <= 0) {
          tmp_2 = this.ipc().rnd(strings_getInstance().sm9_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.pxv(VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (this.jxv_1.t2().mxv_1 == null ? this.jxv_1.t2().nxv_1 == null : false) {
      this.tph(schedule);
    }
  };
  function ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    fromTimeError = fromTimeError === VOID ? null : fromTimeError;
    toTimeError = toTimeError === VOID ? null : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.lxv_1 = entity;
    this.mxv_1 = fromTimeError;
    this.nxv_1 = toTimeError;
    this.oxv_1 = fieldsEnabled;
  }
  protoOf(ScheduleEditUiState).rxw = function (entity, fromTimeError, toTimeError, fieldsEnabled) {
    return new ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).pxv = function (entity, fromTimeError, toTimeError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.lxv_1 : entity;
    fromTimeError = fromTimeError === VOID ? this.mxv_1 : fromTimeError;
    toTimeError = toTimeError === VOID ? this.nxv_1 : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? this.oxv_1 : fieldsEnabled;
    return $super === VOID ? this.rxw(entity, fromTimeError, toTimeError, fieldsEnabled) : $super.rxw.call(this, entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).toString = function () {
    return 'ScheduleEditUiState(entity=' + this.lxv_1 + ', fromTimeError=' + this.mxv_1 + ', toTimeError=' + this.nxv_1 + ', fieldsEnabled=' + this.oxv_1 + ')';
  };
  protoOf(ScheduleEditUiState).hashCode = function () {
    var result = this.lxv_1 == null ? 0 : this.lxv_1.hashCode();
    result = imul(result, 31) + (this.mxv_1 == null ? 0 : getStringHashCode(this.mxv_1)) | 0;
    result = imul(result, 31) + (this.nxv_1 == null ? 0 : getStringHashCode(this.nxv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oxv_1) | 0;
    return result;
  };
  protoOf(ScheduleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScheduleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScheduleEditUiState ? other : THROW_CCE();
    if (!equals(this.lxv_1, tmp0_other_with_cast.lxv_1))
      return false;
    if (!(this.mxv_1 == tmp0_other_with_cast.mxv_1))
      return false;
    if (!(this.nxv_1 == tmp0_other_with_cast.nxv_1))
      return false;
    if (!(this.oxv_1 === tmp0_other_with_cast.oxv_1))
      return false;
    return true;
  };
  function Companion_177() {
    this.sxw_1 = 'DevSettings';
    this.txw_1 = 'showDevSettings';
  }
  var Companion_instance_225;
  function Companion_getInstance_195() {
    return Companion_instance_225;
  }
  function SettingsViewModel$slambda$slambda(this$0, resultContinuation) {
    this.cxx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda$slambda).cp4 = function (siteAdminSettingsVisible, $completion) {
    var tmp = this.dp4(siteAdminSettingsVisible, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.cxx_1.zxx_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.exz(VOID, VOID, VOID, this.dxx_1, this.dxx_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SettingsViewModel$slambda$slambda).dp4 = function (siteAdminSettingsVisible, completion) {
    var i = new SettingsViewModel$slambda$slambda(this.cxx_1, completion);
    i.dxx_1 = siteAdminSettingsVisible;
    return i;
  };
  function SettingsViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (siteAdminSettingsVisible, $completion) {
      return i.cp4(siteAdminSettingsVisible, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_supportedLangConfig__llzj1v($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bxy_1;
    supportedLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cxy_1;
    setLanguageUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplayOptsUseCase__lppxoi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.exy_1;
    getHtmlContentDisplayOptsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplaySettingUseCase__usawf4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fxy_1;
    getHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setHtmlContentDisplaySettingUseCase__8cgzqk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gxy_1;
    setHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hxy_1;
    getVersionUseCase$factory_4();
    return this_0.t2();
  }
  function _get_getStorageOptionsUseCase__v5dedp($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ixy_1;
    getStorageOptionsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageSettingUseCase__5c8mhw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jxy_1;
    getOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setOfflineStorageSettingUseCase__lx9or4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kxy_1;
    setOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageAvailableSpace__om40zq($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lxy_1;
    getOfflineStorageAvailableSpace$factory_0();
    return this_0.t2();
  }
  function _get_settings__lbkut4_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nxy_1;
    settings$factory_2();
    return this_0.t2();
  }
  function Companion_178() {
    this.fxz_1 = 'Settings';
  }
  var Companion_instance_226;
  function Companion_getInstance_196() {
    return Companion_instance_226;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_32(function_0) {
    this.gxz_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_32).t1d = function (value, $completion) {
    return this.gxz_1(value, $completion);
  };
  function SettingsViewModel$slambda(this$0, resultContinuation) {
    this.pxz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            var tmp0_safe_receiver = _get_getStorageOptionsUseCase__v5dedp(this.pxz_1);
            tmp_0.rxz_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.to8();
            var tmp_1 = this;
            var tmp1_safe_receiver = _get_getOfflineStorageSettingUseCase__5c8mhw(this.pxz_1);
            tmp_1.sxz_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.to8();
            if (!(this.rxz_1 == null)) {
              var tmp_2 = this;
              tmp_2.txz_1 = this.rxz_1;
              var tmp_3 = this;
              tmp_3.uxz_1 = this.txz_1;
              var tmp_4 = this;
              tmp_4.vxz_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.txz_1, 10));
              this.wxz_1 = this.uxz_1.w();
              this.hd_1 = 1;
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 1:
            if (!this.wxz_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.xxz_1 = this.wxz_1.e();
            var tmp_5 = this;
            tmp_5.yxz_1 = this.xxz_1;
            this.zxz_1 = _get_getOfflineStorageAvailableSpace__om40zq(this.pxz_1);
            if (this.zxz_1 == null) {
              this.ay0_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.zxz_1.jod(this.yxz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.ay0_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            var tmp1_elvis_lhs = this.ay0_1;
            var ARGUMENT = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var ARGUMENT_0 = new SettingsOfflineStorageOption(this.yxz_1, ARGUMENT);
            this.vxz_1.i1(ARGUMENT_0);
            this.hd_1 = 1;
            continue $sm;
          case 4:
            var optionsWithSpace = this.vxz_1;
            l$ret$1: do {
              var this_0 = this.pxz_1.zxx_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_elvis_lhs = this.sxz_1;
                var nextValue = prevValue.exz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, optionsWithSpace, tmp0_elvis_lhs == null ? first_0(this.rxz_1) : tmp0_elvis_lhs);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          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);
  };
  protoOf(SettingsViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SettingsViewModel$slambda(this.pxz_1, completion);
    i.qxz_1 = $this$launch;
    return i;
  };
  function SettingsViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SettingsViewModel$slambda_1(this$0, resultContinuation) {
    this.jy0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda_1).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;
            var tmp_0 = this.jy0_1.epc().u7l();
            var tmp_1 = this.jy0_1.cpc();
            PermissionFlags_getInstance();
            var tmp_2 = tmp_0.mhj(tmp_1, new Long(16384, 0));
            var tmp_3 = SettingsViewModel$slambda$slambda_0(this.jy0_1, null);
            suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_32(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SettingsViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SettingsViewModel$slambda_1(this.jy0_1, completion);
    i.ky0_1 = $this$launch;
    return i;
  };
  function SettingsViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SettingsViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'Settings');
    this.zxx_1 = MutableStateFlow(new SettingsUiState());
    this.axy_1 = asStateFlow(this.zxx_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.bxy_1 = Instance(this, tmp$ret$0, null).f5j(this, supportedLangConfig$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.cxy_1 = Instance(this, tmp$ret$2, null).f5j(this, setLanguageUseCase$factory_1());
    this.dxy_1 = _get_supportedLangConfig__llzj1v(this).aox(this.ipc());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(GetHtmlContentDisplayEngineOptionsUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.exy_1 = InstanceOrNull(this, tmp$ret$4, null).f5j(this, getHtmlContentDisplayOptsUseCase$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(GetHtmlContentDisplayEngineUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.fxy_1 = InstanceOrNull(this, tmp$ret$6, null).f5j(this, getHtmlContentDisplaySettingUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SetHtmlContentDisplayEngineUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.gxy_1 = InstanceOrNull(this, tmp$ret$8, null).f5j(this, setHtmlContentDisplaySettingUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.hxy_1 = Instance(this, tmp$ret$10, null).f5j(this, getVersionUseCase$factory_3());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetOfflineStorageOptionsUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.ixy_1 = InstanceOrNull(this, tmp$ret$12, null).f5j(this, getStorageOptionsUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(GetOfflineStorageSettingUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.jxy_1 = InstanceOrNull(this, tmp$ret$14, null).f5j(this, getOfflineStorageSettingUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(SetOfflineStorageSettingUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.kxy_1 = InstanceOrNull(this, tmp$ret$16, null).f5j(this, setOfflineStorageSettingUseCase$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(GetOfflineStorageAvailableSpace), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.lxy_1 = InstanceOrNull(this, tmp$ret$18, null).f5j(this, getOfflineStorageAvailableSpace$factory());
    this.mxy_1 = atomic$int$1(0);
    var tmp_19 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_20 = typeToken(createKType(getKClass(Settings), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
    tmp_19.nxy_1 = Instance(this, tmp$ret$20, null).f5j(this, settings$factory_1());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().fll_1), VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = _get_supportedLangConfig__llzj1v(this).sow();
    var tmp_21;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_92();
      tmp_21 = '';
    } else {
      tmp_21 = tmp0_elvis_lhs;
    }
    var langSetting = tmp_21;
    var tmp$ret$25;
    $l$block_0: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.dxy_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        if (element.hot_1 === langSetting) {
          tmp$ret$25 = element;
          break $l$block_0;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    var currentLang = tmp$ret$25;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.zxx_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var tmp3_currentLanguage = currentLang.iot_1;
        var tmp4_availableLanguages = this.dxy_1;
        var tmp0_safe_receiver = _get_getHtmlContentDisplayOptsUseCase__lppxoi(this);
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.to8();
        var tmp5_htmlContentDisplayOptions = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
        var tmp2_safe_receiver = _get_getHtmlContentDisplaySettingUseCase__usawf4(this);
        var tmp6_currentHtmlContentDisplayOption = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.to8();
        var tmp7_version = _get_getVersionUseCase__n7x57g_1(this).to8().ro8_1;
        var tmp_22 = _get_settings__lbkut4_0(this);
        var tmp8_showDeveloperOptions = tmp_22.pl8('showDevSettings', false);
        var nextValue_0 = prevValue_0.exz(tmp5_htmlContentDisplayOptions, tmp6_currentHtmlContentDisplayOption, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_currentLanguage, tmp4_availableLanguages, VOID, tmp8_showDeveloperOptions, tmp7_version);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_1;
        }
      }
    }
    var tmp_23 = this.bpc();
    launch(tmp_23, VOID, VOID, SettingsViewModel$slambda_0(this, null));
    var tmp_24 = this.bpc();
    launch(tmp_24, VOID, VOID, SettingsViewModel$slambda_2(this, null));
  }
  protoOf(SettingsViewModel).ly0 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zxx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLanguage.<anonymous>' call
        var nextValue = prevValue.exz(VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).my0 = function (lang) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zxx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
        var nextValue = prevValue.exz(VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var result = _get_setLanguageUseCase__st7nci_0(this).eo9(lang, 'Settings', this.mpb_1);
    if (result.co9_1) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.zxx_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
          var nextValue_0 = prevValue_0.exz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    } else {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.zxx_1;
        while (true) {
          var prevValue_1 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
          var nextValue_1 = prevValue_1.exz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, lang.iot_1);
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(SettingsViewModel).ny0 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zxx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.exz(VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).oy0 = function () {
    this.mpb_1.fo0('Community', emptyMap());
  };
  protoOf(SettingsViewModel).py0 = function () {
    this.mpb_1.fo0('DeletedItems', emptyMap());
  };
  protoOf(SettingsViewModel).qy0 = function () {
    this.mpb_1.fo0('AppearanceDetailView', emptyMap());
  };
  function SettingsUiState(htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, appearanceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) {
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? emptyList() : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? null : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? false : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? false : workspaceSettingsVisible;
    appearanceSettingsVisible = appearanceSettingsVisible === VOID ? false : appearanceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? false : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? false : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? false : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? '' : currentLanguage;
    availableLanguages = availableLanguages === VOID ? emptyList() : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? false : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? false : showDeveloperOptions;
    version = version === VOID ? '' : version;
    storageOptions = storageOptions === VOID ? emptyList() : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? null : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? false : storageOptionsDialogVisible;
    this.oxy_1 = htmlContentDisplayOptions;
    this.pxy_1 = currentHtmlContentDisplayOption;
    this.qxy_1 = holidayCalendarVisible;
    this.rxy_1 = workspaceSettingsVisible;
    this.sxy_1 = appearanceSettingsVisible;
    this.txy_1 = reasonLeavingVisible;
    this.uxy_1 = langDialogVisible;
    this.vxy_1 = htmlContentDisplayDialogVisible;
    this.wxy_1 = currentLanguage;
    this.xxy_1 = availableLanguages;
    this.yxy_1 = waitForRestartDialogVisible;
    this.zxy_1 = showDeveloperOptions;
    this.axz_1 = version;
    this.bxz_1 = storageOptions;
    this.cxz_1 = selectedOfflineStorageOption;
    this.dxz_1 = storageOptionsDialogVisible;
  }
  protoOf(SettingsUiState).ry0 = function (htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, appearanceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) {
    return new SettingsUiState(htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, appearanceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).exz = function (htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, appearanceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, $super) {
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? this.oxy_1 : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? this.pxy_1 : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? this.qxy_1 : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? this.rxy_1 : workspaceSettingsVisible;
    appearanceSettingsVisible = appearanceSettingsVisible === VOID ? this.sxy_1 : appearanceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? this.txy_1 : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? this.uxy_1 : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? this.vxy_1 : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? this.wxy_1 : currentLanguage;
    availableLanguages = availableLanguages === VOID ? this.xxy_1 : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? this.yxy_1 : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? this.zxy_1 : showDeveloperOptions;
    version = version === VOID ? this.axz_1 : version;
    storageOptions = storageOptions === VOID ? this.bxz_1 : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? this.cxz_1 : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? this.dxz_1 : storageOptionsDialogVisible;
    return $super === VOID ? this.ry0(htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, appearanceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) : $super.ry0.call(this, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, appearanceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).toString = function () {
    return 'SettingsUiState(htmlContentDisplayOptions=' + this.oxy_1 + ', currentHtmlContentDisplayOption=' + this.pxy_1 + ', holidayCalendarVisible=' + this.qxy_1 + ', workspaceSettingsVisible=' + this.rxy_1 + ', appearanceSettingsVisible=' + this.sxy_1 + ', reasonLeavingVisible=' + this.txy_1 + ', langDialogVisible=' + this.uxy_1 + ', htmlContentDisplayDialogVisible=' + this.vxy_1 + ', currentLanguage=' + this.wxy_1 + ', availableLanguages=' + this.xxy_1 + ', waitForRestartDialogVisible=' + this.yxy_1 + ', showDeveloperOptions=' + this.zxy_1 + ', version=' + this.axz_1 + ', storageOptions=' + this.bxz_1 + ', selectedOfflineStorageOption=' + this.cxz_1 + ', storageOptionsDialogVisible=' + this.dxz_1 + ')';
  };
  protoOf(SettingsUiState).hashCode = function () {
    var result = hashCode(this.oxy_1);
    result = imul(result, 31) + (this.pxy_1 == null ? 0 : this.pxy_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qxy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rxy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.sxy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.txy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uxy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vxy_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.wxy_1) | 0;
    result = imul(result, 31) + hashCode(this.xxy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yxy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zxy_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.axz_1) | 0;
    result = imul(result, 31) + hashCode(this.bxz_1) | 0;
    result = imul(result, 31) + (this.cxz_1 == null ? 0 : this.cxz_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dxz_1) | 0;
    return result;
  };
  protoOf(SettingsUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SettingsUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SettingsUiState ? other : THROW_CCE();
    if (!equals(this.oxy_1, tmp0_other_with_cast.oxy_1))
      return false;
    if (!equals(this.pxy_1, tmp0_other_with_cast.pxy_1))
      return false;
    if (!(this.qxy_1 === tmp0_other_with_cast.qxy_1))
      return false;
    if (!(this.rxy_1 === tmp0_other_with_cast.rxy_1))
      return false;
    if (!(this.sxy_1 === tmp0_other_with_cast.sxy_1))
      return false;
    if (!(this.txy_1 === tmp0_other_with_cast.txy_1))
      return false;
    if (!(this.uxy_1 === tmp0_other_with_cast.uxy_1))
      return false;
    if (!(this.vxy_1 === tmp0_other_with_cast.vxy_1))
      return false;
    if (!(this.wxy_1 === tmp0_other_with_cast.wxy_1))
      return false;
    if (!equals(this.xxy_1, tmp0_other_with_cast.xxy_1))
      return false;
    if (!(this.yxy_1 === tmp0_other_with_cast.yxy_1))
      return false;
    if (!(this.zxy_1 === tmp0_other_with_cast.zxy_1))
      return false;
    if (!(this.axz_1 === tmp0_other_with_cast.axz_1))
      return false;
    if (!equals(this.bxz_1, tmp0_other_with_cast.bxz_1))
      return false;
    if (!equals(this.cxz_1, tmp0_other_with_cast.cxz_1))
      return false;
    if (!(this.dxz_1 === tmp0_other_with_cast.dxz_1))
      return false;
    return true;
  };
  function SettingsOfflineStorageOption(option, availableSpace) {
    this.sy0_1 = option;
    this.ty0_1 = availableSpace;
  }
  protoOf(SettingsOfflineStorageOption).toString = function () {
    return 'SettingsOfflineStorageOption(option=' + this.sy0_1 + ', availableSpace=' + this.ty0_1.toString() + ')';
  };
  protoOf(SettingsOfflineStorageOption).hashCode = function () {
    var result = this.sy0_1.hashCode();
    result = imul(result, 31) + this.ty0_1.hashCode() | 0;
    return result;
  };
  protoOf(SettingsOfflineStorageOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SettingsOfflineStorageOption))
      return false;
    var tmp0_other_with_cast = other instanceof SettingsOfflineStorageOption ? other : THROW_CCE();
    if (!this.sy0_1.equals(tmp0_other_with_cast.sy0_1))
      return false;
    if (!this.ty0_1.equals(tmp0_other_with_cast.ty0_1))
      return false;
    return true;
  };
  function supportedLangConfig$factory() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_1() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function getHtmlContentDisplayOptsUseCase$factory() {
    return getPropertyCallableRef('getHtmlContentDisplayOptsUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplayOptsUseCase__lppxoi(receiver);
    }, null);
  }
  function getHtmlContentDisplaySettingUseCase$factory() {
    return getPropertyCallableRef('getHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplaySettingUseCase__usawf4(receiver);
    }, null);
  }
  function setHtmlContentDisplaySettingUseCase$factory() {
    return getPropertyCallableRef('setHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setHtmlContentDisplaySettingUseCase__8cgzqk(receiver);
    }, null);
  }
  function getVersionUseCase$factory_3() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_1(receiver);
    }, null);
  }
  function getStorageOptionsUseCase$factory() {
    return getPropertyCallableRef('getStorageOptionsUseCase', 1, KProperty1, function (receiver) {
      return _get_getStorageOptionsUseCase__v5dedp(receiver);
    }, null);
  }
  function getOfflineStorageSettingUseCase$factory() {
    return getPropertyCallableRef('getOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageSettingUseCase__5c8mhw(receiver);
    }, null);
  }
  function setOfflineStorageSettingUseCase$factory() {
    return getPropertyCallableRef('setOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setOfflineStorageSettingUseCase__lx9or4(receiver);
    }, null);
  }
  function getOfflineStorageAvailableSpace$factory() {
    return getPropertyCallableRef('getOfflineStorageAvailableSpace', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageAvailableSpace__om40zq(receiver);
    }, null);
  }
  function settings$factory_1() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4_0(receiver);
    }, null);
  }
  function supportedLangConfig$factory_0() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_2() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function getHtmlContentDisplayOptsUseCase$factory_0() {
    return getPropertyCallableRef('getHtmlContentDisplayOptsUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplayOptsUseCase__lppxoi(receiver);
    }, null);
  }
  function getHtmlContentDisplaySettingUseCase$factory_0() {
    return getPropertyCallableRef('getHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplaySettingUseCase__usawf4(receiver);
    }, null);
  }
  function setHtmlContentDisplaySettingUseCase$factory_0() {
    return getPropertyCallableRef('setHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setHtmlContentDisplaySettingUseCase__8cgzqk(receiver);
    }, null);
  }
  function getVersionUseCase$factory_4() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_1(receiver);
    }, null);
  }
  function getStorageOptionsUseCase$factory_0() {
    return getPropertyCallableRef('getStorageOptionsUseCase', 1, KProperty1, function (receiver) {
      return _get_getStorageOptionsUseCase__v5dedp(receiver);
    }, null);
  }
  function getOfflineStorageSettingUseCase$factory_0() {
    return getPropertyCallableRef('getOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageSettingUseCase__5c8mhw(receiver);
    }, null);
  }
  function setOfflineStorageSettingUseCase$factory_0() {
    return getPropertyCallableRef('setOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setOfflineStorageSettingUseCase__lx9or4(receiver);
    }, null);
  }
  function getOfflineStorageAvailableSpace$factory_0() {
    return getPropertyCallableRef('getOfflineStorageAvailableSpace', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageAvailableSpace__om40zq(receiver);
    }, null);
  }
  function settings$factory_2() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4_0(receiver);
    }, null);
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).ey1 = function (site, hasAdminPermission, $completion) {
    var tmp = this.fy1(site, hasAdminPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof Site) ? p1 : THROW_CCE();
    return this.ey1(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Pair(this.cy1_1, this.dy1_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).fy1 = function (site, hasAdminPermission, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.cy1_1 = site;
    i.dy1_1 = hasAdminPermission;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (site, hasAdminPermission, $completion) {
      return i.ey1(site, hasAdminPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.oy1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).qy1 = function (it, $completion) {
    var tmp = this.ry1(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.qy1(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.py1_1;
          var entity = tmp0_container.y6();
          var hasEditSitePermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.oy1_1.oy2_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sy2(entity);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.oy1_1.opb_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.mov(prevValue_0.xou_1.sov(!(this.py1_1.w6_1 == null) ? hasEditSitePermission : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).ry1 = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this.oy1_1, completion);
    i.py1_1 = it;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qy1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation) {
    this.by3_1 = this$0;
    this.cy3_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).ey3 = function (it, $completion) {
    var tmp = this.fy3(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.ey3((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$3: do {
            var this_0 = this.by3_1.oy2_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.dy3_1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = this_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp0_iterator_0 = this.cy3_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element_0 = tmp0_iterator_0.e();
                    if (element_0.hot_1 === element.xhb_1) {
                      tmp$ret$0 = element_0;
                      break l$ret$1;
                    }
                  }
                  tmp$ret$0 = null;
                }
                 while (false);
                var tmp0_safe_receiver = tmp$ret$0;
                var tmp_0;
                if (tmp0_safe_receiver == null) {
                  tmp_0 = null;
                } else {
                  tmp_0 = new SiteTermsAndLangName(element, tmp0_safe_receiver.iot_1);
                }
                var tmp0_safe_receiver_0 = tmp_0;
                if (tmp0_safe_receiver_0 == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver_0);
                }
              }
              var nextValue = prevValue.sy2(VOID, destination);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).fy3 = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this.by3_1, this.cy3_1, completion);
    i.dy3_1 = it;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation);
    var l = function (it, $completion) {
      return i.ey3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation) {
    this.oy3_1 = $siteFlow;
    this.py3_1 = $permissionFlow;
    this.qy3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = combine(this.oy3_1, this.py3_1, SiteDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this.qy3_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda(this.oy3_1, this.py3_1, this.qy3_1, completion);
    i.ry3_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda_0($siteFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda_1(this$0, $uiLangList, resultContinuation) {
    this.ay4_1 = this$0;
    this.by4_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = this.ay4_1.epc().b7l().xha(1);
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this.ay4_1, this.by4_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda_1(this.ay4_1, this.by4_1, completion);
    i.cy4_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda_2(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda_1(this$0, $uiLangList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda(this$0, $this_launch, $uiLangList, resultContinuation) {
    this.ly4_1 = this$0;
    this.my4_1 = $this_launch;
    this.ny4_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var siteFlow = this.ly4_1.epc().a7l().eh6();
          var tmp_0 = this.ly4_1.epc().u7l();
          var tmp_1 = this.ly4_1.cpc();
          PermissionFlags_getInstance();
          var permissionFlow = tmp_0.mhj(tmp_1, new Long(16384, 0));
          launch(this.my4_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_0(siteFlow, permissionFlow, this.ly4_1, null));
          launch(this.my4_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_2(this.ly4_1, this.ny4_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new SiteDetailViewModel$slambda$slambda(this.ly4_1, this.my4_1, this.ny4_1, completion);
  };
  function SiteDetailViewModel$slambda$slambda_0(this$0, $this_launch, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda(this$0, $this_launch, $uiLangList, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_179() {
    this.oy4_1 = 'Community';
  }
  var Companion_instance_227;
  function Companion_getInstance_197() {
    return Companion_instance_227;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_33(function_0) {
    this.py4_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_33).t1d = function (value, $completion) {
    return this.py4_1(value, $completion);
  };
  function SiteDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.spy();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation) {
    this.yy4_1 = this$0;
    this.zy4_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda).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 = whenSubscribed(this.yy4_1.oy2_1, SiteDetailViewModel$slambda$slambda_0(this.yy4_1, this.ay5_1, this.zy4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SiteDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda(this.yy4_1, this.zy4_1, completion);
    i.ay5_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda_0(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Community');
    this.oy2_1 = MutableStateFlow(new SiteDetailUiState());
    this.py2_1 = asStateFlow(this.oy2_1);
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var supportLangConfig = tmp.i5e(tmp$ret$0, null);
    var uiLangList = supportLangConfig.yoc_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.detail.SiteDetailViewModel.<anonymous>' call
        var tmp0_text = this.ipc().rnd(strings_getInstance().tlv_1);
        var tmp1_onClick = SiteDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mov(new FabUiState(false, tmp0_text, tmp2_icon, tmp1_onClick), VOID, this.ipc().rnd(strings_getInstance().dma_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.bpc();
    launch(tmp_1, VOID, VOID, SiteDetailViewModel$slambda_0(this, uiLangList, null));
  }
  protoOf(SiteDetailViewModel).spy = function () {
    Companion_getInstance_120();
    var tmp0_safe_receiver = this.oy2_1.t2().qy2_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ih6_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this.mpb_1.fo0('SiteEdit', mapOf_0(to('entityUid', tmp2_elvis_lhs == null ? '-1' : tmp2_elvis_lhs)));
  };
  protoOf(SiteDetailViewModel).by5 = function (termsAndLang) {
    var tmp0_elvis_lhs = termsAndLang.mje_1.xhb_1;
    this.mpb_1.fo0('Terms', mapOf_0(to('locale', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  function SiteDetailUiState(site, siteTerms) {
    site = site === VOID ? null : site;
    siteTerms = siteTerms === VOID ? emptyList() : siteTerms;
    this.qy2_1 = site;
    this.ry2_1 = siteTerms;
  }
  protoOf(SiteDetailUiState).cy5 = function (site, siteTerms) {
    return new SiteDetailUiState(site, siteTerms);
  };
  protoOf(SiteDetailUiState).sy2 = function (site, siteTerms, $super) {
    site = site === VOID ? this.qy2_1 : site;
    siteTerms = siteTerms === VOID ? this.ry2_1 : siteTerms;
    return $super === VOID ? this.cy5(site, siteTerms) : $super.cy5.call(this, site, siteTerms);
  };
  protoOf(SiteDetailUiState).toString = function () {
    return 'SiteDetailUiState(site=' + this.qy2_1 + ', siteTerms=' + this.ry2_1 + ')';
  };
  protoOf(SiteDetailUiState).hashCode = function () {
    var result = this.qy2_1 == null ? 0 : hashCode(this.qy2_1);
    result = imul(result, 31) + hashCode(this.ry2_1) | 0;
    return result;
  };
  protoOf(SiteDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteDetailUiState ? other : THROW_CCE();
    if (!equals(this.qy2_1, tmp0_other_with_cast.qy2_1))
      return false;
    if (!equals(this.ry2_1, tmp0_other_with_cast.ry2_1))
      return false;
    return true;
  };
  function SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ly5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda$slambda).ioz = function (it, $completion) {
    var tmp = this.joz(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ioz(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.my5_1.poy_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newTerms = tmp_1;
          this.ly5_1.oy6(newTerms);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).joz = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this.ly5_1, completion);
    i.my5_1 = it;
    return i;
  };
  function SiteEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ioz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda).yy6 = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.yy6(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda).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.xy6_1.a7l().dh6(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(SiteEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new SiteEditViewModel$slambda$slambda(completion);
    i.xy6_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.yy6(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_1).lh8 = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.lh8($completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Site();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new SiteEditViewModel$slambda$slambda_1(completion);
  };
  function SiteEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.lh8($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SiteEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ky6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.py7(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation) {
    this.yy7_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_3).ay8 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.ay8(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).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.zy7_1.b7l().yha(1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (contains_0(this.yy7_1, element.xhb_1)) {
                destination.i1(element);
              }
            }

            var termsLoadedFromDb = destination;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = termsLoadedFromDb.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = element_0.xhb_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver);
              }
            }

            var langsLoadedFromDb = destination_0;
            var this_1 = ArrayList_init_$Create$();
            this_1.m1(termsLoadedFromDb);
            var this_2 = this.yy7_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_1 = tmp0_iterator_1.e();
              if (!langsLoadedFromDb.a1(element_1)) {
                destination_1.i1(element_1);
              }
            }

            var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_1, 10));
            var tmp0_iterator_2 = destination_1.w();
            while (tmp0_iterator_2.f()) {
              var item = tmp0_iterator_2.e();
              var this_3 = new SiteTerms();
              this_3.xhb_1 = item;
              destination_2.i1(this_3);
            }

            this_1.m1(destination_2);
            return this_1.f3();
          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);
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).tmw = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda_3(this.yy7_1, completion);
    i.zy7_1 = it;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_4($supportedLangCodes, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation);
    var l = function (it, $completion) {
      return i.ay8(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_5).jy8 = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).r7e = function ($completion) {
    return this.jy8($completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).q7e = function (completion) {
    return new SiteEditViewModel$slambda$slambda_5(completion);
  };
  function SiteEditViewModel$slambda$slambda_6(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.jy8($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SiteEditViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ky6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.py7(VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.sy8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).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;
            var tmp_0 = this.sy8_1.mpc(this.sy8_1.fpc(), 'siteTermsHtml');
            var tmp_1 = SiteEditViewModel$slambda$slambda$slambda_0(this.sy8_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$slambda$slambda_7(this.sy8_1, completion);
    i.ty8_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_8(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onClickSave$slambda$lambda($it) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      // Inline function 'kotlin.text.isNullOrBlank' call
      var tmp0_safe_receiver = $it.whb_1;
      var this_0 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      // Inline function 'kotlin.contracts.contract' call
      tmp.zhb_1 = !(this_0 == null ? true : isBlank(this_0));
      return Unit_instance;
    };
  }
  function _get_languagesConfig__hebcss_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.my6_1;
    languagesConfig$factory_2();
    return this_0.t2();
  }
  function Companion_180() {
    this.uy8_1 = 'SiteEdit';
    this.vy8_1 = 'siteTermsLang';
    this.wy8_1 = 'termsList';
    this.xy8_1 = 'siteTermsHtml';
  }
  var Companion_instance_228;
  function Companion_getInstance_198() {
    return Companion_instance_228;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_34(function_0) {
    this.yy8_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_34).t1d = function (value, $completion) {
    return this.yy8_1(value, $completion);
  };
  function SiteEditViewModel$slambda(this$0, resultContinuation) {
    this.hy9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda).mqw = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda).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;
            var tmp_0 = this.iy9_1.u7l();
            var tmp_1 = this.hy9_1.cpc();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.lhj(tmp_1, new Long(16384, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(SiteEditViewModel$slambda).tmw = function (db, completion) {
    var i = new SiteEditViewModel$slambda(this.hy9_1, completion);
    i.iy9_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mqw(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$lambda(this$0) {
    return function (enabled) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ky6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.py7(VOID, VOID, VOID, enabled);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda_1(this$0, $supportedLangCodes, resultContinuation) {
    this.ry9_1 = this$0;
    this.sy9_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_30.s4x();
            var tmp_1 = SiteEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SiteEditViewModel$slambda$slambda_2(null);
            suspendResult = this.ry9_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, SiteEditViewModel$slambda$lambda(this.ry9_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = ListSerializer(Companion_instance_46.s4x());
            var tmp_4 = listOf_0('termsList');
            var tmp_5 = SiteEditViewModel$slambda$slambda_4(this.sy9_1, null);
            var tmp_6 = SiteEditViewModel$slambda$slambda_6(null);
            suspendResult = this.ry9_1.rpc(tmp_3, tmp_4, 'termsList', tmp_5, tmp_6, SiteEditViewModel$slambda$lambda_0(this.ry9_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            l$ret$1: do {
              var this_0 = this.ry9_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_7 = this.ry9_1.ipc().rnd(strings_getInstance().hm3_1);
                var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, SiteEditViewModel$onClickSave$ref(this.ry9_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.ty9_1, VOID, VOID, SiteEditViewModel$slambda$slambda_8(this.ry9_1, null));
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new SiteEditViewModel$slambda_1(this.ry9_1, this.sy9_1, completion);
    i.ty9_1 = $this$launchIfHasPermission;
    return i;
  };
  function SiteEditViewModel$slambda_2(this$0, $supportedLangCodes, resultContinuation) {
    var i = new SiteEditViewModel$slambda_1(this$0, $supportedLangCodes, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda($html) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.whb_1 = $html;
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda_0($prev) {
    return function (it) {
      return it.xhb_1 === $prev.ny7_1.hot_1;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation) {
    this.cya_1 = this$0;
    this.dya_1 = $newTerms;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.cya_1.opc(this.cya_1.kpb_1, 'termsList', ListSerializer(Companion_instance_46.s4x()), this.dya_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onChangeTermsHtml$slambda(this.cya_1, this.dya_1, completion);
    i.eya_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onChangeTermsHtml$slambda_0(this$0, $newTerms, resultContinuation) {
    var i = new SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.nya_1 = $commitDelay;
    this.oya_1 = $entity;
    this.pya_1 = $this;
    this.qya_1 = $key;
    this.rya_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.nya_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.oya_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.pya_1.opc(this.pya_1.kpb_1, this.qya_1, this.rya_1, this.oya_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onEntityChanged$slambda(this.nya_1, this.oya_1, this.pya_1, this.qya_1, this.rya_1, completion);
    i.sya_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SiteEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onClickSave$slambda(this$0, $siteToSave, resultContinuation) {
    this.byb_1 = this$0;
    this.cyb_1 = $siteToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.byb_1.epc().a7l().fh6(this.cyb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.byb_1.epc().b7l();
            var this_0 = this.byb_1.ky6_1.t2().iy7_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp_1;
              var tmp0_safe_receiver = element.whb_1;
              var this_1 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
              if (!(this_1 == null ? true : isBlank(this_1))) {
                tmp_1 = true;
              } else {
                tmp_1 = !element.vhb_1.equals(new Long(0, 0));
              }
              if (tmp_1) {
                destination.i1(element);
              }
            }

            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
            var tmp0_iterator_0 = destination.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(shallowCopy_12(item, SiteEditViewModel$onClickSave$slambda$lambda(item)));
            }

            suspendResult = tmp_0.zha(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.byb_1.sph('Community', this.cyb_1.ih6_1, this.cyb_1);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onClickSave$slambda(this.byb_1, this.cyb_1, completion);
    i.dyb_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onClickSave$slambda_0(this$0, $siteToSave, resultContinuation) {
    var i = new SiteEditViewModel$onClickSave$slambda(this$0, $siteToSave, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SiteEdit');
    this.ky6_1 = MutableStateFlow(new SiteEditUiState());
    this.ly6_1 = asStateFlow(this.ky6_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.my6_1 = Instance(this, tmp$ret$0, null).f5j(this, languagesConfig$factory_1());
    this.ny6_1 = null;
    var supportedLangs = _get_languagesConfig__hebcss_0(this).yoc_1;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(supportedLangs, 10));
    var tmp0_iterator = supportedLangs.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
      var tmp$ret$2 = item.hot_1;
      destination.i1(tmp$ret$2);
    }
    var supportedLangCodes = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp0_title = this.ipc().rnd(strings_getInstance().cma_1);
        var nextValue = prevValue.mov(VOID, VOID, tmp0_title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.ky6_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp$ret$8;
        $l$block_0: {
          // Inline function 'kotlin.collections.first' call
          var tmp0_iterator_0 = supportedLangs.w();
          while (tmp0_iterator_0.f()) {
            var element = tmp0_iterator_0.e();
            // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
            var tmp0_elvis_lhs = savedStateHandle.ba('siteTermsLang');
            if (element.hot_1 === (tmp0_elvis_lhs == null ? _get_languagesConfig__hebcss_0(this).aod_1 : tmp0_elvis_lhs)) {
              tmp$ret$8 = element;
              break $l$block_0;
            }
          }
          throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
        }
        var nextValue_0 = prevValue_0.py7(VOID, VOID, supportedLangs, VOID, VOID, VOID, tmp$ret$8);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_1;
        }
      }
    }
    var tmp_1 = SiteEditViewModel$slambda_0(this, null);
    var tmp_2 = SiteEditViewModel$lambda(this);
    this.tpc(tmp_1, true, tmp_2, SiteEditViewModel$slambda_2(this, supportedLangCodes, null));
  }
  protoOf(SiteEditViewModel).eyb = function (uiLang) {
    this.kpb_1.qp7('siteTermsLang', uiLang.hot_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ky6_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsLanguage.<anonymous>' call
        var nextValue = prevValue.py7(VOID, VOID, VOID, VOID, VOID, VOID, uiLang);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SiteEditViewModel).oy6 = function (html) {
    var tmp0_elvis_lhs = this.ky6_1.t2().fyb();
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSiteTerms = tmp;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.ky6_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsHtml.<anonymous>' call
        var tmp_0 = shallowCopy_12(currentSiteTerms, SiteEditViewModel$onChangeTermsHtml$lambda(html));
        var nextValue = prevValue.py7(VOID, replace_0(prevValue.iy7_1, tmp_0, SiteEditViewModel$onChangeTermsHtml$lambda_0(prevValue)), VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newTerms = tmp$ret$1.iy7_1;
    var tmp1_safe_receiver = this.ny6_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.bpc();
    tmp_1.ny6_1 = launch(tmp_2, VOID, VOID, SiteEditViewModel$onChangeTermsHtml$slambda_0(this, newTerms, null));
  };
  protoOf(SiteEditViewModel).gyb = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ky6_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.hy7_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nh6_1;
        var nextValue = prevValue.py7(entity, VOID, VOID, VOID, this.vpi(tmp, entity == null ? null : entity.nh6_1, prevValue.ly7_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_30.s4x();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_120();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.pph_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.bpc();
    tmp_0.pph_1 = launch(tmp_1, VOID, VOID, SiteEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SiteEditViewModel).mq0 = function () {
    var tmp0_elvis_lhs = this.ky6_1.t2().hy7_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var siteToSave = tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = siteToSave.nh6_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : isBlank(this_0)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.ky6_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.py7(VOID, VOID, VOID, VOID, this.ipc().rnd(strings_getInstance().bmm_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    // Inline function 'kotlin.collections.map' call
    var this_2 = this.ky6_1.t2().iy7_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
    var tmp0_iterator = this_2.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
      var tmp2_elvis_lhs = item.xhb_1;
      var tmp_0 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
      var tmp0_safe_receiver = item.whb_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      var tmp$ret$3 = to(tmp_0, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
      destination.i1(tmp$ret$3);
    }
    var siteTermsPlainText = toMap(destination);
    var tmp_1;
    if (siteToSave.ph6_1) {
      var tmp$ret$6;
      $l$block_1: {
        // Inline function 'kotlin.collections.all' call
        if (siteTermsPlainText.c1()) {
          tmp$ret$6 = true;
          break $l$block_1;
        }
        // Inline function 'kotlin.collections.iterator' call
        var tmp0_iterator_0 = siteTermsPlainText.q2().w();
        while (tmp0_iterator_0.f()) {
          var element = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          if (!isBlank(element.t2())) {
            tmp$ret$6 = false;
            break $l$block_1;
          }
        }
        tmp$ret$6 = true;
      }
      tmp_1 = tmp$ret$6;
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.ky6_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.py7(VOID, VOID, VOID, VOID, VOID, this.ipc().rnd(strings_getInstance().mmm_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if (this.ky6_1.t2().oy7_1)
      return Unit_instance;
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, SiteEditViewModel$onClickSave$slambda_0(this, siteToSave, null));
  };
  function SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    site = site === VOID ? null : site;
    siteTerms = siteTerms === VOID ? emptyList() : siteTerms;
    uiLangs = uiLangs === VOID ? listOf_0(new UiLanguage('en', 'English')) : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    siteNameError = siteNameError === VOID ? null : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? null : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? first_0(uiLangs) : currentSiteTermsLang;
    this.hy7_1 = site;
    this.iy7_1 = siteTerms;
    this.jy7_1 = uiLangs;
    this.ky7_1 = fieldsEnabled;
    this.ly7_1 = siteNameError;
    this.my7_1 = registrationEnabledError;
    this.ny7_1 = currentSiteTermsLang;
    this.oy7_1 = !(this.ly7_1 == null) ? true : !(this.my7_1 == null);
  }
  protoOf(SiteEditUiState).fyb = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.iy7_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditUiState.<get-currentSiteTerms>.<anonymous>' call
        if (element.xhb_1 === this.ny7_1.hot_1) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  };
  protoOf(SiteEditUiState).hyb = function () {
    var tmp0_safe_receiver = this.fyb();
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.whb_1;
  };
  protoOf(SiteEditUiState).iyb = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    return new SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).py7 = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang, $super) {
    site = site === VOID ? this.hy7_1 : site;
    siteTerms = siteTerms === VOID ? this.iy7_1 : siteTerms;
    uiLangs = uiLangs === VOID ? this.jy7_1 : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? this.ky7_1 : fieldsEnabled;
    siteNameError = siteNameError === VOID ? this.ly7_1 : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? this.my7_1 : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? this.ny7_1 : currentSiteTermsLang;
    return $super === VOID ? this.iyb(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) : $super.iyb.call(this, site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).toString = function () {
    return 'SiteEditUiState(site=' + this.hy7_1 + ', siteTerms=' + this.iy7_1 + ', uiLangs=' + this.jy7_1 + ', fieldsEnabled=' + this.ky7_1 + ', siteNameError=' + this.ly7_1 + ', registrationEnabledError=' + this.my7_1 + ', currentSiteTermsLang=' + this.ny7_1 + ')';
  };
  protoOf(SiteEditUiState).hashCode = function () {
    var result = this.hy7_1 == null ? 0 : hashCode(this.hy7_1);
    result = imul(result, 31) + hashCode(this.iy7_1) | 0;
    result = imul(result, 31) + hashCode(this.jy7_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ky7_1) | 0;
    result = imul(result, 31) + (this.ly7_1 == null ? 0 : getStringHashCode(this.ly7_1)) | 0;
    result = imul(result, 31) + (this.my7_1 == null ? 0 : getStringHashCode(this.my7_1)) | 0;
    result = imul(result, 31) + this.ny7_1.hashCode() | 0;
    return result;
  };
  protoOf(SiteEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteEditUiState ? other : THROW_CCE();
    if (!equals(this.hy7_1, tmp0_other_with_cast.hy7_1))
      return false;
    if (!equals(this.iy7_1, tmp0_other_with_cast.iy7_1))
      return false;
    if (!equals(this.jy7_1, tmp0_other_with_cast.jy7_1))
      return false;
    if (!(this.ky7_1 === tmp0_other_with_cast.ky7_1))
      return false;
    if (!(this.ly7_1 == tmp0_other_with_cast.ly7_1))
      return false;
    if (!(this.my7_1 == tmp0_other_with_cast.my7_1))
      return false;
    if (!this.ny7_1.equals(tmp0_other_with_cast.ny7_1))
      return false;
    return true;
  };
  function languagesConfig$factory_1() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss_0(receiver);
    }, null);
  }
  function languagesConfig$factory_2() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss_0(receiver);
    }, null);
  }
  function _get_getLocaleForSiteTermsUseCase__hxw5id_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hyc_1;
    getLocaleForSiteTermsUseCase$factory_2();
    return this_0.t2();
  }
  function Companion_181() {
    this.iyc_1 = 'locale';
    this.jyc_1 = 'Terms';
  }
  var Companion_instance_229;
  function Companion_getInstance_199() {
    return Companion_instance_229;
  }
  function SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, this$0, $savedStateHandle, resultContinuation) {
    this.syc_1 = $acceptButtonMode;
    this.tyc_1 = $apiUrl;
    this.uyc_1 = $di;
    this.vyc_1 = this$0;
    this.wyc_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteTermsDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteTermsDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteTermsDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1;
            if (this.syc_1 ? !(this.tyc_1 == null) : false) {
              var this_0 = get_direct(this.uyc_1);
              var context = new Endpoint(this.tyc_1);
              var tmp_2 = this_0.k5e();
              var tmp_3 = Companion_instance_0;
              var tmp_4 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
              var tmp_5 = tmp_2.h5e(tmp_3.m5d(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), context)).k5e();
              var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
              tmp_1 = tmp_5.i5e(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), 2);
            } else {
              tmp_1 = this.vyc_1.epc();
            }

            tmp_0.yyc_1 = tmp_1;
            this.zyc_1 = this.wyc_1.ba('locale');
            this.ayd_1 = this.zyc_1;
            if (this.ayd_1 == null) {
              this.hd_1 = 1;
              suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id_0(this.vyc_1).dod(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.byd_1 = this.ayd_1;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.byd_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.cyd_1 = this.byd_1;
            this.hd_1 = 3;
            suspendResult = this.yyc_1.b7l().bhb(this.cyd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var displayTerms = suspendResult;
            if (!(displayTerms == null)) {
              l$ret$1: do {
                var this_1 = this.vyc_1.fyc_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.gyd(displayTerms, this.syc_1);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            } else {
              l$ret$3: do {
                var this_2 = this.vyc_1.fyc_1;
                while (true) {
                  var prevValue_0 = this_2.t2();
                  var nextValue_0 = prevValue_0.gyd(VOID, VOID, this.vyc_1.ipc().rnd(strings_getInstance().plj_1));
                  if (this_2.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteTermsDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteTermsDetailViewModel$slambda(this.syc_1, this.tyc_1, this.uyc_1, this.vyc_1, this.wyc_1, completion);
    i.xyc_1 = $this$launch;
    return i;
  };
  function SiteTermsDetailViewModel$slambda_0($acceptButtonMode, $apiUrl, $di, this$0, $savedStateHandle, resultContinuation) {
    var i = new SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteTermsDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Terms');
    this.fyc_1 = MutableStateFlow(new SiteTermsDetailUiState());
    this.gyc_1 = asStateFlow(this.fyc_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.apc().kn5();
    var trigger = this.i5d();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.m5d(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.hyc_1 = Instance(this_0, tmp$ret$3, null).f5j(this, getLocaleForSiteTermsUseCase$factory_1());
    var tmp0_safe_receiver = savedStateHandle.ba('showAccept');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    var acceptButtonMode = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    Companion_getInstance_110();
    var apiUrl = savedStateHandle.ba('serverUrl');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.opb_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.<anonymous>' call
        var tmp0_navigationVisible = !acceptButtonMode;
        var tmp1_userAccountIconVisible = !acceptButtonMode;
        var tmp2_title = this.ipc().rnd(strings_getInstance().wm9_1);
        var nextValue = prevValue.mov(VOID, VOID, tmp2_title, tmp0_navigationVisible, VOID, VOID, tmp1_userAccountIconVisible);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.bpc();
    launch(tmp_3, VOID, VOID, SiteTermsDetailViewModel$slambda_0(acceptButtonMode, apiUrl, di, this, savedStateHandle, null));
  }
  protoOf(SiteTermsDetailViewModel).hyd = function () {
    Companion_getInstance_189();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.onClickAccept.<anonymous>' call
    this.wpc(this_0, Companion_getInstance_189().uwk_1);
    var tmp$ret$2 = this_0.f3();
    this.mpb_1.fo0('Register', tmp$ret$2);
  };
  function SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error) {
    siteTerms = siteTerms === VOID ? null : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? false : acceptButtonVisible;
    error = error === VOID ? null : error;
    this.dyd_1 = siteTerms;
    this.eyd_1 = acceptButtonVisible;
    this.fyd_1 = error;
  }
  protoOf(SiteTermsDetailUiState).iyd = function (siteTerms, acceptButtonVisible, error) {
    return new SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).gyd = function (siteTerms, acceptButtonVisible, error, $super) {
    siteTerms = siteTerms === VOID ? this.dyd_1 : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? this.eyd_1 : acceptButtonVisible;
    error = error === VOID ? this.fyd_1 : error;
    return $super === VOID ? this.iyd(siteTerms, acceptButtonVisible, error) : $super.iyd.call(this, siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).toString = function () {
    return 'SiteTermsDetailUiState(siteTerms=' + this.dyd_1 + ', acceptButtonVisible=' + this.eyd_1 + ', error=' + this.fyd_1 + ')';
  };
  protoOf(SiteTermsDetailUiState).hashCode = function () {
    var result = this.dyd_1 == null ? 0 : hashCode(this.dyd_1);
    result = imul(result, 31) + getBooleanHashCode(this.eyd_1) | 0;
    result = imul(result, 31) + (this.fyd_1 == null ? 0 : getStringHashCode(this.fyd_1)) | 0;
    return result;
  };
  protoOf(SiteTermsDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteTermsDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteTermsDetailUiState ? other : THROW_CCE();
    if (!equals(this.dyd_1, tmp0_other_with_cast.dyd_1))
      return false;
    if (!(this.eyd_1 === tmp0_other_with_cast.eyd_1))
      return false;
    if (!(this.fyd_1 == tmp0_other_with_cast.fyd_1))
      return false;
    return true;
  };
  function getLocaleForSiteTermsUseCase$factory_1() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id_0(receiver);
    }, null);
  }
  function getLocaleForSiteTermsUseCase$factory_2() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id_0(receiver);
    }, null);
  }
  function SiteEnterLinkViewModel$onClickNext$slambda$lambda($endpointUrl) {
    return function () {
      return 'SiteEnterLink: not working: ' + $endpointUrl;
    };
  }
  function _get_httpClient__2ty1zc_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gye_1;
    httpClient$factory_14();
    return this_0.t2();
  }
  function _get_impl__d88w17_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hye_1;
    impl$factory_2();
    return this_0.t2();
  }
  function Companion_182() {
    Companion_instance_230 = this;
    this.iye_1 = 'SiteEnterLink';
    var tmp = this;
    Companion_getInstance_120();
    Companion_getInstance_110();
    Companion_getInstance_120();
    tmp.jye_1 = listOf(['next', 'intMsg', 'noSessionChange']);
    this.kye_1 = 'stateUrl';
  }
  var Companion_instance_230;
  function Companion_getInstance_200() {
    if (Companion_instance_230 == null)
      new Companion_182();
    return Companion_instance_230;
  }
  function SiteEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, resultContinuation) {
    this.tye_1 = this$0;
    this.uye_1 = $endpointUrl;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = verifySite(_get_httpClient__2ty1zc_6(this.tye_1), this.uye_1, VOID, this.tye_1.r4x(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var site = suspendResult;
            Companion_getInstance_110();
            var tmp_0 = to('serverUrl', this.uye_1);
            Companion_getInstance_110();
            var this_0 = this.tye_1.r4x();
            var this_1 = this_0.y4b();
            var this_2 = serializer(this_1, createKType(getKClass(Site), arrayOf([]), false));
            var args = mutableMapOf([tmp_0, to('site', this_0.w4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), site))]);
            var tmp0_iterator = Companion_getInstance_200().jye_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              this.tye_1.vpc(args, element);
            }

            this.tye_1.kpc(Companion_getInstance_93().uov_1);
            l$ret$1: do {
              var this_3 = this.tye_1.eye_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.byf(VOID, true, VOID, null, true);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.tye_1.mpb_1.fo0('Login', args);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Error) {
              var e = this.kd_1;
              var tmp_2 = Napier_getInstance();
              tmp_2.p5k(e, VOID, SiteEnterLinkViewModel$onClickNext$slambda$lambda(this.uye_1));
              l$ret$3: do {
                var this_4 = this.tye_1.eye_1;
                while (true) {
                  var prevValue_0 = this_4.t2();
                  this.tye_1.kpc(Companion_getInstance_93().uov_1);
                  var tmp0_linkError = _get_impl__d88w17_0(this.tye_1).rnd(strings_getInstance().xlt_1);
                  var nextValue_0 = prevValue_0.byf(VOID, false, VOID, tmp0_linkError, true);
                  if (this_4.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEnterLinkViewModel$onClickNext$slambda(this.tye_1, this.uye_1, completion);
    i.vye_1 = $this$launch;
    return i;
  };
  function SiteEnterLinkViewModel$onClickNext$slambda_0(this$0, $endpointUrl, resultContinuation) {
    var i = new SiteEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEnterLinkViewModel(di, savedStateHandle) {
    Companion_getInstance_200();
    UstadViewModel.call(this, di, savedStateHandle, 'SiteEnterLink');
    this.eye_1 = MutableStateFlow(new SiteEnterLinkUiState());
    this.fye_1 = asStateFlow(this.eye_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.gye_1 = Instance(this, tmp$ret$0, null).f5j(this, httpClient$factory_13());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.hye_1 = Instance(this, tmp$ret$2, null).f5j(this, impl$factory_1());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_0(this).rnd(strings_getInstance().wmc_1);
        var nextValue = prevValue.mov(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.eye_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba(Companion_getInstance_200().kye_1);
        var nextValue_0 = prevValue_0.byf(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(SiteEnterLinkViewModel).kun = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eye_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.onClickNext.<anonymous>' call
        var nextValue = prevValue.byf(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.kpc(Companion_getInstance_93().tov_1);
    var endpointUrl = requirePostfix(requireHttpPrefix(this.eye_1.t2().wye_1), '/');
    var tmp = this.bpc();
    launch(tmp, VOID, VOID, SiteEnterLinkViewModel$onClickNext$slambda_0(this, endpointUrl, null));
  };
  protoOf(SiteEnterLinkViewModel).cyf = function (siteLink) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.eye_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.onSiteLinkUpdated.<anonymous>' call
        var nextValue = prevValue.byf(siteLink);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.kpb_1.qp7(Companion_getInstance_200().kye_1, siteLink);
  };
  function SiteEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    siteLink = siteLink === VOID ? '' : siteLink;
    validLink = validLink === VOID ? false : validLink;
    progressVisible = progressVisible === VOID ? false : progressVisible;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.wye_1 = siteLink;
    this.xye_1 = validLink;
    this.yye_1 = progressVisible;
    this.zye_1 = linkError;
    this.ayf_1 = fieldsEnabled;
  }
  protoOf(SiteEnterLinkUiState).dyf = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    return new SiteEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(SiteEnterLinkUiState).byf = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled, $super) {
    siteLink = siteLink === VOID ? this.wye_1 : siteLink;
    validLink = validLink === VOID ? this.xye_1 : validLink;
    progressVisible = progressVisible === VOID ? this.yye_1 : progressVisible;
    linkError = linkError === VOID ? this.zye_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.ayf_1 : fieldsEnabled;
    return $super === VOID ? this.dyf(siteLink, validLink, progressVisible, linkError, fieldsEnabled) : $super.dyf.call(this, siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(SiteEnterLinkUiState).toString = function () {
    return 'SiteEnterLinkUiState(siteLink=' + this.wye_1 + ', validLink=' + this.xye_1 + ', progressVisible=' + this.yye_1 + ', linkError=' + this.zye_1 + ', fieldsEnabled=' + this.ayf_1 + ')';
  };
  protoOf(SiteEnterLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.wye_1);
    result = imul(result, 31) + getBooleanHashCode(this.xye_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yye_1) | 0;
    result = imul(result, 31) + (this.zye_1 == null ? 0 : getStringHashCode(this.zye_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ayf_1) | 0;
    return result;
  };
  protoOf(SiteEnterLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteEnterLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteEnterLinkUiState ? other : THROW_CCE();
    if (!(this.wye_1 === tmp0_other_with_cast.wye_1))
      return false;
    if (!(this.xye_1 === tmp0_other_with_cast.xye_1))
      return false;
    if (!(this.yye_1 === tmp0_other_with_cast.yye_1))
      return false;
    if (!(this.zye_1 == tmp0_other_with_cast.zye_1))
      return false;
    if (!(this.ayf_1 === tmp0_other_with_cast.ayf_1))
      return false;
    return true;
  };
  function httpClient$factory_13() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function impl$factory_1() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_14() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function impl$factory_2() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function SystemPermissionConstants() {
    SystemPermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().imo_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1024, 0));
    var tmp_2 = strings_getInstance().jmo_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().kmo_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(32768, 0));
    var tmp_6 = strings_getInstance().pmo_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(131072, 0));
    var tmp_8 = strings_getInstance().omo_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(4096, 0));
    var tmp_10 = strings_getInstance().nmo_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(512, 0));
    var tmp_12 = strings_getInstance().bmo_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(1, 0));
    var tmp_14 = strings_getInstance().cmo_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(2, 0));
    var tmp_16 = strings_getInstance().dmo_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(4, 0));
    var tmp_18 = strings_getInstance().ymn_1;
    PermissionFlags_getInstance();
    var tmp_19 = to(tmp_18, new Long(2048, 0));
    var tmp_20 = strings_getInstance().emo_1;
    PermissionFlags_getInstance();
    var tmp_21 = to(tmp_20, new Long(8, 0));
    var tmp_22 = strings_getInstance().fmo_1;
    PermissionFlags_getInstance();
    var tmp_23 = to(tmp_22, new Long(16, 0));
    var tmp_24 = strings_getInstance().gmo_1;
    PermissionFlags_getInstance();
    var tmp_25 = to(tmp_24, new Long(32, 0));
    var tmp_26 = strings_getInstance().hmo_1;
    PermissionFlags_getInstance();
    var tmp_27 = to(tmp_26, new Long(64, 0));
    var tmp_28 = strings_getInstance().lmo_1;
    PermissionFlags_getInstance();
    var tmp_29 = to(tmp_28, new Long(128, 0));
    var tmp_30 = strings_getInstance().mmo_1;
    PermissionFlags_getInstance();
    tmp.eyf_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, tmp_25, tmp_27, tmp_29, to(tmp_30, new Long(256, 0))]);
  }
  var SystemPermissionConstants_instance;
  function SystemPermissionConstants_getInstance() {
    if (SystemPermissionConstants_instance == null)
      new SystemPermissionConstants();
    return SystemPermissionConstants_instance;
  }
  function personHasSystemPermissionAsFlowForUser(_this__u8e3s4, accountPersonUid, personUid) {
    var tmp;
    if (!accountPersonUid.equals(new Long(0, 0)) ? accountPersonUid.equals(personUid) : false) {
      tmp = flowOf(true);
    } else {
      PermissionFlags_getInstance();
      tmp = _this__u8e3s4.mhj(accountPersonUid, new Long(-1, 2147483647));
    }
    return tmp;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).pyf = function (entity, hasViewPermission, $completion) {
    var tmp = this.qyf(entity, hasViewPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE();
    return this.pyf(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.nyf_1;
          var tmp_0;
          if (this.oyf_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).qyf = function (entity, hasViewPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.nyf_1 = entity;
    i.oyf_1 = hasViewPermission;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, hasViewPermission, $completion) {
      return i.pyf(entity, hasViewPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.zyf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).byg = function (it, $completion) {
    var tmp = this.cyg(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.byg((p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            l$ret$1: do {
              var this_0 = this.zyf_1.ayh_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.ayg_1 == null)) {
                  tmp_0 = SystemPermissionConstants_getInstance().eyf_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.eyh(this.ayg_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (!(this.ayg_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.zyf_1.epc().s7j().pfu(this.zyf_1.zyg_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.zyf_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).cyg = function (it, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.zyf_1, completion);
    i.ayg_1 = it;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.byg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.nyh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).cp4 = function (hasEditPermission, $completion) {
    var tmp = this.dp4(hasEditPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.cp4((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.nyh_1.opb_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mov(prevValue.xou_1.sov(this.oyh_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).dp4 = function (hasEditPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this.nyh_1, completion);
    i.oyh_1 = hasEditPermission;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.cp4(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    this.xyh_1 = $entityFlow;
    this.yyh_1 = $viewPermissionFlow;
    this.zyh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).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;
            var tmp_0 = combine(this.xyh_1, this.yyh_1, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            suspendResult = collectLatest(tmp_0, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.zyh_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda(this.xyh_1, this.yyh_1, this.zyh_1, completion);
    i.ayi_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation) {
    this.jyi_1 = $editPermissionFlow;
    this.kyi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).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;
            var tmp_0 = SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this.kyi_1, null);
            suspendResult = this.jyi_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_35(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1(this.jyi_1, this.kyi_1, completion);
    i.lyi_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_2($editPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    this.uyi_1 = $this_launch;
    this.vyi_1 = $entityFlow;
    this.wyi_1 = $viewPermissionFlow;
    this.xyi_1 = this$0;
    this.yyi_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.uyi_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_0(this.vyi_1, this.wyi_1, this.xyi_1, null));
          launch(this.uyi_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_2(this.yyi_1, this.xyi_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).q7e = function (completion) {
    return new SystemPermissionDetailViewModel$slambda$slambda(this.uyi_1, this.vyi_1, this.wyi_1, this.xyi_1, this.yyi_1, completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function onClickEdit_1($this) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.onClickEdit.<anonymous>' call
    Companion_getInstance_120();
    $this.vpc(this_0, 'personUid');
    var tmp$ret$2 = this_0.f3();
    $this.mpb_1.fo0('SystemPermissionEdit', tmp$ret$2);
  }
  function Companion_183() {
    this.zyi_1 = 'SystemPermission';
  }
  var Companion_instance_231;
  function Companion_getInstance_201() {
    return Companion_instance_231;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_35(function_0) {
    this.ayj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_35).t1d = function (value, $completion) {
    return this.ayj_1(value, $completion);
  };
  function SystemPermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_1($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    this.jyj_1 = this$0;
    this.kyj_1 = $entityFlow;
    this.lyj_1 = $viewPermissionFlow;
    this.myj_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).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 = whenSubscribed(this.jyj_1.ayh_1, SystemPermissionDetailViewModel$slambda$slambda_0(this.nyj_1, this.kyj_1, this.lyj_1, this.jyj_1, this.myj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda(this.jyj_1, this.kyj_1, this.lyj_1, this.myj_1, completion);
    i.nyj_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda_0(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'SystemPermission');
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.zyg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.ayh_1 = MutableStateFlow(new SystemPermissionDetailUiState());
    this.byh_1 = asStateFlow(this.ayh_1);
    var entityFlow = this.epc().u7l().jhj(this.zyg_1);
    var viewPermissionFlow = personHasSystemPermissionAsFlowForUser(this.epc().u7l(), this.cpc(), this.zyg_1);
    var tmp_0 = this.epc().u7l();
    var tmp_1 = this.cpc();
    PermissionFlags_getInstance();
    var editPermissionFlow = tmp_0.mhj(tmp_1, new Long(4096, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.<anonymous>' call
        var tmp0_text = this.ipc().rnd(strings_getInstance().tlv_1);
        var tmp1_onClick = SystemPermissionDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.mov(new FabUiState(VOID, tmp0_text, tmp2_icon, tmp1_onClick));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, SystemPermissionDetailViewModel$slambda_0(this, entityFlow, viewPermissionFlow, editPermissionFlow, null));
  }
  function SystemPermissionDetailUiState(systemPermission, permissionLabels) {
    systemPermission = systemPermission === VOID ? null : systemPermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.cyh_1 = systemPermission;
    this.dyh_1 = permissionLabels;
  }
  protoOf(SystemPermissionDetailUiState).eyh = function (systemPermission, permissionLabels) {
    return new SystemPermissionDetailUiState(systemPermission, permissionLabels);
  };
  protoOf(SystemPermissionDetailUiState).toString = function () {
    return 'SystemPermissionDetailUiState(systemPermission=' + this.cyh_1 + ', permissionLabels=' + this.dyh_1 + ')';
  };
  protoOf(SystemPermissionDetailUiState).hashCode = function () {
    var result = this.cyh_1 == null ? 0 : this.cyh_1.hashCode();
    result = imul(result, 31) + hashCode(this.dyh_1) | 0;
    return result;
  };
  protoOf(SystemPermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.cyh_1, tmp0_other_with_cast.cyh_1))
      return false;
    if (!equals(this.dyh_1, tmp0_other_with_cast.dyh_1))
      return false;
    return true;
  };
  function SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.wyj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda).yyj = function (db, $completion) {
    var tmp = this.tmw(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.yyj(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).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.xyj_1.u7l().khj(this.wyj_1.yyk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).tmw = function (db, completion) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this.wyj_1, completion);
    i.xyj_1 = db;
    return i;
  };
  function SystemPermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.yyj(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).whm = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).r7e = function ($completion) {
    return this.whm($completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).q7e = function (completion) {
    return new SystemPermissionEditViewModel$slambda$slambda_1(completion);
  };
  function SystemPermissionEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.whm($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.wyk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp;
          if (!(it == null)) {
            tmp = SystemPermissionConstants_getInstance().eyf_1;
          } else {
            tmp = emptyList();
          }
          var nextValue = prevValue.kyl(it, VOID, tmp);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.mq0();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.tyl_1 = this$0;
    this.uyl_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).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.tyl_1.epc().u7l().qhj(this.uyl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).tmw = function (it, completion) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this.tyl_1, this.uyl_1, completion);
    i.vyl_1 = it;
    return i;
  };
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_184() {
    this.wyl_1 = 'SystemPermissionEdit';
  }
  var Companion_instance_232;
  function Companion_getInstance_202() {
    return Companion_instance_232;
  }
  function SystemPermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.fym_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda).mqw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.mqw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda).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;
            var tmp_0 = this.fym_1.epc().u7l();
            var tmp_1 = this.fym_1.cpc();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.lhj(tmp_1, new Long(4096, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          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);
  };
  protoOf(SystemPermissionEditViewModel$slambda).tmw = function (it, completion) {
    var i = new SystemPermissionEditViewModel$slambda(this.fym_1, completion);
    i.gym_1 = it;
    return i;
  };
  function SystemPermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mqw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.wyk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.kyl(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation) {
    this.pym_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_getInstance_7().s4x();
            var tmp_1 = SystemPermissionEditViewModel$slambda$slambda_0(this.pym_1, null);
            var tmp_2 = SystemPermissionEditViewModel$slambda$slambda_2(null);
            suspendResult = this.pym_1.spc(tmp_0, VOID, VOID, tmp_1, tmp_2, SystemPermissionEditViewModel$slambda$lambda(this.pym_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.pym_1.opb_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.pym_1.ipc().rnd(strings_getInstance().hm3_1);
                var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, SystemPermissionEditViewModel$onClickSave$ref(this.pym_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.pym_1.epc().s7j().pfu(this.pym_1.yyk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.pym_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new SystemPermissionEditViewModel$slambda_1(this.pym_1, completion);
    i.qym_1 = $this$launchIfHasPermission;
    return i;
  };
  function SystemPermissionEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.wyk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.kyl(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.zym_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.zym_1.wyk_1.t2().hyl_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.ayn_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.zym_1.epc();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this.zym_1, this.ayn_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_110();
            this.zym_1.mpb_1.eoy('', true);
            return Unit_instance;
          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);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).q7e = function (completion) {
    return new SystemPermissionEditViewModel$onClickSave$slambda(this.zym_1, completion);
  };
  function SystemPermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SystemPermissionEdit');
    this.wyk_1 = MutableStateFlow(new SystemPermissionEditUiState());
    this.xyk_1 = asStateFlow(this.wyk_1);
    var tmp = this;
    Companion_getInstance_120();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.yyk_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = SystemPermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = SystemPermissionEditViewModel$lambda(this);
    this.upc(tmp_0, VOID, tmp_1, SystemPermissionEditViewModel$slambda_2(this, null));
  }
  protoOf(SystemPermissionEditViewModel).krl = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.wyk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onTogglePermission.<anonymous>' call
        var tmp0_safe_receiver = prevValue.hyl_1;
        var nextValue = prevValue.kyl(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fk0(VOID, VOID, VOID, toggleFlag(prevValue.hyl_1.ihk_1, flag)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SystemPermissionEditViewModel).mq0 = function () {
    var tmp = SystemPermissionEditViewModel$onClickSave$lambda(this);
    this.xpi(tmp, SystemPermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.hyl_1 = entity;
    this.iyl_1 = fieldsEnabled;
    this.jyl_1 = permissionLabels;
  }
  protoOf(SystemPermissionEditUiState).byn = function (entity, fieldsEnabled, permissionLabels) {
    return new SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).kyl = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.hyl_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.iyl_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.jyl_1 : permissionLabels;
    return $super === VOID ? this.byn(entity, fieldsEnabled, permissionLabels) : $super.byn.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).toString = function () {
    return 'SystemPermissionEditUiState(entity=' + this.hyl_1 + ', fieldsEnabled=' + this.iyl_1 + ', permissionLabels=' + this.jyl_1 + ')';
  };
  protoOf(SystemPermissionEditUiState).hashCode = function () {
    var result = this.hyl_1 == null ? 0 : this.hyl_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.iyl_1) | 0;
    result = imul(result, 31) + hashCode(this.jyl_1) | 0;
    return result;
  };
  protoOf(SystemPermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.hyl_1, tmp0_other_with_cast.hyl_1))
      return false;
    if (!(this.iyl_1 === tmp0_other_with_cast.iyl_1))
      return false;
    if (!equals(this.jyl_1, tmp0_other_with_cast.jyl_1))
      return false;
    return true;
  };
  function TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.kyn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda$slambda).myn = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.myn((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return _get_allTimeZones__4t4mtu(this.kyn_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$slambda$slambda(this.kyn_1, completion);
    i.lyn_1 = $this$withContext;
    return i;
  };
  function TimeZoneListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.myn($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation) {
    this.vyn_1 = $searchText;
    this.wyn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).myn = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).he = function (p1, $completion) {
    return this.myn((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.vyn_1;
          var searchWords = Regex_init_$Create$('\\s+').y9(this_0, 0);
          var this_1 = _get_allTimeZones__4t4mtu(this.wyn_1);
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_0;
              if (isInterface(searchWords, Collection)) {
                tmp_0 = searchWords.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = true;
                break l$ret$1;
              }
              var tmp0_iterator_0 = searchWords.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                if (!contains(element.nlh(), element_0, true)) {
                  tmp$ret$0 = false;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = true;
            }
             while (false);
            if (tmp$ret$0) {
              destination.i1(element);
            }
          }
          return destination;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda(this.vyn_1, this.wyn_1, completion);
    i.xyn_1 = $this$withContext;
    return i;
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0($searchText, this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.myn($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_allTimeZones__4t4mtu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yyo_1;
    allTimeZones$factory();
    return this_0.t2();
  }
  function Companion_185() {
    this.ayp_1 = 'TimeZoneList';
  }
  var Companion_instance_233;
  function Companion_getInstance_203() {
    return Companion_instance_233;
  }
  function sam$kotlin_Comparator$0_3(function_0) {
    this.byp_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_3).pa = function (a, b) {
    return this.byp_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {
    return this.pa(a, b);
  };
  function TimeZoneListViewModel$allTimeZones$delegate$lambda() {
    var now = System_instance.nle();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = Companion_getInstance_9().nli();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$0 = Companion_getInstance_9().klh(item);
      destination.i1(tmp$ret$0);
    }
    var this_1 = toList(destination);
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda(now);
    var tmp$ret$3 = new sam$kotlin_Comparator$0_3(tmp);
    return sortedWith(this_1, tmp$ret$3);
  }
  function TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda($now) {
    return function (a, b) {
      // Inline function 'kotlin.comparisons.compareValuesBy' call
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp = offsetAt(a, $now).rli();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$1 = offsetAt(b, $now).rli();
      return compareValues(tmp, tmp$ret$1);
    };
  }
  function TimeZoneListViewModel$slambda(this$0, resultContinuation) {
    this.kyp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda).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;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$slambda$slambda_0(this.kyp_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var allTimeZonesVal = suspendResult;
            l$ret$1: do {
              var this_0 = this.kyp_1.fpk_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nyp(allTimeZonesVal);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(TimeZoneListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$slambda(this.kyp_1, completion);
    i.lyp_1 = $this$launch;
    return i;
  };
  function TimeZoneListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation) {
    this.wyp_1 = this$0;
    this.xyp_1 = $searchText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).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;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0(this.xyp_1, this.wyp_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var filteredList = suspendResult;
            l$ret$1: do {
              var this_0 = this.wyp_1.fpk_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nyp(filteredList);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).v1m = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this.wyp_1, this.xyp_1, completion);
    i.yyp_1 = $this$launch;
    return i;
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this$0, $searchText, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new TimezoneListUiState(), 'TimeZoneList');
    var tmp = this;
    tmp.yyo_1 = lazy_0(TimeZoneListViewModel$allTimeZones$delegate$lambda);
    this.zyo_1 = null;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, this.ipc().rnd(strings_getInstance().lm3_1), VOID, VOID, VOID, VOID, this.opl());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.bpc();
    launch(tmp_0, VOID, VOID, TimeZoneListViewModel$slambda_0(this, null));
  }
  protoOf(TimeZoneListViewModel).zpk = function (searchText) {
    var tmp0_safe_receiver = this.zyo_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.bpc();
    tmp.zyo_1 = launch(tmp_0, VOID, VOID, TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this, searchText, null));
  };
  protoOf(TimeZoneListViewModel).zyp = function (entry) {
    this.tph(entry.nlh());
  };
  protoOf(TimeZoneListViewModel).apl = function () {
  };
  function TimezoneListUiState(timeZoneList) {
    timeZoneList = timeZoneList === VOID ? emptyList() : timeZoneList;
    this.myp_1 = timeZoneList;
  }
  protoOf(TimezoneListUiState).nyp = function (timeZoneList) {
    return new TimezoneListUiState(timeZoneList);
  };
  protoOf(TimezoneListUiState).toString = function () {
    return 'TimezoneListUiState(timeZoneList=' + this.myp_1 + ')';
  };
  protoOf(TimezoneListUiState).hashCode = function () {
    return hashCode(this.myp_1);
  };
  protoOf(TimezoneListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TimezoneListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TimezoneListUiState ? other : THROW_CCE();
    if (!equals(this.myp_1, tmp0_other_with_cast.myp_1))
      return false;
    return true;
  };
  function allTimeZones$factory() {
    return getPropertyCallableRef('allTimeZones', 1, KProperty1, function (receiver) {
      return _get_allTimeZones__4t4mtu(receiver);
    }, null);
  }
  function VideoContentViewModel$slambda$slambda(this$0, $contentEntryVersion, resultContinuation) {
    this.iyq_1 = this$0;
    this.jyq_1 = $contentEntryVersion;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.lyq_1 = this.iyq_1.r4x();
            var tmp_1 = this;
            tmp_1.myq_1 = _get_httpClient__2ty1zc_7(this.iyq_1);
            var tmp_2 = this;
            tmp_2.nyq_1 = ensureNotNull(this.jyq_1.zap_1);
            var tmp_3 = this;
            tmp_3.oyq_1 = this.myq_1;
            var tmp_4 = this;
            tmp_4.pyq_1 = this.oyq_1;
            var tmp_5 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.nyq_1);
            tmp_5.qyq_1 = this_0;
            this.qyq_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_6 = this;
            tmp_6.ryq_1 = this.pyq_1;
            var tmp_7 = this;
            tmp_7.syq_1 = this.qyq_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.syq_1, this.ryq_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tyq_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.tyq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.uyq_1 = suspendResult;
            var tmp_8 = this;
            var this_1 = this.lyq_1.y4b();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_8.vyq_1 = this.lyq_1.x4b(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.uyq_1);
            this.wyq_1 = requireBodyUrlForUri(this.vyq_1, ensureNotNull(this.jyq_1.xap_1));
            var tmp_9 = this;
            tmp_9.xyq_1 = this.iyq_1.r4x();
            var tmp_10 = this;
            tmp_10.yyq_1 = _get_httpClient__2ty1zc_7(this.iyq_1);
            var tmp_11 = this;
            tmp_11.zyq_1 = this.wyq_1;
            var tmp_12 = this;
            tmp_12.ayr_1 = this.yyq_1;
            var tmp_13 = this;
            tmp_13.byr_1 = this.ayr_1;
            var tmp_14 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.zyq_1);
            tmp_14.cyr_1 = this_3;
            this.cyr_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_15 = this;
            tmp_15.dyr_1 = this.byr_1;
            var tmp_16 = this;
            tmp_16.eyr_1 = this.cyr_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.eyr_1, this.dyr_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.fyr_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = bodyAsDecodedText(this.fyr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var string = suspendResult;
            var this_4 = this.xyq_1.y4b();
            var this_5 = serializer(this_4, createKType(getKClass(MediaContentInfo), arrayOf([]), false));
            var mediaInfo = this.xyq_1.x4b(isInterface(this_5, KSerializer) ? this_5 : THROW_CCE(), string);
            l$ret$1: do {
              var this_6 = this.iyq_1.hys_1;
              while (true) {
                var prevValue = this_6.t2();
                var tmp0_contentEntryVersionUid = this.iyq_1.gys_1;
                var tmp1_manifestUrl = ensureNotNull(this.jyq_1.zap_1);
                var tmp2_contentManifestMap = new ContentManifestMap(this.vyq_1);
                var nextValue = prevValue.qys(mediaInfo, tmp0_contentEntryVersionUid, tmp1_manifestUrl, tmp2_contentManifestMap);
                if (this_6.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(VideoContentViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda$slambda(this.iyq_1, this.jyq_1, completion);
    i.kyq_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda$slambda_0(this$0, $contentEntryVersion, resultContinuation) {
    var i = new VideoContentViewModel$slambda$slambda(this$0, $contentEntryVersion, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function VideoContentViewModel$slambda$slambda_1(this$0, $contentEntryVersion, resultContinuation) {
    this.zys_1 = this$0;
    this.ayt_1 = $contentEntryVersion;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).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.zys_1.epc().a7k().can(this.ayt_1.wap_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var contentEntry = suspendResult;
            l$ret$1: do {
              var this_0 = this.zys_1.hys_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.qys(VOID, VOID, VOID, VOID, contentEntry);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.zys_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = contentEntry == null ? null : contentEntry.yan_1;
                var nextValue_0 = prevValue_0.mov(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          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);
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda$slambda_1(this.zys_1, this.ayt_1, completion);
    i.byt_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda$slambda_2(this$0, $contentEntryVersion, resultContinuation) {
    var i = new VideoContentViewModel$slambda$slambda_1(this$0, $contentEntryVersion, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MediaPlayState(timestamp, timeInMillis, totalDuration, resumed) {
    timestamp = timestamp === VOID ? systemTimeInMillis() : timestamp;
    timeInMillis = timeInMillis === VOID ? new Long(0, 0) : timeInMillis;
    totalDuration = totalDuration === VOID ? new Long(0, 0) : totalDuration;
    resumed = resumed === VOID ? false : resumed;
    this.cyt_1 = timestamp;
    this.dyt_1 = timeInMillis;
    this.eyt_1 = totalDuration;
    this.fyt_1 = resumed;
  }
  protoOf(MediaPlayState).gyt = function () {
    var tmp;
    if (this.eyt_1.c7(new Long(0, 0)) > 0) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.dyt_1.cb(toLong(100)).bb(this.eyt_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(MediaPlayState).toString = function () {
    return 'MediaPlayState(timestamp=' + this.cyt_1.toString() + ', timeInMillis=' + this.dyt_1.toString() + ', totalDuration=' + this.eyt_1.toString() + ', resumed=' + this.fyt_1 + ')';
  };
  protoOf(MediaPlayState).hashCode = function () {
    var result = this.cyt_1.hashCode();
    result = imul(result, 31) + this.dyt_1.hashCode() | 0;
    result = imul(result, 31) + this.eyt_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fyt_1) | 0;
    return result;
  };
  protoOf(MediaPlayState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MediaPlayState))
      return false;
    var tmp0_other_with_cast = other instanceof MediaPlayState ? other : THROW_CCE();
    if (!this.cyt_1.equals(tmp0_other_with_cast.cyt_1))
      return false;
    if (!this.dyt_1.equals(tmp0_other_with_cast.dyt_1))
      return false;
    if (!this.eyt_1.equals(tmp0_other_with_cast.eyt_1))
      return false;
    if (!(this.fyt_1 === tmp0_other_with_cast.fyt_1))
      return false;
    return true;
  };
  function _get_httpClient__2ty1zc_7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jys_1;
    httpClient$factory_16();
    return this_0.t2();
  }
  function Companion_186() {
    this.hyt_1 = 'Video';
  }
  var Companion_instance_234;
  function Companion_getInstance_204() {
    return Companion_instance_234;
  }
  function VideoContentViewModel$slambda(this$0, resultContinuation) {
    this.qyt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda).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.qyt_1.epc().n7l().ubh(this.qyt_1.gys_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_elvis_lhs = suspendResult;
            var tmp_0;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_0 = tmp0_elvis_lhs;
            }

            var contentEntryVersion = tmp_0;
            launch(this.ryt_1, VOID, VOID, VideoContentViewModel$slambda$slambda_0(this.qyt_1, contentEntryVersion, null));
            launch(this.ryt_1, VOID, VOID, VideoContentViewModel$slambda$slambda_2(this.qyt_1, contentEntryVersion, null));
            return Unit_instance;
          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);
  };
  protoOf(VideoContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda(this.qyt_1, completion);
    i.ryt_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda_0(this$0, resultContinuation) {
    var i = new VideoContentViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function VideoContentViewModel(di, savedStateHandle) {
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'Video');
    this.fys_1 = MutableStateFlow(new MediaPlayState());
    var tmp = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.gys_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.hys_1 = MutableStateFlow(new VideoContentUiState());
    this.iys_1 = asStateFlow(this.hys_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.jys_1 = Instance(this, tmp$ret$0, null).f5j(this, httpClient$factory_15());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.opb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<anonymous>' call
        var nextValue = prevValue.mov(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, VideoContentViewModel$slambda_0(this, null));
  }
  protoOf(VideoContentViewModel).lwf = function () {
    var tmp0_safe_receiver = this.hys_1.t2().oys_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yan_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<get-titleAndLangCode>.<anonymous>' call
      tmp = new TitleAndLangCode(tmp1_safe_receiver, 'en');
    }
    return tmp;
  };
  protoOf(VideoContentViewModel).syt = function (playState) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.fys_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.onPlayStateChanged.<anonymous>' call
        var nextValue = playState;
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var prevState = tmp$ret$1;
    if (!(prevState.fyt_1 === playState.fyt_1)) {
      this.sor(playState.fyt_1);
    }
    this.fos(playState.gyt());
  };
  function VideoContentUiState(mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    mediaContentInfo = mediaContentInfo === VOID ? null : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    manifestUrl = manifestUrl === VOID ? null : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? null : contentManifestMap;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    this.kys_1 = mediaContentInfo;
    this.lys_1 = contentEntryVersionUid;
    this.mys_1 = manifestUrl;
    this.nys_1 = contentManifestMap;
    this.oys_1 = contentEntry;
    this.pys_1 = isFullScreen;
  }
  protoOf(VideoContentUiState).tyt = function (mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    return new VideoContentUiState(mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).qys = function (mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen, $super) {
    mediaContentInfo = mediaContentInfo === VOID ? this.kys_1 : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.lys_1 : contentEntryVersionUid;
    manifestUrl = manifestUrl === VOID ? this.mys_1 : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? this.nys_1 : contentManifestMap;
    contentEntry = contentEntry === VOID ? this.oys_1 : contentEntry;
    isFullScreen = isFullScreen === VOID ? this.pys_1 : isFullScreen;
    return $super === VOID ? this.tyt(mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen) : $super.tyt.call(this, mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).toString = function () {
    return 'VideoContentUiState(mediaContentInfo=' + this.kys_1 + ', contentEntryVersionUid=' + this.lys_1.toString() + ', manifestUrl=' + this.mys_1 + ', contentManifestMap=' + this.nys_1 + ', contentEntry=' + this.oys_1 + ', isFullScreen=' + this.pys_1 + ')';
  };
  protoOf(VideoContentUiState).hashCode = function () {
    var result = this.kys_1 == null ? 0 : hashCode(this.kys_1);
    result = imul(result, 31) + this.lys_1.hashCode() | 0;
    result = imul(result, 31) + (this.mys_1 == null ? 0 : getStringHashCode(this.mys_1)) | 0;
    result = imul(result, 31) + (this.nys_1 == null ? 0 : this.nys_1.hashCode()) | 0;
    result = imul(result, 31) + (this.oys_1 == null ? 0 : this.oys_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pys_1) | 0;
    return result;
  };
  protoOf(VideoContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VideoContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof VideoContentUiState ? other : THROW_CCE();
    if (!equals(this.kys_1, tmp0_other_with_cast.kys_1))
      return false;
    if (!this.lys_1.equals(tmp0_other_with_cast.lys_1))
      return false;
    if (!(this.mys_1 == tmp0_other_with_cast.mys_1))
      return false;
    if (!equals(this.nys_1, tmp0_other_with_cast.nys_1))
      return false;
    if (!equals(this.oys_1, tmp0_other_with_cast.oys_1))
      return false;
    if (!(this.pys_1 === tmp0_other_with_cast.pys_1))
      return false;
    return true;
  };
  function httpClient$factory_15() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_7(receiver);
    }, null);
  }
  function httpClient$factory_16() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_7(receiver);
    }, null);
  }
  function _get_resolveXapiLaunchHrefUseCase__8u4pj4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pyu_1;
    resolveXapiLaunchHrefUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_187() {
    this.tyu_1 = 'XapiContent';
  }
  var Companion_instance_235;
  function Companion_getInstance_205() {
    return Companion_instance_235;
  }
  function XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.cyv_1 = this$0;
    this.dyv_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(XapiContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_resolveXapiLaunchHrefUseCase__8u4pj4(this.cyv_1);
            Companion_getInstance_120();
            var tmp0_safe_receiver = this.dyv_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            Companion_getInstance_120();
            var tmp2_safe_receiver = this.dyv_1.ba('courseBlockUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            suspendResult = tmp_0.po3(this.cyv_1.qyu_1, tmp_1, tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var launchHrefResult = suspendResult;
            l$ret$1: do {
              var this_0 = this.cyv_1.ryu_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.hyv(launchHrefResult.io0_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.cyv_1.opb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mov(VOID, VOID, launchHrefResult.ko0_1.do3_1, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().v5k('Exception opening xapi content', e);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(XapiContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new XapiContentViewModel$slambda(this.cyv_1, this.dyv_1, completion);
    i.eyv_1 = $this$launch;
    return i;
  };
  function XapiContentViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function XapiContentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'XapiContent');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.pyu_1 = Instance(this_0, tmp$ret$0, null).f5j(this, resolveXapiLaunchHrefUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_110();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_1.qyu_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.ryu_1 = MutableStateFlow(new XapiContentUiState(VOID, this.qyu_1));
    this.syu_1 = asStateFlow(this.ryu_1);
    var tmp_2 = this.bpc();
    launch(tmp_2, VOID, VOID, XapiContentViewModel$slambda_0(this, savedStateHandle, null));
  }
  function XapiContentUiState(url, contentEntryVersionUid) {
    url = url === VOID ? null : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    this.fyv_1 = url;
    this.gyv_1 = contentEntryVersionUid;
  }
  protoOf(XapiContentUiState).iyv = function (url, contentEntryVersionUid) {
    return new XapiContentUiState(url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).hyv = function (url, contentEntryVersionUid, $super) {
    url = url === VOID ? this.fyv_1 : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.gyv_1 : contentEntryVersionUid;
    return $super === VOID ? this.iyv(url, contentEntryVersionUid) : $super.iyv.call(this, url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).toString = function () {
    return 'XapiContentUiState(url=' + this.fyv_1 + ', contentEntryVersionUid=' + this.gyv_1.toString() + ')';
  };
  protoOf(XapiContentUiState).hashCode = function () {
    var result = this.fyv_1 == null ? 0 : getStringHashCode(this.fyv_1);
    result = imul(result, 31) + this.gyv_1.hashCode() | 0;
    return result;
  };
  protoOf(XapiContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContentUiState ? other : THROW_CCE();
    if (!(this.fyv_1 == tmp0_other_with_cast.fyv_1))
      return false;
    if (!this.gyv_1.equals(tmp0_other_with_cast.gyv_1))
      return false;
    return true;
  };
  function resolveXapiLaunchHrefUseCase$factory() {
    return getPropertyCallableRef('resolveXapiLaunchHrefUseCase', 1, KProperty1, function (receiver) {
      return _get_resolveXapiLaunchHrefUseCase__8u4pj4(receiver);
    }, null);
  }
  function resolveXapiLaunchHrefUseCase$factory_0() {
    return getPropertyCallableRef('resolveXapiLaunchHrefUseCase', 1, KProperty1, function (receiver) {
      return _get_resolveXapiLaunchHrefUseCase__8u4pj4(receiver);
    }, null);
  }
  function encryptPbkdf2(_this__u8e3s4, password, $completion) {
    var tmp = new $encryptPbkdf2COROUTINE$67(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function doublePbkdf2HashAsBase64(_this__u8e3s4, password, $completion) {
    var tmp = new $doublePbkdf2HashAsBase64COROUTINE$69(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $encryptPbkdf2COROUTINE$67(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ryv_1 = _this__u8e3s4;
    this.syv_1 = password;
  }
  protoOf($encryptPbkdf2COROUTINE$67).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.ryv_1.pmq_1).k5e();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.tyv_1 = tmp_1.i5e(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.uyv_1 = this.tyv_1;
            var tmp_4 = this;
            tmp_4.vyv_1 = this.ryv_1.omq_1.hmr_1 + 'api/pbkdf2/encryptPbkdf2';
            var tmp_5 = this;
            tmp_5.wyv_1 = this.uyv_1;
            var tmp_6 = this;
            tmp_6.xyv_1 = this.wyv_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.vyv_1);
            parameter(this_0, 'secret', this.syv_1);
            tmp_7.yyv_1 = this_0;
            this.yyv_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_8 = this;
            tmp_8.zyv_1 = this.xyv_1;
            var tmp_9 = this;
            tmp_9.ayw_1 = this.yyv_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.ayw_1, this.zyv_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.byw_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.byw_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            return decodeBase64Bytes(ARGUMENT);
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $doublePbkdf2HashAsBase64COROUTINE$69(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kyw_1 = _this__u8e3s4;
    this.lyw_1 = password;
  }
  protoOf($doublePbkdf2HashAsBase64COROUTINE$69).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.kyw_1.pmq_1).k5e();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.myw_1 = tmp_1.i5e(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.nyw_1 = this.myw_1;
            var tmp_4 = this;
            tmp_4.oyw_1 = this.kyw_1.omq_1.hmr_1 + 'api/pbkdf2/doubleEncryptPbkdf2';
            var tmp_5 = this;
            tmp_5.pyw_1 = this.nyw_1;
            var tmp_6 = this;
            tmp_6.qyw_1 = this.pyw_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.oyw_1);
            parameter(this_0, 'secret', this.lyw_1);
            tmp_7.ryw_1 = this_0;
            this.ryw_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_8 = this;
            tmp_8.syw_1 = this.qyw_1;
            var tmp_9 = this;
            tmp_9.tyw_1 = this.ryw_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.tyw_1, this.syw_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.uyw_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.uyw_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function get_DIContext() {
    _init_properties_DiModule_kt__i4hbld();
    return DIContext;
  }
  var DIContext;
  function get_DIModule() {
    _init_properties_DiModule_kt__i4hbld();
    return DIModule;
  }
  var DIModule;
  function DIModule$lambda($this$FC, props) {
    _init_properties_DiModule_kt__i4hbld();
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_DIContext();
    var value = props.di;
    var block = DIModule$lambda$lambda(props);
    addChild($this$FC, this_0, value, block);
    return Unit_instance;
  }
  function DIModule$lambda$lambda($props) {
    return function ($this$invoke) {
      var this_0 = $props.children;
      addChildNode($this$invoke, this_0);
      return Unit_instance;
    };
  }
  var properties_initialized_DiModule_kt_wik303;
  function _init_properties_DiModule_kt__i4hbld() {
    if (!properties_initialized_DiModule_kt_wik303) {
      properties_initialized_DiModule_kt_wik303 = true;
      DIContext = createContext();
      DIModule = FC(DIModule$lambda);
    }
  }
  function get_NavHostContext() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHostContext;
  }
  var NavHostContext;
  function get_NavHost() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHost;
  }
  var NavHost;
  function invoke$effectivePopUpTo(_this__u8e3s4, this$0) {
    var tmp;
    Companion_getInstance_110();
    if (_this__u8e3s4 === '') {
      tmp = get_ustadViewName(this$0.wyw_1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function NavHostFunction(navigateFn, location, onHideChildren) {
    this.vyw_1 = navigateFn;
    this.wyw_1 = location;
    this.xyw_1 = onHideChildren;
  }
  protoOf(NavHostFunction).yyw = function (cmd) {
    if (cmd instanceof NavigateNavCommand) {
      var tmp1_safe_receiver = cmd.joy_1.dot_1;
      var popUpToView = tmp1_safe_receiver == null ? null : invoke$effectivePopUpTo(tmp1_safe_receiver, this);
      if ((popUpToView == null ? true : popUpToView === get_ustadViewName(this.wyw_1)) ? !cmd.joy_1.fot_1 ? true : this.wyw_1.key === get_firstLocationKey() : false) {
        Napier_getInstance().n5k('NavHostFunction: go to /' + cmd.hoy_1 + '?' + toUrlQueryString(cmd.ioy_1));
        var replaceNav = (popUpToView === get_ustadViewName(this.wyw_1) ? cmd.joy_1.eot_1 : false) ? true : cmd.joy_1.fot_1;
        var tmp = '/' + cmd.hoy_1 + '?' + toUrlQueryString(cmd.ioy_1);
        // Inline function 'js.objects.jso' call
        // Inline function 'kotlin.apply' call
        // Inline function 'js.objects.jso' call
        var this_0 = {};
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.components.NavHostFunction.invoke.<anonymous>' call
        this_0.replace = replaceNav;
        setIsNewFirstLocation(this_0, this.wyw_1);
        this.vyw_1(tmp, this_0);
      } else {
        Napier_getInstance().n5k('NavHostFunction: pop, then go /' + cmd.hoy_1 + '?' + toUrlQueryString(cmd.ioy_1));
        clearNavHostCommands(sessionStorage);
        sessionStorage.removeItem('navControllerStackCleared');
        sessionStorage.removeItem('navHostHitPopupto');
        if (!(popUpToView == null)) {
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = popUpToView;
        }
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerClearStack'] = cmd.joy_1.fot_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerPopUpToInc'] = cmd.joy_1.eot_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerGoToAfterPop'] = '/' + cmd.hoy_1 + '?' + toUrlQueryString(cmd.ioy_1);
        this.xyw_1();
        this.vyw_1(-1);
      }
    } else {
      if (cmd instanceof PopNavCommand) {
        var popUpTo = invoke$effectivePopUpTo(cmd.loy_1, this);
        if (popUpTo === get_ustadViewName(this.wyw_1) ? cmd.moy_1 : false) {
          Napier_getInstance().n5k('NavHostFunction: pop to current viewname ' + popUpTo + ' (inclusive) ' + 'e.g. go back one');
          this.vyw_1(-1);
        } else if (!(popUpTo === get_ustadViewName(this.wyw_1))) {
          Napier_getInstance().n5k('NavHostFunction: pop to ' + popUpTo + ' inclusive = ' + cmd.moy_1);
          sessionStorage.removeItem('navHostHitPopupto');
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = cmd.loy_1;
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpToInc'] = cmd.moy_1.toString();
          this.xyw_1();
          this.vyw_1(-1);
        } else {
          Napier_getInstance().n5k('NavHostFunction: pop up to current viewname, inclusive = false?? Nothing to do.');
        }
      } else {
        Napier_getInstance().n5k('NavHostFunction: command ignored: ' + cmd);
      }
    }
  };
  function get_NAVHOST_CLEARSTACK_VIEWNAME() {
    return NAVHOST_CLEARSTACK_VIEWNAME;
  }
  var NAVHOST_CLEARSTACK_VIEWNAME;
  function set_firstLocationKey(value) {
    _init_properties_NavHost_kt__jjqoc9();
    sessionStorage.setItem('firstLocationKey', value);
  }
  function get_firstLocationKey() {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp0_elvis_lhs = sessionStorage.getItem('firstLocationKey');
    return tmp0_elvis_lhs == null ? 'default' : tmp0_elvis_lhs;
  }
  function clearNavHostCommands(_this__u8e3s4) {
    _init_properties_NavHost_kt__jjqoc9();
    _this__u8e3s4.removeItem('navControllerPopUpTo');
    _this__u8e3s4.removeItem('navControllerPopUpToInc');
    _this__u8e3s4.removeItem('navControllerClearStack');
    _this__u8e3s4.removeItem('navControllerGoToAfterPop');
    _this__u8e3s4.removeItem('navHostRoot');
  }
  function setIsNewFirstLocation(_this__u8e3s4, fromLocation) {
    _init_properties_NavHost_kt__jjqoc9();
    if (_this__u8e3s4.replace === true ? fromLocation.key === get_firstLocationKey() : false) {
      _this__u8e3s4.state = json([to('isNewFirstLocation', true)]);
    }
  }
  function NavHost$lambda($this$FC, props) {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp;
    // Inline function 'org.w3c.dom.get' call
    // Inline function 'kotlin.js.asDynamic' call
    if (sessionStorage['navControllerPopUpTo'] == null) {
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = !(sessionStorage['navControllerClearStack'] === 'false');
    } else {
      tmp = false;
    }
    var showChildren$delegate = useState(tmp);
    var navigateFn = useNavigate();
    var location = useLocation();
    // Inline function 'react.useMemo' call
    var dependencies = [navigateFn, location];
    var callback = NavHost$lambda$lambda(navigateFn, location, showChildren$delegate);
    var navHostFunction = useMemo(callback, dependencies);
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_NavHostContext();
    var block = NavHost$lambda$lambda_0(location, props, navigateFn, showChildren$delegate);
    addChild($this$FC, this_0, navHostFunction, block);
    return Unit_instance;
  }
  function invoke$lambda_2($showChildren$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $showChildren$delegate[0];
  }
  function invoke$lambda_3($showChildren$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $showChildren$delegate[1](value);
    return Unit_instance;
  }
  function NavHost$lambda$lambda$lambda($showChildren$delegate) {
    return function () {
      invoke$lambda_3($showChildren$delegate, false);
      return Unit_instance;
    };
  }
  function NavHost$lambda$lambda($navigateFn, $location, $showChildren$delegate) {
    return function () {
      return new NavHostFunction($navigateFn, $location, NavHost$lambda$lambda$lambda($showChildren$delegate));
    };
  }
  function invoke$launchClearStackTimeout(_this__u8e3s4, navigateFn) {
    return launch(_this__u8e3s4, VOID, VOID, NavHost$lambda$lambda$launchClearStackTimeout$slambda_0(navigateFn, null));
  }
  function invoke$lambda_4($navTimeoutJob$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $navTimeoutJob$delegate[0];
  }
  function invoke$lambda_5($navTimeoutJob$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $navTimeoutJob$delegate[1](value);
    return Unit_instance;
  }
  function NavHost$lambda$lambda$lambda_0() {
    _init_properties_NavHost_kt__jjqoc9();
    return CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
  }
  function NavHost$lambda$lambda$lambda_1() {
    _init_properties_NavHost_kt__jjqoc9();
    return null;
  }
  function NavHost$lambda$lambda$lambda_2($location, $navigateFn, $coroutineScope, $navTimeoutJob$delegate, $showChildren$delegate) {
    return function ($this$useEffect) {
      console.log('NavHost: key = ' + $location.key);
      var tmp0_safe_receiver = $location.state;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.js.unsafeCast' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = tmp0_safe_receiver;
      }
      var tmp1_safe_receiver = tmp;
      var isNewFirstLocation = equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver['isNewFirstLocation'], true);
      var tmp_0;
      if (isNewFirstLocation) {
        console.log('NavHost: New first location key = ' + $location.key);
        set_firstLocationKey($location.key);
        tmp_0 = Unit_instance;
      }
      var tmp2_safe_receiver = invoke$lambda_4($navTimeoutJob$delegate);
      if (tmp2_safe_receiver == null)
        null;
      else {
        tmp2_safe_receiver.mr();
      }
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var popupToTarget = sessionStorage['navControllerPopUpTo'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var navToAfterPop = sessionStorage['navControllerGoToAfterPop'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp3_safe_receiver = sessionStorage['navControllerPopUpToInc'];
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : toBoolean(tmp3_safe_receiver);
      var popUpToInclusive = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp5_safe_receiver = sessionStorage['navControllerClearStack'];
      var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : toBoolean(tmp5_safe_receiver);
      var clearStack = tmp6_elvis_lhs == null ? false : tmp6_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp7_safe_receiver = sessionStorage['navControllerStackCleared'];
      var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : toBoolean(tmp7_safe_receiver);
      var clearStackHitPlaceholder = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp9_safe_receiver = sessionStorage['navHostHitPopupto'];
      var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : toBoolean(tmp9_safe_receiver);
      var popUpToHitDestination = tmp10_elvis_lhs == null ? false : tmp10_elvis_lhs;
      Napier_getInstance().h5k('NavHost: useEffect check: key = ' + $location.key + ' ' + ('current viewname = ' + get_ustadViewName($location) + ' ') + ('popUpToTarget = ' + popupToTarget + ' ') + ('navtoAfterPop = ' + navToAfterPop + ' ') + ('popUpToInclusive = ' + popUpToInclusive + ' ') + ('clearStack = ' + clearStack + ' ') + ('clearStackHitPlaceholder = ' + clearStackHitPlaceholder + ' ') + ('popUpToHitDestination = ' + popUpToHitDestination));
      var tmp_1;
      if ((popupToTarget == null ? !clearStack : false) ? !($location.pathname === '/ClearStack') : false) {
        Napier_getInstance().h5k('NavHost: action: no pop or other operation pending, show children');
        invoke$lambda_3($showChildren$delegate, true);
        tmp_1 = Unit_instance;
      } else if (popupToTarget === get_ustadViewName($location) ? popUpToInclusive : false) {
        Napier_getInstance().h5k('NavHost: action: reached popUpTo destination, popUpToInclusive is set, pop once more');
        invoke$lambda_3($showChildren$delegate, false);
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navHostHitPopupto'] = 'true';
        $navigateFn(-1);
        var tmp_2;
        if (!(navToAfterPop == null)) {
          invoke$lambda_5($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
          tmp_2 = Unit_instance;
        }
        tmp_1 = tmp_2;
      } else if (popupToTarget === get_ustadViewName($location) ? true : popUpToHitDestination) {
        Napier_getInstance().h5k('NavHost: action: reached popupToDestination with inclusive = false, or inclusive was true and destination was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_3;
        if (!(navToAfterPop == null)) {
          $navigateFn(navToAfterPop);
          tmp_3 = Unit_instance;
        } else {
          invoke$lambda_3($showChildren$delegate, true);
          tmp_3 = Unit_instance;
        }
        tmp_1 = tmp_3;
      } else if ((clearStack ? $location.key === get_firstLocationKey() : false) ? !clearStackHitPlaceholder : false) {
        Napier_getInstance().h5k('NavHost: action: clearstack was set, reached first entry in history, but did not yet navigate to dummy placeholder. Going to /ClearStack');
        $navigateFn('/ClearStack');
        tmp_1 = Unit_instance;
      } else if ($location.pathname === '/ClearStack') {
        Napier_getInstance().h5k('NavHost: action: reached stack clear dummy placeholder. Going back');
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerStackCleared'] = 'true';
        $navigateFn(-1);
        tmp_1 = Unit_instance;
      } else if (clearStack ? clearStackHitPlaceholder : false) {
        Napier_getInstance().h5k('NavHost: action: clearStack was set and dummy placeholder was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_4;
        if (!(navToAfterPop == null)) {
          // Inline function 'js.objects.jso' call
          // Inline function 'kotlin.apply' call
          // Inline function 'js.objects.jso' call
          var this_0 = {};
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          this_0.replace = true;
          setIsNewFirstLocation(this_0, $location);
          $navigateFn(navToAfterPop, this_0);
          tmp_4 = Unit_instance;
        }
        tmp_1 = tmp_4;
      } else {
        Napier_getInstance().h5k('NavHost: action: need to continue history popping');
        invoke$lambda_3($showChildren$delegate, false);
        // Inline function 'kotlin.takeIf' call
        var this_1 = $navigateFn;
        // Inline function 'kotlin.contracts.contract' call
        var tmp_5;
        // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
        if (!($location.key === get_firstLocationKey())) {
          tmp_5 = this_1;
        } else {
          tmp_5 = null;
        }
        var tmp11_safe_receiver = tmp_5;
        if (tmp11_safe_receiver == null)
          null;
        else {
          tmp11_safe_receiver(-1);
        }
        invoke$lambda_5($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
        tmp_1 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation) {
    this.hyx_1 = $navigateFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).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 = delay(new Long(250, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Napier_getInstance().h5k('NavHost: action: clearStackTimeout: apparently at the end of history. go to clearstack');
            sessionStorage['navControllerClearStack'] = 'true';
            this.hyx_1('/ClearStack');
            return Unit_instance;
          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);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).v1m = function ($this$launch, completion) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda(this.hyx_1, completion);
    i.iyx_1 = $this$launch;
    return i;
  };
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda_0($navigateFn, resultContinuation) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NavHost$lambda$lambda_0($location, $props, $navigateFn, $showChildren$delegate) {
    return function ($this$invoke) {
      // Inline function 'react.useMemo' call
      // Inline function 'kotlin.emptyArray' call
      var dependencies = [].slice();
      var callback = NavHost$lambda$lambda$lambda_0;
      var coroutineScope = useMemo(callback, dependencies);
      var navTimeoutJob$delegate = useState_0(NavHost$lambda$lambda$lambda_1);
      // Inline function 'kotlin.arrayOf' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp = [$location.key].slice();
      useEffect(tmp, NavHost$lambda$lambda$lambda_2($location, $navigateFn, coroutineScope, navTimeoutJob$delegate, $showChildren$delegate));
      var tmp_0;
      if (invoke$lambda_2($showChildren$delegate)) {
        var this_0 = $props.children;
        addChildNode($this$invoke, this_0);
        tmp_0 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  var properties_initialized_NavHost_kt_vv2ix1;
  function _init_properties_NavHost_kt__jjqoc9() {
    if (!properties_initialized_NavHost_kt_vv2ix1) {
      properties_initialized_NavHost_kt_vv2ix1 = true;
      NavHostContext = createContext();
      NavHost = FC(NavHost$lambda);
    }
  }
  function get_NavHostClearStackPlaceholder() {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return NavHostClearStackPlaceholder;
  }
  var NavHostClearStackPlaceholder;
  function NavHostClearStackPlaceholder$lambda($this$FC, props) {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return Unit_instance;
  }
  var properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf;
  function _init_properties_NavHostClearStackPlaceholder_kt__f93zv7() {
    if (!properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf) {
      properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf = true;
      NavHostClearStackPlaceholder = FC(NavHostClearStackPlaceholder$lambda);
    }
  }
  function SetPasswordUseCaseJs$invoke$lambda() {
    return 'Exception setting password';
  }
  function $invokeCOROUTINE$70(_this__u8e3s4, activeUserPersonUid, personUid, username, newPassword, currentPassword, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ryx_1 = _this__u8e3s4;
    this.syx_1 = activeUserPersonUid;
    this.tyx_1 = personUid;
    this.uyx_1 = username;
    this.vyx_1 = newPassword;
    this.wyx_1 = currentPassword;
  }
  protoOf($invokeCOROUTINE$70).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.ryx_1.gyy_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.xyx_1 = tmp_2;
            this.id_1 = 2;
            var tmp_3 = this;
            tmp_3.yyx_1 = this.ryx_1.hyy_1;
            var tmp_4 = this;
            tmp_4.zyx_1 = this.ryx_1.fyy_1.hmr_1 + 'api/account/setpassword';
            var tmp_5 = this;
            tmp_5.ayy_1 = this.yyx_1;
            var tmp_6 = this;
            tmp_6.byy_1 = this.ayy_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.zyx_1);
            doorNodeIdHeader(this_0, this.xyx_1);
            parameter(this_0, 'nodeActiveUserUid', this.syx_1);
            parameter(this_0, 'personUid', this.tyx_1.toString());
            parameter(this_0, 'username', this.uyx_1);
            parameter(this_0, 'newPassword', this.vyx_1);
            var tmp0_safe_receiver = this.wyx_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              parameter(this_0, 'currentPassword', tmp0_safe_receiver);
            }

            set_expectSuccess(this_0, false);
            tmp_7.cyy_1 = this_0;
            this.cyy_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_8 = this;
            tmp_8.dyy_1 = this.byy_1;
            var tmp_9 = this;
            tmp_9.eyy_1 = this.cyy_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.eyy_1, this.dyy_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            if (result.a3f().equals(Companion_getInstance_0().y31_1)) {
              throw new UnauthorizedException();
            } else if (!isSuccess(result.a3f())) {
              throw IllegalStateException_init_$Create$('Bad response to set password request: ' + result.a3f());
            }

            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_10 = this.kd_1;
            if (tmp_10 instanceof Error) {
              var e = this.kd_1;
              var tmp_11 = Napier_getInstance();
              tmp_11.x5k(e, VOID, SetPasswordUseCaseJs$invoke$lambda);
              throw e;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function SetPasswordUseCaseJs(endpoint, repo, httpClient) {
    this.fyy_1 = endpoint;
    this.gyy_1 = repo;
    this.hyy_1 = httpClient;
  }
  protoOf(SetPasswordUseCaseJs).qnc = function (activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion) {
    var tmp = new $invokeCOROUTINE$70(this, activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OpenBlobUseCaseJs() {
  }
  protoOf(OpenBlobUseCaseJs).snj = function (item, onProgress, intent, $completion) {
    var element = document.createElement('a');
    element.setAttribute('href', item.anj_1);
    element.setAttribute('download', item.cnj_1);
    element.style.display = 'none';
    document.body.appendChild(element);
    element.click();
    document.body.removeChild(element);
    return Unit_instance;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation) {
    this.qyy_1 = $transferJobItemStatusUpdater;
    this.ryy_1 = this$0;
    this.syy_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).smw = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.smw(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.qyy_1.ynq(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.ryy_1.xyy_1.p7l();
            var tmp0_safe_receiver = firstOrNull(this.syy_1);
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ayz_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.oc3_1;
            suspendResult = tmp_0.qhx(tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs, TransferJobItemStatus_FAILED_getInstance().ijf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).tmw = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda(this.qyy_1, this.ryy_1, this.syy_1, completion);
    i.tyy_1 = it;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation);
    var l = function (it, $completion) {
      return i.smw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda($transferJobItemStatusUpdater, $uploadItem) {
    return function (it) {
      $transferJobItemStatusUpdater.vnq(new BlobTransferProgressUpdate($uploadItem, it.foe_1));
      return Unit_instance;
    };
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    this.jyz_1 = this$0;
    this.kyz_1 = $transferJobItemStatusUpdater;
    this.lyz_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).u1m = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).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 = withDoorTransactionAsync(this.jyz_1.xyy_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0(this.kyz_1, this.jyz_1, this.lyz_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this.jyz_1, this.kyz_1, this.lyz_1, completion);
    i.myz_1 = $this$withContext;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UriToSaveQueueItem(uriToSaveItem, transferJobItem) {
    this.zyy_1 = uriToSaveItem;
    this.ayz_1 = transferJobItem;
  }
  protoOf(UriToSaveQueueItem).toString = function () {
    return 'UriToSaveQueueItem(uriToSaveItem=' + this.zyy_1 + ', transferJobItem=' + this.ayz_1 + ')';
  };
  protoOf(UriToSaveQueueItem).hashCode = function () {
    var result = this.zyy_1.hashCode();
    result = imul(result, 31) + this.ayz_1.hashCode() | 0;
    return result;
  };
  protoOf(UriToSaveQueueItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UriToSaveQueueItem))
      return false;
    var tmp0_other_with_cast = other instanceof UriToSaveQueueItem ? other : THROW_CCE();
    if (!this.zyy_1.equals(tmp0_other_with_cast.zyy_1))
      return false;
    if (!this.ayz_1.equals(tmp0_other_with_cast.ayz_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    this.vyz_1 = this$0;
    this.wyz_1 = $localUrisToSave;
    this.xyz_1 = $onTransferJobItemCreated;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).qz0 = function (it, $completion) {
    var tmp = this.tmw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.qz0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hd_1 = 1;
            suspendResult = this.vyz_1.xyy_1.o7l().chv(new TransferJob(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zyz_1 = suspendResult;
            this.az0_1 = this.zyz_1.mb();
            var tmp_0 = this;
            tmp_0.bz0_1 = this.wyz_1;
            var tmp_1 = this;
            tmp_1.cz0_1 = this.bz0_1;
            var tmp_2 = this;
            tmp_2.dz0_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.bz0_1, 10));
            this.ez0_1 = this.cz0_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.ez0_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.fz0_1 = this.ez0_1.e();
            var tmp_3 = this;
            tmp_3.gz0_1 = this.fz0_1;
            var tmp_4 = this;
            tmp_4.hz0_1 = fetch(this.gz0_1.snl_1);
            this.hd_1 = 3;
            var this_0 = this.hz0_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.iz0_1 = suspendResult;
            this.jz0_1 = this.iz0_1.blob();
            this.hd_1 = 4;
            var this_1 = this.jz0_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.kz0_1 = suspendResult;
            this.lz0_1 = this.kz0_1.size;
            this.mz0_1 = numberToLong(this.lz0_1);
            var tmp_5 = this;
            var tmp0_tjiSrc = this.gz0_1.snl_1;
            var tmp1_tjiTableId = this.gz0_1.unl_1;
            var tmp2_tjiEntityUid = this.gz0_1.tnl_1;
            tmp_5.nz0_1 = new TransferJobItem(VOID, this.az0_1, this.mz0_1, VOID, VOID, tmp0_tjiSrc, VOID, VOID, VOID, tmp1_tjiTableId, tmp2_tjiEntityUid);
            this.hd_1 = 5;
            suspendResult = this.vyz_1.xyy_1.p7l().mhx(this.nz0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.oz0_1 = suspendResult;
            this.pz0_1 = this.oz0_1.mb();
            this.xyz_1(this.gz0_1, this.nz0_1.sk0(this.pz0_1));
            this.hd_1 = 6;
            suspendResult = this.vyz_1.yyy_1.nnr(this.vyz_1.xyy_1, this.gz0_1.unl_1, this.gz0_1.tnl_1, this.pz0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var ARGUMENT = new UriToSaveQueueItem(this.gz0_1, this.nz0_1.sk0(this.pz0_1));
            this.dz0_1.i1(ARGUMENT);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            return this.dz0_1;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).tmw = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this.vyz_1, this.wyz_1, this.xyz_1, completion);
    i.yyz_1 = it;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation);
    var l = function (it, $completion) {
      return i.qz0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation) {
    this.zz0_1 = this$0;
    this.az1_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).wz1 = function ($this$coroutineScope, $completion) {
    var tmp = this.v1m($this$coroutineScope, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).he = function (p1, $completion) {
    return this.wz1((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.cz1_1 = new TransferJobItemStatusUpdater(this.zz0_1.xyy_1, null, this.bz1_1);
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.ez1_1 = this.az1_1;
            var tmp_1 = this;
            tmp_1.fz1_1 = this.ez1_1;
            var tmp_2 = this;
            tmp_2.gz1_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ez1_1, 10));
            this.hz1_1 = this.fz1_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.hz1_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.iz1_1 = this.hz1_1.e();
            var tmp_3 = this;
            tmp_3.jz1_1 = this.iz1_1;
            this.kz1_1 = new BlobTransferJobItem('', this.jz1_1.ayz_1.nc3_1);
            this.cz1_1.wnq(new BlobTransferStatusUpdate(this.kz1_1, TransferJobItemStatus_IN_PROGRESS_getInstance().ijf_1));
            this.lz1_1 = this.zz0_1.uyy_1;
            this.mz1_1 = randomUuidAsString();
            this.nz1_1 = Companion_getInstance_3().q2t(this.jz1_1.zyy_1.snl_1);
            this.oz1_1 = this.zz0_1.vyy_1.hmr_1 + 'api/blob/upload-item';
            var tmp_4 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            var tmp0_safe_receiver = this.jz1_1.zyy_1.vnl_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              this_0.s('X-Blob-Response-' + 'Content-Type', listOf_0(tmp0_safe_receiver));
            }

            tmp_4.pz1_1 = asIStringValues(this_0.f3());
            this.hd_1 = 2;
            suspendResult = this.lz1_1.loe(this.mz1_1, this.nz1_1, this.oz1_1, VOID, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda(this.cz1_1, this.kz1_1), VOID, this.pz1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.qz1_1 = suspendResult;
            var tmp_5 = this;
            var tmp5_elvis_lhs = this.qz1_1.hoe_1;
            var tmp_6;
            if (tmp5_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('SaveLocalUrisAsBlobUseCaseJs: no response body!');
            } else {
              tmp_6 = tmp5_elvis_lhs;
            }

            tmp_5.rz1_1 = tmp_6;
            this.cz1_1.wnq(new BlobTransferStatusUpdate(this.kz1_1, TransferJobItemStatus_COMPLETE_getInstance().ijf_1));
            this.sz1_1 = this.zz0_1.wyy_1.x4b(Companion_instance_81.s4x(), this.rz1_1);
            Napier_getInstance().n5k('SaveLocalUrisAsBlobUseCaseJs: upload complete: ' + (this.jz1_1.zyy_1.snl_1 + ' stored as ' + this.sz1_1.snk_1));
            this.tz1_1 = this.sz1_1.anm(this.jz1_1.zyy_1.tnl_1, this.jz1_1.zyy_1.unl_1, this.jz1_1.zyy_1.snl_1);
            this.gz1_1.i1(this.tz1_1);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.uz1_1 = this.gz1_1;
            this.hd_1 = 4;
            suspendResult = this.cz1_1.ynq(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.dz1_1 = this.uz1_1;
            this.id_1 = 8;
            this.hd_1 = 7;
            continue $sm;
          case 5:
            this.id_1 = 8;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              this.vz1_1 = this.kd_1;
              Napier_getInstance().v5k('SaveLocalUriAsBlobUseCaseJs: exception uploading', this.vz1_1);
              this.hd_1 = 6;
              var tmp_8 = NonCancellable_getInstance();
              suspendResult = withContext(tmp_8, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this.zz0_1, this.cz1_1, this.az1_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            var tmp_9 = this;
            throw this.vz1_1;
          case 7:
            this.id_1 = 8;
            return this.dz1_1;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).v1m = function ($this$coroutineScope, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this.zz0_1, this.az1_1, completion);
    i.bz1_1 = $this$coroutineScope;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this$0, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation);
    var l = function ($this$coroutineScope, $completion) {
      return i.wz1($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$71(_this__u8e3s4, localUrisToSave, onTransferJobItemCreated, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fz2_1 = _this__u8e3s4;
    this.gz2_1 = localUrisToSave;
    this.hz2_1 = onTransferJobItemCreated;
  }
  protoOf($invokeCOROUTINE$71).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.fz2_1.xyy_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this.fz2_1, this.gz2_1, this.hz2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.iz2_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = coroutineScope(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this.fz2_1, this.iz2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveLocalUrisAsBlobUseCaseJs(chunkedUploadClientLocalUriUseCase, endpoint, json, db, updateTransferJobItemEtagUseCase) {
    updateTransferJobItemEtagUseCase = updateTransferJobItemEtagUseCase === VOID ? new UpdateTransferJobItemEtagUseCase() : updateTransferJobItemEtagUseCase;
    this.uyy_1 = chunkedUploadClientLocalUriUseCase;
    this.vyy_1 = endpoint;
    this.wyy_1 = json;
    this.xyy_1 = db;
    this.yyy_1 = updateTransferJobItemEtagUseCase;
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs).bnm = function (localUrisToSave, onTransferJobItemCreated, $completion) {
    var tmp = new $invokeCOROUTINE$71(this, localUrisToSave, onTransferJobItemCreated, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnqueueSavePictureUseCaseJs$invoke$slambda(this$0, $entityUid, $tableId, $pictureUri, resultContinuation) {
    this.rz2_1 = this$0;
    this.sz2_1 = $entityUid;
    this.tz2_1 = $tableId;
    this.uz2_1 = $pictureUri;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).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.rz2_1.wz2_1.cnm(this.sz2_1, this.tz2_1, this.uz2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).v1m = function ($this$launch, completion) {
    var i = new EnqueueSavePictureUseCaseJs$invoke$slambda(this.rz2_1, this.sz2_1, this.tz2_1, this.uz2_1, completion);
    i.vz2_1 = $this$launch;
    return i;
  };
  function EnqueueSavePictureUseCaseJs$invoke$slambda_0(this$0, $entityUid, $tableId, $pictureUri, resultContinuation) {
    var i = new EnqueueSavePictureUseCaseJs$invoke$slambda(this$0, $entityUid, $tableId, $pictureUri, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EnqueueSavePictureUseCaseJs(savePictureUseCase) {
    this.wz2_1 = savePictureUseCase;
    this.xz2_1 = CoroutineScope_0(Dispatchers_getInstance().p12_1.lj(Job()));
  }
  protoOf(EnqueueSavePictureUseCaseJs).cnm = function (entityUid, tableId, pictureUri, $completion) {
    launch(this.xz2_1, VOID, VOID, EnqueueSavePictureUseCaseJs$invoke$slambda_0(this, entityUid, tableId, pictureUri, null));
    return Unit_instance;
  };
  function SetClipboardStringUseCaseJs() {
  }
  protoOf(SetClipboardStringUseCaseJs).knv = function (content) {
    try {
      navigator.clipboard.writeText(content);
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
      } else {
        throw $p;
      }
    }
  };
  function CompressImageUseCaseJs$invoke$lambda($fromUri, $completeable) {
    return function (it) {
      Napier_getInstance().n5k('CompressImageUseCaseJs: compressing ' + $fromUri + ' : success');
      $completeable.gy(it);
      return Unit_instance;
    };
  }
  function CompressImageUseCaseJs$invoke$lambda_0($fromUri, $completeable) {
    return function (it) {
      Napier_getInstance().v5k('CompressImageUseCaseJs: compressing ' + $fromUri + ' : error', it);
      $completeable.iy(it);
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$72(_this__u8e3s4, fromUri, toUri, params, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gz3_1 = _this__u8e3s4;
    this.hz3_1 = fromUri;
    this.iz3_1 = toUri;
    this.jz3_1 = params;
    this.kz3_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$72).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.lz3_1 = CompletableDeferred();
            Napier_getInstance().n5k('CompressImageUseCaseJs: compressing ' + this.hz3_1);
            this.id_1 = 4;
            var tmp_0 = this;
            tmp_0.mz3_1 = fetch(this.hz3_1);
            this.hd_1 = 1;
            var this_0 = this.mz3_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nz3_1 = suspendResult;
            this.oz3_1 = this.nz3_1.blob();
            this.hd_1 = 2;
            var this_1 = this.oz3_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.pz3_1 = suspendResult;
            var this_2 = {};
            this_2.maxWidth = this.jz3_1.nnv_1;
            this_2.maxHeight = this.jz3_1.onv_1;
            this_2.convertSize = 50000;
            this_2.convertTypes = ['image/png'];
            this_2.success = CompressImageUseCaseJs$invoke$lambda(this.hz3_1, this.lz3_1);
            this_2.error = CompressImageUseCaseJs$invoke$lambda_0(this.hz3_1, this.lz3_1);
            new com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk(this.pz3_1, this_2);
            this.hd_1 = 3;
            suspendResult = this.lz3_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var compressedBlob = suspendResult;
            var resultUri = URL.createObjectURL(compressedBlob);
            return new CompressResult(resultUri, compressedBlob.type, numberToLong(this.pz3_1.size), numberToLong(compressedBlob.size));
          case 4:
            this.id_1 = 6;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().v5k('CompressImageUseCase: Exception caught: ', e);
              throw e;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function CompressImageUseCaseJs() {
  }
  protoOf(CompressImageUseCaseJs).qz3 = function (fromUri, toUri, params, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$72(this, fromUri, toUri, params, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CompressImageUseCaseJs).qnv = function (fromUri, toUri, params, onProgress, $completion) {
    return this.qz3(fromUri, toUri, params, onProgress, $completion);
  };
  function Companion_188() {
    this.rz3_1 = 3;
  }
  var Companion_instance_236;
  function Companion_getInstance_206() {
    return Companion_instance_236;
  }
  function ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda($onProgress) {
    return function (it) {
      $onProgress(new ContentEntryGetMetadataStatus(false, VOID, it.foe_1, it.goe_1));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$73(_this__u8e3s4, contentUri, fileName, endpoint, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.az4_1 = _this__u8e3s4;
    this.bz4_1 = contentUri;
    this.cz4_1 = fileName;
    this.dz4_1 = endpoint;
    this.ez4_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$73).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.fz4_1 = randomUuid().toString();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.hz4_1 = until(0, 3).w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.hz4_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.iz4_1 = this.hz4_1.e();
            this.jz4_1 = this.az4_1.nz4_1;
            this.kz4_1 = this.dz4_1.hmr_1 + 'api/contentupload/upload';
            var tmp_0 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            if (!(this.cz4_1 == null)) {
              this_0.s('upload-original-filename', listOf_0(encodeURIComponent(this.cz4_1)));
            }

            tmp_0.lz4_1 = asIStringValues(this_0.f3());
            this.hd_1 = 4;
            var tmp_1 = new Long(0, 0);
            suspendResult = this.jz4_1.loe(this.fz4_1, this.bz4_1, this.kz4_1, tmp_1, VOID, ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda(this.ez4_1), VOID, this.lz4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var finalResponse = suspendResult;
            var tmp4_subject = finalResponse.ioe_1;
            if (tmp4_subject === 400) {
              var tmp5_elvis_lhs = finalResponse.hoe_1;
              throw new InvalidContentException(tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs);
            } else if (tmp4_subject === 406) {
              var tmp6_elvis_lhs = finalResponse.hoe_1;
              throw new UnsupportedContentException(tmp6_elvis_lhs == null ? '' : tmp6_elvis_lhs);
            }

            var tmp_2 = this;
            var tmp7_safe_receiver = finalResponse.hoe_1;
            var tmp_3;
            if (tmp7_safe_receiver == null) {
              tmp_3 = null;
            } else {
              tmp_3 = this.az4_1.mz4_1.x4b(Companion_instance_80.s4x(), tmp7_safe_receiver);
            }

            var tmp8_elvis_lhs = tmp_3;
            var tmp_4;
            if (tmp8_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Final response had no body');
            } else {
              tmp_4 = tmp8_elvis_lhs;
            }

            tmp_2.gz4_1 = tmp_4;
            this.id_1 = 9;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            var tmp_5 = this.gz4_1;
            this.id_1 = 9;
            URL.revokeObjectURL(this.bz4_1.toString());
            return tmp_5;
          case 6:
            var tmp_6 = this;
            throw IllegalStateException_init_$Create$('Retried upload 3 times... failed.');
          case 7:
            this.id_1 = 9;
            URL.revokeObjectURL(this.bz4_1.toString());
            return Unit_instance;
          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            URL.revokeObjectURL(this.bz4_1.toString());
            throw t;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ContentEntryGetMetaDataFromUriUseCaseJs(json, chunkedUploadClientLocalUriUseCase) {
    this.mz4_1 = json;
    this.nz4_1 = chunkedUploadClientLocalUriUseCase;
  }
  protoOf(ContentEntryGetMetaDataFromUriUseCaseJs).znw = function (contentUri, fileName, endpoint, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$73(this, contentUri, fileName, endpoint, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$74(_this__u8e3s4, subtitleTrackUri, filename, locale, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wz4_1 = _this__u8e3s4;
    this.xz4_1 = subtitleTrackUri;
    this.yz4_1 = filename;
    this.zz4_1 = locale;
  }
  protoOf($invokeCOROUTINE$74).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.xz4_1.v78_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bz5_1 = suspendResult;
            this.cz5_1 = this.bz5_1.blob();
            this.hd_1 = 2;
            var this_0 = this.cz5_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.dz5_1 = suspendResult;
            this.ez5_1 = this.dz5_1.text();
            this.hd_1 = 3;
            var this_1 = this.ez5_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.az5_1 = suspendResult;
            this.id_1 = 8;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 8;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              this.fz5_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().v5k('GetSubtitleTrackFromUriUseCaseJs: exception fetching local uri ' + this.xz4_1, this.fz5_1);
              throw IllegalStateException_init_$Create$_1('Failed to fetch blob for local uri ' + this.xz4_1, this.fz5_1);
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 8;
            this.gz5_1 = this.az5_1;
            var tmp_2 = this;
            tmp_2.hz5_1 = this.wz4_1.qz5_1;
            var tmp_3 = this;
            tmp_3.iz5_1 = this.wz4_1.pz5_1.hmr_1 + 'api/contentupload/getsubtitletrack';
            var tmp_4 = this;
            tmp_4.jz5_1 = this.hz5_1;
            var tmp_5 = this;
            tmp_5.kz5_1 = this.jz5_1;
            var tmp_6 = this;
            var this_2 = new HttpRequestBuilder();
            url(this_2, this.iz5_1);
            parameter(this_2, 'filename', this.yz4_1);
            var tmp0_elvis_lhs = this.zz4_1;
            parameter(this_2, 'locale', tmp0_elvis_lhs == null ? this.wz4_1.sz5_1.aod_1 : tmp0_elvis_lhs);
            var body = new TextContent(this.gz5_1, Companion_getInstance_16().q2t('text/vtt; charset=utf-8'));
            if (body == null) {
              this_2.p3c_1 = NullBody_instance;
              var tmp_7 = JsType_instance;
              var tmp_8 = getKClass(TextContent);
              var tmp_9;
              try {
                tmp_9 = createKType(getKClass(TextContent), arrayOf([]), false);
              } catch ($p) {
                var tmp_10;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_10 = null;
                } else {
                  throw $p;
                }
                tmp_9 = tmp_10;
              }
              this_2.m3i(typeInfoImpl(tmp_7, tmp_8, tmp_9));
            } else {
              if (body instanceof OutgoingContent) {
                this_2.p3c_1 = body;
                this_2.m3i(null);
              } else {
                this_2.p3c_1 = body;
                var tmp_11 = JsType_instance;
                var tmp_12 = getKClass(TextContent);
                var tmp_13;
                try {
                  tmp_13 = createKType(getKClass(TextContent), arrayOf([]), false);
                } catch ($p) {
                  var tmp_14;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_14 = null;
                  } else {
                    throw $p;
                  }
                  tmp_13 = tmp_14;
                }
                this_2.m3i(typeInfoImpl(tmp_11, tmp_12, tmp_13));
              }
            }

            tmp_6.lz5_1 = this_2;
            this.lz5_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_15 = this;
            tmp_15.mz5_1 = this.kz5_1;
            var tmp_16 = this;
            tmp_16.nz5_1 = this.lz5_1;
            this.hd_1 = 6;
            suspendResult = (new HttpStatement(this.nz5_1, this.mz5_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.oz5_1 = suspendResult;
            this.hd_1 = 7;
            suspendResult = bodyAsText(this.oz5_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var subtitleJsonStr = suspendResult;
            return this.wz4_1.rz5_1.x4b(Companion_instance_79.s4x(), subtitleJsonStr);
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetSubtitleTrackFromUriUseCaseJs(endpoint, httpClient, json, supportedLanguagesConfig) {
    this.pz5_1 = endpoint;
    this.qz5_1 = httpClient;
    this.rz5_1 = json;
    this.sz5_1 = supportedLanguagesConfig;
  }
  protoOf(GetSubtitleTrackFromUriUseCaseJs).lnx = function (subtitleTrackUri, filename, locale, $completion) {
    var tmp = new $invokeCOROUTINE$74(this, subtitleTrackUri, filename, locale, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function LaunchXapiUseCaseJs$invoke$lambda($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: launching xapi in new windows: ' + $resolveResult.io0_1;
    };
  }
  function LaunchXapiUseCaseJs$invoke$lambda_0($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: navigating to: ' + $resolveResult.io0_1;
    };
  }
  function $invokeCOROUTINE$75(_this__u8e3s4, contentEntryVersion, navController, clazzUid, cbUid, target, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bz6_1 = _this__u8e3s4;
    this.cz6_1 = contentEntryVersion;
    this.dz6_1 = navController;
    this.ez6_1 = clazzUid;
    this.fz6_1 = cbUid;
    this.gz6_1 = target;
  }
  protoOf($invokeCOROUTINE$75).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.bz6_1.hz6_1.po3(this.cz6_1.vap_1, this.ez6_1, this.fz6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var resolveResult = suspendResult;
            if (!this.gz6_1.equals(LinkTarget_TOP_getInstance())) {
              var tmp_0 = Napier_getInstance();
              tmp_0.p5k(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda(resolveResult));
              window.open(resolveResult.io0_1, asWindowTarget(this.gz6_1), 'popup=true,noopener,noreferrer');
            } else {
              var tmp_1 = Napier_getInstance();
              tmp_1.p5k(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda_0(resolveResult));
              location.href = resolveResult.io0_1;
            }

            return new LaunchResult();
          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 LaunchXapiUseCaseJs(resolveXapiLaunchHrefUseCase) {
    this.hz6_1 = resolveXapiLaunchHrefUseCase;
  }
  protoOf(LaunchXapiUseCaseJs).eo0 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp = new $invokeCOROUTINE$75(this, contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LaunchXapiUseCaseJs).go0 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.eo0(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function $invokeCOROUTINE$76(_this__u8e3s4, blobUrl, filename, mimeType, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qz6_1 = _this__u8e3s4;
    this.rz6_1 = blobUrl;
    this.sz6_1 = filename;
    this.tz6_1 = mimeType;
  }
  protoOf($invokeCOROUTINE$76).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = await_0(window.fetch(this.rz6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vz6_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = await_0(this.vz6_1.arrayBuffer(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var arrayBuffer = suspendResult;
            var uint8Array = new Uint8Array(arrayBuffer);
            var length = uint8Array.length;
            var byteArray = new Int8Array(length);
            for (var i = 0; i < length; i++) {
              byteArray[i] = uint8Array[i];
            }

            this.uz6_1 = byteArray;
            this.id_1 = 4;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Exception) {
              var e = this.kd_1;
              var tmp_1 = this;
              console.log('Error reading blob: ' + e.message);
              tmp_1.uz6_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            throw this.kd_1;
          case 5:
            this.id_1 = 4;
            return this.uz6_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function BlobFileUseCaseJs() {
  }
  protoOf(BlobFileUseCaseJs).vo6 = function (blobUrl, filename, mimeType, $completion) {
    var tmp = new $invokeCOROUTINE$76(this, blobUrl, filename, mimeType, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SetLanguageUseCaseJs(languagesConfig) {
    this.wz6_1 = languagesConfig;
  }
  protoOf(SetLanguageUseCaseJs).do9 = function (uiLang, currentDestination, navController, navArgs) {
    var currentDisplayLang = this.wz6_1.aod_1;
    this.wz6_1.row(uiLang.hot_1);
    var newDisplayLang = this.wz6_1.aod_1;
    if (!(currentDisplayLang === newDisplayLang)) {
      location.reload();
    }
    return new SetLangResult(false);
  };
  function OpenExternalLinkUseCaseJs() {
  }
  protoOf(OpenExternalLinkUseCaseJs).mo9 = function (url, target) {
    window.open(url, asWindowTarget(target));
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    this.fz7_1 = this$0;
    this.gz7_1 = $text;
    this.hz7_1 = $accountPersonUid;
    this.iz7_1 = $onProgress;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).gz8 = function ($this$coroutineScope, $completion) {
    var tmp = this.v1m($this$coroutineScope, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.gz8((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            tmp_0.kz7_1 = this.fz7_1.hz8_1;
            var tmp_1 = this;
            tmp_1.lz7_1 = this.fz7_1.iz8_1.hmr_1 + 'api/person/bulkadd/enqueue';
            var tmp_2 = this;
            tmp_2.mz7_1 = this.kz7_1;
            var tmp_3 = this;
            tmp_3.nz7_1 = this.mz7_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.lz7_1);
            var body = new TextContent(this.gz7_1, Text_getInstance().s2v_1);
            if (body == null) {
              this_0.p3c_1 = NullBody_instance;
              var tmp_5 = JsType_instance;
              var tmp_6 = getKClass(TextContent);
              var tmp_7;
              try {
                tmp_7 = createKType(getKClass(TextContent), arrayOf([]), false);
              } catch ($p) {
                var tmp_8;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_8 = null;
                } else {
                  throw $p;
                }
                tmp_7 = tmp_8;
              }
              this_0.m3i(typeInfoImpl(tmp_5, tmp_6, tmp_7));
            } else {
              if (body instanceof OutgoingContent) {
                this_0.p3c_1 = body;
                this_0.m3i(null);
              } else {
                this_0.p3c_1 = body;
                var tmp_9 = JsType_instance;
                var tmp_10 = getKClass(TextContent);
                var tmp_11;
                try {
                  tmp_11 = createKType(getKClass(TextContent), arrayOf([]), false);
                } catch ($p) {
                  var tmp_12;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_12 = null;
                  } else {
                    throw $p;
                  }
                  tmp_11 = tmp_12;
                }
                this_0.m3i(typeInfoImpl(tmp_9, tmp_10, tmp_11));
              }
            }

            parameter(this_0, 'accountPersonUid', this.hz7_1.toString());
            var tmp_13 = this.fz7_1.kz8_1;
            doorNodeAndVersionHeaders(this_0, isInterface(tmp_13, DoorDatabaseRepository) ? tmp_13 : THROW_CCE());
            tmp_4.oz7_1 = this_0;
            this.oz7_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_14 = this;
            tmp_14.pz7_1 = this.nz7_1;
            var tmp_15 = this;
            tmp_15.qz7_1 = this.oz7_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.qz7_1, this.pz7_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rz7_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.rz7_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.sz7_1 = suspendResult;
            this.tz7_1 = toLong_0(this.sz7_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!get_isActive(this.jz7_1)) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.id_1 = 7;
            var tmp_16 = this;
            tmp_16.uz7_1 = this.fz7_1.hz8_1;
            var tmp_17 = this;
            tmp_17.vz7_1 = this.fz7_1.iz8_1.hmr_1 + 'api/person/bulkadd/status';
            var tmp_18 = this;
            tmp_18.wz7_1 = this.uz7_1;
            var tmp_19 = this;
            tmp_19.xz7_1 = this.wz7_1;
            var tmp_20 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, this.vz7_1);
            parameter(this_1, 'timestamp', this.tz7_1.toString());
            tmp_20.yz7_1 = this_1;
            this.yz7_1.n3c_1 = Companion_getInstance().m30_1;
            var tmp_21 = this;
            tmp_21.zz7_1 = this.xz7_1;
            var tmp_22 = this;
            tmp_22.az8_1 = this.yz7_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.az8_1, this.zz7_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.bz8_1 = suspendResult;
            if (this.bz8_1.a3f().g33_1 === 200) {
              var tmp_23 = this;
              tmp_23.cz8_1 = this.fz7_1.jz8_1;
              this.hd_1 = 5;
              suspendResult = bodyAsText(this.bz8_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 5:
            this.dz8_1 = suspendResult;
            var tmp_24 = this;
            var this_2 = this.cz8_1.y4b();
            var this_3 = serializer(this_2, createKType(getKClass(BulkAddPersonRunImportUiState), arrayOf([]), false));
            tmp_24.ez8_1 = this.cz8_1.x4b(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.dz8_1);
            if (this.ez8_1.nx2_1) {
              this.iz7_1.wx2(this.ez8_1.px2_1, this.ez8_1.ox2_1);
            } else {
              if (this.ez8_1.bsj()) {
                throw new BulkAddPersonException(this.ez8_1.rx2_1, this.ez8_1.qx2_1);
              }
              return new BulkAddUsersResult(this.ez8_1.px2_1);
            }

            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.id_1 = 11;
            this.hd_1 = 8;
            continue $sm;
          case 7:
            this.id_1 = 11;
            var tmp_25 = this.kd_1;
            if (tmp_25 instanceof Error) {
              this.fz8_1 = this.kd_1;
              Napier_getInstance().r5k('BulkAddPersonFromLocalUriUseCaseJs exception', this.fz8_1);
              var tmp_26 = this.fz8_1;
              if (tmp_26 instanceof BulkAddPersonException)
                throw this.fz8_1;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 11;
            this.hd_1 = 9;
            suspendResult = delay(new Long(1000, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.hd_1 = 3;
            continue $sm;
          case 10:
            throw IllegalStateException_init_$Create$('Should not get here');
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).v1m = function ($this$coroutineScope, completion) {
    var i = new BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this.fz7_1, this.gz7_1, this.hz7_1, this.iz7_1, completion);
    i.jz7_1 = $this$coroutineScope;
    return i;
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    var i = new BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation);
    var l = function ($this$coroutineScope, $completion) {
      return i.gz8($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$77(_this__u8e3s4, uri, accountPersonUid, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tz8_1 = _this__u8e3s4;
    this.uz8_1 = uri;
    this.vz8_1 = accountPersonUid;
    this.wz8_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$77).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            console.log('Getting csv text');
            this.hd_1 = 1;
            suspendResult = fetch_0(this.uz8_1.toString(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.xz8_1 = suspendResult;
            this.yz8_1 = this.xz8_1.text();
            this.hd_1 = 2;
            var this_0 = this.yz8_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.zz8_1 = suspendResult;
            console.log('csv text = ' + this.zz8_1);
            this.hd_1 = 3;
            suspendResult = coroutineScope(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this.tz8_1, this.zz8_1, this.vz8_1, this.wz8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function BulkAddPersonsFromLocalUriUseCaseJs(httpClient, endpoint, json, repo) {
    this.hz8_1 = httpClient;
    this.iz8_1 = endpoint;
    this.jz8_1 = json;
    this.kz8_1 = repo;
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs).boc = function (uri, accountPersonUid, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$77(this, uri, accountPersonUid, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickPhoneNumUseCaseJs() {
  }
  protoOf(OnClickPhoneNumUseCaseJs).knv = function (number) {
    var tmp = window;
    var tmp_0 = 'tel:' + number;
    // Inline function 'web.window.WindowTarget.Companion._blank' call
    0;
    tmp.open(tmp_0, '_blank');
  };
  function PhoneNumValidatorUseCaseJs() {
  }
  protoOf(PhoneNumValidatorUseCaseJs).hoc = function (phoneNumber) {
    var tmp;
    try {
      tmp = parsePhoneNumber(phoneNumber, null, null).isValid();
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var e = $p;
        tmp_0 = false;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  };
  function PhoneNumberJs(phoneNumber) {
    this.az9_1 = phoneNumber;
  }
  function PhoneNumberUtilJs() {
  }
  protoOf(PhoneNumberUtilJs).foc = function (numberToParse, defaultRegion) {
    return new PhoneNumberJs(parsePhoneNumber(numberToParse, defaultRegion, null));
  };
  protoOf(PhoneNumberUtilJs).goc = function (number) {
    return (number instanceof PhoneNumberJs ? number : THROW_CCE()).az9_1.formatInternational();
  };
  function OnClickSendEmailUseCaseJs() {
  }
  protoOf(OnClickSendEmailUseCaseJs).knv = function (emailAddr) {
    var tmp = window;
    var tmp_0 = 'mailto:' + emailAddr;
    // Inline function 'web.window.WindowTarget.Companion._blank' call
    0;
    tmp.open(tmp_0, '_blank');
  };
  function DeleteUrisUseCaseJs$invoke$lambda($uri) {
    return function () {
      return 'DeleteUrisUseCase: deleting (revoking) ' + $uri;
    };
  }
  function DeleteUrisUseCaseJs(isTempFileCheckerUseCase) {
    this.bz9_1 = isTempFileCheckerUseCase;
  }
  protoOf(DeleteUrisUseCaseJs).eno = function (uris, onlyIfTemp, $completion) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = uris.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.tmpfiles.DeleteUrisUseCaseJs.invoke.<anonymous>' call
      if (!onlyIfTemp ? true : this.bz9_1.io3(element)) {
        var tmp = Napier_getInstance();
        tmp.p5k(VOID, VOID, DeleteUrisUseCaseJs$invoke$lambda(element));
        URL.revokeObjectURL(element);
      }
    }
    return Unit_instance;
  };
  function IsTempFileCheckerUseCaseJs() {
  }
  protoOf(IsTempFileCheckerUseCaseJs).io3 = function (uri) {
    return startsWith(uri, 'blob:');
  };
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.aoe_1;
    };
  }
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.aoe_1 + ' complete ';
    };
  }
  function $invokeCOROUTINE$78(_this__u8e3s4, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kz9_1 = _this__u8e3s4;
    this.lz9_1 = uploadUuid;
    this.mz9_1 = localUri;
    this.nz9_1 = remoteUrl;
    this.oz9_1 = fromByte;
    this.pz9_1 = chunkSize;
    this.qz9_1 = onProgress;
    this.rz9_1 = onStatusChange;
    this.sz9_1 = lastChunkHeaders;
  }
  protoOf($invokeCOROUTINE$78).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            this.tz9_1 = 'ChunkedUploadClientLocalUriUseCaseJs (' + this.lz9_1 + ') : ' + this.mz9_1 + ' -> ' + this.nz9_1 + ':';
            this.id_1 = 13;
            Napier_getInstance().n5k(this.tz9_1 + ' : starting');
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.mz9_1.v78_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vz9_1 = suspendResult;
            this.wz9_1 = this.vz9_1.blob();
            this.hd_1 = 2;
            var this_0 = this.wz9_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.uz9_1 = suspendResult;
            this.id_1 = 13;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.id_1 = 13;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              this.xz9_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().v5k(this.tz9_1 + ' exception fetching local uri ' + this.mz9_1, this.xz9_1);
              throw IllegalStateException_init_$Create$_1(this.tz9_1 + ': failed to fetch blob for local uri ' + this.mz9_1.v78_1, this.xz9_1);
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 13;
            this.yz9_1 = this.uz9_1;
            this.zz9_1 = this.yz9_1.size;
            if (this.zz9_1 <= 0.0)
              throw IllegalArgumentException_init_$Create$('Upload size <= 0');
            this.aza_1 = new ChunkInfo(numberToLong(this.zz9_1), this.pz9_1, this.oz9_1);
            if (this.zz9_1 >= IntCompanionObject_instance.MAX_VALUE)
              throw IllegalArgumentException_init_$Create$('JS: upload size(' + numberToLong(this.zz9_1).toString() + ') > ' + IntCompanionObject_instance.MAX_VALUE + ' not supported');
            this.rz9_1(TransferJobItemStatus_IN_PROGRESS_getInstance());
            var tmp_2 = this;
            tmp_2.bza_1 = this.aza_1;
            this.cza_1 = 0;
            this.dza_1 = this.bza_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.dza_1.f()) {
              this.hd_1 = 12;
              continue $sm;
            }

            this.eza_1 = this.dza_1.e();
            var tmp_3 = this;
            var tmp1 = this.cza_1;
            this.cza_1 = tmp1 + 1 | 0;
            tmp_3.fza_1 = checkIndexOverflow(tmp1);
            var tmp_4 = this;
            tmp_4.gza_1 = this.eza_1;
            var tmp_5 = Napier_getInstance();
            tmp_5.j5k(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda(this.tz9_1, this.fza_1, this.aza_1));
            this.hza_1 = this.yz9_1.slice(this.gza_1.boe_1.a7(), this.gza_1.coe_1.a7());
            this.id_1 = 7;
            var tmp_6 = this;
            var this_1 = {};
            this_1.body = this.hza_1;
            this_1.method = 'POST';
            var this_2 = new Headers();
            this_2.set(get_HEADER_UPLOAD_UUID(), this.lz9_1);
            this_2.set(get_HEADER_IS_FINAL_CHUNK(), this.gza_1.doe_1.toString());
            this_2.set(get_HEADER_UPLOAD_START_BYTE(), this.gza_1.boe_1.toString());
            if (this.gza_1.doe_1 ? !(this.sz9_1 == null) : false) {
              var tmp0_iterator = this.sz9_1.s2p().w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_iterator_0 = this.sz9_1.r2p(element).w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  this_2.append(element, element_0);
                }
              }
            }

            this_1.headers = this_2;
            tmp_6.jza_1 = fetch(this.nz9_1, this_1);
            this.hd_1 = 6;
            var this_3 = this.jza_1;
            suspendResult = await_0(this_3, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.iza_1 = suspendResult;
            this.id_1 = 13;
            this.hd_1 = 8;
            continue $sm;
          case 7:
            this.id_1 = 13;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              this.kza_1 = this.kd_1;
              var tmp_8 = this;
              Napier_getInstance().v5k(this.tz9_1 + ' exception fetching response for blob upload ' + ('fromByte=' + this.aza_1.yod_1.toString()), this.kza_1);
              throw IllegalStateException_init_$Create$_1(this.tz9_1 + ' exception fetching response for blob upload ', this.kza_1);
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 13;
            this.lza_1 = this.iza_1;
            var tmp_9 = Napier_getInstance();
            tmp_9.j5k(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0(this.tz9_1, this.fza_1, this.aza_1));
            this.qz9_1(new UploadProgress(this.gza_1.coe_1, numberToLong(this.zz9_1)));
            if (this.gza_1.doe_1) {
              this.rz9_1(TransferJobItemStatus_COMPLETE_getInstance());
              Napier_getInstance().n5k(this.tz9_1 + ': Complete!');
              if (!(this.lza_1.status === 204)) {
                var tmp_10 = this;
                tmp_10.nza_1 = this.lza_1.text();
                this.hd_1 = 10;
                var this_4 = this.nza_1;
                suspendResult = await_0(this_4, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_11 = this;
                tmp_11.mza_1 = null;
                this.hd_1 = 11;
                continue $sm;
              }
            } else {
              this.hd_1 = 9;
              continue $sm;
            }

          case 9:
            this.hd_1 = 5;
            continue $sm;
          case 10:
            this.mza_1 = suspendResult;
            this.hd_1 = 11;
            continue $sm;
          case 11:
            var ARGUMENT = this.mza_1;
            return new LastChunkResponse(ARGUMENT, this.lza_1.status, asIStringValues_0(this.lza_1.headers));
          case 12:
            throw IllegalStateException_init_$Create$(this.tz9_1 + ' should have returned with last chunk');
          case 13:
            this.id_1 = 14;
            var tmp_12 = this.kd_1;
            if (tmp_12 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().v5k(this.tz9_1 + ', ChunkedUploadClientLocalUriUseCaseJs: Exception', e);
              this.rz9_1(TransferJobItemStatus_FAILED_getInstance());
              throw e;
            } else {
              throw this.kd_1;
            }

          case 14:
            throw this.kd_1;
          case 15:
            this.id_1 = 14;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function ChunkedUploadClientLocalUriUseCaseJs() {
  }
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).koe = function (uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) {
    var tmp = new $invokeCOROUTINE$78(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SaveStatementOnClearUseCaseJs$invoke$slambda(this$0, $statements, $xapiSession, resultContinuation) {
    this.wza_1 = this$0;
    this.xza_1 = $statements;
    this.yza_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).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.wza_1.azb_1.bnf(this.xza_1, this.yza_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).v1m = function ($this$launch, completion) {
    var i = new SaveStatementOnClearUseCaseJs$invoke$slambda(this.wza_1, this.xza_1, this.yza_1, completion);
    i.zza_1 = $this$launch;
    return i;
  };
  function SaveStatementOnClearUseCaseJs$invoke$slambda_0(this$0, $statements, $xapiSession, resultContinuation) {
    var i = new SaveStatementOnClearUseCaseJs$invoke$slambda(this$0, $statements, $xapiSession, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveStatementOnClearUseCaseJs(xapiStatementResource) {
    this.azb_1 = xapiStatementResource;
  }
  protoOf(SaveStatementOnClearUseCaseJs).hos = function (statements, xapiSession) {
    var tmp = GlobalScope_instance;
    launch(tmp, VOID, VOID, SaveStatementOnClearUseCaseJs$invoke$slambda_0(this, statements, xapiSession, null));
  };
  function SaveStatementOnUnloadUseCaseJs(endpoint, json) {
    this.bzb_1 = endpoint;
    this.czb_1 = json;
  }
  protoOf(SaveStatementOnUnloadUseCaseJs).hos = function (statements, xapiSession) {
    var tmp = navigator;
    var tmp_0 = this.bzb_1.hmr_1 + 'api/xapi-ext/statementOnUnload';
    // Inline function 'web.http.BodyInit' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$2 = this.czb_1.w4b(Companion_getInstance_90().s4x(), new XapiStatementsAndSession(statements, xapiSession));
    tmp.sendBeacon(tmp_0, tmp$ret$2);
  };
  function $invokeCOROUTINE$79(_this__u8e3s4, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lzb_1 = _this__u8e3s4;
    this.mzb_1 = accountPersonUid;
    this.nzb_1 = actor;
    this.ozb_1 = activityId;
    this.pzb_1 = clazzUid;
    this.qzb_1 = cbUid;
    this.rzb_1 = contentEntryUid;
    this.szb_1 = contentEntryVersionUid;
  }
  protoOf($invokeCOROUTINE$79).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.tzb_1 = this.lzb_1.czc_1;
            var tmp_1 = this;
            tmp_1.uzb_1 = this.lzb_1.bzc_1.hmr_1 + 'api/xapi-ext/resumeOrStartSession';
            var tmp_2 = this;
            tmp_2.vzb_1 = this.tzb_1;
            var tmp_3 = this;
            tmp_3.wzb_1 = this.vzb_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.uzb_1);
            var tmp_5 = this.lzb_1.dzc_1;
            doorNodeIdHeader(this_0, isInterface(tmp_5, DoorDatabaseRepository) ? tmp_5 : THROW_CCE());
            parameter(this_0, 'accountPersonUid', this.mzb_1.toString());
            parameter(this_0, 'actor', this.lzb_1.ezc_1.w4b(Companion_instance_106.s4x(), this.nzb_1));
            parameter(this_0, 'activityId', this.ozb_1);
            parameter(this_0, 'clazzUid', this.pzb_1.toString());
            parameter(this_0, 'cbUid', this.qzb_1.toString());
            parameter(this_0, 'contentEntryUid', this.rzb_1.toString());
            parameter(this_0, 'contentEntryVersionUid', this.szb_1.toString());
            tmp_4.xzb_1 = this_0;
            this.xzb_1.n3c_1 = Companion_getInstance().n30_1;
            var tmp_6 = this;
            tmp_6.yzb_1 = this.wzb_1;
            var tmp_7 = this;
            tmp_7.zzb_1 = this.xzb_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.zzb_1, this.yzb_1)).m45(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.azc_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_8 = this.azc_1.v3f();
            var tmp_9 = JsType_instance;
            var tmp_10 = getKClass(XapiSessionEntity);
            var tmp_11;
            try {
              tmp_11 = createKType(getKClass(XapiSessionEntity), arrayOf([]), false);
            } catch ($p) {
              var tmp_12;
              if ($p instanceof Error) {
                var cause = $p;
                tmp_12 = null;
              } else {
                throw $p;
              }
              tmp_11 = tmp_12;
            }

            suspendResult = tmp_8.y3e(typeInfoImpl(tmp_9, tmp_10, tmp_11), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var result = suspendResult instanceof XapiSessionEntity ? suspendResult : THROW_CCE();
            return result;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ResumeOrStartXapiSessionUseCaseJs(endpoint, httpClient, repo, xapiJson) {
    this.bzc_1 = endpoint;
    this.czc_1 = httpClient;
    this.dzc_1 = repo;
    this.ezc_1 = xapiJson.ioh_1;
  }
  protoOf(ResumeOrStartXapiSessionUseCaseJs).ho3 = function (accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion) {
    var tmp = new $invokeCOROUTINE$79(this, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XXHasher64FactoryJs() {
  }
  protoOf(XXHasher64FactoryJs).zop = function (seed) {
    var hasher = XXH.h64();
    hasher.init(seed);
    return new XXHasher64Js(hasher);
  };
  function XXHasher64Js(hasher64) {
    this.fzc_1 = hasher64;
  }
  protoOf(XXHasher64Js).aoq = function (data) {
    // Inline function 'js.typedarrays.toUint8Array' call
    // Inline function 'js.typedarrays.asInt8Array' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var array = data;
    var array_0 = new Uint8Array(array.buffer, array.byteOffset, array.length);
    this.fzc_1.update(array_0.buffer);
  };
  protoOf(XXHasher64Js).boq = function () {
    var digestStr = this.fzc_1.digest().toString(10);
    // Inline function 'kotlin.ULong.toLong' call
    var this_0 = toULong(digestStr);
    return _ULong___get_data__impl__fggpzb(this_0);
  };
  function XXStringHasherJs() {
  }
  protoOf(XXStringHasherJs).ton = function (string) {
    // Inline function 'js.typedarrays.toUint8Array' call
    var tmp$ret$0;
    $l$block: {
      // Inline function 'io.ktor.utils.io.core.toByteArray' call
      var charset = Charsets_getInstance().u2j_1;
      if (charset.equals(Charsets_getInstance().u2j_1)) {
        tmp$ret$0 = encodeToByteArray(string);
        break $l$block;
      }
      tmp$ret$0 = encodeToByteArray_0(charset.y2j(), string, 0, string.length);
    }
    // Inline function 'js.typedarrays.asInt8Array' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var array = tmp$ret$0;
    var array_0 = new Uint8Array(array.buffer, array.byteOffset, array.length);
    var hash = XXH.h64(array_0.buffer, 0).toString(10);
    // Inline function 'kotlin.ULong.toLong' call
    var this_0 = toULong(hash);
    return _ULong___get_data__impl__fggpzb(this_0);
  };
  function collectAsState(_this__u8e3s4, initialState, dispatcher) {
    dispatcher = dispatcher === VOID ? Dispatchers_getInstance().t12() : dispatcher;
    var state = useState_0(collectAsState$lambda(initialState));
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp = [_this__u8e3s4, dispatcher].slice();
    useEffect(tmp, collectAsState$lambda_0(dispatcher, _this__u8e3s4, state));
    return state;
  }
  function collectAsState$lambda($initialState) {
    return function () {
      return $initialState;
    };
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_36(function_0) {
    this.gzc_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_36).t1d = function (value, $completion) {
    return this.gzc_1(value, $completion);
  };
  function collectAsState$lambda$slambda$slambda($state, resultContinuation) {
    this.pzc_1 = $state;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectAsState$lambda$slambda$slambda).e1o = function (it, $completion) {
    var tmp = this.f1o(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectAsState$lambda$slambda$slambda).he = function (p1, $completion) {
    return this.e1o((p1 == null ? true : !(p1 == null)) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectAsState$lambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          this.pzc_1[1](this.qzc_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(collectAsState$lambda$slambda$slambda).f1o = function (it, completion) {
    var i = new collectAsState$lambda$slambda$slambda(this.pzc_1, completion);
    i.qzc_1 = it;
    return i;
  };
  function collectAsState$lambda$slambda$slambda_0($state, resultContinuation) {
    var i = new collectAsState$lambda$slambda$slambda($state, resultContinuation);
    var l = function (it, $completion) {
      return i.e1o(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function collectAsState$lambda$slambda($this_collectAsState, $state, resultContinuation) {
    this.zzc_1 = $this_collectAsState;
    this.azd_1 = $state;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectAsState$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectAsState$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectAsState$lambda$slambda).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;
            var tmp_0 = collectAsState$lambda$slambda$slambda_0(this.azd_1, null);
            suspendResult = this.zzc_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(collectAsState$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new collectAsState$lambda$slambda(this.zzc_1, this.azd_1, completion);
    i.bzd_1 = $this$launch;
    return i;
  };
  function collectAsState$lambda$slambda_0($this_collectAsState, $state, resultContinuation) {
    var i = new collectAsState$lambda$slambda($this_collectAsState, $state, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function collectAsState$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function collectAsState$lambda_0($dispatcher, $this_collectAsState, $state) {
    return function ($this$useEffect) {
      var coroutineScope = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
      launch(coroutineScope, $dispatcher, VOID, collectAsState$lambda$slambda_0($this_collectAsState, $state, null));
      $this$useEffect.push(collectAsState$lambda$lambda(coroutineScope));
      return Unit_instance;
    };
  }
  function useOnUnloadEffect(block) {
    // Inline function 'kotlin.emptyArray' call
    var tmp = [].slice();
    useEffect(tmp, useOnUnloadEffect$lambda(block));
  }
  function useOnUnloadEffect$lambda$lambda($block) {
    return function (it) {
      $block();
      return Unit_instance;
    };
  }
  function useOnUnloadEffect$lambda$lambda_0($evtListener) {
    return function () {
      window.removeEventListener('beforeunload', $evtListener);
      return Unit_instance;
    };
  }
  function useOnUnloadEffect$lambda($block) {
    return function ($this$useEffect) {
      var evtListener = useOnUnloadEffect$lambda$lambda($block);
      window.addEventListener('beforeunload', evtListener);
      $this$useEffect.push(useOnUnloadEffect$lambda$lambda_0(evtListener));
      return Unit_instance;
    };
  }
  function useLaunchedEffect(dependencies, block) {
    var tmp = dependencies.slice();
    useEffect(tmp, useLaunchedEffect$lambda(block));
  }
  function useCoroutineScope(dependencies) {
    // Inline function 'react.useMemo' call
    var dependencies_0 = dependencies.slice();
    var callback = useCoroutineScope$lambda;
    var coroutineScope = useMemo(callback, dependencies_0);
    var tmp = dependencies.slice();
    useEffect(tmp, useCoroutineScope$lambda_0(coroutineScope));
    return coroutineScope;
  }
  function useLaunchedEffect$lambda$slambda($block, resultContinuation) {
    this.kzd_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useLaunchedEffect$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useLaunchedEffect$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(useLaunchedEffect$lambda$slambda).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.kzd_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          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);
  };
  protoOf(useLaunchedEffect$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new useLaunchedEffect$lambda$slambda(this.kzd_1, completion);
    i.lzd_1 = $this$launch;
    return i;
  };
  function useLaunchedEffect$lambda$slambda_0($block, resultContinuation) {
    var i = new useLaunchedEffect$lambda$slambda($block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useLaunchedEffect$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function useLaunchedEffect$lambda($block) {
    return function ($this$useEffect) {
      var coroutineScope = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
      launch(coroutineScope, VOID, VOID, useLaunchedEffect$lambda$slambda_0($block, null));
      $this$useEffect.push(useLaunchedEffect$lambda$lambda(coroutineScope));
      return Unit_instance;
    };
  }
  function useCoroutineScope$lambda() {
    return CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
  }
  function useCoroutineScope$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function useCoroutineScope$lambda_0($coroutineScope) {
    return function ($this$useEffect) {
      $this$useEffect.push(useCoroutineScope$lambda$lambda($coroutineScope));
      return Unit_instance;
    };
  }
  function get_ustadViewName(_this__u8e3s4) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = removePrefix(_this__u8e3s4.pathname, '/');
    return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
  }
  function useNavControllerEffect(commandFlow) {
    var navHostFn = useRequiredContext(get_NavHostContext());
    useLaunchedEffect([commandFlow], useNavControllerEffect$slambda_0(commandFlow, navHostFn, null));
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_37(function_0) {
    this.mzd_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_37).t1d = function (value, $completion) {
    return this.mzd_1(value, $completion);
  };
  function useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation) {
    this.vzd_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda$slambda).xzd = function (it, $completion) {
    var tmp = this.yzd(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda$slambda).he = function (p1, $completion) {
    return this.xzd(p1 instanceof NavCommand ? p1 : THROW_CCE(), $completion);
  };
  protoOf(useNavControllerEffect$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          Napier_getInstance().n5k('useNavControllerEffect: collect command: ' + this.wzd_1);
          this.vzd_1.yyw(this.wzd_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(useNavControllerEffect$slambda$slambda).yzd = function (it, completion) {
    var i = new useNavControllerEffect$slambda$slambda(this.vzd_1, completion);
    i.wzd_1 = it;
    return i;
  };
  function useNavControllerEffect$slambda$slambda_0($navHostFn, resultContinuation) {
    var i = new useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation);
    var l = function (it, $completion) {
      return i.xzd(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation) {
    this.hze_1 = $commandFlow;
    this.ize_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda).e8d = function ($completion) {
    var tmp = this.q7e($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda).r7e = function ($completion) {
    return this.e8d($completion);
  };
  protoOf(useNavControllerEffect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.jze_1 = this.hze_1;
            if (this.jze_1 == null) {
              this.kze_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = useNavControllerEffect$slambda$slambda_0(this.ize_1, null);
              suspendResult = this.jze_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_37(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.kze_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(useNavControllerEffect$slambda).q7e = function (completion) {
    return new useNavControllerEffect$slambda(this.hze_1, this.ize_1, completion);
  };
  function useNavControllerEffect$slambda_0($commandFlow, $navHostFn, resultContinuation) {
    var i = new useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation);
    var l = function ($completion) {
      return i.e8d($completion);
    };
    l.$arity = 0;
    return l;
  }
  function useStringProvider() {
    var di = useRequiredContext(get_DIContext());
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(di).k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(StringProviderJs), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var stringProvider = tmp.i5e(tmp$ret$0, null);
    // Inline function 'react.useMemo' call
    // Inline function 'kotlin.emptyArray' call
    var dependencies = [].slice();
    var callback = useStringProvider$lambda(stringProvider);
    return useMemo(callback, dependencies);
  }
  function useStringProvider$lambda($stringProvider) {
    return function () {
      return $stringProvider;
    };
  }
  function useViewModel(overrideSearchParams, viewModelFactory) {
    overrideSearchParams = overrideSearchParams === VOID ? null : overrideSearchParams;
    // Inline function 'js.array.JsTuple1.component1' call
    // Inline function 'kotlin.js.asDynamic' call
    var searchParams = useSearchParams()[0];
    var locationKey = useLocation().key;
    var viewModelAndKey$delegate = useState_0(useViewModel$lambda_1(overrideSearchParams, searchParams, viewModelFactory, locationKey));
    useEffect([locationKey], useViewModel$lambda_2(locationKey, viewModelFactory, searchParams, viewModelAndKey$delegate));
    return useViewModel$lambda(viewModelAndKey$delegate).lze_1;
  }
  function ViewModelAndKey(viewModel, locationKey) {
    this.lze_1 = viewModel;
    this.mze_1 = locationKey;
  }
  protoOf(ViewModelAndKey).toString = function () {
    return 'ViewModelAndKey(viewModel=' + this.lze_1 + ', locationKey=' + this.mze_1 + ')';
  };
  protoOf(ViewModelAndKey).hashCode = function () {
    var result = hashCode(this.lze_1);
    result = imul(result, 31) + getStringHashCode(this.mze_1) | 0;
    return result;
  };
  protoOf(ViewModelAndKey).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ViewModelAndKey))
      return false;
    var tmp0_other_with_cast = other instanceof ViewModelAndKey ? other : THROW_CCE();
    if (!equals(this.lze_1, tmp0_other_with_cast.lze_1))
      return false;
    if (!(this.mze_1 === tmp0_other_with_cast.mze_1))
      return false;
    return true;
  };
  function useViewModel$lambda($viewModelAndKey$delegate) {
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('viewModelAndKey', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $viewModelAndKey$delegate[0];
  }
  function useViewModel$lambda_0($viewModelAndKey$delegate, value) {
    getLocalDelegateReference('viewModelAndKey', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $viewModelAndKey$delegate[1](value);
    return Unit_instance;
  }
  function useViewModel$lambda_1($overrideSearchParams, $searchParams, $viewModelFactory, $locationKey) {
    return function () {
      var tmp = window.history;
      var tmp0_elvis_lhs = $overrideSearchParams;
      var savedStateHandle = new SavedStateHandle2(tmp, tmp0_elvis_lhs == null ? $searchParams : tmp0_elvis_lhs);
      // Inline function 'kotlin.also' call
      var this_0 = new ViewModelAndKey($viewModelFactory(savedStateHandle), $locationKey);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.hooks.useViewModel.<anonymous>.<anonymous>' call
      Napier_getInstance().n5k('Creating ViewModel: ' + getKClassFromExpression(this_0.lze_1).f7());
      return this_0;
    };
  }
  function useViewModel$lambda$lambda($viewModelAndKey$delegate) {
    return function () {
      Napier_getInstance().n5k('Close ViewModel: ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).lze_1).f7());
      useViewModel$lambda($viewModelAndKey$delegate).lze_1.n();
      return Unit_instance;
    };
  }
  function useViewModel$lambda_2($locationKey, $viewModelFactory, $searchParams, $viewModelAndKey$delegate) {
    return function ($this$useEffect) {
      var tmp;
      if (!(useViewModel$lambda($viewModelAndKey$delegate).mze_1 === $locationKey)) {
        useViewModel$lambda_0($viewModelAndKey$delegate, new ViewModelAndKey($viewModelFactory(new SavedStateHandle2(window.history, $searchParams)), $locationKey));
        Napier_getInstance().n5k('Recreating ViewModel ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).lze_1).f7());
        tmp = Unit_instance;
      }
      $this$useEffect.push(useViewModel$lambda$lambda($viewModelAndKey$delegate));
      return Unit_instance;
    };
  }
  function Companion_189() {
  }
  var Companion_instance_237;
  function Companion_getInstance_207() {
    return Companion_instance_237;
  }
  function UstadMobileSystemImpl(settings, langConfig, jsStringProvider) {
    UstadMobileSystemCommon.call(this, settings, langConfig);
    this.qnd_1 = jsStringProvider;
  }
  protoOf(UstadMobileSystemImpl).rnd = function (stringResource) {
    return stringResource.wl8(this.qnd_1, this.eou_1.aod_1);
  };
  protoOf(UstadMobileSystemImpl).snd = function (stringResource, args) {
    return stringResource.xl8(this.qnd_1, this.eou_1.aod_1, args.slice());
  };
  protoOf(UstadMobileSystemImpl).but = function (pluralsResource, number) {
    return format(pluralsResource, number, [number]).bl9(this.qnd_1);
  };
  protoOf(UstadMobileSystemImpl).nze = function (context, zip, $completion) {
    // Inline function 'kotlin.TODO' call
    var reason = 'not implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(UstadMobileSystemImpl).getAppSetupFile = function (context, zip, $completion) {
    return this.nze(context, zip, $completion);
  };
  protoOf(UstadMobileSystemImpl).oze = function (viewName, args, context, flags, ustadGoOptions) {
    throw IllegalStateException_init_$Create$('Not supported on JS anymore!');
  };
  protoOf(UstadMobileSystemImpl).go = function (viewName, args, context, flags, ustadGoOptions) {
    return this.oze(viewName, args, context, flags, ustadGoOptions);
  };
  function DomainDiModuleJs(endpointScope) {
    return Module_init_$Create$('DomainDiModuleJs', VOID, VOID, DomainDiModuleJs$lambda(endpointScope));
  }
  function DomainDiModuleJs$lambda$lambda($this$provider) {
    var tmp = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.i5e(tmp$ret$2, null);
    return new EnqueueImportContentEntryUseCaseRemote(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_0($this$provider) {
    return new OpenExternalLinkUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_1($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadNavController), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.i5e(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.i5e(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_8 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$7 = tmp_8.i5e(tmp$ret$6, null);
    return OnClickLinkUseCase_init_$Create$(tmp_1, tmp_4, tmp_7, tmp$ret$7);
  }
  function DomainDiModuleJs$lambda$lambda_2($this$singleton) {
    return new PhoneNumberUtilJs();
  }
  function DomainDiModuleJs$lambda$lambda_3($this$provider) {
    return new PhoneNumValidatorUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_4($this$provider) {
    return new OnClickPhoneNumUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_5($this$provider) {
    return new OnClickSendEmailUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_6($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, null);
    return new SetLanguageUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_7($this$singleton) {
    return new ChunkedUploadClientLocalUriUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_8($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, null);
    return new EnqueueSavePictureUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_9($this$singleton) {
    return new IsTempFileCheckerUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_10($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(IsTempFileCheckerUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, null);
    return new DeleteUrisUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_11($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.i5e(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.i5e(tmp$ret$4, 2);
    var tmp_8 = new CompressImageUseCaseJs();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(DeleteUrisUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.i5e(tmp$ret$6, null);
    return new SavePictureUseCase(tmp_1, null, tmp_4, tmp_7, tmp_8, tmp$ret$7);
  }
  function DomainDiModuleJs$lambda$lambda_12($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    var tmp_2 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.i5e(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.i5e(tmp$ret$4, 1);
    return new SaveLocalUrisAsBlobUseCaseJs(tmp_1, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_13($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.i5e(tmp$ret$2, null);
    return new ContentEntryGetMetaDataFromUriUseCaseJs(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_14($this$provider) {
    var tmp = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.i5e(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.i5e(tmp$ret$2, null);
    return new SetPasswordUseCaseJs(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_15($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_activeRepo = tmp.i5e(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp1_httpClient = tmp_1.i5e(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp2_json = tmp_3.i5e(tmp$ret$4, null).ioh_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XmlPullParserFactory), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp3_xppFactory = tmp_5.i5e(tmp$ret$6, 1);
    var tmp4_endpoint = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_7 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp5_resumeOrStartXapiSessionUseCase = tmp_7.i5e(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp6_accountManager = tmp_9.i5e(tmp$ret$10, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_11 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetApiUrlUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    var tmp7_getApiUrlUseCase = tmp_11.i5e(tmp$ret$12, null);
    return new ResolveXapiLaunchHrefUseCase(tmp0_activeRepo, tmp1_httpClient, tmp2_json, tmp3_xppFactory, tmp5_resumeOrStartXapiSessionUseCase, tmp7_getApiUrlUseCase, tmp6_accountManager, tmp4_endpoint);
  }
  function DomainDiModuleJs$lambda$lambda_16($this$singleton) {
    return new XapiJson();
  }
  function DomainDiModuleJs$lambda$lambda_17($this$singleton) {
    return new GetApiUrlUseCaseDirect($this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_18($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.i5e(tmp$ret$2, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.i5e(tmp$ret$4, null);
    return new ResumeOrStartXapiSessionUseCaseJs(tmp, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_19($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, null);
    return new LaunchXapiUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_20($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.i5e(tmp$ret$2, null);
    return new MoveContentEntriesUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_21($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, 2);
    return new DeleteContentEntryParentChildJoinUseCase(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_22($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, 2);
    return new RestoreDeletedItemUseCase(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_23($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, 2);
    return new DeletePermanentlyUseCase(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_24($this$singleton) {
    return new SetClipboardStringUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_25($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.i5e(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.i5e(tmp$ret$4, 2);
    return new SaveAndUploadLocalUrisUseCase(tmp_1, null, tmp_4, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_26($this$provider) {
    return new OpenBlobUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_27($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(OpenBlobUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.i5e(tmp$ret$2, null);
    return new OpenBlobUiUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_28($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.i5e(tmp$ret$2, 2);
    return new CancelRemoteContentEntryImportUseCase(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_29($this$singleton) {
    var tmp0_endpoint = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp1_httpClient = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp2_repo = tmp_1.i5e(tmp$ret$2, 2);
    return new DismissRemoteContentEntryImportErrorUseCase(tmp1_httpClient, tmp0_endpoint, tmp2_repo);
  }
  function DomainDiModuleJs$lambda$lambda_30($this$singleton) {
    return new XXStringHasherJs();
  }
  function DomainDiModuleJs$lambda$lambda_31($this$singleton) {
    return new XXHasher64FactoryJs();
  }
  function DomainDiModuleJs$lambda$lambda_32($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.i5e(tmp$ret$2, 2);
    return new StoreActivitiesUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_33($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.i5e(tmp$ret$2, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.i5e(tmp$ret$4, null);
    var tmp_8 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp_11 = tmp_9.i5e(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(XXHasher64Factory), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    var tmp_14 = tmp_12.i5e(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_15 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    var tmp$ret$11 = tmp_15.i5e(tmp$ret$10, null);
    return new XapiStatementResource(tmp_1, tmp_4, tmp_7, tmp_8, tmp_11, tmp_14, tmp$ret$11);
  }
  function DomainDiModuleJs$lambda$lambda_34($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.i5e(tmp$ret$0, null);
    return new SaveStatementOnClearUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_35($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.i5e(tmp$ret$0, null);
    return new SaveStatementOnUnloadUseCaseJs(tmp, tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_36($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveStatementOnClearUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.i5e(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.i5e(tmp$ret$4, null);
    return new NonInteractiveContentXapiStatementRecorderFactory(tmp_1, tmp_4, tmp$ret$5, $this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_37($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.i5e(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.i5e(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.k5e();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.i5e(tmp$ret$4, null);
    return new GetSubtitleTrackFromUriUseCaseJs(tmp, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda($endpointScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.t5c(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var this_0 = new ImplWithScope(tmp$ret$2, scope);
      var creator = DomainDiModuleJs$lambda$lambda;
      var tmp_2 = this_0.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(EnqueueImportContentEntryUseCaseRemote), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
      var tmp$ret$5 = new Provider(tmp_2, tmp$ret$4, creator);
      tmp_0.h5h(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.t5c(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_0 = DomainDiModuleJs$lambda$lambda_0;
      var tmp_6 = $this$$receiver.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(OpenExternalLinkUseCaseJs), arrayOf([]), false));
      var tmp$ret$8 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$9 = new Provider(tmp_6, tmp$ret$8, creator_0);
      tmp_5.h5h(tmp$ret$9);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_8 = typeToken(createKType(getKClass(OnClickLinkUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
      var tmp_9 = $this$$receiver.t5c(tmp$ret$10, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_1 = DomainDiModuleJs$lambda$lambda_1;
      var tmp_10 = $this$$receiver.h5c();
      var tmp_11 = $this$$receiver.g5c();
      var tmp_12 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(OnClickLinkUseCase), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      var tmp$ret$13 = new Singleton(tmp_10, tmp_11, tmp_12, tmp$ret$12, null, true, creator_1);
      tmp_9.h5h(tmp$ret$13);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_14 = typeToken(createKType(getKClass(IPhoneNumberUtil), arrayOf([]), false));
      var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
      var tmp_15 = $this$$receiver.t5c(tmp$ret$14, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_2 = DomainDiModuleJs$lambda$lambda_2;
      var tmp_16 = $this$$receiver.h5c();
      var tmp_17 = $this$$receiver.g5c();
      var tmp_18 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(PhoneNumberUtilJs), arrayOf([]), false));
      var tmp$ret$16 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      var tmp$ret$17 = new Singleton(tmp_16, tmp_17, tmp_18, tmp$ret$16, null, true, creator_2);
      tmp_15.h5h(tmp$ret$17);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_20 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
      var tmp$ret$18 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
      var tmp_21 = $this$$receiver.t5c(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_3 = DomainDiModuleJs$lambda$lambda_3;
      var tmp_22 = $this$$receiver.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_23 = typeToken(createKType(getKClass(PhoneNumValidatorUseCaseJs), arrayOf([]), false));
      var tmp$ret$20 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
      var tmp$ret$21 = new Provider(tmp_22, tmp$ret$20, creator_3);
      tmp_21.h5h(tmp$ret$21);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_24 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
      var tmp$ret$22 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
      var tmp_25 = $this$$receiver.t5c(tmp$ret$22, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_4 = DomainDiModuleJs$lambda$lambda_4;
      var tmp_26 = $this$$receiver.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_27 = typeToken(createKType(getKClass(OnClickPhoneNumUseCaseJs), arrayOf([]), false));
      var tmp$ret$24 = isInterface(tmp_27, TypeToken) ? tmp_27 : THROW_CCE();
      var tmp$ret$25 = new Provider(tmp_26, tmp$ret$24, creator_4);
      tmp_25.h5h(tmp$ret$25);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_28 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
      var tmp$ret$26 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
      var tmp_29 = $this$$receiver.t5c(tmp$ret$26, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_5 = DomainDiModuleJs$lambda$lambda_5;
      var tmp_30 = $this$$receiver.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(OnClickSendEmailUseCaseJs), arrayOf([]), false));
      var tmp$ret$28 = isInterface(tmp_31, TypeToken) ? tmp_31 : THROW_CCE();
      var tmp$ret$29 = new Provider(tmp_30, tmp$ret$28, creator_5);
      tmp_29.h5h(tmp$ret$29);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_32 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
      var tmp$ret$30 = isInterface(tmp_32, TypeToken) ? tmp_32 : THROW_CCE();
      var tmp_33 = $this$$receiver.t5c(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_6 = DomainDiModuleJs$lambda$lambda_6;
      var tmp_34 = $this$$receiver.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_35 = typeToken(createKType(getKClass(SetLanguageUseCaseJs), arrayOf([]), false));
      var tmp$ret$32 = isInterface(tmp_35, TypeToken) ? tmp_35 : THROW_CCE();
      var tmp$ret$33 = new Provider(tmp_34, tmp$ret$32, creator_6);
      tmp_33.h5h(tmp$ret$33);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
      var tmp$ret$34 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
      var tmp_37 = $this$$receiver.t5c(tmp$ret$34, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_7 = DomainDiModuleJs$lambda$lambda_7;
      var tmp_38 = $this$$receiver.h5c();
      var tmp_39 = $this$$receiver.g5c();
      var tmp_40 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_41 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$36 = isInterface(tmp_41, TypeToken) ? tmp_41 : THROW_CCE();
      var tmp$ret$37 = new Singleton(tmp_38, tmp_39, tmp_40, tmp$ret$36, null, true, creator_7);
      tmp_37.h5h(tmp$ret$37);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_42 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$38 = isInterface(tmp_42, TypeToken) ? tmp_42 : THROW_CCE();
      var tmp_43 = $this$$receiver.t5c(tmp$ret$38, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_44 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$40 = isInterface(tmp_44, TypeToken) ? tmp_44 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$40, scope_0);
      var creator_8 = DomainDiModuleJs$lambda$lambda_8;
      var tmp_45 = this_1.h5c();
      var tmp_46 = this_1.g5c();
      var tmp_47 = this_1.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_48 = typeToken(createKType(getKClass(EnqueueSavePictureUseCaseJs), arrayOf([]), false));
      var tmp$ret$42 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var tmp$ret$43 = new Singleton(tmp_45, tmp_46, tmp_47, tmp$ret$42, null, true, creator_8);
      tmp_43.h5h(tmp$ret$43);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_49 = typeToken(createKType(getKClass(IsTempFileCheckerUseCase), arrayOf([]), false));
      var tmp$ret$44 = isInterface(tmp_49, TypeToken) ? tmp_49 : THROW_CCE();
      var tmp_50 = $this$$receiver.t5c(tmp$ret$44, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_9 = DomainDiModuleJs$lambda$lambda_9;
      var tmp_51 = $this$$receiver.h5c();
      var tmp_52 = $this$$receiver.g5c();
      var tmp_53 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_54 = typeToken(createKType(getKClass(IsTempFileCheckerUseCaseJs), arrayOf([]), false));
      var tmp$ret$46 = isInterface(tmp_54, TypeToken) ? tmp_54 : THROW_CCE();
      var tmp$ret$47 = new Singleton(tmp_51, tmp_52, tmp_53, tmp$ret$46, null, true, creator_9);
      tmp_50.h5h(tmp$ret$47);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_55 = typeToken(createKType(getKClass(DeleteUrisUseCase), arrayOf([]), false));
      var tmp$ret$48 = isInterface(tmp_55, TypeToken) ? tmp_55 : THROW_CCE();
      var tmp_56 = $this$$receiver.t5c(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_10 = DomainDiModuleJs$lambda$lambda_10;
      var tmp_57 = $this$$receiver.h5c();
      var tmp_58 = $this$$receiver.g5c();
      var tmp_59 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_60 = typeToken(createKType(getKClass(DeleteUrisUseCaseJs), arrayOf([]), false));
      var tmp$ret$50 = isInterface(tmp_60, TypeToken) ? tmp_60 : THROW_CCE();
      var tmp$ret$51 = new Singleton(tmp_57, tmp_58, tmp_59, tmp$ret$50, null, true, creator_10);
      tmp_56.h5h(tmp$ret$51);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_61 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$52 = isInterface(tmp_61, TypeToken) ? tmp_61 : THROW_CCE();
      var tmp_62 = $this$$receiver.t5c(tmp$ret$52, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_1 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_63 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_63, TypeToken) ? tmp_63 : THROW_CCE();
      var this_2 = new ImplWithScope(tmp$ret$54, scope_1);
      var creator_11 = DomainDiModuleJs$lambda$lambda_11;
      var tmp_64 = this_2.h5c();
      var tmp_65 = this_2.g5c();
      var tmp_66 = this_2.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_67 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$56 = isInterface(tmp_67, TypeToken) ? tmp_67 : THROW_CCE();
      var tmp$ret$57 = new Singleton(tmp_64, tmp_65, tmp_66, tmp$ret$56, null, true, creator_11);
      tmp_62.h5h(tmp$ret$57);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_68 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_68, TypeToken) ? tmp_68 : THROW_CCE();
      var tmp_69 = $this$$receiver.t5c(tmp$ret$58, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_2 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_70 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_70, TypeToken) ? tmp_70 : THROW_CCE();
      var this_3 = new ImplWithScope(tmp$ret$60, scope_2);
      var creator_12 = DomainDiModuleJs$lambda$lambda_12;
      var tmp_71 = this_3.h5c();
      var tmp_72 = this_3.g5c();
      var tmp_73 = this_3.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_74 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_74, TypeToken) ? tmp_74 : THROW_CCE();
      var tmp$ret$63 = new Singleton(tmp_71, tmp_72, tmp_73, tmp$ret$62, null, true, creator_12);
      tmp_69.h5h(tmp$ret$63);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_75 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_75, TypeToken) ? tmp_75 : THROW_CCE();
      var tmp_76 = $this$$receiver.t5c(tmp$ret$64, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_13 = DomainDiModuleJs$lambda$lambda_13;
      var tmp_77 = $this$$receiver.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_78 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_78, TypeToken) ? tmp_78 : THROW_CCE();
      var tmp$ret$67 = new Provider(tmp_77, tmp$ret$66, creator_13);
      tmp_76.h5h(tmp$ret$67);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_79 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_79, TypeToken) ? tmp_79 : THROW_CCE();
      var tmp_80 = $this$$receiver.t5c(tmp$ret$68, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_3 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_81 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_81, TypeToken) ? tmp_81 : THROW_CCE();
      var this_4 = new ImplWithScope(tmp$ret$70, scope_3);
      var creator_14 = DomainDiModuleJs$lambda$lambda_14;
      var tmp_82 = this_4.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_83 = typeToken(createKType(getKClass(SetPasswordUseCaseJs), arrayOf([]), false));
      var tmp$ret$72 = isInterface(tmp_83, TypeToken) ? tmp_83 : THROW_CCE();
      var tmp$ret$73 = new Provider(tmp_82, tmp$ret$72, creator_14);
      tmp_80.h5h(tmp$ret$73);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_84 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
      var tmp$ret$74 = isInterface(tmp_84, TypeToken) ? tmp_84 : THROW_CCE();
      var tmp_85 = $this$$receiver.t5c(tmp$ret$74, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_4 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_86 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$76 = isInterface(tmp_86, TypeToken) ? tmp_86 : THROW_CCE();
      var this_5 = new ImplWithScope(tmp$ret$76, scope_4);
      var creator_15 = DomainDiModuleJs$lambda$lambda_15;
      var tmp_87 = this_5.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_88 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
      var tmp$ret$78 = isInterface(tmp_88, TypeToken) ? tmp_88 : THROW_CCE();
      var tmp$ret$79 = new Provider(tmp_87, tmp$ret$78, creator_15);
      tmp_85.h5h(tmp$ret$79);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_89 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$80 = isInterface(tmp_89, TypeToken) ? tmp_89 : THROW_CCE();
      var tmp_90 = $this$$receiver.t5c(tmp$ret$80, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_16 = DomainDiModuleJs$lambda$lambda_16;
      var tmp_91 = $this$$receiver.h5c();
      var tmp_92 = $this$$receiver.g5c();
      var tmp_93 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_94 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$82 = isInterface(tmp_94, TypeToken) ? tmp_94 : THROW_CCE();
      var tmp$ret$83 = new Singleton(tmp_91, tmp_92, tmp_93, tmp$ret$82, null, true, creator_16);
      tmp_90.h5h(tmp$ret$83);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_95 = typeToken(createKType(getKClass(GetApiUrlUseCase), arrayOf([]), false));
      var tmp$ret$84 = isInterface(tmp_95, TypeToken) ? tmp_95 : THROW_CCE();
      var tmp_96 = $this$$receiver.t5c(tmp$ret$84, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_5 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_97 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$86 = isInterface(tmp_97, TypeToken) ? tmp_97 : THROW_CCE();
      var this_6 = new ImplWithScope(tmp$ret$86, scope_5);
      var creator_17 = DomainDiModuleJs$lambda$lambda_17;
      var tmp_98 = this_6.h5c();
      var tmp_99 = this_6.g5c();
      var tmp_100 = this_6.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_101 = typeToken(createKType(getKClass(GetApiUrlUseCaseDirect), arrayOf([]), false));
      var tmp$ret$88 = isInterface(tmp_101, TypeToken) ? tmp_101 : THROW_CCE();
      var tmp$ret$89 = new Singleton(tmp_98, tmp_99, tmp_100, tmp$ret$88, null, true, creator_17);
      tmp_96.h5h(tmp$ret$89);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_102 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCase), arrayOf([]), false));
      var tmp$ret$90 = isInterface(tmp_102, TypeToken) ? tmp_102 : THROW_CCE();
      var tmp_103 = $this$$receiver.t5c(tmp$ret$90, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_6 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_104 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$92 = isInterface(tmp_104, TypeToken) ? tmp_104 : THROW_CCE();
      var this_7 = new ImplWithScope(tmp$ret$92, scope_6);
      var creator_18 = DomainDiModuleJs$lambda$lambda_18;
      var tmp_105 = this_7.h5c();
      var tmp_106 = this_7.g5c();
      var tmp_107 = this_7.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_108 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCaseJs), arrayOf([]), false));
      var tmp$ret$94 = isInterface(tmp_108, TypeToken) ? tmp_108 : THROW_CCE();
      var tmp$ret$95 = new Singleton(tmp_105, tmp_106, tmp_107, tmp$ret$94, null, true, creator_18);
      tmp_103.h5h(tmp$ret$95);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_109 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
      var tmp$ret$96 = isInterface(tmp_109, TypeToken) ? tmp_109 : THROW_CCE();
      var tmp_110 = $this$$receiver.t5c(tmp$ret$96, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_7 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_111 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$98 = isInterface(tmp_111, TypeToken) ? tmp_111 : THROW_CCE();
      var this_8 = new ImplWithScope(tmp$ret$98, scope_7);
      var creator_19 = DomainDiModuleJs$lambda$lambda_19;
      var tmp_112 = this_8.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_113 = typeToken(createKType(getKClass(LaunchXapiUseCaseJs), arrayOf([]), false));
      var tmp$ret$100 = isInterface(tmp_113, TypeToken) ? tmp_113 : THROW_CCE();
      var tmp$ret$101 = new Provider(tmp_112, tmp$ret$100, creator_19);
      tmp_110.h5h(tmp$ret$101);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_114 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
      var tmp$ret$102 = isInterface(tmp_114, TypeToken) ? tmp_114 : THROW_CCE();
      var tmp_115 = $this$$receiver.t5c(tmp$ret$102, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_116 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$104 = isInterface(tmp_116, TypeToken) ? tmp_116 : THROW_CCE();
      var this_9 = new ImplWithScope(tmp$ret$104, scope_8);
      var creator_20 = DomainDiModuleJs$lambda$lambda_20;
      var tmp_117 = this_9.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_118 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
      var tmp$ret$106 = isInterface(tmp_118, TypeToken) ? tmp_118 : THROW_CCE();
      var tmp$ret$107 = new Provider(tmp_117, tmp$ret$106, creator_20);
      tmp_115.h5h(tmp$ret$107);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_119 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
      var tmp$ret$108 = isInterface(tmp_119, TypeToken) ? tmp_119 : THROW_CCE();
      var tmp_120 = $this$$receiver.t5c(tmp$ret$108, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_121 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$110 = isInterface(tmp_121, TypeToken) ? tmp_121 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$110, scope_9);
      var creator_21 = DomainDiModuleJs$lambda$lambda_21;
      var tmp_122 = this_10.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_123 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
      var tmp$ret$112 = isInterface(tmp_123, TypeToken) ? tmp_123 : THROW_CCE();
      var tmp$ret$113 = new Provider(tmp_122, tmp$ret$112, creator_21);
      tmp_120.h5h(tmp$ret$113);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_124 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
      var tmp$ret$114 = isInterface(tmp_124, TypeToken) ? tmp_124 : THROW_CCE();
      var tmp_125 = $this$$receiver.t5c(tmp$ret$114, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_126 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$116 = isInterface(tmp_126, TypeToken) ? tmp_126 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$116, scope_10);
      var creator_22 = DomainDiModuleJs$lambda$lambda_22;
      var tmp_127 = this_11.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_128 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
      var tmp$ret$118 = isInterface(tmp_128, TypeToken) ? tmp_128 : THROW_CCE();
      var tmp$ret$119 = new Provider(tmp_127, tmp$ret$118, creator_22);
      tmp_125.h5h(tmp$ret$119);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_129 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
      var tmp$ret$120 = isInterface(tmp_129, TypeToken) ? tmp_129 : THROW_CCE();
      var tmp_130 = $this$$receiver.t5c(tmp$ret$120, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_11 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_131 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$122 = isInterface(tmp_131, TypeToken) ? tmp_131 : THROW_CCE();
      var this_12 = new ImplWithScope(tmp$ret$122, scope_11);
      var creator_23 = DomainDiModuleJs$lambda$lambda_23;
      var tmp_132 = this_12.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_133 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
      var tmp$ret$124 = isInterface(tmp_133, TypeToken) ? tmp_133 : THROW_CCE();
      var tmp$ret$125 = new Provider(tmp_132, tmp$ret$124, creator_23);
      tmp_130.h5h(tmp$ret$125);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_134 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
      var tmp$ret$126 = isInterface(tmp_134, TypeToken) ? tmp_134 : THROW_CCE();
      var tmp_135 = $this$$receiver.t5c(tmp$ret$126, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_24 = DomainDiModuleJs$lambda$lambda_24;
      var tmp_136 = $this$$receiver.h5c();
      var tmp_137 = $this$$receiver.g5c();
      var tmp_138 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_139 = typeToken(createKType(getKClass(SetClipboardStringUseCaseJs), arrayOf([]), false));
      var tmp$ret$128 = isInterface(tmp_139, TypeToken) ? tmp_139 : THROW_CCE();
      var tmp$ret$129 = new Singleton(tmp_136, tmp_137, tmp_138, tmp$ret$128, null, true, creator_24);
      tmp_135.h5h(tmp$ret$129);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_140 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$130 = isInterface(tmp_140, TypeToken) ? tmp_140 : THROW_CCE();
      var tmp_141 = $this$$receiver.t5c(tmp$ret$130, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_12 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_142 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$132 = isInterface(tmp_142, TypeToken) ? tmp_142 : THROW_CCE();
      var this_13 = new ImplWithScope(tmp$ret$132, scope_12);
      var creator_25 = DomainDiModuleJs$lambda$lambda_25;
      var tmp_143 = this_13.h5c();
      var tmp_144 = this_13.g5c();
      var tmp_145 = this_13.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_146 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$134 = isInterface(tmp_146, TypeToken) ? tmp_146 : THROW_CCE();
      var tmp$ret$135 = new Singleton(tmp_143, tmp_144, tmp_145, tmp$ret$134, null, true, creator_25);
      tmp_141.h5h(tmp$ret$135);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_147 = typeToken(createKType(getKClass(OpenBlobUseCase), arrayOf([]), false));
      var tmp$ret$136 = isInterface(tmp_147, TypeToken) ? tmp_147 : THROW_CCE();
      var tmp_148 = $this$$receiver.t5c(tmp$ret$136, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_13 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_149 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$138 = isInterface(tmp_149, TypeToken) ? tmp_149 : THROW_CCE();
      var this_14 = new ImplWithScope(tmp$ret$138, scope_13);
      var creator_26 = DomainDiModuleJs$lambda$lambda_26;
      var tmp_150 = this_14.g5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_151 = typeToken(createKType(getKClass(OpenBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$140 = isInterface(tmp_151, TypeToken) ? tmp_151 : THROW_CCE();
      var tmp$ret$141 = new Provider(tmp_150, tmp$ret$140, creator_26);
      tmp_148.h5h(tmp$ret$141);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_152 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$142 = isInterface(tmp_152, TypeToken) ? tmp_152 : THROW_CCE();
      var tmp_153 = $this$$receiver.t5c(tmp$ret$142, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_14 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_154 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$144 = isInterface(tmp_154, TypeToken) ? tmp_154 : THROW_CCE();
      var this_15 = new ImplWithScope(tmp$ret$144, scope_14);
      var creator_27 = DomainDiModuleJs$lambda$lambda_27;
      var tmp_155 = this_15.h5c();
      var tmp_156 = this_15.g5c();
      var tmp_157 = this_15.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_158 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$146 = isInterface(tmp_158, TypeToken) ? tmp_158 : THROW_CCE();
      var tmp$ret$147 = new Singleton(tmp_155, tmp_156, tmp_157, tmp$ret$146, null, true, creator_27);
      tmp_153.h5h(tmp$ret$147);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_159 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$148 = isInterface(tmp_159, TypeToken) ? tmp_159 : THROW_CCE();
      var tmp_160 = $this$$receiver.t5c(tmp$ret$148, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_15 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_161 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$150 = isInterface(tmp_161, TypeToken) ? tmp_161 : THROW_CCE();
      var this_16 = new ImplWithScope(tmp$ret$150, scope_15);
      var creator_28 = DomainDiModuleJs$lambda$lambda_28;
      var tmp_162 = this_16.h5c();
      var tmp_163 = this_16.g5c();
      var tmp_164 = this_16.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_165 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$152 = isInterface(tmp_165, TypeToken) ? tmp_165 : THROW_CCE();
      var tmp$ret$153 = new Singleton(tmp_162, tmp_163, tmp_164, tmp$ret$152, null, true, creator_28);
      tmp_160.h5h(tmp$ret$153);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_166 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$154 = isInterface(tmp_166, TypeToken) ? tmp_166 : THROW_CCE();
      var tmp_167 = $this$$receiver.t5c(tmp$ret$154, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_16 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_168 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$156 = isInterface(tmp_168, TypeToken) ? tmp_168 : THROW_CCE();
      var this_17 = new ImplWithScope(tmp$ret$156, scope_16);
      var creator_29 = DomainDiModuleJs$lambda$lambda_29;
      var tmp_169 = this_17.h5c();
      var tmp_170 = this_17.g5c();
      var tmp_171 = this_17.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_172 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$158 = isInterface(tmp_172, TypeToken) ? tmp_172 : THROW_CCE();
      var tmp$ret$159 = new Singleton(tmp_169, tmp_170, tmp_171, tmp$ret$158, null, true, creator_29);
      tmp_167.h5h(tmp$ret$159);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_173 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
      var tmp$ret$160 = isInterface(tmp_173, TypeToken) ? tmp_173 : THROW_CCE();
      var tmp_174 = $this$$receiver.t5c(tmp$ret$160, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_30 = DomainDiModuleJs$lambda$lambda_30;
      var tmp_175 = $this$$receiver.h5c();
      var tmp_176 = $this$$receiver.g5c();
      var tmp_177 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_178 = typeToken(createKType(getKClass(XXStringHasherJs), arrayOf([]), false));
      var tmp$ret$162 = isInterface(tmp_178, TypeToken) ? tmp_178 : THROW_CCE();
      var tmp$ret$163 = new Singleton(tmp_175, tmp_176, tmp_177, tmp$ret$162, null, true, creator_30);
      tmp_174.h5h(tmp$ret$163);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_179 = typeToken(createKType(getKClass(XXHasher64Factory), arrayOf([]), false));
      var tmp$ret$164 = isInterface(tmp_179, TypeToken) ? tmp_179 : THROW_CCE();
      var tmp_180 = $this$$receiver.t5c(tmp$ret$164, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_31 = DomainDiModuleJs$lambda$lambda_31;
      var tmp_181 = $this$$receiver.h5c();
      var tmp_182 = $this$$receiver.g5c();
      var tmp_183 = $this$$receiver.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_184 = typeToken(createKType(getKClass(XXHasher64FactoryJs), arrayOf([]), false));
      var tmp$ret$166 = isInterface(tmp_184, TypeToken) ? tmp_184 : THROW_CCE();
      var tmp$ret$167 = new Singleton(tmp_181, tmp_182, tmp_183, tmp$ret$166, null, true, creator_31);
      tmp_180.h5h(tmp$ret$167);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_185 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$168 = isInterface(tmp_185, TypeToken) ? tmp_185 : THROW_CCE();
      var tmp_186 = $this$$receiver.t5c(tmp$ret$168, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_17 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_187 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$170 = isInterface(tmp_187, TypeToken) ? tmp_187 : THROW_CCE();
      var this_18 = new ImplWithScope(tmp$ret$170, scope_17);
      var creator_32 = DomainDiModuleJs$lambda$lambda_32;
      var tmp_188 = this_18.h5c();
      var tmp_189 = this_18.g5c();
      var tmp_190 = this_18.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_191 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$172 = isInterface(tmp_191, TypeToken) ? tmp_191 : THROW_CCE();
      var tmp$ret$173 = new Singleton(tmp_188, tmp_189, tmp_190, tmp$ret$172, null, true, creator_32);
      tmp_186.h5h(tmp$ret$173);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_192 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$174 = isInterface(tmp_192, TypeToken) ? tmp_192 : THROW_CCE();
      var tmp_193 = $this$$receiver.t5c(tmp$ret$174, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_18 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_194 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$176 = isInterface(tmp_194, TypeToken) ? tmp_194 : THROW_CCE();
      var this_19 = new ImplWithScope(tmp$ret$176, scope_18);
      var creator_33 = DomainDiModuleJs$lambda$lambda_33;
      var tmp_195 = this_19.h5c();
      var tmp_196 = this_19.g5c();
      var tmp_197 = this_19.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_198 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$178 = isInterface(tmp_198, TypeToken) ? tmp_198 : THROW_CCE();
      var tmp$ret$179 = new Singleton(tmp_195, tmp_196, tmp_197, tmp$ret$178, null, true, creator_33);
      tmp_193.h5h(tmp$ret$179);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_199 = typeToken(createKType(getKClass(SaveStatementOnClearUseCase), arrayOf([]), false));
      var tmp$ret$180 = isInterface(tmp_199, TypeToken) ? tmp_199 : THROW_CCE();
      var tmp_200 = $this$$receiver.t5c(tmp$ret$180, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_19 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_201 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$182 = isInterface(tmp_201, TypeToken) ? tmp_201 : THROW_CCE();
      var this_20 = new ImplWithScope(tmp$ret$182, scope_19);
      var creator_34 = DomainDiModuleJs$lambda$lambda_34;
      var tmp_202 = this_20.h5c();
      var tmp_203 = this_20.g5c();
      var tmp_204 = this_20.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_205 = typeToken(createKType(getKClass(SaveStatementOnClearUseCaseJs), arrayOf([]), false));
      var tmp$ret$184 = isInterface(tmp_205, TypeToken) ? tmp_205 : THROW_CCE();
      var tmp$ret$185 = new Singleton(tmp_202, tmp_203, tmp_204, tmp$ret$184, null, true, creator_34);
      tmp_200.h5h(tmp$ret$185);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_206 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCase), arrayOf([]), false));
      var tmp$ret$186 = isInterface(tmp_206, TypeToken) ? tmp_206 : THROW_CCE();
      var tmp_207 = $this$$receiver.t5c(tmp$ret$186, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_20 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_208 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$188 = isInterface(tmp_208, TypeToken) ? tmp_208 : THROW_CCE();
      var this_21 = new ImplWithScope(tmp$ret$188, scope_20);
      var creator_35 = DomainDiModuleJs$lambda$lambda_35;
      var tmp_209 = this_21.h5c();
      var tmp_210 = this_21.g5c();
      var tmp_211 = this_21.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_212 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCaseJs), arrayOf([]), false));
      var tmp$ret$190 = isInterface(tmp_212, TypeToken) ? tmp_212 : THROW_CCE();
      var tmp$ret$191 = new Singleton(tmp_209, tmp_210, tmp_211, tmp$ret$190, null, true, creator_35);
      tmp_207.h5h(tmp$ret$191);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_213 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$192 = isInterface(tmp_213, TypeToken) ? tmp_213 : THROW_CCE();
      var tmp_214 = $this$$receiver.t5c(tmp$ret$192, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_21 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_215 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$194 = isInterface(tmp_215, TypeToken) ? tmp_215 : THROW_CCE();
      var this_22 = new ImplWithScope(tmp$ret$194, scope_21);
      var creator_36 = DomainDiModuleJs$lambda$lambda_36;
      var tmp_216 = this_22.h5c();
      var tmp_217 = this_22.g5c();
      var tmp_218 = this_22.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_219 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$196 = isInterface(tmp_219, TypeToken) ? tmp_219 : THROW_CCE();
      var tmp$ret$197 = new Singleton(tmp_216, tmp_217, tmp_218, tmp$ret$196, null, true, creator_36);
      tmp_214.h5h(tmp$ret$197);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_220 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
      var tmp$ret$198 = isInterface(tmp_220, TypeToken) ? tmp_220 : THROW_CCE();
      var tmp_221 = $this$$receiver.t5c(tmp$ret$198, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_22 = Companion_getInstance_18().imr_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_222 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$200 = isInterface(tmp_222, TypeToken) ? tmp_222 : THROW_CCE();
      var this_23 = new ImplWithScope(tmp$ret$200, scope_22);
      var creator_37 = DomainDiModuleJs$lambda$lambda_37;
      var tmp_223 = this_23.h5c();
      var tmp_224 = this_23.g5c();
      var tmp_225 = this_23.i5c();
      // Inline function 'org.kodein.type.generic' call
      var tmp_226 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$202 = isInterface(tmp_226, TypeToken) ? tmp_226 : THROW_CCE();
      var tmp$ret$203 = new Singleton(tmp_223, tmp_224, tmp_225, tmp$ret$202, null, true, creator_37);
      tmp_221.h5h(tmp$ret$203);
      return Unit_instance;
    };
  }
  function StringProviderJs(locale, jsStringProvider) {
    this.pze_1 = locale;
    this.qze_1 = jsStringProvider;
  }
  protoOf(StringProviderJs).gox = function (stringResource) {
    return stringResource.wl8(this.qze_1, this.pze_1);
  };
  protoOf(StringProviderJs).rze = function (stringResource, args) {
    return stringResource.xl8(this.qze_1, this.pze_1, args.slice());
  };
  function isRemote(_this__u8e3s4, $completion) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var prefix = substringBefore_0(toString(_this__u8e3s4.v78_1), '//').toLowerCase();
    return startsWith(prefix, 'http:') ? true : startsWith(prefix, 'https:');
  }
  function setStateKey(_this__u8e3s4, $this, key, value) {
    var tmp0_safe_receiver = _this__u8e3s4.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_elvis_lhs = tmp;
    var newState = tmp1_elvis_lhs == null ? json([]) : tmp1_elvis_lhs;
    newState[key] = value;
    _this__u8e3s4.replaceState(newState, '');
  }
  function Companion_190() {
    this.sze_1 = '_handleId';
  }
  var Companion_instance_238;
  function Companion_getInstance_208() {
    return Companion_instance_238;
  }
  function SavedStateHandle2(history, searchParams) {
    this.tze_1 = history;
    this.uze_1 = searchParams;
    var storedHandleId = this.ba('_handleId');
    if (storedHandleId == null) {
      this.vze_1 = Default_getInstance_0().fg().toString();
      setStateKey(this.tze_1, this, '_handleId', this.vze_1);
    } else {
      this.vze_1 = storedHandleId;
    }
  }
  protoOf(SavedStateHandle2).qp7 = function (key, value) {
    var tmp0_safe_receiver = this.tze_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver._handleId) != this.vze_1) {
      throw IllegalStateException_init_$Create$('SavedState cannot save values after the user has changed page');
    }
    if (!(value == null)) {
      setStateKey(this.tze_1, this, key, value);
    }
  };
  protoOf(SavedStateHandle2).ba = function (key) {
    var tmp0_safe_receiver = this.tze_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver[key];
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toString(tmp2_safe_receiver);
    return tmp3_elvis_lhs == null ? this.uze_1.get(key) : tmp3_elvis_lhs;
  };
  function ClazzLogCreatorManagerJs() {
  }
  protoOf(ClazzLogCreatorManagerJs).ip0 = function (clazzUid, endpointUrl, fromTime, toTime) {
  };
  function UrlKmp(url) {
    return new UrlKmpJs(new URL(url));
  }
  function UrlKmpJs(url) {
    this.wze_1 = url;
  }
  protoOf(UrlKmpJs).toString = function () {
    return toString(this.wze_1);
  };
  protoOf(UrlKmpJs).bnw = function (path) {
    return new UrlKmpJs(new URL(path, toString(this.wze_1)));
  };
  function Companion_191() {
  }
  protoOf(Companion_191).op1 = function (text) {
    return encodeURIComponent(text);
  };
  protoOf(Companion_191).np1 = function (text) {
    return decodeURIComponent(text);
  };
  var Companion_instance_239;
  function Companion_getInstance_209() {
    return Companion_instance_239;
  }
  function UstadAntilog(defaultTag) {
    defaultTag = defaultTag === VOID ? 'NoTag' : defaultTag;
    Antilog.call(this);
    this.xze_1 = defaultTag;
  }
  protoOf(UstadAntilog).y5j = function (priority, tag) {
    var tmp;
    var tmp_0;
    if (tag === 'DoorLog') {
      tmp_0 = priority.equals(LogLevel_DEBUG_getInstance()) ? true : priority.equals(LogLevel_VERBOSE_getInstance());
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = false;
    } else {
      tmp = true;
    }
    return tmp;
  };
  protoOf(UstadAntilog).a5k = function (priority, tag, throwable, message) {
    var logTag = tag == null ? this.xze_1 : tag;
    var tmp;
    if (!(message == null)) {
      var tmp_0;
      if (!(throwable == null)) {
        tmp_0 = '' + message + '\n' + throwable.message;
      } else {
        tmp_0 = message;
      }
      tmp = tmp_0;
    } else {
      var tmp2_elvis_lhs = throwable == null ? null : throwable.message;
      var tmp_1;
      if (tmp2_elvis_lhs == null) {
        return Unit_instance;
      } else {
        tmp_1 = tmp2_elvis_lhs;
      }
      tmp = tmp_1;
    }
    var fullMessage = tmp;
    switch (priority.za_1) {
      case 0:
        console.log('VERBOSE ' + logTag + ' : ' + fullMessage);
        break;
      case 1:
        console.log('DEBUG ' + logTag + ' : ' + fullMessage);
        break;
      case 2:
        console.info('INFO ' + logTag + ' : ' + fullMessage);
        break;
      case 3:
        console.warn('WARNING ' + logTag + ' : ' + fullMessage);
        break;
      case 4:
        console.error('ERROR ' + logTag + ' : ' + fullMessage);
        break;
      case 5:
        console.error('ASSERT ' + logTag + ' : ' + fullMessage);
        break;
    }
  };
  function forEach(_this__u8e3s4, block) {
    var collection = _this__u8e3s4;
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        block(collection[i]);
      }
       while (inductionVariable < last);
  }
  function bodyAsDecodedText(_this__u8e3s4, $completion) {
    return bodyAsText(_this__u8e3s4, VOID, $completion);
  }
  function rgbColorProperty(_this__u8e3s4) {
    // Inline function 'web.cssom.rgb' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return 'rgb(' + (_this__u8e3s4 >> 24 & 255) + ' ' + (_this__u8e3s4 >> 16 & 255) + ' ' + (_this__u8e3s4 >> 8 & 255) + ')';
  }
  function asWindowTarget(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 0:
        // Inline function 'web.window.WindowTarget.Companion._blank' call

        0;
        tmp = '_blank';
        break;
      case 1:
        // Inline function 'web.window.WindowTarget.Companion._top' call

        0;
        tmp = '_top';
        break;
      case 2:
        // Inline function 'web.window.WindowTarget.Companion._self' call

        0;
        tmp = '_self';
        break;
      case 3:
        // Inline function 'web.window.WindowTarget.Companion._blank' call

        0;
        tmp = '_blank';
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function getOrPut(_this__u8e3s4, key, block) {
    var tmp0_elvis_lhs = _this__u8e3s4.getItem(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      // Inline function 'kotlin.also' call
      var this_0 = block();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.getOrPut.<anonymous>' call
      _this__u8e3s4.setItem(key, this_0);
      tmp = this_0;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function htmlToPlainText(_this__u8e3s4) {
    var element = document.createElement('div');
    element.innerHTML = replace(replace(replace(_this__u8e3s4, '<br/>', ' '), '<br>', ' '), '<\/p><p>', ' ');
    return element.innerText;
  }
  function JsHeaderStringValuesAdapter(headers) {
    this.yze_1 = headers;
  }
  protoOf(JsHeaderStringValuesAdapter).r2p = function (key) {
    var tmp0_safe_receiver = this.yze_1.get(key);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, [',']);
    return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
  };
  protoOf(JsHeaderStringValuesAdapter).s2p = function () {
    return toSet_0(this.yze_1.keys());
  };
  function asIStringValues_0(_this__u8e3s4) {
    return new JsHeaderStringValuesAdapter(_this__u8e3s4);
  }
  function randomUuidAsString() {
    var tmp;
    // Inline function 'com.ustadmobile.core.wrappers.window.isSecureContext' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp_0 = window.isSecureContext;
    if ((!(tmp_0 == null) ? typeof tmp_0 === 'boolean' : false) ? tmp_0 : THROW_CCE()) {
      tmp = crypto.randomUUID();
    } else {
      tmp = v4();
    }
    return tmp;
  }
  //region block: post-declaration
  protoOf(AuthManager).h5d = get_diContext;
  protoOf(AuthManager).i5d = get_diTrigger;
  protoOf($serializer).q4m = typeParametersSerializers;
  protoOf($serializer_0).q4m = typeParametersSerializers;
  protoOf($serializer_1).q4m = typeParametersSerializers;
  protoOf($serializer_2).q4m = typeParametersSerializers;
  protoOf($serializer_3).q4m = typeParametersSerializers;
  protoOf($serializer_4).q4m = typeParametersSerializers;
  protoOf($serializer_5).q4m = typeParametersSerializers;
  protoOf($serializer_6).q4m = typeParametersSerializers;
  protoOf($serializer_7).q4m = typeParametersSerializers;
  protoOf($serializer_8).q4m = typeParametersSerializers;
  protoOf($serializer_9).q4m = typeParametersSerializers;
  protoOf($serializer_10).q4m = typeParametersSerializers;
  protoOf($serializer_11).q4m = typeParametersSerializers;
  protoOf($serializer_12).q4m = typeParametersSerializers;
  protoOf($serializer_13).q4m = typeParametersSerializers;
  protoOf($serializer_14).q4m = typeParametersSerializers;
  protoOf($serializer_15).q4m = typeParametersSerializers;
  protoOf($serializer_16).q4m = typeParametersSerializers;
  protoOf($serializer_17).q4m = typeParametersSerializers;
  protoOf($serializer_18).q4m = typeParametersSerializers;
  protoOf($serializer_19).q4m = typeParametersSerializers;
  protoOf($serializer_20).q4m = typeParametersSerializers;
  protoOf($serializer_21).q4m = typeParametersSerializers;
  protoOf($serializer_22).q4m = typeParametersSerializers;
  protoOf($serializer_23).q4m = typeParametersSerializers;
  protoOf($serializer_24).q4m = typeParametersSerializers;
  protoOf($serializer_25).q4m = typeParametersSerializers;
  protoOf($serializer_26).q4m = typeParametersSerializers;
  protoOf($serializer_27).q4m = typeParametersSerializers;
  protoOf($serializer_28).q4m = typeParametersSerializers;
  protoOf($serializer_29).q4m = typeParametersSerializers;
  protoOf($serializer_30).q4m = typeParametersSerializers;
  protoOf($serializer_31).q4m = typeParametersSerializers;
  protoOf($serializer_32).q4m = typeParametersSerializers;
  protoOf($serializer_33).q4m = typeParametersSerializers;
  protoOf($serializer_34).q4m = typeParametersSerializers;
  protoOf($serializer_35).q4m = typeParametersSerializers;
  protoOf($serializer_36).q4m = typeParametersSerializers;
  protoOf($serializer_37).q4m = typeParametersSerializers;
  protoOf($serializer_38).q4m = typeParametersSerializers;
  protoOf($serializer_39).q4m = typeParametersSerializers;
  protoOf($serializer_40).q4m = typeParametersSerializers;
  protoOf($serializer_41).q4m = typeParametersSerializers;
  protoOf($serializer_42).q4m = typeParametersSerializers;
  protoOf($serializer_43).q4m = typeParametersSerializers;
  protoOf($serializer_44).q4m = typeParametersSerializers;
  protoOf($serializer_45).q4m = typeParametersSerializers;
  protoOf($serializer_46).q4m = typeParametersSerializers;
  protoOf($serializer_47).q4m = typeParametersSerializers;
  protoOf($serializer_48).q4m = typeParametersSerializers;
  protoOf($serializer_49).q4m = typeParametersSerializers;
  protoOf($serializer_50).q4m = typeParametersSerializers;
  protoOf($serializer_51).q4m = typeParametersSerializers;
  protoOf($serializer_52).q4m = typeParametersSerializers;
  protoOf(CommandFlowUstadNavController).fo0 = navigate$default;
  protoOf(UstadViewModel).h5d = get_diContext;
  protoOf(UstadViewModel).i5d = get_diTrigger;
  protoOf($serializer_53).q4m = typeParametersSerializers;
  protoOf($serializer_54).q4m = typeParametersSerializers;
  protoOf($serializer_55).q4m = typeParametersSerializers;
  protoOf($serializer_56).q4m = typeParametersSerializers;
  protoOf($serializer_57).q4m = typeParametersSerializers;
  protoOf($serializer_58).q4m = typeParametersSerializers;
  protoOf(SaveLocalUrisAsBlobUseCaseJs).nnl = invoke$default;
  protoOf(CompressImageUseCaseJs).znn = invoke$default_2;
  protoOf(GetSubtitleTrackFromUriUseCaseJs).mnx = invoke$default_3;
  protoOf(SetLanguageUseCaseJs).eo9 = invoke$default_4;
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).loe = invoke$default_5;
  //endregion
  //region block: init
  Companion_instance_47 = new Companion();
  Companion_instance_49 = new Companion_1();
  Companion_instance_50 = new Companion_2();
  Companion_instance_52 = new Companion_4();
  Companion_instance_53 = new Companion_5();
  Companion_instance_54 = new Companion_6();
  BodySerializer_instance = new BodySerializer();
  Companion_instance_55 = new Companion_7();
  Companion_instance_56 = new Companion_8();
  Companion_instance_57 = new Companion_9();
  Companion_instance_59 = new Companion_11();
  Companion_instance_64 = new Companion_16();
  Companion_instance_65 = new Companion_17();
  Companion_instance_66 = new Companion_18();
  Companion_instance_67 = new Companion_19();
  Companion_instance_68 = new Companion_20();
  Companion_instance_69 = new Companion_21();
  Companion_instance_70 = new Companion_22();
  Companion_instance_72 = new Companion_24();
  Companion_instance_74 = new Companion_26();
  Companion_instance_79 = new Companion_31();
  Companion_instance_80 = new Companion_32();
  Companion_instance_81 = new Companion_33();
  Companion_instance_82 = new Companion_34();
  Companion_instance_83 = new Companion_35();
  Companion_instance_84 = new Companion_36();
  Companion_instance_86 = new Companion_38();
  Companion_instance_87 = new Companion_39();
  Companion_instance_88 = new Companion_40();
  Companion_instance_89 = new Companion_41();
  Companion_instance_91 = new Companion_43();
  Companion_instance_92 = new Companion_44();
  Companion_instance_93 = new Companion_45();
  Companion_instance_94 = new Companion_46();
  Companion_instance_95 = new Companion_47();
  Companion_instance_96 = new Companion_48();
  Companion_instance_97 = new Companion_49();
  Companion_instance_98 = new Companion_50();
  Companion_instance_99 = new Companion_51();
  HEADER_UPLOAD_UUID = 'upload-uuid';
  HEADER_IS_FINAL_CHUNK = 'upload-final-chunk';
  HEADER_UPLOAD_START_BYTE = 'upload-start-byte';
  DEFAULT_CHUNK_SIZE = 524288;
  Companion_instance_103 = new Companion_55();
  Companion_instance_106 = new Companion_58();
  Companion_instance_107 = new Companion_59();
  Companion_instance_109 = new Companion_61();
  XapiInteractionTypeSerializer_instance = new XapiInteractionTypeSerializer();
  XapiObjectTypeSerializer_instance = new XapiObjectTypeSerializer();
  Companion_instance_114 = new Companion_66();
  XAPI_RESULT_EXTENSION_PROGRESS = 'https://w3id.org/xapi/cmi5/result/extensions/progress';
  Companion_instance_117 = new Companion_69();
  Companion_instance_118 = new Companion_70();
  VERB_COMPLETED = 'http://adlnet.gov/expapi/verbs/completed';
  VERB_PROGRESSED = 'http://adlnet.gov/expapi/verbs/progressed';
  Companion_instance_124 = new Companion_76();
  Companion_instance_125 = new Companion_77();
  Companion_instance_127 = new Companion_79();
  DiTag_instance = new DiTag();
  MS_PER_HOUR = 3600000;
  MS_PER_MIN = 60000;
  Companion_instance_129 = new Companion_81();
  UNSET_DISTANT_FUTURE = new Long(-289930240, 1689);
  Companion_instance_130 = new Companion_82();
  Companion_instance_131 = new Companion_83();
  Companion_instance_132 = new Companion_84();
  Companion_instance_133 = new Companion_85();
  Companion_instance_134 = new Companion_86();
  Companion_instance_135 = new Companion_87();
  Companion_instance_136 = new Companion_88();
  Companion_instance_137 = new Companion_89();
  Companion_instance_138 = new Companion_90();
  Companion_instance_141 = new Companion_93();
  Companion_instance_142 = new Companion_94();
  Companion_instance_143 = new Companion_95();
  Companion_instance_144 = new Companion_96();
  Companion_instance_145 = new Companion_97();
  Companion_instance_146 = new Companion_98();
  Companion_instance_147 = new Companion_99();
  Companion_instance_149 = new Companion_101();
  Companion_instance_151 = new Companion_103();
  Companion_instance_152 = new Companion_104();
  Companion_instance_153 = new Companion_105();
  Companion_instance_154 = new Companion_106();
  Companion_instance_155 = new Companion_107();
  Companion_instance_156 = new Companion_108();
  Companion_instance_157 = new Companion_109();
  Companion_instance_159 = new Companion_111();
  Companion_instance_160 = new Companion_112();
  Companion_instance_161 = new Companion_113();
  Companion_instance_164 = new Companion_116();
  Companion_instance_165 = new Companion_117();
  Companion_instance_166 = new Companion_118();
  Companion_instance_167 = new Companion_119();
  Companion_instance_168 = new Companion_120();
  Companion_instance_169 = new Companion_121();
  Companion_instance_171 = new Companion_123();
  Companion_instance_172 = new Companion_124();
  Companion_instance_174 = new Companion_126();
  Companion_instance_175 = new Companion_127();
  Companion_instance_176 = new Companion_128();
  Companion_instance_177 = new Companion_129();
  Companion_instance_178 = new Companion_130();
  Companion_instance_179 = new Companion_131();
  Companion_instance_180 = new Companion_132();
  Companion_instance_181 = new Companion_133();
  Companion_instance_183 = new Companion_135();
  Companion_instance_184 = new Companion_136();
  Companion_instance_185 = new Companion_137();
  Companion_instance_186 = new Companion_138();
  Companion_instance_187 = new Companion_139();
  Companion_instance_190 = new Companion_142();
  Companion_instance_191 = new Companion_143();
  Companion_instance_195 = new Companion_147();
  Companion_instance_196 = new Companion_148();
  Companion_instance_197 = new Companion_149();
  Companion_instance_198 = new Companion_150();
  Companion_instance_200 = new Companion_152();
  Companion_instance_201 = new Companion_153();
  Companion_instance_202 = new Companion_154();
  Companion_instance_203 = new Companion_155();
  Companion_instance_204 = new Companion_156();
  Companion_instance_205 = new Companion_157();
  Companion_instance_206 = new Companion_158();
  Companion_instance_207 = new Companion_159();
  Companion_instance_208 = new Companion_160();
  Companion_instance_210 = new Companion_162();
  Companion_instance_211 = new Companion_163();
  Companion_instance_212 = new Companion_164();
  PersonViewModelConstants_instance = new PersonViewModelConstants();
  Companion_instance_213 = new Companion_165();
  Companion_instance_214 = new Companion_166();
  Companion_instance_215 = new Companion_167();
  Companion_instance_217 = new Companion_169();
  Companion_instance_218 = new Companion_170();
  Companion_instance_221 = new Companion_173();
  Companion_instance_222 = new Companion_174();
  Companion_instance_223 = new Companion_175();
  Companion_instance_224 = new Companion_176();
  Companion_instance_225 = new Companion_177();
  Companion_instance_226 = new Companion_178();
  Companion_instance_227 = new Companion_179();
  Companion_instance_228 = new Companion_180();
  Companion_instance_229 = new Companion_181();
  Companion_instance_231 = new Companion_183();
  Companion_instance_232 = new Companion_184();
  Companion_instance_233 = new Companion_185();
  Companion_instance_234 = new Companion_186();
  Companion_instance_235 = new Companion_187();
  NAVHOST_CLEARSTACK_VIEWNAME = 'ClearStack';
  Companion_instance_236 = new Companion_188();
  Companion_instance_237 = new Companion_189();
  Companion_instance_238 = new Companion_190();
  Companion_instance_239 = new Companion_191();
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = AuthManager;
  _.$_$.b = Endpoint;
  _.$_$.c = Pbkdf2Params;
  _.$_$.d = UserSessionWithPersonAndEndpoint;
  _.$_$.e = UstadAccountManager;
  _.$_$.f = get_DIContext;
  _.$_$.g = get_DIModule;
  _.$_$.h = get_NAVHOST_CLEARSTACK_VIEWNAME;
  _.$_$.i = get_NavHost;
  _.$_$.j = get_NavHostClearStackPlaceholder;
  _.$_$.k = get_entries;
  _.$_$.l = ContentEntryGetMetadataStatus;
  _.$_$.m = BlobFileUseCaseJs;
  _.$_$.n = BlobFileUseCase;
  _.$_$.o = UriFileUseCase;
  _.$_$.p = FilterUsernameUseCase;
  _.$_$.q = VersionInfo;
  _.$_$.r = GetVersionUseCase;
  _.$_$.s = OnClickLinkUseCase;
  _.$_$.t = OpenExternalLinkUseCase;
  _.$_$.u = BulkAddPersonsFromLocalUriUseCaseJs;
  _.$_$.v = BulkAddPersonsFromLocalUriUseCase;
  _.$_$.w = GetShowPoweredByUseCase;
  _.$_$.x = DismissSocialWarningUseCase;
  _.$_$.y = ShowSocialWarningUseCase;
  _.$_$.z = ValidateUsernameUseCase;
  _.$_$.a1 = collectAsState;
  _.$_$.b1 = useCoroutineScope;
  _.$_$.c1 = useLaunchedEffect;
  _.$_$.d1 = useNavControllerEffect;
  _.$_$.e1 = useOnUnloadEffect;
  _.$_$.f1 = useStringProvider;
  _.$_$.g1 = useViewModel;
  _.$_$.h1 = get_ustadViewName;
  _.$_$.i1 = AppUiState;
  _.$_$.j1 = SnackBarDispatcher;
  _.$_$.k1 = TabItem;
  _.$_$.l1 = ApiUrlConfig;
  _.$_$.m1 = AppConfigMap;
  _.$_$.n1 = AppConfig;
  _.$_$.o1 = GenderConfig;
  _.$_$.p1 = SupportedLanguagesConfig;
  _.$_$.q1 = DomainDiModuleJs;
  _.$_$.r1 = commonDomainDiModule;
  _.$_$.s1 = StringProviderJs;
  _.$_$.t1 = mapLookup;
  _.$_$.u1 = CommandFlowUstadNavController;
  _.$_$.v1 = NavResultReturnerImpl;
  _.$_$.w1 = NavResultReturner;
  _.$_$.x1 = UstadMobileSystemImpl;
  _.$_$.y1 = BitmaskFlag;
  _.$_$.z1 = ListPagingSource;
  _.$_$.a2 = RefreshCommand;
  _.$_$.b2 = ClazzLogCreatorManagerJs;
  _.$_$.c2 = ClazzLogCreatorManager;
  _.$_$.d2 = get_totalAttendeeStatusRecorded;
  _.$_$.e2 = capitalizeFirstLetter;
  _.$_$.f2 = chopOffSeconds_0;
  _.$_$.g2 = chopOffSeconds;
  _.$_$.h2 = filterByFlags;
  _.$_$.i2 = forEach;
  _.$_$.j2 = formattedString;
  _.$_$.k2 = getOrPut;
  _.$_$.l2 = hasFlag_0;
  _.$_$.m2 = htmlToPlainText;
  _.$_$.n2 = initial;
  _.$_$.o2 = maxScoreSummedIfModule;
  _.$_$.p2 = penaltyPercentage;
  _.$_$.q2 = personFullName;
  _.$_$.r2 = get_progressAsFloat;
  _.$_$.s2 = requirePostfix;
  _.$_$.t2 = rgbColorProperty;
  _.$_$.u2 = textLength;
  _.$_$.v2 = toDisplayString;
  _.$_$.w2 = toNullIfBlank;
  _.$_$.x2 = toTerminologyEntries;
  _.$_$.y2 = get_MS_PER_HOUR;
  _.$_$.z2 = get_MS_PER_MIN;
  _.$_$.a3 = MessageIdOption2;
  _.$_$.b3 = SortOrderOption;
  _.$_$.c3 = UstadAntilog;
  _.$_$.d3 = avatarColorForName;
  _.$_$.e3 = OpenLicensesViewModel;
  _.$_$.f3 = AccountListUiState;
  _.$_$.g3 = AccountListViewModel;
  _.$_$.h3 = AppearanceDetailUiState;
  _.$_$.i3 = AppearanceDetailViewModel;
  _.$_$.j3 = AppearanceEditUiState;
  _.$_$.k3 = AppearanceEditViewModel;
  _.$_$.l3 = ClazzDetailUiState;
  _.$_$.m3 = ClazzDetailViewModel;
  _.$_$.n3 = ClazzDetailOverviewUiState;
  _.$_$.o3 = ClazzDetailOverviewViewModel;
  _.$_$.p3 = ClazzEditUiState;
  _.$_$.q3 = ClazzEditViewModel;
  _.$_$.r3 = ClazzGradebookUiState;
  _.$_$.s3 = ClazzGradebookViewModel;
  _.$_$.t3 = aggregateIfModule;
  _.$_$.u3 = displayMarkFor;
  _.$_$.v3 = maxScoreForBlock;
  _.$_$.w3 = get_thumbnailUri;
  _.$_$.x3 = InviteViaLinkUiState;
  _.$_$.y3 = InviteViaLinkViewModel;
  _.$_$.z3 = JoinWithCodeUiState;
  _.$_$.a4 = JoinWithCodeViewModel;
  _.$_$.b4 = ClazzListUiState;
  _.$_$.c4 = ClazzListViewModel;
  _.$_$.d4 = CoursePermissionDetailUiState;
  _.$_$.e4 = CoursePermissionDetailViewModel;
  _.$_$.f4 = CoursePermissionEditUiState;
  _.$_$.g4 = CoursePermissionEditViewModel;
  _.$_$.h4 = CoursePermissionListUiState;
  _.$_$.i4 = CoursePermissionListViewModel;
  _.$_$.j4 = get_blockTypeStringResource;
  _.$_$.k4 = defaultCourseBannerImageIndex;
  _.$_$.l4 = AssignmentSubmitterSummaryUiState;
  _.$_$.m4 = ClazzAssignmentDetailSubmissionsTabUiState;
  _.$_$.n4 = ClazzAssignmentDetailSubmissionsTabViewModel;
  _.$_$.o4 = get_listItemUiState;
  _.$_$.p4 = ClazzAssignmentDetailUiState;
  _.$_$.q4 = ClazzAssignmentDetailViewModel;
  _.$_$.r4 = ClazzAssignmentDetailOverviewUiState;
  _.$_$.s4 = ClazzAssignmentDetailOverviewViewModel;
  _.$_$.t4 = ClazzAssignmentDetailoverviewSubmissionUiState;
  _.$_$.u4 = ClazzAssignmentEditUiState;
  _.$_$.v4 = ClazzAssignmentEditViewModel;
  _.$_$.w4 = PeerReviewerAllocationEditUIState;
  _.$_$.x4 = PeerReviewerAllocationEditViewModel;
  _.$_$.y4 = ClazzAssignmentSubmitterDetailUiState;
  _.$_$.z4 = ClazzAssignmentSubmitterDetailViewModel;
  _.$_$.a5 = get_entries_1;
  _.$_$.b5 = values_2;
  _.$_$.c5 = UstadCourseAssignmentMarkListItemUiState;
  _.$_$.d5 = avatarColorName;
  _.$_$.e5 = avatarName;
  _.$_$.f5 = get_isFromSubmitterGroup;
  _.$_$.g5 = ClazzMemberListUiState;
  _.$_$.h5 = ClazzMemberListViewModel;
  _.$_$.i5 = ClazzEnrolmentEditUiState;
  _.$_$.j5 = ClazzEnrolmentEditViewModel;
  _.$_$.k5 = ClazzEnrolmentListUiState;
  _.$_$.l5 = ClazzEnrolmentListViewModel;
  _.$_$.m5 = ClazzLogListAttendanceUiState;
  _.$_$.n5 = ClazzLogListAttendanceViewModel;
  _.$_$.o5 = ClazzLogEditUiState;
  _.$_$.p5 = ClazzLogEditViewModel;
  _.$_$.q5 = ClazzLogEditAttendanceUiState;
  _.$_$.r5 = ClazzLogEditAttendanceViewModel;
  _.$_$.s5 = ContentEntryDetailUiState;
  _.$_$.t5 = ContentEntryDetailViewModel;
  _.$_$.u5 = ContentEntryDetailOverviewUiState;
  _.$_$.v5 = ContentEntryDetailOverviewViewModel;
  _.$_$.w5 = get_progress;
  _.$_$.x5 = ContentEntryEditUiState;
  _.$_$.y5 = ContentEntryEditViewModel;
  _.$_$.z5 = ContentEntryGetMetadataUiState;
  _.$_$.a6 = ContentEntryGetMetadataViewModel;
  _.$_$.b6 = GetSubtitleUiState;
  _.$_$.c6 = GetSubtitleViewModel;
  _.$_$.d6 = ContentEntryImportLinkUiState;
  _.$_$.e6 = ContentEntryImportLinkViewModel;
  _.$_$.f6 = ContentEntryListItemUiState;
  _.$_$.g6 = ContentEntryListUiState;
  _.$_$.h6 = ContentEntryListViewModel;
  _.$_$.i6 = get_listItemUiState_0;
  _.$_$.j6 = SubtitleEditUiState;
  _.$_$.k6 = SubtitleEditViewModel;
  _.$_$.l6 = get_contentTypeStringResource;
  _.$_$.m6 = get_stringResource;
  _.$_$.n6 = CourseBlockEditUiState;
  _.$_$.o6 = CourseBlockEditViewModel;
  _.$_$.p6 = TextBlockDetailUiState;
  _.$_$.q6 = TextBlockDetailViewModel;
  _.$_$.r6 = CourseGroupSetDetailUiState;
  _.$_$.s6 = CourseGroupSetDetailViewModel;
  _.$_$.t6 = CourseGroupSetEditUiState;
  _.$_$.u6 = CourseGroupSetEditViewModel;
  _.$_$.v6 = appendGroupNumIfNotInList;
  _.$_$.w6 = CourseGroupSetListUiState;
  _.$_$.x6 = CourseGroupSetListViewModel;
  _.$_$.y6 = CourseTerminologyEditUiState;
  _.$_$.z6 = CourseTerminologyEditViewModel;
  _.$_$.a7 = CourseTerminologyListUiState;
  _.$_$.b7 = CourseTerminologyListViewModel;
  _.$_$.c7 = DeletedItemListUiState;
  _.$_$.d7 = DeletedItemListViewModel;
  _.$_$.e7 = get_delItemContentTypeStringResource;
  _.$_$.f7 = CourseDiscussionDetailUiState;
  _.$_$.g7 = CourseDiscussionDetailViewModel;
  _.$_$.h7 = DiscussionPostDetailUiState2;
  _.$_$.i7 = DiscussionPostDetailViewModel;
  _.$_$.j7 = DiscussionPostEditUiState;
  _.$_$.k7 = DiscussionPostEditViewModel;
  _.$_$.l7 = EpubContentUiState;
  _.$_$.m7 = EpubContentViewModel;
  _.$_$.n7 = EpubScrollCommand;
  _.$_$.o7 = LoginUiState;
  _.$_$.p7 = LoginViewModel;
  _.$_$.q7 = ConversationListUiState;
  _.$_$.r7 = ConversationListViewModel;
  _.$_$.s7 = MessageListUiState;
  _.$_$.t7 = MessageListViewModel;
  _.$_$.u7 = daysUntil_0;
  _.$_$.v7 = ParentalConsentManagementUiState;
  _.$_$.w7 = ParentalConsentManagementViewModel;
  _.$_$.x7 = PdfContentUiState;
  _.$_$.y7 = PdfContentViewModel;
  _.$_$.z7 = PersonAccountEditUiState;
  _.$_$.a8 = PersonAccountEditViewModel;
  _.$_$.b8 = PersonUsernameAndPasswordModel;
  _.$_$.c8 = BulkAddPersonRunImportUiState;
  _.$_$.d8 = BulkAddPersonRunImportViewModel;
  _.$_$.e8 = BulkAddPersonSelectFileUiState;
  _.$_$.f8 = BulkAddPersonSelectFileViewModel;
  _.$_$.g8 = PersonDetailUiState;
  _.$_$.h8 = PersonDetailViewModel;
  _.$_$.i8 = PersonEditUiState;
  _.$_$.j8 = PersonEditViewModel;
  _.$_$.k8 = PersonListUiState;
  _.$_$.l8 = PersonListViewModel;
  _.$_$.m8 = RegisterAgeRedirectUiState;
  _.$_$.n8 = RegisterAgeRedirectViewModel;
  _.$_$.o8 = RegisterMinorWaitForParentUiState;
  _.$_$.p8 = RegisterMinorWaitForParentViewModel;
  _.$_$.q8 = RedirectViewModel;
  _.$_$.r8 = ScheduleEditUiState;
  _.$_$.s8 = ScheduleEditViewModel;
  _.$_$.t8 = SettingsUiState;
  _.$_$.u8 = SettingsViewModel;
  _.$_$.v8 = SiteDetailUiState;
  _.$_$.w8 = SiteDetailViewModel;
  _.$_$.x8 = SiteEditUiState;
  _.$_$.y8 = SiteEditViewModel;
  _.$_$.z8 = SiteTermsDetailUiState;
  _.$_$.a9 = SiteTermsDetailViewModel;
  _.$_$.b9 = SiteEnterLinkUiState;
  _.$_$.c9 = SiteEnterLinkViewModel;
  _.$_$.d9 = SystemPermissionDetailUiState;
  _.$_$.e9 = SystemPermissionDetailViewModel;
  _.$_$.f9 = SystemPermissionEditUiState;
  _.$_$.g9 = SystemPermissionEditViewModel;
  _.$_$.h9 = TimeZoneListViewModel;
  _.$_$.i9 = TimezoneListUiState;
  _.$_$.j9 = VideoContentUiState;
  _.$_$.k9 = MediaPlayState;
  _.$_$.l9 = VideoContentViewModel;
  _.$_$.m9 = XapiContentUiState;
  _.$_$.n9 = XapiContentViewModel;
  _.$_$.o9 = ErrorReportUiState;
  _.$_$.p9 = HolidayCalendarDetailUIState;
  _.$_$.q9 = HolidayCalendarEditUiState;
  _.$_$.r9 = HolidayCalendarListUiState;
  _.$_$.s9 = LanguageDetailUiState;
  _.$_$.t9 = LanguageEditUiState;
  _.$_$.u9 = LanguageListUiState;
  _.$_$.v9 = LeavingReasonEditUiState;
  _.$_$.w9 = LeavingReasonEditViewModel;
  _.$_$.x9 = ReportFilterEditUiState;
  _.$_$.y9 = ScopedGrantDetailUiState;
  _.$_$.z9 = ScopedGrantEditUiState;
  _.$_$.aa = CompressionLevel_MEDIUM_getInstance;
  _.$_$.ba = LinkTarget_DEFAULT_getInstance;
  _.$_$.ca = AppBarColors_SELECTION_MODE_getInstance;
  _.$_$.da = AppBarColors_STANDARD_getInstance;
  _.$_$.ea = FabIcon_ADD_getInstance;
  _.$_$.fa = FabIcon_EDIT_getInstance;
  _.$_$.ga = State_INDETERMINATE_getInstance;
  _.$_$.ha = MarkingType_PEERS_getInstance;
  _.$_$.ia = TextLimitType_LIMIT_WORDS_getInstance;
  _.$_$.ja = SupportedLanguagesConfig_init_$Create$;
  _.$_$.ka = _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0;
  _.$_$.la = _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0;
  _.$_$.ma = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2;
  _.$_$.na = _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083;
  _.$_$.oa = _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7;
  _.$_$.pa = Companion_getInstance_18;
  _.$_$.qa = PersonConstants_getInstance;
  _.$_$.ra = SubmissionConstants_getInstance;
  _.$_$.sa = Companion_getInstance_55;
  _.$_$.ta = Companion_instance_92;
  _.$_$.ua = Companion_instance_96;
  _.$_$.va = Companion_getInstance_70;
  _.$_$.wa = Companion_instance_124;
  _.$_$.xa = Companion_instance_125;
  _.$_$.ya = ClazzEnrolmentListConstants_getInstance;
  _.$_$.za = ConditionConstants_getInstance;
  _.$_$.ab = ContentCompletionStatusConstants_getInstance;
  _.$_$.bb = EnrolmentPolicyConstants_getInstance;
  _.$_$.cb = FieldConstants_getInstance;
  _.$_$.db = LicenceConstants_getInstance;
  _.$_$.eb = OutcomeConstants_getInstance;
  _.$_$.fb = PersonParentJoinConstants_getInstance;
  _.$_$.gb = RoleConstants_getInstance;
  _.$_$.hb = ScheduleConstants_getInstance;
  _.$_$.ib = SubmissionPolicyConstants_getInstance;
  _.$_$.jb = UstadMobileConstants_getInstance;
  _.$_$.kb = Companion_getInstance_92;
  _.$_$.lb = DiTag_instance;
  _.$_$.mb = Companion_getInstance_98;
  _.$_$.nb = UMFileUtil_getInstance;
  _.$_$.ob = Companion_instance_129;
  _.$_$.pb = Companion_instance_131;
  _.$_$.qb = Companion_instance_132;
  _.$_$.rb = Companion_instance_133;
  _.$_$.sb = Companion_instance_135;
  _.$_$.tb = Companion_instance_136;
  _.$_$.ub = Companion_instance_137;
  _.$_$.vb = Companion_instance_138;
  _.$_$.wb = Companion_instance_151;
  _.$_$.xb = Companion_instance_152;
  _.$_$.yb = Companion_instance_153;
  _.$_$.zb = Companion_instance_154;
  _.$_$.ac = Companion_instance_155;
  _.$_$.bc = Companion_instance_156;
  _.$_$.cc = Companion_instance_157;
  _.$_$.dc = Companion_instance_159;
  _.$_$.ec = Companion_instance_160;
  _.$_$.fc = Companion_instance_161;
  _.$_$.gc = Companion_getInstance_133;
  _.$_$.hc = Companion_getInstance_132;
  _.$_$.ic = Companion_instance_164;
  _.$_$.jc = Companion_instance_165;
  _.$_$.kc = Companion_instance_166;
  _.$_$.lc = Companion_instance_169;
  _.$_$.mc = Companion_instance_168;
  _.$_$.nc = Companion_instance_171;
  _.$_$.oc = Companion_instance_172;
  _.$_$.pc = Companion_instance_174;
  _.$_$.qc = Companion_instance_175;
  _.$_$.rc = Companion_instance_167;
  _.$_$.sc = ClazzAssignmentViewModelConstants_getInstance;
  _.$_$.tc = Companion_instance_176;
  _.$_$.uc = Companion_instance_177;
  _.$_$.vc = Companion_instance_178;
  _.$_$.wc = Companion_instance_179;
  _.$_$.xc = Companion_instance_180;
  _.$_$.yc = Companion_instance_181;
  _.$_$.zc = Companion_getInstance_152;
  _.$_$.ad = Companion_instance_183;
  _.$_$.bd = Companion_instance_184;
  _.$_$.cd = Companion_instance_185;
  _.$_$.dd = Companion_instance_186;
  _.$_$.ed = Companion_instance_187;
  _.$_$.fd = Companion_getInstance_158;
  _.$_$.gd = Companion_instance_191;
  _.$_$.hd = Companion_getInstance_163;
  _.$_$.id = Companion_instance_195;
  _.$_$.jd = Companion_getInstance_162;
  _.$_$.kd = Companion_instance_196;
  _.$_$.ld = Companion_instance_197;
  _.$_$.md = Companion_instance_198;
  _.$_$.nd = Companion_instance_200;
  _.$_$.od = Companion_instance_201;
  _.$_$.pd = Companion_instance_202;
  _.$_$.qd = Companion_instance_203;
  _.$_$.rd = Companion_instance_204;
  _.$_$.sd = Companion_instance_205;
  _.$_$.td = Companion_instance_206;
  _.$_$.ud = Companion_instance_208;
  _.$_$.vd = Companion_getInstance_179;
  _.$_$.wd = Companion_instance_210;
  _.$_$.xd = Companion_instance_211;
  _.$_$.yd = Companion_instance_212;
  _.$_$.zd = Companion_instance_213;
  _.$_$.ae = Companion_instance_215;
  _.$_$.be = Companion_instance_217;
  _.$_$.ce = Companion_instance_218;
  _.$_$.de = Companion_getInstance_189;
  _.$_$.ee = Companion_getInstance_190;
  _.$_$.fe = Companion_instance_221;
  _.$_$.ge = Companion_instance_222;
  _.$_$.he = Companion_instance_224;
  _.$_$.ie = Companion_instance_226;
  _.$_$.je = Companion_instance_227;
  _.$_$.ke = Companion_instance_228;
  _.$_$.le = Companion_instance_229;
  _.$_$.me = Companion_getInstance_200;
  _.$_$.ne = Companion_instance_231;
  _.$_$.oe = Companion_instance_232;
  _.$_$.pe = Companion_instance_233;
  _.$_$.qe = Companion_instance_234;
  _.$_$.re = Companion_instance_235;
  _.$_$.se = Companion_instance_141;
  _.$_$.te = Companion_instance_142;
  _.$_$.ue = Companion_instance_143;
  _.$_$.ve = Companion_instance_144;
  _.$_$.we = Companion_instance_145;
  _.$_$.xe = Companion_instance_146;
  _.$_$.ye = Companion_instance_147;
  _.$_$.ze = Companion_getInstance_120;
  _.$_$.af = strings_getInstance;
  _.$_$.bf = MR_getInstance;
  //endregion
  return _;
}(module.exports, require('react'), require('react-router'), require('compressorjs'), require('libphonenumber-js'), require('xxhashjs'), require('react-router-dom'), require('uuid'), require('./kotlin-kotlin-stdlib.js'), require('./moko-resources-resources.js'), require('./UstadMobile-lib-database.js'), require('./Kosi-Kodein-kodein-di.js'), require('./Kosi-Kaverit-kaverit.js'), require('./door-door-runtime.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-coroutines-core.js'), require('./ktor-ktor-client-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./ktor-ktor-http.js'), require('./kotlinx-atomicfu.js'), require('./xmlutil-serialization.js'), require('./xmlutil-core.js'), require('./Napier-napier-js-ir.js'), require('./uuid.js'), require('./UstadMobile-lib-util.js'), require('./Kotlin-DateTime-library-kotlinx-datetime-js-ir.js'), require('./urlencoder-urlencoder-lib.js'), require('./xmlpullparserkmp.js'), require('./kotlinx-io-kotlinx-io-core.js'), require('./ktor-ktor-utils.js'), require('./multiplatform-paging-root-paging-common.js'), require('./precompose-precompose-viewmodel.js'), require('./ktor-ktor-io.js'), require('./MultiplatformSettings-multiplatform-settings.js'), require('./kotlin-react-core.js'), require('./kotlin-react.js'), require('./kotlin-web.js'), require('./kotlin-js.js')));

//# sourceMappingURL=UstadMobile-core.js.map
