(function (_, $module$react, $module$react_router_h6p15h, com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk, $module$libphonenumber_js_s63wkw, $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_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_com_github_UstadMobile_door_door_runtime, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_github_aakira_napier, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_github_pdvrieze_xmlutil_serialization, kotlin_io_github_pdvrieze_xmlutil_core, 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_io_ktor_ktor_utils, kotlin_UstadMobile_lib_xxhashkmp_core, kotlin_app_cash_paging_paging_common, kotlin_moe_tlaster_precompose_viewmodel, kotlin_UstadMobile_lib_centralappconfigdb_common, 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.$_$.hi;
  var SupportedLocale = kotlin_dev_icerock_moko_resources.$_$.b;
  var listOf = kotlin_kotlin.$_$.l8;
  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.$_$.wc;
  var objectMeta = kotlin_kotlin.$_$.vc;
  var setMetadataFor = kotlin_kotlin.$_$.xc;
  var PluralsResource = kotlin_dev_icerock_moko_resources.$_$.e;
  var VOID = kotlin_kotlin.$_$.f;
  var getBooleanHashCode = kotlin_kotlin.$_$.rb;
  var equals = kotlin_kotlin.$_$.ob;
  var classMeta = kotlin_kotlin.$_$.lb;
  var IllegalStateException = kotlin_kotlin.$_$.yh;
  var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.b2;
  var captureStack = kotlin_kotlin.$_$.fb;
  var CoroutineImpl = kotlin_kotlin.$_$.va;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.ha;
  var PersonAuth2 = kotlin_com_ustadmobile_app_lib_database.$_$.k4;
  var Companion_instance = kotlin_com_ustadmobile_app_lib_database.$_$.w7;
  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.$_$.wi;
  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.$_$.gc;
  var On = kotlin_org_kodein_di_kodein_di.$_$.n;
  var UmAppDataLayer = kotlin_com_ustadmobile_app_lib_database.$_$.j;
  var Instance = kotlin_org_kodein_di_kodein_di.$_$.m;
  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.$_$.vd;
  var getPropertyCallableRef = kotlin_kotlin.$_$.ub;
  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 LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.h;
  var lazy = kotlin_kotlin.$_$.ej;
  var objectCreate = kotlin_kotlin.$_$.uc;
  var Url = kotlin_io_ktor_ktor_http.$_$.v;
  var endsWith = kotlin_kotlin.$_$.xe;
  var getStringHashCode = kotlin_kotlin.$_$.vb;
  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.$_$.u7;
  var $serializer_getInstance_0 = kotlin_com_ustadmobile_app_lib_database.$_$.y7;
  var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;
  var $serializer_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.k8;
  var $serializer_getInstance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.b8;
  var removePrefix = kotlin_kotlin.$_$.rf;
  var removeSuffix = kotlin_kotlin.$_$.sf;
  var hashCode = kotlin_kotlin.$_$.wb;
  var compareValues = kotlin_kotlin.$_$.fa;
  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.$_$.b5;
  var Person = kotlin_com_ustadmobile_app_lib_database.$_$.q4;
  var sortedWith = kotlin_kotlin.$_$.o9;
  var plus = kotlin_kotlin.$_$.z8;
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z1;
  var get_direct = kotlin_org_kodein_di_kodein_di.$_$.o;
  var Companion_instance_1 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b3;
  var UmAppDatabase = kotlin_com_ustadmobile_app_lib_database.$_$.k;
  var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m2;
  var collectLatest = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
  var PersonAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.h1;
  var shallowCopy = kotlin_com_ustadmobile_app_lib_database.$_$.v1;
  var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.p;
  var Pair = kotlin_kotlin.$_$.ei;
  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.$_$.l8;
  var get_doorWrapperNodeId = kotlin_com_github_UstadMobile_door_door_runtime.$_$.l;
  var systemTimeInMillis = kotlin_com_github_UstadMobile_door_door_runtime.$_$.d2;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
  var listOf_0 = kotlin_kotlin.$_$.k8;
  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.$_$.aa;
  var toList = kotlin_kotlin.$_$.t9;
  var Long = kotlin_kotlin.$_$.ai;
  var Comparator = kotlin_kotlin.$_$.rh;
  var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c1;
  var withDoorTransactionAsync = kotlin_com_github_UstadMobile_door_door_runtime.$_$.w2;
  var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.j;
  var url = kotlin_io_ktor_ktor_client_core.$_$.n;
  var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
  var contentType = kotlin_io_ktor_ktor_http.$_$.c1;
  var setBodyJson = kotlin_com_github_UstadMobile_door_door_runtime.$_$.q;
  var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
  var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.q;
  var Exception_init_$Create$ = kotlin_kotlin.$_$.n1;
  var NodeIdAndAuth = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b;
  var toHexString = kotlin_kotlin.$_$.sg;
  var to = kotlin_kotlin.$_$.nj;
  var parameter = kotlin_io_ktor_ktor_client_core.$_$.m;
  var Napier_getInstance = kotlin_io_github_aakira_napier.$_$.g;
  var UmAccount = kotlin_com_ustadmobile_app_lib_database.$_$.a5;
  var ensureNotNull = kotlin_kotlin.$_$.zi;
  var DoorDatabaseRepository = kotlin_com_github_UstadMobile_door_door_runtime.$_$.g2;
  var header = kotlin_io_ktor_ktor_client_core.$_$.l;
  var set_expectSuccess = kotlin_io_ktor_ktor_client_core.$_$.h;
  var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.i;
  var addAll = kotlin_kotlin.$_$.e6;
  var Companion_instance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.v7;
  var Companion_instance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.x7;
  var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.t;
  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.$_$.v;
  var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a2;
  var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y1;
  var MutableStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e1;
  var asStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h1;
  var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l;
  var isCharSequence = kotlin_kotlin.$_$.cc;
  var trim = kotlin_kotlin.$_$.jh;
  var toString = kotlin_kotlin.$_$.bd;
  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.$_$.qe;
  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.$_$.xh;
  var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.v1;
  var $serializer_getInstance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.d7;
  var $serializer_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.a7;
  var mapOf = kotlin_kotlin.$_$.o8;
  var Companion_instance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.o6;
  var Companion_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.e7;
  var Exception = kotlin_kotlin.$_$.wh;
  var interfaceMeta = kotlin_kotlin.$_$.xb;
  var Exception_init_$Init$ = kotlin_kotlin.$_$.m1;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.u1;
  var shallowCopy_0 = kotlin_com_ustadmobile_app_lib_database.$_$.s1;
  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.$_$.t8;
  var XapiSessionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.t2;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.f2;
  var compareTo = kotlin_kotlin.$_$.mb;
  var mapOf_0 = kotlin_kotlin.$_$.n8;
  var shallowCopy_1 = kotlin_com_ustadmobile_app_lib_database.$_$.y1;
  var PersonNames = kotlin_com_ustadmobile_app_lib_database.$_$.i1;
  var first = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
  var toLong = kotlin_kotlin.$_$.zc;
  var toString_0 = kotlin_kotlin.$_$.mj;
  var CancellationException = kotlin_kotlin.$_$.ga;
  var Enum = kotlin_kotlin.$_$.uh;
  var Companion_instance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.f7;
  var Companion_instance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.c8;
  var Companion_instance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.m7;
  var Companion_instance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.h7;
  var Companion_instance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.b7;
  var charSequenceLength = kotlin_kotlin.$_$.jb;
  var Companion_getInstance_3 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.e3;
  var get_isActive = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k2;
  var delay = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k;
  var TransferJobItemStatus_COMPLETE_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.c5;
  var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
  var plus_1 = kotlin_kotlin.$_$.a9;
  var Companion_instance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.c7;
  var Companion_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.n6;
  var randomString = kotlin_com_ustadmobile_app_lib_util.$_$.c;
  var Companion_instance_12 = kotlin_com_ustadmobile_app_lib_database.$_$.p6;
  var Companion_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.l7;
  var CoursePermission = kotlin_com_ustadmobile_app_lib_database.$_$.w3;
  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.$_$.r7;
  var ClazzEnrolment_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.i5;
  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.$_$.a4;
  var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.i;
  var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.h2;
  var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v2;
  var enumEntries = kotlin_kotlin.$_$.za;
  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.$_$.m8;
  var coerceAtLeast = kotlin_kotlin.$_$.jd;
  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.$_$.x6;
  var setInputString = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.c;
  var substringBeforeLast = kotlin_kotlin.$_$.gg;
  var Collection = kotlin_kotlin.$_$.p5;
  var ContentEntryParentChildJoin = kotlin_com_ustadmobile_app_lib_database.$_$.i3;
  var toMutableList = kotlin_kotlin.$_$.x9;
  var checkIndexOverflow = kotlin_kotlin.$_$.l6;
  var Companion_instance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.g7;
  var getOrNull = kotlin_kotlin.$_$.t7;
  var decodeBase64Bytes = kotlin_io_ktor_ktor_utils.$_$.u;
  var decodeToString = kotlin_kotlin.$_$.se;
  var PersonPasskey = kotlin_com_ustadmobile_app_lib_database.$_$.o4;
  var split = kotlin_kotlin.$_$.zf;
  var startsWith = kotlin_kotlin.$_$.ag;
  var Companion_instance_15 = kotlin_com_ustadmobile_app_lib_database.$_$.p7;
  var Companion_instance_16 = kotlin_com_ustadmobile_app_lib_database.$_$.z6;
  var plus_2 = kotlin_kotlin.$_$.x8;
  var emptySet = kotlin_kotlin.$_$.k7;
  var first_0 = kotlin_kotlin.$_$.p7;
  var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.f;
  var charSequenceGet = kotlin_kotlin.$_$.ib;
  var Char = kotlin_kotlin.$_$.ph;
  var isDigit = kotlin_kotlin.$_$.ff;
  var toString_1 = kotlin_kotlin.$_$.c3;
  var isLetter = kotlin_kotlin.$_$.hf;
  var joinToString = kotlin_kotlin.$_$.a8;
  var Companion_instance_17 = kotlin_com_ustadmobile_app_lib_database.$_$.r6;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.u2;
  var indexOf = kotlin_kotlin.$_$.df;
  var emptyMap = kotlin_kotlin.$_$.j7;
  var first_1 = kotlin_kotlin.$_$.q7;
  var distinct = kotlin_kotlin.$_$.f7;
  var until = kotlin_kotlin.$_$.rd;
  var PeerReviewerAllocation = kotlin_com_ustadmobile_app_lib_database.$_$.i4;
  var Companion_instance_18 = kotlin_com_ustadmobile_app_lib_database.$_$.t7;
  var toMap = kotlin_kotlin.$_$.w9;
  var checkCountOverflow = kotlin_kotlin.$_$.k6;
  var shuffled = kotlin_kotlin.$_$.l9;
  var shallowCopy_2 = kotlin_com_ustadmobile_app_lib_database.$_$.e2;
  var SystemPermission = kotlin_com_ustadmobile_app_lib_database.$_$.w4;
  var Companion_instance_19 = kotlin_com_ustadmobile_app_lib_database.$_$.z7;
  var PersonParentJoin = kotlin_com_ustadmobile_app_lib_database.$_$.n4;
  var Companion_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.i8;
  var IllegalArgumentException_init_$Init$_0 = kotlin_kotlin.$_$.t1;
  var filterNotNull = kotlin_kotlin.$_$.m7;
  var Iterator = kotlin_kotlin.$_$.t5;
  var numberToLong = kotlin_kotlin.$_$.tc;
  var isWhitespace = kotlin_kotlin.$_$.lf;
  var setOf = kotlin_kotlin.$_$.k9;
  var firstOrNull_0 = kotlin_kotlin.$_$.ze;
  var Companion_instance_20 = kotlin_com_ustadmobile_app_lib_database.$_$.d6;
  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.$_$.j6;
  var plus_3 = kotlin_kotlin.$_$.w8;
  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 replace = kotlin_kotlin.$_$.uf;
  var toBooleanStrictOrNull = kotlin_kotlin.$_$.mg;
  var listOfNotNull = kotlin_kotlin.$_$.j8;
  var flow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
  var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;
  var Companion_instance_21 = kotlin_com_ustadmobile_app_lib_database.$_$.e6;
  var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.c5;
  var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
  var ActivityEntity = kotlin_com_ustadmobile_app_lib_database.$_$.i2;
  var Companion_instance_22 = kotlin_com_ustadmobile_app_lib_database.$_$.f6;
  var Companion_instance_23 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
  var ActivityExtensionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.j2;
  var ActivityLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.l2;
  var ActivityInteractionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.k2;
  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.$_$.gj;
  var ActorEntity = kotlin_com_ustadmobile_app_lib_database.$_$.m2;
  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_24 = kotlin_com_ustadmobile_app_lib_database.$_$.h6;
  var StatementContextActivityJoin = kotlin_com_ustadmobile_app_lib_database.$_$.o2;
  var Companion_instance_25 = kotlin_com_ustadmobile_app_lib_database.$_$.g6;
  var GroupMemberActorJoin = kotlin_com_ustadmobile_app_lib_database.$_$.n2;
  var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s3;
  var THROW_IAE = kotlin_kotlin.$_$.ii;
  var FloatSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;
  var getNumberHashCode = kotlin_kotlin.$_$.tb;
  var StatementEntity = kotlin_com_ustadmobile_app_lib_database.$_$.q2;
  var StatementEntityJson = kotlin_com_ustadmobile_app_lib_database.$_$.p2;
  var JsonNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;
  var VerbEntity = kotlin_com_ustadmobile_app_lib_database.$_$.r2;
  var VerbLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.s2;
  var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.g;
  var toDuration = kotlin_kotlin.$_$.mh;
  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.$_$.k6;
  var values = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.j;
  var isBlank = kotlin_kotlin.$_$.ef;
  var toInt = kotlin_kotlin.$_$.ug;
  var sorted = kotlin_kotlin.$_$.p9;
  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 XXStringHasher = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.d;
  var Companion_instance_26 = kotlin_com_ustadmobile_app_lib_database.$_$.d8;
  var Companion_instance_27 = kotlin_com_ustadmobile_app_lib_database.$_$.i6;
  var Companion_instance_28 = kotlin_com_ustadmobile_app_lib_database.$_$.w6;
  var Companion_instance_29 = kotlin_com_ustadmobile_app_lib_database.$_$.f8;
  var BufferOverflow_DROP_OLDEST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
  var MutableSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d1;
  var asSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
  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.$_$.p;
  var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q;
  var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z;
  var fillArrayVal = kotlin_kotlin.$_$.qb;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f1;
  var indexOf_0 = kotlin_kotlin.$_$.cf;
  var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.w2;
  var lastIndexOf = kotlin_kotlin.$_$.nf;
  var HashMap_init_$Create$ = kotlin_kotlin.$_$.p;
  var round = kotlin_kotlin.$_$.fd;
  var lazy_0 = kotlin_kotlin.$_$.fj;
  var roundToInt = kotlin_kotlin.$_$.ed;
  var substringBefore = kotlin_kotlin.$_$.jg;
  var Companion_instance_30 = kotlin_com_ustadmobile_app_lib_database.$_$.y6;
  var timeout = kotlin_io_ktor_ktor_client_core.$_$.i;
  var Companion_instance_31 = kotlin_com_ustadmobile_app_lib_database.$_$.g8;
  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.$_$.k1;
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w;
  var Companion_getInstance_10 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.d;
  var minus = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.l;
  var toMap_0 = kotlin_kotlin.$_$.v9;
  var substringBefore_0 = kotlin_kotlin.$_$.ig;
  var toMutableSet = kotlin_kotlin.$_$.z9;
  var titlecase = kotlin_kotlin.$_$.lg;
  var isLowerCase = kotlin_kotlin.$_$.jf;
  var offsetAt = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.m;
  var PersonGroup = kotlin_com_ustadmobile_app_lib_database.$_$.l4;
  var PersonGroupMember_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.j5;
  var ScopedGrant = kotlin_com_ustadmobile_app_lib_database.$_$.s4;
  var abs = kotlin_kotlin.$_$.cd;
  var padStart = kotlin_kotlin.$_$.qf;
  var substringAfterLast = kotlin_kotlin.$_$.dg;
  var equals_0 = kotlin_kotlin.$_$.ye;
  var SerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p1;
  var toLong_0 = kotlin_kotlin.$_$.xg;
  var LanguageDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.q5;
  var LeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.g4;
  var Companion_getInstance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.s7;
  var lastOrNull = kotlin_kotlin.$_$.g8;
  var KProperty0 = kotlin_kotlin.$_$.ud;
  var THROW_ISE = kotlin_kotlin.$_$.ji;
  var getLocalDelegateReference = kotlin_kotlin.$_$.sb;
  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.$_$.y9;
  var Companion_instance_32 = kotlin_com_ustadmobile_app_lib_database.$_$.l6;
  var toBoolean = kotlin_kotlin.$_$.ng;
  var InstanceOrNull = kotlin_org_kodein_di_kodein_di.$_$.l;
  var PermissionFlags_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.s5;
  var ClazzAndDetailPermissions = kotlin_com_ustadmobile_app_lib_database.$_$.n;
  var mutableListOf = kotlin_kotlin.$_$.q8;
  var PermissionTriple = kotlin_com_ustadmobile_app_lib_database.$_$.e1;
  var ClazzAndDisplayDetails = kotlin_com_ustadmobile_app_lib_database.$_$.o;
  var combine = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j1;
  var ClazzWithHolidayCalendarAndAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.d3;
  var CourseBlockAndEditEntities = kotlin_com_ustadmobile_app_lib_database.$_$.x;
  var Schedule = kotlin_com_ustadmobile_app_lib_database.$_$.r4;
  var Companion_getInstance_12 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s;
  var shareIn = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p1;
  var $serializer_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.z5;
  var $serializer_getInstance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.e8;
  var $serializer_getInstance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.u6;
  var CourseBlockPicture = kotlin_com_ustadmobile_app_lib_database.$_$.r3;
  var CoursePicture = kotlin_com_ustadmobile_app_lib_database.$_$.x3;
  var shallowCopy_3 = kotlin_com_ustadmobile_app_lib_database.$_$.b2;
  var shallowCopy_4 = kotlin_com_ustadmobile_app_lib_database.$_$.g2;
  var getDefaultTimeZoneId = kotlin_com_ustadmobile_app_lib_util.$_$.a;
  var CourseTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.y3;
  var Companion_instance_33 = kotlin_com_ustadmobile_app_lib_database.$_$.v6;
  var Companion_getInstance_13 = kotlin_com_ustadmobile_app_lib_database.$_$.a6;
  var deactivateByUids = kotlin_com_ustadmobile_app_lib_database.$_$.f5;
  var deactivateByUids_0 = kotlin_com_ustadmobile_app_lib_database.$_$.g5;
  var deactivateByUids_1 = kotlin_com_ustadmobile_app_lib_database.$_$.h5;
  var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f2;
  var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
  var Companion_instance_34 = kotlin_com_ustadmobile_app_lib_database.$_$.o7;
  var BlockStatus = kotlin_com_ustadmobile_app_lib_database.$_$.m;
  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.$_$.k1;
  var PagingSourceWithHttpLoader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.s1;
  var DelegatedInvalidationPagingSource = kotlin_com_github_UstadMobile_door_door_runtime.$_$.m1;
  var ClazzEnrolmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.m5;
  var ClazzInviteAndClazz = kotlin_com_ustadmobile_app_lib_database.$_$.p;
  var last = kotlin_kotlin.$_$.h8;
  var ClazzDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.l5;
  var PermissionPair = kotlin_com_ustadmobile_app_lib_database.$_$.d1;
  var first_2 = kotlin_kotlin.$_$.r7;
  var eachCount = kotlin_kotlin.$_$.h7;
  var AverageCourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.x2;
  var CourseAssignmentMarkAndMarkerName = kotlin_com_ustadmobile_app_lib_database.$_$.v;
  var SubmissionAndFiles = kotlin_com_ustadmobile_app_lib_database.$_$.l1;
  var ClazzAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.z2;
  var AssignmentProgressSummary = kotlin_com_ustadmobile_app_lib_database.$_$.u2;
  var ClazzAssignmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.k5;
  var ClazzAssignmentCourseBlockAndSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.y2;
  var throwKotlinNothingValueException = kotlin_kotlin.$_$.jj;
  var CourseAssignmentSubmission = kotlin_com_ustadmobile_app_lib_database.$_$.q3;
  var Comments = kotlin_com_ustadmobile_app_lib_database.$_$.f3;
  var CourseAssignmentSubmissionFile = kotlin_com_ustadmobile_app_lib_database.$_$.p3;
  var CourseAssignmentMarkDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.o5;
  var CourseGroupSet = kotlin_com_ustadmobile_app_lib_database.$_$.v3;
  var shallowCopy_5 = kotlin_com_ustadmobile_app_lib_database.$_$.c2;
  var CourseBlock = kotlin_com_ustadmobile_app_lib_database.$_$.s3;
  var $serializer_getInstance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.n7;
  var AssignmentSubmitterSummary = kotlin_com_ustadmobile_app_lib_database.$_$.w2;
  var AssignmentSubmitterAndAllocations = kotlin_com_ustadmobile_app_lib_database.$_$.v2;
  var Companion_getInstance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.m6;
  var CourseBlockAndAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.w;
  var AssignmentPermissionAndActiveUserSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.l;
  var CourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.o3;
  var ClazzNameAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.q;
  var ClazzEnrolmentWithLeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.a3;
  var Companion_instance_35 = kotlin_com_ustadmobile_app_lib_database.$_$.q6;
  var flowOf = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.m1;
  var Clazz = kotlin_com_ustadmobile_app_lib_database.$_$.e3;
  var Companion_instance_36 = kotlin_com_ustadmobile_app_lib_database.$_$.s6;
  var ClazzLog = kotlin_com_ustadmobile_app_lib_database.$_$.c3;
  var shallowCopy_6 = kotlin_com_ustadmobile_app_lib_database.$_$.a2;
  var Companion_instance_37 = kotlin_com_ustadmobile_app_lib_database.$_$.t6;
  var Companion_instance_38 = kotlin_com_ustadmobile_app_lib_database.$_$.b6;
  var ClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.b3;
  var PersonAndClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.f1;
  var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s1;
  var shallowCopy_7 = kotlin_com_ustadmobile_app_lib_database.$_$.q1;
  var ContentEntry = kotlin_com_ustadmobile_app_lib_database.$_$.n3;
  var AttemptsPersonListConst_instance = kotlin_com_ustadmobile_app_lib_database.$_$.w5;
  var firstOrNull_1 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
  var SessionTimeAndProgressInfoConst_instance = kotlin_com_ustadmobile_app_lib_database.$_$.u5;
  var StatementConst_instance = kotlin_com_ustadmobile_app_lib_database.$_$.v5;
  var ContentEntryAndDetail = kotlin_com_ustadmobile_app_lib_database.$_$.t;
  var ContentEntryVersion = kotlin_com_ustadmobile_app_lib_database.$_$.m3;
  var OfflineItemAndState = kotlin_com_ustadmobile_app_lib_database.$_$.c1;
  var Companion_instance_39 = kotlin_com_ustadmobile_app_lib_database.$_$.j8;
  var Companion_instance_40 = kotlin_com_ustadmobile_app_lib_database.$_$.y5;
  var shallowCopy_8 = kotlin_com_ustadmobile_app_lib_database.$_$.z1;
  var ContentEntryPicture2 = kotlin_com_ustadmobile_app_lib_database.$_$.j3;
  var ContentEntryAndContentJob = kotlin_com_ustadmobile_app_lib_database.$_$.s;
  var ContentEntryImportJob = kotlin_com_ustadmobile_app_lib_database.$_$.h3;
  var Companion_instance_41 = kotlin_com_ustadmobile_app_lib_database.$_$.x5;
  var setOf_0 = kotlin_kotlin.$_$.j9;
  var ContentEntryDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.n5;
  var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w2;
  var CourseBlockAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.y;
  var CourseGroupMemberAndName = kotlin_com_ustadmobile_app_lib_database.$_$.t3;
  var CourseGroupMember = kotlin_com_ustadmobile_app_lib_database.$_$.u3;
  var Companion_instance_42 = kotlin_com_ustadmobile_app_lib_database.$_$.i7;
  var Companion_instance_43 = kotlin_com_ustadmobile_app_lib_database.$_$.j7;
  var Companion_instance_44 = kotlin_com_ustadmobile_app_lib_database.$_$.k7;
  var shallowCopy_9 = kotlin_com_ustadmobile_app_lib_database.$_$.u1;
  var CourseGroupSetDaoConstants_instance = kotlin_com_ustadmobile_app_lib_database.$_$.p5;
  var shallowCopy_10 = kotlin_com_ustadmobile_app_lib_database.$_$.r1;
  var DiscussionPost = kotlin_com_ustadmobile_app_lib_database.$_$.z3;
  var Companion_instance_45 = kotlin_com_ustadmobile_app_lib_database.$_$.q7;
  var printStackTrace = kotlin_kotlin.$_$.ij;
  var XML = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.d;
  var Site = kotlin_com_ustadmobile_app_lib_database.$_$.v4;
  var daysUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.k;
  var Message = kotlin_com_ustadmobile_app_lib_database.$_$.h4;
  var NotImplementedError = kotlin_kotlin.$_$.ci;
  var shallowCopy_11 = kotlin_com_ustadmobile_app_lib_database.$_$.x1;
  var Companion_instance_46 = kotlin_com_ustadmobile_app_lib_database.$_$.a8;
  var PersonAndDisplayDetail = kotlin_com_ustadmobile_app_lib_database.$_$.j4;
  var EditAndViewPermission = kotlin_com_ustadmobile_app_lib_database.$_$.a1;
  var PersonPicture = kotlin_com_ustadmobile_app_lib_database.$_$.p4;
  var CentralAppConfigDbDataSource = kotlin_UstadMobile_lib_centralappconfigdb_common.$_$.b;
  var getSystemTimeInMillis = kotlin_com_ustadmobile_app_lib_util.$_$.b;
  var PersonDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.r5;
  var println = kotlin_kotlin.$_$.bb;
  var Settings = kotlin_com_russhwolf_multiplatform_settings.$_$.a;
  var get_lastIndex = kotlin_kotlin.$_$.e8;
  var SiteTermsAndLangName = kotlin_com_ustadmobile_app_lib_database.$_$.j1;
  var contains_0 = kotlin_kotlin.$_$.o6;
  var SiteTerms = kotlin_com_ustadmobile_app_lib_database.$_$.u4;
  var Companion_instance_47 = kotlin_com_ustadmobile_app_lib_database.$_$.h8;
  var shallowCopy_12 = kotlin_com_ustadmobile_app_lib_database.$_$.d2;
  var mutableMapOf = kotlin_kotlin.$_$.r8;
  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.$_$.lc;
  var KMutableProperty0 = kotlin_kotlin.$_$.td;
  var useEffect = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.i;
  var isSuccess = kotlin_io_ktor_ktor_http.$_$.h1;
  var TransferJobItemStatus_FAILED_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.d5;
  var TransferJob = kotlin_com_ustadmobile_app_lib_database.$_$.y4;
  var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
  var TransferJobItem = kotlin_com_ustadmobile_app_lib_database.$_$.x4;
  var TransferJobItemStatus_IN_PROGRESS_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.e5;
  var NonCancellable_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y;
  var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
  var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u1;
  var randomUuid = kotlin_com_github_UstadMobile_door_door_runtime.$_$.c2;
  var fetch_0 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_web.$_$.a;
  var IllegalStateException_init_$Create$_1 = kotlin_kotlin.$_$.c2;
  var Companion_getInstance_15 = kotlin_io_ktor_ktor_http.$_$.c;
  var TextContent = kotlin_io_ktor_ktor_http.$_$.q;
  var JsType_instance = kotlin_io_ktor_ktor_utils.$_$.b;
  var typeInfoImpl = kotlin_io_ktor_ktor_utils.$_$.k;
  var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.p;
  var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
  var Text_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
  var doorNodeAndVersionHeaders = kotlin_com_github_UstadMobile_door_door_runtime.$_$.i;
  var IntCompanionObject_instance = kotlin_kotlin.$_$.y4;
  var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g2;
  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 XXStringHasherJs = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.b;
  var XXHasher64FactoryJs = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.a;
  var XXHasher64Factory = kotlin_UstadMobile_lib_xxhashkmp_core.$_$.c;
  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(LearningSpace, 'LearningSpace', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_11});
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor(LearningSpaceScope, 'LearningSpaceScope', classMeta, VOID, VOID, LearningSpaceScope);
  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(UserSessionWithPersonAndLearningSpace, 'UserSessionWithPersonAndLearningSpace', 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$registerWithPasskey$slambda$slambda, 'UstadAccountManager$registerWithPasskey$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  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$registerWithPasskey$slambda, 'UstadAccountManager$registerWithPasskey$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$loginWithPasskey$slambda, 'UstadAccountManager$loginWithPasskey$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$9, '$startGuestSessionCOROUTINE$9', classMeta, CoroutineImpl);
  setMetadataFor(UstadAccountManager, 'UstadAccountManager', classMeta, VOID, VOID, VOID, VOID, VOID, [1, 2, 4, 3, 5, 0]);
  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(ValidateUsernameUseCase, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase);
  setMetadataFor($invokeCOROUTINE$10, '$invokeCOROUTINE$10', classMeta, CoroutineImpl);
  setMetadataFor(CheckRegistrationAllowedUseCase, 'CheckRegistrationAllowedUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CreateNewLocalAccountUseCase, 'CreateNewLocalAccountUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  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$11, '$invokeCOROUTINE$11', 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$12, '$invokeCOROUTINE$12', 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$14, '$collectCOROUTINE$14', 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$13, '$invokeCOROUTINE$13', classMeta, CoroutineImpl);
  setMetadataFor(GetAssignmentSubmitterNameUseCase, 'GetAssignmentSubmitterNameUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ZipFileUseCase, 'ZipFileUseCase', interfaceMeta);
  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$16, '$invokeCOROUTINE$16', 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$17, '$invokeCOROUTINE$17', 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.tor(localUrisToSave, onTransferJobItemCreated, $completion) : $super.tor.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$18, '$invokeCOROUTINE$18', 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$19, '$commitCOROUTINE$19', classMeta, CoroutineImpl);
  setMetadataFor($onFinishedCOROUTINE$20, '$onFinishedCOROUTINE$20', classMeta, CoroutineImpl);
  setMetadataFor(TransferJobItemStatusUpdater, 'TransferJobItemStatusUpdater', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$21, '$invokeCOROUTINE$21', 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.mox(items, batchUuid, chunkSize, tableId, entityUid, $completion) : $super.mox.call(this, items, batchUuid, chunkSize, tableId, entityUid, $completion);
  }
  setMetadataFor(EnqueueBlobUploadClientUseCase, 'EnqueueBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($getLocalUriIfRemoteCOROUTINE$22, '$getLocalUriIfRemoteCOROUTINE$22', 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.coy(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion) : $super.coy.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$23, '$invokeCOROUTINE$23', 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($invokeCOROUTINE$24, '$invokeCOROUTINE$24', classMeta, CoroutineImpl);
  setMetadataFor(EnrolIntoCourseUseCase, 'EnrolIntoCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$25, '$invokeCOROUTINE$25', 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.vp1(fromUri, toUri, params, onProgress, $completion) : $super.vp1.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_54});
  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.qp3(subtitleTrackUri, filename, locale, $completion) : $super.qp3.call(this, subtitleTrackUri, filename, locale, $completion);
  }
  setMetadataFor(GetSubtitleTrackFromUriUseCase, 'GetSubtitleTrackFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(CancelImportContentEntryUseCase, 'CancelImportContentEntryUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$26, '$invokeCOROUTINE$26', classMeta, CoroutineImpl);
  setMetadataFor(CancelRemoteContentEntryImportUseCase, 'CancelRemoteContentEntryImportUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$27, '$invokeCOROUTINE$27', classMeta, CoroutineImpl);
  setMetadataFor(DismissRemoteContentEntryImportErrorUseCase, 'DismissRemoteContentEntryImportErrorUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueContentEntryImportUseCase, 'EnqueueContentEntryImportUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$28, '$invokeCOROUTINE$28', 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$29, '$invokeCOROUTINE$29', 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$30, '$invokeCOROUTINE$30', 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(CreatePasskeyUseCase, 'CreatePasskeyUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CredentialResult, 'CredentialResult', classMeta);
  setMetadataFor(PasswordCredentialResult, 'PasswordCredentialResult', classMeta, CredentialResult);
  setMetadataFor(PasskeyCredentialResult, 'PasskeyCredentialResult', classMeta, CredentialResult);
  setMetadataFor(NoCredentialAvailableResult, 'NoCredentialAvailableResult', classMeta, CredentialResult);
  setMetadataFor(Error_1, 'Error', classMeta, CredentialResult);
  setMetadataFor(GetCredentialUseCase, 'GetCredentialUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_41, 'Companion', objectMeta);
  setMetadataFor($serializer_35, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PasskeyVerifyResult, 'PasskeyVerifyResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_47});
  setMetadataFor(SavePersonPasskeyUseCase, 'SavePersonPasskeyUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(DecodeUserHandleUseCase, 'DecodeUserHandleUseCase', interfaceMeta);
  setMetadataFor(Companion_42, 'Companion', objectMeta);
  setMetadataFor($serializer_36, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsClientOutputsJSON, 'AuthenticationExtensionsClientOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsClientOutputsJSON, VOID, {0: $serializer_getInstance_48});
  setMetadataFor(Companion_43, 'Companion', objectMeta);
  setMetadataFor($serializer_37, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationExtensionsPRFOutputsJSON, 'AuthenticationExtensionsPRFOutputsJSON', classMeta, VOID, VOID, AuthenticationExtensionsPRFOutputsJSON, VOID, {0: $serializer_getInstance_49});
  setMetadataFor(Companion_44, 'Companion', objectMeta);
  setMetadataFor($serializer_38, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticationResponseJSON, 'AuthenticationResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_50});
  setMetadataFor($serializer_39, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(AuthenticatorAssertionResponseJSON, 'AuthenticatorAssertionResponseJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_51});
  setMetadataFor(Companion_45, 'Companion', objectMeta);
  setMetadataFor($serializer_40, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClientDataJSON, 'ClientDataJSON', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_52});
  setMetadataFor(SavePasswordUseCase, 'SavePasswordUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CreateCredentialUsernameUseCase, 'CreateCredentialUsernameUseCase', classMeta);
  setMetadataFor(ParseCredentialUsernameUseCase, 'ParseCredentialUsernameUseCase', classMeta, VOID, VOID, ParseCredentialUsernameUseCase);
  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$31, '$invokeCOROUTINE$31', classMeta, CoroutineImpl);
  setMetadataFor(GetEpubTableOfContentsUseCase, 'GetEpubTableOfContentsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_46, '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(HideKeyboardUseCase, 'HideKeyboardUseCase', interfaceMeta);
  setMetadataFor(GetHtmlContentDisplayEngineOptionsUseCase, 'GetHtmlContentDisplayEngineOptionsUseCase', classMeta);
  setMetadataFor(GetHtmlContentDisplayEngineUseCase, 'GetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(Companion_47, 'Companion', objectMeta);
  setMetadataFor(SetHtmlContentDisplayEngineUseCase, 'SetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(ExceptionWithStringResource, 'ExceptionWithStringResource', interfaceMeta);
  setMetadataFor(ClazzInviteRedeemException, 'ClazzInviteRedeemException', classMeta, Exception, [Exception, ExceptionWithStringResource]);
  setMetadataFor(ClazzInviteRedeemUseCase$invoke$slambda, 'ClazzInviteRedeemUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$32, '$invokeCOROUTINE$32', classMeta, CoroutineImpl);
  setMetadataFor(ClazzInviteRedeemUseCase, 'ClazzInviteRedeemUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(ClazzRedeemResult, 'ClazzRedeemResult', classMeta);
  setMetadataFor($invokeCOROUTINE$33, '$invokeCOROUTINE$33', classMeta, CoroutineImpl);
  setMetadataFor(EnrollToCourseFromInviteCodeUseCase, 'EnrollToCourseFromInviteCodeUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ParseInviteUseCase, 'ParseInviteUseCase', classMeta);
  setMetadataFor(Companion_48, 'Companion', objectMeta);
  setMetadataFor($serializer_41, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SendClazzInvitesRequest, 'SendClazzInvitesRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_53});
  setMetadataFor(SendClazzInvitesUseCase, 'SendClazzInvitesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$34, '$invokeCOROUTINE$34', classMeta, CoroutineImpl);
  setMetadataFor(SendClazzInvitesUseCaseSendToServerImpl, 'SendClazzInvitesUseCaseSendToServerImpl', classMeta, VOID, [SendClazzInvitesUseCase], VOID, VOID, VOID, [1]);
  setMetadataFor(SetLangResult, 'SetLangResult', classMeta);
  function invoke$default_4(uiLang, currentDestination, navController, navArgs, $super) {
    navArgs = navArgs === VOID ? emptyMap() : navArgs;
    return $super === VOID ? this.fpi(uiLang, currentDestination, navController, navArgs) : $super.fpi.call(this, uiLang, currentDestination, navController, navArgs);
  }
  setMetadataFor(SetLanguageUseCase, 'SetLanguageUseCase', interfaceMeta);
  setMetadataFor(LaunchOpenLicensesUseCase, 'LaunchOpenLicensesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(GoToLearningSpaceUseCase, 'GoToLearningSpaceUseCase', interfaceMeta);
  setMetadataFor(GetLocalAccountsSupportedUseCase, 'GetLocalAccountsSupportedUseCase', classMeta);
  setMetadataFor(MakeLinkUseCase, 'MakeLinkUseCase', classMeta);
  setMetadataFor(GetDefaultDestinationUseCase, 'GetDefaultDestinationUseCase', classMeta);
  setMetadataFor(OnClickLinkUseCase, 'OnClickLinkUseCase', classMeta);
  setMetadataFor(Companion_49, 'Companion', objectMeta);
  setMetadataFor(LinkTarget, 'LinkTarget', classMeta, Enum);
  setMetadataFor(OpenExternalLinkUseCase, 'OpenExternalLinkUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$35, '$invokeCOROUTINE$35', 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, [5]);
  setMetadataFor(BulkAddPersonException, 'BulkAddPersonException', classMeta, IllegalArgumentException);
  setMetadataFor($serializer_42, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonsDataError, 'BulkAddPersonsDataError', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_54});
  setMetadataFor(BulkAddPersonsFromLocalUriUseCase, 'BulkAddPersonsFromLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_50, 'Companion', objectMeta);
  setMetadataFor($serializer_43, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddUsersResult, 'BulkAddUsersResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_55});
  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_51, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$36, '$invokeCOROUTINE$36', classMeta, CoroutineImpl);
  setMetadataFor(GetLocaleForSiteTermsUseCase, 'GetLocaleForSiteTermsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(OnClickSendSmsUseCase, 'OnClickSendSmsUseCase', interfaceMeta);
  setMetadataFor(Companion_52, 'Companion', objectMeta);
  setMetadataFor(DismissSocialWarningUseCase, 'DismissSocialWarningUseCase', classMeta);
  setMetadataFor(Companion_53, 'Companion', objectMeta);
  setMetadataFor(ShowSocialWarningUseCase, 'ShowSocialWarningUseCase', classMeta);
  setMetadataFor(GetOfflineStorageAvailableSpace, 'GetOfflineStorageAvailableSpace', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_54, 'Companion', objectMeta);
  setMetadataFor(GetOfflineStorageOptionsUseCase, 'GetOfflineStorageOptionsUseCase', interfaceMeta);
  setMetadataFor(GetOfflineStorageSettingUseCase, 'GetOfflineStorageSettingUseCase', classMeta);
  setMetadataFor(OfflineStorageOption, 'OfflineStorageOption', classMeta);
  setMetadataFor(SetOfflineStorageSettingUseCase, 'SetOfflineStorageSettingUseCase', classMeta);
  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.mpn(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) : $super.mpn.call(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
  }
  setMetadataFor(ChunkedUploadClientLocalUriUseCase, 'ChunkedUploadClientLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [8]);
  setMetadataFor(Companion_55, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$40, '$invokeCOROUTINE$40', classMeta, CoroutineImpl);
  setMetadataFor(GetUsernameSuggestionUseCase, 'GetUsernameSuggestionUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(StartUserSessionUseCase, 'StartUserSessionUseCase', classMeta);
  setMetadataFor(ValidateEmailUseCase, 'ValidateEmailUseCase', classMeta, VOID, VOID, ValidateEmailUseCase);
  setMetadataFor(Companion_56, 'Companion', objectMeta);
  setMetadataFor(ValidateUsernameUseCase_0, 'ValidateUsernameUseCase', classMeta, VOID, VOID, ValidateUsernameUseCase_0);
  setMetadataFor(Companion_57, '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$41, '$invokeCOROUTINE$41', 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$42, '$storeStatementsCOROUTINE$42', classMeta, CoroutineImpl);
  setMetadataFor($postCOROUTINE$44, '$postCOROUTINE$44', classMeta, CoroutineImpl);
  setMetadataFor(XapiStatementResource, 'XapiStatementResource', classMeta, VOID, VOID, VOID, VOID, VOID, [2, 3]);
  setMetadataFor(XapiGroupAndPersonUidMap, 'XapiGroupAndPersonUidMap', classMeta);
  setMetadataFor($invokeCOROUTINE$46, '$invokeCOROUTINE$46', classMeta, CoroutineImpl);
  setMetadataFor(CreateXapiGroupForCourseGroupUseCase, 'CreateXapiGroupForCourseGroupUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($insertOrUpdateActorsIfNameChangedCOROUTINE$47, '$insertOrUpdateActorsIfNameChangedCOROUTINE$47', classMeta, CoroutineImpl);
  setMetadataFor($insertOrUpdateIfLastModChangedCOROUTINE$48, '$insertOrUpdateIfLastModChangedCOROUTINE$48', classMeta, CoroutineImpl);
  setMetadataFor(FormattedStatementResponse, 'FormattedStatementResponse', classMeta);
  setMetadataFor(Companion_58, 'Companion', objectMeta);
  setMetadataFor(FormatStatementResponseUseCase$invoke$slambda, 'FormatStatementResponseUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(FormatStatementResponseUseCase, 'FormatStatementResponseUseCase', classMeta);
  setMetadataFor(Companion_59, 'Companion', objectMeta);
  setMetadataFor($serializer_44, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Attachment, 'Attachment', classMeta, VOID, VOID, Attachment, VOID, {0: $serializer_getInstance_56});
  setMetadataFor(Companion_60, 'Companion', objectMeta);
  setMetadataFor($serializer_45, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiAccount, 'XapiAccount', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_57});
  setMetadataFor(Companion_61, 'Companion', objectMeta);
  setMetadataFor($serializer_46, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Interaction, 'Interaction', classMeta, VOID, VOID, Interaction, VOID, {0: $serializer_getInstance_58});
  setMetadataFor(Companion_62, 'Companion', objectMeta);
  setMetadataFor($serializer_47, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivity, 'XapiActivity', classMeta, VOID, VOID, XapiActivity, VOID, {0: $serializer_getInstance_59});
  setMetadataFor(ActivityEntities, 'ActivityEntities', classMeta);
  setMetadataFor(Companion_63, '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_64, 'Companion', objectMeta);
  setMetadataFor($serializer_48, '$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_60});
  setMetadataFor(Companion_65, 'Companion', objectMeta);
  setMetadataFor($serializer_49, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContext, 'XapiContext', classMeta, VOID, VOID, XapiContext, VOID, {0: $serializer_getInstance_61});
  setMetadataFor(Companion_66, 'Companion', objectMeta);
  setMetadataFor(XapiContextActivities, 'XapiContextActivities', classMeta, VOID, VOID, XapiContextActivities, VOID, {0: XapiContextActivitiesSerializer_getInstance});
  setMetadataFor(XapiContextActivitiesSerializer, 'XapiContextActivitiesSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_67, 'Companion', objectMeta);
  setMetadataFor($serializer_50, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContextActivitiesSurrogate, 'XapiContextActivitiesSurrogate', classMeta, VOID, VOID, XapiContextActivitiesSurrogate, VOID, {0: $serializer_getInstance_62});
  setMetadataFor(Companion_68, 'Companion', objectMeta);
  setMetadataFor($serializer_51, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiGroup, 'XapiGroup', classMeta, VOID, [XapiActor, XapiStatementObject], XapiGroup, VOID, {0: $serializer_getInstance_63});
  setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(Companion_69, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiInteractionType, 'XapiInteractionType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_86});
  setMetadataFor(XapiInteractionTypeSerializer, 'XapiInteractionTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_70, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiObjectType, 'XapiObjectType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_87});
  setMetadataFor(XapiObjectTypeSerializer, 'XapiObjectTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_71, 'Companion', objectMeta);
  setMetadataFor($serializer_52, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Score, 'Score', classMeta, VOID, VOID, Score, VOID, {0: $serializer_getInstance_64});
  setMetadataFor(Companion_72, 'Companion', objectMeta);
  setMetadataFor($serializer_53, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiResult, 'XapiResult', classMeta, VOID, VOID, XapiResult, VOID, {0: $serializer_getInstance_65});
  setMetadataFor(Companion_73, 'Companion', objectMeta);
  setMetadataFor($serializer_54, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatement, 'XapiStatement', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_66});
  setMetadataFor(StatementEntities, 'StatementEntities', classMeta, VOID, VOID, StatementEntities);
  setMetadataFor(XapiStatementObjectSerializer, 'XapiStatementObjectSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(Companion_74, 'Companion', objectMeta);
  setMetadataFor($serializer_55, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivityStatementObject, 'XapiActivityStatementObject', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_67});
  setMetadataFor(Companion_75, 'Companion', objectMeta);
  setMetadataFor($serializer_56, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementRef, 'XapiStatementRef', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_68});
  setMetadataFor(Companion_76, 'Companion', objectMeta);
  setMetadataFor($serializer_57, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiVerb, 'XapiVerb', classMeta, VOID, VOID, XapiVerb, VOID, {0: $serializer_getInstance_69});
  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_77, 'Companion', objectMeta);
  setMetadataFor($serializer_58, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementsAndSession, 'XapiStatementsAndSession', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_70});
  setMetadataFor(ResumeOrStartXapiSessionUseCase, 'ResumeOrStartXapiSessionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(UstadMobileConstants, 'UstadMobileConstants', objectMeta);
  setMetadataFor(Companion_78, 'Companion', objectMeta);
  setMetadataFor(UstadGoOptions, 'UstadGoOptions', classMeta, VOID, VOID, UstadGoOptions);
  setMetadataFor(UiLanguage, 'UiLanguage', classMeta);
  setMetadataFor(Companion_79, '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_80, '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(UstadBuildConfig, 'UstadBuildConfig', interfaceMeta);
  setMetadataFor(BuildConfigMap, 'BuildConfigMap', classMeta, VOID, [UstadBuildConfig]);
  setMetadataFor(Companion_81, 'Companion', objectMeta);
  setMetadataFor(GenderConfig, 'GenderConfig', classMeta, VOID, VOID, GenderConfig);
  setMetadataFor(SettingsLocaleSettingDelegate, 'SettingsLocaleSettingDelegate', classMeta);
  setMetadataFor(Companion_82, 'Companion', objectMeta);
  setMetadataFor(SupportedLanguagesConfig, 'SupportedLanguagesConfig', classMeta);
  setMetadataFor(Companion_83, 'Companion', objectMeta);
  setMetadataFor(SystemUrlConfig, 'SystemUrlConfig', classMeta);
  setMetadataFor(Companion_84, 'Companion', objectMeta);
  setMetadataFor(Companion_85, '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_95().zq3_1 : goOptions;
    var tmp;
    if ($super === VOID) {
      this.iq9(viewName, args, goOptions);
      tmp = Unit_instance;
    } else {
      tmp = $super.iq9.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$49, '$collectCOROUTINE$49', 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(Activity, 'Activity', classMeta);
  setMetadataFor(Companion_86, 'Companion', objectMeta);
  setMetadataFor(TinCanXML, 'TinCanXML', classMeta, VOID, VOID, TinCanXML);
  setMetadataFor(Companion_87, 'Companion', objectMeta);
  setMetadataFor(UsernameSuggestionUseCase, 'UsernameSuggestionUseCase', classMeta);
  setMetadataFor(UsernameErrorException, 'UsernameErrorException', classMeta, Exception);
  setMetadataFor(DiTag, 'DiTag', objectMeta);
  setMetadataFor(EventCollator2$receiveEvent$slambda, 'EventCollator2$receiveEvent$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EventCollator2, 'EventCollator2', classMeta);
  setMetadataFor(Companion_88, 'Companion', objectMeta);
  setMetadataFor(MessageIdOption2, 'MessageIdOption2', classMeta);
  setMetadataFor(SortOrderOption, 'SortOrderOption', classMeta);
  setMetadataFor(UMFileUtil, 'UMFileUtil', objectMeta);
  setMetadataFor(Companion_89, 'Companion', objectMeta);
  setMetadataFor(UstadUrlComponents, 'UstadUrlComponents', classMeta);
  setMetadataFor($verifySiteCOROUTINE$50, '$verifySiteCOROUTINE$50', 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$51, '$collectCOROUTINE$51', 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$52, '$insertPersonAndGroupCOROUTINE$52', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfFalseCOROUTINE$53, '$localFirstThenRepoIfFalseCOROUTINE$53', classMeta, CoroutineImpl);
  setMetadataFor($grantScopedPermissionCOROUTINE$54, '$grantScopedPermissionCOROUTINE$54', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfNullCOROUTINE$55, '$localFirstThenRepoIfNullCOROUTINE$55', classMeta, CoroutineImpl);
  setMetadataFor(Companion_90, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(IStringValues, 'IStringValues', interfaceMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_107});
  setMetadataFor(MapStringValues, 'MapStringValues', classMeta, VOID, [IStringValues]);
  setMetadataFor(StringValuesSerializer, 'StringValuesSerializer', classMeta, VOID, [KSerializer], StringValuesSerializer);
  setMetadataFor(Companion_91, 'Companion', objectMeta);
  setMetadataFor(Companion_92, 'Companion', objectMeta);
  setMetadataFor(Companion_93, 'Companion', objectMeta);
  setMetadataFor(Companion_94, 'Companion', objectMeta);
  setMetadataFor(Companion_95, 'Companion', objectMeta);
  setMetadataFor(Companion_96, 'Companion', objectMeta);
  setMetadataFor(Companion_97, 'Companion', objectMeta);
  setMetadataFor(Companion_98, 'Companion', objectMeta);
  setMetadataFor(ListViewMode, 'ListViewMode', classMeta, Enum);
  setMetadataFor(Companion_99, '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_100, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarEditUiState, 'HolidayCalendarEditUiState', classMeta, VOID, VOID, HolidayCalendarEditUiState);
  setMetadataFor(Companion_101, '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_102, '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_103, '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_104, 'Companion', objectMeta);
  setMetadataFor(ReportFilterEditUiState, 'ReportFilterEditUiState', classMeta, VOID, VOID, ReportFilterEditUiState);
  setMetadataFor(ScopedGrantDetailUiState, 'ScopedGrantDetailUiState', classMeta, VOID, VOID, ScopedGrantDetailUiState);
  setMetadataFor(Companion_105, 'Companion', objectMeta);
  setMetadataFor(ScopedGrantEditUiState, 'ScopedGrantEditUiState', classMeta, VOID, VOID, ScopedGrantEditUiState);
  setMetadataFor(Companion_106, 'Companion', objectMeta);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_107, '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$59, '$collectCOROUTINE$59', classMeta, CoroutineImpl);
  setMetadataFor(Companion_108, '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$56, '$getJsonCOROUTINE$56', classMeta, CoroutineImpl);
  setMetadataFor($setJsonCOROUTINE$57, '$setJsonCOROUTINE$57', classMeta, CoroutineImpl);
  setMetadataFor($loadEntityCOROUTINE$58, '$loadEntityCOROUTINE$58', classMeta, CoroutineImpl);
  setMetadataFor(Companion_109, 'Companion', objectMeta);
  setMetadataFor(OpenLicensesViewModel, 'OpenLicensesViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_110, 'Companion', objectMeta);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda, 'AddAccountSelectNewOrExistingViewModel$getCredentials$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda, 'AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddAccountSelectNewOrExistingViewModel, 'AddAccountSelectNewOrExistingViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AddAccountSelectNewOrExistingUiState, 'AddAccountSelectNewOrExistingUiState', classMeta, VOID, VOID, AddAccountSelectNewOrExistingUiState);
  setMetadataFor(Companion_111, 'Companion', objectMeta);
  setMetadataFor(AddAccountSelectNewOrExistingUserTypeViewModel, 'AddAccountSelectNewOrExistingUserTypeViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AddAccountSelectNewOrExistingUserTypeUiState, 'AddAccountSelectNewOrExistingUserTypeUiState', classMeta, VOID, VOID, AddAccountSelectNewOrExistingUserTypeUiState);
  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_112, '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$onClickAddAccount$slambda, 'AccountListViewModel$onClickAddAccount$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(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$60, '$getTitleForCoursePermissionCOROUTINE$60', 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_113, '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, '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(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$61, '$collectCOROUTINE$61', 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$slambda_3, '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(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3, '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$62, '$collectCOROUTINE$62', 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$63, '$collectCOROUTINE$63', 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_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$slambda_7, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_114, 'Companion', objectMeta);
  setMetadataFor(ClazzAction, 'ClazzAction', classMeta, Enum);
  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$slambda_1, 'ClazzDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$onClickCopyCourse$slambda, 'ClazzDetailOverviewViewModel$onClickCopyCourse$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(Companion_115, 'Companion', objectMeta);
  setMetadataFor($serializer_59, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CopyCourseResult, 'CopyCourseResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_71});
  setMetadataFor($invokeCOROUTINE$64, '$invokeCOROUTINE$64', classMeta, CoroutineImpl);
  setMetadataFor(CopyCourseUseCase, 'CopyCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  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_116, '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$65, '$updateCourseBlockListCOROUTINE$65', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEditViewModel, 'ClazzEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(CourseBlockUiState, 'CourseBlockUiState', classMeta);
  setMetadataFor(Companion_117, 'Companion', objectMeta);
  setMetadataFor($serializer_60, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzEditUiState, 'ClazzEditUiState', classMeta, VOID, VOID, ClazzEditUiState, VOID, {0: $serializer_getInstance_72});
  setMetadataFor($loadCOROUTINE$66, '$loadCOROUTINE$66', classMeta, CoroutineImpl);
  setMetadataFor($loadHttpCOROUTINE$67, '$loadHttpCOROUTINE$67', 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_118, '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(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_119, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_12, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$lambda$slambda, 'ClazzInviteRedeemViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel$processDecision$slambda, 'ClazzInviteRedeemViewModel$processDecision$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzInviteRedeemViewModel, 'ClazzInviteRedeemViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzInviteRedeemUiState, 'ClazzInviteRedeemUiState', classMeta, VOID, VOID, ClazzInviteRedeemUiState);
  setMetadataFor(Companion_120, 'Companion', objectMeta);
  setMetadataFor(ClazzInviteViaContactViewModel$onClickSend$slambda, 'ClazzInviteViaContactViewModel$onClickSend$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($sendContactsToServerCOROUTINE$68, '$sendContactsToServerCOROUTINE$68', classMeta, CoroutineImpl);
  setMetadataFor(ClazzInviteViaContactViewModel, 'ClazzInviteViaContactViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(ClazzInviteViaContactUiState, 'ClazzInviteViaContactUiState', classMeta, VOID, VOID, ClazzInviteViaContactUiState);
  setMetadataFor(InviteViaContactChip, 'InviteViaContactChip', classMeta);
  setMetadataFor(Companion_121, 'Companion', objectMeta);
  setMetadataFor(ClazzInviteViaLinkViewModel, 'ClazzInviteViaLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzInviteViaLinkUiState, 'ClazzInviteViaLinkUiState', classMeta, VOID, VOID, ClazzInviteViaLinkUiState);
  setMetadataFor(Companion_122, '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_123, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_13, '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_124, '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_125, '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_126, '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_127, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_14, '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_128, '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_129, '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_130, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_15, '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_131, '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$69, '$collectCOROUTINE$69', 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_132, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_16, '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_133, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_17, '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_134, 'Companion', objectMeta);
  setMetadataFor($serializer_61, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzAssignmentEditUiState, 'ClazzAssignmentEditUiState', classMeta, VOID, VOID, ClazzAssignmentEditUiState, VOID, {0: $serializer_getInstance_73});
  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_135, '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_136, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_18, '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_137, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_19, '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$onClickRevokeInvite$slambda, 'ClazzMemberListViewModel$onClickRevokeInvite$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickResendInvite$slambda, 'ClazzMemberListViewModel$onClickResendInvite$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_138, '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$70, '$collectCOROUTINE$70', 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$71, '$collectCOROUTINE$71', 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_139, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_20, '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_140, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_21, '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_141, '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_142, '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$72, '$savePersonAndAttendanceRecordsCOROUTINE$72', classMeta, CoroutineImpl);
  setMetadataFor($commitAttendanceRecordsToStateCOROUTINE$73, '$commitAttendanceRecordsToStateCOROUTINE$73', classMeta, CoroutineImpl);
  setMetadataFor(ClazzLogEditAttendanceViewModel, 'ClazzLogEditAttendanceViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 0, 3, 6]);
  setMetadataFor(ClazzLogEditAttendanceUiState, 'ClazzLogEditAttendanceUiState', classMeta, VOID, VOID, ClazzLogEditAttendanceUiState);
  setMetadataFor(Companion_143, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailViewModel, 'ContentEntryDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailUiState, 'ContentEntryDetailUiState', classMeta, VOID, VOID, ContentEntryDetailUiState);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_144, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_22, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda, 'ContentEntryDetailAttemptsPersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel$slambda_1, 'ContentEntryDetailAttemptsPersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($buildSortOptionsCOROUTINE$74, '$buildSortOptionsCOROUTINE$74', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryDetailAttemptsPersonListViewModel, 'ContentEntryDetailAttemptsPersonListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [1, 3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsPersonListUiState, 'ContentEntryDetailAttemptsPersonListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsPersonListUiState);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1, 'ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_145, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel$slambda, 'ContentEntryDetailAttemptsSessionListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListViewModel, 'ContentEntryDetailAttemptsSessionListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsSessionListUiState, 'ContentEntryDetailAttemptsSessionListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsSessionListUiState);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_146, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_23, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel$slambda, 'ContentEntryDetailAttemptsStatementListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListViewModel, 'ContentEntryDetailAttemptsStatementListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ContentEntryDetailAttemptsStatementListUiState, 'ContentEntryDetailAttemptsStatementListUiState', classMeta, VOID, VOID, ContentEntryDetailAttemptsStatementListUiState);
  setMetadataFor(StatementSummaryEntity, 'StatementSummaryEntity', classMeta);
  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_147, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_24, '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_148, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_25, '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_149, '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_150, '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_151, '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_152, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_26, '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_153, 'Companion', objectMeta);
  setMetadataFor(ContentEntryListUiState, 'ContentEntryListUiState', classMeta, VOID, VOID, ContentEntryListUiState);
  setMetadataFor(Companion_154, 'Companion', objectMeta);
  setMetadataFor($serializer_62, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentEntryListSelectedItem, 'ContentEntryListSelectedItem', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_74});
  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_155, '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_156, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompletionCriteria, 'CompletionCriteria', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_173});
  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_157, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_27, '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_158, 'Companion', objectMeta);
  setMetadataFor($serializer_63, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CourseBlockEditUiState, 'CourseBlockEditUiState', classMeta, VOID, VOID, CourseBlockEditUiState, VOID, {0: $serializer_getInstance_75});
  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_159, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_28, '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_160, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_29, '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_161, '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_162, '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_163, '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_164, '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_165, '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_166, '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_167, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_30, '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_168, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_31, '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$75, '$submitReplyCOROUTINE$75', 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_169, '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_170, '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_171, 'Companion', objectMeta);
  setMetadataFor(Companion_172, '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$getCredentials$slambda, 'LoginViewModel$getCredentials$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_173, '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_174, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_32, '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_175, '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_176, '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_177, '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_178, 'Companion', objectMeta);
  setMetadataFor($serializer_64, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PersonUsernameAndPasswordModel, 'PersonUsernameAndPasswordModel', classMeta, VOID, VOID, PersonUsernameAndPasswordModel, VOID, {0: $serializer_getInstance_76});
  setMetadataFor(Companion_179, '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_180, 'Companion', objectMeta);
  setMetadataFor($serializer_65, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonRunImportUiState, 'BulkAddPersonRunImportUiState', classMeta, VOID, VOID, BulkAddPersonRunImportUiState, VOID, {0: $serializer_getInstance_77});
  setMetadataFor(Companion_181, '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(AddChildProfilesViewModel$slambda$slambda$slambda, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda_1, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda$slambda_3, 'AddChildProfilesViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda$slambda, 'AddChildProfilesViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_182, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_33, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda, 'AddChildProfilesViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$slambda_1, 'AddChildProfilesViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$updateChildProfileList$slambda, 'AddChildProfilesViewModel$updateChildProfileList$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda, 'AddChildProfilesViewModel$onClickDeleteChildProfile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddChildProfilesViewModel$onProfileSelected$slambda, 'AddChildProfilesViewModel$onProfileSelected$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($updateChildProfileListCOROUTINE$76, '$updateChildProfileListCOROUTINE$76', classMeta, CoroutineImpl);
  setMetadataFor(AddChildProfilesViewModel, 'AddChildProfilesViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(AddChildProfilesUiState, 'AddChildProfilesUiState', classMeta, VOID, VOID, AddChildProfilesUiState);
  setMetadataFor(EditChildProfileViewModel$slambda$slambda, 'EditChildProfileViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel$slambda$slambda_1, 'EditChildProfileViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_183, 'Companion', objectMeta);
  setMetadataFor(EditChildProfileViewModel$slambda, 'EditChildProfileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel$onEntityChanged$slambda, 'EditChildProfileViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EditChildProfileViewModel, 'EditChildProfileViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EditChildProfileUiState, 'EditChildProfileUiState', classMeta, VOID, VOID, EditChildProfileUiState);
  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_184, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_34, '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_185, '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(LearningSpaceListViewModel$slambda$slambda$slambda, 'LearningSpaceListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel$slambda$slambda, 'LearningSpaceListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_186, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_35, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel$slambda, 'LearningSpaceListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceListViewModel, 'LearningSpaceListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(LearningSpaceListUiState, 'LearningSpaceListUiState', classMeta, VOID, VOID, LearningSpaceListUiState);
  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_187, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_36, '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(ManageAccountViewModel$slambda$slambda, 'ManageAccountViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda$slambda_1, 'ManageAccountViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_188, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_37, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda, 'ManageAccountViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel$slambda_1, 'ManageAccountViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ManageAccountViewModel, 'ManageAccountViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ManageAccountUiState, 'ManageAccountUiState', classMeta, VOID, VOID, ManageAccountUiState);
  setMetadataFor(Companion_189, 'Companion', objectMeta);
  setMetadataFor(RegisterAgeRedirectViewModel, 'RegisterAgeRedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterAgeRedirectUiState, 'RegisterAgeRedirectUiState', classMeta, VOID, VOID, RegisterAgeRedirectUiState);
  setMetadataFor(Companion_190, 'Companion', objectMeta);
  setMetadataFor(RegisterMinorWaitForParentViewModel, 'RegisterMinorWaitForParentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterMinorWaitForParentUiState, 'RegisterMinorWaitForParentUiState', classMeta, VOID, VOID, RegisterMinorWaitForParentUiState);
  setMetadataFor(Companion_191, '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_192, '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_193, 'Companion', objectMeta);
  setMetadataFor(SettingsViewModel$slambda$slambda, 'SettingsViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_194, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_38, '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(Companion_195, 'Companion', objectMeta);
  setMetadataFor(SignUpViewModel$slambda$slambda, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$slambda$slambda_1, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SignUpViewModel$slambda$slambda_3, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$slambda$slambda_5, 'SignUpViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_196, 'Companion', objectMeta);
  setMetadataFor(SignUpViewModel$slambda, 'SignUpViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onEntityChanged$slambda, 'SignUpViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onPersonPictureChanged$slambda, 'SignUpViewModel$onPersonPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onFullNameFocusedChanged$slambda, 'SignUpViewModel$onFullNameFocusedChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignUpViewModel$onClickSignup$slambda, 'SignUpViewModel$onClickSignup$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($enrollToCourseFromInviteUidCOROUTINE$78, '$enrollToCourseFromInviteUidCOROUTINE$78', classMeta, CoroutineImpl);
  setMetadataFor(SignUpViewModel, 'SignUpViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(SignUpUiState, 'SignUpUiState', classMeta, VOID, VOID, SignUpUiState);
  setMetadataFor(Companion_197, 'Companion', objectMeta);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$slambda, 'SignupEnterUsernamePasswordViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda, 'SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda, 'SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SignupEnterUsernamePasswordViewModel, 'SignupEnterUsernamePasswordViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SignupEnterUsernamePasswordUiState, 'SignupEnterUsernamePasswordUiState', classMeta, VOID, VOID, SignupEnterUsernamePasswordUiState);
  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_198, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_39, '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_199, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_40, '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_200, '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_201, 'Companion', objectMeta);
  setMetadataFor(LearningSpaceEnterLinkViewModel$onClickNext$slambda, 'LearningSpaceEnterLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LearningSpaceEnterLinkViewModel, 'LearningSpaceEnterLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LearningSpaceEnterLinkUiState, 'LearningSpaceEnterLinkUiState', classMeta, VOID, VOID, LearningSpaceEnterLinkUiState);
  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_202, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_41, '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_203, '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_204, '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_205, '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_206, '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$79, '$encryptPbkdf2COROUTINE$79', classMeta, CoroutineImpl);
  setMetadataFor($doublePbkdf2HashAsBase64COROUTINE$81, '$doublePbkdf2HashAsBase64COROUTINE$81', 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$82, '$invokeCOROUTINE$82', 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$83, '$invokeCOROUTINE$83', 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$84, '$invokeCOROUTINE$84', classMeta, CoroutineImpl);
  setMetadataFor(CompressImageUseCaseJs, 'CompressImageUseCaseJs', classMeta, VOID, [CompressUseCase], CompressImageUseCaseJs, VOID, VOID, [4]);
  setMetadataFor(Companion_207, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$85, '$invokeCOROUTINE$85', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCaseJs, 'ContentEntryGetMetaDataFromUriUseCaseJs', classMeta, VOID, [ContentEntryGetMetaDataFromUriUseCase], VOID, VOID, VOID, [4]);
  setMetadataFor($invokeCOROUTINE$86, '$invokeCOROUTINE$86', classMeta, CoroutineImpl);
  setMetadataFor(GetSubtitleTrackFromUriUseCaseJs, 'GetSubtitleTrackFromUriUseCaseJs', classMeta, VOID, [GetSubtitleTrackFromUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor($invokeCOROUTINE$87, '$invokeCOROUTINE$87', classMeta, CoroutineImpl);
  setMetadataFor(LaunchXapiUseCaseJs, 'LaunchXapiUseCaseJs', classMeta, VOID, [LaunchXapiUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(SetLanguageUseCaseJs, 'SetLanguageUseCaseJs', classMeta, VOID, [SetLanguageUseCase]);
  setMetadataFor(GoToLearningSpaceUseCaseJs, 'GoToLearningSpaceUseCaseJs', classMeta, VOID, [GoToLearningSpaceUseCase]);
  setMetadataFor(OpenExternalLinkUseCaseJs, 'OpenExternalLinkUseCaseJs', classMeta, VOID, [OpenExternalLinkUseCase], OpenExternalLinkUseCaseJs);
  setMetadataFor(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda, 'BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$88, '$invokeCOROUTINE$88', 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$89, '$invokeCOROUTINE$89', 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$90, '$invokeCOROUTINE$90', classMeta, CoroutineImpl);
  setMetadataFor(ResumeOrStartXapiSessionUseCaseJs, 'ResumeOrStartXapiSessionUseCaseJs', classMeta, VOID, [ResumeOrStartXapiSessionUseCase], VOID, VOID, VOID, [7]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_42, '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_43, '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_208, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemImpl, 'UstadMobileSystemImpl', classMeta, UstadMobileSystemCommon, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(StringProviderJs, 'StringProviderJs', classMeta);
  setMetadataFor(Companion_209, 'Companion', objectMeta);
  setMetadataFor(SavedStateHandle2, 'SavedStateHandle2', classMeta);
  setMetadataFor(UrlKmpJs, 'UrlKmpJs', classMeta);
  setMetadataFor(Companion_210, '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.dmi_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.emi_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.fmi_1 = new Impl(this.emi_1, this.dmi_1);
    this.gmi_1 = new StringResource('app_name', this.fmi_1);
    this.hmi_1 = new StringResource('blank', this.fmi_1);
    this.imi_1 = new StringResource('login', this.fmi_1);
    this.jmi_1 = new StringResource('got_it', this.fmi_1);
    this.kmi_1 = new StringResource('learn_more', this.fmi_1);
    this.lmi_1 = new StringResource('be_careful_interacting_online', this.fmi_1);
    this.mmi_1 = new StringResource('be_careful_not_to_share', this.fmi_1);
    this.nmi_1 = new StringResource('share_app', this.fmi_1);
    this.omi_1 = new StringResource('send_apk_file', this.fmi_1);
    this.pmi_1 = new StringResource('send_app_link', this.fmi_1);
    this.qmi_1 = new StringResource('error', this.fmi_1);
    this.rmi_1 = new StringResource('create_backup', this.fmi_1);
    this.smi_1 = new StringResource('create_backup_description', this.fmi_1);
    this.tmi_1 = new StringResource('err_registering_new_user', this.fmi_1);
    this.umi_1 = new StringResource('register_empty_fields', this.fmi_1);
    this.vmi_1 = new StringResource('register_incorrect_email', this.fmi_1);
    this.wmi_1 = new StringResource('group_activity', this.fmi_1);
    this.xmi_1 = new StringResource('select_group_members', this.fmi_1);
    this.ymi_1 = new StringResource('confirm_delete_message', this.fmi_1);
    this.zmi_1 = new StringResource('wrong_user_pass_combo', this.fmi_1);
    this.amj_1 = new StringResource('login_network_error', this.fmi_1);
    this.bmj_1 = new StringResource('download', this.fmi_1);
    this.cmj_1 = new StringResource('downloaded', this.fmi_1);
    this.dmj_1 = new StringResource('recycled', this.fmi_1);
    this.emj_1 = new StringResource('libraries', this.fmi_1);
    this.fmj_1 = new StringResource('pause_download', this.fmi_1);
    this.gmj_1 = new StringResource('ok', this.fmi_1);
    this.hmj_1 = new StringResource('confirm', this.fmi_1);
    this.imj_1 = new StringResource('cancel', this.fmi_1);
    this.jmj_1 = new StringResource('canceled', this.fmi_1);
    this.kmj_1 = new StringResource('delete', this.fmi_1);
    this.lmj_1 = new StringResource('deleted', this.fmi_1);
    this.mmj_1 = new StringResource('new_tab', this.fmi_1);
    this.nmj_1 = new StringResource('loading', this.fmi_1);
    this.omj_1 = new StringResource('deleting', this.fmi_1);
    this.pmj_1 = new StringResource('processing', this.fmi_1);
    this.qmj_1 = new StringResource('uploading', this.fmi_1);
    this.rmj_1 = new StringResource('error_opening_file', this.fmi_1);
    this.smj_1 = new StringResource('logout', this.fmi_1);
    this.tmj_1 = new StringResource('about', this.fmi_1);
    this.umj_1 = new StringResource('download_all', this.fmi_1);
    this.vmj_1 = new StringResource('next', this.fmi_1);
    this.wmj_1 = new StringResource('previous', this.fmi_1);
    this.xmj_1 = new StringResource('back', this.fmi_1);
    this.ymj_1 = new StringResource('username', this.fmi_1);
    this.zmj_1 = new StringResource('password', this.fmi_1);
    this.amk_1 = new StringResource('confirm_password', this.fmi_1);
    this.bmk_1 = new StringResource('last_name', this.fmi_1);
    this.cmk_1 = new StringResource('first_name', this.fmi_1);
    this.dmk_1 = new StringResource('least_recent', this.fmi_1);
    this.emk_1 = new StringResource('by_score', this.fmi_1);
    this.fmk_1 = new StringResource('by_completion', this.fmi_1);
    this.gmk_1 = new StringResource('by_recent_attempt', this.fmi_1);
    this.hmk_1 = new StringResource('by_timestamp', this.fmi_1);
    this.imk_1 = new StringResource('register_now', this.fmi_1);
    this.jmk_1 = new StringResource('new_password', this.fmi_1);
    this.kmk_1 = new StringResource('phone_memory', this.fmi_1);
    this.lmk_1 = new StringResource('memory_card', this.fmi_1);
    this.mmk_1 = new StringResource('device', this.fmi_1);
    this.nmk_1 = new StringResource('register', this.fmi_1);
    this.omk_1 = new StringResource('phone_number', this.fmi_1);
    this.pmk_1 = new StringResource('name_key', this.fmi_1);
    this.qmk_1 = new StringResource('description', this.fmi_1);
    this.rmk_1 = new StringResource('male', this.fmi_1);
    this.smk_1 = new StringResource('female', this.fmi_1);
    this.tmk_1 = new StringResource('other', this.fmi_1);
    this.umk_1 = new StringResource('unset', this.fmi_1);
    this.vmk_1 = new StringResource('settings', this.fmi_1);
    this.wmk_1 = new StringResource('language', this.fmi_1);
    this.xmk_1 = new StringResource('add_a_new_language', this.fmi_1);
    this.ymk_1 = new StringResource('add_new_language', this.fmi_1);
    this.zmk_1 = new StringResource('select_language', this.fmi_1);
    this.aml_1 = new StringResource('languages', this.fmi_1);
    this.bml_1 = new StringResource('edit_language', this.fmi_1);
    this.cml_1 = new StringResource('two_letter_code', this.fmi_1);
    this.dml_1 = new StringResource('three_letter_code', this.fmi_1);
    this.eml_1 = new StringResource('languages_description', this.fmi_1);
    this.fml_1 = new StringResource('advanced', this.fmi_1);
    this.gml_1 = new StringResource('optional', this.fmi_1);
    this.hml_1 = new StringResource('email', this.fmi_1);
    this.iml_1 = new StringResource('regcode', this.fmi_1);
    this.jml_1 = new StringResource('home', this.fmi_1);
    this.kml_1 = new StringResource('phone', this.fmi_1);
    this.lml_1 = new StringResource('attendance', this.fmi_1);
    this.mml_1 = new StringResource('classes', this.fmi_1);
    this.nml_1 = new StringResource('exams', this.fmi_1);
    this.oml_1 = new StringResource('reports', this.fmi_1);
    this.pml_1 = new StringResource('choose_template', this.fmi_1);
    this.qml_1 = new StringResource('save_as_template', this.fmi_1);
    this.rml_1 = new StringResource('contents', this.fmi_1);
    this.sml_1 = new StringResource('students', this.fmi_1);
    this.tml_1 = new StringResource('add_a_student', this.fmi_1);
    this.uml_1 = new StringResource('forgot_password', this.fmi_1);
    this.vml_1 = new StringResource('notifications', this.fmi_1);
    this.wml_1 = new StringResource('account', this.fmi_1);
    this.xml_1 = new StringResource('accounts', this.fmi_1);
    this.yml_1 = new StringResource('share', this.fmi_1);
    this.zml_1 = new StringResource('send', this.fmi_1);
    this.amm_1 = new StringResource('open', this.fmi_1);
    this.bmm_1 = new StringResource('downloading', this.fmi_1);
    this.cmm_1 = new StringResource('waiting', this.fmi_1);
    this.dmm_1 = new StringResource('waiting_for_connection', this.fmi_1);
    this.emm_1 = new StringResource('queued', this.fmi_1);
    this.fmm_1 = new StringResource('failed', this.fmi_1);
    this.gmm_1 = new StringResource('passed', this.fmi_1);
    this.hmm_1 = new StringResource('success', this.fmi_1);
    this.imm_1 = new StringResource('failure', this.fmi_1);
    this.jmm_1 = new StringResource('incomplete', this.fmi_1);
    this.kmm_1 = new StringResource('completed', this.fmi_1);
    this.lmm_1 = new StringResource('experience', this.fmi_1);
    this.mmm_1 = new StringResource('answered', this.fmi_1);
    this.nmm_1 = new StringResource('select_subtitle_video', this.fmi_1);
    this.omm_1 = new StringResource('no_subtitle', this.fmi_1);
    this.pmm_1 = new StringResource('no_video_file_found', this.fmi_1);
    this.qmm_1 = new StringResource('content_from_file', this.fmi_1);
    this.rmm_1 = new StringResource('content_from_link', this.fmi_1);
    this.smm_1 = new StringResource('import_from_file', this.fmi_1);
    this.tmm_1 = new StringResource('import_from_link', this.fmi_1);
    this.umm_1 = new StringResource('import_content', this.fmi_1);
    this.vmm_1 = new StringResource('update_content', this.fmi_1);
    this.wmm_1 = new StringResource('publicly_accessible', this.fmi_1);
    this.xmm_1 = new StringResource('title', this.fmi_1);
    this.ymm_1 = new StringResource('licence', this.fmi_1);
    this.zmm_1 = new StringResource('ebook', this.fmi_1);
    this.amn_1 = new StringResource('interactive', this.fmi_1);
    this.bmn_1 = new StringResource('collection', this.fmi_1);
    this.cmn_1 = new StringResource('document', this.fmi_1);
    this.dmn_1 = new StringResource('article', this.fmi_1);
    this.emn_1 = new StringResource('audio', this.fmi_1);
    this.fmn_1 = new StringResource('move', this.fmi_1);
    this.gmn_1 = new StringResource('hide', this.fmi_1);
    this.hmn_1 = new StringResource('unhide', this.fmi_1);
    this.imn_1 = new StringResource('compress', this.fmi_1);
    this.jmn_1 = new StringResource('and_key', this.fmi_1);
    this.kmn_1 = new StringResource('added', this.fmi_1);
    this.lmn_1 = new StringResource('attempts', this.fmi_1);
    this.mmn_1 = new StringResource('add_link_description', this.fmi_1);
    this.nmn_1 = new StringResource('add_gallery_description', this.fmi_1);
    this.omn_1 = new StringResource('add_file_description', this.fmi_1);
    this.pmn_1 = new StringResource('error_this_device_doesnt_support_bluetooth_sharing', this.fmi_1);
    this.qmn_1 = new StringResource('share_offline_zip_checkbox_label', this.fmi_1);
    this.rmn_1 = new StringResource('share_offline_dialog_message', this.fmi_1);
    this.smn_1 = new StringResource('preparing', this.fmi_1);
    this.tmn_1 = new StringResource('fixed_date', this.fmi_1);
    this.umn_1 = new StringResource('relative_date', this.fmi_1);
    this.vmn_1 = new StringResource('field_required_prompt', this.fmi_1);
    this.wmn_1 = new StringResource('field_password_error_min', this.fmi_1);
    this.xmn_1 = new StringResource('filed_password_no_match', this.fmi_1);
    this.ymn_1 = new StringResource('update', this.fmi_1);
    this.zmn_1 = new StringResource('profile', this.fmi_1);
    this.amo_1 = new StringResource('dialog_download_from_playstore_message', this.fmi_1);
    this.bmo_1 = new StringResource('dialog_download_from_playstore_ok', this.fmi_1);
    this.cmo_1 = new StringResource('dialog_download_from_playstore_cancel', this.fmi_1);
    this.dmo_1 = new StringResource('accept', this.fmi_1);
    this.emo_1 = new StringResource('also_available_in', this.fmi_1);
    this.fmo_1 = new StringResource('created_partnership', this.fmi_1);
    this.gmo_1 = new StringResource('onboarding_get_started_label', this.fmi_1);
    this.hmo_1 = new StringResource('lets_get_started_label', this.fmi_1);
    this.imo_1 = new StringResource('onboarding_headline1', this.fmi_1);
    this.jmo_1 = new StringResource('onboarding_subheadline1', this.fmi_1);
    this.kmo_1 = new StringResource('onboarding_headline2', this.fmi_1);
    this.lmo_1 = new StringResource('onboarding_subheadline2', this.fmi_1);
    this.mmo_1 = new StringResource('onboarding_headline3', this.fmi_1);
    this.nmo_1 = new StringResource('onboarding_subheadline3', this.fmi_1);
    this.omo_1 = new StringResource('download_continue_stacked_label', this.fmi_1);
    this.pmo_1 = new StringResource('im_an_individual_learner', this.fmi_1);
    this.qmo_1 = new StringResource('im_an_individual_learner_description', this.fmi_1);
    this.rmo_1 = new StringResource('i_want_to_join_my_organization_school', this.fmi_1);
    this.smo_1 = new StringResource('i_want_to_join_my_organization_school_description', this.fmi_1);
    this.tmo_1 = new StringResource('i_want_to_add_my_organization_school', this.fmi_1);
    this.umo_1 = new StringResource('i_want_to_add_my_organization_school_description', this.fmi_1);
    this.vmo_1 = new StringResource('individual_action_title', this.fmi_1);
    this.wmo_1 = new StringResource('create_new_local_account_title', this.fmi_1);
    this.xmo_1 = new StringResource('create_new_local_account_description', this.fmi_1);
    this.ymo_1 = new StringResource('restore_local_account_title', this.fmi_1);
    this.zmo_1 = new StringResource('restore_local_account_description', this.fmi_1);
    this.amp_1 = new StringResource('download_continue_btn_label', this.fmi_1);
    this.bmp_1 = new StringResource('download_wifi_only', this.fmi_1);
    this.cmp_1 = new StringResource('download_calculating', this.fmi_1);
    this.dmp_1 = new StringResource('download_state_download', this.fmi_1);
    this.emp_1 = new StringResource('download_state_downloading', this.fmi_1);
    this.fmp_1 = new StringResource('download_state_downloaded', this.fmi_1);
    this.gmp_1 = new StringResource('download_downloading_placeholder', this.fmi_1);
    this.hmp_1 = new StringResource('download_summary_title', this.fmi_1);
    this.imp_1 = new StringResource('download_cancel_label', this.fmi_1);
    this.jmp_1 = new StringResource('download_pause_download', this.fmi_1);
    this.kmp_1 = new StringResource('download_storage_option_device', this.fmi_1);
    this.lmp_1 = new StringResource('download_locally_availability', this.fmi_1);
    this.mmp_1 = new StringResource('download_cloud_availability', this.fmi_1);
    this.nmp_1 = new StringResource('insufficient_space', this.fmi_1);
    this.omp_1 = new StringResource('download_entry_state_paused', this.fmi_1);
    this.pmp_1 = new StringResource('get_app', this.fmi_1);
    this.qmp_1 = new StringResource('no_app_found', this.fmi_1);
    this.rmp_1 = new StringResource('entry_details_author', this.fmi_1);
    this.smp_1 = new StringResource('entry_details_publisher', this.fmi_1);
    this.tmp_1 = new StringResource('entry_details_license', this.fmi_1);
    this.ump_1 = new StringResource('file_not_found', this.fmi_1);
    this.vmp_1 = new StringResource('multiple_choice', this.fmi_1);
    this.wmp_1 = new StringResource('preview', this.fmi_1);
    this.xmp_1 = new StringResource('content_creation_storage_option_title', this.fmi_1);
    this.ymp_1 = new StringResource('file_required_prompt', this.fmi_1);
    this.zmp_1 = new StringResource('content_creation_folder_new_message', this.fmi_1);
    this.amq_1 = new StringResource('content_creation_folder_update_message', this.fmi_1);
    this.bmq_1 = new StringResource('error_message_load_page', this.fmi_1);
    this.cmq_1 = new StringResource('error_message_update_document', this.fmi_1);
    this.dmq_1 = new StringResource('supported_files', this.fmi_1);
    this.emq_1 = new StringResource('content_editor_save_error', this.fmi_1);
    this.fmq_1 = new StringResource('content_entry_export_inprogress', this.fmi_1);
    this.gmq_1 = new StringResource('content_entry_export_message', this.fmi_1);
    this.hmq_1 = new StringResource('show_hidden_items', this.fmi_1);
    this.imq_1 = new StringResource('open_folder', this.fmi_1);
    this.jmq_1 = new StringResource('action_hidden', this.fmi_1);
    this.kmq_1 = new StringResource('invalid', this.fmi_1);
    this.lmq_1 = new StringResource('enter_register_code', this.fmi_1);
    this.mmq_1 = new StringResource('bar_chart', this.fmi_1);
    this.nmq_1 = new StringResource('line_chart', this.fmi_1);
    this.omq_1 = new StringResource('score', this.fmi_1);
    this.pmq_1 = new StringResource('content_total_duration', this.fmi_1);
    this.qmq_1 = new StringResource('content_average_duration', this.fmi_1);
    this.rmq_1 = new StringResource('count_session', this.fmi_1);
    this.smq_1 = new StringResource('interaction_recorded', this.fmi_1);
    this.tmq_1 = new StringResource('number_active_users', this.fmi_1);
    this.umq_1 = new StringResource('average_usage_time_per_user', this.fmi_1);
    this.vmq_1 = new StringResource('number_students_completed', this.fmi_1);
    this.wmq_1 = new StringResource('percent_students_completed', this.fmi_1);
    this.xmq_1 = new StringResource('total_attendances', this.fmi_1);
    this.ymq_1 = new StringResource('total_absences', this.fmi_1);
    this.zmq_1 = new StringResource('total_lates', this.fmi_1);
    this.amr_1 = new StringResource('percent_students_attended', this.fmi_1);
    this.bmr_1 = new StringResource('percent_students_attended_or_late', this.fmi_1);
    this.cmr_1 = new StringResource('total_number_of_classes', this.fmi_1);
    this.dmr_1 = new StringResource('number_unique_students_attending', this.fmi_1);
    this.emr_1 = new StringResource('xapi_day', this.fmi_1);
    this.fmr_1 = new StringResource('xapi_week', this.fmi_1);
    this.gmr_1 = new StringResource('xapi_month', this.fmi_1);
    this.hmr_1 = new StringResource('xapi_custom_date', this.fmi_1);
    this.imr_1 = new StringResource('xapi_content_entry', this.fmi_1);
    this.jmr_1 = new StringResource('xapi_clear', this.fmi_1);
    this.kmr_1 = new StringResource('last_week_date_range', this.fmi_1);
    this.lmr_1 = new StringResource('last_two_week_date_range', this.fmi_1);
    this.mmr_1 = new StringResource('last_month_date_range', this.fmi_1);
    this.nmr_1 = new StringResource('last_three_months_date_range', this.fmi_1);
    this.omr_1 = new StringResource('new_custom_date_range', this.fmi_1);
    this.pmr_1 = new StringResource('selected_custom_range', this.fmi_1);
    this.qmr_1 = new StringResource('time_range', this.fmi_1);
    this.rmr_1 = new StringResource('year', this.fmi_1);
    this.smr_1 = new StringResource('from', this.fmi_1);
    this.tmr_1 = new StringResource('done', this.fmi_1);
    this.umr_1 = new StringResource('xapi_options_general', this.fmi_1);
    this.vmr_1 = new StringResource('xapi_options_report_title', this.fmi_1);
    this.wmr_1 = new StringResource('xapi_options_visual_type', this.fmi_1);
    this.xmr_1 = new StringResource('xapi_options_data_set', this.fmi_1);
    this.ymr_1 = new StringResource('xapi_options_series', this.fmi_1);
    this.zmr_1 = new StringResource('xapi_options_axes', this.fmi_1);
    this.ams_1 = new StringResource('xapi_options_y_axes', this.fmi_1);
    this.bms_1 = new StringResource('xapi_options_x_axes', this.fmi_1);
    this.cms_1 = new StringResource('xapi_options_subgroup', this.fmi_1);
    this.dms_1 = new StringResource('xapi_options_filters', this.fmi_1);
    this.ems_1 = new StringResource('xapi_options_who', this.fmi_1);
    this.fms_1 = new StringResource('xapi_options_did', this.fmi_1);
    this.gms_1 = new StringResource('xapi_options_what', this.fmi_1);
    this.hms_1 = new StringResource('xapi_options_when', this.fmi_1);
    this.ims_1 = new StringResource('xapi_options_where', this.fmi_1);
    this.jms_1 = new StringResource('time_range_all', this.fmi_1);
    this.kms_1 = new StringResource('report_filter_edit_field', this.fmi_1);
    this.lms_1 = new StringResource('report_filter_edit_condition', this.fmi_1);
    this.mms_1 = new StringResource('report_filter_edit_values', this.fmi_1);
    this.nms_1 = new StringResource('report', this.fmi_1);
    this.oms_1 = new StringResource('create_a_new_report', this.fmi_1);
    this.pms_1 = new StringResource('edit_report', this.fmi_1);
    this.qms_1 = new StringResource('verb', this.fmi_1);
    this.rms_1 = new StringResource('add_a_new_verb', this.fmi_1);
    this.sms_1 = new StringResource('id_verbentity_urlid', this.fmi_1);
    this.tms_1 = new StringResource('edit_filters', this.fmi_1);
    this.ums_1 = new StringResource('field_person_gender', this.fmi_1);
    this.vms_1 = new StringResource('field_person_age', this.fmi_1);
    this.wms_1 = new StringResource('field_content_completion', this.fmi_1);
    this.xms_1 = new StringResource('field_content_entry', this.fmi_1);
    this.yms_1 = new StringResource('field_content_progress', this.fmi_1);
    this.zms_1 = new StringResource('field_attendance_percentage', this.fmi_1);
    this.amt_1 = new StringResource('condition_is', this.fmi_1);
    this.bmt_1 = new StringResource('condition_is_not', this.fmi_1);
    this.cmt_1 = new StringResource('condition_greater_than', this.fmi_1);
    this.dmt_1 = new StringResource('condition_less_than', this.fmi_1);
    this.emt_1 = new StringResource('condition_in_list', this.fmi_1);
    this.fmt_1 = new StringResource('condition_not_in_list', this.fmi_1);
    this.gmt_1 = new StringResource('condition_between', this.fmi_1);
    this.hmt_1 = new StringResource('add_person_filter', this.fmi_1);
    this.imt_1 = new StringResource('add_verb_filter', this.fmi_1);
    this.jmt_1 = new StringResource('add_content_filter', this.fmi_1);
    this.kmt_1 = new StringResource('dashboard', this.fmi_1);
    this.lmt_1 = new StringResource('activity_import_link', this.fmi_1);
    this.mmt_1 = new StringResource('xapi_hours', this.fmi_1);
    this.nmt_1 = new StringResource('xapi_minutes', this.fmi_1);
    this.omt_1 = new StringResource('xapi_seconds', this.fmi_1);
    this.pmt_1 = new StringResource('xapi_verb_header', this.fmi_1);
    this.qmt_1 = new StringResource('xapi_result_header', this.fmi_1);
    this.rmt_1 = new StringResource('xapi_score', this.fmi_1);
    this.smt_1 = new StringResource('content_score', this.fmi_1);
    this.tmt_1 = new StringResource('completion_key', this.fmi_1);
    this.umt_1 = new StringResource('import_title_not_entered', this.fmi_1);
    this.vmt_1 = new StringResource('no_account', this.fmi_1);
    this.wmt_1 = new StringResource('enter_url', this.fmi_1);
    this.xmt_1 = new StringResource('invalid_link', this.fmi_1);
    this.ymt_1 = new StringResource('invalid_file', this.fmi_1);
    this.zmt_1 = new StringResource('import_link_content_not_supported', this.fmi_1);
    this.amu_1 = new StringResource('unsupported_file_type', this.fmi_1);
    this.bmu_1 = new StringResource('import_link_big_size', this.fmi_1);
    this.cmu_1 = new StringResource('import_link_error', this.fmi_1);
    this.dmu_1 = new StringResource('supported_link', this.fmi_1);
    this.emu_1 = new StringResource('offline_sharing_enable_bluetooth_prompt', this.fmi_1);
    this.fmu_1 = new StringResource('offline_sharing_enable_wifi_promot', this.fmi_1);
    this.gmu_1 = new StringResource('enable', this.fmi_1);
    this.hmu_1 = new StringResource('repo_loading_status_loading_cloud', this.fmi_1);
    this.imu_1 = new StringResource('repo_loading_status_loading_mirror', this.fmi_1);
    this.jmu_1 = new StringResource('repo_loading_status_failed_noconnection', this.fmi_1);
    this.kmu_1 = new StringResource('repo_loading_status_failed_connection_error', this.fmi_1);
    this.lmu_1 = new StringResource('licence_type_cc_by', this.fmi_1);
    this.mmu_1 = new StringResource('licence_type_cc_by_sa', this.fmi_1);
    this.nmu_1 = new StringResource('licence_type_cc_by_sa_nc', this.fmi_1);
    this.omu_1 = new StringResource('licence_type_cc_by_nc', this.fmi_1);
    this.pmu_1 = new StringResource('licence_type_cc_by_nc_sa', this.fmi_1);
    this.qmu_1 = new StringResource('licence_type_public_domain', this.fmi_1);
    this.rmu_1 = new StringResource('licence_type_all_rights', this.fmi_1);
    this.smu_1 = new StringResource('license_type_cc_0', this.fmi_1);
    this.tmu_1 = new StringResource('syncing', this.fmi_1);
    this.umu_1 = new StringResource('feed', this.fmi_1);
    this.vmu_1 = new StringResource('people', this.fmi_1);
    this.wmu_1 = new StringResource('record_attendance', this.fmi_1);
    this.xmu_1 = new StringResource('today', this.fmi_1);
    this.ymu_1 = new StringResource('sort_by', this.fmi_1);
    this.zmu_1 = new StringResource('log', this.fmi_1);
    this.amv_1 = new StringResource('schedule', this.fmi_1);
    this.bmv_1 = new StringResource('add_a_schedule', this.fmi_1);
    this.cmv_1 = new StringResource('edit_schedule', this.fmi_1);
    this.dmv_1 = new StringResource('first_key', this.fmi_1);
    this.emv_1 = new StringResource('last_key', this.fmi_1);
    this.fmv_1 = new StringResource('last_week', this.fmi_1);
    this.gmv_1 = new StringResource('mark_all', this.fmi_1);
    this.hmv_1 = new StringResource('mark_all_present', this.fmi_1);
    this.imv_1 = new StringResource('mark_all_absent', this.fmi_1);
    this.jmv_1 = new StringResource('present', this.fmi_1);
    this.kmv_1 = new StringResource('absent', this.fmi_1);
    this.lmv_1 = new StringResource('attendance_report', this.fmi_1);
    this.mmv_1 = new StringResource('father', this.fmi_1);
    this.nmv_1 = new StringResource('mother', this.fmi_1);
    this.omv_1 = new StringResource('birthday', this.fmi_1);
    this.pmv_1 = new StringResource('first_names', this.fmi_1);
    this.qmv_1 = new StringResource('basic_details', this.fmi_1);
    this.rmv_1 = new StringResource('address', this.fmi_1);
    this.smv_1 = new StringResource('add_person_to_class', this.fmi_1);
    this.tmv_1 = new StringResource('edit', this.fmi_1);
    this.umv_1 = new StringResource('clazz', this.fmi_1);
    this.vmv_1 = new StringResource('add_a_new_class', this.fmi_1);
    this.wmv_1 = new StringResource('edit_clazz', this.fmi_1);
    this.xmv_1 = new StringResource('add_a_class', this.fmi_1);
    this.ymv_1 = new StringResource('join_existing_class', this.fmi_1);
    this.zmv_1 = new StringResource('student_image', this.fmi_1);
    this.amw_1 = new StringResource('question_key', this.fmi_1);
    this.bmw_1 = new StringResource('add_question', this.fmi_1);
    this.cmw_1 = new StringResource('edit_question', this.fmi_1);
    this.dmw_1 = new StringResource('questions', this.fmi_1);
    this.emw_1 = new StringResource('add_person', this.fmi_1);
    this.fmw_1 = new StringResource('add_class', this.fmi_1);
    this.gmw_1 = new StringResource('class_name', this.fmi_1);
    this.hmw_1 = new StringResource('class_description', this.fmi_1);
    this.imw_1 = new StringResource('to_key', this.fmi_1);
    this.jmw_1 = new StringResource('holiday', this.fmi_1);
    this.kmw_1 = new StringResource('add_a_holiday', this.fmi_1);
    this.lmw_1 = new StringResource('edit_holiday', this.fmi_1);
    this.mmw_1 = new StringResource('holidays', this.fmi_1);
    this.nmw_1 = new StringResource('holiday_calendar', this.fmi_1);
    this.omw_1 = new StringResource('add_a_new_holiday_calendar', this.fmi_1);
    this.pmw_1 = new StringResource('edit_holiday_calendar', this.fmi_1);
    this.qmw_1 = new StringResource('features_enabled', this.fmi_1);
    this.rmw_1 = new StringResource('weekly', this.fmi_1);
    this.smw_1 = new StringResource('once', this.fmi_1);
    this.tmw_1 = new StringResource('daily', this.fmi_1);
    this.umw_1 = new StringResource('monthly', this.fmi_1);
    this.vmw_1 = new StringResource('yearly', this.fmi_1);
    this.wmw_1 = new StringResource('sunday', this.fmi_1);
    this.xmw_1 = new StringResource('monday', this.fmi_1);
    this.ymw_1 = new StringResource('tuesday', this.fmi_1);
    this.zmw_1 = new StringResource('wednesday', this.fmi_1);
    this.amx_1 = new StringResource('thursday', this.fmi_1);
    this.bmx_1 = new StringResource('friday', this.fmi_1);
    this.cmx_1 = new StringResource('saturday', this.fmi_1);
    this.dmx_1 = new StringResource('day', this.fmi_1);
    this.emx_1 = new StringResource('toC', this.fmi_1);
    this.fmx_1 = new StringResource('last_month', this.fmi_1);
    this.gmx_1 = new StringResource('activity_change', this.fmi_1);
    this.hmx_1 = new StringResource('change_implemented_if_any', this.fmi_1);
    this.imx_1 = new StringResource('duration', this.fmi_1);
    this.jmx_1 = new StringResource('how_did_it_go', this.fmi_1);
    this.kmx_1 = new StringResource('notes', this.fmi_1);
    this.lmx_1 = new StringResource('activity', this.fmi_1);
    this.mmx_1 = new StringResource('sort_by_name', this.fmi_1);
    this.nmx_1 = new StringResource('sort_by_name_asc', this.fmi_1);
    this.omx_1 = new StringResource('sort_by_name_desc', this.fmi_1);
    this.pmx_1 = new StringResource('date_enroll', this.fmi_1);
    this.qmx_1 = new StringResource('date_left', this.fmi_1);
    this.rmx_1 = new StringResource('enroled', this.fmi_1);
    this.smx_1 = new StringResource('class_enrolment', this.fmi_1);
    this.tmx_1 = new StringResource('graduated', this.fmi_1);
    this.umx_1 = new StringResource('dropped_out', this.fmi_1);
    this.vmx_1 = new StringResource('moved', this.fmi_1);
    this.wmx_1 = new StringResource('new_leaving_reason', this.fmi_1);
    this.xmx_1 = new StringResource('edit_leaving_reason', this.fmi_1);
    this.ymx_1 = new StringResource('edit_enrolment', this.fmi_1);
    this.zmx_1 = new StringResource('new_enrolment', this.fmi_1);
    this.amy_1 = new StringResource('select_leaving_reason', this.fmi_1);
    this.bmy_1 = new StringResource('add_leaving_reason', this.fmi_1);
    this.cmy_1 = new StringResource('leaving_reason', this.fmi_1);
    this.dmy_1 = new StringResource('leaving_reasons', this.fmi_1);
    this.emy_1 = new StringResource('leaving_reason_manage', this.fmi_1);
    this.fmy_1 = new StringResource('view_profile', this.fmi_1);
    this.gmy_1 = new StringResource('class_enrolment_outcome', this.fmi_1);
    this.hmy_1 = new StringResource('class_enrolment_leaving', this.fmi_1);
    this.imy_1 = new StringResource('in_progress', this.fmi_1);
    this.jmy_1 = new StringResource('outcome', this.fmi_1);
    this.kmy_1 = new StringResource('person_enrolment_in_class', this.fmi_1);
    this.lmy_1 = new StringResource('enrolment', this.fmi_1);
    this.mmy_1 = new StringResource('error_start_date_before_clazz_date', this.fmi_1);
    this.nmy_1 = new StringResource('error_start_date_before_previous_enrolment_date', this.fmi_1);
    this.omy_1 = new StringResource('time_present', this.fmi_1);
    this.pmy_1 = new StringResource('ascending', this.fmi_1);
    this.qmy_1 = new StringResource('descending', this.fmi_1);
    this.rmy_1 = new StringResource('sort_by_text', this.fmi_1);
    this.smy_1 = new StringResource('attendance_high_to_low', this.fmi_1);
    this.tmy_1 = new StringResource('attendance_low_to_high', this.fmi_1);
    this.umy_1 = new StringResource('teacher', this.fmi_1);
    this.vmy_1 = new StringResource('add_a_teacher', this.fmi_1);
    this.wmy_1 = new StringResource('partial', this.fmi_1);
    this.xmy_1 = new StringResource('teachers_literal', this.fmi_1);
    this.ymy_1 = new StringResource('participant', this.fmi_1);
    this.zmy_1 = new StringResource('primary_user', this.fmi_1);
    this.amz_1 = new StringResource('up_key', this.fmi_1);
    this.bmz_1 = new StringResource('down_key', this.fmi_1);
    this.cmz_1 = new StringResource('activity_went_good', this.fmi_1);
    this.dmz_1 = new StringResource('activity_went_bad', this.fmi_1);
    this.emz_1 = new StringResource('activity_enter_any_notes', this.fmi_1);
    this.fmz_1 = new StringResource('uom_frequency_title', this.fmi_1);
    this.gmz_1 = new StringResource('uom_duration_title', this.fmi_1);
    this.hmz_1 = new StringResource('uom_boolean_title', this.fmi_1);
    this.imz_1 = new StringResource('uom_default_title', this.fmi_1);
    this.jmz_1 = new StringResource('add_activity', this.fmi_1);
    this.kmz_1 = new StringResource('add_activity_literal', this.fmi_1);
    this.lmz_1 = new StringResource('select_one', this.fmi_1);
    this.mmz_1 = new StringResource('measurement_type', this.fmi_1);
    this.nmz_1 = new StringResource('frequency', this.fmi_1);
    this.omz_1 = new StringResource('yes_no', this.fmi_1);
    this.pmz_1 = new StringResource('time_period', this.fmi_1);
    this.qmz_1 = new StringResource('location', this.fmi_1);
    this.rmz_1 = new StringResource('last_three_months', this.fmi_1);
    this.smz_1 = new StringResource('export', this.fmi_1);
    this.tmz_1 = new StringResource('date', this.fmi_1);
    this.umz_1 = new StringResource('average', this.fmi_1);
    this.vmz_1 = new StringResource('age', this.fmi_1);
    this.wmz_1 = new StringResource('days', this.fmi_1);
    this.xmz_1 = new StringResource('apply', this.fmi_1);
    this.ymz_1 = new StringResource('file_selected', this.fmi_1);
    this.zmz_1 = new StringResource('all', this.fmi_1);
    this.an0_1 = new StringResource('holiday_calendars', this.fmi_1);
    this.bn0_1 = new StringResource('holiday_calendars_desc', this.fmi_1);
    this.cn0_1 = new StringResource('sel_question_set', this.fmi_1);
    this.dn0_1 = new StringResource('sel_question_set_desc', this.fmi_1);
    this.en0_1 = new StringResource('users', this.fmi_1);
    this.fn0_1 = new StringResource('nomination', this.fmi_1);
    this.gn0_1 = new StringResource('active', this.fmi_1);
    this.hn0_1 = new StringResource('class_id', this.fmi_1);
    this.in0_1 = new StringResource('gender_literal', this.fmi_1);
    this.jn0_1 = new StringResource('country', this.fmi_1);
    this.kn0_1 = new StringResource('connectivity', this.fmi_1);
    this.ln0_1 = new StringResource('home_internet_access', this.fmi_1);
    this.mn0_1 = new StringResource('mobile_internet_access', this.fmi_1);
    this.nn0_1 = new StringResource('connectivity_limited', this.fmi_1);
    this.on0_1 = new StringResource('connectivity_full', this.fmi_1);
    this.pn0_1 = new StringResource('prefer_not_to_say', this.fmi_1);
    this.qn0_1 = new StringResource('sel_question_set_to_use', this.fmi_1);
    this.rn0_1 = new StringResource('search', this.fmi_1);
    this.sn0_1 = new StringResource('attendance_percentage', this.fmi_1);
    this.tn0_1 = new StringResource('filter', this.fmi_1);
    this.un0_1 = new StringResource('over_key', this.fmi_1);
    this.vn0_1 = new StringResource('sync', this.fmi_1);
    this.wn0_1 = new StringResource('not_recorded', this.fmi_1);
    this.xn0_1 = new StringResource('groups', this.fmi_1);
    this.yn0_1 = new StringResource('group_setting_desc', this.fmi_1);
    this.zn0_1 = new StringResource('roles', this.fmi_1);
    this.an1_1 = new StringResource('role', this.fmi_1);
    this.bn1_1 = new StringResource('add_a_new_role', this.fmi_1);
    this.cn1_1 = new StringResource('edit_role', this.fmi_1);
    this.dn1_1 = new StringResource('rols_assignment', this.fmi_1);
    this.en1_1 = new StringResource('role_assignment_setting_desc', this.fmi_1);
    this.fn1_1 = new StringResource('locations', this.fmi_1);
    this.gn1_1 = new StringResource('locations_setting_desc', this.fmi_1);
    this.hn1_1 = new StringResource('audit_log', this.fmi_1);
    this.in1_1 = new StringResource('audit_log_setting_desc', this.fmi_1);
    this.jn1_1 = new StringResource('entry_key', this.fmi_1);
    this.kn1_1 = new StringResource('permission_key', this.fmi_1);
    this.ln1_1 = new StringResource('permissions', this.fmi_1);
    this.mn1_1 = new StringResource('role_name', this.fmi_1);
    this.nn1_1 = new StringResource('members_key', this.fmi_1);
    this.on1_1 = new StringResource('member_key', this.fmi_1);
    this.pn1_1 = new StringResource('role_assignment', this.fmi_1);
    this.qn1_1 = new StringResource('scope_by', this.fmi_1);
    this.rn1_1 = new StringResource('assign_to', this.fmi_1);
    this.sn1_1 = new StringResource('person', this.fmi_1);
    this.tn1_1 = new StringResource('add_a_new_person', this.fmi_1);
    this.un1_1 = new StringResource('edit_person', this.fmi_1);
    this.vn1_1 = new StringResource('permission_person_select', this.fmi_1);
    this.wn1_1 = new StringResource('permission_person_insert', this.fmi_1);
    this.xn1_1 = new StringResource('permission_person_update', this.fmi_1);
    this.yn1_1 = new StringResource('permission_person_picture_select', this.fmi_1);
    this.zn1_1 = new StringResource('permission_person_picture_insert', this.fmi_1);
    this.an2_1 = new StringResource('permission_person_picture_update', this.fmi_1);
    this.bn2_1 = new StringResource('permission_clazz_select', this.fmi_1);
    this.cn2_1 = new StringResource('permission_clazz_insert', this.fmi_1);
    this.dn2_1 = new StringResource('permission_clazz_update', this.fmi_1);
    this.en2_1 = new StringResource('permission_clazz_add_teacher', this.fmi_1);
    this.fn2_1 = new StringResource('permission_clazz_add_student', this.fmi_1);
    this.gn2_1 = new StringResource('permission_attendance_select', this.fmi_1);
    this.hn2_1 = new StringResource('permission_attendance_insert', this.fmi_1);
    this.in2_1 = new StringResource('permission_attendance_update', this.fmi_1);
    this.jn2_1 = new StringResource('permission_activity_select', this.fmi_1);
    this.kn2_1 = new StringResource('permission_activity_insert', this.fmi_1);
    this.ln2_1 = new StringResource('permission_activity_update', this.fmi_1);
    this.mn2_1 = new StringResource('permission_sel_question_select', this.fmi_1);
    this.nn2_1 = new StringResource('permission_sel_question_insert', this.fmi_1);
    this.on2_1 = new StringResource('permission_sel_question_update', this.fmi_1);
    this.pn2_1 = new StringResource('permission_sel_select', this.fmi_1);
    this.qn2_1 = new StringResource('permission_sel_update', this.fmi_1);
    this.rn2_1 = new StringResource('custom_fields', this.fmi_1);
    this.sn2_1 = new StringResource('custom_field', this.fmi_1);
    this.tn2_1 = new StringResource('custom_fields_desc', this.fmi_1);
    this.un2_1 = new StringResource('field_type', this.fmi_1);
    this.vn2_1 = new StringResource('text', this.fmi_1);
    this.wn2_1 = new StringResource('dropdown', this.fmi_1);
    this.xn2_1 = new StringResource('options', this.fmi_1);
    this.yn2_1 = new StringResource('option_value', this.fmi_1);
    this.zn2_1 = new StringResource('errors', this.fmi_1);
    this.an3_1 = new StringResource('shake_feedback', this.fmi_1);
    this.bn3_1 = new StringResource('feedback_hint', this.fmi_1);
    this.cn3_1 = new StringResource('send_feedback', this.fmi_1);
    this.dn3_1 = new StringResource('feedback_thanks', this.fmi_1);
    this.en3_1 = new StringResource('start_date', this.fmi_1);
    this.fn3_1 = new StringResource('end_date', this.fmi_1);
    this.gn3_1 = new StringResource('last_active', this.fmi_1);
    this.hn3_1 = new StringResource('save', this.fmi_1);
    this.in3_1 = new StringResource('change_password', this.fmi_1);
    this.jn3_1 = new StringResource('current_password', this.fmi_1);
    this.kn3_1 = new StringResource('password_unchanged', this.fmi_1);
    this.ln3_1 = new StringResource('timezone', this.fmi_1);
    this.mn3_1 = new StringResource('users_settings_desc', this.fmi_1);
    this.nn3_1 = new StringResource('add', this.fmi_1);
    this.on3_1 = new StringResource('refresh', this.fmi_1);
    this.pn3_1 = new StringResource('school', this.fmi_1);
    this.qn3_1 = new StringResource('add_a_new_school', this.fmi_1);
    this.rn3_1 = new StringResource('edit_school', this.fmi_1);
    this.sn3_1 = new StringResource('join_existing_school', this.fmi_1);
    this.tn3_1 = new StringResource('schools', this.fmi_1);
    this.un3_1 = new StringResource('assignments', this.fmi_1);
    this.vn3_1 = new StringResource('assignment', this.fmi_1);
    this.wn3_1 = new StringResource('none_key', this.fmi_1);
    this.xn3_1 = new StringResource('instructions_for_students', this.fmi_1);
    this.yn3_1 = new StringResource('not_started', this.fmi_1);
    this.zn3_1 = new StringResource('percentage_complete', this.fmi_1);
    this.an4_1 = new StringResource('percentage_score', this.fmi_1);
    this.bn4_1 = new StringResource('started_date', this.fmi_1);
    this.cn4_1 = new StringResource('started', this.fmi_1);
    this.dn4_1 = new StringResource('mixed', this.fmi_1);
    this.en4_1 = new StringResource('store_title', this.fmi_1);
    this.fn4_1 = new StringResource('store_description_short', this.fmi_1);
    this.gn4_1 = new StringResource('store_description_full', this.fmi_1);
    this.hn4_1 = new StringResource('due_date', this.fmi_1);
    this.in4_1 = new StringResource('content', this.fmi_1);
    this.jn4_1 = new StringResource('add_new_content', this.fmi_1);
    this.kn4_1 = new StringResource('add_content', this.fmi_1);
    this.ln4_1 = new StringResource('student_progress', this.fmi_1);
    this.mn4_1 = new StringResource('status', this.fmi_1);
    this.nn4_1 = new StringResource('use_device_language', this.fmi_1);
    this.on4_1 = new StringResource('select_item', this.fmi_1);
    this.pn4_1 = new StringResource('from_to_date', this.fmi_1);
    this.qn4_1 = new StringResource('num_items_with_name', this.fmi_1);
    this.rn4_1 = new StringResource('num_items_with_name_with_comma', this.fmi_1);
    this.sn4_1 = new StringResource('add_to', this.fmi_1);
    this.tn4_1 = new StringResource('remove_from', this.fmi_1);
    this.un4_1 = new StringResource('change_photo', this.fmi_1);
    this.vn4_1 = new StringResource('remove_picture', this.fmi_1);
    this.wn4_1 = new StringResource('take_new_photo_from_camera', this.fmi_1);
    this.xn4_1 = new StringResource('select_picture_from_gallery', this.fmi_1);
    this.yn4_1 = new StringResource('select_file', this.fmi_1);
    this.zn4_1 = new StringResource('permission_clazz_assignment_view', this.fmi_1);
    this.an5_1 = new StringResource('permission_clazz_asignment_edit', this.fmi_1);
    this.bn5_1 = new StringResource('overview', this.fmi_1);
    this.cn5_1 = new StringResource('add_new', this.fmi_1);
    this.dn5_1 = new StringResource('staff', this.fmi_1);
    this.en5_1 = new StringResource('x_teachers_y_students', this.fmi_1);
    this.fn5_1 = new StringResource('call', this.fmi_1);
    this.gn5_1 = new StringResource('organization_id', this.fmi_1);
    this.hn5_1 = new StringResource('student', this.fmi_1);
    this.in5_1 = new StringResource('contact_details', this.fmi_1);
    this.jn5_1 = new StringResource('untitled', this.fmi_1);
    this.kn5_1 = new StringResource('present_late_absent', this.fmi_1);
    this.ln5_1 = new StringResource('marked_cap', this.fmi_1);
    this.mn5_1 = new StringResource('submitted_cap', this.fmi_1);
    this.nn5_1 = new StringResource('not_submitted_cap', this.fmi_1);
    this.on5_1 = new StringResource('submitliteral', this.fmi_1);
    this.pn5_1 = new StringResource('x_percent_attended', this.fmi_1);
    this.qn5_1 = new StringResource('answer', this.fmi_1);
    this.rn5_1 = new StringResource('of_content', this.fmi_1);
    this.sn5_1 = new StringResource('nothing_here', this.fmi_1);
    this.tn5_1 = new StringResource('not_answered', this.fmi_1);
    this.un5_1 = new StringResource('clazz_work', this.fmi_1);
    this.vn5_1 = new StringResource('add_a_new_clazzwork', this.fmi_1);
    this.wn5_1 = new StringResource('edit_clazzwork', this.fmi_1);
    this.xn5_1 = new StringResource('clazz_assignment', this.fmi_1);
    this.yn5_1 = new StringResource('new_assignment', this.fmi_1);
    this.zn5_1 = new StringResource('edit_assignment', this.fmi_1);
    this.an6_1 = new StringResource('total_score', this.fmi_1);
    this.bn6_1 = new StringResource('late_submission', this.fmi_1);
    this.cn6_1 = new StringResource('mark_penalty', this.fmi_1);
    this.dn6_1 = new StringResource('late_submission_penalty', this.fmi_1);
    this.en6_1 = new StringResource('end_of_grace_period', this.fmi_1);
    this.fn6_1 = new StringResource('allow_class_comments', this.fmi_1);
    this.gn6_1 = new StringResource('after_deadline_date_error', this.fmi_1);
    this.hn6_1 = new StringResource('points', this.fmi_1);
    this.in6_1 = new StringResource('minimum_score', this.fmi_1);
    this.jn6_1 = new StringResource('automatic', this.fmi_1);
    this.kn6_1 = new StringResource('student_marks_content', this.fmi_1);
    this.ln6_1 = new StringResource('completion_criteria', this.fmi_1);
    this.mn6_1 = new StringResource('mark_complete', this.fmi_1);
    this.nn6_1 = new StringResource('late_penalty', this.fmi_1);
    this.on6_1 = new StringResource('marked_key', this.fmi_1);
    this.pn6_1 = new StringResource('submitted_key', this.fmi_1);
    this.qn6_1 = new StringResource('not_submitted', this.fmi_1);
    this.rn6_1 = new StringResource('visible_from_date', this.fmi_1);
    this.sn6_1 = new StringResource('submission_type', this.fmi_1);
    this.tn6_1 = new StringResource('no_submission_required', this.fmi_1);
    this.un6_1 = new StringResource('short_text', this.fmi_1);
    this.vn6_1 = new StringResource('attachment', this.fmi_1);
    this.wn6_1 = new StringResource('quiz', this.fmi_1);
    this.xn6_1 = new StringResource('allow_private_comments_from_students', this.fmi_1);
    this.yn6_1 = new StringResource('deadline', this.fmi_1);
    this.zn6_1 = new StringResource('class_timezone', this.fmi_1);
    this.an7_1 = new StringResource('maximum_score', this.fmi_1);
    this.bn7_1 = new StringResource('quiz_questions', this.fmi_1);
    this.cn7_1 = new StringResource('time', this.fmi_1);
    this.dn7_1 = new StringResource('submission', this.fmi_1);
    this.en7_1 = new StringResource('public_comments', this.fmi_1);
    this.fn7_1 = new StringResource('private_comments', this.fmi_1);
    this.gn7_1 = new StringResource('submit_your_answer', this.fmi_1);
    this.hn7_1 = new StringResource('add_class_comment', this.fmi_1);
    this.in7_1 = new StringResource('add_private_comment', this.fmi_1);
    this.jn7_1 = new StringResource('class_comments', this.fmi_1);
    this.kn7_1 = new StringResource('submit', this.fmi_1);
    this.ln7_1 = new StringResource('three_num_items_with_name_with_comma', this.fmi_1);
    this.mn7_1 = new StringResource('marking', this.fmi_1);
    this.nn7_1 = new StringResource('return_and_mark_next', this.fmi_1);
    this.on7_1 = new StringResource('return_only', this.fmi_1);
    this.pn7_1 = new StringResource('workspace', this.fmi_1);
    this.qn7_1 = new StringResource('organisation', this.fmi_1);
    this.rn7_1 = new StringResource('use_public_library_site', this.fmi_1);
    this.sn7_1 = new StringResource('create_site', this.fmi_1);
    this.tn7_1 = new StringResource('connect_as_guest', this.fmi_1);
    this.un7_1 = new StringResource('create_account', this.fmi_1);
    this.vn7_1 = new StringResource('my', this.fmi_1);
    this.wn7_1 = new StringResource('add_another', this.fmi_1);
    this.xn7_1 = new StringResource('logged_in_as', this.fmi_1);
    this.yn7_1 = new StringResource('person_exists', this.fmi_1);
    this.zn7_1 = new StringResource('username_too_short', this.fmi_1);
    this.an8_1 = new StringResource('username_too_long', this.fmi_1);
    this.bn8_1 = new StringResource('username_starts_with_number', this.fmi_1);
    this.cn8_1 = new StringResource('invalid_username', this.fmi_1);
    this.dn8_1 = new StringResource('incorrect_current_password', this.fmi_1);
    this.en8_1 = new StringResource('sel_question_type_free_text', this.fmi_1);
    this.fn8_1 = new StringResource('sel_question_type_multiple_choice', this.fmi_1);
    this.gn8_1 = new StringResource('question_text', this.fmi_1);
    this.hn8_1 = new StringResource('question_type', this.fmi_1);
    this.in8_1 = new StringResource('add_option', this.fmi_1);
    this.jn8_1 = new StringResource('roles_and_permissions', this.fmi_1);
    this.kn8_1 = new StringResource('add_role_permission', this.fmi_1);
    this.ln8_1 = new StringResource('scope', this.fmi_1);
    this.mn8_1 = new StringResource('scope_description', this.fmi_1);
    this.nn8_1 = new StringResource('role_description', this.fmi_1);
    this.on8_1 = new StringResource('assign_role', this.fmi_1);
    this.pn8_1 = new StringResource('more_information', this.fmi_1);
    this.qn8_1 = new StringResource('pending_requests', this.fmi_1);
    this.rn8_1 = new StringResource('pending', this.fmi_1);
    this.sn8_1 = new StringResource('please_wait_for_approval', this.fmi_1);
    this.tn8_1 = new StringResource('reject', this.fmi_1);
    this.un8_1 = new StringResource('ask_your_teacher_for_code', this.fmi_1);
    this.vn8_1 = new StringResource('copied_to_clipboard', this.fmi_1);
    this.wn8_1 = new StringResource('invite_link_desc', this.fmi_1);
    this.xn8_1 = new StringResource('copy_link', this.fmi_1);
    this.yn8_1 = new StringResource('copy_code', this.fmi_1);
    this.zn8_1 = new StringResource('share_link', this.fmi_1);
    this.an9_1 = new StringResource('invite_with_link', this.fmi_1);
    this.bn9_1 = new StringResource('role_not_selected_error', this.fmi_1);
    this.cn9_1 = new StringResource('permission_person_delegate', this.fmi_1);
    this.dn9_1 = new StringResource('this_field_is_mandatory', this.fmi_1);
    this.en9_1 = new StringResource('permission_role_select', this.fmi_1);
    this.fn9_1 = new StringResource('permission_role_insert', this.fmi_1);
    this.gn9_1 = new StringResource('permission_school_select', this.fmi_1);
    this.hn9_1 = new StringResource('permission_school_insert', this.fmi_1);
    this.in9_1 = new StringResource('permission_school_update', this.fmi_1);
    this.jn9_1 = new StringResource('add_student_to_school', this.fmi_1);
    this.kn9_1 = new StringResource('add_staff_to_school', this.fmi_1);
    this.ln9_1 = new StringResource('permission_password_reset', this.fmi_1);
    this.mn9_1 = new StringResource('school_code', this.fmi_1);
    this.nn9_1 = new StringResource('invite_code', this.fmi_1);
    this.on9_1 = new StringResource('entity_code', this.fmi_1);
    this.pn9_1 = new StringResource('join_code_instructions', this.fmi_1);
    this.qn9_1 = new StringResource('record_for_student', this.fmi_1);
    this.rn9_1 = new StringResource('moved_x_entries', this.fmi_1);
    this.sn9_1 = new StringResource('end_is_before_start_error', this.fmi_1);
    this.tn9_1 = new StringResource('record_attendance_for_most_recent_occurrence', this.fmi_1);
    this.un9_1 = new StringResource('add_a_new_occurrence', this.fmi_1);
    this.vn9_1 = new StringResource('active_classes', this.fmi_1);
    this.wn9_1 = new StringResource('terms_and_policies', this.fmi_1);
    this.xn9_1 = new StringResource('manage_site_settings', this.fmi_1);
    this.yn9_1 = new StringResource('guest_login_enabled', this.fmi_1);
    this.zn9_1 = new StringResource('registration_allowed', this.fmi_1);
    this.ana_1 = new StringResource('yes', this.fmi_1);
    this.bna_1 = new StringResource('no', this.fmi_1);
    this.cna_1 = new StringResource('edit_site', this.fmi_1);
    this.dna_1 = new StringResource('site', this.fmi_1);
    this.ena_1 = new StringResource('site_link', this.fmi_1);
    this.fna_1 = new StringResource('please_enter_the_linK', this.fmi_1);
    this.gna_1 = new StringResource('or', this.fmi_1);
    this.hna_1 = new StringResource('connect', this.fmi_1);
    this.ina_1 = new StringResource('terms_and_policies_text', this.fmi_1);
    this.jna_1 = new StringResource('edit_terms_and_policies', this.fmi_1);
    this.kna_1 = new StringResource('strings_not_allowed', this.fmi_1);
    this.lna_1 = new StringResource('undo', this.fmi_1);
    this.mna_1 = new StringResource('video', this.fmi_1);
    this.nna_1 = new StringResource('content_editor_create_new_category', this.fmi_1);
    this.ona_1 = new StringResource('content_pieces_completed', this.fmi_1);
    this.pna_1 = new StringResource('content_usage_duration', this.fmi_1);
    this.qna_1 = new StringResource('manage_download', this.fmi_1);
    this.rna_1 = new StringResource('powered_by', this.fmi_1);
    this.sna_1 = new StringResource('invalid_email', this.fmi_1);
    this.tna_1 = new StringResource('select_account', this.fmi_1);
    this.una_1 = new StringResource('opening_link', this.fmi_1);
    this.vna_1 = new StringResource('select_account_to_continue', this.fmi_1);
    this.wna_1 = new StringResource('you_are_already_in_class', this.fmi_1);
    this.xna_1 = new StringResource('you_are_already_in_school', this.fmi_1);
    this.yna_1 = new StringResource('join_class', this.fmi_1);
    this.zna_1 = new StringResource('join_school', this.fmi_1);
    this.anb_1 = new StringResource('what_is_your_date_of_birth', this.fmi_1);
    this.bnb_1 = new StringResource('parents_email_address', this.fmi_1);
    this.cnb_1 = new StringResource('we_sent_a_message_to_your_parent', this.fmi_1);
    this.dnb_1 = new StringResource('toggle_visibility', this.fmi_1);
    this.enb_1 = new StringResource('parental_consent', this.fmi_1);
    this.fnb_1 = new StringResource('parent_child_register_message_subject', this.fmi_1);
    this.gnb_1 = new StringResource('parent_child_register_message', this.fmi_1);
    this.hnb_1 = new StringResource('parent_consent_explanation', this.fmi_1);
    this.inb_1 = new StringResource('relationship', this.fmi_1);
    this.jnb_1 = new StringResource('i_consent', this.fmi_1);
    this.knb_1 = new StringResource('i_do_not_consent', this.fmi_1);
    this.lnb_1 = new StringResource('revoke_consent', this.fmi_1);
    this.mnb_1 = new StringResource('restore_consent', this.fmi_1);
    this.nnb_1 = new StringResource('status_consent_granted', this.fmi_1);
    this.onb_1 = new StringResource('status_consent_denied', this.fmi_1);
    this.pnb_1 = new StringResource('other_legal_guardian', this.fmi_1);
    this.qnb_1 = new StringResource('manage_parental_consent', this.fmi_1);
    this.rnb_1 = new StringResource('view_class_content', this.fmi_1);
    this.snb_1 = new StringResource('edit_class_content', this.fmi_1);
    this.tnb_1 = new StringResource('view_class_learning_records', this.fmi_1);
    this.unb_1 = new StringResource('view_contact_details_of_members', this.fmi_1);
    this.vnb_1 = new StringResource('edit_contact_details_of_members', this.fmi_1);
    this.wnb_1 = new StringResource('view_socioeconomic_details_of_members', this.fmi_1);
    this.xnb_1 = new StringResource('edit_socioeconomic_details_of_members', this.fmi_1);
    this.ynb_1 = new StringResource('add_person_or_group', this.fmi_1);
    this.znb_1 = new StringResource('lets_get_started', this.fmi_1);
    this.anc_1 = new StringResource('looks_like_installed_app_from_link', this.fmi_1);
    this.bnc_1 = new StringResource('continue_using_link_recommended', this.fmi_1);
    this.cnc_1 = new StringResource('continue_using_the_link', this.fmi_1);
    this.dnc_1 = new StringResource('start_from_scratch', this.fmi_1);
    this.enc_1 = new StringResource('ignore_the_link', this.fmi_1);
    this.fnc_1 = new StringResource('add_permission_for_a_person', this.fmi_1);
    this.gnc_1 = new StringResource('add_permission_for_a_group', this.fmi_1);
    this.hnc_1 = new StringResource('add_using_link', this.fmi_1);
    this.inc_1 = new StringResource('add_using_a_web_link_then', this.fmi_1);
    this.jnc_1 = new StringResource('add_from_gallery', this.fmi_1);
    this.knc_1 = new StringResource('add_video_or_audio_from_the_device_gallery', this.fmi_1);
    this.lnc_1 = new StringResource('add_file', this.fmi_1);
    this.mnc_1 = new StringResource('add_folder', this.fmi_1);
    this.nnc_1 = new StringResource('importing', this.fmi_1);
    this.onc_1 = new StringResource('downloading_content', this.fmi_1);
    this.pnc_1 = new StringResource('deleting_content', this.fmi_1);
    this.qnc_1 = new StringResource('add_folder_description', this.fmi_1);
    this.rnc_1 = new StringResource('add_educational_content_using_supported_formats_eg_pdf_xapi_h5p', this.fmi_1);
    this.snc_1 = new StringResource('current_status_consent_granted', this.fmi_1);
    this.tnc_1 = new StringResource('select_country', this.fmi_1);
    this.unc_1 = new StringResource('enter_link', this.fmi_1);
    this.vnc_1 = new StringResource('add_subject', this.fmi_1);
    this.wnc_1 = new StringResource('share_via', this.fmi_1);
    this.xnc_1 = new StringResource('share_apk_file', this.fmi_1);
    this.ync_1 = new StringResource('recommended_for_advanced_users', this.fmi_1);
    this.znc_1 = new StringResource('nearby_share', this.fmi_1);
    this.and_1 = new StringResource('recommended_for_offline_installation', this.fmi_1);
    this.bnd_1 = new StringResource('app_store_link', this.fmi_1);
    this.cnd_1 = new StringResource('everything_works_offline', this.fmi_1);
    this.dnd_1 = new StringResource('swipe_to_next', this.fmi_1);
    this.end_1 = new StringResource('content_entries_completed', this.fmi_1);
    this.fnd_1 = new StringResource('content_usage_time', this.fmi_1);
    this.gnd_1 = new StringResource('all_permissions', this.fmi_1);
    this.hnd_1 = new StringResource('folder', this.fmi_1);
    this.ind_1 = new StringResource('create_a_new_learning_env', this.fmi_1);
    this.jnd_1 = new StringResource('add_educational_content_to_new_learning_env', this.fmi_1);
    this.knd_1 = new StringResource('connect_to_an_existing_learning_environment', this.fmi_1);
    this.lnd_1 = new StringResource('does_your_class_already_have_learning_env', this.fmi_1);
    this.mnd_1 = new StringResource('use_the_public_lib_env', this.fmi_1);
    this.nnd_1 = new StringResource('just_want_to_browse', this.fmi_1);
    this.ond_1 = new StringResource('revoking_consent_will', this.fmi_1);
    this.pnd_1 = new StringResource('you_must_comply_with_license', this.fmi_1);
    this.qnd_1 = new StringResource('you_can_copypaste_a_link', this.fmi_1);
    this.rnd_1 = new StringResource('see_supported_sites', this.fmi_1);
    this.snd_1 = new StringResource('class_setup', this.fmi_1);
    this.tnd_1 = new StringResource('anyone_with_this_can_join_school', this.fmi_1);
    this.und_1 = new StringResource('this_class', this.fmi_1);
    this.vnd_1 = new StringResource('from_my_classes', this.fmi_1);
    this.wnd_1 = new StringResource('my_content', this.fmi_1);
    this.xnd_1 = new StringResource('learning_environment', this.fmi_1);
    this.ynd_1 = new StringResource('grades_class_age', this.fmi_1);
    this.znd_1 = new StringResource('add_remove_and_modify_grades', this.fmi_1);
    this.ane_1 = new StringResource('subjects', this.fmi_1);
    this.bne_1 = new StringResource('add_remove_and_modify_subjects', this.fmi_1);
    this.cne_1 = new StringResource('create_my_account', this.fmi_1);
    this.dne_1 = new StringResource('recommend_it', this.fmi_1);
    this.ene_1 = new StringResource('edit_permissions', this.fmi_1);
    this.fne_1 = new StringResource('add_from_contacts', this.fmi_1);
    this.gne_1 = new StringResource('almost_done', this.fmi_1);
    this.hne_1 = new StringResource('your_username', this.fmi_1);
    this.ine_1 = new StringResource('select_content', this.fmi_1);
    this.jne_1 = new StringResource('search_in', this.fmi_1);
    this.kne_1 = new StringResource('type', this.fmi_1);
    this.lne_1 = new StringResource('please_download_the_app', this.fmi_1);
    this.mne_1 = new StringResource('alternatively_you_can_download_the_apk', this.fmi_1);
    this.nne_1 = new StringResource('full_i_can_download_as_much_as_i_like', this.fmi_1);
    this.one_1 = new StringResource('limited_i_avoid_downloading_too_much', this.fmi_1);
    this.pne_1 = new StringResource('oops', this.fmi_1);
    this.qne_1 = new StringResource('sorry_something_went_wrong', this.fmi_1);
    this.rne_1 = new StringResource('incident_id', this.fmi_1);
    this.sne_1 = new StringResource('error_code', this.fmi_1);
    this.tne_1 = new StringResource('take_me_home', this.fmi_1);
    this.une_1 = new StringResource('view_clazz', this.fmi_1);
    this.vne_1 = new StringResource('view_clazzes', this.fmi_1);
    this.wne_1 = new StringResource('enrol_and_unenrol_students', this.fmi_1);
    this.xne_1 = new StringResource('enrol_and_unenrol_teachers', this.fmi_1);
    this.yne_1 = new StringResource('view_assignments', this.fmi_1);
    this.zne_1 = new StringResource('add_or_edit_assignment', this.fmi_1);
    this.anf_1 = new StringResource('view_basic_profile_of_members', this.fmi_1);
    this.bnf_1 = new StringResource('edit_basic_profile_of_members', this.fmi_1);
    this.cnf_1 = new StringResource('view_school', this.fmi_1);
    this.dnf_1 = new StringResource('edit_clazzes', this.fmi_1);
    this.enf_1 = new StringResource('add_new_clazz_to_school', this.fmi_1);
    this.fnf_1 = new StringResource('added_to_class_content', this.fmi_1);
    this.gnf_1 = new StringResource('content_already_added_to_class', this.fmi_1);
    this.hnf_1 = new StringResource('your_account_needs_approved', this.fmi_1);
    this.inf_1 = new StringResource('adult_account_required', this.fmi_1);
    this.jnf_1 = new StringResource('blank_report', this.fmi_1);
    this.knf_1 = new StringResource('attendance_over_time_by_class', this.fmi_1);
    this.lnf_1 = new StringResource('percentage_of_students_attending_over_time', this.fmi_1);
    this.mnf_1 = new StringResource('content_completion', this.fmi_1);
    this.nnf_1 = new StringResource('number_of_students_completed_time', this.fmi_1);
    this.onf_1 = new StringResource('content_usage_by_class', this.fmi_1);
    this.pnf_1 = new StringResource('total_content_usage_duration_class', this.fmi_1);
    this.qnf_1 = new StringResource('content_usage_over_time', this.fmi_1);
    this.rnf_1 = new StringResource('total_content_duration_gender', this.fmi_1);
    this.snf_1 = new StringResource('unique_content_users_over_time', this.fmi_1);
    this.tnf_1 = new StringResource('number_of_active_users_over_time', this.fmi_1);
    this.unf_1 = new StringResource('parent', this.fmi_1);
    this.vnf_1 = new StringResource('upload', this.fmi_1);
    this.wnf_1 = new StringResource('selected_file_summary', this.fmi_1);
    this.xnf_1 = new StringResource('drag_and_drop_or_click_to_add_file', this.fmi_1);
    this.ynf_1 = new StringResource('extra_active_tab_warning', this.fmi_1);
    this.znf_1 = new StringResource('saved', this.fmi_1);
    this.ang_1 = new StringResource('individual', this.fmi_1);
    this.bng_1 = new StringResource('group', this.fmi_1);
    this.cng_1 = new StringResource('dont_show_before', this.fmi_1);
    this.dng_1 = new StringResource('group_submission', this.fmi_1);
    this.eng_1 = new StringResource('require_file_submission', this.fmi_1);
    this.fng_1 = new StringResource('require_text_submission', this.fmi_1);
    this.gng_1 = new StringResource('maximum', this.fmi_1);
    this.hng_1 = new StringResource('size_limit', this.fmi_1);
    this.ing_1 = new StringResource('size_limit_error', this.fmi_1);
    this.jng_1 = new StringResource('limit', this.fmi_1);
    this.kng_1 = new StringResource('number_of_files', this.fmi_1);
    this.lng_1 = new StringResource('edit_after_submission', this.fmi_1);
    this.mng_1 = new StringResource('allowed_till_deadline', this.fmi_1);
    this.nng_1 = new StringResource('allowed_till_grace', this.fmi_1);
    this.ong_1 = new StringResource('not_allowed', this.fmi_1);
    this.png_1 = new StringResource('marked_by', this.fmi_1);
    this.qng_1 = new StringResource('peers', this.fmi_1);
    this.rng_1 = new StringResource('peers_to_review', this.fmi_1);
    this.sng_1 = new StringResource('file_type', this.fmi_1);
    this.tng_1 = new StringResource('file_type_chosen', this.fmi_1);
    this.ung_1 = new StringResource('file_type_any', this.fmi_1);
    this.vng_1 = new StringResource('file_document', this.fmi_1);
    this.wng_1 = new StringResource('file_image', this.fmi_1);
    this.xng_1 = new StringResource('submit_grade', this.fmi_1);
    this.yng_1 = new StringResource('submit_grade_and_mark_next', this.fmi_1);
    this.zng_1 = new StringResource('graded', this.fmi_1);
    this.anh_1 = new StringResource('score_greater_than_zero', this.fmi_1);
    this.bnh_1 = new StringResource('words', this.fmi_1);
    this.cnh_1 = new StringResource('characters', this.fmi_1);
    this.dnh_1 = new StringResource('class_timezone_set', this.fmi_1);
    this.enh_1 = new StringResource('maximum_points', this.fmi_1);
    this.fnh_1 = new StringResource('penalty_label', this.fmi_1);
    this.gnh_1 = new StringResource('submissions', this.fmi_1);
    this.hnh_1 = new StringResource('add_text', this.fmi_1);
    this.inh_1 = new StringResource('course_blocks', this.fmi_1);
    this.jnh_1 = new StringResource('add_block', this.fmi_1);
    this.knh_1 = new StringResource('edit_block', this.fmi_1);
    this.lnh_1 = new StringResource('module', this.fmi_1);
    this.mnh_1 = new StringResource('course_module', this.fmi_1);
    this.nnh_1 = new StringResource('formatted_text_to_show_to_course_participants', this.fmi_1);
    this.onh_1 = new StringResource('add_course_block_content_desc', this.fmi_1);
    this.pnh_1 = new StringResource('add_assignment_block_content_desc', this.fmi_1);
    this.qnh_1 = new StringResource('discussion_board', this.fmi_1);
    this.rnh_1 = new StringResource('add_discussion_board_desc', this.fmi_1);
    this.snh_1 = new StringResource('new_module', this.fmi_1);
    this.tnh_1 = new StringResource('edit_module', this.fmi_1);
    this.unh_1 = new StringResource('indent', this.fmi_1);
    this.vnh_1 = new StringResource('unindent', this.fmi_1);
    this.wnh_1 = new StringResource('institution', this.fmi_1);
    this.xnh_1 = new StringResource('student_enrolment_policy', this.fmi_1);
    this.ynh_1 = new StringResource('teacher_enrolment_policy', this.fmi_1);
    this.znh_1 = new StringResource('open_enrolment', this.fmi_1);
    this.ani_1 = new StringResource('enrolment_requests_must_be_approved', this.fmi_1);
    this.bni_1 = new StringResource('accept_enrolment_requests_automatically', this.fmi_1);
    this.cni_1 = new StringResource('visibility', this.fmi_1);
    this.dni_1 = new StringResource('hidden_enrolment_via_links_code_or_invitation', this.fmi_1);
    this.eni_1 = new StringResource('visible_for_all', this.fmi_1);
    this.fni_1 = new StringResource('terminology', this.fmi_1);
    this.gni_1 = new StringResource('select_terminology', this.fmi_1);
    this.hni_1 = new StringResource('add_new_terminology', this.fmi_1);
    this.ini_1 = new StringResource('edit_terminology', this.fmi_1);
    this.jni_1 = new StringResource('your_words_for', this.fmi_1);
    this.kni_1 = new StringResource('course_setup', this.fmi_1);
    this.lni_1 = new StringResource('number_of_groups', this.fmi_1);
    this.mni_1 = new StringResource('assign_to_random_groups', this.fmi_1);
    this.nni_1 = new StringResource('add_new_groups', this.fmi_1);
    this.oni_1 = new StringResource('edit_groups', this.fmi_1);
    this.pni_1 = new StringResource('num_replies', this.fmi_1);
    this.qni_1 = new StringResource('topics', this.fmi_1);
    this.rni_1 = new StringResource('add_topic', this.fmi_1);
    this.sni_1 = new StringResource('add_a_reply', this.fmi_1);
    this.tni_1 = new StringResource('messages', this.fmi_1);
    this.uni_1 = new StringResource('message', this.fmi_1);
    this.vni_1 = new StringResource('library', this.fmi_1);
    this.wni_1 = new StringResource('courses', this.fmi_1);
    this.xni_1 = new StringResource('course', this.fmi_1);
    this.yni_1 = new StringResource('reports_and_analytics', this.fmi_1);
    this.zni_1 = new StringResource('course_comments', this.fmi_1);
    this.anj_1 = new StringResource('currently_enroled', this.fmi_1);
    this.bnj_1 = new StringResource('past_enrolments', this.fmi_1);
    this.cnj_1 = new StringResource('standard', this.fmi_1);
    this.dnj_1 = new StringResource('group_number', this.fmi_1);
    this.enj_1 = new StringResource('add_group', this.fmi_1);
    this.fnj_1 = new StringResource('edit_group', this.fmi_1);
    this.gnj_1 = new StringResource('new_group_set', this.fmi_1);
    this.hnj_1 = new StringResource('edit_text', this.fmi_1);
    this.inj_1 = new StringResource('add_module', this.fmi_1);
    this.jnj_1 = new StringResource('add_a_new_course', this.fmi_1);
    this.knj_1 = new StringResource('join_existing_course', this.fmi_1);
    this.lnj_1 = new StringResource('edit_course', this.fmi_1);
    this.mnj_1 = new StringResource('currently_enrolled', this.fmi_1);
    this.nnj_1 = new StringResource('past_enrollments', this.fmi_1);
    this.onj_1 = new StringResource('unread', this.fmi_1);
    this.pnj_1 = new StringResource('new_chat', this.fmi_1);
    this.qnj_1 = new StringResource('new_group', this.fmi_1);
    this.rnj_1 = new StringResource('chat', this.fmi_1);
    this.snj_1 = new StringResource('you', this.fmi_1);
    this.tnj_1 = new StringResource('edit_topic', this.fmi_1);
    this.unj_1 = new StringResource('posts', this.fmi_1);
    this.vnj_1 = new StringResource('post', this.fmi_1);
    this.wnj_1 = new StringResource('individual_submission', this.fmi_1);
    this.xnj_1 = new StringResource('unassigned', this.fmi_1);
    this.ynj_1 = new StringResource('error_too_long_text', this.fmi_1);
    this.znj_1 = new StringResource('managed_enrolment', this.fmi_1);
    this.ank_1 = new StringResource('text_file_submission_error', this.fmi_1);
    this.bnk_1 = new StringResource('submit_all_at_once_submission_policy', this.fmi_1);
    this.cnk_1 = new StringResource('multiple_submission_allowed_submission_policy', this.fmi_1);
    this.dnk_1 = new StringResource('enrolment_policy', this.fmi_1);
    this.enk_1 = new StringResource('submission_policy', this.fmi_1);
    this.fnk_1 = new StringResource('submission_already_made', this.fmi_1);
    this.gnk_1 = new StringResource('grade_out_of_range', this.fmi_1);
    this.hnk_1 = new StringResource('update_grade', this.fmi_1);
    this.ink_1 = new StringResource('update_grade_and_mark_next', this.fmi_1);
    this.jnk_1 = new StringResource('add_discussion', this.fmi_1);
    this.knk_1 = new StringResource('edit_discussion', this.fmi_1);
    this.lnk_1 = new StringResource('type_here', this.fmi_1);
    this.mnk_1 = new StringResource('deadline_has_passed', this.fmi_1);
    this.nnk_1 = new StringResource('already_submitted', this.fmi_1);
    this.onk_1 = new StringResource('exceeds_word_limit', this.fmi_1);
    this.pnk_1 = new StringResource('exceeds_char_limit', this.fmi_1);
    this.qnk_1 = new StringResource('unassigned_error', this.fmi_1);
    this.rnk_1 = new StringResource('enabled', this.fmi_1);
    this.snk_1 = new StringResource('disabled', this.fmi_1);
    this.tnk_1 = new StringResource('from_my_courses', this.fmi_1);
    this.unk_1 = new StringResource('assign_reviewers', this.fmi_1);
    this.vnk_1 = new StringResource('reviews_per_user_group', this.fmi_1);
    this.wnk_1 = new StringResource('assign_random_reviewers', this.fmi_1);
    this.xnk_1 = new StringResource('reviewer', this.fmi_1);
    this.ynk_1 = new StringResource('app_language', this.fmi_1);
    this.znk_1 = new StringResource('pdf', this.fmi_1);
    this.anl_1 = new StringResource('panic_button_app', this.fmi_1);
    this.bnl_1 = new StringResource('actions_to_be_taken_in_case_of_emergency', this.fmi_1);
    this.cnl_1 = new StringResource('exit_app', this.fmi_1);
    this.dnl_1 = new StringResource('delete_app_data_from_device', this.fmi_1);
    this.enl_1 = new StringResource('more_options', this.fmi_1);
    this.fnl_1 = new StringResource('num_holidays', this.fmi_1);
    this.gnl_1 = new StringResource('hide_app', this.fmi_1);
    this.hnl_1 = new StringResource('panic_button_explanation', this.fmi_1);
    this.inl_1 = new StringResource('hide_app_explanation', this.fmi_1);
    this.jnl_1 = new StringResource('most_recent', this.fmi_1);
    this.knl_1 = new StringResource('comment', this.fmi_1);
    this.lnl_1 = new StringResource('grant_app_permission', this.fmi_1);
    this.mnl_1 = new StringResource('this_app_will_receive', this.fmi_1);
    this.nnl_1 = new StringResource('my_profile', this.fmi_1);
    this.onl_1 = new StringResource('add_another_account', this.fmi_1);
    this.pnl_1 = new StringResource('end_is_before_start', this.fmi_1);
    this.qnl_1 = new StringResource('select_person', this.fmi_1);
    this.rnl_1 = new StringResource('your_submission', this.fmi_1);
    this.snl_1 = new StringResource('edit_content', this.fmi_1);
    this.tnl_1 = new StringResource('edit_folder', this.fmi_1);
    this.unl_1 = new StringResource('add_new_post', this.fmi_1);
    this.vnl_1 = new StringResource('grades_scoring', this.fmi_1);
    this.wnl_1 = new StringResource('mark_comment', this.fmi_1);
    this.xnl_1 = new StringResource('mark', this.fmi_1);
    this.ynl_1 = new StringResource('too_high', this.fmi_1);
    this.znl_1 = new StringResource('required', this.fmi_1);
    this.anm_1 = new StringResource('expand', this.fmi_1);
    this.bnm_1 = new StringResource('collapse', this.fmi_1);
    this.cnm_1 = new StringResource('remove', this.fmi_1);
    this.dnm_1 = new StringResource('table_of_contents', this.fmi_1);
    this.enm_1 = new StringResource('select_date', this.fmi_1);
    this.fnm_1 = new StringResource('link', this.fmi_1);
    this.gnm_1 = new StringResource('time_submitted', this.fmi_1);
    this.hnm_1 = new StringResource('group_assignment', this.fmi_1);
    this.inm_1 = new StringResource('menu', this.fmi_1);
    this.jnm_1 = new StringResource('restarting', this.fmi_1);
    this.knm_1 = new StringResource('terms_required_if_registration_enabled', this.fmi_1);
    this.lnm_1 = new StringResource('drop_files_to_import', this.fmi_1);
    this.mnm_1 = new StringResource('compose_post', this.fmi_1);
    this.nnm_1 = new StringResource('password_updated', this.fmi_1);
    this.onm_1 = new StringResource('html5_content_display_engine', this.fmi_1);
    this.pnm_1 = new StringResource('chrome_recommended', this.fmi_1);
    this.qnm_1 = new StringResource('chrome_recommended_info', this.fmi_1);
    this.rnm_1 = new StringResource('internal_webview', this.fmi_1);
    this.snm_1 = new StringResource('internal_webview_info', this.fmi_1);
    this.tnm_1 = new StringResource('content_not_ready_try_later', this.fmi_1);
    this.unm_1 = new StringResource('version', this.fmi_1);
    this.vnm_1 = new StringResource('licenses', this.fmi_1);
    this.wnm_1 = new StringResource('cannot_record_attendance_for_future_date_time', this.fmi_1);
    this.xnm_1 = new StringResource('could_not_load_vlc', this.fmi_1);
    this.ynm_1 = new StringResource('selected', this.fmi_1);
    this.znm_1 = new StringResource('clear_selection', this.fmi_1);
    this.ann_1 = new StringResource('move_entries_to_this_folder', this.fmi_1);
    this.bnn_1 = new StringResource('cannot_move_to_subfolder_of_self', this.fmi_1);
    this.cnn_1 = new StringResource('cannot_move_already_in_same_folder', this.fmi_1);
    this.dnn_1 = new StringResource('move_to', this.fmi_1);
    this.enn_1 = new StringResource('restore', this.fmi_1);
    this.fnn_1 = new StringResource('delete_permanently', this.fmi_1);
    this.gnn_1 = new StringResource('deleted_items', this.fmi_1);
    this.hnn_1 = new StringResource('delete_or_restore_items', this.fmi_1);
    this.inn_1 = new StringResource('yesterday', this.fmi_1);
    this.jnn_1 = new StringResource('request_to_enrol_already_pending', this.fmi_1);
    this.knn_1 = new StringResource('request_submitted', this.fmi_1);
    this.lnn_1 = new StringResource('canceled_enrolment_request', this.fmi_1);
    this.mnn_1 = new StringResource('enroled_into_name', this.fmi_1);
    this.nnn_1 = new StringResource('declined_request_from_name', this.fmi_1);
    this.onn_1 = new StringResource('view_course', this.fmi_1);
    this.pnn_1 = new StringResource('moderate', this.fmi_1);
    this.qnn_1 = new StringResource('manage_student_enrolments', this.fmi_1);
    this.rnn_1 = new StringResource('manage_teacher_enrolments', this.fmi_1);
    this.snn_1 = new StringResource('view_learning_records', this.fmi_1);
    this.tnn_1 = new StringResource('edit_learning_records', this.fmi_1);
    this.unn_1 = new StringResource('view_members', this.fmi_1);
    this.vnn_1 = new StringResource('copy_invite_code', this.fmi_1);
    this.wnn_1 = new StringResource('direct_enrol_users_onto_courses', this.fmi_1);
    this.xnn_1 = new StringResource('could_not_restart', this.fmi_1);
    this.ynn_1 = new StringResource('close_now', this.fmi_1);
    this.znn_1 = new StringResource('view_all_courses', this.fmi_1);
    this.ano_1 = new StringResource('edit_all_courses', this.fmi_1);
    this.bno_1 = new StringResource('moderate_all_courses', this.fmi_1);
    this.cno_1 = new StringResource('manage_student_enrolments_for_all_courses', this.fmi_1);
    this.dno_1 = new StringResource('manage_teacher_enrolments_for_all_courses', this.fmi_1);
    this.eno_1 = new StringResource('view_attendance_records_for_all_courses', this.fmi_1);
    this.fno_1 = new StringResource('edit_attendance_records_for_all_courses', this.fmi_1);
    this.gno_1 = new StringResource('add_new_users', this.fmi_1);
    this.hno_1 = new StringResource('view_all_users', this.fmi_1);
    this.ino_1 = new StringResource('edit_all_users', this.fmi_1);
    this.jno_1 = new StringResource('view_learning_records_for_all_courses', this.fmi_1);
    this.kno_1 = new StringResource('edit_learning_records_for_all_courses', this.fmi_1);
    this.lno_1 = new StringResource('add_new_courses', this.fmi_1);
    this.mno_1 = new StringResource('manage_user_permissions', this.fmi_1);
    this.nno_1 = new StringResource('reset_passwords', this.fmi_1);
    this.ono_1 = new StringResource('upload_failed', this.fmi_1);
    this.pno_1 = new StringResource('opening_name', this.fmi_1);
    this.qno_1 = new StringResource('invalid_invite_code', this.fmi_1);
    this.rno_1 = new StringResource('bulk_import', this.fmi_1);
    this.sno_1 = new StringResource('import_key', this.fmi_1);
    this.tno_1 = new StringResource('imported', this.fmi_1);
    this.uno_1 = new StringResource('you_can_import_users_using_a_csv_file', this.fmi_1);
    this.vno_1 = new StringResource('get_template', this.fmi_1);
    this.wno_1 = new StringResource('line_number', this.fmi_1);
    this.xno_1 = new StringResource('selected_content', this.fmi_1);
    this.yno_1 = new StringResource('edit_content_block', this.fmi_1);
    this.zno_1 = new StringResource('compression', this.fmi_1);
    this.anp_1 = new StringResource('compression_highest', this.fmi_1);
    this.bnp_1 = new StringResource('compression_high', this.fmi_1);
    this.cnp_1 = new StringResource('compression_medium', this.fmi_1);
    this.dnp_1 = new StringResource('compression_low', this.fmi_1);
    this.enp_1 = new StringResource('compression_lowest', this.fmi_1);
    this.fnp_1 = new StringResource('compression_none', this.fmi_1);
    this.gnp_1 = new StringResource('size_compressed_was', this.fmi_1);
    this.hnp_1 = new StringResource('size', this.fmi_1);
    this.inp_1 = new StringResource('import_error', this.fmi_1);
    this.jnp_1 = new StringResource('upload_error', this.fmi_1);
    this.knp_1 = new StringResource('offline_items_storage', this.fmi_1);
    this.lnp_1 = new StringResource('space_available', this.fmi_1);
    this.mnp_1 = new StringResource('grant_permission', this.fmi_1);
    this.nnp_1 = new StringResource('gradebook', this.fmi_1);
    this.onp_1 = new StringResource('full_screen', this.fmi_1);
    this.pnp_1 = new StringResource('exit_full_screen', this.fmi_1);
    this.qnp_1 = new StringResource('increase_text_size', this.fmi_1);
    this.rnp_1 = new StringResource('decrease_text_size', this.fmi_1);
    this.snp_1 = new StringResource('nothing_here_yet', this.fmi_1);
    this.tnp_1 = new StringResource('signup_with_passkey', this.fmi_1);
    this.unp_1 = new StringResource('other_options', this.fmi_1);
    this.vnp_1 = new StringResource('i_am_teacher', this.fmi_1);
    this.wnp_1 = new StringResource('i_am_parent', this.fmi_1);
    this.xnp_1 = new StringResource('select_picture_from_files', this.fmi_1);
    this.ynp_1 = new StringResource('your_date_of_birth', this.fmi_1);
    this.znp_1 = new StringResource('add_child_profiles', this.fmi_1);
    this.anq_1 = new StringResource('child_profile', this.fmi_1);
    this.bnq_1 = new StringResource('finish', this.fmi_1);
    this.cnq_1 = new StringResource('scan_badge_qr_code', this.fmi_1);
    this.dnq_1 = new StringResource('new_user', this.fmi_1);
    this.enq_1 = new StringResource('existing_user', this.fmi_1);
    this.fnq_1 = new StringResource('personal_account', this.fmi_1);
    this.gnq_1 = new StringResource('signup', this.fmi_1);
    this.hnq_1 = new StringResource('access_educational_content_download_offline', this.fmi_1);
    this.inq_1 = new StringResource('join_learning_space', this.fmi_1);
    this.jnq_1 = new StringResource('learning_space', this.fmi_1);
    this.knq_1 = new StringResource('eg_for_your_school_organization', this.fmi_1);
    this.lnq_1 = new StringResource('new_learning_space', this.fmi_1);
    this.mnq_1 = new StringResource('full_name', this.fmi_1);
    this.nnq_1 = new StringResource('which_profile_do_you_want_to_start', this.fmi_1);
    this.onq_1 = new StringResource('create_passkey_for_faster_and_easier_signin', this.fmi_1);
    this.pnq_1 = new StringResource('create_username_and_password', this.fmi_1);
    this.qnq_1 = new StringResource('create_local_account', this.fmi_1);
    this.rnq_1 = new StringResource('with_passkeys_no_complex_passwords_needed', this.fmi_1);
    this.snq_1 = new StringResource('enter_link_manually', this.fmi_1);
    this.tnq_1 = new StringResource('registration_not_allowed', this.fmi_1);
    this.unq_1 = new StringResource('add_subtitles', this.fmi_1);
    this.vnq_1 = new StringResource('edit_subtitles', this.fmi_1);
    this.wnq_1 = new StringResource('subtitles', this.fmi_1);
    this.xnq_1 = new StringResource('progress_key', this.fmi_1);
    this.ynq_1 = new StringResource('response', this.fmi_1);
    this.znq_1 = new StringResource('true_key', this.fmi_1);
    this.anr_1 = new StringResource('false_key', this.fmi_1);
    this.bnr_1 = new StringResource('copy', this.fmi_1);
    this.cnr_1 = new StringResource('copy_course', this.fmi_1);
    this.dnr_1 = new StringResource('copy_of', this.fmi_1);
    this.enr_1 = new StringResource('invite_via_contact', this.fmi_1);
    this.fnr_1 = new StringResource('invite_to_course', this.fmi_1);
    this.gnr_1 = new StringResource('use_email', this.fmi_1);
    this.hnr_1 = new StringResource('use_phone_number', this.fmi_1);
    this.inr_1 = new StringResource('add_username_email_phone', this.fmi_1);
    this.jnr_1 = new StringResource('no_valid_contact_found', this.fmi_1);
    this.knr_1 = new StringResource('no_contact_found', this.fmi_1);
    this.lnr_1 = new StringResource('decline', this.fmi_1);
    this.mnr_1 = new StringResource('do_you_want_to_join_this_course', this.fmi_1);
    this.nnr_1 = new StringResource('invite_has_been_used', this.fmi_1);
    this.onr_1 = new StringResource('pending_invites', this.fmi_1);
    this.pnr_1 = new StringResource('expires', this.fmi_1);
    this.qnr_1 = new StringResource('reminder', this.fmi_1);
    this.rnr_1 = new StringResource('resend', this.fmi_1);
    this.snr_1 = new StringResource('revoke', this.fmi_1);
    this.tnr_1 = new StringResource('invite_code_redeemed', this.fmi_1);
    this.unr_1 = new StringResource('invite_code_invalid', this.fmi_1);
    this.vnr_1 = new StringResource('invite_declined', this.fmi_1);
    this.wnr_1 = new StringResource('invite_code_already_redeemed', this.fmi_1);
    this.xnr_1 = new StringResource('invite_code_expired', this.fmi_1);
    this.ynr_1 = new StringResource('invitation_is_revoked', this.fmi_1);
    this.znr_1 = new StringResource('security', this.fmi_1);
    this.ans_1 = new StringResource('manage_account', this.fmi_1);
    this.bns_1 = new StringResource('passkeys', this.fmi_1);
    this.cns_1 = new StringResource('manage', this.fmi_1);
    this.dns_1 = new StringResource('created', this.fmi_1);
    this.ens_1 = new StringResource('create_passkey', this.fmi_1);
    this.fns_1 = new StringResource('last_updated', this.fmi_1);
    this.gns_1 = new StringResource('delete_this_passkey', this.fmi_1);
    this.hns_1 = new StringResource('loss_access_passkey_dialog', this.fmi_1);
    this.ins_1 = new StringResource('sign_in_faster_next_time', this.fmi_1);
    this.jns_1 = new StringResource('secure_passkey_detail_text', this.fmi_1);
    this.kns_1 = new StringResource('invitations_sent', this.fmi_1);
    this.lns_1 = new StringResource('invitation_sent', this.fmi_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.mns_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.nns_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.ons_1 = new Impl(this.nns_1, this.mns_1);
    this.pns_1 = new PluralsResource('number_of_attempts', this.ons_1);
    this.qns_1 = new PluralsResource('duration_hours', this.ons_1);
    this.rns_1 = new PluralsResource('duration_minutes', this.ons_1);
    this.sns_1 = new PluralsResource('duration_seconds', this.ons_1);
    this.tns_1 = new PluralsResource('items_selected', this.ons_1);
    this.uns_1 = new PluralsResource('items_deleted', this.ons_1);
    this.vns_1 = new PluralsResource('items_restored', this.ons_1);
    this.wns_1 = new PluralsResource('are_you_sure_you_want_to_permanently_delete', this.ons_1);
  }
  var plurals_instance;
  function plurals_getInstance() {
    if (plurals_instance == null)
      new plurals();
    return plurals_instance;
  }
  function MR() {
    MR_instance = this;
    this.xns_1 = 'a868dc878b6fc161f22669834776d68d';
    this.yns_1 = strings_getInstance().fmi_1.nmd(plurals_getInstance().ons_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.zns_1 = makeAccountActive;
    this.ant_1 = parentJoin;
  }
  protoOf(AccountRegisterOptions).toString = function () {
    return 'AccountRegisterOptions(makeAccountActive=' + this.zns_1 + ', parentJoin=' + this.ant_1 + ')';
  };
  protoOf(AccountRegisterOptions).hashCode = function () {
    var result = getBooleanHashCode(this.zns_1);
    result = imul(result, 31) + (this.ant_1 == null ? 0 : this.ant_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.zns_1 === tmp0_other_with_cast.zns_1))
      return false;
    if (!equals(this.ant_1, tmp0_other_with_cast.ant_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_dataLayer__43yv12($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dnt_1;
    dataLayer$factory_0();
    return this_0.t2();
  }
  function $setAuthCOROUTINE$1(_this__u8e3s4, personUid, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mnt_1 = _this__u8e3s4;
    this.nnt_1 = personUid;
    this.ont_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.mnt_1, this.ont_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.pnt_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = _get_dataLayer__43yv12(this.mnt_1).wk2().a7f();
            var this_0 = new PersonAuth2();
            this_0.cg0_1 = this.nnt_1;
            var tmp_1 = this_0;
            tmp_1.dg0_1 = 'PBKDF2x2';
            this_0.eg0_1 = this.pnt_1;
            suspendResult = tmp_0.yfz(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(learningSpace, di) {
    this.bnt_1 = learningSpace;
    this.cnt_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bnt_1;
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(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(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.dnt_1 = Instance(this_0, tmp$ret$3, null).a5d(this, dataLayer$factory());
  }
  protoOf(AuthManager).a57 = function () {
    return this.cnt_1;
  };
  protoOf(AuthManager).qnt = 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 dataLayer$factory() {
    return getPropertyCallableRef('dataLayer', 1, KProperty1, function (receiver) {
      return _get_dataLayer__43yv12(receiver);
    }, null);
  }
  function dataLayer$factory_0() {
    return getPropertyCallableRef('dataLayer', 1, KProperty1, function (receiver) {
      return _get_dataLayer__43yv12(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_48;
  function Companion_getInstance_16() {
    return Companion_instance_48;
  }
  function $serializer() {
    $serializer_instance = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.LearningSpace', this, 1);
    tmp0_serialDesc.t4f('url', false);
    this.rnt_1 = tmp0_serialDesc;
  }
  protoOf($serializer).q44 = function () {
    return this.rnt_1;
  };
  protoOf($serializer).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer).s44 = function (decoder) {
    var tmp0_desc = this.rnt_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp6_input = decoder.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return LearningSpace_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer).snt = function (encoder, value) {
    var tmp0_desc = this.rnt_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.tnt_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer).r44 = function (encoder, value) {
    return this.snt(encoder, value instanceof LearningSpace ? value : THROW_CCE());
  };
  var $serializer_instance;
  function $serializer_getInstance_11() {
    if ($serializer_instance == null)
      new $serializer();
    return $serializer_instance;
  }
  function LearningSpace_init_$Init$(seen1, url, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_11().rnt_1);
    }
    $this.tnt_1 = url;
    var tmp = $this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.unt_1 = lazy(tmp_0, LearningSpace$_init_$lambda_beny7x($this));
    return $this;
  }
  function LearningSpace_init_$Create$(seen1, url, serializationConstructorMarker) {
    return LearningSpace_init_$Init$(seen1, url, serializationConstructorMarker, objectCreate(protoOf(LearningSpace)));
  }
  function LearningSpace$isLocal$delegate$lambda(this$0) {
    return function () {
      return endsWith(Url(this$0.tnt_1).y30_1, '.local');
    };
  }
  function LearningSpace$_init_$lambda_beny7x(this$0) {
    return function () {
      return endsWith(Url(this$0.tnt_1).y30_1, '.local');
    };
  }
  function LearningSpace(url) {
    this.tnt_1 = url;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.unt_1 = lazy(tmp_0, LearningSpace$isLocal$delegate$lambda(this));
  }
  protoOf(LearningSpace).vnt = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.unt_1;
    isLocal$factory();
    return this_0.t2();
  };
  protoOf(LearningSpace).toString = function () {
    return 'LearningSpace(url=' + this.tnt_1 + ')';
  };
  protoOf(LearningSpace).hashCode = function () {
    return getStringHashCode(this.tnt_1);
  };
  protoOf(LearningSpace).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpace))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpace ? other : THROW_CCE();
    if (!(this.tnt_1 === tmp0_other_with_cast.tnt_1))
      return false;
    return true;
  };
  function isLocal$factory() {
    return getPropertyCallableRef('isLocal', 1, KProperty1, function (receiver) {
      return receiver.vnt();
    }, null);
  }
  function Companion_0() {
    Companion_instance_49 = this;
    this.wnt_1 = new LearningSpaceScope();
  }
  var Companion_instance_49;
  function Companion_getInstance_17() {
    if (Companion_instance_49 == null)
      new Companion_0();
    return Companion_instance_49;
  }
  function LearningSpaceScope() {
    Companion_getInstance_17();
    var tmp = this;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp.xnt_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(LearningSpaceScope).ynt = function (context) {
    // Inline function 'kotlin.collections.getOrPut' call
    var this_0 = this.xnt_1;
    var key = context.tnt_1;
    var value = this_0.q(key);
    var tmp;
    if (value == null) {
      // Inline function 'com.ustadmobile.core.account.LearningSpaceScope.getRegistry.<anonymous>' call
      var answer = new StandardScopeRegistry();
      this_0.s(key, answer);
      tmp = answer;
    } else {
      tmp = value;
    }
    return tmp;
  };
  protoOf(LearningSpaceScope).h59 = function (context) {
    return this.ynt(context instanceof LearningSpace ? context : THROW_CCE());
  };
  function Pbkdf2Params(iterations, keyLength) {
    iterations = iterations === VOID ? 10000 : iterations;
    keyLength = keyLength === VOID ? 512 : keyLength;
    this.znt_1 = iterations;
    this.anu_1 = keyLength;
  }
  protoOf(Pbkdf2Params).toString = function () {
    return 'Pbkdf2Params(iterations=' + this.znt_1 + ', keyLength=' + this.anu_1 + ')';
  };
  protoOf(Pbkdf2Params).hashCode = function () {
    var result = this.znt_1;
    result = imul(result, 31) + this.anu_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.znt_1 === tmp0_other_with_cast.znt_1))
      return false;
    if (!(this.anu_1 === tmp0_other_with_cast.anu_1))
      return false;
    return true;
  };
  function Companion_1() {
  }
  protoOf(Companion_1).n4r = function () {
    return $serializer_getInstance_12();
  };
  var Companion_instance_50;
  function Companion_getInstance_18() {
    return Companion_instance_50;
  }
  function $serializer_0() {
    $serializer_instance_0 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.RegisterRequest', this, 5);
    tmp0_serialDesc.t4f('person', false);
    tmp0_serialDesc.t4f('newPassword', false);
    tmp0_serialDesc.t4f('parent', false);
    tmp0_serialDesc.t4f('learningSpaceUrl', false);
    tmp0_serialDesc.t4f('langCode', true);
    this.bnu_1 = tmp0_serialDesc;
  }
  protoOf($serializer_0).q44 = function () {
    return this.bnu_1;
  };
  protoOf($serializer_0).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.bnu_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.i48(tmp0_desc);
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.u48(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.w48(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.u48(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.w48(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return RegisterRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_0).cnu = function (encoder, value) {
    var tmp0_desc = this.bnu_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance(), value.dnu_1);
    tmp1_output.w49(tmp0_desc, 1, value.enu_1);
    tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_0(), value.fnu_1);
    tmp1_output.w49(tmp0_desc, 3, value.gnu_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.hnu_1 === 'en')) {
      tmp1_output.w49(tmp0_desc, 4, value.hnu_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_0).r44 = function (encoder, value) {
    return this.cnu(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, learningSpaceUrl, langCode, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_12().bnu_1);
    }
    $this.dnu_1 = person;
    $this.enu_1 = newPassword;
    $this.fnu_1 = parent;
    $this.gnu_1 = learningSpaceUrl;
    if (0 === (seen1 & 16))
      $this.hnu_1 = 'en';
    else
      $this.hnu_1 = langCode;
    return $this;
  }
  function RegisterRequest_init_$Create$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker) {
    return RegisterRequest_init_$Init$(seen1, person, newPassword, parent, learningSpaceUrl, langCode, serializationConstructorMarker, objectCreate(protoOf(RegisterRequest)));
  }
  function RegisterRequest(person, newPassword, parent, learningSpaceUrl, langCode) {
    langCode = langCode === VOID ? 'en' : langCode;
    this.dnu_1 = person;
    this.enu_1 = newPassword;
    this.fnu_1 = parent;
    this.gnu_1 = learningSpaceUrl;
    this.hnu_1 = langCode;
  }
  protoOf(RegisterRequest).toString = function () {
    return 'RegisterRequest(person=' + this.dnu_1 + ', newPassword=' + this.enu_1 + ', parent=' + this.fnu_1 + ', learningSpaceUrl=' + this.gnu_1 + ', langCode=' + this.hnu_1 + ')';
  };
  protoOf(RegisterRequest).hashCode = function () {
    var result = this.dnu_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.enu_1) | 0;
    result = imul(result, 31) + (this.fnu_1 == null ? 0 : this.fnu_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.gnu_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.hnu_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.dnu_1.equals(tmp0_other_with_cast.dnu_1))
      return false;
    if (!(this.enu_1 === tmp0_other_with_cast.enu_1))
      return false;
    if (!equals(this.fnu_1, tmp0_other_with_cast.fnu_1))
      return false;
    if (!(this.gnu_1 === tmp0_other_with_cast.gnu_1))
      return false;
    if (!(this.hnu_1 === tmp0_other_with_cast.hnu_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_51;
  function Companion_getInstance_19() {
    return Companion_instance_51;
  }
  function $serializer_1() {
    $serializer_instance_1 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.UserSessionWithPersonAndLearningSpace', this, 4);
    tmp0_serialDesc.t4f('userSession', false);
    tmp0_serialDesc.t4f('person', false);
    tmp0_serialDesc.t4f('learningSpace', false);
    tmp0_serialDesc.t4f('personPicture', true);
    this.inu_1 = tmp0_serialDesc;
  }
  protoOf($serializer_1).q44 = function () {
    return this.inu_1;
  };
  protoOf($serializer_1).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.inu_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.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.u48(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.u48(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return UserSessionWithPersonAndLearningSpace_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_1).jnu = function (encoder, value) {
    var tmp0_desc = this.inu_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_1(), value.knu_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance(), value.lnu_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_11(), value.mnu_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.nnu_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, $serializer_getInstance_2(), value.nnu_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_1).r44 = function (encoder, value) {
    return this.jnu(encoder, value instanceof UserSessionWithPersonAndLearningSpace ? value : THROW_CCE());
  };
  var $serializer_instance_1;
  function $serializer_getInstance_13() {
    if ($serializer_instance_1 == null)
      new $serializer_1();
    return $serializer_instance_1;
  }
  function UserSessionWithPersonAndLearningSpace_init_$Init$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_13().inu_1);
    }
    $this.knu_1 = userSession;
    $this.lnu_1 = person;
    $this.mnu_1 = learningSpace;
    if (0 === (seen1 & 8))
      $this.nnu_1 = null;
    else
      $this.nnu_1 = personPicture;
    return $this;
  }
  function UserSessionWithPersonAndLearningSpace_init_$Create$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker) {
    return UserSessionWithPersonAndLearningSpace_init_$Init$(seen1, userSession, person, learningSpace, personPicture, serializationConstructorMarker, objectCreate(protoOf(UserSessionWithPersonAndLearningSpace)));
  }
  function UserSessionWithPersonAndLearningSpace(userSession, person, learningSpace, personPicture) {
    personPicture = personPicture === VOID ? null : personPicture;
    this.knu_1 = userSession;
    this.lnu_1 = person;
    this.mnu_1 = learningSpace;
    this.nnu_1 = personPicture;
  }
  protoOf(UserSessionWithPersonAndLearningSpace).onu = function () {
    var displayUrl = removeSuffix(removePrefix(removePrefix(this.mnu_1.tnt_1, 'http://'), 'https://'), '/');
    return '' + this.lnu_1.g96_1 + '@' + displayUrl;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).pnu = function () {
    return toUmAccount(this.lnu_1, this.mnu_1.tnt_1);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).qnu = function () {
    var tmp0_elvis_lhs = this.lnu_1.g96_1;
    return new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(this.mnu_1.tnt_1, tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs));
  };
  protoOf(UserSessionWithPersonAndLearningSpace).rnu = function (userSession, person, learningSpace, personPicture) {
    return new UserSessionWithPersonAndLearningSpace(userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).snu = function (userSession, person, learningSpace, personPicture, $super) {
    userSession = userSession === VOID ? this.knu_1 : userSession;
    person = person === VOID ? this.lnu_1 : person;
    learningSpace = learningSpace === VOID ? this.mnu_1 : learningSpace;
    personPicture = personPicture === VOID ? this.nnu_1 : personPicture;
    return $super === VOID ? this.rnu(userSession, person, learningSpace, personPicture) : $super.rnu.call(this, userSession, person, learningSpace, personPicture);
  };
  protoOf(UserSessionWithPersonAndLearningSpace).toString = function () {
    return 'UserSessionWithPersonAndLearningSpace(userSession=' + this.knu_1 + ', person=' + this.lnu_1 + ', learningSpace=' + this.mnu_1 + ', personPicture=' + this.nnu_1 + ')';
  };
  protoOf(UserSessionWithPersonAndLearningSpace).hashCode = function () {
    var result = hashCode(this.knu_1);
    result = imul(result, 31) + this.lnu_1.hashCode() | 0;
    result = imul(result, 31) + this.mnu_1.hashCode() | 0;
    result = imul(result, 31) + (this.nnu_1 == null ? 0 : this.nnu_1.hashCode()) | 0;
    return result;
  };
  protoOf(UserSessionWithPersonAndLearningSpace).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UserSessionWithPersonAndLearningSpace))
      return false;
    var tmp0_other_with_cast = other instanceof UserSessionWithPersonAndLearningSpace ? other : THROW_CCE();
    if (!equals(this.knu_1, tmp0_other_with_cast.knu_1))
      return false;
    if (!this.lnu_1.equals(tmp0_other_with_cast.lnu_1))
      return false;
    if (!this.mnu_1.equals(tmp0_other_with_cast.mnu_1))
      return false;
    if (!equals(this.nnu_1, tmp0_other_with_cast.nnu_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.onu();
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.onu();
    return compareValues(tmp, tmp$ret$1);
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.bnv_1 = this$0;
    this.cnv_1 = $learningSpace;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).env = function (learningSpaceSessions, $completion) {
    var tmp = this.fnv(learningSpaceSessions, $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.env((!(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.bnv_1.knv_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.mnu_1.equals(this.cnv_1)) {
                  destination.i1(element);
                }
              }
              var this_1 = this.dnv_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.gik_1;
                var tmp_0 = tmp0_elvis_lhs == null ? new UserSession() : tmp0_elvis_lhs;
                var tmp1_elvis_lhs = item.eik_1;
                destination_0.i1(new UserSessionWithPersonAndLearningSpace(tmp_0, tmp1_elvis_lhs == null ? new Person() : tmp1_elvis_lhs, this.cnv_1, item.fik_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).fnv = function (learningSpaceSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this.bnv_1, this.cnv_1, completion);
    i.dnv_1 = learningSpaceSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this$0, $learningSpace, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation);
    var l = function (learningSpaceSessions, $completion) {
      return i.env(learningSpaceSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $learningSpace, resultContinuation) {
    this.znv_1 = this$0;
    this.anw_1 = $learningSpace;
    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.znv_1.hnv_1;
            var context = this.anw_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.cnw_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.cnw_1.b7f().zii();
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this.znv_1, this.anw_1, null);
            suspendResult = tmp_5.a1c(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.znv_1, this.anw_1, completion);
    i.bnw_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_0(this$0, $learningSpace, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $learningSpace, 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.lnw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda).nnw = function (learningSpacesWithSessions, $completion) {
    var tmp = this.onw(learningSpacesWithSessions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.nnw((!(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.mnw_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            launch(this.lnw_1.qnv_1, VOID, VOID, UstadAccountManager$slambda$slambda$slambda$slambda_0(this.lnw_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).onw = function (learningSpacesWithSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this.lnw_1, completion);
    i.mnw_1 = learningSpacesWithSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (learningSpacesWithSessions, $completion) {
      return i.nnw(learningSpacesWithSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda(this$0, resultContinuation) {
    this.xnw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.xnw_1.jnv_1, UstadAccountManager$slambda$slambda$slambda_0(this.xnw_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).l78 = function (completion) {
    return new UstadAccountManager$slambda$slambda(this.xnw_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.j87($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.zg5_1;
      tmp.h96_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h96_1;
      var tmp_0 = $this$shallowCopy;
      var tmp2_safe_receiver = $personAndPictureFromDb;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.zg5_1;
      tmp_0.i96_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.i96_1;
      return Unit_instance;
    };
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation) {
    this.gnx_1 = $session;
    this.hnx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).jnx = function (personAndPictureFromDb, $completion) {
    var tmp = this.knx(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.jnx((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.inx_1;
          var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg5_1;
          var nameChanged = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ckr()) === this.gnx_1.lnu_1.ckr());
          var tmp2_safe_receiver = this.inx_1;
          var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ag6_1;
          var tmp_0 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.h97_1;
          var tmp4_safe_receiver = this.gnx_1.nnu_1;
          var pictureUriChanged = !(tmp_0 == (tmp4_safe_receiver == null ? null : tmp4_safe_receiver.h97_1));
          if (nameChanged ? true : pictureUriChanged) {
            var tmp_1;
            if (nameChanged) {
              tmp_1 = shallowCopy(this.gnx_1.lnu_1, UstadAccountManager$slambda$slambda$slambda$slambda$lambda(this.inx_1));
            } else {
              tmp_1 = this.gnx_1.lnu_1;
            }
            var tmp_2 = tmp_1;
            var tmp_3;
            if (pictureUriChanged) {
              var tmp5_safe_receiver = this.inx_1;
              tmp_3 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.ag6_1;
            } else {
              tmp_3 = this.gnx_1.nnu_1;
            }
            this.hnx_1.lnx(this.gnx_1.snu(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).knx = function (personAndPictureFromDb, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1(this.gnx_1, this.hnx_1, completion);
    i.inx_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.jnx(personAndPictureFromDb, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.unx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).xnx = function (session, $completion) {
    var tmp = this.ynx(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.xnx(p1 instanceof UserSessionWithPersonAndLearningSpace ? 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.unx_1.hnv_1;
            var context = this.vnx_1.mnu_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.wnx_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.wnx_1.n7d().gcl(this.vnx_1.knu_1.wij_1);
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda_2(this.vnx_1, this.unx_1, null);
            suspendResult = tmp_5.a1c(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).ynx = function (session, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this.unx_1, completion);
    i.vnx_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.xnx(session, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda_1(this$0, resultContinuation) {
    this.hny_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($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.hny_1.inv_1, UstadAccountManager$slambda$slambda$slambda_2(this.hny_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).l78 = function (completion) {
    return new UstadAccountManager$slambda$slambda_1(this.hny_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadAccountManager$registerWithPasskey$slambda$slambda($repo, $person, resultContinuation) {
    this.qny_1 = $repo;
    this.rny_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$slambda).he = function (p1, $completion) {
    return this.uny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$registerWithPasskey$slambda$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 = this.qny_1.n7d().mg4(this.rny_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tny_1 = suspendResult;
            if (this.tny_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.qny_1.n7d().insertAsync(this.rny_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$registerWithPasskey$slambda$slambda).vny = function (it, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda$slambda(this.qny_1, this.rny_1, completion);
    i.sny_1 = it;
    return i;
  };
  function UstadAccountManager$registerWithPasskey$slambda$slambda_0($repo, $person, resultContinuation) {
    var i = new UstadAccountManager$registerWithPasskey$slambda$slambda($repo, $person, resultContinuation);
    var l = function (it, $completion) {
      return i.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda(this$0, resultContinuation) {
    this.enz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda).inz = function (response, $completion) {
    var tmp = this.c3i(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.inz(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.fnz_1.j3b().f30_1 === 200) {
              var tmp_0 = this;
              tmp_0.hnz_1 = _get_json__d8whur(this.enz_1);
              this.hd_1 = 1;
              suspendResult = bodyAsText(this.fnz_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.gnz_1 = new Pair(null, this.fnz_1.j3b().f30_1);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var string = suspendResult;
            var this_0 = this.hnz_1.t45();
            var this_1 = serializer(this_0, createKType(getKClass(Person), arrayOf([]), false));
            var ARGUMENT = this.hnz_1.s45(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
            this.gnz_1 = new Pair(ARGUMENT, 200);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.gnz_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).c3i = function (response, completion) {
    var i = new UstadAccountManager$register$slambda$slambda(this.enz_1, completion);
    i.fnz_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.inz(response, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation) {
    this.rnz_1 = $db;
    this.snz_1 = $registeredPerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda_1).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.rnz_1.n7d().mg4(this.snz_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.unz_1 = suspendResult;
            if (this.unz_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.rnz_1.n7d().insertAsync(this.snz_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).vny = function (it, completion) {
    var i = new UstadAccountManager$register$slambda$slambda_1(this.rnz_1, this.snz_1, completion);
    i.tnz_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$loginWithPasskey$slambda$lambda($loginResponse) {
    return function () {
      return 'passkeyres : ' + $loginResponse;
    };
  }
  function _get_createNewLocalAccountUseCase__gbdxzu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lnv_1;
    createNewLocalAccountUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mnv_1;
    httpClient$factory_0();
    return this_0.t2();
  }
  function _get_json__d8whur($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nnv_1;
    json$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.onv_1;
    apiUrlConfig$factory_0();
    return this_0.t2();
  }
  function makeNewTempGuestSession($this, learningSpaceUrl, 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.rij_1 = tmp_0.n62(679);
    this_0.xij_1 = get_doorWrapperNodeId(currentDb);
    this_0.yij_1 = systemTimeInMillis();
    var tmp_1 = this_0;
    tmp_1.dik_1 = 8 | 4;
    var tmp_2 = this_0;
    tmp_2.aik_1 = 1;
    var this_1 = new UserSessionWithPersonAndLearningSpace(this_0, Companion_getInstance_20().vnz_1, new LearningSpace(learningSpaceUrl));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    launch($this.qnv_1, VOID, VOID, UstadAccountManager$makeNewTempGuestSession$slambda_0(currentDb, this_1, null));
    return this_1;
  }
  function assertNotClosed($this) {
    if ($this.pnv_1.kotlinx$atomicfu$value)
      throw IllegalStateException_init_$Create$('UstadAccountManager is closed');
  }
  function addActiveLearningSpace($this, learningSpace, commit, $completion) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.jnv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.addActiveLearningSpace.<anonymous>' call
        var nextValue = plus(prevValue, listOf_0(learningSpace));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
    return Unit_instance;
  }
  function removeActiveLearningSpace($this, learningSpace, commit) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.jnv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveLearningSpace.<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.removeActiveLearningSpace.<anonymous>.<anonymous>' call
          if (!element.equals(learningSpace)) {
            destination.i1(element);
          }
        }
        var nextValue = destination;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
  }
  function removeActiveLearningSpace$default($this, learningSpace, commit, $super) {
    commit = commit === VOID ? true : commit;
    return removeActiveLearningSpace($this, learningSpace, 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.jnv_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.tnt_1;
      destination.i1(tmp$ret$0);
    }
    var json = tmp.r45(tmp_0, toList(destination));
    // Inline function 'com.russhwolf.settings.set' call
    var this_1 = $this.gnv_1;
    var key = 'accountmgr.endpointswithsessions';
    this_1.xm7(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_52 = 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.f96_1 = new Long(0, 0);
    this_0.h96_1 = 'Guest';
    this_0.i96_1 = 'User';
    tmp.vnz_1 = this_0;
    this.wnz_1 = 'accountmgr.activesession';
    this.xnz_1 = 'accountmgr.activeendpoint';
    this.ynz_1 = 'accountmgr.endpointswithsessions';
    this.znz_1 = 'http://localhost/';
    this.ao0_1 = 'com.ustadmobile';
    this.bo0_1 = 'com.ustadmobile.AUTH_GET_TOKEN';
  }
  var Companion_instance_52;
  function Companion_getInstance_20() {
    if (Companion_instance_52 == null)
      new Companion_3();
    return Companion_instance_52;
  }
  function sam$kotlin_Comparator$0(function_0) {
    this.oo0_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0).pa = function (a, b) {
    return this.oo0_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.po0_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).t1d = function (value, $completion) {
    return this.po0_1(value, $completion);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(function_0) {
    this.qo0_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0).ro0 = function (endpointUrl) {
    return this.qo0_1(endpointUrl);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(function_0) {
    this.so0_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0).ro0 = function (endpointUrl) {
    return this.so0_1(endpointUrl);
  };
  function UstadAccountManager$slambda(this$0, resultContinuation) {
    this.bo1_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.bo1_1.knv_1, UstadAccountManager$slambda$slambda_0(this.bo1_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.bo1_1, completion);
    i.co1_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.lo1_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.lo1_1.inv_1, UstadAccountManager$slambda$slambda_2(this.lo1_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.lo1_1, completion);
    i.mo1_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.vo1_1 = $currentDb;
    this.wo1_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.vo1_1.b7f().yii(this.wo1_1.knu_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.vo1_1, this.wo1_1, completion);
    i.xo1_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$registerWithPasskey$slambda($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation) {
    this.go2_1 = $learningSpaceUrl;
    this.ho2_1 = this$0;
    this.io2_1 = $passkeyResult;
    this.jo2_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$registerWithPasskey$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(UstadAccountManager$registerWithPasskey$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$registerWithPasskey$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.lo2_1 = new LearningSpace(this.go2_1);
            var tmp_0 = this;
            var this_0 = this.ho2_1.hnv_1;
            var context = this.lo2_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(SavePersonPasskeyUseCase), arrayOf([]), false));
            tmp_0.mo2_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            suspendResult = this.mo2_1.so2(this.io2_1, this.jo2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_5 = this;
            var this_1 = this.ho2_1.hnv_1;
            var context_0 = this.lo2_1;
            var trigger_0 = this_1.d57();
            var tmp_6 = Companion_instance_0;
            var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.h57(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).f58();
            var tmp_9 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_5.no2_1 = tmp_8.d58(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null).vk2();
            this.hd_1 = 2;
            suspendResult = this.ho2_1.to2(this.jo2_1, this.go2_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.oo2_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = withDoorTransactionAsync(this.no2_1, VOID, UstadAccountManager$registerWithPasskey$slambda$slambda_0(this.no2_1, this.jo2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var this_2 = this.ho2_1.hnv_1;
            var context_1 = this.lo2_1;
            var trigger_1 = this_2.d57();
            var tmp_10 = Companion_instance_0;
            var tmp_11 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_12 = get_direct(On(this_2, tmp_10.h57(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), context_1), trigger_1)).f58();
            var tmp_13 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_12.d58(isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE(), 1);
            this.ho2_1.lnx(this.oo2_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(UstadAccountManager$registerWithPasskey$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$registerWithPasskey$slambda(this.go2_1, this.ho2_1, this.io2_1, this.jo2_1, completion);
    i.ko2_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$registerWithPasskey$slambda_0($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation) {
    var i = new UstadAccountManager$registerWithPasskey$slambda($learningSpaceUrl, this$0, $passkeyResult, $person, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    this.co3_1 = this$0;
    this.do3_1 = $learningSpaceUrl;
    this.eo3_1 = $accountRegisterOptions;
    this.fo3_1 = $person;
    this.go3_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda).so3 = 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.so3((!(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.co3_1);
            this.io3_1 = new LearningSpace(this.do3_1);
            this.jo3_1 = this.eo3_1.ant_1;
            var tmp_0 = this;
            var this_0 = _get_httpClient__2ty1zc(this.co3_1);
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.do3_1, '/') + '/auth/register');
            contentType(this_1, Application_getInstance().v2r_1);
            setBodyJson(this_1, _get_json__d8whur(this.co3_1), Companion_instance_50.n4r(), new RegisterRequest(this.fo3_1, this.go3_1, this.jo3_1, this.do3_1));
            this_1.w38_1 = Companion_getInstance().m2x_1;
            tmp_0.ko3_1 = new HttpStatement(this_1, this_0);
            this.hd_1 = 1;
            suspendResult = this.ko3_1.g3z(UstadAccountManager$register$slambda$slambda_0(this.co3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.lo3_1 = suspendResult;
            this.mo3_1 = this.lo3_1.y6();
            this.no3_1 = this.lo3_1.z6();
            if (this.no3_1 === 200 ? !(this.mo3_1 == null) : false) {
              var tmp_1 = this;
              var this_2 = this.co3_1.hnv_1;
              var context = this.io3_1;
              var trigger = this_2.d57();
              var tmp_2 = Companion_instance_0;
              var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_4 = get_direct(On(this_2, tmp_2.h57(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context), trigger)).f58();
              var tmp_5 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
              tmp_1.po3_1 = tmp_4.d58(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null).vk2();
              this.hd_1 = 2;
              suspendResult = getSiteFromDbOrLoadFromHttp(this.co3_1, this.po3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.no3_1 === 409) {
                var tmp_6 = this;
                throw IllegalStateException_init_$Create$('Conflict: username already taken');
              } else {
                var tmp_7 = this;
                throw Exception_init_$Create$('register request: non-OK status code: ' + this.no3_1);
              }
            }

          case 2:
            this.hd_1 = 3;
            suspendResult = this.co3_1.to2(this.mo3_1, this.do3_1, this.go3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.qo3_1 = suspendResult;
            var tmp_8 = this;
            var this_3 = this.co3_1.hnv_1;
            var context_0 = this.io3_1;
            var trigger_0 = this_3.d57();
            var tmp_9 = Companion_instance_0;
            var tmp_10 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_11 = get_direct(On(this_3, tmp_9.h57(isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE(), context_0), trigger_0)).f58();
            var tmp_12 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_8.ro3_1 = tmp_11.d58(isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE(), 1);
            this.hd_1 = 4;
            suspendResult = withDoorTransactionAsync(this.ro3_1, VOID, UstadAccountManager$register$slambda$slambda_2(this.ro3_1, this.mo3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            if (this.eo3_1.zns_1) {
              this.co3_1.lnx(this.qo3_1);
            }

            this.oo3_1 = this.mo3_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.oo3_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.co3_1, this.do3_1, this.eo3_1, this.fo3_1, this.go3_1, completion);
    i.ho3_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$register$slambda_0(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    var i = new UstadAccountManager$register$slambda(this$0, $learningSpaceUrl, $accountRegisterOptions, $person, $password, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.so3($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$addSession$slambda(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation) {
    this.bo4_1 = this$0;
    this.co4_1 = $learningSpace;
    this.do4_1 = $person;
    this.eo4_1 = $password;
    this.fo4_1 = $authManager;
    this.go4_1 = $dataLayer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$addSession$slambda).to4 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$addSession$slambda).he = function (p1, $completion) {
    return this.to4(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.bo4_1.hnv_1;
            var context = this.co4_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
            tmp_0.io4_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).q64_1;
            var tmp_5 = this;
            tmp_5.jo4_1 = new UserSession();
            var tmp_6 = this;
            tmp_6.ko4_1 = this.jo4_1;
            this.ko4_1.xij_1 = this.io4_1;
            this.ko4_1.wij_1 = this.do4_1.f96_1;
            this.ko4_1.yij_1 = systemTimeInMillis();
            var tmp_7 = this.ko4_1;
            tmp_7.dik_1 = 1;
            var tmp_8 = this.ko4_1;
            tmp_8.aik_1 = 1;
            this.lo4_1 = this.eo4_1;
            if (this.lo4_1 == null) {
              this.mo4_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_9 = this;
              tmp_9.no4_1 = this.lo4_1;
              var tmp_10 = this;
              tmp_10.oo4_1 = this.no4_1;
              this.hd_1 = 1;
              suspendResult = encryptPbkdf2(this.fo4_1, this.oo4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.po4_1 = suspendResult;
            this.mo4_1 = toHexString(this.po4_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.qo4_1 = this.mo4_1;
            this.ko4_1.cik_1 = this.qo4_1;
            this.hd_1 = 3;
            suspendResult = this.go4_1.wk2().b7f().yii(this.ko4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.ro4_1 = suspendResult;
            this.ko4_1.rij_1 = this.ro4_1;
            this.so4_1 = this.jo4_1;
            this.hd_1 = 4;
            suspendResult = this.go4_1.sk2_1.f7e().yh3(this.do4_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var personPicture = suspendResult;
            return to(this.so4_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).vny = function (it, completion) {
    var i = new UstadAccountManager$addSession$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 UstadAccountManager$addSession$slambda_0(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation) {
    var i = new UstadAccountManager$addSession$slambda(this$0, $learningSpace, $person, $password, $authManager, $dataLayer, resultContinuation);
    var l = function (it, $completion) {
      return i.to4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$endSession$lambda($session) {
    return function (it) {
      return it === $session.mnu_1.tnt_1;
    };
  }
  function UstadAccountManager$loginWithPasskey$slambda(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation) {
    this.co5_1 = this$0;
    this.do5_1 = $currentServerUrl;
    this.eo5_1 = $passkeyWebAuthNResponse;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$loginWithPasskey$slambda).to5 = 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$loginWithPasskey$slambda).he = function (p1, $completion) {
    return this.to5((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$loginWithPasskey$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.co5_1);
            var tmp_0 = this;
            tmp_0.go5_1 = _get_httpClient__2ty1zc(this.co5_1);
            var tmp_1 = this;
            tmp_1.ho5_1 = this.go5_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this.do5_1, '/') + '/api/passkey/verifypasskey');
            setBodyJson(this_0, _get_json__d8whur(this.co5_1), Companion_instance_93.n4r(), this.eo5_1);
            parameter(this_0, 'rpId', Url(_get_apiUrlConfig__mldllg(this.co5_1).uo5_1).y30_1);
            tmp_2.io5_1 = this_0;
            this.io5_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.jo5_1 = this.ho5_1;
            var tmp_4 = this;
            tmp_4.ko5_1 = this.io5_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.ko5_1, this.jo5_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.mo5_1 = suspendResult;
            var tmp_5 = Napier_getInstance();
            tmp_5.k5e(VOID, VOID, UstadAccountManager$loginWithPasskey$slambda$lambda(this.mo5_1));
            var tmp_6 = this;
            var this_1 = _get_json__d8whur(this.co5_1);
            var string = this.mo5_1;
            var this_2 = this_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(PasskeyVerifyResult), arrayOf([]), false));
            tmp_6.no5_1 = this_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            if (!this.no5_1.yo5_1) {
              throw new UnauthorizedException('Account not found');
            }

            this.oo5_1 = new UmAccount(this.no5_1.zo5_1);
            this.oo5_1.yky_1 = this.do5_1;
            var tmp_7 = this;
            var this_4 = this.co5_1.hnv_1;
            var context = new LearningSpace(this.do5_1);
            var trigger = this_4.d57();
            var tmp_8 = Companion_instance_0;
            var tmp_9 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_10 = get_direct(On(this_4, tmp_8.h57(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), context), trigger)).f58();
            var tmp_11 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_7.po5_1 = tmp_10.d58(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), null).vk2();
            this.hd_1 = 3;
            suspendResult = this.po5_1.n7d().lg4(this.no5_1.zo5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_12.ro5_1 = tmp_13;
            this.so5_1 = ensureNotNull(this.ro5_1.zg5_1);
            this.oo5_1.ckz_1 = this.so5_1.n96_1;
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.co5_1, this.po5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.co5_1.to2(this.so5_1, this.do5_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            this.co5_1.lnx(newSession);
            return this.oo5_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$loginWithPasskey$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$loginWithPasskey$slambda(this.co5_1, this.do5_1, this.eo5_1, completion);
    i.fo5_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$loginWithPasskey$slambda_0(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation) {
    var i = new UstadAccountManager$loginWithPasskey$slambda(this$0, $currentServerUrl, $passkeyWebAuthNResponse, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.to5($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    this.ko6_1 = this$0;
    this.lo6_1 = $endpointUrl;
    this.mo6_1 = $username;
    this.no6_1 = $password;
    this.oo6_1 = $maxDateOfBirth;
    this.po6_1 = $dontSetCurrentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$login$slambda).to5 = 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.to5((!(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.ko6_1);
            var tmp_0 = this;
            var this_0 = get_direct(this.ko6_1.hnv_1);
            var context = new LearningSpace(this.lo6_1);
            var tmp_1 = this_0.f58();
            var tmp_2 = Companion_instance_0;
            var tmp_3 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_4 = tmp_1.c58(tmp_2.h57(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context)).f58();
            var tmp_5 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.ro6_1 = tmp_4.d58(isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE(), null);
            var tmp_6 = this;
            var tmp_7 = this.ro6_1.tk2_1;
            var tmp0_safe_receiver = (!(tmp_7 == null) ? isInterface(tmp_7, DoorDatabaseRepository) : false) ? tmp_7 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j39();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v65_1;
            var tmp_8;
            if (tmp2_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not open repo for endpoint ' + this.lo6_1);
            } else {
              tmp_8 = tmp2_elvis_lhs;
            }

            tmp_6.so6_1 = tmp_8;
            var tmp_9 = this;
            tmp_9.to6_1 = _get_httpClient__2ty1zc(this.ko6_1);
            var tmp_10 = this;
            tmp_10.uo6_1 = this.to6_1;
            var tmp_11 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.lo6_1, '/') + '/auth/login');
            parameter(this_1, 'username', this.mo6_1);
            parameter(this_1, 'password', this.no6_1);
            parameter(this_1, 'maxDateOfBirth', this.oo6_1);
            header(this_1, 'X-nid', this.so6_1);
            set_expectSuccess(this_1, false);
            tmp_11.vo6_1 = this_1;
            this.vo6_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_12 = this;
            tmp_12.wo6_1 = this.uo6_1;
            var tmp_13 = this;
            tmp_13.xo6_1 = this.vo6_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.xo6_1, this.wo6_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            var tmp_14 = this;
            tmp_14.zo6_1 = _get_json__d8whur(this.ko6_1);
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.yo6_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ao7_1 = suspendResult;
            var tmp_15 = this;
            var this_2 = this.zo6_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(UmAccount), arrayOf([]), false));
            tmp_15.bo7_1 = this.zo6_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.ao7_1);
            this.bo7_1.yky_1 = this.lo6_1;
            this.hd_1 = 3;
            suspendResult = this.ro6_1.wk2().n7d().lg4(this.bo7_1.vky_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_16.do7_1 = tmp_17;
            this.eo7_1 = ensureNotNull(this.do7_1.zg5_1);
            this.bo7_1.ckz_1 = this.eo7_1.n96_1;
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.ko6_1, this.ro6_1.wk2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.ko6_1.to2(this.eo7_1, this.lo6_1, this.no6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            if (!this.po6_1) {
              this.ko6_1.lnx(newSession);
            }

            return this.bo7_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.ko6_1, this.lo6_1, this.mo6_1, this.no6_1, this.oo6_1, this.po6_1, completion);
    i.qo6_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.to5($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $activeSessionsListCOROUTINE$2(_this__u8e3s4, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.no7_1 = _this__u8e3s4;
    this.oo7_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.no7_1.jnv_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.oo7_1.ro0(element.tnt_1)) {
                destination.i1(element);
              }
            }

            tmp_0.po7_1 = destination;
            var tmp_1 = this;
            tmp_1.qo7_1 = this.po7_1;
            var tmp_2 = this;
            tmp_2.ro7_1 = ArrayList_init_$Create$();
            this.so7_1 = this.qo7_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.so7_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.to7_1 = this.so7_1.e();
            var tmp_3 = this;
            tmp_3.uo7_1 = this.to7_1;
            var tmp_4 = this;
            var this_1 = this.no7_1.hnv_1;
            var context = this.uo7_1;
            var trigger = this_1.d57();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.vo7_1 = tmp_7.d58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.vo7_1.b7f().aij(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(withLearningSpace(item, this.uo7_1));
            }

            var list = destination_0;
            addAll(this.ro7_1, list);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.ro7_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.eo8_1 = _this__u8e3s4;
    this.fo8_1 = maxDateOfBirth;
    this.go8_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.eo8_1.jnv_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.go8_1.ro0(element.tnt_1)) {
                destination.i1(element);
              }
            }

            tmp_0.ho8_1 = destination;
            var tmp_1 = this;
            tmp_1.io8_1 = 0;
            this.jo8_1 = this.io8_1;
            this.ko8_1 = this.ho8_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.ko8_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.lo8_1 = this.ko8_1.e();
            var tmp_2 = this;
            tmp_2.mo8_1 = this.jo8_1;
            var tmp_3 = this;
            tmp_3.no8_1 = this.lo8_1;
            var tmp_4 = this;
            var this_1 = this.eo8_1.hnv_1;
            var context = this.no8_1;
            var trigger = this_1.d57();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.oo8_1 = tmp_7.d58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.oo8_1.b7f().bij(this.fo8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            this.jo8_1 = this.mo8_1 + ARGUMENT | 0;
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.jo8_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, learningSpaceUrl, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xo8_1 = _this__u8e3s4;
    this.yo8_1 = person;
    this.zo8_1 = learningSpaceUrl;
    this.ao9_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.xo8_1);
            this.bo9_1 = new LearningSpace(this.zo8_1);
            var tmp_0 = this;
            var this_0 = this.xo8_1.hnv_1;
            var context = this.bo9_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.co9_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            if (!this.xo8_1.jnv_1.t2().a1(this.bo9_1)) {
              this.hd_1 = 1;
              suspendResult = addActiveLearningSpace(this.xo8_1, this.bo9_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            commitActiveEndpointsToPref(this.xo8_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp_5 = this;
            var this_1 = this.xo8_1.hnv_1;
            var context_0 = this.bo9_1;
            var trigger_0 = this_1.d57();
            var tmp_6 = Companion_instance_0;
            var tmp_7 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.h57(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).f58();
            var tmp_9 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
            tmp_5.do9_1 = tmp_8.d58(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), null);
            this.hd_1 = 3;
            var tmp_10 = this.co9_1.wk2();
            suspendResult = withDoorTransactionAsync(tmp_10, VOID, UstadAccountManager$addSession$slambda_0(this.xo8_1, this.bo9_1, this.yo8_1, this.ao9_1, this.do9_1, this.co9_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 UserSessionWithPersonAndLearningSpace(userSession, this.yo8_1, this.bo9_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.mo9_1 = _this__u8e3s4;
    this.no9_1 = session;
    this.oo9_1 = endStatus;
    this.po9_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.mo9_1.hnv_1;
            var context = this.no9_1.mnu_1;
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.qo9_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            suspendResult = this.qo9_1.wk2().b7f().cij(this.no9_1.knu_1.rij_1, this.oo9_1, this.po9_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (this.mo9_1.ro9().knu_1.rij_1.equals(this.no9_1.knu_1.rij_1) ? this.mo9_1.ro9().mnu_1.equals(this.no9_1.mnu_1) : false) {
              this.mo9_1.lnx(makeNewTempGuestSession(this.mo9_1, this.no9_1.mnu_1.tnt_1, this.qo9_1.wk2()));
            }

            this.hd_1 = 2;
            var tmp_5 = UstadAccountManager$endSession$lambda(this.no9_1);
            suspendResult = this.mo9_1.so9(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()) {
              removeActiveLearningSpace$default(this.mo9_1, this.no9_1.mnu_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.ko0_1 = _this__u8e3s4;
    this.lo0_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.lo0_1;
            var tmp_2 = (isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : THROW_CCE()).x5i();
            tmp_0.mo0_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : THROW_CCE();
            this.hd_1 = 1;
            suspendResult = this.mo0_1.v7e().lhn(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.no0_1 = suspendResult;
            if (this.no0_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.lo0_1.v7e().lhn(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$9(_this__u8e3s4, learningSpaceUrl, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.boa_1 = _this__u8e3s4;
    this.coa_1 = learningSpaceUrl;
  }
  protoOf($startGuestSessionCOROUTINE$9).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.boa_1.hnv_1;
            var context = new LearningSpace(this.coa_1);
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.doa_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null);
            this.hd_1 = 1;
            var tmp_5 = this.doa_1.wk2();
            var this_1 = new Person();
            this_1.g96_1 = null;
            this_1.h96_1 = 'Guest';
            this_1.i96_1 = 'User';
            var tmp_6 = this_1;
            tmp_6.u96_1 = 2;
            suspendResult = insertPersonAndGroup(tmp_5, this_1, 1 | 16, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.eoa_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.boa_1, this.doa_1.wk2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.boa_1.to2(this.eoa_1, this.coa_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var guestSession = suspendResult;
            this.boa_1.lnx(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_20();
    this.gnv_1 = settings;
    this.hnv_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = this.hnv_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(CreateNewLocalAccountUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.lnv_1 = Instance(this_0, tmp$ret$0, null).a5d(this, createNewLocalAccountUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = this.hnv_1;
    // 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.mnv_1 = Instance(this_1, tmp$ret$2, null).a5d(this, httpClient$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = this.hnv_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.nnv_1 = Instance(this_2, tmp$ret$4, null).a5d(this, json$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = this.hnv_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.onv_1 = Instance(this_3, tmp$ret$6, null).a5d(this, apiUrlConfig$factory());
    this.pnv_1 = atomic$boolean$1(false);
    this.qnv_1 = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
    var tmp0_elvis_lhs = this.gnv_1.ym7('accountmgr.activeendpoint');
    var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg(this).vo5_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_4 = get_direct(this.hnv_1);
    var context = new LearningSpace(currentEndpointStr);
    var tmp_7 = this_4.f58();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_8 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$9 = tmp_8.h57(tmp$ret$8, context);
    var tmp_10 = tmp_7.c58(tmp$ret$9).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$11 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    var currentDb = tmp_10.d58(tmp$ret$11, 1);
    var tmp2_safe_receiver = this.gnv_1.ym7('accountmgr.activesession');
    var tmp_12;
    if (tmp2_safe_receiver == null) {
      tmp_12 = 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_5 = _get_json__d8whur(this);
      // Inline function 'kotlinx.serialization.serializer' call
      var this_6 = this_5.t45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_7 = serializer(this_6, createKType(getKClass(UserSessionWithPersonAndLearningSpace), arrayOf([]), true));
      var tmp$ret$14 = isInterface(this_7, KSerializer) ? this_7 : THROW_CCE();
      tmp_12 = this_5.s45(tmp$ret$14, tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp_12;
    var initUserSession = tmp3_elvis_lhs == null ? makeNewTempGuestSession(this, currentEndpointStr, currentDb) : tmp3_elvis_lhs;
    this.inv_1 = MutableStateFlow(initUserSession);
    var tmp4_safe_receiver = this.gnv_1.ym7('accountmgr.endpointswithsessions');
    var tmp_13;
    if (tmp4_safe_receiver == null) {
      tmp_13 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      tmp_13 = _get_json__d8whur(this).s45(ListSerializer(serializer_0(StringCompanionObject_instance)), tmp4_safe_receiver);
    }
    var tmp5_elvis_lhs = tmp_13;
    var initEndpoints = tmp5_elvis_lhs == null ? listOf_0(currentEndpointStr) : tmp5_elvis_lhs;
    var tmp_14 = 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$20 = new LearningSpace(item);
      destination.i1(tmp$ret$20);
    }
    tmp_14.jnv_1 = MutableStateFlow(destination);
    this.knv_1 = MutableStateFlow(listOf_0(initUserSession));
    launch(this.qnv_1, VOID, VOID, UstadAccountManager$slambda_0(this, null));
    launch(this.qnv_1, VOID, VOID, UstadAccountManager$slambda_2(this, null));
  }
  protoOf(UstadAccountManager).lnx = function (value) {
    this.inv_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.t45();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(UserSessionWithPersonAndLearningSpace), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var activeAccountJson = this_0.r45(tmp$ret$1, value);
    // Inline function 'com.russhwolf.settings.set' call
    var this_3 = this.gnv_1;
    var key = 'accountmgr.activesession';
    this_3.xm7(key, activeAccountJson);
    // Inline function 'com.russhwolf.settings.set' call
    var this_4 = this.gnv_1;
    var key_0 = 'accountmgr.activeendpoint';
    var value_0 = value.mnu_1.tnt_1;
    this_4.xm7(key_0, value_0);
  };
  protoOf(UstadAccountManager).ro9 = function () {
    return this.inv_1.t2();
  };
  protoOf(UstadAccountManager).foa = function () {
    return asStateFlow(this.inv_1);
  };
  protoOf(UstadAccountManager).goa = function () {
    return this.inv_1.t2().pnu();
  };
  protoOf(UstadAccountManager).hoa = function () {
    return asStateFlow(this.knv_1);
  };
  protoOf(UstadAccountManager).ioa = function () {
    return this.inv_1.t2().mnu_1;
  };
  protoOf(UstadAccountManager).so9 = 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).joa = 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).koa = 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.joa(maxDateOfBirth, endpointFilter, $completion) : $super.joa.call(this, maxDateOfBirth, endpointFilter, $completion);
  };
  protoOf(UstadAccountManager).loa = function (learningSpaceUrl, passkeyResult, person, personPicture, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$registerWithPasskey$slambda_0(learningSpaceUrl, this, passkeyResult, person, null), $completion);
  };
  protoOf(UstadAccountManager).moa = function (person, password, learningSpaceUrl, accountRegisterOptions, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$register$slambda_0(this, learningSpaceUrl, accountRegisterOptions, person, password, null), $completion);
  };
  protoOf(UstadAccountManager).noa = function (person, password, learningSpaceUrl, accountRegisterOptions, $completion, $super) {
    accountRegisterOptions = accountRegisterOptions === VOID ? new AccountRegisterOptions() : accountRegisterOptions;
    return $super === VOID ? this.moa(person, password, learningSpaceUrl, accountRegisterOptions, $completion) : $super.moa.call(this, person, password, learningSpaceUrl, accountRegisterOptions, $completion);
  };
  protoOf(UstadAccountManager).to2 = function (person, learningSpaceUrl, password, $completion) {
    var tmp = new $addSessionCOROUTINE$4(this, person, learningSpaceUrl, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).ooa = 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).poa = 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.ooa(session, endStatus, endReason, $completion) : $super.ooa.call(this, session, endStatus, endReason, $completion);
  };
  protoOf(UstadAccountManager).qoa = function (passkeyWebAuthNResponse, currentServerUrl, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$loginWithPasskey$slambda_0(this, currentServerUrl, passkeyWebAuthNResponse, null), $completion);
  };
  protoOf(UstadAccountManager).roa = 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).soa = function (learningSpaceUrl, $completion) {
    var tmp = new $startGuestSessionCOROUTINE$9(this, learningSpaceUrl, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function createNewLocalAccountUseCase$factory() {
    return getPropertyCallableRef('createNewLocalAccountUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewLocalAccountUseCase__gbdxzu(receiver);
    }, null);
  }
  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 createNewLocalAccountUseCase$factory_0() {
    return getPropertyCallableRef('createNewLocalAccountUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewLocalAccountUseCase__gbdxzu(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.toa_1 = 101;
  }
  var Companion_instance_53;
  function Companion_getInstance_21() {
    return Companion_instance_53;
  }
  function Companion_5() {
  }
  protoOf(Companion_5).n4r = function () {
    return AnchorSerializer_getInstance();
  };
  var Companion_instance_54;
  function Companion_getInstance_22() {
    return Companion_instance_54;
  }
  function Anchor(content, href) {
    content = content === VOID ? '' : content;
    href = href === VOID ? '' : href;
    this.uoa_1 = content;
    this.voa_1 = href;
  }
  function deserializeDynamic($this, reader) {
    var href = reader.m7d(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.woa_1 = buildClassSerialDescriptor('a', []);
  }
  protoOf(AnchorSerializer).q44 = function () {
    return this.woa_1;
  };
  protoOf(AnchorSerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic(this, decoder.nlf());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.woa_1;
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.AnchorSerializer.deserialize.<anonymous>' call
      var result = composite.v48(AnchorSerializer_getInstance().woa_1, 0, Companion_instance_54.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(AnchorSerializer).xoa = function (encoder, value) {
    encoder.z49(Companion_instance_54.n4r(), value);
  };
  protoOf(AnchorSerializer).r44 = function (encoder, value) {
    return this.xoa(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).n4r = function () {
    return BodySerializer_instance;
  };
  var Companion_instance_55;
  function Companion_getInstance_23() {
    return Companion_instance_55;
  }
  function Body(navigationElements) {
    this.yoa_1 = navigationElements;
  }
  function BodySerializer() {
  }
  protoOf(BodySerializer).q44 = function () {
    return buildClassSerialDescriptor('body', []);
  };
  protoOf(BodySerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = this.zoa(decoder, decoder.nlf());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.q44();
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.BodySerializer.deserialize.<anonymous>' call
      var result = composite.v48(BodySerializer_instance.q44(), 0, Companion_instance_55.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(BodySerializer).zoa = function (decoder, reader) {
    var xml = this.aob(decoder);
    // Inline function 'kotlin.collections.mutableListOf' call
    var navElementList = ArrayList_init_$Create$();
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = this.q44();
    var composite = decoder.i48(descriptor);
    while (!(reader.e().equals(EventType_END_ELEMENT_getInstance()) ? reader.dc().ll9() === 'body' : false)) {
      if (reader.ul5().equals(EventType_START_ELEMENT_getInstance()) ? reader.ml5() === 'nav' : false) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = xml.alk(Companion_instance_57.n4r(), reader);
        navElementList.i1(element);
      }
    }
    var result = Unit_instance;
    composite.j48(descriptor);
    return new Body(toList(navElementList));
  };
  protoOf(BodySerializer).bob = function (encoder, value) {
    encoder.z49(Companion_instance_55.n4r(), value);
  };
  protoOf(BodySerializer).r44 = function (encoder, value) {
    return this.bob(encoder, value instanceof Body ? value : THROW_CCE());
  };
  protoOf(BodySerializer).aob = function (decoder) {
    return (isInterface(decoder, XmlInput) ? decoder : THROW_CCE()).wlh();
  };
  var BodySerializer_instance;
  function BodySerializer_getInstance() {
    return BodySerializer_instance;
  }
  function Companion_7() {
  }
  var Companion_instance_56;
  function Companion_getInstance_24() {
    return Companion_instance_56;
  }
  function $serializer_2() {
    $serializer_instance_2 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.ListItem', this, 3);
    tmp0_serialDesc.t4f('anchor', true);
    tmp0_serialDesc.t4f('span', true);
    tmp0_serialDesc.t4f('orderedList', true);
    tmp0_serialDesc.v4f(new XmlSerialName('li', 'http://www.w3.org/1999/xhtml'));
    this.cob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_2).q44 = function () {
    return this.cob_1;
  };
  protoOf($serializer_2).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.cob_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.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.w48(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.w48(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return ListItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_2).dob = function (encoder, value) {
    var tmp0_desc = this.cob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.eob_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, AnchorSerializer_getInstance(), value.eob_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.fob_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, SpanSerializer_getInstance(), value.fob_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.gob_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_17(), value.gob_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_2).r44 = function (encoder, value) {
    return this.dob(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().cob_1);
    }
    if (0 === (seen1 & 1))
      $this.eob_1 = null;
    else
      $this.eob_1 = anchor;
    if (0 === (seen1 & 2))
      $this.fob_1 = null;
    else
      $this.fob_1 = span;
    if (0 === (seen1 & 4))
      $this.gob_1 = null;
    else
      $this.gob_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.eob_1 = anchor;
    this.fob_1 = span;
    this.gob_1 = orderedList;
  }
  function Companion_8() {
  }
  protoOf(Companion_8).n4r = function () {
    return $serializer_getInstance_15();
  };
  var Companion_instance_57;
  function Companion_getInstance_25() {
    return Companion_instance_57;
  }
  function $serializer_3() {
    $serializer_instance_3 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavElement', this, 2);
    tmp0_serialDesc.t4f('epubType', true);
    tmp0_serialDesc.u4f(new XmlSerialName('type', 'http://www.idpf.org/2007/ops'));
    tmp0_serialDesc.t4f('orderedList', false);
    tmp0_serialDesc.v4f(new XmlSerialName('nav', 'http://www.w3.org/1999/xhtml'));
    this.hob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_3).q44 = function () {
    return this.hob_1;
  };
  protoOf($serializer_3).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.hob_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return NavElement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_3).iob = function (encoder, value) {
    var tmp0_desc = this.hob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.job_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.job_1);
    }
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_17(), value.kob_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_3).r44 = function (encoder, value) {
    return this.iob(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().hob_1);
    }
    if (0 === (seen1 & 1))
      $this.job_1 = null;
    else
      $this.job_1 = epubType;
    $this.kob_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.lob_1 = 'http://www.w3.org/1999/xhtml';
    this.mob_1 = 'http://www.idpf.org/2007/ops';
  }
  var Companion_instance_58;
  function Companion_getInstance_26() {
    return Companion_instance_58;
  }
  function $serializer_4() {
    $serializer_instance_4 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavigationDocument', this, 1);
    tmp0_serialDesc.t4f('bodyElement', false);
    tmp0_serialDesc.v4f(new XmlSerialName('html', 'http://www.w3.org/1999/xhtml'));
    this.nob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_4).q44 = function () {
    return this.nob_1;
  };
  protoOf($serializer_4).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BodySerializer_instance];
  };
  protoOf($serializer_4).s44 = function (decoder) {
    var tmp0_desc = this.nob_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return NavigationDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_4).oob = function (encoder, value) {
    var tmp0_desc = this.nob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, BodySerializer_instance, value.pob_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_4).r44 = function (encoder, value) {
    return this.oob(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().nob_1);
    }
    $this.pob_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.pob_1 = bodyElement;
  }
  function Companion_10() {
    Companion_instance_59 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qob_1 = [new ArrayListSerializer($serializer_getInstance_14())];
  }
  var Companion_instance_59;
  function Companion_getInstance_27() {
    if (Companion_instance_59 == null)
      new Companion_10();
    return Companion_instance_59;
  }
  function $serializer_5() {
    $serializer_instance_5 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.OrderedList', this, 1);
    tmp0_serialDesc.t4f('listItems', false);
    tmp0_serialDesc.v4f(new XmlSerialName('ol', 'http://www.w3.org/1999/xhtml'));
    this.rob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_5).q44 = function () {
    return this.rob_1;
  };
  protoOf($serializer_5).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_27().qob_1[0]];
  };
  protoOf($serializer_5).s44 = function (decoder) {
    var tmp0_desc = this.rob_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_27().qob_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return OrderedList_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_5).sob = function (encoder, value) {
    var tmp0_desc = this.rob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_27().qob_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.tob_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_5).r44 = function (encoder, value) {
    return this.sob(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().rob_1);
    }
    $this.tob_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).n4r = function () {
    return SpanSerializer_getInstance();
  };
  var Companion_instance_60;
  function Companion_getInstance_28() {
    return Companion_instance_60;
  }
  function Span(content) {
    content = content === VOID ? '' : content;
    this.uob_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.vob_1 = buildClassSerialDescriptor('span', []);
  }
  protoOf(SpanSerializer).q44 = function () {
    return this.vob_1;
  };
  protoOf(SpanSerializer).s44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic_0(this, decoder.nlf());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = AnchorSerializer_getInstance().woa_1;
      var composite = decoder.i48(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.SpanSerializer.deserialize.<anonymous>' call
      var result = composite.v48(AnchorSerializer_getInstance().woa_1, 0, Companion_instance_60.n4r());
      composite.j48(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(SpanSerializer).wob = function (encoder, value) {
    encoder.z49(Companion_instance_60.n4r(), value);
  };
  protoOf(SpanSerializer).r44 = function (encoder, value) {
    return this.wob(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.t4f('id', true);
    tmp0_serialDesc.t4f('src', false);
    tmp0_serialDesc.v4f(new XmlSerialName('content', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.xob_1 = tmp0_serialDesc;
  }
  protoOf($serializer_6).q44 = function () {
    return this.xob_1;
  };
  protoOf($serializer_6).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.xob_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Content_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_6).yob = function (encoder, value) {
    var tmp0_desc = this.xob_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.zob_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.zob_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.aoc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_6).r44 = function (encoder, value) {
    return this.yob(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().xob_1);
    }
    if (0 === (seen1 & 1))
      $this.zob_1 = null;
    else
      $this.zob_1 = id;
    $this.aoc_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_61 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.boc_1 = [new ArrayListSerializer($serializer_getInstance_25())];
  }
  var Companion_instance_61;
  function Companion_getInstance_29() {
    if (Companion_instance_61 == null)
      new Companion_12();
    return Companion_instance_61;
  }
  function $serializer_7() {
    $serializer_instance_7 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.DocTitle', this, 1);
    tmp0_serialDesc.t4f('texts', false);
    tmp0_serialDesc.v4f(new XmlSerialName('docTitle', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.coc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_7).q44 = function () {
    return this.coc_1;
  };
  protoOf($serializer_7).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_29().boc_1[0]];
  };
  protoOf($serializer_7).s44 = function (decoder) {
    var tmp0_desc = this.coc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_29().boc_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return DocTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_7).doc = function (encoder, value) {
    var tmp0_desc = this.coc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_29().boc_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.eoc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_7).r44 = function (encoder, value) {
    return this.doc(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().coc_1);
    }
    $this.eoc_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_62 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.foc_1 = [new ArrayListSerializer($serializer_getInstance_35())];
  }
  var Companion_instance_62;
  function Companion_getInstance_30() {
    if (Companion_instance_62 == null)
      new Companion_13();
    return Companion_instance_62;
  }
  function $serializer_8() {
    $serializer_instance_8 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Head', this, 1);
    tmp0_serialDesc.t4f('metadata', true);
    tmp0_serialDesc.v4f(new XmlSerialName('head', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.goc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_8).q44 = function () {
    return this.goc_1;
  };
  protoOf($serializer_8).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_30().foc_1[0]];
  };
  protoOf($serializer_8).s44 = function (decoder) {
    var tmp0_desc = this.goc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_30().foc_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return Head_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_8).hoc = function (encoder, value) {
    var tmp0_desc = this.goc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_30().foc_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.ioc_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.ioc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_8).r44 = function (encoder, value) {
    return this.hoc(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().goc_1);
    }
    if (0 === (seen1 & 1))
      $this.ioc_1 = emptyList();
    else
      $this.ioc_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_30();
    metadata = metadata === VOID ? emptyList() : metadata;
    this.ioc_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.t4f('text', false);
    tmp0_serialDesc.v4f(new XmlSerialName('navLabel', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.joc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_9).q44 = function () {
    return this.joc_1;
  };
  protoOf($serializer_9).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.joc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return NavLabel_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_9).koc = function (encoder, value) {
    var tmp0_desc = this.joc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_25(), value.loc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_9).r44 = function (encoder, value) {
    return this.koc(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().joc_1);
    }
    $this.loc_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_63 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.moc_1 = [new ArrayListSerializer($serializer_getInstance_23())];
  }
  var Companion_instance_63;
  function Companion_getInstance_31() {
    if (Companion_instance_63 == null)
      new Companion_14();
    return Companion_instance_63;
  }
  function $serializer_10() {
    $serializer_instance_10 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavMap', this, 1);
    tmp0_serialDesc.t4f('navPoints', false);
    tmp0_serialDesc.v4f(new XmlSerialName('navMap', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.noc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_10).q44 = function () {
    return this.noc_1;
  };
  protoOf($serializer_10).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_31().moc_1[0]];
  };
  protoOf($serializer_10).s44 = function (decoder) {
    var tmp0_desc = this.noc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_31().moc_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return NavMap_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_10).ooc = function (encoder, value) {
    var tmp0_desc = this.noc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_31().moc_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.poc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_10).r44 = function (encoder, value) {
    return this.ooc(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().noc_1);
    }
    $this.poc_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_64 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qoc_1 = [new ArrayListSerializer($serializer_getInstance_21()), null, null, null];
  }
  var Companion_instance_64;
  function Companion_getInstance_32() {
    if (Companion_instance_64 == null)
      new Companion_15();
    return Companion_instance_64;
  }
  function $serializer_11() {
    $serializer_instance_11 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavPoint', this, 4);
    tmp0_serialDesc.t4f('navLabels', false);
    tmp0_serialDesc.t4f('content', false);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('childPoints', false);
    tmp0_serialDesc.v4f(new XmlSerialName('navPoint', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.roc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_11).q44 = function () {
    return this.roc_1;
  };
  protoOf($serializer_11).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_32().qoc_1[0], $serializer_getInstance_18(), StringSerializer_getInstance(), new ArrayListSerializer($serializer_getInstance_23())];
  };
  protoOf($serializer_11).s44 = function (decoder) {
    var tmp0_desc = this.roc_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.i48(tmp0_desc);
    var tmp9_cached = Companion_getInstance_32().qoc_1;
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.u48(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.u48(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.u48(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.j48(tmp0_desc);
    return NavPoint_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_11).soc = function (encoder, value) {
    var tmp0_desc = this.roc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_32().qoc_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.toc_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_18(), value.uoc_1);
    tmp1_output.w49(tmp0_desc, 2, value.voc_1);
    tmp1_output.y49(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), value.woc_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_11).r44 = function (encoder, value) {
    return this.soc(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().roc_1);
    }
    $this.toc_1 = navLabels;
    $this.uoc_1 = content;
    $this.voc_1 = id;
    $this.woc_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.xoc_1 = 'http://www.daisy.org/z3986/2005/ncx/';
    this.yoc_1 = 'application/x-dtbncx+xml';
  }
  var Companion_instance_65;
  function Companion_getInstance_33() {
    return Companion_instance_65;
  }
  function $serializer_12() {
    $serializer_instance_12 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NcxDocument', this, 3);
    tmp0_serialDesc.t4f('head', false);
    tmp0_serialDesc.t4f('docTitle', false);
    tmp0_serialDesc.t4f('navMap', false);
    tmp0_serialDesc.v4f(new XmlSerialName('ncx', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.zoc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_12).q44 = function () {
    return this.zoc_1;
  };
  protoOf($serializer_12).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.zoc_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.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return NcxDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_12).aod = function (encoder, value) {
    var tmp0_desc = this.zoc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_20(), value.bod_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_19(), value.cod_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_22(), value.dod_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_12).r44 = function (encoder, value) {
    return this.aod(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().zoc_1);
    }
    $this.bod_1 = head;
    $this.cod_1 = docTitle;
    $this.dod_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.bod_1 = head;
    this.cod_1 = docTitle;
    this.dod_1 = navMap;
  }
  function Companion_17() {
  }
  var Companion_instance_66;
  function Companion_getInstance_34() {
    return Companion_instance_66;
  }
  function $serializer_13() {
    $serializer_instance_13 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Text', this, 1);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('text', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.eod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_13).q44 = function () {
    return this.eod_1;
  };
  protoOf($serializer_13).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_13).s44 = function (decoder) {
    var tmp0_desc = this.eod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return Text_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_13).fod = function (encoder, value) {
    var tmp0_desc = this.eod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.god_1 === '')) {
      tmp1_output.w49(tmp0_desc, 0, value.god_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_13).r44 = function (encoder, value) {
    return this.fod(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().eod_1);
    }
    if (0 === (seen1 & 1))
      $this.god_1 = '';
    else
      $this.god_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.god_1 = content;
  }
  function Companion_18() {
  }
  var Companion_instance_67;
  function Companion_getInstance_35() {
    return Companion_instance_67;
  }
  function $serializer_14() {
    $serializer_instance_14 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcCreator', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('creator', 'http://purl.org/dc/elements/1.1/'));
    this.hod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_14).q44 = function () {
    return this.hod_1;
  };
  protoOf($serializer_14).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.hod_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcCreator_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_14).iod = function (encoder, value) {
    var tmp0_desc = this.hod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.jod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.jod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.kod_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.kod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_14).r44 = function (encoder, value) {
    return this.iod(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().hod_1);
    }
    if (0 === (seen1 & 1))
      $this.jod_1 = null;
    else
      $this.jod_1 = id;
    if (0 === (seen1 & 2))
      $this.kod_1 = '';
    else
      $this.kod_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.jod_1 = id;
    this.kod_1 = content;
  }
  function Companion_19() {
  }
  var Companion_instance_68;
  function Companion_getInstance_36() {
    return Companion_instance_68;
  }
  function $serializer_15() {
    $serializer_instance_15 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcDescription', this, 2);
    tmp0_serialDesc.t4f('lang', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('description', 'http://purl.org/dc/elements/1.1/'));
    this.lod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_15).q44 = function () {
    return this.lod_1;
  };
  protoOf($serializer_15).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.lod_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcDescription_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_15).mod = function (encoder, value) {
    var tmp0_desc = this.lod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.nod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.nod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.ood_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.ood_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_15).r44 = function (encoder, value) {
    return this.mod(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().lod_1);
    }
    if (0 === (seen1 & 1))
      $this.nod_1 = null;
    else
      $this.nod_1 = lang;
    if (0 === (seen1 & 2))
      $this.ood_1 = '';
    else
      $this.ood_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.nod_1 = lang;
    this.ood_1 = content;
  }
  function Companion_20() {
  }
  var Companion_instance_69;
  function Companion_getInstance_37() {
    return Companion_instance_69;
  }
  function $serializer_16() {
    $serializer_instance_16 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcIdentifier', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('identifier', 'http://purl.org/dc/elements/1.1/'));
    this.pod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_16).q44 = function () {
    return this.pod_1;
  };
  protoOf($serializer_16).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.pod_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcIdentifier_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_16).qod = function (encoder, value) {
    var tmp0_desc = this.pod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.rod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.rod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.sod_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.sod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_16).r44 = function (encoder, value) {
    return this.qod(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().pod_1);
    }
    if (0 === (seen1 & 1))
      $this.rod_1 = null;
    else
      $this.rod_1 = id;
    if (0 === (seen1 & 2))
      $this.sod_1 = '';
    else
      $this.sod_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.rod_1 = id;
    this.sod_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.t4f('content', false);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('language', 'http://purl.org/dc/elements/1.1/'));
    this.tod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_17).q44 = function () {
    return this.tod_1;
  };
  protoOf($serializer_17).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_17).s44 = function (decoder) {
    var tmp0_desc = this.tod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return DcLanguage_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_17).uod = function (encoder, value) {
    var tmp0_desc = this.tod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.vod_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_17).r44 = function (encoder, value) {
    return this.uod(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().tod_1);
    }
    $this.vod_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_70;
  function Companion_getInstance_38() {
    return Companion_instance_70;
  }
  function $serializer_18() {
    $serializer_instance_18 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcTitle', this, 2);
    tmp0_serialDesc.t4f('lang', true);
    tmp0_serialDesc.u4f(new XmlSerialName(VOID, VOID, 'xml'));
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.u4f(new XmlValue());
    tmp0_serialDesc.v4f(new XmlSerialName('title', 'http://purl.org/dc/elements/1.1/'));
    this.wod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_18).q44 = function () {
    return this.wod_1;
  };
  protoOf($serializer_18).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.wod_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return DcTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_18).xod = function (encoder, value) {
    var tmp0_desc = this.wod_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.yod_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.yod_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.zod_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.zod_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_18).r44 = function (encoder, value) {
    return this.xod(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().wod_1);
    }
    if (0 === (seen1 & 1))
      $this.yod_1 = null;
    else
      $this.yod_1 = lang;
    if (0 === (seen1 & 2))
      $this.zod_1 = '';
    else
      $this.zod_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.yod_1 = lang;
    this.zod_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.t4f('id', false);
    tmp0_serialDesc.t4f('href', false);
    tmp0_serialDesc.t4f('properties', true);
    tmp0_serialDesc.t4f('mediaType', false);
    tmp0_serialDesc.u4f(new XmlSerialName('media-type'));
    tmp0_serialDesc.v4f(new XmlSerialName('item', 'http://www.idpf.org/2007/opf'));
    this.aoe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_19).q44 = function () {
    return this.aoe_1;
  };
  protoOf($serializer_19).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.aoe_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.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return Item_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_19).boe = function (encoder, value) {
    var tmp0_desc = this.aoe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.coe_1);
    tmp1_output.w49(tmp0_desc, 1, value.doe_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.eoe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.eoe_1);
    }
    tmp1_output.w49(tmp0_desc, 3, value.foe_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_19).r44 = function (encoder, value) {
    return this.boe(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().aoe_1);
    }
    $this.coe_1 = id;
    $this.doe_1 = href;
    if (0 === (seen1 & 4))
      $this.eoe_1 = null;
    else
      $this.eoe_1 = properties;
    $this.foe_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_71;
  function Companion_getInstance_39() {
    return Companion_instance_71;
  }
  function $serializer_20() {
    $serializer_instance_20 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.ItemRef', this, 1);
    tmp0_serialDesc.t4f('idRef', true);
    tmp0_serialDesc.u4f(new XmlSerialName('idref'));
    tmp0_serialDesc.v4f(new XmlSerialName('itemref', 'http://www.idpf.org/2007/opf'));
    this.goe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_20).q44 = function () {
    return this.goe_1;
  };
  protoOf($serializer_20).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_20).s44 = function (decoder) {
    var tmp0_desc = this.goe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return ItemRef_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_20).hoe = function (encoder, value) {
    var tmp0_desc = this.goe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ioe_1 === '')) {
      tmp1_output.w49(tmp0_desc, 0, value.ioe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_20).r44 = function (encoder, value) {
    return this.hoe(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().goe_1);
    }
    if (0 === (seen1 & 1))
      $this.ioe_1 = '';
    else
      $this.ioe_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.ioe_1 = idRef;
  }
  function Companion_23() {
    Companion_instance_72 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.joe_1 = [new ArrayListSerializer($serializer_getInstance_31())];
  }
  var Companion_instance_72;
  function Companion_getInstance_40() {
    if (Companion_instance_72 == null)
      new Companion_23();
    return Companion_instance_72;
  }
  function $serializer_21() {
    $serializer_instance_21 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Manifest', this, 1);
    tmp0_serialDesc.t4f('items', true);
    tmp0_serialDesc.v4f(new XmlSerialName('manifest', 'http://www.idpf.org/2007/opf'));
    this.koe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_21).q44 = function () {
    return this.koe_1;
  };
  protoOf($serializer_21).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_40().joe_1[0]];
  };
  protoOf($serializer_21).s44 = function (decoder) {
    var tmp0_desc = this.koe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    var tmp6_cached = Companion_getInstance_40().joe_1;
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return Manifest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_21).loe = function (encoder, value) {
    var tmp0_desc = this.koe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_40().joe_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.moe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.moe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_21).r44 = function (encoder, value) {
    return this.loe(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().koe_1);
    }
    if (0 === (seen1 & 1))
      $this.moe_1 = emptyList();
    else
      $this.moe_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_40();
    items = items === VOID ? emptyList() : items;
    this.moe_1 = items;
  }
  function Companion_24() {
  }
  var Companion_instance_73;
  function Companion_getInstance_41() {
    return Companion_instance_73;
  }
  function $serializer_22() {
    $serializer_instance_22 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Meta', this, 2);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('content', true);
    tmp0_serialDesc.v4f(new XmlSerialName('meta', 'http://www.idpf.org/2007/opf'));
    this.noe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_22).q44 = function () {
    return this.noe_1;
  };
  protoOf($serializer_22).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.noe_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Meta_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_22).ooe = function (encoder, value) {
    var tmp0_desc = this.noe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.poe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.poe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.qoe_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.qoe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_22).r44 = function (encoder, value) {
    return this.ooe(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().noe_1);
    }
    if (0 === (seen1 & 1))
      $this.poe_1 = null;
    else
      $this.poe_1 = name;
    if (0 === (seen1 & 2))
      $this.qoe_1 = null;
    else
      $this.qoe_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.poe_1 = name;
    this.qoe_1 = content;
  }
  function Companion_25() {
    Companion_instance_74 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.roe_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_74;
  function Companion_getInstance_42() {
    if (Companion_instance_74 == null)
      new Companion_25();
    return Companion_instance_74;
  }
  function $serializer_23() {
    $serializer_instance_23 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Metadata', this, 6);
    tmp0_serialDesc.t4f('titles', true);
    tmp0_serialDesc.t4f('creators', true);
    tmp0_serialDesc.t4f('languages', true);
    tmp0_serialDesc.t4f('descriptions', true);
    tmp0_serialDesc.t4f('identifiers', true);
    tmp0_serialDesc.t4f('metas', true);
    tmp0_serialDesc.v4f(new XmlSerialName('metadata', 'http://www.idpf.org/2007/opf'));
    this.soe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_23).q44 = function () {
    return this.soe_1;
  };
  protoOf($serializer_23).k4g = function () {
    var tmp0_cached = Companion_getInstance_42().roe_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).s44 = function (decoder) {
    var tmp0_desc = this.soe_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.i48(tmp0_desc);
    var tmp11_cached = Companion_getInstance_42().roe_1;
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.u48(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.u48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.u48(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.u48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.u48(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.u48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.u48(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.u48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return Metadata_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_23).toe = function (encoder, value) {
    var tmp0_desc = this.soe_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_42().roe_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.uoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.uoe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !equals(value.voe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.voe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.woe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.woe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.xoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 3, tmp2_cached[3], value.xoe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !equals(value.yoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 4, tmp2_cached[4], value.yoe_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !equals(value.zoe_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 5, tmp2_cached[5], value.zoe_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_23).r44 = function (encoder, value) {
    return this.toe(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().soe_1);
    }
    if (0 === (seen1 & 1))
      $this.uoe_1 = emptyList();
    else
      $this.uoe_1 = titles;
    if (0 === (seen1 & 2))
      $this.voe_1 = emptyList();
    else
      $this.voe_1 = creators;
    if (0 === (seen1 & 4))
      $this.woe_1 = emptyList();
    else
      $this.woe_1 = languages;
    if (0 === (seen1 & 8))
      $this.xoe_1 = emptyList();
    else
      $this.xoe_1 = descriptions;
    if (0 === (seen1 & 16))
      $this.yoe_1 = emptyList();
    else
      $this.yoe_1 = identifiers;
    if (0 === (seen1 & 32))
      $this.zoe_1 = emptyList();
    else
      $this.zoe_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_42();
    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.uoe_1 = titles;
    this.voe_1 = creators;
    this.woe_1 = languages;
    this.xoe_1 = descriptions;
    this.yoe_1 = identifiers;
    this.zoe_1 = metas;
  }
  function Companion_26() {
    this.aof_1 = 'http://www.idpf.org/2007/opf';
    this.bof_1 = 'http://purl.org/dc/elements/1.1/';
  }
  protoOf(Companion_26).n4r = function () {
    return $serializer_getInstance_36();
  };
  var Companion_instance_75;
  function Companion_getInstance_43() {
    return Companion_instance_75;
  }
  function $serializer_24() {
    $serializer_instance_24 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.PackageDocument', this, 5);
    tmp0_serialDesc.t4f('version', true);
    tmp0_serialDesc.t4f('uniqueIdentifier', true);
    tmp0_serialDesc.u4f(new XmlSerialName('unique-identifier'));
    tmp0_serialDesc.t4f('metadata', true);
    tmp0_serialDesc.t4f('manifest', true);
    tmp0_serialDesc.t4f('spine', true);
    tmp0_serialDesc.v4f(new XmlSerialName('package', 'http://www.idpf.org/2007/opf'));
    this.cof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_24).q44 = function () {
    return this.cof_1;
  };
  protoOf($serializer_24).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.cof_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.i48(tmp0_desc);
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.u48(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.u48(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.u48(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.u48(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return PackageDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_24).dof = function (encoder, value) {
    var tmp0_desc = this.cof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.eof_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.eof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.fof_1 === '')) {
      tmp1_output.w49(tmp0_desc, 1, value.fof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.gof_1, new Metadata())) {
      tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_35(), value.gof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.hof_1, new Manifest())) {
      tmp1_output.y49(tmp0_desc, 3, $serializer_getInstance_33(), value.hof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !equals(value.iof_1, new Spine())) {
      tmp1_output.y49(tmp0_desc, 4, $serializer_getInstance_37(), value.iof_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_24).r44 = function (encoder, value) {
    return this.dof(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().cof_1);
    }
    if (0 === (seen1 & 1))
      $this.eof_1 = null;
    else
      $this.eof_1 = version;
    if (0 === (seen1 & 2))
      $this.fof_1 = '';
    else
      $this.fof_1 = uniqueIdentifier;
    if (0 === (seen1 & 4))
      $this.gof_1 = new Metadata();
    else
      $this.gof_1 = metadata;
    if (0 === (seen1 & 8))
      $this.hof_1 = new Manifest();
    else
      $this.hof_1 = manifest;
    if (0 === (seen1 & 16))
      $this.iof_1 = new Spine();
    else
      $this.iof_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.eof_1 = version;
    this.fof_1 = uniqueIdentifier;
    this.gof_1 = metadata;
    this.hof_1 = manifest;
    this.iof_1 = spine;
  }
  protoOf(PackageDocument).jof = function () {
    var whitespaceRegex = Regex_init_$Create$('\\s+');
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.hof_1.moe_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.eoe_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.gof_1.zoe_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.poe_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.qoe_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.hof_1.moe_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.coe_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).kof = function () {
    var whiteSpaceRegex = Regex_init_$Create$('\\s+');
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.hof_1.moe_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.eoe_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.iof_1.mof_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.hof_1.moe_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.coe_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.eoe_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_76 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.nof_1 = [new ArrayListSerializer($serializer_getInstance_32()), null];
  }
  var Companion_instance_76;
  function Companion_getInstance_44() {
    if (Companion_instance_76 == null)
      new Companion_27();
    return Companion_instance_76;
  }
  function $serializer_25() {
    $serializer_instance_25 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Spine', this, 2);
    tmp0_serialDesc.t4f('itemRefs', true);
    tmp0_serialDesc.t4f('toc', true);
    tmp0_serialDesc.v4f(new XmlSerialName('spine', 'http://www.idpf.org/2007/opf'));
    this.oof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_25).q44 = function () {
    return this.oof_1;
  };
  protoOf($serializer_25).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_44().nof_1[0], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_25).s44 = function (decoder) {
    var tmp0_desc = this.oof_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.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_44().nof_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Spine_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_25).pof = function (encoder, value) {
    var tmp0_desc = this.oof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_44().nof_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !equals(value.lof_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.lof_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.mof_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.mof_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_25).r44 = function (encoder, value) {
    return this.pof(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().oof_1);
    }
    if (0 === (seen1 & 1))
      $this.lof_1 = emptyList();
    else
      $this.lof_1 = itemRefs;
    if (0 === (seen1 & 2))
      $this.mof_1 = null;
    else
      $this.mof_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_44();
    itemRefs = itemRefs === VOID ? emptyList() : itemRefs;
    toc = toc === VOID ? null : toc;
    this.lof_1 = itemRefs;
    this.mof_1 = toc;
  }
  function Companion_28() {
    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.qof_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_39())];
  }
  var Companion_instance_77;
  function Companion_getInstance_45() {
    if (Companion_instance_77 == null)
      new Companion_28();
    return Companion_instance_77;
  }
  function $serializer_26() {
    $serializer_instance_26 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifest', this, 3);
    tmp0_serialDesc.t4f('version', false);
    tmp0_serialDesc.t4f('metadata', false);
    tmp0_serialDesc.t4f('entries', false);
    this.rof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_26).q44 = function () {
    return this.rof_1;
  };
  protoOf($serializer_26).k4g = function () {
    var tmp0_cached = Companion_getInstance_45().qof_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).s44 = function (decoder) {
    var tmp0_desc = this.rof_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.i48(tmp0_desc);
    var tmp8_cached = Companion_getInstance_45().qof_1;
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return ContentManifest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_26).sof = function (encoder, value) {
    var tmp0_desc = this.rof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_45().qof_1;
    tmp1_output.r49(tmp0_desc, 0, value.tof_1);
    tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.uof_1);
    tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.vof_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_26).r44 = function (encoder, value) {
    return this.sof(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().rof_1);
    }
    $this.tof_1 = version;
    $this.uof_1 = metadata;
    $this.vof_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_45();
    this.tof_1 = version;
    this.uof_1 = metadata;
    this.vof_1 = entries;
  }
  protoOf(ContentManifest).toString = function () {
    return 'ContentManifest(version=' + this.tof_1 + ', metadata=' + this.uof_1 + ', entries=' + this.vof_1 + ')';
  };
  protoOf(ContentManifest).hashCode = function () {
    var result = this.tof_1;
    result = imul(result, 31) + hashCode(this.uof_1) | 0;
    result = imul(result, 31) + hashCode(this.vof_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.tof_1 === tmp0_other_with_cast.tof_1))
      return false;
    if (!equals(this.uof_1, tmp0_other_with_cast.uof_1))
      return false;
    if (!equals(this.vof_1, tmp0_other_with_cast.vof_1))
      return false;
    return true;
  };
  function Companion_29() {
    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.wof_1 = [null, null, null, null, null, null, new StringValuesSerializer(), new StringValuesSerializer(), null];
  }
  var Companion_instance_78;
  function Companion_getInstance_46() {
    if (Companion_instance_78 == null)
      new Companion_29();
    return Companion_instance_78;
  }
  function $serializer_27() {
    $serializer_instance_27 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifestEntry', this, 9);
    tmp0_serialDesc.t4f('uri', false);
    tmp0_serialDesc.t4f('storageSize', false);
    tmp0_serialDesc.t4f('ignoreQueryParams', true);
    tmp0_serialDesc.t4f('status', true);
    tmp0_serialDesc.t4f('method', true);
    tmp0_serialDesc.t4f('integrity', false);
    tmp0_serialDesc.t4f('requestHeaders', true);
    tmp0_serialDesc.t4f('responseHeaders', false);
    tmp0_serialDesc.t4f('bodyDataUrl', false);
    this.xof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_27).q44 = function () {
    return this.xof_1;
  };
  protoOf($serializer_27).k4g = function () {
    var tmp0_cached = Companion_getInstance_46().wof_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).s44 = function (decoder) {
    var tmp0_desc = this.xof_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.i48(tmp0_desc);
    var tmp14_cached = Companion_getInstance_46().wof_1;
    if (tmp13_input.x48()) {
      tmp4_local0 = tmp13_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.k48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.n48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.s48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.s48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.u48(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.u48(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.s48(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.k48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.n48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.s48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.s48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.u48(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.u48(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.s48(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.j48(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).yof = function (encoder, value) {
    var tmp0_desc = this.xof_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_46().wof_1;
    tmp1_output.w49(tmp0_desc, 0, value.zof_1);
    tmp1_output.s49(tmp0_desc, 1, value.aog_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.bog_1 === true)) {
      tmp1_output.o49(tmp0_desc, 2, value.bog_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.cog_1 === 200)) {
      tmp1_output.r49(tmp0_desc, 3, value.cog_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.dog_1 === 'GET')) {
      tmp1_output.w49(tmp0_desc, 4, value.dog_1);
    }
    tmp1_output.w49(tmp0_desc, 5, value.eog_1);
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.fog_1, emptyStringValues())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.fog_1);
    }
    tmp1_output.y49(tmp0_desc, 7, tmp2_cached[7], value.gog_1);
    tmp1_output.w49(tmp0_desc, 8, value.hog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_27).r44 = function (encoder, value) {
    return this.yof(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().xof_1);
    }
    $this.zof_1 = uri;
    $this.aog_1 = storageSize;
    if (0 === (seen1 & 4))
      $this.bog_1 = true;
    else
      $this.bog_1 = ignoreQueryParams;
    if (0 === (seen1 & 8))
      $this.cog_1 = 200;
    else
      $this.cog_1 = status;
    if (0 === (seen1 & 16))
      $this.dog_1 = 'GET';
    else
      $this.dog_1 = method;
    $this.eog_1 = integrity;
    if (0 === (seen1 & 64))
      $this.fog_1 = emptyStringValues();
    else
      $this.fog_1 = requestHeaders;
    $this.gog_1 = responseHeaders;
    $this.hog_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_79 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.iog_1 = [new ArrayListSerializer($serializer_getInstance_41()), new ArrayListSerializer($serializer_getInstance_42())];
  }
  var Companion_instance_79;
  function Companion_getInstance_47() {
    if (Companion_instance_79 == null)
      new Companion_30();
    return Companion_instance_79;
  }
  function $serializer_28() {
    $serializer_instance_28 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaContentInfo', this, 2);
    tmp0_serialDesc.t4f('sources', false);
    tmp0_serialDesc.t4f('subtitles', true);
    this.jog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_28).q44 = function () {
    return this.jog_1;
  };
  protoOf($serializer_28).k4g = function () {
    var tmp0_cached = Companion_getInstance_47().iog_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).s44 = function (decoder) {
    var tmp0_desc = this.jog_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.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_47().iog_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return MediaContentInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_28).kog = function (encoder, value) {
    var tmp0_desc = this.jog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_47().iog_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.log_1);
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !equals(value.mog_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.mog_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_28).r44 = function (encoder, value) {
    return this.kog(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().jog_1);
    }
    $this.log_1 = sources;
    if (0 === (seen1 & 2))
      $this.mog_1 = emptyList();
    else
      $this.mog_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_47();
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.log_1 = sources;
    this.mog_1 = subtitles;
  }
  function $serializer_29() {
    $serializer_instance_29 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaSource', this, 2);
    tmp0_serialDesc.t4f('uri', false);
    tmp0_serialDesc.t4f('mimeType', false);
    this.nog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_29).q44 = function () {
    return this.nog_1;
  };
  protoOf($serializer_29).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.nog_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return MediaSource_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_29).oog = function (encoder, value) {
    var tmp0_desc = this.nog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.pog_1);
    tmp1_output.w49(tmp0_desc, 1, value.qog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_29).r44 = function (encoder, value) {
    return this.oog(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().nog_1);
    }
    $this.pog_1 = uri;
    $this.qog_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).n4r = function () {
    return $serializer_getInstance_42();
  };
  var Companion_instance_80;
  function Companion_getInstance_48() {
    return Companion_instance_80;
  }
  function $serializer_30() {
    $serializer_instance_30 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.SubtitleTrack', this, 4);
    tmp0_serialDesc.t4f('uri', false);
    tmp0_serialDesc.t4f('mimeType', false);
    tmp0_serialDesc.t4f('langCode', false);
    tmp0_serialDesc.t4f('title', false);
    this.rog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_30).q44 = function () {
    return this.rog_1;
  };
  protoOf($serializer_30).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.rog_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.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return SubtitleTrack_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_30).sog = function (encoder, value) {
    var tmp0_desc = this.rog_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.tog_1);
    tmp1_output.w49(tmp0_desc, 1, value.uog_1);
    tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.vog_1);
    tmp1_output.w49(tmp0_desc, 3, value.wog_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_30).r44 = function (encoder, value) {
    return this.sog(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().rog_1);
    }
    $this.tog_1 = uri;
    $this.uog_1 = mimeType;
    $this.vog_1 = langCode;
    $this.wog_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.tog_1 = uri;
    this.uog_1 = mimeType;
    this.vog_1 = langCode;
    this.wog_1 = title;
  }
  protoOf(SubtitleTrack).xog = function (uri, mimeType, langCode, title) {
    return new SubtitleTrack(uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).yog = function (uri, mimeType, langCode, title, $super) {
    uri = uri === VOID ? this.tog_1 : uri;
    mimeType = mimeType === VOID ? this.uog_1 : mimeType;
    langCode = langCode === VOID ? this.vog_1 : langCode;
    title = title === VOID ? this.wog_1 : title;
    return $super === VOID ? this.xog(uri, mimeType, langCode, title) : $super.xog.call(this, uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).toString = function () {
    return 'SubtitleTrack(uri=' + this.tog_1 + ', mimeType=' + this.uog_1 + ', langCode=' + this.vog_1 + ', title=' + this.wog_1 + ')';
  };
  protoOf(SubtitleTrack).hashCode = function () {
    var result = getStringHashCode(this.tog_1);
    result = imul(result, 31) + getStringHashCode(this.uog_1) | 0;
    result = imul(result, 31) + (this.vog_1 == null ? 0 : getStringHashCode(this.vog_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.wog_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.tog_1 === tmp0_other_with_cast.tog_1))
      return false;
    if (!(this.uog_1 === tmp0_other_with_cast.uog_1))
      return false;
    if (!(this.vog_1 == tmp0_other_with_cast.vog_1))
      return false;
    if (!(this.wog_1 === tmp0_other_with_cast.wog_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.zog_1 = 'upload-tmp';
    this.aoh_1 = 'upload-tmp:///';
  }
  protoOf(Companion_32).n4r = function () {
    return $serializer_getInstance_43();
  };
  var Companion_instance_81;
  function Companion_getInstance_49() {
    return Companion_instance_81;
  }
  function $serializer_31() {
    $serializer_instance_31 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentjob.MetadataResult', this, 4);
    tmp0_serialDesc.t4f('entry', false);
    tmp0_serialDesc.t4f('importerId', false);
    tmp0_serialDesc.t4f('originalFilename', true);
    tmp0_serialDesc.t4f('picture', true);
    this.boh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_31).q44 = function () {
    return this.boh_1;
  };
  protoOf($serializer_31).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.boh_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.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return MetadataResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_31).coh = function (encoder, value) {
    var tmp0_desc = this.boh_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_3(), value.doh_1);
    tmp1_output.r49(tmp0_desc, 1, value.eoh_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.foh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.foh_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.goh_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, $serializer_getInstance_4(), value.goh_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_31).r44 = function (encoder, value) {
    return this.coh(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().boh_1);
    }
    $this.doh_1 = entry;
    $this.eoh_1 = importerId;
    if (0 === (seen1 & 4))
      $this.foh_1 = null;
    else
      $this.foh_1 = originalFilename;
    if (0 === (seen1 & 8))
      $this.goh_1 = null;
    else
      $this.goh_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.doh_1 = entry;
    this.eoh_1 = importerId;
    this.foh_1 = originalFilename;
    this.goh_1 = picture;
  }
  protoOf(MetadataResult).toString = function () {
    return 'MetadataResult(entry=' + this.doh_1 + ', importerId=' + this.eoh_1 + ', originalFilename=' + this.foh_1 + ', picture=' + this.goh_1 + ')';
  };
  protoOf(MetadataResult).hashCode = function () {
    var result = this.doh_1.hashCode();
    result = imul(result, 31) + this.eoh_1 | 0;
    result = imul(result, 31) + (this.foh_1 == null ? 0 : getStringHashCode(this.foh_1)) | 0;
    result = imul(result, 31) + (this.goh_1 == null ? 0 : this.goh_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.doh_1.equals(tmp0_other_with_cast.doh_1))
      return false;
    if (!(this.eoh_1 === tmp0_other_with_cast.eoh_1))
      return false;
    if (!(this.foh_1 == tmp0_other_with_cast.foh_1))
      return false;
    if (!equals(this.goh_1, tmp0_other_with_cast.goh_1))
      return false;
    return true;
  };
  function PersonConstants() {
    PersonConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1, strings_getInstance().smk_1);
    var tmp_1 = to(2, strings_getInstance().rmk_1);
    var tmp_2 = to(4, strings_getInstance().tmk_1);
    tmp.hoh_1 = mapOf([tmp_0, tmp_1, tmp_2, to(0, strings_getInstance().umk_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().ung_1);
    var tmp_1 = to(4, strings_getInstance().emn_1);
    var tmp_2 = to(1, strings_getInstance().vng_1);
    var tmp_3 = to(2, strings_getInstance().wng_1);
    tmp.ioh_1 = mapOf([tmp_0, tmp_1, tmp_2, tmp_3, to(3, strings_getInstance().mna_1)]);
    var tmp_4 = this;
    Companion_getInstance_1();
    var tmp_5 = to(0, strings_getInstance().nn5_1);
    Companion_getInstance_1();
    var tmp_6 = to(1, strings_getInstance().mn5_1);
    Companion_getInstance_1();
    tmp_4.joh_1 = mapOf([tmp_5, tmp_6, to(2, strings_getInstance().ln5_1)]);
  }
  var SubmissionConstants_instance;
  function SubmissionConstants_getInstance() {
    if (SubmissionConstants_instance == null)
      new SubmissionConstants();
    return SubmissionConstants_instance;
  }
  function TerminologyKeys() {
    TerminologyKeys_instance = this;
    this.koh_1 = 'Teacher';
    this.loh_1 = 'Student';
    this.moh_1 = 'Teachers';
    this.noh_1 = 'Students';
    this.ooh_1 = 'AddTeacher';
    this.poh_1 = 'AddStudent';
    this.qoh_1 = mapOf([to('Teacher', strings_getInstance().umy_1), to('Student', strings_getInstance().hn5_1), to('Teachers', strings_getInstance().xmy_1), to('Students', strings_getInstance().sml_1), to('AddTeacher', strings_getInstance().vmy_1), to('AddStudent', strings_getInstance().tml_1)]);
  }
  var TerminologyKeys_instance;
  function TerminologyKeys_getInstance() {
    if (TerminologyKeys_instance == null)
      new TerminologyKeys();
    return TerminologyKeys_instance;
  }
  function ValidateUsernameUseCase() {
  }
  function $invokeCOROUTINE$10(_this__u8e3s4, destUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zoh_1 = _this__u8e3s4;
    this.aoi_1 = destUri;
  }
  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 = 6;
            this.hd_1 = 1;
            suspendResult = this.zoh_1.foi_1.sk2_1.v7e().lhn(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.boi_1 = suspendResult;
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp0_safe_receiver = this.zoh_1.foi_1.tk2_1;
            tmp_0.doi_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7e();
            if (this.doi_1 == null) {
              this.eoi_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.doi_1.lhn(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.eoi_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            var tmp2_safe_receiver = this.eoi_1;
            this.coi_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xhn_1;
            this.id_1 = 6;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 6;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Exception) {
              var e = this.kd_1;
              var tmp_2 = this;
              Napier_getInstance().i5e('GetRegistrationAllowedUseCase: Error occurred: ' + e.message, e);
              var tmp3_safe_receiver = this.boi_1;
              tmp_2.coi_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.xhn_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return this.coi_1;
          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 CheckRegistrationAllowedUseCase(dataLayer) {
    this.foi_1 = dataLayer;
  }
  protoOf(CheckRegistrationAllowedUseCase).goi = function (destUri, $completion) {
    var tmp = new $invokeCOROUTINE$10(this, destUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function CreateNewLocalAccountUseCase(di) {
    this.hoi_1 = di;
  }
  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.joi_1 = submission;
  }
  protoOf(SubmitAssignmentResult).toString = function () {
    return 'SubmitAssignmentResult(submission=' + this.joi_1 + ')';
  };
  protoOf(SubmitAssignmentResult).hashCode = function () {
    return this.joi_1 == null ? 0 : this.joi_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.joi_1, tmp0_other_with_cast.joi_1))
      return false;
    return true;
  };
  function SubmitAssignmentUseCase$invoke$lambda($assignmentUid, $submitterUid, $accountPersonUid, $assignment) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.lc2_1 = $assignmentUid;
      $this$shallowCopy.mc2_1 = $submitterUid;
      $this$shallowCopy.nc2_1 = $accountPersonUid;
      $this$shallowCopy.qc2_1 = systemTimeInMillis();
      $this$shallowCopy.rc2_1 = $assignment.f7u_1;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$11(_this__u8e3s4, repo, submitterUid, assignmentUid, accountPersonUid, submission, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.soi_1 = _this__u8e3s4;
    this.toi_1 = repo;
    this.uoi_1 = submitterUid;
    this.voi_1 = assignmentUid;
    this.woi_1 = accountPersonUid;
    this.xoi_1 = submission;
  }
  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 = 6;
            if (this.uoi_1.equals(new Long(0, 0)))
              throw new AccountIsNotSubmitterException('Not a valid submitter');
            this.hd_1 = 1;
            suspendResult = this.toi_1.q7e().q7s(this.voi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.zoi_1 = tmp_1;
            var tmp_2 = this;
            var tmp1_elvis_lhs = this.zoi_1.s7x_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.aoj_1 = tmp_3;
            var tmp_4 = this;
            var tmp2_elvis_lhs = this.zoi_1.r7x_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.boj_1 = tmp_5;
            var tmp_6 = this.boj_1.z7t_1;
            if (tmp_6 === 1) {
              this.hd_1 = 2;
              suspendResult = this.toi_1.r7e().sc1(this.woi_1, this.voi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.coj_1 = false;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.coj_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.coj_1) {
              throw new AssignmentAlreadySubmittedException(this.soi_1.eoj_1.joj(strings_getInstance().nnk_1));
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            if (lastPossibleSubmissionTime(this.aoj_1).c7(systemTimeInMillis()) < 0) {
              throw new AssignmentDeadlinePassedException(this.soi_1.eoj_1.joj(strings_getInstance().mnk_1));
            }

            if (this.boj_1.b7u_1) {
              var tmp_7 = this.boj_1.c7u_1;
              if (tmp_7 === 1) {
                var tmp3_safe_receiver = this.xoi_1.oc2_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.boj_1.d7u_1) {
                  throw new AssignmentTextTooLongException(this.soi_1.eoj_1.koj(strings_getInstance().onk_1, [wordCount.toString(), this.boj_1.d7u_1.toString()]));
                }
              } else {
                var tmp_8 = this.boj_1.c7u_1;
                if (tmp_8 === 2) {
                  var tmp6_safe_receiver = this.xoi_1.oc2_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.boj_1.d7u_1) {
                    throw new AssignmentTextTooLongException(this.soi_1.eoj_1.koj(strings_getInstance().pnk_1, [charCount.toString(), this.boj_1.d7u_1.toString()]));
                  }
                }
              }
            }

            var tmp_9 = this;
            tmp_9.doj_1 = shallowCopy_0(this.xoi_1, SubmitAssignmentUseCase$invoke$lambda(this.voi_1, this.uoi_1, this.woi_1, this.boj_1));
            Napier_getInstance().i5e('SubmitAssignmentUseCase: save to repo for submitterUid=' + this.uoi_1.toString() + ' assignmentUid=' + this.voi_1.toString());
            this.hd_1 = 5;
            suspendResult = this.toi_1.r7e().insertAsync(this.doj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return new SubmitAssignmentResult(this.doj_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.eoj_1 = systemImpl;
  }
  protoOf(SubmitAssignmentUseCase).loj = function (repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion) {
    var tmp = new $invokeCOROUTINE$11(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.gbw_1 = $assignment.n7t_1;
      $this$shallowCopy.hbw_1 = $submitterUid;
      $this$shallowCopy.ibw_1 = $activeUserSubmitterUid;
      $this$shallowCopy.jbw_1 = $activeUserPerson.f96_1;
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $courseBlock.e7y_1;
      tmp.mbw_1 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
      $this$shallowCopy.pbw_1 = $clazzUid;
      var tmp_0;
      if ($applyPenalty) {
        $this$shallowCopy.nbw_1 = roundTo($this$shallowCopy.lbw_1 * ($courseBlock.c7y_1 / 100.0), 2);
        $this$shallowCopy.lbw_1 = $this$shallowCopy.lbw_1 - $this$shallowCopy.nbw_1;
        tmp_0 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    this.uoj_1 = this$0;
    this.voj_1 = $stmt;
    this.woj_1 = $activeUserPerson;
    this.xoj_1 = $courseBlock;
    this.yoj_1 = $instructorActorToPersonUidMap;
    this.zoj_1 = $actorToPersonUidMap;
    this.aok_1 = $clazzUid;
    this.bok_1 = $activityId;
    this.cok_1 = $markToRecord;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubmitMarkUseCase$invoke$slambda).fok = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fok(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.eok_1 = uuid4();
            this.hd_1 = 1;
            var tmp_0 = listOf_0(this.voj_1);
            var tmp0_xseAccountPersonUid = this.woj_1.f96_1;
            var tmp1_xseAccountUsername = ensureNotNull(this.woj_1.g96_1);
            var tmp2_xseCbUid = this.xoj_1.t7x_1;
            var tmp3_xseRegistrationHi = this.eok_1.vmd();
            var tmp4_xseRegistrationLo = this.eok_1.wmd();
            var tmp5_knownActorUidToPersonUids = this.uoj_1.lok_1.r45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), plus_0(this.yoj_1, this.zoj_1));
            suspendResult = this.uoj_1.jok_1.tok(tmp_0, new XapiSessionEntity(VOID, VOID, tmp3_xseRegistrationHi, tmp4_xseRegistrationLo, VOID, tmp0_xseAccountPersonUid, VOID, tmp1_xseAccountUsername, this.aok_1, tmp2_xseCbUid, VOID, VOID, this.bok_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.uoj_1.gok_1.t7e().insertAsync(this.cok_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).vny = function (it, completion) {
    var i = new SubmitMarkUseCase$invoke$slambda(this.uoj_1, this.voj_1, this.woj_1, this.xoj_1, this.yoj_1, this.zoj_1, this.aok_1, this.bok_1, this.cok_1, completion);
    i.dok_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.fok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$12(_this__u8e3s4, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.col_1 = _this__u8e3s4;
    this.dol_1 = activeUserPerson;
    this.eol_1 = assignment;
    this.fol_1 = clazzUid;
    this.gol_1 = submitterUid;
    this.hol_1 = draftMark;
    this.iol_1 = submissions;
    this.jol_1 = courseBlock;
  }
  protoOf($invokeCOROUTINE$12).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.iol_1.c1()) {
              var iterator = this.iol_1.w();
              if (!iterator.f())
                throw NoSuchElementException_init_$Create$();
              var maxValue = iterator.e().qc2_1;
              while (iterator.f()) {
                var v = iterator.e().qc2_1;
                if (compareTo(maxValue, v) < 0) {
                  maxValue = v;
                }
              }
              tmp_1 = maxValue.c7(this.jol_1.b7y_1) > 0;
            } else {
              tmp_1 = false;
            }

            tmp_0.kol_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.col_1.gok_1.q7e().o7s(this.eol_1.n7t_1, this.fol_1, this.dol_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.lol_1 = suspendResult;
            var tmp_2;
            if (this.eol_1.q7t_1.equals(new Long(0, 0))) {
              tmp_2 = true;
            } else {
              var tmp_3 = this.eol_1.a7u_1;
              tmp_2 = tmp_3 === 1;
            }

            if (tmp_2) {
              var tmp_4 = this;
              var activeUserPersonXapiAgent = toXapiAgent(this.dol_1, this.col_1.hok_1);
              tmp_4.mol_1 = to(activeUserPersonXapiAgent, mapOf_0(to(identifierHash(activeUserPersonXapiAgent, this.col_1.kok_1), this.dol_1.f96_1)));
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.col_1.iok_1.fom(this.eol_1.q7t_1, this.lol_1.mb(), this.eol_1.f7u_1, this.eol_1.n7t_1, this.dol_1.f96_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.nol_1 = suspendResult;
            var tmp_5 = this;
            var it = this.nol_1;
            tmp_5.mol_1 = to(it.gom_1, it.hom_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.ool_1 = this.mol_1;
            this.pol_1 = this.ool_1.y6();
            this.qol_1 = this.ool_1.z6();
            if (this.eol_1.q7t_1.equals(new Long(0, 0))) {
              this.hd_1 = 5;
              suspendResult = this.col_1.gok_1.n7d().mg4(this.gol_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.col_1.iok_1.fom(this.eol_1.q7t_1, this.gol_1.mb(), this.eol_1.f7u_1, this.eol_1.n7t_1, this.dol_1.f96_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.sol_1 = suspendResult;
            var tmp_6 = this;
            var it_0 = this.sol_1;
            tmp_6.rol_1 = to(it_0.gom_1, it_0.hom_1);
            this.hd_1 = 6;
            continue $sm;
          case 5:
            this.tol_1 = suspendResult;
            this.uol_1 = this.tol_1 == null ? null : toXapiAgent(this.tol_1, this.col_1.hok_1);
            var tmp_7 = this;
            var tmp_8;
            if (this.uol_1 == null) {
              throw IllegalStateException_init_$Create$('Could not find person for ' + this.gol_1.toString());
            } else {
              tmp_8 = this.uol_1;
            }

            tmp_7.vol_1 = tmp_8;
            this.rol_1 = to(this.vol_1, mapOf_0(to(identifierHash(this.vol_1, this.col_1.kok_1), this.gol_1)));
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.wol_1 = this.rol_1;
            this.xol_1 = this.wol_1.y6();
            this.yol_1 = this.wol_1.z6();
            var tmp_9 = this;
            tmp_9.zol_1 = shallowCopy_1(this.hol_1, SubmitMarkUseCase$invoke$lambda(this.eol_1, this.gol_1, this.lol_1, this.dol_1, this.jol_1, this.fol_1, this.kol_1));
            var tmp_10 = this;
            var tmp4_viewName = 'CourseAssignment';
            var tmp5_learningSpace = this.col_1.hok_1.tnt_1;
            Companion_getInstance_125();
            var tmp_11 = to('clazzUid', this.fol_1.toString());
            Companion_getInstance_125();
            var tmp6_queryString = toQueryString(mapOf([tmp_11, to('entityUid', this.eol_1.n7t_1.toString())]));
            tmp_10.aom_1 = (new UstadUrlComponents(tmp5_learningSpace, tmp4_viewName, tmp6_queryString)).nom();
            var tmp_12 = this;
            var tmp7_verb = new XapiVerb(get_VERB_COMPLETED());
            var tmp8_object = new XapiActivityStatementObject(XapiObjectType_Activity_getInstance(), this.aom_1);
            var tmp9_context = new XapiContext(this.pol_1);
            var tmp10_result = new XapiResult(true, true, new Score(this.zol_1.lbw_1 / this.zol_1.mbw_1, this.zol_1.lbw_1, 0.0, this.zol_1.mbw_1));
            tmp_12.bom_1 = new XapiStatement(VOID, this.xol_1, tmp7_verb, tmp8_object, tmp10_result, tmp9_context);
            this.hd_1 = 7;
            suspendResult = withDoorTransactionAsync(this.col_1.gok_1, VOID, SubmitMarkUseCase$invoke$slambda_0(this.col_1, this.bom_1, this.dol_1, this.jol_1, this.qol_1, this.yol_1, this.fol_1, this.aom_1, this.zol_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, learningSpace, createXapiGroupUseCase, xapiStatementResource, xxStringHasher, json) {
    this.gok_1 = repo;
    this.hok_1 = learningSpace;
    this.iok_1 = createXapiGroupUseCase;
    this.jok_1 = xapiStatementResource;
    this.kok_1 = xxStringHasher;
    this.lok_1 = json;
  }
  protoOf(SubmitMarkUseCase).oom = function (activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion) {
    var tmp = new $invokeCOROUTINE$12(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.xom_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).con = function (value, $completion) {
    var tmp = this.don(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.con((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.aon_1 = this.xom_1;
            var tmp_1 = this;
            tmp_1.bon_1 = this.yom_1;
            var tmp0_safe_receiver = this.bon_1;
            if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1) == null)) {
              this.hd_1 = 3;
              suspendResult = this.aon_1.t1d(this.bon_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.zom_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).don = function (value, completion) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda(this.xom_1, completion);
    i.yom_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.con(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$14(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mon_1 = _this__u8e3s4;
    this.non_1 = collector;
  }
  protoOf($collectCOROUTINE$14).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.oon_1 = this.non_1;
            this.hd_1 = 1;
            var tmp_1 = GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0(this.oon_1, null);
            suspendResult = this.mon_1.pon_1.a1c(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.qon_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).t1d = function (value, $completion) {
    return this.qon_1(value, $completion);
  };
  function _no_name_provided__qut3iv($this) {
    this.pon_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv).ron = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$14(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv).a1c = function (collector, $completion) {
    return this.ron(collector, $completion);
  };
  function $invokeCOROUTINE$13(_this__u8e3s4, submitterUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.aoo_1 = _this__u8e3s4;
    this.boo_1 = submitterUid;
  }
  protoOf($invokeCOROUTINE$13).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.boo_1.c7(toLong(10000)) < 0) {
              var tmp_0 = this;
              tmp_0.coo_1 = this.aoo_1.eoo_1.joj(strings_getInstance().bng_1) + ' ' + this.boo_1.toString();
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var this_0 = this.aoo_1.doo_1.n7d().qg4(this.boo_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.zg8_1;
            tmp_1.coo_1 = '' + tmp_2 + ' ' + (it == null ? null : it.ag9_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.coo_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.doo_1 = repo;
    this.eoo_1 = systemImpl;
  }
  protoOf(GetAssignmentSubmitterNameUseCase).foo = function (submitterUid, $completion) {
    var tmp = new $invokeCOROUTINE$13(this, submitterUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function ZipFileUseCase() {
  }
  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.goo_1 = blobUrl;
    this.hoo_1 = transferJobItemUid;
    this.ioo_1 = lockIdToRelease;
    this.joo_1 = estimatedSize;
    this.koo_1 = partialResponseFile;
  }
  protoOf(BlobTransferJobItem).toString = function () {
    return 'BlobTransferJobItem(blobUrl=' + this.goo_1 + ', transferJobItemUid=' + this.hoo_1 + ', lockIdToRelease=' + this.ioo_1.toString() + ', estimatedSize=' + toString_0(this.joo_1) + ', partialResponseFile=' + this.koo_1 + ')';
  };
  protoOf(BlobTransferJobItem).hashCode = function () {
    var result = getStringHashCode(this.goo_1);
    result = imul(result, 31) + this.hoo_1 | 0;
    result = imul(result, 31) + this.ioo_1.hashCode() | 0;
    result = imul(result, 31) + (this.joo_1 == null ? 0 : this.joo_1.hashCode()) | 0;
    result = imul(result, 31) + (this.koo_1 == null ? 0 : getStringHashCode(this.koo_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.goo_1 === tmp0_other_with_cast.goo_1))
      return false;
    if (!(this.hoo_1 === tmp0_other_with_cast.hoo_1))
      return false;
    if (!this.ioo_1.equals(tmp0_other_with_cast.ioo_1))
      return false;
    if (!equals(this.joo_1, tmp0_other_with_cast.joo_1))
      return false;
    if (!(this.koo_1 == tmp0_other_with_cast.koo_1))
      return false;
    return true;
  };
  function BlobTransferProgressUpdate(transferItem, bytesTransferred) {
    this.loo_1 = transferItem;
    this.moo_1 = bytesTransferred;
  }
  protoOf(BlobTransferProgressUpdate).toString = function () {
    return 'Uid #' + this.loo_1.hoo_1 + ' transferred=' + this.moo_1.toString() + ' bytes';
  };
  protoOf(BlobTransferProgressUpdate).hashCode = function () {
    var result = this.loo_1.hashCode();
    result = imul(result, 31) + this.moo_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.loo_1.equals(tmp0_other_with_cast.loo_1))
      return false;
    if (!this.moo_1.equals(tmp0_other_with_cast.moo_1))
      return false;
    return true;
  };
  function BlobTransferStatusUpdate(transferItem, status) {
    this.noo_1 = transferItem;
    this.ooo_1 = status;
  }
  protoOf(BlobTransferStatusUpdate).toString = function () {
    return 'BlobTransferStatusUpdate(transferItem=' + this.noo_1 + ', status=' + this.ooo_1 + ')';
  };
  protoOf(BlobTransferStatusUpdate).hashCode = function () {
    var result = this.noo_1.hashCode();
    result = imul(result, 31) + this.ooo_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.noo_1.equals(tmp0_other_with_cast.noo_1))
      return false;
    if (!(this.ooo_1 === tmp0_other_with_cast.ooo_1))
      return false;
    return true;
  };
  function CancelDownloadUseCase() {
  }
  function MakeContentEntryAvailableOfflineUseCase(repo, nodeIdAndAuth, enqueueContentManifestDownloadUseCase) {
    this.poo_1 = repo;
    this.qoo_1 = nodeIdAndAuth;
    this.roo_1 = enqueueContentManifestDownloadUseCase;
  }
  function OpenBlobItem(uri, mimeType, fileName, fileSize) {
    this.soo_1 = uri;
    this.too_1 = mimeType;
    this.uoo_1 = fileName;
    this.voo_1 = fileSize;
  }
  protoOf(OpenBlobItem).toString = function () {
    return 'OpenBlobItem(uri=' + this.soo_1 + ', mimeType=' + this.too_1 + ', fileName=' + this.uoo_1 + ', fileSize=' + this.voo_1.toString() + ')';
  };
  protoOf(OpenBlobItem).hashCode = function () {
    var result = getStringHashCode(this.soo_1);
    result = imul(result, 31) + getStringHashCode(this.too_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.uoo_1) | 0;
    result = imul(result, 31) + this.voo_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.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.equals(tmp0_other_with_cast.voo_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$16(_this__u8e3s4, openItem, onUiUpdate, intent, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.eop_1 = _this__u8e3s4;
    this.fop_1 = openItem;
    this.gop_1 = onUiUpdate;
    this.hop_1 = intent;
  }
  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 = 4;
            this.gop_1(new OpeningBlobState(this.fop_1, new Long(0, 0), new Long(0, 0)));
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.eop_1.iop_1.kop(this.fop_1, OpenBlobUiUseCase$invoke$lambda(this.gop_1, this.fop_1), this.hop_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gop_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().m5e('OpenBlobUiCase: could not open ' + this.fop_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.gop_1(new OpeningBlobState(this.fop_1, tmp_1, tmp_2, tmp0_elvis_lhs == null ? this.eop_1.jop_1.joj(strings_getInstance().qmi_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.iop_1 = openBlobUseCase;
    this.jop_1 = systemImpl;
  }
  protoOf(OpenBlobUiUseCase).lop = function (openItem, onUiUpdate, intent, $completion) {
    var tmp = new $invokeCOROUTINE$16(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.mop_1 = item;
    this.nop_1 = bytesReady;
    this.oop_1 = totalBytes;
    this.pop_1 = error;
  }
  protoOf(OpeningBlobState).toString = function () {
    return 'OpeningBlobState(item=' + this.mop_1 + ', bytesReady=' + this.nop_1.toString() + ', totalBytes=' + this.oop_1.toString() + ', error=' + this.pop_1 + ')';
  };
  protoOf(OpeningBlobState).hashCode = function () {
    var result = this.mop_1.hashCode();
    result = imul(result, 31) + this.nop_1.hashCode() | 0;
    result = imul(result, 31) + this.oop_1.hashCode() | 0;
    result = imul(result, 31) + (this.pop_1 == null ? 0 : getStringHashCode(this.pop_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.mop_1.equals(tmp0_other_with_cast.mop_1))
      return false;
    if (!this.nop_1.equals(tmp0_other_with_cast.nop_1))
      return false;
    if (!this.oop_1.equals(tmp0_other_with_cast.oop_1))
      return false;
    if (!(this.pop_1 == tmp0_other_with_cast.pop_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.yop_1 = $blobs;
    this.zop_1 = $this_updateUris;
    this.aoq_1 = $timeNow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).uny = function (_anonymous_parameter_0__qggqh8, $completion) {
    var tmp = this.vny(_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.uny(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.coq_1 = this.yop_1;
            this.doq_1 = this.coq_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.doq_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.eoq_1 = this.doq_1.e();
            var tmp_1 = this;
            tmp_1.foq_1 = this.eoq_1;
            this.goq_1 = this.foq_1.ioq_1;
            if (this.goq_1 === 90) {
              this.hd_1 = 2;
              suspendResult = this.zop_1.s7e().dca(this.foq_1.hoq_1, this.foq_1.koq_1, this.aoq_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).vny = function (_anonymous_parameter_0__qggqh8, completion) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda(this.yop_1, this.zop_1, this.aoq_1, completion);
    i.boq_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.uny(_anonymous_parameter_0__qggqh8, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$17(_this__u8e3s4, localUrisToSave, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xoq_1 = _this__u8e3s4;
    this.yoq_1 = localUrisToSave;
  }
  protoOf($invokeCOROUTINE$17).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.xoq_1.bor_1.for(this.yoq_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zoq_1 = suspendResult;
            this.aor_1 = this.xoq_1.cor_1;
            if (!(this.aor_1 == null)) {
              this.hd_1 = 3;
              suspendResult = updateUris(this.xoq_1.dor_1, this.xoq_1, this.zoq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              var tmp0_elvis_lhs = this.xoq_1.eor_1;
              suspendResult = updateUris(tmp0_elvis_lhs == null ? this.xoq_1.dor_1 : tmp0_elvis_lhs, this.xoq_1, this.zoq_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.zoq_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.koq_1;
              var tmp1_entityUid = item.hoq_1;
              var tmp2_tableId = item.ioq_1;
              var tmp3_retentionLockIdToRelease = item.loq_1;
              destination.i1(new EnqueueBlobUploadItem(tmp0_blobUrl, tmp2_tableId, tmp1_entityUid, tmp3_retentionLockIdToRelease));
            }

            suspendResult = this.aor_1.gor(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.bor_1 = saveLocalUrisAsBlobsUseCase;
    this.cor_1 = enqueueBlobUploadClientUseCase;
    this.dor_1 = activeDb;
    this.eor_1 = activeRepo;
  }
  protoOf(SaveAndUploadLocalUrisUseCase).hor = function (localUrisToSave, $completion) {
    var tmp = new $invokeCOROUTINE$17(this, localUrisToSave, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_33() {
  }
  protoOf(Companion_33).n4r = function () {
    return $serializer_getInstance_44();
  };
  var Companion_instance_82;
  function Companion_getInstance_50() {
    return Companion_instance_82;
  }
  function $serializer_32() {
    $serializer_instance_32 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.blob.savelocaluris.SaveLocalUrisAsBlobsUseCase.SavedBlob', this, 8);
    tmp0_serialDesc.t4f('entityUid', false);
    tmp0_serialDesc.t4f('tableId', false);
    tmp0_serialDesc.t4f('localUri', false);
    tmp0_serialDesc.t4f('blobUrl', false);
    tmp0_serialDesc.t4f('retentionLockId', true);
    tmp0_serialDesc.t4f('integrity', false);
    tmp0_serialDesc.t4f('mimeType', false);
    tmp0_serialDesc.t4f('storageSize', false);
    this.ior_1 = tmp0_serialDesc;
  }
  protoOf($serializer_32).q44 = function () {
    return this.ior_1;
  };
  protoOf($serializer_32).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.ior_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.i48(tmp0_desc);
    if (tmp12_input.x48()) {
      tmp4_local0 = tmp12_input.o48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.o48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.s48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.s48(tmp0_desc, 6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.o48(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.o48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.o48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.s48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.s48(tmp0_desc, 6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.o48(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.j48(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).jor = function (encoder, value) {
    var tmp0_desc = this.ior_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.s49(tmp0_desc, 0, value.hoq_1);
    tmp1_output.r49(tmp0_desc, 1, value.ioq_1);
    tmp1_output.w49(tmp0_desc, 2, value.joq_1);
    tmp1_output.w49(tmp0_desc, 3, value.koq_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !value.loq_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 4, value.loq_1);
    }
    tmp1_output.w49(tmp0_desc, 5, value.moq_1);
    tmp1_output.w49(tmp0_desc, 6, value.noq_1);
    tmp1_output.s49(tmp0_desc, 7, value.ooq_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_32).r44 = function (encoder, value) {
    return this.jor(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().ior_1);
    }
    $this.hoq_1 = entityUid;
    $this.ioq_1 = tableId;
    $this.joq_1 = localUri;
    $this.koq_1 = blobUrl;
    if (0 === (seen1 & 16))
      $this.loq_1 = new Long(0, 0);
    else
      $this.loq_1 = retentionLockId;
    $this.moq_1 = integrity;
    $this.noq_1 = mimeType;
    $this.ooq_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_139.b4e() : extraHeaders;
    this.kor_1 = localUri;
    this.lor_1 = entityUid;
    this.mor_1 = tableId;
    this.nor_1 = mimeType;
    this.oor_1 = deleteLocalUriAfterSave;
    this.por_1 = createRetentionLock;
    this.qor_1 = extraHeaders;
  }
  protoOf(SaveLocalUriAsBlobItem).toString = function () {
    return 'SaveLocalUriAsBlobItem(localUri=' + this.kor_1 + ', entityUid=' + this.lor_1.toString() + ', tableId=' + this.mor_1 + ', mimeType=' + this.nor_1 + ', deleteLocalUriAfterSave=' + this.oor_1 + ', createRetentionLock=' + this.por_1 + ', extraHeaders=' + this.qor_1 + ')';
  };
  protoOf(SaveLocalUriAsBlobItem).hashCode = function () {
    var result = getStringHashCode(this.kor_1);
    result = imul(result, 31) + this.lor_1.hashCode() | 0;
    result = imul(result, 31) + this.mor_1 | 0;
    result = imul(result, 31) + (this.nor_1 == null ? 0 : getStringHashCode(this.nor_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oor_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.por_1) | 0;
    result = imul(result, 31) + hashCode(this.qor_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.kor_1 === tmp0_other_with_cast.kor_1))
      return false;
    if (!this.lor_1.equals(tmp0_other_with_cast.lor_1))
      return false;
    if (!(this.mor_1 === tmp0_other_with_cast.mor_1))
      return false;
    if (!(this.nor_1 == tmp0_other_with_cast.nor_1))
      return false;
    if (!(this.oor_1 === tmp0_other_with_cast.oor_1))
      return false;
    if (!(this.por_1 === tmp0_other_with_cast.por_1))
      return false;
    if (!equals(this.qor_1, tmp0_other_with_cast.qor_1))
      return false;
    return true;
  };
  function SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    retentionLockId = retentionLockId === VOID ? new Long(0, 0) : retentionLockId;
    this.hoq_1 = entityUid;
    this.ioq_1 = tableId;
    this.joq_1 = localUri;
    this.koq_1 = blobUrl;
    this.loq_1 = retentionLockId;
    this.moq_1 = integrity;
    this.noq_1 = mimeType;
    this.ooq_1 = storageSize;
  }
  protoOf(SavedBlob).ror = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    return new SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).sor = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, $super) {
    entityUid = entityUid === VOID ? this.hoq_1 : entityUid;
    tableId = tableId === VOID ? this.ioq_1 : tableId;
    localUri = localUri === VOID ? this.joq_1 : localUri;
    blobUrl = blobUrl === VOID ? this.koq_1 : blobUrl;
    retentionLockId = retentionLockId === VOID ? this.loq_1 : retentionLockId;
    integrity = integrity === VOID ? this.moq_1 : integrity;
    mimeType = mimeType === VOID ? this.noq_1 : mimeType;
    storageSize = storageSize === VOID ? this.ooq_1 : storageSize;
    return $super === VOID ? this.ror(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) : $super.ror.call(this, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).toString = function () {
    return 'SavedBlob(entityUid=' + this.hoq_1.toString() + ', tableId=' + this.ioq_1 + ', localUri=' + this.joq_1 + ', blobUrl=' + this.koq_1 + ', retentionLockId=' + this.loq_1.toString() + ', integrity=' + this.moq_1 + ', mimeType=' + this.noq_1 + ', storageSize=' + this.ooq_1.toString() + ')';
  };
  protoOf(SavedBlob).hashCode = function () {
    var result = this.hoq_1.hashCode();
    result = imul(result, 31) + this.ioq_1 | 0;
    result = imul(result, 31) + getStringHashCode(this.joq_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.koq_1) | 0;
    result = imul(result, 31) + this.loq_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.moq_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.noq_1) | 0;
    result = imul(result, 31) + this.ooq_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.hoq_1.equals(tmp0_other_with_cast.hoq_1))
      return false;
    if (!(this.ioq_1 === tmp0_other_with_cast.ioq_1))
      return false;
    if (!(this.joq_1 === tmp0_other_with_cast.joq_1))
      return false;
    if (!(this.koq_1 === tmp0_other_with_cast.koq_1))
      return false;
    if (!this.loq_1.equals(tmp0_other_with_cast.loq_1))
      return false;
    if (!(this.moq_1 === tmp0_other_with_cast.moq_1))
      return false;
    if (!(this.noq_1 === tmp0_other_with_cast.noq_1))
      return false;
    if (!this.ooq_1.equals(tmp0_other_with_cast.ooq_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.f7e();
    } else {
      if (tableId === 125) {
        tmp = _this__u8e3s4.d7f();
      } else {
        if (tableId === 6677) {
          tmp = _this__u8e3s4.q7f();
        } else {
          if (tableId === 6678) {
            tmp = _this__u8e3s4.r7f();
          } else {
            tmp = null;
          }
        }
      }
    }
    return tmp;
  }
  function Companion_34() {
    this.vor_1 = 160;
  }
  var Companion_instance_83;
  function Companion_getInstance_51() {
    return Companion_instance_83;
  }
  function $invokeCOROUTINE$18(_this__u8e3s4, entityUid, tableId, pictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.eos_1 = _this__u8e3s4;
    this.fos_1 = entityUid;
    this.gos_1 = tableId;
    this.hos_1 = pictureUri;
  }
  protoOf($invokeCOROUTINE$18).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.hos_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.ios_1 = Companion_getInstance_3().o2r(this.hos_1);
              this.jos_1 = this.eos_1.qot_1;
              if (this.jos_1 == null) {
                this.kos_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                suspendResult = getLocalUriIfRemote(this.jos_1, this.ios_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              var tmp_2 = this;
              var tmp12_elvis_lhs = this.eos_1.not_1;
              tmp_2.los_1 = imageDaoForTable(tmp12_elvis_lhs == null ? this.eos_1.mot_1 : tmp12_elvis_lhs, this.eos_1, this.gos_1);
              if (this.los_1 == null) {
                this.mos_1 = null;
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.los_1.ubi(this.fos_1, null, null, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp_3 = this;
            tmp_3.mos_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 20;
            continue $sm;
          case 3:
            this.kos_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.nos_1 = this.kos_1;
            this.oos_1 = this.nos_1 == null ? this.ios_1 : this.nos_1;
            this.hd_1 = 5;
            suspendResult = this.eos_1.oot_1.rot(this.oos_1.toString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.pos_1 = suspendResult;
            this.hd_1 = 6;
            suspendResult = this.eos_1.oot_1.rot(this.oos_1.toString(), VOID, new CompressParams(160, 160), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.qos_1 = suspendResult;
            this.ros_1 = this.eos_1.kot_1;
            var tmp_4 = this;
            tmp_4.sos_1 = ArrayList_init_$Create$();
            var tmp_5 = this;
            tmp_5.tos_1 = this.sos_1;
            if (this.pos_1 == null)
              null;
            else {
              this.tos_1.i1(new SaveLocalUriAsBlobItem(this.pos_1.sot_1, this.fos_1, this.gos_1, this.pos_1.tot_1, true, true));
            }

            if (this.qos_1 == null)
              null;
            else {
              this.tos_1.i1(new SaveLocalUriAsBlobItem(this.qos_1.sot_1, this.fos_1, this.gos_1, this.qos_1.tot_1, true, true));
            }

            if (this.pos_1 == null ? true : this.qos_1 == null) {
              this.hd_1 = 7;
              suspendResult = isRemote(this.ios_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.uos_1 = false;
              this.hd_1 = 8;
              continue $sm;
            }

          case 7:
            this.vos_1 = suspendResult;
            this.uos_1 = !this.vos_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.wos_1 = this.uos_1;
            if (this.wos_1) {
              this.tos_1.i1(new SaveLocalUriAsBlobItem(this.hos_1, this.fos_1, this.gos_1, VOID, VOID, true));
            }

            this.xos_1 = this.sos_1;
            this.yos_1 = this.xos_1.f3();
            this.hd_1 = 9;
            suspendResult = this.ros_1.for(this.yos_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.zos_1 = suspendResult;
            this.hd_1 = 10;
            suspendResult = this.eos_1.pot_1.wot(listOf_0(this.hos_1), true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.zos_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.joq_1 === this.hos_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.koq_1;
            tmp_6.aot_1 = tmp4_elvis_lhs == null ? this.ios_1.toString() : tmp4_elvis_lhs;
            var tmp_7 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_0 = this.zos_1.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver_0 = this.pos_1;
                if (element_0.joq_1 === (tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.sot_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.koq_1;
            tmp_7.bot_1 = tmp6_elvis_lhs == null ? this.aot_1 : tmp6_elvis_lhs;
            var tmp_8 = this;
            var tmp$ret$4;
            l$ret$5: do {
              var tmp0_iterator_1 = this.zos_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp0_safe_receiver_1 = this.qos_1;
                if (element_1.joq_1 === (tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.sot_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.koq_1;
            tmp_8.cot_1 = tmp8_elvis_lhs == null ? this.aot_1 : tmp8_elvis_lhs;
            if (!(this.eos_1.lot_1 == null)) {
              if (this.pos_1 == null ? true : this.qos_1 == null) {
                this.hd_1 = 13;
                suspendResult = isRemote(this.ios_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.eot_1 = false;
                this.hd_1 = 14;
                continue $sm;
              }
            } else {
              var tmp_9 = this;
              var tmp10_elvis_lhs = this.eos_1.not_1;
              tmp_9.fot_1 = imageDaoForTable(tmp10_elvis_lhs == null ? this.eos_1.mot_1 : tmp10_elvis_lhs, this.eos_1, this.gos_1);
              if (this.fot_1 == null) {
                this.got_1 = null;
                this.hd_1 = 12;
                continue $sm;
              } else {
                this.hd_1 = 11;
                suspendResult = this.fot_1.ubi(this.fos_1, this.bot_1, this.cot_1, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 11:
            var tmp_10 = this;
            tmp_10.got_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.hd_1 = 19;
            continue $sm;
          case 13:
            this.eot_1 = suspendResult;
            this.hd_1 = 14;
            continue $sm;
          case 14:
            if (this.eot_1) {
              var tmp_11 = this;
              tmp_11.dot_1 = new EnqueueBlobUploadItem(this.ios_1.toString(), this.gos_1, this.fos_1, new Long(0, 0));
              this.hd_1 = 15;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.dot_1 = null;
              this.hd_1 = 15;
              continue $sm;
            }

          case 15:
            this.hot_1 = this.dot_1;
            this.iot_1 = imageDaoForTable(this.eos_1.mot_1, this.eos_1, this.gos_1);
            if (this.iot_1 == null) {
              this.jot_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              this.hd_1 = 16;
              suspendResult = this.iot_1.ubi(this.fos_1, this.bot_1, this.cot_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            var tmp_13 = this;
            tmp_13.jot_1 = Unit_instance;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            Napier_getInstance().i5e('SavePictureUseCase: Set picture url = ' + this.bot_1 + ' on entity=' + this.fos_1.toString() + ' table=' + this.gos_1);
            this.hd_1 = 18;
            var this_0 = this.zos_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.koq_1, this.gos_1, this.fos_1, item.loq_1));
            }

            var this_1 = listOf_0(this.hot_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.eos_1.lot_1.gor(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.kot_1 = saveLocalUrisAsBlobUseCase;
    this.lot_1 = enqueueBlobUploadClientUseCase;
    this.mot_1 = db;
    this.not_1 = repo;
    this.oot_1 = compressImageUseCase;
    this.pot_1 = deleteUrisUseCase;
    this.qot_1 = getStoragePathForUrlUseCase;
  }
  protoOf(SavePictureUseCase).uor = function (entityUid, tableId, pictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$18(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.fou_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.gou_1)) {
              this.hd_1 = 4;
              continue $sm;
            }

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

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.fou_1.oou(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.fou_1, completion);
    i.gou_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.xou_1 = $progressUpdatesToCommit;
    this.you_1 = this$0;
    this.zou_1 = $statusUpdatesToCommit;
    this.aov_1 = $repoNodeId;
    this.bov_1 = $updateTransferJobStatusUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$commit$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).he = function (p1, $completion) {
    return this.uny(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.dov_1 = this.xou_1;
            this.eov_1 = this.dov_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.eov_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.fov_1 = this.eov_1.e();
            var tmp_1 = this;
            tmp_1.gov_1 = this.fov_1;
            this.hd_1 = 2;
            suspendResult = this.you_1.hou_1.k7f().vie(this.gov_1.loo_1.hoo_1, this.gov_1.moo_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.hov_1 = this.zou_1;
            this.iov_1 = this.hov_1.w();
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (!this.iov_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.jov_1 = this.iov_1.e();
            var tmp_3 = this;
            tmp_3.kov_1 = this.jov_1;
            this.hd_1 = 5;
            suspendResult = this.you_1.hou_1.k7f().wie(this.kov_1.noo_1.hoo_1, this.kov_1.ooo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            if (this.kov_1.ooo_1 === TransferJobItemStatus_COMPLETE_getInstance().qkb_1 ? !(this.aov_1 == null) : false) {
              this.hd_1 = 6;
              suspendResult = this.you_1.hou_1.k7f().xie(this.aov_1, this.kov_1.noo_1.hoo_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.bov_1 === 0)) {
              this.hd_1 = 9;
              suspendResult = this.you_1.hou_1.j7f().lic(this.bov_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.k5e(VOID, VOID, TransferJobItemStatusUpdater$commit$slambda$lambda(this.bov_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).vny = function (it, completion) {
    var i = new TransferJobItemStatusUpdater$commit$slambda(this.xou_1, this.you_1, this.zou_1, this.aov_1, this.bov_1, completion);
    i.cov_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $commitCOROUTINE$19(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tov_1 = _this__u8e3s4;
    this.uov_1 = updateTransferJobStatusUid;
  }
  protoOf($commitCOROUTINE$19).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.vov_1 = this.tov_1.lou_1.atomicfu$getAndSet(emptyList());
            this.wov_1 = this.tov_1.mou_1.atomicfu$getAndSet(emptyList());
            var tmp_0 = this;
            var this_0 = this.vov_1;
            var map = LinkedHashMap_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var key = element.loo_1.hoo_1;
              map.s(key, element);
            }

            tmp_0.xov_1 = toList(map.p2());
            var tmp_1 = this;
            var this_1 = this.wov_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.noo_1.hoo_1;
              map_0.s(key_0, element_0);
            }

            tmp_1.yov_1 = toList(map_0.p2());
            var tmp_2 = this;
            var tmp_3 = this.tov_1.iou_1;
            var tmp0_safe_receiver = (!(tmp_3 == null) ? isInterface(tmp_3, DoorDatabaseRepository) : false) ? tmp_3 : null;
            tmp_2.zov_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m61();
            var tmp_4 = this;
            var this_2 = this.tov_1.hou_1;
            var tmp_5;
            var tmp_6;
            var tmp_7;
            if (!this.xov_1.c1()) {
              tmp_7 = true;
            } else {
              tmp_7 = !this.yov_1.c1();
            }

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

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

            tmp_4.aow_1 = tmp_5;
            if (this.aow_1 == null) {
              this.bow_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = withDoorTransactionAsync(this.aow_1, VOID, TransferJobItemStatusUpdater$commit$slambda_0(this.xov_1, this.tov_1, this.yov_1, this.zov_1, this.uov_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_8 = this;
            tmp_8.bow_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$20(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kow_1 = _this__u8e3s4;
    this.low_1 = updateTransferJobStatusUid;
  }
  protoOf($onFinishedCOROUTINE$20).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.kow_1.kou_1.atomicfu$getAndSet(true)) {
              this.kow_1.nou_1.mr();
              this.hd_1 = 1;
              suspendResult = this.kow_1.mow(this.low_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.hou_1 = db;
    this.iou_1 = repo;
    this.jou_1 = commitInterval;
    this.kou_1 = atomic$boolean$1(false);
    this.lou_1 = atomic$ref$1(emptyList());
    this.mou_1 = atomic$ref$1(emptyList());
    var tmp = this;
    tmp.nou_1 = launch(scope, VOID, VOID, TransferJobItemStatusUpdater$updateJob$slambda_0(this, null));
  }
  protoOf(TransferJobItemStatusUpdater).now = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.lou_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).oow = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.mou_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).mow = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $commitCOROUTINE$19(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).oou = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.mow(updateTransferJobStatusUid, $completion) : $super.mow.call(this, updateTransferJobStatusUid, $completion);
  };
  protoOf(TransferJobItemStatusUpdater).pow = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $onFinishedCOROUTINE$20(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).qow = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.pow(updateTransferJobStatusUid, $completion) : $super.pow.call(this, updateTransferJobStatusUid, $completion);
  };
  function $invokeCOROUTINE$21(_this__u8e3s4, db, tableId, entityUid, transferJobItemUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zow_1 = _this__u8e3s4;
    this.aox_1 = db;
    this.box_1 = tableId;
    this.cox_1 = entityUid;
    this.dox_1 = transferJobItemUid;
  }
  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 = 4;
            this.eox_1 = this.box_1;
            if (this.eox_1 === 50) {
              this.hd_1 = 2;
              suspendResult = this.aox_1.f7e().ibq(this.cox_1, this.dox_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.eox_1 === 738) {
                this.hd_1 = 1;
                suspendResult = this.aox_1.i7f().ibq(this.cox_1, this.dox_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).fox = function (db, tableId, entityUid, transferJobItemUid, $completion) {
    var tmp = new $invokeCOROUTINE$21(this, db, tableId, entityUid, transferJobItemUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_35() {
    this.gox_1 = 'X-Blob-Response-';
    this.hox_1 = 'Blob-Upload-Batch-Uuid';
  }
  var Companion_instance_84;
  function Companion_getInstance_52() {
    return Companion_instance_84;
  }
  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.iox_1 = blobUrl;
    this.jox_1 = tableId;
    this.kox_1 = entityUid;
    this.lox_1 = retentionLockIdToRelease;
  }
  protoOf(EnqueueBlobUploadItem).toString = function () {
    return 'EnqueueBlobUploadItem(blobUrl=' + this.iox_1 + ', tableId=' + this.jox_1 + ', entityUid=' + this.kox_1.toString() + ', retentionLockIdToRelease=' + this.lox_1.toString() + ')';
  };
  protoOf(EnqueueBlobUploadItem).hashCode = function () {
    var result = getStringHashCode(this.iox_1);
    result = imul(result, 31) + this.jox_1 | 0;
    result = imul(result, 31) + this.kox_1.hashCode() | 0;
    result = imul(result, 31) + this.lox_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.iox_1 === tmp0_other_with_cast.iox_1))
      return false;
    if (!(this.jox_1 === tmp0_other_with_cast.jox_1))
      return false;
    if (!this.kox_1.equals(tmp0_other_with_cast.kox_1))
      return false;
    if (!this.lox_1.equals(tmp0_other_with_cast.lox_1))
      return false;
    return true;
  };
  function EnqueueBlobUploadClientUseCase() {
  }
  function getLocalUriIfRemote(_this__u8e3s4, uri, $completion) {
    var tmp = new $getLocalUriIfRemoteCOROUTINE$22(_this__u8e3s4, uri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $getLocalUriIfRemoteCOROUTINE$22(_this__u8e3s4, uri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vox_1 = _this__u8e3s4;
    this.wox_1 = uri;
  }
  protoOf($getLocalUriIfRemoteCOROUTINE$22).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.wox_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (suspendResult) {
              this.yox_1 = Companion_getInstance_3();
              this.hd_1 = 2;
              suspendResult = this.vox_1.zox(this.wox_1.toString(), VOID, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.xox_1 = this.wox_1;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = ARGUMENT.aoy_1;
            this.xox_1 = this.yox_1.o2r(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.xox_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.loy_1 = $clazz;
    this.moy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CreateNewClazzUseCase$invoke$slambda).fok = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fok(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.loy_1;
            var tmp_0;
            if (this_0.o8e_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.o8e_1 = randomString(6);
            }

            this.hd_1 = 1;
            suspendResult = this.moy_1.poy_1.o7d().insertAsync(this.loy_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ooy_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = this.moy_1.poy_1.o7f();
            var tmp_3 = this.loy_1.r8d_1;
            Companion_getInstance_5();
            suspendResult = tmp_2.ddk(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.moy_1.poy_1.o7f();
            var tmp_5 = this.loy_1.r8d_1;
            Companion_getInstance_5();
            suspendResult = tmp_4.ddk(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.ooy_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).vny = function (it, completion) {
    var i = new CreateNewClazzUseCase$invoke$slambda(this.loy_1, this.moy_1, completion);
    i.noy_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.fok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CreateNewClazzUseCase(repoOrDb) {
    this.poy_1 = repoOrDb;
  }
  protoOf(CreateNewClazzUseCase).qoy = function (clazz, $completion) {
    return withDoorTransactionAsync(this.poy_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.zoy_1 = $approved;
    this.aoz_1 = this$0;
    this.boz_1 = $enrolmentRequest;
    this.coz_1 = $effectiveClazz;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.uny(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.zoy_1) {
              this.hd_1 = 1;
              var tmp_0 = this.boz_1.ley_1;
              var tmp_1 = this.boz_1.ney_1;
              var tmp_2 = ClazzEnrolment_init_$Create$(tmp_0, tmp_1, 1000);
              var tmp0_elvis_lhs = this.coz_1.j8e_1;
              suspendResult = this.aoz_1.ioz_1.loz(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.eoz_1 = 3;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var tmp_4 = this;
            tmp_4.eoz_1 = 2;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.foz_1 = this.eoz_1;
            this.hd_1 = 3;
            var tmp1_elvis_lhs = this.aoz_1.hoz_1;
            suspendResult = (tmp1_elvis_lhs == null ? this.aoz_1.goz_1 : tmp1_elvis_lhs).n7f().uex(this.boz_1.key_1, this.foz_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).vny = function (it, completion) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda(this.zoy_1, this.aoz_1, this.boz_1, this.coz_1, completion);
    i.doz_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$23(_this__u8e3s4, enrolmentRequest, approved, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.uoz_1 = _this__u8e3s4;
    this.voz_1 = enrolmentRequest;
    this.woz_1 = approved;
  }
  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 = 3;
            this.hd_1 = 1;
            suspendResult = this.uoz_1.goz_1.o7d().s8c(this.voz_1.ley_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.yoz_1 = tmp_1;
            this.hd_1 = 2;
            var tmp1_elvis_lhs = this.uoz_1.hoz_1;
            var tmp_2 = tmp1_elvis_lhs == null ? this.uoz_1.goz_1 : tmp1_elvis_lhs;
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0(this.woz_1, this.uoz_1, this.voz_1, this.yoz_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.goz_1 = db;
    this.hoz_1 = repo;
    this.ioz_1 = enrolIntoCourseUseCase;
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase).zoz = function (enrolmentRequest, approved, $completion) {
    var tmp = new $invokeCOROUTINE$23(this, enrolmentRequest, approved, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation) {
    this.ip0_1 = $effectiveDb;
    this.jp0_1 = $enrolment;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).fok = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fok(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.ip0_1.t7d().insertAsync(this.jp0_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).vny = function (it, completion) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda(this.ip0_1, this.jp0_1, completion);
    i.kp0_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.fok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$24(_this__u8e3s4, enrolment, timeZoneId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tp0_1 = _this__u8e3s4;
    this.up0_1 = enrolment;
    this.vp0_1 = timeZoneId;
  }
  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 = 3;
            this.hd_1 = 1;
            var tmp0_elvis_lhs = this.tp0_1.koz_1;
            suspendResult = (tmp0_elvis_lhs == null ? this.tp0_1.joz_1 : tmp0_elvis_lhs).t7d().i93(this.up0_1.d8i_1, this.up0_1.c8i_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wp0_1 = suspendResult;
            if (!this.wp0_1.c1()) {
              throw new AlreadyEnroledInClassException();
            }

            this.up0_1.e8i_1 = toLocalMidnight(Companion_getInstance_6().fmh(this.up0_1.e8i_1), this.vp0_1).emh();
            if (this.up0_1.f8i_1.c7(get_UNSET_DISTANT_FUTURE()) < 0) {
              this.up0_1.f8i_1 = toLocalEndOfDay(Companion_getInstance_6().fmh(this.up0_1.f8i_1), this.vp0_1).emh();
            }

            var tmp_0 = this;
            var tmp1_elvis_lhs = this.tp0_1.koz_1;
            tmp_0.xp0_1 = tmp1_elvis_lhs == null ? this.tp0_1.joz_1 : tmp1_elvis_lhs;
            this.hd_1 = 2;
            suspendResult = withDoorTransactionAsync(this.xp0_1, VOID, EnrolIntoCourseUseCase$invoke$slambda_0(this.xp0_1, this.up0_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 EnrolIntoCourseUseCase(db, repo) {
    this.joz_1 = db;
    this.koz_1 = repo;
  }
  protoOf(EnrolIntoCourseUseCase).loz = function (enrolment, timeZoneId, $completion) {
    var tmp = new $invokeCOROUTINE$24(this, enrolment, timeZoneId, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function IApproveOrDeclinePendingEnrolmentRequestUseCase() {
  }
  function $invokeCOROUTINE$25(_this__u8e3s4, clazzCode, person, roleId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gp1_1 = _this__u8e3s4;
    this.hp1_1 = clazzCode;
    this.ip1_1 = person;
    this.jp1_1 = roleId;
  }
  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 = 7;
            this.hd_1 = 1;
            suspendResult = this.gp1_1.np1_1.o7d().r8c(this.hp1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.lp1_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = this.gp1_1.np1_1.n7f().sex(this.ip1_1.f96_1, this.lp1_1.r8d_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.gp1_1.np1_1.t7d().i93(this.lp1_1.r8d_1, this.ip1_1.f96_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

          case 5:
            this.hd_1 = 6;
            var tmp_2 = this.gp1_1.np1_1.n7f();
            var tmp_3 = this.lp1_1.r8d_1;
            var tmp_4 = this.lp1_1.s8d_1;
            var tmp_5 = this.ip1_1.f96_1;
            var tmp_6 = this.ip1_1.ckr();
            var tmp_7 = this.ip1_1.g96_1;
            var tmp_8 = systemTimeInMillis();
            suspendResult = tmp_2.rex(new EnrolmentRequest(VOID, tmp_3, tmp_4, tmp_5, tmp_6, VOID, tmp_7, this.jp1_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.np1_1 = activeRepo;
  }
  protoOf(RequestEnrolmentUseCase).op1 = function (clazzCode, person, roleId, $completion) {
    var tmp = new $invokeCOROUTINE$25(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_85;
  function Companion_getInstance_53() {
    return Companion_instance_85;
  }
  function $serializer_33() {
    $serializer_instance_33 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.compress.CompressParams', this, 3);
    tmp0_serialDesc.t4f('maxWidth', true);
    tmp0_serialDesc.t4f('maxHeight', true);
    tmp0_serialDesc.t4f('compressionLevel', true);
    this.qp1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_33).q44 = function () {
    return this.qp1_1;
  };
  protoOf($serializer_33).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.qp1_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.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return CompressParams_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_33).rp1 = function (encoder, value) {
    var tmp0_desc = this.qp1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.sp1_1 === 1280)) {
      tmp1_output.r49(tmp0_desc, 0, value.sp1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.tp1_1 === 1280)) {
      tmp1_output.r49(tmp0_desc, 1, value.tp1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !value.up1_1.equals(CompressionLevel_MEDIUM_getInstance())) {
      tmp1_output.y49(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), value.up1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_33).r44 = function (encoder, value) {
    return this.rp1(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().qp1_1);
    }
    if (0 === (seen1 & 1))
      $this.sp1_1 = 1280;
    else
      $this.sp1_1 = maxWidth;
    if (0 === (seen1 & 2))
      $this.tp1_1 = 1280;
    else
      $this.tp1_1 = maxHeight;
    if (0 === (seen1 & 4))
      $this.up1_1 = CompressionLevel_MEDIUM_getInstance();
    else
      $this.up1_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.sp1_1 = maxWidth;
    this.tp1_1 = maxHeight;
    this.up1_1 = compressionLevel;
  }
  protoOf(CompressParams).toString = function () {
    return 'CompressParams(maxWidth=' + this.sp1_1 + ', maxHeight=' + this.tp1_1 + ', compressionLevel=' + this.up1_1 + ')';
  };
  protoOf(CompressParams).hashCode = function () {
    var result = this.sp1_1;
    result = imul(result, 31) + this.tp1_1 | 0;
    result = imul(result, 31) + this.up1_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.sp1_1 === tmp0_other_with_cast.sp1_1))
      return false;
    if (!(this.tp1_1 === tmp0_other_with_cast.tp1_1))
      return false;
    if (!this.up1_1.equals(tmp0_other_with_cast.up1_1))
      return false;
    return true;
  };
  function CompressResult(uri, mimeType, originalSize, compressedSize) {
    this.sot_1 = uri;
    this.tot_1 = mimeType;
    this.uot_1 = originalSize;
    this.vot_1 = compressedSize;
  }
  protoOf(CompressResult).toString = function () {
    return 'CompressResult(uri=' + this.sot_1 + ', mimeType=' + this.tot_1 + ', originalSize=' + this.uot_1.toString() + ', compressedSize=' + this.vot_1.toString() + ')';
  };
  protoOf(CompressResult).hashCode = function () {
    var result = getStringHashCode(this.sot_1);
    result = imul(result, 31) + getStringHashCode(this.tot_1) | 0;
    result = imul(result, 31) + this.uot_1.hashCode() | 0;
    result = imul(result, 31) + this.vot_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.sot_1 === tmp0_other_with_cast.sot_1))
      return false;
    if (!(this.tot_1 === tmp0_other_with_cast.tot_1))
      return false;
    if (!this.uot_1.equals(tmp0_other_with_cast.uot_1))
      return false;
    if (!this.vot_1.equals(tmp0_other_with_cast.vot_1))
      return false;
    return true;
  };
  function CompressUseCase() {
  }
  function _get_$cachedSerializer__te6jhj($this) {
    return $this.wp1_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_86 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.wp1_1 = lazy(tmp_0, CompressionLevel$Companion$_anonymous__cmsj0x);
  }
  protoOf(Companion_37).xp1 = 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.ap2_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).n4r = function () {
    return _get_$cachedSerializer__te6jhj(this);
  };
  protoOf(Companion_37).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_86;
  function Companion_getInstance_54() {
    CompressionLevel_initEntries();
    if (Companion_instance_86 == null)
      new Companion_37();
    return Companion_instance_86;
  }
  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_54();
  }
  var $ENTRIES;
  function CompressionLevel(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.ap2_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.bp2_1 = PrimitiveSerialDescriptor('CompressionLevel', INT_getInstance());
  }
  protoOf(CompressionLevelSerializer).q44 = function () {
    return this.bp2_1;
  };
  protoOf(CompressionLevelSerializer).s44 = function (decoder) {
    return Companion_getInstance_54().xp1(decoder.y47());
  };
  protoOf(CompressionLevelSerializer).cp2 = function (encoder, value) {
    encoder.g49(value.ap2_1);
  };
  protoOf(CompressionLevelSerializer).r44 = function (encoder, value) {
    return this.cp2(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.vof_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().smd(element.zof_1);
        destination.s(tmp$ret$0, element);
      }
      tmp = destination;
    } else {
      tmp = entryMap;
    }
    entryMap = tmp;
    this.dp2_1 = manifest;
    this.ep2_1 = entryMap;
  }
  protoOf(ContentManifestMap).fp2 = function (manifestUrl, pathInContentEntryVersion) {
    return UrlKmp(manifestUrl).gp2(pathInContentEntryVersion).toString();
  };
  protoOf(ContentManifestMap).toString = function () {
    return 'ContentManifestMap(manifest=' + this.dp2_1 + ', entryMap=' + this.ep2_1 + ')';
  };
  protoOf(ContentManifestMap).hashCode = function () {
    var result = this.dp2_1.hashCode();
    result = imul(result, 31) + hashCode(this.ep2_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.dp2_1.equals(tmp0_other_with_cast.dp2_1))
      return false;
    if (!equals(this.ep2_1, tmp0_other_with_cast.ep2_1))
      return false;
    return true;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    this.pp2_1 = this$0;
    this.qp2_1 = $entries;
    this.rp2_1 = $timeNow;
    this.sp2_1 = $activeUserPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.uny(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.pp2_1.yp2_1.x7d();
            var this_0 = this.qp2_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.ap3_1);
            }

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

            continue $sm;
          case 1:
            var tmp_1 = this;
            tmp_1.up2_1 = this.qp2_1;
            this.vp2_1 = this.up2_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.vp2_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.wp2_1 = this.vp2_1.e();
            var tmp_2 = this;
            tmp_2.xp2_1 = this.wp2_1;
            this.hd_1 = 3;
            suspendResult = this.pp2_1.yp2_1.m7f().ceg(this.xp2_1.ap3_1, this.rp2_1, this.sp2_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).vny = function (it, completion) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this.pp2_1, this.qp2_1, this.rp2_1, this.sp2_1, completion);
    i.tp2_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeleteContentEntryParentChildJoinUseCase(repoOrDb) {
    this.yp2_1 = repoOrDb;
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase).cp3 = function (entries, activeUserPersonUid, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.yp2_1, VOID, DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this, entries, timeNow, activeUserPersonUid, null), $completion);
  };
  function Companion_38() {
    this.dp3_1 = 'upload-original-filename';
  }
  var Companion_instance_87;
  function Companion_getInstance_55() {
    return Companion_instance_87;
  }
  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.fp3_1 = indeterminate;
    this.gp3_1 = error;
    this.hp3_1 = processedBytes;
    this.ip3_1 = totalBytes;
  }
  protoOf(ContentEntryGetMetadataStatus).jp3 = function () {
    var tmp;
    if (!this.ip3_1.equals(new Long(0, 0))) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.hp3_1.cb(toLong(100)).bb(this.ip3_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(ContentEntryGetMetadataStatus).kp3 = function (indeterminate, error, processedBytes, totalBytes) {
    return new ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).lp3 = function (indeterminate, error, processedBytes, totalBytes, $super) {
    indeterminate = indeterminate === VOID ? this.fp3_1 : indeterminate;
    error = error === VOID ? this.gp3_1 : error;
    processedBytes = processedBytes === VOID ? this.hp3_1 : processedBytes;
    totalBytes = totalBytes === VOID ? this.ip3_1 : totalBytes;
    return $super === VOID ? this.kp3(indeterminate, error, processedBytes, totalBytes) : $super.kp3.call(this, indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).toString = function () {
    return 'ContentEntryGetMetadataStatus(indeterminate=' + this.fp3_1 + ', error=' + this.gp3_1 + ', processedBytes=' + this.hp3_1.toString() + ', totalBytes=' + this.ip3_1.toString() + ')';
  };
  protoOf(ContentEntryGetMetadataStatus).hashCode = function () {
    var result = getBooleanHashCode(this.fp3_1);
    result = imul(result, 31) + (this.gp3_1 == null ? 0 : getStringHashCode(this.gp3_1)) | 0;
    result = imul(result, 31) + this.hp3_1.hashCode() | 0;
    result = imul(result, 31) + this.ip3_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.fp3_1 === tmp0_other_with_cast.fp3_1))
      return false;
    if (!(this.gp3_1 == tmp0_other_with_cast.gp3_1))
      return false;
    if (!this.hp3_1.equals(tmp0_other_with_cast.hp3_1))
      return false;
    if (!this.ip3_1.equals(tmp0_other_with_cast.ip3_1))
      return false;
    return true;
  };
  function UnsupportedContentException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, UnsupportedContentException);
  }
  function Companion_39() {
    this.mp3_1 = 'text/vtt';
    this.np3_1 = 'filename';
    this.op3_1 = 'locale';
    this.pp3_1 = 'WEBVTT';
  }
  var Companion_instance_88;
  function Companion_getInstance_56() {
    return Companion_instance_88;
  }
  function GetSubtitleTrackFromUriUseCase() {
  }
  function CancelImportContentEntryUseCase() {
  }
  function $invokeCOROUTINE$26(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ap4_1 = _this__u8e3s4;
    this.bp4_1 = cjiUid;
    this.cp4_1 = activeUserPersonUid;
  }
  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 = 2;
            var tmp_0 = this;
            var tmp_1 = this.ap4_1.np4_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.dp4_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.ep4_1 = this.ap4_1.mp4_1;
            var tmp_4 = this;
            tmp_4.fp4_1 = this.ap4_1.lp4_1.tnt_1 + 'api/contententryimportjob/cancel';
            var tmp_5 = this;
            tmp_5.gp4_1 = this.ep4_1;
            var tmp_6 = this;
            tmp_6.hp4_1 = this.gp4_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.fp4_1);
            parameter(this_0, 'jobUid', this.bp4_1);
            doorNodeIdHeader(this_0, this.dp4_1);
            parameter(this_0, 'accountPersonUid', this.cp4_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.ip4_1 = this_0;
            this.ip4_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.jp4_1 = this.hp4_1;
            var tmp_9 = this;
            tmp_9.kp4_1 = this.ip4_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.kp4_1, this.jp4_1)).h3z(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(learningSpace, httpClient, repo) {
    this.lp4_1 = learningSpace;
    this.mp4_1 = httpClient;
    this.np4_1 = repo;
  }
  protoOf(CancelRemoteContentEntryImportUseCase).op4 = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$26(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$27(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xp4_1 = _this__u8e3s4;
    this.yp4_1 = cjiUid;
    this.zp4_1 = activeUserPersonUid;
  }
  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 = 2;
            var tmp_0 = this;
            var tmp_1 = this.xp4_1.kp5_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.ap5_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.bp5_1 = this.xp4_1.ip5_1;
            var tmp_4 = this;
            tmp_4.cp5_1 = this.xp4_1.jp5_1.tnt_1 + 'api/contententryimportjob/dismissError';
            var tmp_5 = this;
            tmp_5.dp5_1 = this.bp5_1;
            var tmp_6 = this;
            tmp_6.ep5_1 = this.dp5_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.cp5_1);
            parameter(this_0, 'jobUid', this.yp4_1);
            doorNodeIdHeader(this_0, this.ap5_1);
            parameter(this_0, 'accountPersonUid', this.zp4_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.fp5_1 = this_0;
            this.fp5_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.gp5_1 = this.ep5_1;
            var tmp_9 = this;
            tmp_9.hp5_1 = this.fp5_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.hp5_1, this.gp5_1)).h3z(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, learningSpace, repo) {
    this.ip5_1 = httpClient;
    this.jp5_1 = learningSpace;
    this.kp5_1 = repo;
  }
  protoOf(DismissRemoteContentEntryImportErrorUseCase).op4 = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$27(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnqueueContentEntryImportUseCase() {
  }
  function $invokeCOROUTINE$28(_this__u8e3s4, contentJobItem, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.up5_1 = _this__u8e3s4;
    this.vp5_1 = contentJobItem;
  }
  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 = 2;
            var tmp_0 = this;
            tmp_0.wp5_1 = this.up5_1.ep6_1;
            var tmp_1 = this;
            tmp_1.xp5_1 = this.up5_1.dp6_1.tnt_1 + 'api/import/importRequest';
            var tmp_2 = this;
            tmp_2.yp5_1 = this.wp5_1;
            var tmp_3 = this;
            tmp_3.zp5_1 = this.yp5_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.xp5_1);
            contentType(this_0, Application_getInstance().v2r_1);
            setBodyJson(this_0, this.up5_1.fp6_1, Companion_instance_89.n4r(), new ImportRequest(this.vp5_1));
            tmp_4.ap6_1 = this_0;
            this.ap6_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_5 = this;
            tmp_5.bp6_1 = this.zp5_1;
            var tmp_6 = this;
            tmp_6.cp6_1 = this.ap6_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.cp6_1, this.bp6_1)).h3z(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(learningSpace, httpClient, json) {
    this.dp6_1 = learningSpace;
    this.ep6_1 = httpClient;
    this.fp6_1 = json;
  }
  protoOf(EnqueueImportContentEntryUseCaseRemote).lp5 = function (contentJobItem, $completion) {
    var tmp = new $invokeCOROUTINE$28(this, contentJobItem, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_40() {
  }
  protoOf(Companion_40).n4r = function () {
    return $serializer_getInstance_46();
  };
  var Companion_instance_89;
  function Companion_getInstance_57() {
    return Companion_instance_89;
  }
  function $serializer_34() {
    $serializer_instance_34 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.contententry.importcontent.ImportRequest', this, 1);
    tmp0_serialDesc.t4f('contentJobItem', false);
    this.gp6_1 = tmp0_serialDesc;
  }
  protoOf($serializer_34).q44 = function () {
    return this.gp6_1;
  };
  protoOf($serializer_34).k4g = 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).s44 = function (decoder) {
    var tmp0_desc = this.gp6_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.u48(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return ImportRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_34).hp6 = function (encoder, value) {
    var tmp0_desc = this.gp6_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_5(), value.ip6_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_34).r44 = function (encoder, value) {
    return this.hp6(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().gp6_1);
    }
    $this.ip6_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.ip6_1 = contentJobItem;
  }
  protoOf(ImportRequest).toString = function () {
    return 'ImportRequest(contentJobItem=' + this.ip6_1 + ')';
  };
  protoOf(ImportRequest).hashCode = function () {
    return this.ip6_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.ip6_1.equals(tmp0_other_with_cast.ip6_1))
      return false;
    return true;
  };
  function DefaultLaunchContentEntryVersionUseCase() {
  }
  protoOf(DefaultLaunchContentEntryVersionUseCase).jp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp0_subject = contentEntryVersion.oax_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_125();
      var tmp_0 = to('entityUid', contentEntryVersion.lax_1.toString());
      Companion_getInstance_125();
      var tmp_1 = to('courseBlockUid', cbUid.toString());
      Companion_getInstance_125();
      var tmp_2 = to('clazzUid', clazzUid.toString());
      Companion_getInstance_125();
      navController.kp6(destName, mapOf([tmp_0, tmp_1, tmp_2, to('entryid', contentEntryVersion.max_1.toString())]));
    }
    return new LaunchResult();
  };
  protoOf(DefaultLaunchContentEntryVersionUseCase).lp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.jp6(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function LaunchResult(message) {
    message = message === VOID ? null : message;
    this.mp6_1 = message;
  }
  protoOf(LaunchResult).toString = function () {
    return 'LaunchResult(message=' + this.mp6_1 + ')';
  };
  protoOf(LaunchResult).hashCode = function () {
    return this.mp6_1 == null ? 0 : getStringHashCode(this.mp6_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.mp6_1 == tmp0_other_with_cast.mp6_1))
      return false;
    return true;
  };
  function LaunchContentEntryVersionUseCase() {
  }
  function LaunchEpubUseCase() {
  }
  function LaunchXapiUseCase() {
  }
  function XapiLaunchHrefResult(url, launchUriInContent, launchActivity, manifestUrl) {
    this.np6_1 = url;
    this.op6_1 = launchUriInContent;
    this.pp6_1 = launchActivity;
    this.qp6_1 = manifestUrl;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda($contentEntryVersionUid) {
    return function () {
      return 'Resolving xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString();
    };
  }
  function ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation) {
    this.zp6_1 = $contentEntryVersionUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).bp7 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.bp7(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.ap7_1.i7f().fbq(this.zp6_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).vny = function (it, completion) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda(this.zp6_1, completion);
    i.ap7_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.bp7(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$29(_this__u8e3s4, contentEntryVersionUid, clazzUid, cbUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kp7_1 = _this__u8e3s4;
    this.lp7_1 = contentEntryVersionUid;
    this.mp7_1 = clazzUid;
    this.np7_1 = cbUid;
  }
  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 = 7;
            var tmp_0 = Napier_getInstance();
            tmp_0.e5e(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda(this.lp7_1));
            this.hd_1 = 1;
            suspendResult = localFirstThenRepoIfNull(this.kp7_1.rp8_1, ResolveXapiLaunchHrefUseCase$invoke$slambda_0(this.lp7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

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

            tmp_3.qp7_1 = tmp_4;
            var tmp_5 = this;
            tmp_5.rp7_1 = this.kp7_1.tp8_1;
            var tmp_6 = this;
            tmp_6.sp7_1 = this.kp7_1.sp8_1;
            var tmp_7 = this;
            tmp_7.tp7_1 = this.qp7_1;
            var tmp_8 = this;
            tmp_8.up7_1 = this.sp7_1;
            var tmp_9 = this;
            tmp_9.vp7_1 = this.up7_1;
            var tmp_10 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.tp7_1);
            tmp_10.wp7_1 = this_0;
            this.wp7_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_11 = this;
            tmp_11.xp7_1 = this.vp7_1;
            var tmp_12 = this;
            tmp_12.yp7_1 = this.wp7_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.yp7_1, this.xp7_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 3:
            this.ap8_1 = suspendResult;
            var tmp_13 = this;
            var this_1 = this.rp7_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_13.bp8_1 = this.rp7_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.ap8_1);
            this.cp8_1 = requireEntryByUri(this.bp8_1, ensureNotNull(this.pp7_1.nax_1));
            var tmp_14 = this;
            tmp_14.dp8_1 = this.kp7_1.sp8_1;
            var tmp_15 = this;
            tmp_15.ep8_1 = this.cp8_1.hog_1;
            var tmp_16 = this;
            tmp_16.fp8_1 = this.dp8_1;
            var tmp_17 = this;
            tmp_17.gp8_1 = this.fp8_1;
            var tmp_18 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.ep8_1);
            tmp_18.hp8_1 = this_3;
            this.hp8_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_19 = this;
            tmp_19.ip8_1 = this.gp8_1;
            var tmp_20 = this;
            tmp_20.jp8_1 = this.hp8_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.jp8_1, this.ip8_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 5:
            this.lp8_1 = suspendResult;
            this.mp8_1 = this.kp7_1.up8_1.y7c();
            setInputString(this.mp8_1, this.lp8_1);
            this.np8_1 = Companion_instance_135.ap9(this.mp8_1);
            var tmp_21 = this;
            var tmp2_safe_receiver = this.np8_1.bp9_1;
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.jp9_1;
            var tmp_22;
            if (tmp3_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.lp7_1.toString() + ' manifesturl is null');
            } else {
              tmp_22 = tmp3_elvis_lhs;
            }

            tmp_21.op8_1 = tmp_22;
            var tmp_23 = this;
            var tmp4_safe_receiver = this.np8_1.bp9_1;
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.gp9_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.pp8_1 = tmp_24;
            this.qp8_1 = this.kp7_1.xp8_1.ro9().lnu_1.f96_1;
            this.hd_1 = 6;
            suspendResult = this.kp7_1.vp8_1.mp9(this.qp8_1, this.kp7_1.xp8_1.ro9().qnu(), this.pp8_1, this.mp7_1, this.np7_1, this.pp7_1.max_1, this.lp7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var xapiSession = suspendResult;
            var queryParams = mapOf([to('endpoint', this.kp7_1.wp8_1.np9('/api/xapi/')), to('auth', authorizationHeader(xapiSession)), to('actor', this.kp7_1.tp8_1.r45(Companion_instance_113.n4r(), agent(xapiSession, this.kp7_1.yp8_1))), to('registration', get_registrationUuid(xapiSession).toString()), to('activity_id', xapiSession.ujz_1)]);
            var url_0 = appendQueryArgs(UMFileUtil_getInstance().tp9(this.qp7_1, this.op8_1), queryParams);
            var tinCanXmlPathPrefix = substringBeforeLast(ensureNotNull(this.pp7_1.nax_1), '/', '');
            var tmp_25 = Napier_getInstance();
            tmp_25.e5e(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda_0(this.lp7_1, url_0));
            return new XapiLaunchHrefResult(url_0, appendQueryArgs(tinCanXmlPathPrefix + this.op8_1, queryParams), ensureNotNull(this.np8_1.bp9_1), this.qp7_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(activeRepoOrDb, httpClient, json, xppFactory, resumeOrStartXapiSessionUseCase, getApiUrlUseCase, accountManager, learningSpace) {
    this.rp8_1 = activeRepoOrDb;
    this.sp8_1 = httpClient;
    this.tp8_1 = json;
    this.up8_1 = xppFactory;
    this.vp8_1 = resumeOrStartXapiSessionUseCase;
    this.wp8_1 = getApiUrlUseCase;
    this.xp8_1 = accountManager;
    this.yp8_1 = learningSpace;
  }
  protoOf(ResolveXapiLaunchHrefUseCase).up9 = function (contentEntryVersionUid, clazzUid, cbUid, $completion) {
    var tmp = new $invokeCOROUTINE$29(this, contentEntryVersionUid, clazzUid, cbUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function MoveContentEntriesUseCase(repo, systemImpl) {
    this.vp9_1 = repo;
    this.wp9_1 = systemImpl;
  }
  protoOf(MoveContentEntriesUseCase).xp9 = 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.zp2_1.equals(destContentEntry.nav_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      throw IllegalArgumentException_init_$Create$(this.wp9_1.joj(strings_getInstance().bnn_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.bp3_1.equals(destContentEntry.nav_1)) {
          tmp$ret$2 = true;
          break $l$block_2;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2) {
      throw IllegalArgumentException_init_$Create$(this.wp9_1.joj(strings_getInstance().cnn_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.ap3_1;
      destination.i1(tmp$ret$4);
    }
    var uidsToMove = destination;
    if (uidsToMove.c1())
      return Unit_instance;
    return this.vp9_1.x7d().qbd(destContentEntry.nav_1, uidsToMove, systemTimeInMillis(), $completion);
  };
  function SaveContentEntryUseCase$invoke$slambda$lambda($picture) {
    return function () {
      return 'SavePictureUseCase: ContentEntry Set picture upsert uri = ' + $picture.fax_1 + ' uid=' + $picture.dax_1.toString();
    };
  }
  function SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    this.gpa_1 = $effectiveDb;
    this.hpa_1 = $contentEntry;
    this.ipa_1 = $picture;
    this.jpa_1 = $initPictureUri;
    this.kpa_1 = this$0;
    this.lpa_1 = $joinToParentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveContentEntryUseCase$invoke$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.uny(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.gpa_1.v7d().qau(this.hpa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ipa_1 == null) ? !(this.ipa_1.fax_1 == this.jpa_1) : false) {
              var tmp_0 = Napier_getInstance();
              tmp_0.e5e(VOID, VOID, SaveContentEntryUseCase$invoke$slambda$lambda(this.ipa_1));
              this.hd_1 = 2;
              suspendResult = this.kpa_1.npa_1.r7f().tbi(listOf_0(this.ipa_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.lpa_1 == null)) {
              this.hd_1 = 4;
              suspendResult = this.gpa_1.x7d().insertAsync(new ContentEntryParentChildJoin(this.lpa_1, this.hpa_1.nav_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).vny = function (it, completion) {
    var i = new SaveContentEntryUseCase$invoke$slambda(this.gpa_1, this.hpa_1, this.ipa_1, this.jpa_1, this.kpa_1, this.lpa_1, completion);
    i.mpa_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$30(_this__u8e3s4, contentEntry, joinToParentUid, picture, initPictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ypa_1 = _this__u8e3s4;
    this.zpa_1 = contentEntry;
    this.apb_1 = joinToParentUid;
    this.bpb_1 = picture;
    this.cpb_1 = initPictureUri;
  }
  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 = 4;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.ypa_1.opa_1;
            tmp_0.dpb_1 = tmp0_elvis_lhs == null ? this.ypa_1.npa_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.dpb_1, VOID, SaveContentEntryUseCase$invoke$slambda_0(this.dpb_1, this.zpa_1, this.bpb_1, this.cpb_1, this.ypa_1, this.apb_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.bpb_1 == null) ? !(this.bpb_1.fax_1 == this.cpb_1) : false) {
              this.hd_1 = 2;
              var tmp_1 = this.bpb_1.dax_1;
              suspendResult = this.ypa_1.ppa_1.uor(tmp_1, 6678, this.bpb_1.fax_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.npa_1 = db;
    this.opa_1 = repo;
    this.ppa_1 = enqueueSavePictureUseCase;
  }
  protoOf(SaveContentEntryUseCase).epb = function (contentEntry, joinToParentUid, picture, initPictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$30(this, contentEntry, joinToParentUid, picture, initPictureUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function AddOrUpdateCourseBlockUseCase() {
  }
  protoOf(AddOrUpdateCourseBlockUseCase).fpb = 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.nk8_1.t7x_1.equals(addOrUpdateBlock.nk8_1.t7x_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.zk8(addOrUpdateBlock.nk8_1.hkm(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.nk8_1.w7x_1.equals(parentModUid) ? true : !(item.nk8_1.g7y_1 === index_0)) {
        tmp = item.zk8(item.nk8_1.hkm(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).nk8_1;
    var tmp = block.u7x_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.nk8_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.u7x_1;
    if (tmp_2 === 100) {
      tmp_1 = 1;
    } else {
      tmp_1 = prevBlock.v7x_1;
    }
    var autoIndent = tmp_1;
    var tmp_3;
    if (!(block.v7x_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).zk8(this_0.v(index).nk8_1.hkm(VOID, VOID, autoIndent)));
      tmp_3 = toList(this_0);
    } else {
      tmp_3 = _this__u8e3s4;
    }
    return tmp_3;
  }
  function findParentModule(_this__u8e3s4, forBlock) {
    var tmp = forBlock.nk8_1.u7x_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.nk8_1.t7x_1.equals(forBlock.nk8_1.t7x_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.nk8_1.u7x_1;
    if (tmp_2 === 100) {
      tmp_1 = prevBlock.nk8_1.t7x_1;
    } else {
      if (prevBlock.nk8_1.v7x_1 >= 1) {
        tmp_1 = prevBlock.nk8_1.w7x_1;
      } else {
        tmp_1 = new Long(0, 0);
      }
    }
    return tmp_1;
  }
  function UpdateCourseBlocksOnReorderOrCommitUseCase() {
  }
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).gpb = function (currentList, autoIndentIndex) {
    var tmp;
    if (autoIndentIndex >= 0) {
      tmp = autoIndent(currentList, autoIndentIndex);
    } else {
      tmp = currentList;
    }
    var listIndented = tmp;
    return updateParentModuleUidsAndIndex(listIndented);
  };
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).hpb = function (currentList, autoIndentIndex, $super) {
    autoIndentIndex = autoIndentIndex === VOID ? -1 : autoIndentIndex;
    return $super === VOID ? this.gpb(currentList, autoIndentIndex) : $super.gpb.call(this, currentList, autoIndentIndex);
  };
  function CreatePasskeyUseCase() {
  }
  function CredentialResult() {
  }
  function PasswordCredentialResult() {
  }
  function PasskeyCredentialResult() {
  }
  function NoCredentialAvailableResult() {
  }
  function Error_1() {
  }
  function GetCredentialUseCase() {
  }
  function Companion_41() {
  }
  var Companion_instance_90;
  function Companion_getInstance_58() {
    return Companion_instance_90;
  }
  function $serializer_35() {
    $serializer_instance_35 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.PasskeyVerifyResult', this, 4);
    tmp0_serialDesc.t4f('isVerified', false);
    tmp0_serialDesc.t4f('personUid', false);
    tmp0_serialDesc.t4f('firstName', true);
    tmp0_serialDesc.t4f('lastName', true);
    this.kpb_1 = tmp0_serialDesc;
  }
  protoOf($serializer_35).q44 = function () {
    return this.kpb_1;
  };
  protoOf($serializer_35).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), LongSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_35).s44 = function (decoder) {
    var tmp0_desc = this.kpb_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return PasskeyVerifyResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_35).lpb = function (encoder, value) {
    var tmp0_desc = this.kpb_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.o49(tmp0_desc, 0, value.yo5_1);
    tmp1_output.s49(tmp0_desc, 1, value.zo5_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.ao6_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.ao6_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.bo6_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.bo6_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_35).r44 = function (encoder, value) {
    return this.lpb(encoder, value instanceof PasskeyVerifyResult ? value : THROW_CCE());
  };
  var $serializer_instance_35;
  function $serializer_getInstance_47() {
    if ($serializer_instance_35 == null)
      new $serializer_35();
    return $serializer_instance_35;
  }
  function PasskeyVerifyResult_init_$Init$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_47().kpb_1);
    }
    $this.yo5_1 = isVerified;
    $this.zo5_1 = personUid;
    if (0 === (seen1 & 4))
      $this.ao6_1 = null;
    else
      $this.ao6_1 = firstName;
    if (0 === (seen1 & 8))
      $this.bo6_1 = null;
    else
      $this.bo6_1 = lastName;
    return $this;
  }
  function PasskeyVerifyResult_init_$Create$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker) {
    return PasskeyVerifyResult_init_$Init$(seen1, isVerified, personUid, firstName, lastName, serializationConstructorMarker, objectCreate(protoOf(PasskeyVerifyResult)));
  }
  function PasskeyVerifyResult(isVerified, personUid, firstName, lastName) {
    firstName = firstName === VOID ? null : firstName;
    lastName = lastName === VOID ? null : lastName;
    this.yo5_1 = isVerified;
    this.zo5_1 = personUid;
    this.ao6_1 = firstName;
    this.bo6_1 = lastName;
  }
  protoOf(PasskeyVerifyResult).toString = function () {
    return 'PasskeyVerifyResult(isVerified=' + this.yo5_1 + ', personUid=' + this.zo5_1.toString() + ', firstName=' + this.ao6_1 + ', lastName=' + this.bo6_1 + ')';
  };
  protoOf(PasskeyVerifyResult).hashCode = function () {
    var result = getBooleanHashCode(this.yo5_1);
    result = imul(result, 31) + this.zo5_1.hashCode() | 0;
    result = imul(result, 31) + (this.ao6_1 == null ? 0 : getStringHashCode(this.ao6_1)) | 0;
    result = imul(result, 31) + (this.bo6_1 == null ? 0 : getStringHashCode(this.bo6_1)) | 0;
    return result;
  };
  protoOf(PasskeyVerifyResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PasskeyVerifyResult))
      return false;
    var tmp0_other_with_cast = other instanceof PasskeyVerifyResult ? other : THROW_CCE();
    if (!(this.yo5_1 === tmp0_other_with_cast.yo5_1))
      return false;
    if (!this.zo5_1.equals(tmp0_other_with_cast.zo5_1))
      return false;
    if (!(this.ao6_1 == tmp0_other_with_cast.ao6_1))
      return false;
    if (!(this.bo6_1 == tmp0_other_with_cast.bo6_1))
      return false;
    return true;
  };
  function SavePersonPasskeyUseCase(db, repo, json) {
    this.po2_1 = db;
    this.qo2_1 = repo;
    this.ro2_1 = json;
  }
  protoOf(SavePersonPasskeyUseCase).so2 = function (passkeyResult, person, $completion) {
    var tmp0_elvis_lhs = this.qo2_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.po2_1 : tmp0_elvis_lhs;
    var clientDataJSONBase64 = passkeyResult.upb_1.opb_1;
    var decodedBytes = decodeBase64Bytes(clientDataJSONBase64);
    // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
    var this_0 = this.ro2_1;
    var string = decodeToString(decodedBytes);
    // Inline function 'kotlinx.serialization.serializer' call
    var this_1 = this_0.t45();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(ClientDataJSON), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var clientDataJson = this_0.s45(tmp$ret$1, string);
    var personPasskey = new PersonPasskey(VOID, person.f96_1, passkeyResult.upb_1.mpb_1, passkeyResult.upb_1.opb_1, clientDataJson.apc_1, passkeyResult.spb_1, clientDataJson.zpb_1, passkeyResult.upb_1.ppb_1);
    return effectiveDb.b7g().tgz(personPasskey, $completion);
  };
  function DecodeUserHandleUseCase() {
  }
  function Companion_42() {
  }
  var Companion_instance_91;
  function Companion_getInstance_59() {
    return Companion_instance_91;
  }
  function $serializer_36() {
    $serializer_instance_36 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationExtensionsClientOutputsJSON', this, 1);
    tmp0_serialDesc.t4f('prf', true);
    this.cpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_36).q44 = function () {
    return this.cpc_1;
  };
  protoOf($serializer_36).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_49())];
  };
  protoOf($serializer_36).s44 = function (decoder) {
    var tmp0_desc = this.cpc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, $serializer_getInstance_49(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, $serializer_getInstance_49(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return AuthenticationExtensionsClientOutputsJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_36).dpc = function (encoder, value) {
    var tmp0_desc = this.cpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.epc_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, $serializer_getInstance_49(), value.epc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_36).r44 = function (encoder, value) {
    return this.dpc(encoder, value instanceof AuthenticationExtensionsClientOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_36;
  function $serializer_getInstance_48() {
    if ($serializer_instance_36 == null)
      new $serializer_36();
    return $serializer_instance_36;
  }
  function AuthenticationExtensionsClientOutputsJSON_init_$Init$(seen1, prf, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_48().cpc_1);
    }
    if (0 === (seen1 & 1))
      $this.epc_1 = null;
    else
      $this.epc_1 = prf;
    return $this;
  }
  function AuthenticationExtensionsClientOutputsJSON_init_$Create$(seen1, prf, serializationConstructorMarker) {
    return AuthenticationExtensionsClientOutputsJSON_init_$Init$(seen1, prf, serializationConstructorMarker, objectCreate(protoOf(AuthenticationExtensionsClientOutputsJSON)));
  }
  function AuthenticationExtensionsClientOutputsJSON(prf) {
    prf = prf === VOID ? null : prf;
    this.epc_1 = prf;
  }
  protoOf(AuthenticationExtensionsClientOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsClientOutputsJSON(prf=' + this.epc_1 + ')';
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).hashCode = function () {
    return this.epc_1 == null ? 0 : this.epc_1.hashCode();
  };
  protoOf(AuthenticationExtensionsClientOutputsJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationExtensionsClientOutputsJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationExtensionsClientOutputsJSON ? other : THROW_CCE();
    if (!equals(this.epc_1, tmp0_other_with_cast.epc_1))
      return false;
    return true;
  };
  function Companion_43() {
  }
  var Companion_instance_92;
  function Companion_getInstance_60() {
    return Companion_instance_92;
  }
  function $serializer_37() {
    $serializer_instance_37 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationExtensionsPRFOutputsJSON', this, 1);
    tmp0_serialDesc.t4f('enabled', true);
    this.fpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_37).q44 = function () {
    return this.fpc_1;
  };
  protoOf($serializer_37).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(BooleanSerializer_getInstance())];
  };
  protoOf($serializer_37).s44 = function (decoder) {
    var tmp0_desc = this.fpc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return AuthenticationExtensionsPRFOutputsJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_37).gpc = function (encoder, value) {
    var tmp0_desc = this.fpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.hpc_1 === false)) {
      tmp1_output.a4a(tmp0_desc, 0, BooleanSerializer_getInstance(), value.hpc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_37).r44 = function (encoder, value) {
    return this.gpc(encoder, value instanceof AuthenticationExtensionsPRFOutputsJSON ? value : THROW_CCE());
  };
  var $serializer_instance_37;
  function $serializer_getInstance_49() {
    if ($serializer_instance_37 == null)
      new $serializer_37();
    return $serializer_instance_37;
  }
  function AuthenticationExtensionsPRFOutputsJSON_init_$Init$(seen1, enabled, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_49().fpc_1);
    }
    if (0 === (seen1 & 1))
      $this.hpc_1 = false;
    else
      $this.hpc_1 = enabled;
    return $this;
  }
  function AuthenticationExtensionsPRFOutputsJSON_init_$Create$(seen1, enabled, serializationConstructorMarker) {
    return AuthenticationExtensionsPRFOutputsJSON_init_$Init$(seen1, enabled, serializationConstructorMarker, objectCreate(protoOf(AuthenticationExtensionsPRFOutputsJSON)));
  }
  function AuthenticationExtensionsPRFOutputsJSON(enabled) {
    enabled = enabled === VOID ? false : enabled;
    this.hpc_1 = enabled;
  }
  protoOf(AuthenticationExtensionsPRFOutputsJSON).toString = function () {
    return 'AuthenticationExtensionsPRFOutputsJSON(enabled=' + this.hpc_1 + ')';
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).hashCode = function () {
    return this.hpc_1 == null ? 0 : getBooleanHashCode(this.hpc_1);
  };
  protoOf(AuthenticationExtensionsPRFOutputsJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationExtensionsPRFOutputsJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationExtensionsPRFOutputsJSON ? other : THROW_CCE();
    if (!(this.hpc_1 == tmp0_other_with_cast.hpc_1))
      return false;
    return true;
  };
  function Companion_44() {
  }
  protoOf(Companion_44).n4r = function () {
    return $serializer_getInstance_50();
  };
  var Companion_instance_93;
  function Companion_getInstance_61() {
    return Companion_instance_93;
  }
  function $serializer_38() {
    $serializer_instance_38 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticationResponseJSON', this, 6);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('rawId', false);
    tmp0_serialDesc.t4f('response', false);
    tmp0_serialDesc.t4f('authenticatorAttachment', true);
    tmp0_serialDesc.t4f('clientExtensionResults', false);
    tmp0_serialDesc.t4f('type', false);
    this.ipc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_38).q44 = function () {
    return this.ipc_1;
  };
  protoOf($serializer_38).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), $serializer_getInstance_51(), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_48(), StringSerializer_getInstance()];
  };
  protoOf($serializer_38).s44 = function (decoder) {
    var tmp0_desc = this.ipc_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.i48(tmp0_desc);
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, $serializer_getInstance_51(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, $serializer_getInstance_48(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.s48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.u48(tmp0_desc, 2, $serializer_getInstance_51(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.u48(tmp0_desc, 4, $serializer_getInstance_48(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.s48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return AuthenticationResponseJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_38).jpc = function (encoder, value) {
    var tmp0_desc = this.ipc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.spb_1);
    tmp1_output.w49(tmp0_desc, 1, value.tpb_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_51(), value.upb_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.vpb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.vpb_1);
    }
    tmp1_output.y49(tmp0_desc, 4, $serializer_getInstance_48(), value.wpb_1);
    tmp1_output.w49(tmp0_desc, 5, value.xpb_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_38).r44 = function (encoder, value) {
    return this.jpc(encoder, value instanceof AuthenticationResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_38;
  function $serializer_getInstance_50() {
    if ($serializer_instance_38 == null)
      new $serializer_38();
    return $serializer_instance_38;
  }
  function AuthenticationResponseJSON_init_$Init$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker, $this) {
    if (!(55 === (55 & seen1))) {
      throwMissingFieldException(seen1, 55, $serializer_getInstance_50().ipc_1);
    }
    $this.spb_1 = id;
    $this.tpb_1 = rawId;
    $this.upb_1 = response;
    if (0 === (seen1 & 8))
      $this.vpb_1 = null;
    else
      $this.vpb_1 = authenticatorAttachment;
    $this.wpb_1 = clientExtensionResults;
    $this.xpb_1 = type;
    return $this;
  }
  function AuthenticationResponseJSON_init_$Create$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker) {
    return AuthenticationResponseJSON_init_$Init$(seen1, id, rawId, response, authenticatorAttachment, clientExtensionResults, type, serializationConstructorMarker, objectCreate(protoOf(AuthenticationResponseJSON)));
  }
  function AuthenticationResponseJSON() {
  }
  protoOf(AuthenticationResponseJSON).toString = function () {
    return 'AuthenticationResponseJSON(id=' + this.spb_1 + ', rawId=' + this.tpb_1 + ', response=' + this.upb_1 + ', authenticatorAttachment=' + this.vpb_1 + ', clientExtensionResults=' + this.wpb_1 + ', type=' + this.xpb_1 + ')';
  };
  protoOf(AuthenticationResponseJSON).hashCode = function () {
    var result = getStringHashCode(this.spb_1);
    result = imul(result, 31) + getStringHashCode(this.tpb_1) | 0;
    result = imul(result, 31) + this.upb_1.hashCode() | 0;
    result = imul(result, 31) + (this.vpb_1 == null ? 0 : getStringHashCode(this.vpb_1)) | 0;
    result = imul(result, 31) + this.wpb_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.xpb_1) | 0;
    return result;
  };
  protoOf(AuthenticationResponseJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticationResponseJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticationResponseJSON ? other : THROW_CCE();
    if (!(this.spb_1 === tmp0_other_with_cast.spb_1))
      return false;
    if (!(this.tpb_1 === tmp0_other_with_cast.tpb_1))
      return false;
    if (!this.upb_1.equals(tmp0_other_with_cast.upb_1))
      return false;
    if (!(this.vpb_1 == tmp0_other_with_cast.vpb_1))
      return false;
    if (!this.wpb_1.equals(tmp0_other_with_cast.wpb_1))
      return false;
    if (!(this.xpb_1 === tmp0_other_with_cast.xpb_1))
      return false;
    return true;
  };
  function $serializer_39() {
    $serializer_instance_39 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.AuthenticatorAssertionResponseJSON', this, 6);
    tmp0_serialDesc.t4f('attestationObject', true);
    tmp0_serialDesc.t4f('authenticatorData', false);
    tmp0_serialDesc.t4f('clientDataJSON', false);
    tmp0_serialDesc.t4f('publicKey', true);
    tmp0_serialDesc.t4f('userHandle', true);
    tmp0_serialDesc.t4f('signature', true);
    this.kpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_39).q44 = function () {
    return this.kpc_1;
  };
  protoOf($serializer_39).k4g = 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(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_39).s44 = function (decoder) {
    var tmp0_desc = this.kpc_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.i48(tmp0_desc);
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return AuthenticatorAssertionResponseJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_39).lpc = function (encoder, value) {
    var tmp0_desc = this.kpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.mpb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.mpb_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.npb_1);
    tmp1_output.w49(tmp0_desc, 2, value.opb_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ppb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.ppb_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.qpb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.qpb_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.rpb_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.rpb_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_39).r44 = function (encoder, value) {
    return this.lpc(encoder, value instanceof AuthenticatorAssertionResponseJSON ? value : THROW_CCE());
  };
  var $serializer_instance_39;
  function $serializer_getInstance_51() {
    if ($serializer_instance_39 == null)
      new $serializer_39();
    return $serializer_instance_39;
  }
  function AuthenticatorAssertionResponseJSON_init_$Init$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker, $this) {
    if (!(6 === (6 & seen1))) {
      throwMissingFieldException(seen1, 6, $serializer_getInstance_51().kpc_1);
    }
    if (0 === (seen1 & 1))
      $this.mpb_1 = null;
    else
      $this.mpb_1 = attestationObject;
    $this.npb_1 = authenticatorData;
    $this.opb_1 = clientDataJSON;
    if (0 === (seen1 & 8))
      $this.ppb_1 = null;
    else
      $this.ppb_1 = publicKey;
    if (0 === (seen1 & 16))
      $this.qpb_1 = null;
    else
      $this.qpb_1 = userHandle;
    if (0 === (seen1 & 32))
      $this.rpb_1 = null;
    else
      $this.rpb_1 = signature;
    return $this;
  }
  function AuthenticatorAssertionResponseJSON_init_$Create$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker) {
    return AuthenticatorAssertionResponseJSON_init_$Init$(seen1, attestationObject, authenticatorData, clientDataJSON, publicKey, userHandle, signature, serializationConstructorMarker, objectCreate(protoOf(AuthenticatorAssertionResponseJSON)));
  }
  function AuthenticatorAssertionResponseJSON() {
  }
  protoOf(AuthenticatorAssertionResponseJSON).toString = function () {
    return 'AuthenticatorAssertionResponseJSON(attestationObject=' + this.mpb_1 + ', authenticatorData=' + this.npb_1 + ', clientDataJSON=' + this.opb_1 + ', publicKey=' + this.ppb_1 + ', userHandle=' + this.qpb_1 + ', signature=' + this.rpb_1 + ')';
  };
  protoOf(AuthenticatorAssertionResponseJSON).hashCode = function () {
    var result = this.mpb_1 == null ? 0 : getStringHashCode(this.mpb_1);
    result = imul(result, 31) + getStringHashCode(this.npb_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.opb_1) | 0;
    result = imul(result, 31) + (this.ppb_1 == null ? 0 : getStringHashCode(this.ppb_1)) | 0;
    result = imul(result, 31) + (this.qpb_1 == null ? 0 : getStringHashCode(this.qpb_1)) | 0;
    result = imul(result, 31) + (this.rpb_1 == null ? 0 : getStringHashCode(this.rpb_1)) | 0;
    return result;
  };
  protoOf(AuthenticatorAssertionResponseJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AuthenticatorAssertionResponseJSON))
      return false;
    var tmp0_other_with_cast = other instanceof AuthenticatorAssertionResponseJSON ? other : THROW_CCE();
    if (!(this.mpb_1 == tmp0_other_with_cast.mpb_1))
      return false;
    if (!(this.npb_1 === tmp0_other_with_cast.npb_1))
      return false;
    if (!(this.opb_1 === tmp0_other_with_cast.opb_1))
      return false;
    if (!(this.ppb_1 == tmp0_other_with_cast.ppb_1))
      return false;
    if (!(this.qpb_1 == tmp0_other_with_cast.qpb_1))
      return false;
    if (!(this.rpb_1 == tmp0_other_with_cast.rpb_1))
      return false;
    return true;
  };
  function Companion_45() {
  }
  var Companion_instance_94;
  function Companion_getInstance_62() {
    return Companion_instance_94;
  }
  function $serializer_40() {
    $serializer_instance_40 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.credentials.passkey.model.ClientDataJSON', this, 4);
    tmp0_serialDesc.t4f('type', false);
    tmp0_serialDesc.t4f('challenge', false);
    tmp0_serialDesc.t4f('origin', false);
    tmp0_serialDesc.t4f('crossOrigin', true);
    this.mpc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_40).q44 = function () {
    return this.mpc_1;
  };
  protoOf($serializer_40).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(BooleanSerializer_getInstance())];
  };
  protoOf($serializer_40).s44 = function (decoder) {
    var tmp0_desc = this.mpc_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.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, BooleanSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return ClientDataJSON_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_40).npc = function (encoder, value) {
    var tmp0_desc = this.mpc_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.ypb_1);
    tmp1_output.w49(tmp0_desc, 1, value.zpb_1);
    tmp1_output.w49(tmp0_desc, 2, value.apc_1);
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.bpc_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, BooleanSerializer_getInstance(), value.bpc_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_40).r44 = function (encoder, value) {
    return this.npc(encoder, value instanceof ClientDataJSON ? value : THROW_CCE());
  };
  var $serializer_instance_40;
  function $serializer_getInstance_52() {
    if ($serializer_instance_40 == null)
      new $serializer_40();
    return $serializer_instance_40;
  }
  function ClientDataJSON_init_$Init$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_52().mpc_1);
    }
    $this.ypb_1 = type;
    $this.zpb_1 = challenge;
    $this.apc_1 = origin;
    if (0 === (seen1 & 8))
      $this.bpc_1 = null;
    else
      $this.bpc_1 = crossOrigin;
    return $this;
  }
  function ClientDataJSON_init_$Create$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker) {
    return ClientDataJSON_init_$Init$(seen1, type, challenge, origin, crossOrigin, serializationConstructorMarker, objectCreate(protoOf(ClientDataJSON)));
  }
  function ClientDataJSON(type, challenge, origin, crossOrigin) {
    crossOrigin = crossOrigin === VOID ? null : crossOrigin;
    this.ypb_1 = type;
    this.zpb_1 = challenge;
    this.apc_1 = origin;
    this.bpc_1 = crossOrigin;
  }
  protoOf(ClientDataJSON).toString = function () {
    return 'ClientDataJSON(type=' + this.ypb_1 + ', challenge=' + this.zpb_1 + ', origin=' + this.apc_1 + ', crossOrigin=' + this.bpc_1 + ')';
  };
  protoOf(ClientDataJSON).hashCode = function () {
    var result = getStringHashCode(this.ypb_1);
    result = imul(result, 31) + getStringHashCode(this.zpb_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.apc_1) | 0;
    result = imul(result, 31) + (this.bpc_1 == null ? 0 : getBooleanHashCode(this.bpc_1)) | 0;
    return result;
  };
  protoOf(ClientDataJSON).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClientDataJSON))
      return false;
    var tmp0_other_with_cast = other instanceof ClientDataJSON ? other : THROW_CCE();
    if (!(this.ypb_1 === tmp0_other_with_cast.ypb_1))
      return false;
    if (!(this.zpb_1 === tmp0_other_with_cast.zpb_1))
      return false;
    if (!(this.apc_1 === tmp0_other_with_cast.apc_1))
      return false;
    if (!(this.bpc_1 == tmp0_other_with_cast.bpc_1))
      return false;
    return true;
  };
  function SavePasswordUseCase() {
  }
  function CreateCredentialUsernameUseCase(learningSpace) {
    this.ppc_1 = learningSpace;
  }
  function ParseCredentialUsernameUseCase() {
  }
  protoOf(ParseCredentialUsernameUseCase).np9 = function (credentialUsername) {
    var tmp0_container = split(credentialUsername, ['@'], VOID, 2);
    // Inline function 'kotlin.collections.component1' call
    var username = tmp0_container.v(0);
    // Inline function 'kotlin.collections.component2' call
    var learningSpacePart = tmp0_container.v(1);
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var learningSpacePartLower = learningSpacePart.toLowerCase();
    var tmp;
    if (startsWith(learningSpacePartLower, 'http://')) {
      tmp = new Pair(new LearningSpace(learningSpacePart), username);
    } else {
      tmp = new Pair(new LearningSpace(requirePostfix('https://' + learningSpacePart, '/')), username);
    }
    return tmp;
  };
  function DeletePermanentlyUseCase(repoOrDb) {
    this.qpc_1 = repoOrDb;
  }
  protoOf(DeletePermanentlyUseCase).rpc = function (items, $completion) {
    var timeNow = systemTimeInMillis();
    var tmp = this.qpc_1.m7f();
    // 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.feg_1;
      destination.i1(tmp$ret$0);
    }
    var tmp_0 = destination;
    return tmp.eeg(tmp_0, 3, timeNow, $completion);
  };
  function RestoreDeletedItemUseCase$invoke$slambda($itemsByType, this$0, $timeNow, $items, resultContinuation) {
    this.apd_1 = $itemsByType;
    this.bpd_1 = this$0;
    this.cpd_1 = $timeNow;
    this.dpd_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.uny(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.fpd_1 = this.apd_1;
            var tmp_1 = this;
            tmp_1.gpd_1 = this.fpd_1.q2().w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.gpd_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.hpd_1 = this.gpd_1.e();
            var tmp_2 = this;
            tmp_2.ipd_1 = this.hpd_1;
            this.jpd_1 = this.ipd_1.s2();
            if (this.jpd_1 === 7) {
              this.hd_1 = 2;
              var tmp_3 = this.bpd_1.kpd_1.x7d();
              var this_0 = this.ipd_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.leg_1);
              }
              suspendResult = tmp_3.rbd(destination, false, this.cpd_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.bpd_1.kpd_1.m7f();
            var this_1 = this.dpd_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.feg_1);
            }

            suspendResult = tmp_4.eeg(destination_0, 2, this.cpd_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).vny = function (it, completion) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda(this.apd_1, this.bpd_1, this.cpd_1, this.dpd_1, completion);
    i.epd_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RestoreDeletedItemUseCase(repoOrDb) {
    this.kpd_1 = repoOrDb;
  }
  protoOf(RestoreDeletedItemUseCase).rpc = 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.keg_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.kpd_1, VOID, RestoreDeletedItemUseCase$invoke$slambda_0(itemsByType, this, timeNow, items, null), $completion);
  };
  function toEpubTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.mpd_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp8_uid = $this.mpd_1.atomicfu$incrementAndGet();
    var tmp0_safe_receiver = _this__u8e3s4.eob_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uoa_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.fob_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.uob_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.eob_1;
    var tmp10_href = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.voa_1;
    var tmp5_safe_receiver = _this__u8e3s4.gob_1;
    var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.tob_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.mpd_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp0_safe_receiver = firstOrNull(_this__u8e3s4.toc_1);
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.loc_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.god_1;
    var tmp3_label = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
    var tmp4_href = _this__u8e3s4.uoc_1.aoc_1;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.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.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$31(_this__u8e3s4, opfPackage, readItemText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vpd_1 = _this__u8e3s4;
    this.wpd_1 = opfPackage;
    this.xpd_1 = readItemText;
  }
  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 = 4;
            this.ypd_1 = this.wpd_1.kof();
            if (!(this.ypd_1 == null) ? startsWith(this.ypd_1.foe_1, 'application/xhtml') : false) {
              this.hd_1 = 2;
              suspendResult = this.xpd_1(this.ypd_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0;
              if (!(this.ypd_1 == null)) {
                tmp_0 = this.ypd_1.foe_1 === 'application/x-dtbncx+xml';
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                this.hd_1 = 1;
                suspendResult = this.xpd_1(this.ypd_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_1 = this;
                tmp_1.zpd_1 = null;
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            var docStr = suspendResult;
            var this_0 = this.vpd_1.lpd_1;
            var this_1 = this_0.t45();
            var this_2 = serializer(this_1, createKType(getKClass(NcxDocument), arrayOf([]), false));
            var ncxDoc = this_0.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), docStr);
            var tmp_2 = this;
            var this_3 = ncxDoc.dod_1.poc_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.vpd_1, 0, emptySet());
              var list = plus(listOf_0(it), it.dpe_1);
              addAll(destination, list);
            }

            tmp_2.zpd_1 = destination;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var docStr_0 = suspendResult;
            var this_4 = this.vpd_1.lpd_1;
            var this_5 = this_4.t45();
            var this_6 = serializer(this_5, createKType(getKClass(NavigationDocument), arrayOf([]), false));
            var navDoc = this_4.s45(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), docStr_0);
            var tmp_3 = this;
            var this_7 = first_0(navDoc.pob_1.yoa_1).kob_1.tob_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.vpd_1, 0, emptySet());
              var list_0 = plus(listOf_0(it_0), it_0.dpe_1);
              addAll(destination_0, list_0);
            }

            tmp_3.zpd_1 = destination_0;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.zpd_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.lpd_1 = xml;
    this.mpd_1 = atomic$int$1(0);
  }
  protoOf(GetEpubTableOfContentsUseCase).hpe = function (opfPackage, readItemText, $completion) {
    var tmp = new $invokeCOROUTINE$31(this, opfPackage, readItemText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_46() {
    Companion_instance_95 = this;
    this.ipe_1 = Companion_getInstance_73().lpe_1;
  }
  var Companion_instance_95;
  function Companion_getInstance_63() {
    if (Companion_instance_95 == null)
      new Companion_46();
    return Companion_instance_95;
  }
  function FilterUsernameUseCase() {
    Companion_getInstance_63();
  }
  protoOf(FilterUsernameUseCase).mpe = 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_63().ipe_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(learningSpace) {
    this.npe_1 = learningSpace;
  }
  protoOf(GetApiUrlUseCaseDirect).np9 = function (path) {
    return requirePostfix(this.npe_1.tnt_1, '/') + removePrefix(path, '/');
  };
  function VersionInfo(versionString, buildTime) {
    this.ope_1 = versionString;
    this.ppe_1 = buildTime;
  }
  protoOf(VersionInfo).toString = function () {
    return 'VersionInfo(versionString=' + this.ope_1 + ', buildTime=' + this.ppe_1.toString() + ')';
  };
  protoOf(VersionInfo).hashCode = function () {
    var result = getStringHashCode(this.ope_1);
    result = imul(result, 31) + this.ppe_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.ope_1 === tmp0_other_with_cast.ope_1))
      return false;
    if (!this.ppe_1.equals(tmp0_other_with_cast.ppe_1))
      return false;
    return true;
  };
  function GetVersionUseCase() {
  }
  function HideKeyboardUseCase() {
  }
  function GetHtmlContentDisplayEngineOptionsUseCase(optionsList) {
    this.spe_1 = optionsList;
  }
  protoOf(GetHtmlContentDisplayEngineOptionsUseCase).qpe = function () {
    return this.spe_1;
  };
  function GetHtmlContentDisplayEngineUseCase(settings, getOptionsUseCase) {
    this.tpe_1 = settings;
    this.upe_1 = getOptionsUseCase;
  }
  protoOf(GetHtmlContentDisplayEngineUseCase).qpe = function () {
    // Inline function 'com.russhwolf.settings.get' call
    var this_0 = this.tpe_1;
    var key = 'com.ustadmobile.htmlcontentdisplayengine';
    var settingInt = this_0.wm7(key, 0);
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.upe_1.qpe().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.htmlcontentdisplayengine.GetHtmlContentDisplayEngineUseCase.invoke.<anonymous>' call
        if (element.vpe_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.upe_1.qpe()) : tmp0_elvis_lhs;
  };
  function Companion_47() {
    this.ype_1 = 'com.ustadmobile.htmlcontentdisplayengine';
  }
  var Companion_instance_96;
  function Companion_getInstance_64() {
    return Companion_instance_96;
  }
  function SetHtmlContentDisplayEngineUseCase(settings) {
    this.zpe_1 = settings;
  }
  function ClazzInviteRedeemException(message, stringResource) {
    Exception_init_$Init$(message, this);
    captureStack(this, ClazzInviteRedeemException);
    this.apf_1 = stringResource;
  }
  protoOf(ClazzInviteRedeemException).bpf = function () {
    return this.apf_1;
  };
  function ClazzInviteRedeemUseCase$invoke$slambda($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation) {
    this.kpf_1 = $effectiveDb;
    this.lpf_1 = $clazzInvite;
    this.mpf_1 = $enrolmentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.uny(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemUseCase$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.hd_1 = 1;
            suspendResult = this.kpf_1.t7d().m93(this.lpf_1.c9n_1, this.mpf_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.kpf_1.e7g();
            suspendResult = tmp_0.l9m(1, this.lpf_1.c9n_1, systemTimeInMillis(), 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(ClazzInviteRedeemUseCase$invoke$slambda).vny = function (it, completion) {
    var i = new ClazzInviteRedeemUseCase$invoke$slambda(this.kpf_1, this.lpf_1, this.mpf_1, completion);
    i.npf_1 = it;
    return i;
  };
  function ClazzInviteRedeemUseCase$invoke$slambda_0($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation) {
    var i = new ClazzInviteRedeemUseCase$invoke$slambda($effectiveDb, $clazzInvite, $enrolmentUid, resultContinuation);
    var l = function (it, $completion) {
      return i.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$32(_this__u8e3s4, inviteCode, isAccepting, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wpf_1 = _this__u8e3s4;
    this.xpf_1 = inviteCode;
    this.ypf_1 = isAccepting;
    this.zpf_1 = personUid;
  }
  protoOf($invokeCOROUTINE$32).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 tmp0_elvis_lhs = this.wpf_1.gpg_1;
            tmp_0.apg_1 = tmp0_elvis_lhs == null ? this.wpf_1.fpg_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = this.apg_1.e7g().j9m(this.xpf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bpg_1 = suspendResult;
            var tmp_1 = this;
            var tmp1_safe_receiver = this.bpg_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n9n_1;
            var tmp_2;
            if (tmp2_elvis_lhs == null) {
              throw new ClazzInviteRedeemException('Invite not found', strings_getInstance().qno_1);
            } else {
              tmp_2 = tmp2_elvis_lhs;
            }

            tmp_1.cpg_1 = tmp_2;
            var tmp_3 = this.cpg_1.j9n_1;
            if (tmp_3 === 3) {
              throw new ClazzInviteRedeemException('Invite code is revoked', strings_getInstance().ynr_1);
            }

            var tmp_4 = this.cpg_1.j9n_1;
            if (!(tmp_4 === 0)) {
              throw new ClazzInviteRedeemException('Invite already used', strings_getInstance().nnr_1);
            }

            if (this.cpg_1.k9n_1.c7(systemTimeInMillis()) < 0) {
              throw new ClazzInviteRedeemException('Invite code is expired', strings_getInstance().xnr_1);
            }

            if (this.ypf_1) {
              this.hd_1 = 3;
              var tmp_5 = ClazzEnrolment_init_$Create$(this.cpg_1.f9n_1, this.zpf_1, this.cpg_1.e9n_1.mb());
              var tmp3_elvis_lhs = this.bpg_1.o9n_1;
              suspendResult = this.wpf_1.epg_1.loz(tmp_5, tmp3_elvis_lhs == null ? 'UTC' : tmp3_elvis_lhs, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              var tmp_6 = this.apg_1.e7g();
              suspendResult = tmp_6.l9m(2, this.cpg_1.c9n_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            return new ClazzRedeemResult(this.wpf_1.hpg_1.joj(strings_getInstance().vnr_1));
          case 3:
            this.dpg_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = withDoorTransactionAsync(this.apg_1, VOID, ClazzInviteRedeemUseCase$invoke$slambda_0(this.apg_1, this.cpg_1, this.dpg_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return new ClazzRedeemResult(this.wpf_1.hpg_1.joj(strings_getInstance().tnr_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 ClazzInviteRedeemUseCase(enrolIntoCourseUseCase, db, repo, systemImpl) {
    this.epg_1 = enrolIntoCourseUseCase;
    this.fpg_1 = db;
    this.gpg_1 = repo;
    this.hpg_1 = systemImpl;
  }
  protoOf(ClazzInviteRedeemUseCase).ipg = function (inviteCode, isAccepting, personUid, $completion) {
    var tmp = new $invokeCOROUTINE$32(this, inviteCode, isAccepting, personUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function ClazzRedeemResult(message) {
    this.jpg_1 = message;
  }
  protoOf(ClazzRedeemResult).toString = function () {
    return 'ClazzRedeemResult(message=' + this.jpg_1 + ')';
  };
  protoOf(ClazzRedeemResult).hashCode = function () {
    return getStringHashCode(this.jpg_1);
  };
  protoOf(ClazzRedeemResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzRedeemResult))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzRedeemResult ? other : THROW_CCE();
    if (!(this.jpg_1 === tmp0_other_with_cast.jpg_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$33(_this__u8e3s4, viewUri, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.spg_1 = _this__u8e3s4;
    this.tpg_1 = viewUri;
    this.upg_1 = personUid;
  }
  protoOf($invokeCOROUTINE$33).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.vpg_1 = indexOf(this.tpg_1, _Char___init__impl__6a9atx(63));
            var tmp_0 = this;
            var tmp_1;
            if (this.vpg_1 > 0) {
              var tmp_2 = UMFileUtil_getInstance();
              var this_0 = this.tpg_1;
              var startIndex = this.vpg_1;
              tmp_1 = tmp_2.parseURLQueryString(this_0.substring(startIndex));
            } else {
              tmp_1 = emptyMap();
            }

            tmp_0.wpg_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.spg_1.xpg_1.ipg(first_1(this.wpg_1.p2()), true, this.upg_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 EnrollToCourseFromInviteCodeUseCase(clazzInviteRedeemUseCase) {
    this.xpg_1 = clazzInviteRedeemUseCase;
  }
  protoOf(EnrollToCourseFromInviteCodeUseCase).ypg = function (viewUri, personUid, $completion) {
    var tmp = new $invokeCOROUTINE$33(this, viewUri, personUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function isValidUserName($this, username) {
    return startsWith(username, '@');
  }
  function ParseInviteUseCase(phoneNumValidatorUseCase, validateEmailUseCase) {
    this.zpg_1 = phoneNumValidatorUseCase;
    this.aph_1 = validateEmailUseCase;
  }
  protoOf(ParseInviteUseCase).np9 = function (text) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.text.split' call
    var this_0 = Regex_init_$Create$('\\s+|,|;').y9(text, 0);
    // 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.invite.ParseInviteUseCase.invoke.<anonymous>' call
      // Inline function 'kotlin.text.trim' call
      var tmp$ret$2 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
      destination.i1(tmp$ret$2);
    }
    // Inline function 'kotlin.collections.filterTo' call
    var destination_0 = ArrayList_init_$Create$();
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      // Inline function 'kotlin.text.isNotEmpty' call
      if (charSequenceLength(element) > 0) {
        destination_0.i1(element);
      }
    }
    var parts = distinct(destination_0);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(parts, 10));
    var tmp0_iterator_1 = parts.w();
    while (tmp0_iterator_1.f()) {
      var item_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.invite.ParseInviteUseCase.invoke.<anonymous>' call
      var tmp;
      if (!(this.aph_1.np9(item_0) == null)) {
        tmp = new InviteViaContactChip(item_0, true, 1);
      } else if (this.zpg_1.bph(item_0)) {
        tmp = new InviteViaContactChip(item_0, true, 2);
      } else if (isValidUserName(this, item_0)) {
        tmp = new InviteViaContactChip(item_0, true, 3);
      } else {
        tmp = new InviteViaContactChip(item_0, false, 0);
      }
      var tmp$ret$9 = tmp;
      destination_1.i1(tmp$ret$9);
    }
    return destination_1;
  };
  function Companion_48() {
    Companion_instance_97 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.cph_1 = [new ArrayListSerializer(StringSerializer_getInstance()), null, null, null];
  }
  protoOf(Companion_48).n4r = function () {
    return $serializer_getInstance_53();
  };
  var Companion_instance_97;
  function Companion_getInstance_65() {
    if (Companion_instance_97 == null)
      new Companion_48();
    return Companion_instance_97;
  }
  function $serializer_41() {
    $serializer_instance_41 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.invite.SendClazzInvitesUseCase.SendClazzInvitesRequest', this, 4);
    tmp0_serialDesc.t4f('contacts', false);
    tmp0_serialDesc.t4f('clazzUid', false);
    tmp0_serialDesc.t4f('role', false);
    tmp0_serialDesc.t4f('personUid', false);
    this.dph_1 = tmp0_serialDesc;
  }
  protoOf($serializer_41).q44 = function () {
    return this.dph_1;
  };
  protoOf($serializer_41).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_65().cph_1[0], LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_41).s44 = function (decoder) {
    var tmp0_desc = this.dph_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 = new Long(0, 0);
    var tmp7_local3 = new Long(0, 0);
    var tmp8_input = decoder.i48(tmp0_desc);
    var tmp9_cached = Companion_getInstance_65().cph_1;
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.o48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.o48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.u48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.o48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.o48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return SendClazzInvitesRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_41).eph = function (encoder, value) {
    var tmp0_desc = this.dph_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_65().cph_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.fph_1);
    tmp1_output.s49(tmp0_desc, 1, value.gph_1);
    tmp1_output.s49(tmp0_desc, 2, value.hph_1);
    tmp1_output.s49(tmp0_desc, 3, value.iph_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_41).r44 = function (encoder, value) {
    return this.eph(encoder, value instanceof SendClazzInvitesRequest ? value : THROW_CCE());
  };
  var $serializer_instance_41;
  function $serializer_getInstance_53() {
    if ($serializer_instance_41 == null)
      new $serializer_41();
    return $serializer_instance_41;
  }
  function SendClazzInvitesRequest_init_$Init$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_53().dph_1);
    }
    $this.fph_1 = contacts;
    $this.gph_1 = clazzUid;
    $this.hph_1 = role;
    $this.iph_1 = personUid;
    return $this;
  }
  function SendClazzInvitesRequest_init_$Create$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker) {
    return SendClazzInvitesRequest_init_$Init$(seen1, contacts, clazzUid, role, personUid, serializationConstructorMarker, objectCreate(protoOf(SendClazzInvitesRequest)));
  }
  function SendClazzInvitesRequest(contacts, clazzUid, role, personUid) {
    Companion_getInstance_65();
    this.fph_1 = contacts;
    this.gph_1 = clazzUid;
    this.hph_1 = role;
    this.iph_1 = personUid;
  }
  protoOf(SendClazzInvitesRequest).toString = function () {
    return 'SendClazzInvitesRequest(contacts=' + this.fph_1 + ', clazzUid=' + this.gph_1.toString() + ', role=' + this.hph_1.toString() + ', personUid=' + this.iph_1.toString() + ')';
  };
  protoOf(SendClazzInvitesRequest).hashCode = function () {
    var result = hashCode(this.fph_1);
    result = imul(result, 31) + this.gph_1.hashCode() | 0;
    result = imul(result, 31) + this.hph_1.hashCode() | 0;
    result = imul(result, 31) + this.iph_1.hashCode() | 0;
    return result;
  };
  protoOf(SendClazzInvitesRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SendClazzInvitesRequest))
      return false;
    var tmp0_other_with_cast = other instanceof SendClazzInvitesRequest ? other : THROW_CCE();
    if (!equals(this.fph_1, tmp0_other_with_cast.fph_1))
      return false;
    if (!this.gph_1.equals(tmp0_other_with_cast.gph_1))
      return false;
    if (!this.hph_1.equals(tmp0_other_with_cast.hph_1))
      return false;
    if (!this.iph_1.equals(tmp0_other_with_cast.iph_1))
      return false;
    return true;
  };
  function SendClazzInvitesUseCase() {
  }
  function SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda() {
    return 'ContactToServerUseCase: sent OK';
  }
  function SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda_0($e) {
    return function () {
      return 'ContactToServerUseCase:-  exception ' + $e;
    };
  }
  function $invokeCOROUTINE$34(_this__u8e3s4, request, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.sph_1 = _this__u8e3s4;
    this.tph_1 = request;
  }
  protoOf($invokeCOROUTINE$34).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;
            var tmp_0 = this;
            tmp_0.uph_1 = this.sph_1.bpi_1;
            var tmp_1 = this;
            tmp_1.vph_1 = this.sph_1.cpi_1.tnt_1 + 'api/invite/sendclazzinvites';
            var tmp_2 = this;
            tmp_2.wph_1 = this.uph_1;
            var tmp_3 = this;
            tmp_3.xph_1 = this.wph_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.vph_1);
            contentType(this_0, Application_getInstance().v2r_1);
            setBodyJson(this_0, this.sph_1.dpi_1, Companion_getInstance_65().n4r(), this.tph_1);
            tmp_4.yph_1 = this_0;
            this.yph_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_5 = this;
            tmp_5.zph_1 = this.xph_1;
            var tmp_6 = this;
            tmp_6.api_1 = this.yph_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.api_1, this.zph_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_7 = Napier_getInstance();
            tmp_7.k5e(VOID, VOID, SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Error) {
              var e = this.kd_1;
              var tmp_9 = Napier_getInstance();
              tmp_9.k5e(VOID, VOID, SendClazzInvitesUseCaseSendToServerImpl$invoke$lambda_0(e));
              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 SendClazzInvitesUseCaseSendToServerImpl(httpClient, learningSpace, json) {
    this.bpi_1 = httpClient;
    this.cpi_1 = learningSpace;
    this.dpi_1 = json;
  }
  protoOf(SendClazzInvitesUseCaseSendToServerImpl).jph = function (request, $completion) {
    var tmp = new $invokeCOROUTINE$34(this, request, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SetLangResult(waitForRestart) {
    this.epi_1 = waitForRestart;
  }
  protoOf(SetLangResult).toString = function () {
    return 'SetLangResult(waitForRestart=' + this.epi_1 + ')';
  };
  protoOf(SetLangResult).hashCode = function () {
    return getBooleanHashCode(this.epi_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.epi_1 === tmp0_other_with_cast.epi_1))
      return false;
    return true;
  };
  function SetLanguageUseCase() {
  }
  function LaunchOpenLicensesUseCase() {
  }
  function GoToLearningSpaceUseCase() {
  }
  function GetLocalAccountsSupportedUseCase(localAccountsSupported) {
    this.ipi_1 = localAccountsSupported;
  }
  protoOf(GetLocalAccountsSupportedUseCase).qpe = function () {
    return this.ipi_1;
  };
  function MakeLinkUseCase(learningSpace) {
    this.jpi_1 = learningSpace;
  }
  protoOf(MakeLinkUseCase).kpi = function (destName, args) {
    var tmp = UMFileUtil_getInstance();
    Companion_getInstance_96();
    return appendQueryArgs_0(tmp.lpi([this.jpi_1.tnt_1, '/umapp/#/']) + destName, toQueryString(args));
  };
  function GetDefaultDestinationUseCase(systemUrlConfig, learningSpace) {
    this.mpi_1 = systemUrlConfig;
    this.npi_1 = learningSpace;
  }
  protoOf(GetDefaultDestinationUseCase).qpe = function () {
    var tmp;
    if (this.npi_1.tnt_1 === this.mpi_1.uo5_1 ? true : this.npi_1.vnt()) {
      Companion_getInstance_169();
      tmp = 'ContentEntryListHome';
    } else {
      Companion_getInstance_140();
      tmp = 'CourseListHome';
    }
    return tmp;
  };
  function OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, $this) {
    OnClickLinkUseCase.call($this, navController, accountManager, openExternalLinkUseCase, apiUrlConfig.xo5_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.opi_1 = navController;
    this.ppi_1 = accountManager;
    this.qpi_1 = openExternalLinkUseCase;
    this.rpi_1 = userCanSelectServer;
  }
  protoOf(OnClickLinkUseCase).spi = function (link, target) {
    navigateToLink(this.opi_1, link, this.ppi_1, this.qpi_1, VOID, VOID, this.rpi_1, VOID, VOID, target);
  };
  var LinkTarget_BLANK_instance;
  var LinkTarget_TOP_instance;
  var LinkTarget_SELF_instance;
  var LinkTarget_DEFAULT_instance;
  function Companion_49() {
  }
  protoOf(Companion_49).vmg = 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_98;
  function Companion_getInstance_66() {
    return Companion_instance_98;
  }
  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.ofu_1 = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$35(_this__u8e3s4, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bpj_1 = _this__u8e3s4;
    this.cpj_1 = existingAllocations;
    this.dpj_1 = groupUid;
    this.epj_1 = clazzUid;
    this.fpj_1 = assignmentUid;
    this.gpj_1 = numReviewsPerSubmission;
    this.hpj_1 = allocateRemaining;
    this.ipj_1 = resetAllocations;
  }
  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 = 8;
            this.hd_1 = 1;
            suspendResult = this.bpj_1.cpk_1.q7e().m7s(this.epj_1, this.dpj_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jpj_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.kpj_1 = this.jpj_1;
            var tmp_1 = this;
            tmp_1.lpj_1 = this.kpj_1;
            var tmp_2 = this;
            tmp_2.mpj_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.kpj_1, 10));
            this.npj_1 = this.lpj_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.npj_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.opj_1 = this.npj_1.e();
            var tmp_3 = this;
            tmp_3.ppj_1 = this.opj_1;
            var tmp_4 = this;
            tmp_4.qpj_1 = this.bpj_1;
            var tmp_5 = this;
            var this_0 = this.cpj_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.pfu_1.equals(this.ppj_1)) {
                destination.i1(element);
              }
            }

            tmp_5.rpj_1 = this.bpj_1.epk(destination, this.gpj_1);
            var tmp_6 = this;
            tmp_6.spj_1 = this.gpj_1;
            if (this.rpj_1.u() >= this.spj_1) {
              this.tpj_1 = this.rpj_1;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.upj_1 = until(0, this.spj_1 - this.rpj_1.u() | 0);
              var tmp_8 = this;
              tmp_8.vpj_1 = this.upj_1;
              var tmp_9 = this;
              tmp_9.wpj_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.upj_1, 10));
              this.xpj_1 = this.vpj_1.w();
              this.hd_1 = 3;
              continue $sm;
            }

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

            this.ypj_1 = this.xpj_1.e();
            var tmp_10 = this;
            tmp_10.zpj_1 = this.ypj_1;
            var tmp_11 = this;
            tmp_11.apk_1 = new PeerReviewerAllocation();
            var tmp_12 = this;
            tmp_12.bpk_1 = this.apk_1;
            this.hd_1 = 4;
            var tmp_13 = get_doorPrimaryKeyManager(this.bpj_1.cpk_1);
            suspendResult = tmp_13.o62(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var ARGUMENT = suspendResult;
            this.bpk_1.nfu_1 = ARGUMENT;
            this.bpk_1.pfu_1 = this.ppj_1;
            this.bpk_1.qfu_1 = this.fpj_1;
            var ARGUMENT_0 = this.apk_1;
            this.wpj_1.i1(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 5:
            var ARGUMENT_1 = this.wpj_1;
            this.tpj_1 = plus(this.rpj_1, ARGUMENT_1);
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var existingAllocationsForSubmitter = this.tpj_1;
            var ARGUMENT_2 = to(this.ppj_1, existingAllocationsForSubmitter);
            this.mpj_1.i1(ARGUMENT_2);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            var ARGUMENT_3 = this.mpj_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.ipj_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).okq(VOID, new Long(0, 0)));
                }
                 while (inductionVariable <= last);
            }

            if (this.hpj_1) {
              var this_1 = this.jpj_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.ofu_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.gpj_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.ofu_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.pfu_1.equals(allocation.pfu_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.ofu_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.pfu_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.cpk_1 = db;
    this.dpk_1 = systemImpl;
  }
  protoOf(UpdatePeerReviewAllocationUseCase).epk = function (_this__u8e3s4, maxSize) {
    return _this__u8e3s4.u() <= maxSize ? _this__u8e3s4 : _this__u8e3s4.z(0, maxSize);
  };
  protoOf(UpdatePeerReviewAllocationUseCase).fpk = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) {
    var tmp = new $invokeCOROUTINE$35(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UpdatePeerReviewAllocationUseCase).gpk = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion, $super) {
    resetAllocations = resetAllocations === VOID ? false : resetAllocations;
    return $super === VOID ? this.fpk(existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) : $super.fpk.call(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
  };
  function AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation) {
    this.ppk_1 = $effectiveDb;
    this.qpk_1 = $person;
    this.rpk_1 = $systemPermissions;
    this.spk_1 = $createPersonParentApprovalIfMinor;
    this.tpk_1 = $addedByPersonUid;
    this.upk_1 = $relationship;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddNewPersonUseCase$invoke$slambda).fok = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fok(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.ppk_1.n7d().insertAsync(this.qpk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wpk_1 = suspendResult;
            this.xpk_1 = this.qpk_1.f96_1.equals(new Long(0, 0)) ? this.wpk_1 : this.qpk_1.f96_1;
            this.hd_1 = 2;
            suspendResult = this.ppk_1.p7f().yi0(new SystemPermission(VOID, this.xpk_1, VOID, this.rpk_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (isDateOfBirthAMinor(Companion_getInstance_6().fmh(this.qpk_1.o96_1)) ? this.spk_1 : false) {
              this.hd_1 = 3;
              var tmp_0 = this.ppk_1.x7e();
              var tmp1_ppjApprovalTiemstamp = systemTimeInMillis();
              suspendResult = tmp_0.ugs(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, this.tpk_1, this.xpk_1, this.upk_1, VOID, VOID, VOID, 1, tmp1_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.xpk_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).vny = function (it, completion) {
    var i = new AddNewPersonUseCase$invoke$slambda(this.ppk_1, this.qpk_1, this.rpk_1, this.spk_1, this.tpk_1, this.upk_1, completion);
    i.vpk_1 = it;
    return i;
  };
  function AddNewPersonUseCase$invoke$slambda_0($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation) {
    var i = new AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, $relationship, resultContinuation);
    var l = function (it, $completion) {
      return i.fok(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddNewPersonUseCase(db, repo) {
    this.ypk_1 = db;
    this.zpk_1 = repo;
  }
  protoOf(AddNewPersonUseCase).apl = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) {
    var tmp0_elvis_lhs = this.zpk_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.ypk_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, AddNewPersonUseCase$invoke$slambda_0(effectiveDb, person, systemPermissions, createPersonParentApprovalIfMinor, addedByPersonUid, relationship, null), $completion);
  };
  protoOf(AddNewPersonUseCase).bpl = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $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;
    var tmp_0;
    if (relationship === VOID) {
      tmp_0 = 8;
    } else {
      tmp_0 = relationship;
    }
    relationship = tmp_0;
    return $super === VOID ? this.apl(person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion) : $super.apl.call(this, person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, relationship, $completion);
  };
  function BulkAddPersonException(message, errors) {
    message = message === VOID ? null : message;
    IllegalArgumentException_init_$Init$_0(message, this);
    captureStack(this, BulkAddPersonException);
    this.cpl_1 = errors;
  }
  protoOf(BulkAddPersonException).toString = function () {
    var tmp0_elvis_lhs = this.message;
    return (tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs) + ' ' + joinToString(this.cpl_1);
  };
  function $serializer_42() {
    $serializer_instance_42 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsDataError', this, 3);
    tmp0_serialDesc.t4f('lineNum', false);
    tmp0_serialDesc.t4f('colName', false);
    tmp0_serialDesc.t4f('invalidValue', false);
    this.dpl_1 = tmp0_serialDesc;
  }
  protoOf($serializer_42).q44 = function () {
    return this.dpl_1;
  };
  protoOf($serializer_42).k4g = 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_42).s44 = function (decoder) {
    var tmp0_desc = this.dpl_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.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return BulkAddPersonsDataError_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_42).epl = function (encoder, value) {
    var tmp0_desc = this.dpl_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.r49(tmp0_desc, 0, value.fpl_1);
    tmp1_output.w49(tmp0_desc, 1, value.gpl_1);
    tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.hpl_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_42).r44 = function (encoder, value) {
    return this.epl(encoder, value instanceof BulkAddPersonsDataError ? value : THROW_CCE());
  };
  var $serializer_instance_42;
  function $serializer_getInstance_54() {
    if ($serializer_instance_42 == null)
      new $serializer_42();
    return $serializer_instance_42;
  }
  function BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_54().dpl_1);
    }
    $this.fpl_1 = lineNum;
    $this.gpl_1 = colName;
    $this.hpl_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.fpl_1 + ', colName=' + this.gpl_1 + ', invalidValue=' + this.hpl_1 + ')';
  };
  protoOf(BulkAddPersonsDataError).hashCode = function () {
    var result = this.fpl_1;
    result = imul(result, 31) + getStringHashCode(this.gpl_1) | 0;
    result = imul(result, 31) + (this.hpl_1 == null ? 0 : getStringHashCode(this.hpl_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.fpl_1 === tmp0_other_with_cast.fpl_1))
      return false;
    if (!(this.gpl_1 === tmp0_other_with_cast.gpl_1))
      return false;
    if (!(this.hpl_1 == tmp0_other_with_cast.hpl_1))
      return false;
    return true;
  };
  function BulkAddPersonsFromLocalUriUseCase() {
  }
  function Companion_50() {
  }
  var Companion_instance_99;
  function Companion_getInstance_67() {
    return Companion_instance_99;
  }
  function $serializer_43() {
    $serializer_instance_43 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsUseCase.BulkAddUsersResult', this, 1);
    tmp0_serialDesc.t4f('numImported', false);
    this.jpl_1 = tmp0_serialDesc;
  }
  protoOf($serializer_43).q44 = function () {
    return this.jpl_1;
  };
  protoOf($serializer_43).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance()];
  };
  protoOf($serializer_43).s44 = function (decoder) {
    var tmp0_desc = this.jpl_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_input = decoder.i48(tmp0_desc);
    if (tmp5_input.x48()) {
      tmp4_local0 = tmp5_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.j48(tmp0_desc);
    return BulkAddUsersResult_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_43).kpl = function (encoder, value) {
    var tmp0_desc = this.jpl_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.r49(tmp0_desc, 0, value.lpl_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_43).r44 = function (encoder, value) {
    return this.kpl(encoder, value instanceof BulkAddUsersResult ? value : THROW_CCE());
  };
  var $serializer_instance_43;
  function $serializer_getInstance_55() {
    if ($serializer_instance_43 == null)
      new $serializer_43();
    return $serializer_instance_43;
  }
  function BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_55().jpl_1);
    }
    $this.lpl_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.lpl_1 = numImported;
  }
  protoOf(BulkAddUsersResult).toString = function () {
    return 'BulkAddUsersResult(numImported=' + this.lpl_1 + ')';
  };
  protoOf(BulkAddUsersResult).hashCode = function () {
    return this.lpl_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.lpl_1 === tmp0_other_with_cast.lpl_1))
      return false;
    return true;
  };
  function IPhoneNumberUtil() {
  }
  function formatInternationalOrNull(_this__u8e3s4, number) {
    var tmp;
    try {
      tmp = _this__u8e3s4.npl(_this__u8e3s4.mpl(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.opl_1 = showPoweredBy;
  }
  protoOf(GetShowPoweredByUseCase).qpe = function () {
    return this.opl_1;
  };
  function Companion_51() {
    this.ppl_1 = 'en';
  }
  var Companion_instance_100;
  function Companion_getInstance_68() {
    return Companion_instance_100;
  }
  function $invokeCOROUTINE$36(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ypl_1 = _this__u8e3s4;
  }
  protoOf($invokeCOROUTINE$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.zpl_1 = plus(listOf_0(this.ypl_1.hpm_1.gpm_1), this.ypl_1.hpm_1.apm_1);
            this.hd_1 = 1;
            suspendResult = this.ypl_1.ipm_1.w7e().ihs(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.zpl_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.hpm_1 = supportedLangConfig;
    this.ipm_1 = repo;
  }
  protoOf(GetLocaleForSiteTermsUseCase).jpm = function ($completion) {
    var tmp = new $invokeCOROUTINE$36(this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickSendSmsUseCase() {
  }
  function Companion_52() {
    this.kpm_1 = 'dismissed-social-warning-';
  }
  var Companion_instance_101;
  function Companion_getInstance_69() {
    return Companion_instance_101;
  }
  function DismissSocialWarningUseCase(settings) {
    this.lpm_1 = settings;
  }
  protoOf(DismissSocialWarningUseCase).pp1 = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    // Inline function 'com.russhwolf.settings.set' call
    this.lpm_1.zm7(key, true);
  };
  function Companion_53() {
    this.mpm_1 = 'dismissed-social-warning-';
    this.npm_1 = 'https://beinternetawesome.withgoogle.com';
  }
  var Companion_instance_102;
  function Companion_getInstance_70() {
    return Companion_instance_102;
  }
  function ShowSocialWarningUseCase(settings) {
    this.opm_1 = settings;
  }
  protoOf(ShowSocialWarningUseCase).np9 = function (username) {
    var key = 'dismissed-social-warning-' + (username == null ? 'guest' : username);
    return !this.opm_1.am8(key, false);
  };
  function GetOfflineStorageAvailableSpace() {
  }
  function Companion_54() {
    this.qpm_1 = 'offlineStoragePath';
  }
  var Companion_instance_103;
  function Companion_getInstance_71() {
    return Companion_instance_103;
  }
  function GetOfflineStorageOptionsUseCase() {
  }
  function GetOfflineStorageSettingUseCase(getOfflineStorageOptionsUseCase, settings) {
    this.rpm_1 = getOfflineStorageOptionsUseCase;
    this.spm_1 = settings;
  }
  protoOf(GetOfflineStorageSettingUseCase).qpe = function () {
    var setting = this.spm_1.ym7('offlineStoragePath');
    var options = this.rpm_1.qpe();
    // 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.upm_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.tpm_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.upm_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.tpm_1.equals(tmp0_other_with_cast.tpm_1))
      return false;
    if (!(this.upm_1 === tmp0_other_with_cast.upm_1))
      return false;
    return true;
  };
  function SetOfflineStorageSettingUseCase(settings) {
    this.vpm_1 = settings;
  }
  function DeleteUrisUseCase() {
  }
  function IsTempFileCheckerUseCase() {
  }
  function ChunkIterator(chunkInfo) {
    this.wpm_1 = chunkInfo;
    this.xpm_1 = 0;
  }
  protoOf(ChunkIterator).f = function () {
    return this.xpm_1 < this.wpm_1.cpn_1;
  };
  protoOf(ChunkIterator).e = function () {
    // Inline function 'kotlin.also' call
    var this_0 = this.wpm_1.v(this.xpm_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkIterator.next.<anonymous>' call
    this.xpm_1 = this.xpm_1 + 1 | 0;
    return this_0;
  };
  function Chunk(start, end, isLastChunk, size) {
    size = size === VOID ? end.mc(start).mb() : size;
    this.dpn_1 = start;
    this.epn_1 = end;
    this.fpn_1 = isLastChunk;
    this.gpn_1 = size;
  }
  protoOf(Chunk).toString = function () {
    return 'Chunk(start=' + this.dpn_1.toString() + ', end=' + this.epn_1.toString() + ', isLastChunk=' + this.fpn_1 + ', size=' + this.gpn_1 + ')';
  };
  protoOf(Chunk).hashCode = function () {
    var result = this.dpn_1.hashCode();
    result = imul(result, 31) + this.epn_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fpn_1) | 0;
    result = imul(result, 31) + this.gpn_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.dpn_1.equals(tmp0_other_with_cast.dpn_1))
      return false;
    if (!this.epn_1.equals(tmp0_other_with_cast.epn_1))
      return false;
    if (!(this.fpn_1 === tmp0_other_with_cast.fpn_1))
      return false;
    if (!(this.gpn_1 === tmp0_other_with_cast.gpn_1))
      return false;
    return true;
  };
  function ChunkInfo(totalSize, chunkSize, fromByte) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    this.ypm_1 = totalSize;
    this.zpm_1 = chunkSize;
    this.apn_1 = fromByte;
    this.bpn_1 = this.ypm_1.mc(this.apn_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.bpn_1;
    var other = this.zpm_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.bpn_1;
    var other_0 = this.zpm_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.cpn_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.zpm_1)).lc(this.apn_1);
    // Inline function 'kotlin.math.min' call
    // Inline function 'kotlin.Long.plus' call
    var other = this.zpm_1;
    var a = start.lc(toLong(other));
    var b = this.ypm_1;
    var end = a.c7(b) <= 0 ? a : b;
    var isLastChunk = index === (this.cpn_1 - 1 | 0);
    return new Chunk(start, end, isLastChunk);
  };
  function UploadProgress(bytesTransferred, totalBytes) {
    this.hpn_1 = bytesTransferred;
    this.ipn_1 = totalBytes;
  }
  protoOf(UploadProgress).toString = function () {
    return 'UploadProgress(bytesTransferred=' + this.hpn_1.toString() + ', totalBytes=' + this.ipn_1.toString() + ')';
  };
  protoOf(UploadProgress).hashCode = function () {
    var result = this.hpn_1.hashCode();
    result = imul(result, 31) + this.ipn_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.hpn_1.equals(tmp0_other_with_cast.hpn_1))
      return false;
    if (!this.ipn_1.equals(tmp0_other_with_cast.ipn_1))
      return false;
    return true;
  };
  function LastChunkResponse(body, statusCode, headers) {
    this.jpn_1 = body;
    this.kpn_1 = statusCode;
    this.lpn_1 = headers;
  }
  protoOf(LastChunkResponse).toString = function () {
    return 'LastChunkResponse(body=' + this.jpn_1 + ', statusCode=' + this.kpn_1 + ', headers=' + this.lpn_1 + ')';
  };
  protoOf(LastChunkResponse).hashCode = function () {
    var result = this.jpn_1 == null ? 0 : getStringHashCode(this.jpn_1);
    result = imul(result, 31) + this.kpn_1 | 0;
    result = imul(result, 31) + hashCode(this.lpn_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.jpn_1 == tmp0_other_with_cast.jpn_1))
      return false;
    if (!(this.kpn_1 === tmp0_other_with_cast.kpn_1))
      return false;
    if (!equals(this.lpn_1, tmp0_other_with_cast.lpn_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_55() {
    this.opn_1 = 524288;
  }
  var Companion_instance_104;
  function Companion_getInstance_72() {
    return Companion_instance_104;
  }
  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 GetUsernameSuggestionUseCase$invoke$lambda($usernameSuggestion) {
    return function () {
      return 'GetUsernameSuggestionUseCase:  ' + $usernameSuggestion;
    };
  }
  function GetUsernameSuggestionUseCase$invoke$lambda_0($e) {
    return function () {
      return 'GetUsernameSuggestionUseCase:-  exception ' + $e;
    };
  }
  function $invokeCOROUTINE$40(_this__u8e3s4, name, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xpn_1 = _this__u8e3s4;
    this.ypn_1 = name;
  }
  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 = 4;
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.zpn_1 = this.xpn_1.fpo_1;
            var tmp_1 = this;
            tmp_1.apo_1 = this.zpn_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, removeSuffix(this.xpn_1.gpo_1.tnt_1, '/') + '/api/username/getsuggestion');
            parameter(this_0, 'name', this.ypn_1);
            tmp_2.bpo_1 = this_0;
            this.bpo_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.cpo_1 = this.apo_1;
            var tmp_4 = this;
            tmp_4.dpo_1 = this.bpo_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.dpo_1, this.cpo_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            var usernameSuggestion = suspendResult;
            var tmp_5 = Napier_getInstance();
            tmp_5.k5e(VOID, VOID, GetUsernameSuggestionUseCase$invoke$lambda(usernameSuggestion));
            return usernameSuggestion;
          case 3:
            this.id_1 = 4;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              var tmp_7 = Napier_getInstance();
              tmp_7.k5e(VOID, VOID, GetUsernameSuggestionUseCase$invoke$lambda_0(e));
              throw e;
            } else {
              throw this.kd_1;
            }

          case 4:
            throw this.kd_1;
          case 5:
            this.id_1 = 4;
            return Unit_instance;
        }
      } 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 GetUsernameSuggestionUseCase(httpClient, learningSpace) {
    this.fpo_1 = httpClient;
    this.gpo_1 = learningSpace;
  }
  protoOf(GetUsernameSuggestionUseCase).hpo = function (name, $completion) {
    var tmp = new $invokeCOROUTINE$40(this, name, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function StartUserSessionUseCase(accountManager) {
    this.ipo_1 = accountManager;
  }
  protoOf(StartUserSessionUseCase).jpo = function (session, nextDest, navController, goOptions, dontSetCurrentSession) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.ipo_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.lnx(session);
    }
    navigateToViewUri(navController, appendSelectedAccount(nextDest, session.lnu_1.f96_1, session.mnu_1), goOptions);
  };
  protoOf(StartUserSessionUseCase).kpo = function (session, nextDest, navController, goOptions, dontSetCurrentSession, $super) {
    var tmp;
    if (nextDest === VOID) {
      Companion_getInstance_140();
      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.jpo(session, nextDest, navController, goOptions, dontSetCurrentSession);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.jpo.call(this, session, nextDest, navController, goOptions, dontSetCurrentSession);
    }
    return tmp_0;
  };
  function ValidateEmailUseCase() {
  }
  protoOf(ValidateEmailUseCase).np9 = 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_56() {
    Companion_instance_105 = this;
    this.jpe_1 = 3;
    this.kpe_1 = 30;
    this.lpe_1 = setOf([new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95))]);
  }
  protoOf(Companion_56).lpo = function (character) {
    return isLetter(character) ? true : isDigit(character) ? true : this.lpe_1.a1(new Char(character)) ? true : false;
  };
  var Companion_instance_105;
  function Companion_getInstance_73() {
    if (Companion_instance_105 == null)
      new Companion_56();
    return Companion_instance_105;
  }
  function ValidateUsernameUseCase_0() {
    Companion_getInstance_73();
  }
  protoOf(ValidateUsernameUseCase_0).np9 = function (username) {
    var tmp;
    if (username.length < 3) {
      tmp = Companion_getInstance_74().npo_1;
    } else {
      if (username.length > 30) {
        tmp = Companion_getInstance_74().opo_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_74().ppo_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_73().lpo(element)) {
                tmp$ret$1 = false;
                break $l$block;
              }
            }
            tmp$ret$1 = true;
          }
          if (!tmp$ret$1) {
            tmp = Companion_getInstance_74().qpo_1;
          } else {
            tmp = Companion_getInstance_74().mpo_1;
          }
        }
      }
    }
    return tmp;
  };
  function Companion_57() {
    Companion_instance_106 = this;
    this.mpo_1 = new ValidationResult();
    this.npo_1 = new ValidationResult(strings_getInstance().zn7_1);
    this.opo_1 = new ValidationResult(strings_getInstance().an8_1);
    this.ppo_1 = new ValidationResult(strings_getInstance().bn8_1);
    this.qpo_1 = new ValidationResult(strings_getInstance().cn8_1);
  }
  var Companion_instance_106;
  function Companion_getInstance_74() {
    if (Companion_instance_106 == null)
      new Companion_57();
    return Companion_instance_106;
  }
  function ValidationResult(errorMessage) {
    Companion_getInstance_74();
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.rpo_1 = errorMessage;
  }
  protoOf(ValidationResult).toString = function () {
    return 'ValidationResult(errorMessage=' + this.rpo_1 + ')';
  };
  protoOf(ValidationResult).hashCode = function () {
    return this.rpo_1 == null ? 0 : this.rpo_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.rpo_1, tmp0_other_with_cast.rpo_1))
      return false;
    return true;
  };
  function isAnonymous(_this__u8e3s4) {
    return ((_this__u8e3s4.zj3_1 == null ? _this__u8e3s4.xj3_1 == null : false) ? _this__u8e3s4.aj4_1 == null : false) ? _this__u8e3s4.yj3_1 == null : false;
  }
  function _get_isIdOnly__t0wrie(_this__u8e3s4, $this) {
    var tmp;
    var tmp_0;
    if (_this__u8e3s4.wip_1 == null ? _this__u8e3s4.xip_1 == null : false) {
      var tmp_1 = _this__u8e3s4.yip_1;
      tmp_0 = tmp_1 === 0;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = _this__u8e3s4.zip_1 == null;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation) {
    this.app_1 = $activityEntities;
    this.bpp_1 = $timeNow;
    this.cpp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(StoreActivitiesUseCase$invoke$slambda).jpq = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.jpq(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.app_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.kpq_1.gl0(VOID, VOID, VOID, VOID, VOID, VOID, this.bpp_1));
            }

            tmp_0.epp_1 = destination;
            this.hd_1 = 1;
            suspendResult = this.cpp_1.qpq_1.h7e().pip(this.epp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var this_1 = this.epp_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.cpp_1)) {
                destination_0.i1(element);
              }
            }

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

            this.hpp_1 = this.gpp_1.e();
            var tmp_2 = this;
            tmp_2.ipp_1 = this.hpp_1;
            this.hd_1 = 3;
            suspendResult = this.cpp_1.qpq_1.h7e().qip(this.ipp_1.uip_1, this.ipp_1.xip_1, this.bpp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            suspendResult = this.cpp_1.qpq_1.h7e().rip(this.ipp_1.uip_1, this.ipp_1.wip_1, this.ipp_1.xip_1, this.ipp_1.yip_1, this.ipp_1.zip_1, this.bpp_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.app_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.lpq_1;
              addAll(destination_1, list);
            }

            tmp_3.jpp_1 = destination_1;
            var tmp_4 = this;
            var this_3 = this.app_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.mpq_1;
              addAll(destination_2, list_0);
            }

            tmp_4.kpp_1 = destination_2;
            this.hd_1 = 6;
            var tmp_5 = this.cpp_1.ppq_1.w7f();
            var this_4 = this.kpp_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.hiv_1);
            }

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

            continue $sm;
          case 6:
            this.lpp_1 = suspendResult;
            this.mpp_1 = toSet(this.lpp_1);
            this.hd_1 = 7;
            var tmp_6 = this.cpp_1.qpq_1.w7f();
            var this_5 = this.kpp_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.mpp_1.a1(element_2.hiv_1)) {
                destination_4.i1(element_2);
              }
            }

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

            continue $sm;
          case 7:
            var tmp_7 = this;
            var this_6 = this.jpp_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.nix_1.equals(new Long(0, 0))) {
                first.i1(element_3);
              } else {
                second.i1(element_3);
              }
            }

            tmp_7.npp_1 = new Pair(first, second);
            this.opp_1 = this.npp_1.y6();
            this.ppp_1 = this.npp_1.z6();
            this.hd_1 = 8;
            suspendResult = this.cpp_1.qpq_1.v7f().cix(this.opp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            var tmp_8 = this;
            tmp_8.qpp_1 = this.ppp_1;
            this.rpp_1 = this.qpp_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.rpp_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.spp_1 = this.rpp_1.e();
            var tmp_9 = this;
            tmp_9.tpp_1 = this.spp_1;
            this.upp_1 = this.cpp_1.qpq_1.v7f();
            this.vpp_1 = this.tpp_1.iix_1;
            this.wpp_1 = this.tpp_1.nix_1;
            this.xpp_1 = this.tpp_1.lix_1;
            this.ypp_1 = this.tpp_1.mix_1;
            this.zpp_1 = this.tpp_1.kix_1;
            this.apq_1 = this.tpp_1.jix_1;
            this.hd_1 = 10;
            suspendResult = this.upp_1.dix(this.vpp_1, this.apq_1, this.xpp_1, this.zpp_1, this.ypp_1, this.wpp_1, this.bpp_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.bpq_1 = this.jpp_1;
            this.cpq_1 = this.bpq_1.w();
            this.hd_1 = 12;
            continue $sm;
          case 12:
            if (!this.cpq_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.dpq_1 = this.cpq_1.e();
            var tmp_11 = this;
            tmp_11.epq_1 = this.dpq_1;
            this.hd_1 = 13;
            suspendResult = this.cpp_1.qpq_1.v7f().eix(this.epq_1.iix_1, this.epq_1.jix_1, this.epq_1.mix_1, this.bpp_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.cpp_1.qpq_1.x7f();
            var this_7 = this.app_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.npq_1;
              addAll(destination_5, list_1);
            }

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

            continue $sm;
          case 15:
            var tmp_13 = this;
            var this_8 = this.app_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.opq_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.fpq_1 = tmp_14;
            if (this.fpq_1 == null) {
              this.gpq_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              var tmp_15 = this;
              tmp_15.hpq_1 = this.fpq_1;
              var tmp_16 = this;
              tmp_16.ipq_1 = this.hpq_1;
              this.hd_1 = 16;
              suspendResult = this.cpp_1.qpq_1.y7f().hjd(this.ipq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            this.gpq_1 = this.hpq_1;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return this.gpq_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).vny = function (it, completion) {
    var i = new StoreActivitiesUseCase$invoke$slambda(this.app_1, this.bpp_1, this.cpp_1, completion);
    i.dpp_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.jpq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$41(_this__u8e3s4, activityEntities, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zpq_1 = _this__u8e3s4;
    this.apr_1 = activityEntities;
  }
  protoOf($invokeCOROUTINE$41).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.bpr_1 = systemTimeInMillis();
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.zpq_1.qpq_1, VOID, StoreActivitiesUseCase$invoke$slambda_0(this.apr_1, this.bpr_1, this.zpq_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.ppq_1 = db;
    var tmp = this;
    tmp.qpq_1 = repo == null ? this.ppq_1 : repo;
  }
  protoOf(StoreActivitiesUseCase).cpr = function (activityEntities, $completion) {
    var tmp = new $invokeCOROUTINE$41(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.dpr_1 = responseCode;
  }
  function XapiJson$_init_$lambda_lhwgtd($this$Json) {
    $this$Json.d4q_1 = false;
    $this$Json.f4q_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.epr_1 = json;
  }
  protoOf(XapiJson).toString = function () {
    return 'XapiJson(json=' + this.epr_1 + ')';
  };
  protoOf(XapiJson).hashCode = function () {
    return hashCode(this.epr_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.epr_1, tmp0_other_with_cast.epr_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().o2r(timestampStr).emh();
    } 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().o2r(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.fpr_1 = statementUuids;
  }
  protoOf(StatementStoreResult).toString = function () {
    return 'StatementStoreResult(statementUuids=' + this.fpr_1 + ')';
  };
  protoOf(StatementStoreResult).hashCode = function () {
    return hashCode(this.fpr_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.fpr_1, tmp0_other_with_cast.fpr_1))
      return false;
    return true;
  };
  function storeStatements($this, statements, xapiSession, $completion) {
    var tmp = new $storeStatementsCOROUTINE$42($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.cps_1 = $statementEntities;
    this.dps_1 = this$0;
    this.eps_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiStatementResource$storeStatements$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiStatementResource$storeStatements$slambda).he = function (p1, $completion) {
    return this.uny(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.cps_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.zps_1;
                var tmp_1;
                if (tmp0_safe_receiver == null) {
                  tmp_1 = null;
                } else {
                  tmp_1 = tmp0_safe_receiver.yjf_1 ? tmp0_safe_receiver.gjf_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.gps_1 = this.dps_1.rok_1.z7f();
              this.hps_1 = this.eps_1.ijz_1;
              this.ips_1 = systemTimeInMillis();
              this.hd_1 = 1;
              suspendResult = this.gps_1.ajz(true, this.ips_1, this.hps_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.dps_1.rok_1.j7e();
            var this_1 = this.cps_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.zps_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_0);
              }
            }

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

            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_3 = this.dps_1.rok_1.a7g();
            var this_2 = this.cps_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.apt_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_1);
              }
            }

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

            continue $sm;
          case 4:
            var tmp_4 = this;
            var this_3 = this.cps_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.bpt_1;
              var list = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
              addAll(destination_1, list);
            }

            tmp_4.jps_1 = destination_1;
            var tmp_5 = this;
            var this_4 = this.jps_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.ept_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.ej4_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.kps_1 = tmp_7;
            if (this.kps_1 == null) {
              this.lps_1 = null;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.mps_1 = this.kps_1;
              var tmp_9 = this;
              tmp_9.nps_1 = this.mps_1;
              this.hd_1 = 5;
              suspendResult = insertOrUpdateActorsIfNameChanged(this.dps_1.rok_1.k7e(), this.nps_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 5:
            this.lps_1 = this.mps_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var tmp_10 = this;
            var this_5 = this.jps_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.ept_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.ej4_1;
              if (tmp_11 === 2) {
                destination_5.i1(element_4);
              }
            }

            tmp_10.ops_1 = destination_5;
            this.hd_1 = 7;
            var tmp_12 = this.dps_1.mok_1.k7e();
            var this_6 = this.ops_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.uj3_1);
            }

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

            continue $sm;
          case 7:
            this.pps_1 = suspendResult;
            var tmp_13 = this;
            var this_7 = this.jps_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.fpt_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.uj3_1, element_6);
            }

            tmp_13.qps_1 = destination_8;
            var tmp_14 = this;
            tmp_14.rps_1 = this.ops_1;
            this.sps_1 = this.rps_1.w();
            this.hd_1 = 8;
            continue $sm;
          case 8:
            if (!this.sps_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.tps_1 = this.sps_1.e();
            var tmp_15 = this;
            tmp_15.ups_1 = this.tps_1;
            var tmp_16 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_10 = this.pps_1.w();
              while (tmp0_iterator_10.f()) {
                var element_7 = tmp0_iterator_10.e();
                if (element_7.wj4_1.equals(this.ups_1.uj3_1)) {
                  tmp$ret$2 = element_7;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            tmp_16.vps_1 = tmp$ret$2;
            var tmp_17 = this;
            var tmp_18;
            if (!isAnonymous(this.ups_1)) {
              var tmp_19 = this.ups_1.cj4_1;
              var tmp0_safe_receiver_2 = this.vps_1;
              tmp_18 = !tmp_19.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.xj4_1);
            } else {
              tmp_18 = true;
            }

            tmp_17.wps_1 = tmp_18;
            var tmp_20 = this;
            var this_8 = this.jps_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.gpt_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.rj8_1.equals(this.ups_1.uj3_1)) {
                destination_10.i1(element_9);
              }
            }

            tmp_20.xps_1 = destination_10;
            var tmp_21 = this;
            var this_9 = this.xps_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.qps_1.q(element_10.sj8_1);
              if (tmp0_safe_receiver_3 == null)
                null;
              else {
                destination_11.i1(tmp0_safe_receiver_3);
              }
            }

            tmp_21.yps_1 = destination_11;
            this.hd_1 = 9;
            suspendResult = insertOrUpdateActorsIfNameChanged(this.dps_1.rok_1.k7e(), this.yps_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            if (!this.wps_1 ? !(this.vps_1 == null) : false) {
              this.hd_1 = 12;
              var tmp_22 = this.dps_1.rok_1.u7f();
              var this_10 = this.xps_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.cl1(VOID, VOID, this.vps_1.yj4_1));
              }
              suspendResult = insertOrUpdateIfLastModChanged(tmp_22, destination_12, this.vps_1.yj4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              suspendResult = this.dps_1.rok_1.k7e().yj2(listOf_0(this.ups_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            suspendResult = this.dps_1.rok_1.u7f().nj8(this.xps_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.dps_1.rok_1.g7e();
            var this_11 = this.cps_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.cpt_1;
              var tmp0_safe_receiver_5 = tmp0_safe_receiver_4 == null ? null : tmp0_safe_receiver_4.hpt_1;
              if (tmp0_safe_receiver_5 == null)
                null;
              else {
                destination_13.i1(tmp0_safe_receiver_5);
              }
            }

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

            continue $sm;
          case 15:
            this.hd_1 = 16;
            var tmp_24 = this.dps_1.rok_1.t7f();
            var this_12 = this.cps_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.cpt_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_6 == null ? null : tmp0_safe_receiver_6.ipt_1;
              var list_2 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
              addAll(destination_14, list_2);
            }

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

            continue $sm;
          case 16:
            this.hd_1 = 17;
            var this_13 = this.cps_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.dpt_1;
              var list_3 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
              addAll(destination_15, list_3);
            }

            suspendResult = this.dps_1.qok_1.cpr(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).vny = function (it, completion) {
    var i = new XapiStatementResource$storeStatements$slambda(this.cps_1, this.dps_1, this.eps_1, completion);
    i.fps_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $storeStatementsCOROUTINE$42(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.opr_1 = _this__u8e3s4;
    this.ppr_1 = statements;
    this.qpr_1 = xapiSession;
  }
  protoOf($storeStatementsCOROUTINE$42).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.rpr_1 = identifierHash(agent(this.qpr_1, this.opr_1.ook_1), this.opr_1.nok_1);
            var tmp_0 = this;
            var it = knownActorUidToPersonUidsMap(this.qpr_1, this.opr_1.sok_1);
            var tmp_1;
            if (!it.r(this.rpr_1)) {
              tmp_1 = plus_3(it, to(this.rpr_1, this.qpr_1.njz_1));
            } else {
              tmp_1 = it;
            }

            tmp_0.spr_1 = tmp_1;
            var tmp_2 = this;
            var this_0 = this.ppr_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.ymd().toString();
              var tmp1_elvis_lhs = element.ppt_1;
              var tmp4_timestamp = tmp1_elvis_lhs == null ? timeNowStr : tmp1_elvis_lhs;
              var tmp0_elvis_lhs = xapiRequireValidUuidOrNullAsString(element.jpt_1);
              var tmp5_id = tmp0_elvis_lhs == null ? randomUuidAsString() : tmp0_elvis_lhs;
              var tmp2_name = this.qpr_1.pjz_1;
              var tmp3_homePage = this.opr_1.ook_1.tnt_1;
              var tmp6_authority = new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(tmp3_homePage, tmp2_name));
              var exactStatement = element.vpt(tmp5_id, VOID, VOID, VOID, VOID, VOID, tmp4_timestamp, timeNowStr, tmp6_authority);
              var tmp7_stringHasher = this.opr_1.nok_1;
              var tmp8_exactJson = this.opr_1.sok_1.r45(Companion_getInstance_90().n4r(), exactStatement);
              var tmp9_primaryKeyManager = get_doorPrimaryKeyManager(this.opr_1.mok_1);
              var tmp10_hasherFactory = this.opr_1.pok_1;
              var tmp11_json = this.opr_1.sok_1;
              var tmp12_learningSpace = this.opr_1.ook_1;
              var list = toEntities_3(exactStatement, tmp7_stringHasher, tmp9_primaryKeyManager, tmp10_hasherFactory, tmp11_json, this.qpr_1, this.spr_1, tmp8_exactJson, false, tmp12_learningSpace);
              addAll(destination, list);
            }

            tmp_2.tpr_1 = destination;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.opr_1.rok_1, VOID, XapiStatementResource$storeStatements$slambda_0(this.tpr_1, this.opr_1, this.qpr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_1 = this.tpr_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.zps_1;
              var tmp_3;
              if (tmp0_safe_receiver == null) {
                tmp_3 = null;
              } else {
                tmp_3 = Uuid_init_$Create$(tmp0_safe_receiver.wje_1, tmp0_safe_receiver.xje_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$44(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fpu_1 = _this__u8e3s4;
    this.gpu_1 = statements;
    this.hpu_1 = xapiSession;
  }
  protoOf($postCOROUTINE$44).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.fpu_1, this.gpu_1, this.hpu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return ARGUMENT.fpr_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, learningSpace, xapiJson, hasherFactory, storeActivitiesUseCase) {
    this.mok_1 = db;
    this.nok_1 = xxHasher;
    this.ook_1 = learningSpace;
    this.pok_1 = hasherFactory;
    this.qok_1 = storeActivitiesUseCase;
    var tmp = this;
    tmp.rok_1 = repo == null ? this.mok_1 : repo;
    this.sok_1 = xapiJson.epr_1;
  }
  protoOf(XapiStatementResource).tok = function (statements, xapiSession, $completion) {
    var tmp = new $postCOROUTINE$44(this, statements, xapiSession, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XapiGroupAndPersonUidMap(group, actorUidToPersonUidMap) {
    this.gom_1 = group;
    this.hom_1 = actorUidToPersonUidMap;
  }
  protoOf(XapiGroupAndPersonUidMap).toString = function () {
    return 'XapiGroupAndPersonUidMap(group=' + this.gom_1 + ', actorUidToPersonUidMap=' + this.hom_1 + ')';
  };
  protoOf(XapiGroupAndPersonUidMap).hashCode = function () {
    var result = this.gom_1.hashCode();
    result = imul(result, 31) + hashCode(this.hom_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.gom_1.equals(tmp0_other_with_cast.gom_1))
      return false;
    if (!equals(this.hom_1, tmp0_other_with_cast.hom_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$46(_this__u8e3s4, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qpu_1 = _this__u8e3s4;
    this.rpu_1 = groupSetUid;
    this.spu_1 = groupNum;
    this.tpu_1 = clazzUid;
    this.upu_1 = assignmentUid;
    this.vpu_1 = accountPersonUid;
  }
  protoOf($invokeCOROUTINE$46).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.qpu_1.com_1.s7d().vd3(this.rpu_1, this.spu_1, this.tpu_1, this.upu_1, this.vpu_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.cd6_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toXapiAgent(tmp0_safe_receiver, this.qpu_1.dom_1);
              var tmp_0;
              if (tmp1_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = element.bd6_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.sd4_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.qpu_1.dom_1.tnt_1, 'cgs-' + this.rpu_1.toString() + '-' + this.spu_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.qpu_1.eom_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, learningSpace, stringHasher) {
    this.com_1 = repo;
    this.dom_1 = learningSpace;
    this.eom_1 = stringHasher;
  }
  protoOf(CreateXapiGroupForCourseGroupUseCase).fom = function (groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$46(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$47(_this__u8e3s4, actors, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateActorsIfNameChangedCOROUTINE$47(_this__u8e3s4, actors, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.epv_1 = _this__u8e3s4;
    this.fpv_1 = actors;
  }
  protoOf($insertOrUpdateActorsIfNameChangedCOROUTINE$47).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.epv_1.xj2(this.fpv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gpv_1 = systemTimeInMillis();
            var tmp_0 = this;
            tmp_0.hpv_1 = this.fpv_1;
            this.ipv_1 = this.hpv_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.ipv_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.jpv_1 = this.ipv_1.e();
            var tmp_1 = this;
            tmp_1.kpv_1 = this.jpv_1;
            this.hd_1 = 3;
            suspendResult = this.epv_1.zj2(this.kpv_1.uj3_1, this.kpv_1.wj3_1, this.gpv_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$48(_this__u8e3s4, memberJoins, lastModTime, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateIfLastModChangedCOROUTINE$48(_this__u8e3s4, memberJoins, lastModTime, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tpv_1 = _this__u8e3s4;
    this.upv_1 = memberJoins;
    this.vpv_1 = lastModTime;
  }
  protoOf($insertOrUpdateIfLastModChangedCOROUTINE$48).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.tpv_1.mj8(this.upv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.wpv_1 = this.upv_1;
            this.xpv_1 = this.wpv_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.xpv_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.ypv_1 = this.xpv_1.e();
            var tmp_1 = this;
            tmp_1.zpv_1 = this.ypv_1;
            this.hd_1 = 3;
            suspendResult = this.tpv_1.oj8(this.zpv_1.rj8_1, this.zpv_1.sj8_1, this.vpv_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, learningSpace) {
    var tmp0_account = new XapiAccount(learningSpace.tnt_1, _this__u8e3s4.pjz_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.ak0_1;
    if (charSequenceLength(this_0) > 0) {
      tmp = json.s45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), _this__u8e3s4.ak0_1);
    } else {
      tmp = emptyMap();
    }
    return tmp;
  }
  function authorizationHeader(_this__u8e3s4) {
    return 'Basic ' + encodeBase64(_this__u8e3s4.ijz_1.toString() + ':' + _this__u8e3s4.yjz_1);
  }
  function get_registrationUuid(_this__u8e3s4) {
    return Uuid_init_$Create$(_this__u8e3s4.kjz_1, _this__u8e3s4.ljz_1);
  }
  function get_resultProgressExtension(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.npt_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fpw_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 FormattedStatementResponse(string, stringResource) {
    stringResource = stringResource === VOID ? null : stringResource;
    this.gpw_1 = string;
    this.hpw_1 = stringResource;
  }
  protoOf(FormattedStatementResponse).ipw = function () {
    return !(this.gpw_1 == null) ? true : !(this.hpw_1 == null);
  };
  protoOf(FormattedStatementResponse).toString = function () {
    return 'FormattedStatementResponse(string=' + this.gpw_1 + ', stringResource=' + this.hpw_1 + ')';
  };
  protoOf(FormattedStatementResponse).hashCode = function () {
    var result = this.gpw_1 == null ? 0 : getStringHashCode(this.gpw_1);
    result = imul(result, 31) + (this.hpw_1 == null ? 0 : this.hpw_1.hashCode()) | 0;
    return result;
  };
  protoOf(FormattedStatementResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof FormattedStatementResponse))
      return false;
    var tmp0_other_with_cast = other instanceof FormattedStatementResponse ? other : THROW_CCE();
    if (!(this.gpw_1 == tmp0_other_with_cast.gpw_1))
      return false;
    if (!equals(this.hpw_1, tmp0_other_with_cast.hpw_1))
      return false;
    return true;
  };
  function Companion_58() {
    Companion_instance_107 = this;
    var tmp = this;
    tmp.jpw_1 = listOf([2, 7, 8, 5, 6]);
  }
  var Companion_instance_107;
  function Companion_getInstance_75() {
    if (Companion_instance_107 == null)
      new Companion_58();
    return Companion_instance_107;
  }
  function FormatStatementResponseUseCase$invoke$slambda($activityEntity, $statement, this$0, resultContinuation) {
    this.spw_1 = $activityEntity;
    this.tpw_1 = $statement;
    this.upw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(FormatStatementResponseUseCase$invoke$slambda).gpx = function ($this$flow, $completion) {
    var tmp = this.hpx($this$flow, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(FormatStatementResponseUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.gpx((!(p1 == null) ? isInterface(p1, FlowCollector) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(FormatStatementResponseUseCase$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;
            var tmp0_safe_receiver = this.spw_1;
            tmp_0.wpw_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yip_1;
            this.xpw_1 = this.tpw_1.njf_1;
            var tmp_1;
            if (this.xpw_1 == null ? true : this.wpw_1 == null) {
              tmp_1 = true;
            } else {
              tmp_1 = this.wpw_1 === 0;
            }

            if (tmp_1) {
              this.hd_1 = 10;
              var tmp1_safe_receiver = this.xpw_1;
              var tmp_2;
              if (tmp1_safe_receiver == null) {
                tmp_2 = null;
              } else {
                tmp_2 = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
              }
              suspendResult = this.vpw_1.t1d(new FormattedStatementResponse(tmp_2), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            this.ypw_1 = this.wpw_1;
            if (Companion_getInstance_75().jpw_1.a1(this.ypw_1)) {
              var tmp_3 = this;
              tmp_3.zpw_1 = listOfNotNull([this.upw_1.ipx_1, this.upw_1.jpx_1]);
              this.apx_1 = this.zpw_1.w();
              this.hd_1 = 5;
              continue $sm;
            } else {
              if (this.ypw_1 === 1) {
                this.bpx_1 = toBooleanStrictOrNull(this.xpw_1);
                this.hd_1 = 4;
                var tmp_4;
                if (this.bpx_1 === true) {
                  tmp_4 = strings_getInstance().znq_1;
                } else if (this.bpx_1 === false) {
                  tmp_4 = strings_getInstance().anr_1;
                } else {
                  tmp_4 = null;
                }
                suspendResult = this.vpw_1.t1d(new FormattedStatementResponse(null, tmp_4), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_5;
                if (this.ypw_1 === 3) {
                  tmp_5 = true;
                } else {
                  tmp_5 = this.ypw_1 === 4;
                }
                if (tmp_5) {
                  this.hd_1 = 3;
                  var this_0 = htmlToPlainText(replace(this.xpw_1, '[,]', ', '));
                  suspendResult = this.vpw_1.t1d(new FormattedStatementResponse(toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()))), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.hd_1 = 2;
                  var this_1 = htmlToPlainText(this.xpw_1);
                  suspendResult = this.vpw_1.t1d(new FormattedStatementResponse(toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()))), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 2:
            this.hd_1 = 9;
            continue $sm;
          case 3:
            this.hd_1 = 9;
            continue $sm;
          case 4:
            this.hd_1 = 9;
            continue $sm;
          case 5:
            if (!this.apx_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.cpx_1 = this.apx_1.e();
            var tmp_6 = this;
            tmp_6.dpx_1 = this.cpx_1;
            this.hd_1 = 6;
            suspendResult = this.dpx_1.v7f().fix(this.tpw_1.bjf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.epx_1 = suspendResult;
            var tmp_7 = this;
            var tmp0_subject = this.wpw_1;
            var tmp_8;
            var tmp_9;
            var tmp_10;
            if (tmp0_subject === 2) {
              tmp_10 = true;
            } else {
              tmp_10 = tmp0_subject === 7;
            }

            if (tmp_10) {
              tmp_9 = true;
            } else {
              tmp_9 = tmp0_subject === 8;
            }

            if (tmp_9) {
              var tmp_11;
              if (this.wpw_1 === 8) {
                tmp_11 = 'scale';
              } else {
                tmp_11 = 'choices';
              }
              var propPrefix = tmp_11;
              var responseIds = split(this.xpw_1, ['[,]']);
              var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(responseIds, 10));
              var tmp0_iterator = responseIds.w();
              while (tmp0_iterator.f()) {
                var item = tmp0_iterator.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp0_iterator_0 = this.epx_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element = tmp0_iterator_0.e();
                    if (element.lix_1 === propPrefix + '-' + item) {
                      tmp$ret$0 = element;
                      break l$ret$1;
                    }
                  }
                  tmp$ret$0 = null;
                }
                 while (false);
                var tmp0_safe_receiver_0 = tmp$ret$0;
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.mix_1;
                destination.i1(tmp1_elvis_lhs == null ? item : tmp1_elvis_lhs);
              }
              tmp_8 = joinToString(destination, ', ');
            } else {
              if (tmp0_subject === 5) {
                var this_2 = split(this.xpw_1, ['[,]']);
                var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_1 = this_2.w();
                while (tmp0_iterator_1.f()) {
                  var item_0 = tmp0_iterator_1.e();
                  var pairStrList = split(item_0, ['[.]'], VOID, 2);
                  var sourceId = first_0(pairStrList);
                  var targetId = getOrNull(pairStrList, 1);
                  var tmp$ret$2;
                  l$ret$3: do {
                    var tmp0_iterator_2 = this.epx_1.w();
                    while (tmp0_iterator_2.f()) {
                      var element_0 = tmp0_iterator_2.e();
                      if (element_0.lix_1 === 'source-' + sourceId) {
                        tmp$ret$2 = element_0;
                        break l$ret$3;
                      }
                    }
                    tmp$ret$2 = null;
                  }
                   while (false);
                  var tmp0_safe_receiver_1 = tmp$ret$2;
                  var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.mix_1;
                  var sourceText = tmp1_elvis_lhs_0 == null ? sourceId : tmp1_elvis_lhs_0;
                  var tmp$ret$4;
                  l$ret$5: do {
                    var tmp0_iterator_3 = this.epx_1.w();
                    while (tmp0_iterator_3.f()) {
                      var element_1 = tmp0_iterator_3.e();
                      if (element_1.lix_1 === 'target-' + targetId) {
                        tmp$ret$4 = element_1;
                        break l$ret$5;
                      }
                    }
                    tmp$ret$4 = null;
                  }
                   while (false);
                  var tmp2_safe_receiver = tmp$ret$4;
                  var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.mix_1;
                  var targetText = tmp3_elvis_lhs == null ? targetId : tmp3_elvis_lhs;
                  destination_0.i1(sourceText + ' - ' + targetText);
                }
                tmp_8 = joinToString(destination_0, ', ');
              } else {
                if (tmp0_subject === 6) {
                  var this_3 = split(this.xpw_1, ['[,]']);
                  var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_3, 10));
                  var tmp0_iterator_4 = this_3.w();
                  while (tmp0_iterator_4.f()) {
                    var item_1 = tmp0_iterator_4.e();
                    var stepStrList = split(item_1, ['[.]'], VOID, 2);
                    var stepId = first_0(stepStrList);
                    var stepResponse = getOrNull(stepStrList, 1);
                    var tmp$ret$6;
                    l$ret$7: do {
                      var tmp0_iterator_5 = this.epx_1.w();
                      while (tmp0_iterator_5.f()) {
                        var element_2 = tmp0_iterator_5.e();
                        if (element_2.lix_1 === 'steps-' + stepId) {
                          tmp$ret$6 = element_2;
                          break l$ret$7;
                        }
                      }
                      tmp$ret$6 = null;
                    }
                     while (false);
                    var tmp0_safe_receiver_2 = tmp$ret$6;
                    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.mix_1;
                    var stepText = tmp1_elvis_lhs_1 == null ? stepId : tmp1_elvis_lhs_1;
                    destination_1.i1(stepText + ': ' + (stepResponse == null ? '' : stepResponse));
                  }
                  tmp_8 = joinToString(destination_1, ', ');
                } else {
                  tmp_8 = null;
                }
              }
            }

            tmp_7.fpx_1 = tmp_8;
            this.hd_1 = 7;
            var tmp1_elvis_lhs_2 = this.fpx_1;
            var this_4 = htmlToPlainText(tmp1_elvis_lhs_2 == null ? this.xpw_1 : tmp1_elvis_lhs_2);
            suspendResult = this.vpw_1.t1d(new FormattedStatementResponse(toString(trim(isCharSequence(this_4) ? this_4 : THROW_CCE()))), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.hd_1 = 5;
            continue $sm;
          case 8:
            this.hd_1 = 9;
            continue $sm;
          case 9:
            return Unit_instance;
          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(FormatStatementResponseUseCase$invoke$slambda).hpx = function ($this$flow, completion) {
    var i = new FormatStatementResponseUseCase$invoke$slambda(this.spw_1, this.tpw_1, this.upw_1, completion);
    i.vpw_1 = $this$flow;
    return i;
  };
  function FormatStatementResponseUseCase$invoke$slambda_0($activityEntity, $statement, this$0, resultContinuation) {
    var i = new FormatStatementResponseUseCase$invoke$slambda($activityEntity, $statement, this$0, resultContinuation);
    var l = function ($this$flow, $completion) {
      return i.gpx($this$flow, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function FormatStatementResponseUseCase(db, repo) {
    Companion_getInstance_75();
    this.ipx_1 = db;
    this.jpx_1 = repo;
  }
  protoOf(FormatStatementResponseUseCase).kpx = function (statement, activityEntity) {
    return flow(FormatStatementResponseUseCase$invoke$slambda_0(activityEntity, statement, this, null));
  };
  function Companion_59() {
    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.lpx_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, null, null];
  }
  var Companion_instance_108;
  function Companion_getInstance_76() {
    if (Companion_instance_108 == null)
      new Companion_59();
    return Companion_instance_108;
  }
  function $serializer_44() {
    $serializer_instance_44 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.Attachment', this, 6);
    tmp0_serialDesc.t4f('usageType', true);
    tmp0_serialDesc.t4f('display', true);
    tmp0_serialDesc.t4f('description', true);
    tmp0_serialDesc.t4f('contentType', true);
    tmp0_serialDesc.t4f('length', true);
    tmp0_serialDesc.t4f('sha2', true);
    this.mpx_1 = tmp0_serialDesc;
  }
  protoOf($serializer_44).q44 = function () {
    return this.mpx_1;
  };
  protoOf($serializer_44).k4g = function () {
    var tmp0_cached = Companion_getInstance_76().lpx_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_44).s44 = function (decoder) {
    var tmp0_desc = this.mpx_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.i48(tmp0_desc);
    var tmp11_cached = Companion_getInstance_76().lpx_1;
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.o48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.o48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return Attachment_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_44).npx = function (encoder, value) {
    var tmp0_desc = this.mpx_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_76().lpx_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.opx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.opx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.ppx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.ppx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.qpx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, tmp2_cached[2], value.qpx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.rpx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.rpx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !value.spx_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 4, value.spx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.tpx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.tpx_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_44).r44 = function (encoder, value) {
    return this.npx(encoder, value instanceof Attachment ? value : THROW_CCE());
  };
  var $serializer_instance_44;
  function $serializer_getInstance_56() {
    if ($serializer_instance_44 == null)
      new $serializer_44();
    return $serializer_instance_44;
  }
  function Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_56().mpx_1);
    }
    if (0 === (seen1 & 1))
      $this.opx_1 = null;
    else
      $this.opx_1 = usageType;
    if (0 === (seen1 & 2))
      $this.ppx_1 = null;
    else
      $this.ppx_1 = display;
    if (0 === (seen1 & 4))
      $this.qpx_1 = null;
    else
      $this.qpx_1 = description;
    if (0 === (seen1 & 8))
      $this.rpx_1 = null;
    else
      $this.rpx_1 = contentType;
    if (0 === (seen1 & 16))
      $this.spx_1 = new Long(0, 0);
    else
      $this.spx_1 = length;
    if (0 === (seen1 & 32))
      $this.tpx_1 = null;
    else
      $this.tpx_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_76();
    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.opx_1 = usageType;
    this.ppx_1 = display;
    this.qpx_1 = description;
    this.rpx_1 = contentType;
    this.spx_1 = length;
    this.tpx_1 = sha2;
  }
  protoOf(Attachment).toString = function () {
    return 'Attachment(usageType=' + this.opx_1 + ', display=' + this.ppx_1 + ', description=' + this.qpx_1 + ', contentType=' + this.rpx_1 + ', length=' + this.spx_1.toString() + ', sha2=' + this.tpx_1 + ')';
  };
  protoOf(Attachment).hashCode = function () {
    var result = this.opx_1 == null ? 0 : getStringHashCode(this.opx_1);
    result = imul(result, 31) + (this.ppx_1 == null ? 0 : hashCode(this.ppx_1)) | 0;
    result = imul(result, 31) + (this.qpx_1 == null ? 0 : hashCode(this.qpx_1)) | 0;
    result = imul(result, 31) + (this.rpx_1 == null ? 0 : getStringHashCode(this.rpx_1)) | 0;
    result = imul(result, 31) + this.spx_1.hashCode() | 0;
    result = imul(result, 31) + (this.tpx_1 == null ? 0 : getStringHashCode(this.tpx_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.opx_1 == tmp0_other_with_cast.opx_1))
      return false;
    if (!equals(this.ppx_1, tmp0_other_with_cast.ppx_1))
      return false;
    if (!equals(this.qpx_1, tmp0_other_with_cast.qpx_1))
      return false;
    if (!(this.rpx_1 == tmp0_other_with_cast.rpx_1))
      return false;
    if (!this.spx_1.equals(tmp0_other_with_cast.spx_1))
      return false;
    if (!(this.tpx_1 == tmp0_other_with_cast.tpx_1))
      return false;
    return true;
  };
  function Companion_60() {
  }
  var Companion_instance_109;
  function Companion_getInstance_77() {
    return Companion_instance_109;
  }
  function $serializer_45() {
    $serializer_instance_45 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAccount', this, 2);
    tmp0_serialDesc.t4f('homePage', false);
    tmp0_serialDesc.t4f('name', false);
    this.upx_1 = tmp0_serialDesc;
  }
  protoOf($serializer_45).q44 = function () {
    return this.upx_1;
  };
  protoOf($serializer_45).k4g = 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_45).s44 = function (decoder) {
    var tmp0_desc = this.upx_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.s48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiAccount_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_45).vpx = function (encoder, value) {
    var tmp0_desc = this.upx_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.w49(tmp0_desc, 0, value.wpx_1);
    tmp1_output.w49(tmp0_desc, 1, value.xpx_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_45).r44 = function (encoder, value) {
    return this.vpx(encoder, value instanceof XapiAccount ? value : THROW_CCE());
  };
  var $serializer_instance_45;
  function $serializer_getInstance_57() {
    if ($serializer_instance_45 == null)
      new $serializer_45();
    return $serializer_instance_45;
  }
  function XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_57().upx_1);
    }
    $this.wpx_1 = homePage;
    $this.xpx_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.wpx_1 = homePage;
    this.xpx_1 = name;
  }
  protoOf(XapiAccount).toString = function () {
    return 'XapiAccount(homePage=' + this.wpx_1 + ', name=' + this.xpx_1 + ')';
  };
  protoOf(XapiAccount).hashCode = function () {
    var result = getStringHashCode(this.wpx_1);
    result = imul(result, 31) + getStringHashCode(this.xpx_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.wpx_1 === tmp0_other_with_cast.wpx_1))
      return false;
    if (!(this.xpx_1 === tmp0_other_with_cast.xpx_1))
      return false;
    return true;
  };
  function Companion_61() {
    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.ypx_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_110;
  function Companion_getInstance_78() {
    if (Companion_instance_110 == null)
      new Companion_61();
    return Companion_instance_110;
  }
  function $serializer_46() {
    $serializer_instance_46 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivity.Interaction', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('description', true);
    this.zpx_1 = tmp0_serialDesc;
  }
  protoOf($serializer_46).q44 = function () {
    return this.zpx_1;
  };
  protoOf($serializer_46).k4g = function () {
    var tmp0_cached = Companion_getInstance_78().ypx_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_46).s44 = function (decoder) {
    var tmp0_desc = this.zpx_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.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_78().ypx_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return Interaction_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_46).apy = function (encoder, value) {
    var tmp0_desc = this.zpx_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_78().ypx_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.bpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.bpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.cpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.cpy_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_46).r44 = function (encoder, value) {
    return this.apy(encoder, value instanceof Interaction ? value : THROW_CCE());
  };
  var $serializer_instance_46;
  function $serializer_getInstance_58() {
    if ($serializer_instance_46 == null)
      new $serializer_46();
    return $serializer_instance_46;
  }
  function Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_58().zpx_1);
    }
    if (0 === (seen1 & 1))
      $this.bpy_1 = null;
    else
      $this.bpy_1 = id;
    if (0 === (seen1 & 2))
      $this.cpy_1 = null;
    else
      $this.cpy_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_78();
    id = id === VOID ? null : id;
    description = description === VOID ? null : description;
    this.bpy_1 = id;
    this.cpy_1 = description;
  }
  protoOf(Interaction).toString = function () {
    return 'Interaction(id=' + this.bpy_1 + ', description=' + this.cpy_1 + ')';
  };
  protoOf(Interaction).hashCode = function () {
    var result = this.bpy_1 == null ? 0 : getStringHashCode(this.bpy_1);
    result = imul(result, 31) + (this.cpy_1 == null ? 0 : hashCode(this.cpy_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.bpy_1 == tmp0_other_with_cast.bpy_1))
      return false;
    if (!equals(this.cpy_1, tmp0_other_with_cast.cpy_1))
      return false;
    return true;
  };
  function Companion_62() {
    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.dpy_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_58()), new ArrayListSerializer($serializer_getInstance_58()), new ArrayListSerializer($serializer_getInstance_58()), new ArrayListSerializer($serializer_getInstance_58()), new ArrayListSerializer($serializer_getInstance_58())];
  }
  var Companion_instance_111;
  function Companion_getInstance_79() {
    if (Companion_instance_111 == null)
      new Companion_62();
    return Companion_instance_111;
  }
  function $serializer_47() {
    $serializer_instance_47 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('Activity', this, 12);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('description', true);
    tmp0_serialDesc.t4f('type', true);
    tmp0_serialDesc.t4f('extensions', true);
    tmp0_serialDesc.t4f('moreInfo', true);
    tmp0_serialDesc.t4f('interactionType', true);
    tmp0_serialDesc.t4f('correctResponsePattern', true);
    tmp0_serialDesc.t4f('choices', true);
    tmp0_serialDesc.t4f('scale', true);
    tmp0_serialDesc.t4f('source', true);
    tmp0_serialDesc.t4f('target', true);
    tmp0_serialDesc.t4f('steps', true);
    this.epy_1 = tmp0_serialDesc;
  }
  protoOf($serializer_47).q44 = function () {
    return this.epy_1;
  };
  protoOf($serializer_47).k4g = function () {
    var tmp0_cached = Companion_getInstance_79().dpy_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_47).s44 = function (decoder) {
    var tmp0_desc = this.epy_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.i48(tmp0_desc);
    var tmp17_cached = Companion_getInstance_79().dpy_1;
    if (tmp16_input.x48()) {
      tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.w48(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.w48(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.w48(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.w48(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.j48(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_47).fpy = function (encoder, value) {
    var tmp0_desc = this.epy_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_79().dpy_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.gpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, tmp2_cached[0], value.gpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.hpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.hpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.ipy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.ipy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.jpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, tmp2_cached[3], value.jpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.kpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.kpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.lpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, value.lpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.mpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, tmp2_cached[6], value.mpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.npy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, tmp2_cached[7], value.npy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.opy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, tmp2_cached[8], value.opy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.ppy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, tmp2_cached[9], value.ppy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.qpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 10, tmp2_cached[10], value.qpy_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 11) ? true : !(value.rpy_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 11, tmp2_cached[11], value.rpy_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_47).r44 = function (encoder, value) {
    return this.fpy(encoder, value instanceof XapiActivity ? value : THROW_CCE());
  };
  var $serializer_instance_47;
  function $serializer_getInstance_59() {
    if ($serializer_instance_47 == null)
      new $serializer_47();
    return $serializer_instance_47;
  }
  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_59().epy_1);
    }
    if (0 === (seen1 & 1))
      $this.gpy_1 = null;
    else
      $this.gpy_1 = name;
    if (0 === (seen1 & 2))
      $this.hpy_1 = null;
    else
      $this.hpy_1 = description;
    if (0 === (seen1 & 4))
      $this.ipy_1 = null;
    else
      $this.ipy_1 = type;
    if (0 === (seen1 & 8))
      $this.jpy_1 = null;
    else
      $this.jpy_1 = extensions;
    if (0 === (seen1 & 16))
      $this.kpy_1 = null;
    else
      $this.kpy_1 = moreInfo;
    if (0 === (seen1 & 32))
      $this.lpy_1 = null;
    else
      $this.lpy_1 = interactionType;
    if (0 === (seen1 & 64))
      $this.mpy_1 = null;
    else
      $this.mpy_1 = correctResponsePattern;
    if (0 === (seen1 & 128))
      $this.npy_1 = null;
    else
      $this.npy_1 = choices;
    if (0 === (seen1 & 256))
      $this.opy_1 = null;
    else
      $this.opy_1 = scale;
    if (0 === (seen1 & 512))
      $this.ppy_1 = null;
    else
      $this.ppy_1 = source;
    if (0 === (seen1 & 1024))
      $this.qpy_1 = null;
    else
      $this.qpy_1 = target;
    if (0 === (seen1 & 2048))
      $this.rpy_1 = null;
    else
      $this.rpy_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_79();
    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.gpy_1 = name;
    this.hpy_1 = description;
    this.ipy_1 = type;
    this.jpy_1 = extensions;
    this.kpy_1 = moreInfo;
    this.lpy_1 = interactionType;
    this.mpy_1 = correctResponsePattern;
    this.npy_1 = choices;
    this.opy_1 = scale;
    this.ppy_1 = source;
    this.qpy_1 = target;
    this.rpy_1 = steps;
  }
  protoOf(XapiActivity).toString = function () {
    return 'XapiActivity(name=' + this.gpy_1 + ', description=' + this.hpy_1 + ', type=' + this.ipy_1 + ', extensions=' + this.jpy_1 + ', moreInfo=' + this.kpy_1 + ', interactionType=' + this.lpy_1 + ', correctResponsePattern=' + this.mpy_1 + ', choices=' + this.npy_1 + ', scale=' + this.opy_1 + ', source=' + this.ppy_1 + ', target=' + this.qpy_1 + ', steps=' + this.rpy_1 + ')';
  };
  protoOf(XapiActivity).hashCode = function () {
    var result = this.gpy_1 == null ? 0 : hashCode(this.gpy_1);
    result = imul(result, 31) + (this.hpy_1 == null ? 0 : hashCode(this.hpy_1)) | 0;
    result = imul(result, 31) + (this.ipy_1 == null ? 0 : getStringHashCode(this.ipy_1)) | 0;
    result = imul(result, 31) + (this.jpy_1 == null ? 0 : hashCode(this.jpy_1)) | 0;
    result = imul(result, 31) + (this.kpy_1 == null ? 0 : getStringHashCode(this.kpy_1)) | 0;
    result = imul(result, 31) + (this.lpy_1 == null ? 0 : this.lpy_1.hashCode()) | 0;
    result = imul(result, 31) + (this.mpy_1 == null ? 0 : hashCode(this.mpy_1)) | 0;
    result = imul(result, 31) + (this.npy_1 == null ? 0 : hashCode(this.npy_1)) | 0;
    result = imul(result, 31) + (this.opy_1 == null ? 0 : hashCode(this.opy_1)) | 0;
    result = imul(result, 31) + (this.ppy_1 == null ? 0 : hashCode(this.ppy_1)) | 0;
    result = imul(result, 31) + (this.qpy_1 == null ? 0 : hashCode(this.qpy_1)) | 0;
    result = imul(result, 31) + (this.rpy_1 == null ? 0 : hashCode(this.rpy_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.gpy_1, tmp0_other_with_cast.gpy_1))
      return false;
    if (!equals(this.hpy_1, tmp0_other_with_cast.hpy_1))
      return false;
    if (!(this.ipy_1 == tmp0_other_with_cast.ipy_1))
      return false;
    if (!equals(this.jpy_1, tmp0_other_with_cast.jpy_1))
      return false;
    if (!(this.kpy_1 == tmp0_other_with_cast.kpy_1))
      return false;
    if (!equals(this.lpy_1, tmp0_other_with_cast.lpy_1))
      return false;
    if (!equals(this.mpy_1, tmp0_other_with_cast.mpy_1))
      return false;
    if (!equals(this.npy_1, tmp0_other_with_cast.npy_1))
      return false;
    if (!equals(this.opy_1, tmp0_other_with_cast.opy_1))
      return false;
    if (!equals(this.ppy_1, tmp0_other_with_cast.ppy_1))
      return false;
    if (!equals(this.qpy_1, tmp0_other_with_cast.qpy_1))
      return false;
    if (!equals(this.rpy_1, tmp0_other_with_cast.rpy_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.kpq_1 = activityEntity;
    this.lpq_1 = activityLangMapEntries;
    this.mpq_1 = activityInteractionEntities;
    this.npq_1 = activityExtensionEntities;
    this.opq_1 = statementContextActivityJoin;
  }
  protoOf(ActivityEntities).spy = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    return new ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).tpy = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin, $super) {
    activityEntity = activityEntity === VOID ? this.kpq_1 : activityEntity;
    activityLangMapEntries = activityLangMapEntries === VOID ? this.lpq_1 : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? this.mpq_1 : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? this.npq_1 : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? this.opq_1 : statementContextActivityJoin;
    return $super === VOID ? this.spy(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) : $super.spy.call(this, activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).toString = function () {
    return 'ActivityEntities(activityEntity=' + this.kpq_1 + ', activityLangMapEntries=' + this.lpq_1 + ', activityInteractionEntities=' + this.mpq_1 + ', activityExtensionEntities=' + this.npq_1 + ', statementContextActivityJoin=' + this.opq_1 + ')';
  };
  protoOf(ActivityEntities).hashCode = function () {
    var result = this.kpq_1.hashCode();
    result = imul(result, 31) + hashCode(this.lpq_1) | 0;
    result = imul(result, 31) + hashCode(this.mpq_1) | 0;
    result = imul(result, 31) + hashCode(this.npq_1) | 0;
    result = imul(result, 31) + (this.opq_1 == null ? 0 : this.opq_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.kpq_1.equals(tmp0_other_with_cast.kpq_1))
      return false;
    if (!equals(this.lpq_1, tmp0_other_with_cast.lpq_1))
      return false;
    if (!equals(this.mpq_1, tmp0_other_with_cast.mpq_1))
      return false;
    if (!equals(this.npq_1, tmp0_other_with_cast.npq_1))
      return false;
    if (!equals(this.opq_1, tmp0_other_with_cast.opq_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.hm7(activityId);
    var tmp9_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.npy_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.opy_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.ppy_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.qpy_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.rpy_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.ipy_1;
    var tmp_9 = _this__u8e3s4 == null ? null : _this__u8e3s4.kpy_1;
    var tmp13_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.lpy_1;
    var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.xpy_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.mpy_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.t45();
      // 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.r45(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.gpy_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.hpy_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.jpy_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.hm7(key), xapiRequireValidIRI(key, activityId + ' extension ' + key + ' is not a valid IRI'), json.r45(Companion_instance_23.n4r(), 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.hm7(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.hm7('' + propId + _this__u8e3s4.bpy_1);
    var tmp = new ActivityInteractionEntity(activityUid, aieHash, propId, _this__u8e3s4.bpy_1);
    var tmp0_safe_receiver = _this__u8e3s4.cpy_1;
    return to(tmp, toEmptyIfNull(tmp0_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp0_safe_receiver, activityUid, $stringHasher, propName + '-' + _this__u8e3s4.bpy_1, aieHash)));
  }
  function Companion_63() {
  }
  protoOf(Companion_63).n4r = function () {
    return XapiActorSerializer_getInstance();
  };
  protoOf(Companion_63).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_112;
  function Companion_getInstance_80() {
    return Companion_instance_112;
  }
  function XapiActor() {
  }
  function XapiActorSerializer() {
    XapiActorSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiActor));
  }
  protoOf(XapiActorSerializer).l4r = 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.g3b();
    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_113.n4r();
        break;
      case 4:
        tmp_0 = Companion_getInstance_85().n4r();
        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.bpz() == null)) {
      var tmp0_safe_receiver = _this__u8e3s4.bpz();
      var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xpx_1;
      var tmp1_safe_receiver = _this__u8e3s4.bpz();
      tmp = '' + tmp_0 + '@' + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wpx_1);
    } else if (!(_this__u8e3s4.ypy() == null)) {
      tmp = _this__u8e3s4.ypy();
    } else if (!(_this__u8e3s4.zpy() == null)) {
      tmp = _this__u8e3s4.zpy();
    } else if (!(_this__u8e3s4.apz() == null)) {
      tmp = _this__u8e3s4.apz();
    } 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.hm7(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.ept_1 = actor;
    this.fpt_1 = groupMemberAgents;
    this.gpt_1 = groupMemberJoins;
  }
  protoOf(ActorEntities).toString = function () {
    return 'ActorEntities(actor=' + this.ept_1 + ', groupMemberAgents=' + this.fpt_1 + ', groupMemberJoins=' + this.gpt_1 + ')';
  };
  protoOf(ActorEntities).hashCode = function () {
    var result = this.ept_1.hashCode();
    result = imul(result, 31) + hashCode(this.fpt_1) | 0;
    result = imul(result, 31) + hashCode(this.gpt_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.ept_1.equals(tmp0_other_with_cast.ept_1))
      return false;
    if (!equals(this.fpt_1, tmp0_other_with_cast.fpt_1))
      return false;
    if (!equals(this.gpt_1, tmp0_other_with_cast.gpt_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_64() {
  }
  protoOf(Companion_64).n4r = function () {
    return $serializer_getInstance_60();
  };
  var Companion_instance_113;
  function Companion_getInstance_81() {
    return Companion_instance_113;
  }
  function $serializer_48() {
    $serializer_instance_48 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAgent', this, 6);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('mbox', true);
    tmp0_serialDesc.t4f('mbox_sha1sum', true);
    tmp0_serialDesc.t4f('openid', true);
    tmp0_serialDesc.t4f('objectType', true);
    tmp0_serialDesc.t4f('account', true);
    this.fpz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_48).q44 = function () {
    return this.fpz_1;
  };
  protoOf($serializer_48).k4g = 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_57())];
  };
  protoOf($serializer_48).s44 = function (decoder) {
    var tmp0_desc = this.fpz_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.i48(tmp0_desc);
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return XapiAgent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_48).gpz = function (encoder, value) {
    var tmp0_desc = this.fpz_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.hpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.hpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.ipz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.ipz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.jpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.jpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.kpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.kpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.lpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.lpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.mpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_57(), value.mpz_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_48).r44 = function (encoder, value) {
    return this.gpz(encoder, value instanceof XapiAgent ? value : THROW_CCE());
  };
  var $serializer_instance_48;
  function $serializer_getInstance_60() {
    if ($serializer_instance_48 == null)
      new $serializer_48();
    return $serializer_instance_48;
  }
  function XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_60().fpz_1);
    }
    if (0 === (seen1 & 1))
      $this.hpz_1 = null;
    else
      $this.hpz_1 = name;
    if (0 === (seen1 & 2))
      $this.ipz_1 = null;
    else
      $this.ipz_1 = mbox;
    if (0 === (seen1 & 4))
      $this.jpz_1 = null;
    else
      $this.jpz_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.kpz_1 = null;
    else
      $this.kpz_1 = openid;
    if (0 === (seen1 & 16))
      $this.lpz_1 = null;
    else
      $this.lpz_1 = objectType;
    if (0 === (seen1 & 32))
      $this.mpz_1 = null;
    else
      $this.mpz_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.hpz_1 = name;
    this.ipz_1 = mbox;
    this.jpz_1 = mbox_sha1sum;
    this.kpz_1 = openid;
    this.lpz_1 = objectType;
    this.mpz_1 = account;
  }
  protoOf(XapiAgent).ypy = function () {
    return this.ipz_1;
  };
  protoOf(XapiAgent).zpy = function () {
    return this.jpz_1;
  };
  protoOf(XapiAgent).apz = function () {
    return this.kpz_1;
  };
  protoOf(XapiAgent).npz = function () {
    return this.lpz_1;
  };
  protoOf(XapiAgent).bpz = function () {
    return this.mpz_1;
  };
  protoOf(XapiAgent).toString = function () {
    return 'XapiAgent(name=' + this.hpz_1 + ', mbox=' + this.ipz_1 + ', mbox_sha1sum=' + this.jpz_1 + ', openid=' + this.kpz_1 + ', objectType=' + this.lpz_1 + ', account=' + this.mpz_1 + ')';
  };
  protoOf(XapiAgent).hashCode = function () {
    var result = this.hpz_1 == null ? 0 : getStringHashCode(this.hpz_1);
    result = imul(result, 31) + (this.ipz_1 == null ? 0 : getStringHashCode(this.ipz_1)) | 0;
    result = imul(result, 31) + (this.jpz_1 == null ? 0 : getStringHashCode(this.jpz_1)) | 0;
    result = imul(result, 31) + (this.kpz_1 == null ? 0 : getStringHashCode(this.kpz_1)) | 0;
    result = imul(result, 31) + (this.lpz_1 == null ? 0 : this.lpz_1.hashCode()) | 0;
    result = imul(result, 31) + (this.mpz_1 == null ? 0 : this.mpz_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.hpz_1 == tmp0_other_with_cast.hpz_1))
      return false;
    if (!(this.ipz_1 == tmp0_other_with_cast.ipz_1))
      return false;
    if (!(this.jpz_1 == tmp0_other_with_cast.jpz_1))
      return false;
    if (!(this.kpz_1 == tmp0_other_with_cast.kpz_1))
      return false;
    if (!equals(this.lpz_1, tmp0_other_with_cast.lpz_1))
      return false;
    if (!equals(this.mpz_1, tmp0_other_with_cast.mpz_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.ipz_1;
    var tmp7_actorMbox_sha1sum = _this__u8e3s4.jpz_1;
    var tmp8_actorOpenid = _this__u8e3s4.kpz_1;
    var tmp1_safe_receiver = _this__u8e3s4.mpz_1;
    var tmp9_actorAccountName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xpx_1;
    var tmp2_safe_receiver = _this__u8e3s4.mpz_1;
    var tmp10_actorAccountHomePage = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.wpx_1;
    var tmp3_safe_receiver = _this__u8e3s4.hpz_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.hm7(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_65() {
    Companion_instance_114 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.opz_1 = [null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_114;
  function Companion_getInstance_82() {
    if (Companion_instance_114 == null)
      new Companion_65();
    return Companion_instance_114;
  }
  function $serializer_49() {
    $serializer_instance_49 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiContext', this, 9);
    tmp0_serialDesc.t4f('instructor', true);
    tmp0_serialDesc.t4f('registration', true);
    tmp0_serialDesc.t4f('language', true);
    tmp0_serialDesc.t4f('platform', true);
    tmp0_serialDesc.t4f('revision', true);
    tmp0_serialDesc.t4f('team', true);
    tmp0_serialDesc.t4f('statement', true);
    tmp0_serialDesc.t4f('contextActivities', true);
    tmp0_serialDesc.t4f('extensions', true);
    this.ppz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_49).q44 = function () {
    return this.ppz_1;
  };
  protoOf($serializer_49).k4g = function () {
    var tmp0_cached = Companion_getInstance_82().opz_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_67()), get_nullable(XapiContextActivitiesSerializer_getInstance()), get_nullable(tmp0_cached[8])];
  };
  protoOf($serializer_49).s44 = function (decoder) {
    var tmp0_desc = this.ppz_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.i48(tmp0_desc);
    var tmp14_cached = Companion_getInstance_82().opz_1;
    if (tmp13_input.x48()) {
      tmp4_local0 = tmp13_input.w48(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.w48(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.w48(tmp0_desc, 6, $serializer_getInstance_67(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.w48(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.w48(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.w48(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.w48(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.w48(tmp0_desc, 6, $serializer_getInstance_67(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.w48(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.w48(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.j48(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_49).qpz = function (encoder, value) {
    var tmp0_desc = this.ppz_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_82().opz_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.rpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, XapiActorSerializer_getInstance(), value.rpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.spz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.spz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.tpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.tpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.upz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.upz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.vpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.vpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.wpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, XapiActorSerializer_getInstance(), value.wpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.xpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, $serializer_getInstance_67(), value.xpz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.ypz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), value.ypz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.zpz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, tmp2_cached[8], value.zpz_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_49).r44 = function (encoder, value) {
    return this.qpz(encoder, value instanceof XapiContext ? value : THROW_CCE());
  };
  var $serializer_instance_49;
  function $serializer_getInstance_61() {
    if ($serializer_instance_49 == null)
      new $serializer_49();
    return $serializer_instance_49;
  }
  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_61().ppz_1);
    }
    if (0 === (seen1 & 1))
      $this.rpz_1 = null;
    else
      $this.rpz_1 = instructor;
    if (0 === (seen1 & 2))
      $this.spz_1 = null;
    else
      $this.spz_1 = registration;
    if (0 === (seen1 & 4))
      $this.tpz_1 = null;
    else
      $this.tpz_1 = language;
    if (0 === (seen1 & 8))
      $this.upz_1 = null;
    else
      $this.upz_1 = platform;
    if (0 === (seen1 & 16))
      $this.vpz_1 = null;
    else
      $this.vpz_1 = revision;
    if (0 === (seen1 & 32))
      $this.wpz_1 = null;
    else
      $this.wpz_1 = team;
    if (0 === (seen1 & 64))
      $this.xpz_1 = null;
    else
      $this.xpz_1 = statement;
    if (0 === (seen1 & 128))
      $this.ypz_1 = null;
    else
      $this.ypz_1 = contextActivities;
    if (0 === (seen1 & 256))
      $this.zpz_1 = null;
    else
      $this.zpz_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_82();
    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.rpz_1 = instructor;
    this.spz_1 = registration;
    this.tpz_1 = language;
    this.upz_1 = platform;
    this.vpz_1 = revision;
    this.wpz_1 = team;
    this.xpz_1 = statement;
    this.ypz_1 = contextActivities;
    this.zpz_1 = extensions;
  }
  protoOf(XapiContext).toString = function () {
    return 'XapiContext(instructor=' + this.rpz_1 + ', registration=' + this.spz_1 + ', language=' + this.tpz_1 + ', platform=' + this.upz_1 + ', revision=' + this.vpz_1 + ', team=' + this.wpz_1 + ', statement=' + this.xpz_1 + ', contextActivities=' + this.ypz_1 + ', extensions=' + this.zpz_1 + ')';
  };
  protoOf(XapiContext).hashCode = function () {
    var result = this.rpz_1 == null ? 0 : hashCode(this.rpz_1);
    result = imul(result, 31) + (this.spz_1 == null ? 0 : getStringHashCode(this.spz_1)) | 0;
    result = imul(result, 31) + (this.tpz_1 == null ? 0 : getStringHashCode(this.tpz_1)) | 0;
    result = imul(result, 31) + (this.upz_1 == null ? 0 : getStringHashCode(this.upz_1)) | 0;
    result = imul(result, 31) + (this.vpz_1 == null ? 0 : getStringHashCode(this.vpz_1)) | 0;
    result = imul(result, 31) + (this.wpz_1 == null ? 0 : hashCode(this.wpz_1)) | 0;
    result = imul(result, 31) + (this.xpz_1 == null ? 0 : this.xpz_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ypz_1 == null ? 0 : this.ypz_1.hashCode()) | 0;
    result = imul(result, 31) + (this.zpz_1 == null ? 0 : hashCode(this.zpz_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.rpz_1, tmp0_other_with_cast.rpz_1))
      return false;
    if (!(this.spz_1 == tmp0_other_with_cast.spz_1))
      return false;
    if (!(this.tpz_1 == tmp0_other_with_cast.tpz_1))
      return false;
    if (!(this.upz_1 == tmp0_other_with_cast.upz_1))
      return false;
    if (!(this.vpz_1 == tmp0_other_with_cast.vpz_1))
      return false;
    if (!equals(this.wpz_1, tmp0_other_with_cast.wpz_1))
      return false;
    if (!equals(this.xpz_1, tmp0_other_with_cast.xpz_1))
      return false;
    if (!equals(this.ypz_1, tmp0_other_with_cast.ypz_1))
      return false;
    if (!equals(this.zpz_1, tmp0_other_with_cast.zpz_1))
      return false;
    return true;
  };
  function Companion_66() {
  }
  var Companion_instance_115;
  function Companion_getInstance_83() {
    return Companion_instance_115;
  }
  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.aq0_1 = parent;
    this.bq0_1 = grouping;
    this.cq0_1 = category;
    this.dq0_1 = other;
  }
  protoOf(XapiContextActivities).toString = function () {
    return 'XapiContextActivities(parent=' + this.aq0_1 + ', grouping=' + this.bq0_1 + ', category=' + this.cq0_1 + ', other=' + this.dq0_1 + ')';
  };
  protoOf(XapiContextActivities).hashCode = function () {
    var result = this.aq0_1 == null ? 0 : hashCode(this.aq0_1);
    result = imul(result, 31) + (this.bq0_1 == null ? 0 : hashCode(this.bq0_1)) | 0;
    result = imul(result, 31) + (this.cq0_1 == null ? 0 : hashCode(this.cq0_1)) | 0;
    result = imul(result, 31) + (this.dq0_1 == null ? 0 : hashCode(this.dq0_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.aq0_1, tmp0_other_with_cast.aq0_1))
      return false;
    if (!equals(this.bq0_1, tmp0_other_with_cast.bq0_1))
      return false;
    if (!equals(this.cq0_1, tmp0_other_with_cast.cq0_1))
      return false;
    if (!equals(this.dq0_1, tmp0_other_with_cast.dq0_1))
      return false;
    return true;
  };
  function deserialize$propertyToObjectList(jsonObject, jsonDecoder, propName) {
    var jsonElement = jsonObject.ba(propName);
    var tmp;
    if (!(jsonElement == null)) {
      tmp = decodeListOrSingleObjectAsList(jsonDecoder.m4r(), Companion_instance_123.n4r(), jsonElement);
    } else {
      tmp = null;
    }
    return tmp;
  }
  function XapiContextActivitiesSerializer() {
    XapiContextActivitiesSerializer_instance = this;
    this.eq0_1 = Companion_getInstance_84().n4r().q44();
  }
  protoOf(XapiContextActivitiesSerializer).q44 = function () {
    return this.eq0_1;
  };
  protoOf(XapiContextActivitiesSerializer).gq0 = function (encoder, value) {
    encoder.z49(Companion_getInstance_84().n4r(), toSurrogate(value));
  };
  protoOf(XapiContextActivitiesSerializer).r44 = function (encoder, value) {
    return this.gq0(encoder, value instanceof XapiContextActivities ? value : THROW_CCE());
  };
  protoOf(XapiContextActivitiesSerializer).s44 = 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.k4r();
    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_67() {
    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.fq0_1 = [new ArrayListSerializer($serializer_getInstance_67()), new ArrayListSerializer($serializer_getInstance_67()), new ArrayListSerializer($serializer_getInstance_67()), new ArrayListSerializer($serializer_getInstance_67())];
  }
  protoOf(Companion_67).n4r = function () {
    return $serializer_getInstance_62();
  };
  var Companion_instance_116;
  function Companion_getInstance_84() {
    if (Companion_instance_116 == null)
      new Companion_67();
    return Companion_instance_116;
  }
  function $serializer_50() {
    $serializer_instance_50 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('XapiContextActivities', this, 4);
    tmp0_serialDesc.t4f('parent', true);
    tmp0_serialDesc.t4f('grouping', true);
    tmp0_serialDesc.t4f('category', true);
    tmp0_serialDesc.t4f('other', true);
    this.hq0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_50).q44 = function () {
    return this.hq0_1;
  };
  protoOf($serializer_50).k4g = function () {
    var tmp0_cached = Companion_getInstance_84().fq0_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_50).s44 = function (decoder) {
    var tmp0_desc = this.hq0_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.i48(tmp0_desc);
    var tmp9_cached = Companion_getInstance_84().fq0_1;
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return XapiContextActivitiesSurrogate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_50).iq0 = function (encoder, value) {
    var tmp0_desc = this.hq0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_84().fq0_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.jq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, tmp2_cached[0], value.jq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.kq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.kq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.lq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, tmp2_cached[2], value.lq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.mq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, tmp2_cached[3], value.mq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_50).r44 = function (encoder, value) {
    return this.iq0(encoder, value instanceof XapiContextActivitiesSurrogate ? value : THROW_CCE());
  };
  var $serializer_instance_50;
  function $serializer_getInstance_62() {
    if ($serializer_instance_50 == null)
      new $serializer_50();
    return $serializer_instance_50;
  }
  function XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_62().hq0_1);
    }
    if (0 === (seen1 & 1))
      $this.jq0_1 = null;
    else
      $this.jq0_1 = parent;
    if (0 === (seen1 & 2))
      $this.kq0_1 = null;
    else
      $this.kq0_1 = grouping;
    if (0 === (seen1 & 4))
      $this.lq0_1 = null;
    else
      $this.lq0_1 = category;
    if (0 === (seen1 & 8))
      $this.mq0_1 = null;
    else
      $this.mq0_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_84();
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.jq0_1 = parent;
    this.kq0_1 = grouping;
    this.lq0_1 = category;
    this.mq0_1 = other;
  }
  function toSurrogate(_this__u8e3s4) {
    return new XapiContextActivitiesSurrogate(_this__u8e3s4.aq0_1, _this__u8e3s4.bq0_1, _this__u8e3s4.cq0_1, _this__u8e3s4.dq0_1);
  }
  function toEntities_1(_this__u8e3s4, stringHasher, json, statementUuid) {
    var tmp = toEntities$toEntitiesInternal(_this__u8e3s4.aq0_1, stringHasher, json, statementUuid, 1);
    var tmp_0 = plus(tmp, toEntities$toEntitiesInternal(_this__u8e3s4.bq0_1, stringHasher, json, statementUuid, 2));
    var tmp_1 = plus(tmp_0, toEntities$toEntitiesInternal(_this__u8e3s4.cq0_1, stringHasher, json, statementUuid, 3));
    return plus(tmp_1, toEntities$toEntitiesInternal(_this__u8e3s4.dq0_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.hm7(item.oq0_1);
      var scajToHash = stringHasher.hm7('' + contextType + '-' + item.oq0_1);
      var statementContextActivityJoin = new StatementContextActivityJoin(statementUuid.vmd(), statementUuid.wmd(), scajToHash, contextType, activityUid, item.oq0_1);
      var tmp0_safe_receiver = item.pq0_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toEntities(tmp0_safe_receiver, item.oq0_1, stringHasher, json);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tpy(VOID, VOID, VOID, VOID, statementContextActivityJoin);
      var tmp$ret$0 = tmp2_elvis_lhs == null ? new ActivityEntities(new ActivityEntity(activityUid, item.oq0_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_68() {
    Companion_instance_117 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.epz_1 = [null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_60())];
  }
  protoOf(Companion_68).n4r = function () {
    return $serializer_getInstance_63();
  };
  var Companion_instance_117;
  function Companion_getInstance_85() {
    if (Companion_instance_117 == null)
      new Companion_68();
    return Companion_instance_117;
  }
  function $serializer_51() {
    $serializer_instance_51 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiGroup', this, 7);
    tmp0_serialDesc.t4f('name', true);
    tmp0_serialDesc.t4f('mbox', true);
    tmp0_serialDesc.t4f('mbox_sha1sum', true);
    tmp0_serialDesc.t4f('openid', true);
    tmp0_serialDesc.t4f('objectType', true);
    tmp0_serialDesc.t4f('account', true);
    tmp0_serialDesc.t4f('member', true);
    this.qq0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_51).q44 = function () {
    return this.qq0_1;
  };
  protoOf($serializer_51).k4g = function () {
    var tmp0_cached = Companion_getInstance_85().epz_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_57()), tmp0_cached[6]];
  };
  protoOf($serializer_51).s44 = function (decoder) {
    var tmp0_desc = this.qq0_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.i48(tmp0_desc);
    var tmp12_cached = Companion_getInstance_85().epz_1;
    if (tmp11_input.x48()) {
      tmp4_local0 = tmp11_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp11_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp11_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp11_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp11_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp11_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp11_input.u48(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp11_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp11_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp11_input.w48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp11_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp11_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp11_input.w48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp11_input.w48(tmp0_desc, 5, $serializer_getInstance_57(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp11_input.u48(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp11_input.j48(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_51).rq0 = function (encoder, value) {
    var tmp0_desc = this.qq0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_85().epz_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.sq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.sq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.tq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, StringSerializer_getInstance(), value.tq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.uq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.uq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.vq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.vq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.wq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.wq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.xq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_57(), value.xq0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.yq0_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.yq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_51).r44 = function (encoder, value) {
    return this.rq0(encoder, value instanceof XapiGroup ? value : THROW_CCE());
  };
  var $serializer_instance_51;
  function $serializer_getInstance_63() {
    if ($serializer_instance_51 == null)
      new $serializer_51();
    return $serializer_instance_51;
  }
  function XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_63().qq0_1);
    }
    if (0 === (seen1 & 1))
      $this.sq0_1 = null;
    else
      $this.sq0_1 = name;
    if (0 === (seen1 & 2))
      $this.tq0_1 = null;
    else
      $this.tq0_1 = mbox;
    if (0 === (seen1 & 4))
      $this.uq0_1 = null;
    else
      $this.uq0_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.vq0_1 = null;
    else
      $this.vq0_1 = openid;
    if (0 === (seen1 & 16))
      $this.wq0_1 = null;
    else
      $this.wq0_1 = objectType;
    if (0 === (seen1 & 32))
      $this.xq0_1 = null;
    else
      $this.xq0_1 = account;
    if (0 === (seen1 & 64))
      $this.yq0_1 = emptyList();
    else
      $this.yq0_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_85();
    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.sq0_1 = name;
    this.tq0_1 = mbox;
    this.uq0_1 = mbox_sha1sum;
    this.vq0_1 = openid;
    this.wq0_1 = objectType;
    this.xq0_1 = account;
    this.yq0_1 = member;
  }
  protoOf(XapiGroup).ypy = function () {
    return this.tq0_1;
  };
  protoOf(XapiGroup).zpy = function () {
    return this.uq0_1;
  };
  protoOf(XapiGroup).apz = function () {
    return this.vq0_1;
  };
  protoOf(XapiGroup).npz = function () {
    return this.wq0_1;
  };
  protoOf(XapiGroup).bpz = function () {
    return this.xq0_1;
  };
  protoOf(XapiGroup).toString = function () {
    return 'XapiGroup(name=' + this.sq0_1 + ', mbox=' + this.tq0_1 + ', mbox_sha1sum=' + this.uq0_1 + ', openid=' + this.vq0_1 + ', objectType=' + this.wq0_1 + ', account=' + this.xq0_1 + ', member=' + this.yq0_1 + ')';
  };
  protoOf(XapiGroup).hashCode = function () {
    var result = this.sq0_1 == null ? 0 : getStringHashCode(this.sq0_1);
    result = imul(result, 31) + (this.tq0_1 == null ? 0 : getStringHashCode(this.tq0_1)) | 0;
    result = imul(result, 31) + (this.uq0_1 == null ? 0 : getStringHashCode(this.uq0_1)) | 0;
    result = imul(result, 31) + (this.vq0_1 == null ? 0 : getStringHashCode(this.vq0_1)) | 0;
    result = imul(result, 31) + (this.wq0_1 == null ? 0 : this.wq0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.xq0_1 == null ? 0 : this.xq0_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.yq0_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.sq0_1 == tmp0_other_with_cast.sq0_1))
      return false;
    if (!(this.tq0_1 == tmp0_other_with_cast.tq0_1))
      return false;
    if (!(this.uq0_1 == tmp0_other_with_cast.uq0_1))
      return false;
    if (!(this.vq0_1 == tmp0_other_with_cast.vq0_1))
      return false;
    if (!equals(this.wq0_1, tmp0_other_with_cast.wq0_1))
      return false;
    if (!equals(this.xq0_1, tmp0_other_with_cast.xq0_1))
      return false;
    if (!equals(this.yq0_1, tmp0_other_with_cast.yq0_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.yq0_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.gm7(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.jm7(toByteArray(element.w6_1));
    }
    var memberHash = hasher.km7();
    var tmp_0;
    if (get_isAnonymous(_this__u8e3s4)) {
      tmp_0 = primaryKeyManager.n62(68);
    } else {
      tmp_0 = identifierHash(_this__u8e3s4, stringHasher);
    }
    var tmp2_actorUid = tmp_0;
    var tmp4_actorName = _this__u8e3s4.sq0_1;
    var tmp5_actorMbox = _this__u8e3s4.tq0_1;
    var tmp6_actorMbox_sha1sum = _this__u8e3s4.uq0_1;
    var tmp7_actorOpenid = _this__u8e3s4.vq0_1;
    var tmp0_safe_receiver = _this__u8e3s4.xq0_1;
    var tmp8_actorAccountName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xpx_1;
    var tmp1_safe_receiver = _this__u8e3s4.xq0_1;
    var tmp9_actorAccountHomePage = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wpx_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.uj3_1, item_1.x6_1.uj3_1, modTime);
      destination_1.i1(tmp$ret$8);
    }
    return new ActorEntities(groupActor, tmp_1, destination_1);
  }
  function get_isAnonymous(_this__u8e3s4) {
    return (_this__u8e3s4.tq0_1 == null ? _this__u8e3s4.vq0_1 == null : false) ? _this__u8e3s4.xq0_1 == null : false;
  }
  function sam$kotlin_Comparator$0_0(function_0) {
    this.zq0_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_0).pa = function (a, b) {
    return this.zq0_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.aq1_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_69() {
    Companion_instance_118 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.aq1_1 = lazy(tmp_0, XapiInteractionType$Companion$_anonymous__3zafad);
  }
  protoOf(Companion_69).bq1 = 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.wpy_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_69).n4r = function () {
    return _get_$cachedSerializer__te6jhj_0(this);
  };
  protoOf(Companion_69).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_118;
  function Companion_getInstance_86() {
    XapiInteractionType_initEntries();
    if (Companion_instance_118 == null)
      new Companion_69();
    return Companion_instance_118;
  }
  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_86();
  }
  var $ENTRIES_0;
  function XapiInteractionType(name, ordinal, jsonFieldValue, dbFlag) {
    Enum.call(this, name, ordinal);
    this.wpy_1 = jsonFieldValue;
    this.xpy_1 = dbFlag;
  }
  function XapiInteractionTypeSerializer() {
  }
  protoOf(XapiInteractionTypeSerializer).q44 = 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()).q44();
  };
  protoOf(XapiInteractionTypeSerializer).s44 = function (decoder) {
    return Companion_getInstance_86().bq1(decoder.d48());
  };
  protoOf(XapiInteractionTypeSerializer).cq1 = function (encoder, value) {
    encoder.l49(value.wpy_1);
  };
  protoOf(XapiInteractionTypeSerializer).r44 = function (encoder, value) {
    return this.cq1(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.dq1_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_70() {
    Companion_instance_119 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.dq1_1 = lazy(tmp_0, XapiObjectType$Companion$_anonymous__v4av7w);
  }
  protoOf(Companion_70).n4r = function () {
    return _get_$cachedSerializer__te6jhj_1(this);
  };
  protoOf(Companion_70).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_119;
  function Companion_getInstance_87() {
    XapiObjectType_initEntries();
    if (Companion_instance_119 == null)
      new Companion_70();
    return Companion_instance_119;
  }
  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_87();
  }
  function XapiObjectType(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function XapiObjectTypeSerializer() {
  }
  protoOf(XapiObjectTypeSerializer).q44 = 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()).q44();
  };
  protoOf(XapiObjectTypeSerializer).s44 = function (decoder) {
    var strValue = decoder.d48();
    return valueOf(strValue);
  };
  protoOf(XapiObjectTypeSerializer).eq1 = function (encoder, value) {
    encoder.l49(value.toString());
  };
  protoOf(XapiObjectTypeSerializer).r44 = function (encoder, value) {
    return this.eq1(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_71() {
  }
  var Companion_instance_120;
  function Companion_getInstance_88() {
    return Companion_instance_120;
  }
  function $serializer_52() {
    $serializer_instance_52 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult.Score', this, 4);
    tmp0_serialDesc.t4f('scaled', true);
    tmp0_serialDesc.t4f('raw', true);
    tmp0_serialDesc.t4f('min', true);
    tmp0_serialDesc.t4f('max', true);
    this.fq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_52).q44 = function () {
    return this.fq1_1;
  };
  protoOf($serializer_52).k4g = 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_52).s44 = function (decoder) {
    var tmp0_desc = this.fq1_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.i48(tmp0_desc);
    if (tmp8_input.x48()) {
      tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.w48(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.w48(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.w48(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.w48(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.j48(tmp0_desc);
    return Score_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_52).gq1 = function (encoder, value) {
    var tmp0_desc = this.fq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.hq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, FloatSerializer_getInstance(), value.hq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.iq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, FloatSerializer_getInstance(), value.iq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.jq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, FloatSerializer_getInstance(), value.jq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.kq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, FloatSerializer_getInstance(), value.kq1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_52).r44 = function (encoder, value) {
    return this.gq1(encoder, value instanceof Score ? value : THROW_CCE());
  };
  var $serializer_instance_52;
  function $serializer_getInstance_64() {
    if ($serializer_instance_52 == null)
      new $serializer_52();
    return $serializer_instance_52;
  }
  function Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_64().fq1_1);
    }
    if (0 === (seen1 & 1))
      $this.hq1_1 = null;
    else
      $this.hq1_1 = scaled;
    if (0 === (seen1 & 2))
      $this.iq1_1 = null;
    else
      $this.iq1_1 = raw;
    if (0 === (seen1 & 4))
      $this.jq1_1 = null;
    else
      $this.jq1_1 = min;
    if (0 === (seen1 & 8))
      $this.kq1_1 = null;
    else
      $this.kq1_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.hq1_1 = scaled;
    this.iq1_1 = raw;
    this.jq1_1 = min;
    this.kq1_1 = max;
  }
  protoOf(Score).toString = function () {
    return 'Score(scaled=' + this.hq1_1 + ', raw=' + this.iq1_1 + ', min=' + this.jq1_1 + ', max=' + this.kq1_1 + ')';
  };
  protoOf(Score).hashCode = function () {
    var result = this.hq1_1 == null ? 0 : getNumberHashCode(this.hq1_1);
    result = imul(result, 31) + (this.iq1_1 == null ? 0 : getNumberHashCode(this.iq1_1)) | 0;
    result = imul(result, 31) + (this.jq1_1 == null ? 0 : getNumberHashCode(this.jq1_1)) | 0;
    result = imul(result, 31) + (this.kq1_1 == null ? 0 : getNumberHashCode(this.kq1_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.hq1_1, tmp0_other_with_cast.hq1_1))
      return false;
    if (!equals(this.iq1_1, tmp0_other_with_cast.iq1_1))
      return false;
    if (!equals(this.jq1_1, tmp0_other_with_cast.jq1_1))
      return false;
    if (!equals(this.kq1_1, tmp0_other_with_cast.kq1_1))
      return false;
    return true;
  };
  function Companion_72() {
    Companion_instance_121 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.lq1_1 = [null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_121;
  function Companion_getInstance_89() {
    if (Companion_instance_121 == null)
      new Companion_72();
    return Companion_instance_121;
  }
  function $serializer_53() {
    $serializer_instance_53 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult', this, 6);
    tmp0_serialDesc.t4f('completion', true);
    tmp0_serialDesc.t4f('success', true);
    tmp0_serialDesc.t4f('score', true);
    tmp0_serialDesc.t4f('duration', true);
    tmp0_serialDesc.t4f('response', true);
    tmp0_serialDesc.t4f('extensions', true);
    this.mq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_53).q44 = function () {
    return this.mq1_1;
  };
  protoOf($serializer_53).k4g = function () {
    var tmp0_cached = Companion_getInstance_89().lq1_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_64()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[5])];
  };
  protoOf($serializer_53).s44 = function (decoder) {
    var tmp0_desc = this.mq1_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.i48(tmp0_desc);
    var tmp11_cached = Companion_getInstance_89().lq1_1;
    if (tmp10_input.x48()) {
      tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, $serializer_getInstance_64(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.w48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.w48(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.w48(tmp0_desc, 2, $serializer_getInstance_64(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.w48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.j48(tmp0_desc);
    return XapiResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_53).nq1 = function (encoder, value) {
    var tmp0_desc = this.mq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_89().lq1_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.apw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, BooleanSerializer_getInstance(), value.apw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.bpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, BooleanSerializer_getInstance(), value.bpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.cpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_64(), value.cpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.dpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.dpw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.epw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.epw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.fpw_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, tmp2_cached[5], value.fpw_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_53).r44 = function (encoder, value) {
    return this.nq1(encoder, value instanceof XapiResult ? value : THROW_CCE());
  };
  var $serializer_instance_53;
  function $serializer_getInstance_65() {
    if ($serializer_instance_53 == null)
      new $serializer_53();
    return $serializer_instance_53;
  }
  function XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_65().mq1_1);
    }
    if (0 === (seen1 & 1))
      $this.apw_1 = null;
    else
      $this.apw_1 = completion;
    if (0 === (seen1 & 2))
      $this.bpw_1 = null;
    else
      $this.bpw_1 = success;
    if (0 === (seen1 & 4))
      $this.cpw_1 = null;
    else
      $this.cpw_1 = score;
    if (0 === (seen1 & 8))
      $this.dpw_1 = null;
    else
      $this.dpw_1 = duration;
    if (0 === (seen1 & 16))
      $this.epw_1 = null;
    else
      $this.epw_1 = response;
    if (0 === (seen1 & 32))
      $this.fpw_1 = null;
    else
      $this.fpw_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_89();
    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.apw_1 = completion;
    this.bpw_1 = success;
    this.cpw_1 = score;
    this.dpw_1 = duration;
    this.epw_1 = response;
    this.fpw_1 = extensions;
  }
  protoOf(XapiResult).toString = function () {
    return 'XapiResult(completion=' + this.apw_1 + ', success=' + this.bpw_1 + ', score=' + this.cpw_1 + ', duration=' + this.dpw_1 + ', response=' + this.epw_1 + ', extensions=' + this.fpw_1 + ')';
  };
  protoOf(XapiResult).hashCode = function () {
    var result = this.apw_1 == null ? 0 : getBooleanHashCode(this.apw_1);
    result = imul(result, 31) + (this.bpw_1 == null ? 0 : getBooleanHashCode(this.bpw_1)) | 0;
    result = imul(result, 31) + (this.cpw_1 == null ? 0 : this.cpw_1.hashCode()) | 0;
    result = imul(result, 31) + (this.dpw_1 == null ? 0 : getStringHashCode(this.dpw_1)) | 0;
    result = imul(result, 31) + (this.epw_1 == null ? 0 : getStringHashCode(this.epw_1)) | 0;
    result = imul(result, 31) + (this.fpw_1 == null ? 0 : hashCode(this.fpw_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.apw_1 == tmp0_other_with_cast.apw_1))
      return false;
    if (!(this.bpw_1 == tmp0_other_with_cast.bpw_1))
      return false;
    if (!equals(this.cpw_1, tmp0_other_with_cast.cpw_1))
      return false;
    if (!(this.dpw_1 == tmp0_other_with_cast.dpw_1))
      return false;
    if (!(this.epw_1 == tmp0_other_with_cast.epw_1))
      return false;
    if (!equals(this.fpw_1, tmp0_other_with_cast.fpw_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_73() {
    Companion_instance_122 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.wpt_1 = [null, null, null, null, null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_56()), null];
  }
  protoOf(Companion_73).n4r = function () {
    return $serializer_getInstance_66();
  };
  var Companion_instance_122;
  function Companion_getInstance_90() {
    if (Companion_instance_122 == null)
      new Companion_73();
    return Companion_instance_122;
  }
  function $serializer_54() {
    $serializer_instance_54 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatement', this, 12);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('actor', false);
    tmp0_serialDesc.t4f('verb', false);
    tmp0_serialDesc.t4f('object', false);
    tmp0_serialDesc.t4f('result', true);
    tmp0_serialDesc.t4f('context', true);
    tmp0_serialDesc.t4f('timestamp', true);
    tmp0_serialDesc.t4f('stored', true);
    tmp0_serialDesc.t4f('authority', true);
    tmp0_serialDesc.t4f('version', true);
    tmp0_serialDesc.t4f('attachments', true);
    tmp0_serialDesc.t4f('objectType', true);
    this.oq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_54).q44 = function () {
    return this.oq1_1;
  };
  protoOf($serializer_54).k4g = function () {
    var tmp0_cached = Companion_getInstance_90().wpt_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_69(), XapiStatementObjectSerializer_getInstance(), get_nullable($serializer_getInstance_65()), get_nullable($serializer_getInstance_61()), 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_54).s44 = function (decoder) {
    var tmp0_desc = this.oq1_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.i48(tmp0_desc);
    var tmp17_cached = Companion_getInstance_90().wpt_1;
    if (tmp16_input.x48()) {
      tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.u48(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.u48(tmp0_desc, 2, $serializer_getInstance_69(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.u48(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, $serializer_getInstance_65(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, $serializer_getInstance_61(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.u48(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.u48(tmp0_desc, 2, $serializer_getInstance_69(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.u48(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.w48(tmp0_desc, 4, $serializer_getInstance_65(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.w48(tmp0_desc, 5, $serializer_getInstance_61(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.w48(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.w48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.w48(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.j48(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_54).pq1 = function (encoder, value) {
    var tmp0_desc = this.oq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_90().wpt_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.jpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.jpt_1);
    }
    tmp1_output.y49(tmp0_desc, 1, XapiActorSerializer_getInstance(), value.kpt_1);
    tmp1_output.y49(tmp0_desc, 2, $serializer_getInstance_69(), value.lpt_1);
    tmp1_output.y49(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), value.mpt_1);
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.npt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, $serializer_getInstance_65(), value.npt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.opt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, $serializer_getInstance_61(), value.opt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.ppt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.ppt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.qpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, StringSerializer_getInstance(), value.qpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.rpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 8, XapiActorSerializer_getInstance(), value.rpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.spt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.spt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.tpt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 10, tmp2_cached[10], value.tpt_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 11) ? true : !(value.upt_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 11, XapiObjectTypeSerializer_instance, value.upt_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_54).r44 = function (encoder, value) {
    return this.pq1(encoder, value instanceof XapiStatement ? value : THROW_CCE());
  };
  var $serializer_instance_54;
  function $serializer_getInstance_66() {
    if ($serializer_instance_54 == null)
      new $serializer_54();
    return $serializer_instance_54;
  }
  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_66().oq1_1);
    }
    if (0 === (seen1 & 1))
      $this.jpt_1 = null;
    else
      $this.jpt_1 = id;
    $this.kpt_1 = actor;
    $this.lpt_1 = verb;
    $this.mpt_1 = object;
    if (0 === (seen1 & 16))
      $this.npt_1 = null;
    else
      $this.npt_1 = result;
    if (0 === (seen1 & 32))
      $this.opt_1 = null;
    else
      $this.opt_1 = context;
    if (0 === (seen1 & 64))
      $this.ppt_1 = null;
    else
      $this.ppt_1 = timestamp;
    if (0 === (seen1 & 128))
      $this.qpt_1 = null;
    else
      $this.qpt_1 = stored;
    if (0 === (seen1 & 256))
      $this.rpt_1 = null;
    else
      $this.rpt_1 = authority;
    if (0 === (seen1 & 512))
      $this.spt_1 = null;
    else
      $this.spt_1 = version;
    if (0 === (seen1 & 1024))
      $this.tpt_1 = null;
    else
      $this.tpt_1 = attachments;
    if (0 === (seen1 & 2048))
      $this.upt_1 = null;
    else
      $this.upt_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_90();
    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.jpt_1 = id;
    this.kpt_1 = actor;
    this.lpt_1 = verb;
    this.mpt_1 = object;
    this.npt_1 = result;
    this.opt_1 = context;
    this.ppt_1 = timestamp;
    this.qpt_1 = stored;
    this.rpt_1 = authority;
    this.spt_1 = version;
    this.tpt_1 = attachments;
    this.upt_1 = objectType;
  }
  protoOf(XapiStatement).npz = function () {
    return this.upt_1;
  };
  protoOf(XapiStatement).qq1 = 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).vpt = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, $super) {
    id = id === VOID ? this.jpt_1 : id;
    actor = actor === VOID ? this.kpt_1 : actor;
    verb = verb === VOID ? this.lpt_1 : verb;
    object = object === VOID ? this.mpt_1 : object;
    result = result === VOID ? this.npt_1 : result;
    context = context === VOID ? this.opt_1 : context;
    timestamp = timestamp === VOID ? this.ppt_1 : timestamp;
    stored = stored === VOID ? this.qpt_1 : stored;
    authority = authority === VOID ? this.rpt_1 : authority;
    version = version === VOID ? this.spt_1 : version;
    attachments = attachments === VOID ? this.tpt_1 : attachments;
    objectType = objectType === VOID ? this.upt_1 : objectType;
    return $super === VOID ? this.qq1(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) : $super.qq1.call(this, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).toString = function () {
    return 'XapiStatement(id=' + this.jpt_1 + ', actor=' + this.kpt_1 + ', verb=' + this.lpt_1 + ', object=' + this.mpt_1 + ', result=' + this.npt_1 + ', context=' + this.opt_1 + ', timestamp=' + this.ppt_1 + ', stored=' + this.qpt_1 + ', authority=' + this.rpt_1 + ', version=' + this.spt_1 + ', attachments=' + this.tpt_1 + ', objectType=' + this.upt_1 + ')';
  };
  protoOf(XapiStatement).hashCode = function () {
    var result = this.jpt_1 == null ? 0 : getStringHashCode(this.jpt_1);
    result = imul(result, 31) + hashCode(this.kpt_1) | 0;
    result = imul(result, 31) + this.lpt_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.mpt_1) | 0;
    result = imul(result, 31) + (this.npt_1 == null ? 0 : this.npt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.opt_1 == null ? 0 : this.opt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ppt_1 == null ? 0 : getStringHashCode(this.ppt_1)) | 0;
    result = imul(result, 31) + (this.qpt_1 == null ? 0 : getStringHashCode(this.qpt_1)) | 0;
    result = imul(result, 31) + (this.rpt_1 == null ? 0 : hashCode(this.rpt_1)) | 0;
    result = imul(result, 31) + (this.spt_1 == null ? 0 : getStringHashCode(this.spt_1)) | 0;
    result = imul(result, 31) + (this.tpt_1 == null ? 0 : hashCode(this.tpt_1)) | 0;
    result = imul(result, 31) + (this.upt_1 == null ? 0 : this.upt_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.jpt_1 == tmp0_other_with_cast.jpt_1))
      return false;
    if (!equals(this.kpt_1, tmp0_other_with_cast.kpt_1))
      return false;
    if (!this.lpt_1.equals(tmp0_other_with_cast.lpt_1))
      return false;
    if (!equals(this.mpt_1, tmp0_other_with_cast.mpt_1))
      return false;
    if (!equals(this.npt_1, tmp0_other_with_cast.npt_1))
      return false;
    if (!equals(this.opt_1, tmp0_other_with_cast.opt_1))
      return false;
    if (!(this.ppt_1 == tmp0_other_with_cast.ppt_1))
      return false;
    if (!(this.qpt_1 == tmp0_other_with_cast.qpt_1))
      return false;
    if (!equals(this.rpt_1, tmp0_other_with_cast.rpt_1))
      return false;
    if (!(this.spt_1 == tmp0_other_with_cast.spt_1))
      return false;
    if (!equals(this.tpt_1, tmp0_other_with_cast.tpt_1))
      return false;
    if (!equals(this.upt_1, tmp0_other_with_cast.upt_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.zps_1 = statementEntity;
    this.apt_1 = statementEntityJson;
    this.bpt_1 = actorEntities;
    this.cpt_1 = verbEntities;
    this.dpt_1 = activityEntities;
  }
  protoOf(StatementEntities).toString = function () {
    return 'StatementEntities(statementEntity=' + this.zps_1 + ', statementEntityJson=' + this.apt_1 + ', actorEntities=' + this.bpt_1 + ', verbEntities=' + this.cpt_1 + ', activityEntities=' + this.dpt_1 + ')';
  };
  protoOf(StatementEntities).hashCode = function () {
    var result = this.zps_1 == null ? 0 : this.zps_1.hashCode();
    result = imul(result, 31) + (this.apt_1 == null ? 0 : this.apt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.bpt_1 == null ? 0 : hashCode(this.bpt_1)) | 0;
    result = imul(result, 31) + (this.cpt_1 == null ? 0 : this.cpt_1.hashCode()) | 0;
    result = imul(result, 31) + (this.dpt_1 == null ? 0 : hashCode(this.dpt_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.zps_1, tmp0_other_with_cast.zps_1))
      return false;
    if (!equals(this.apt_1, tmp0_other_with_cast.apt_1))
      return false;
    if (!equals(this.bpt_1, tmp0_other_with_cast.bpt_1))
      return false;
    if (!equals(this.cpt_1, tmp0_other_with_cast.cpt_1))
      return false;
    if (!equals(this.dpt_1, tmp0_other_with_cast.dpt_1))
      return false;
    return true;
  };
  function toEntities_3(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, exactJson, isSubStatement, learningSpace) {
    isSubStatement = isSubStatement === VOID ? false : isSubStatement;
    _init_properties_XapiStatement_kt__raho1n();
    var tmp0_safe_receiver = _this__u8e3s4.jpt_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.mpt_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.opt_1;
    var contextRegistration = xapiRequireValidUuidOrNull(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.spz_1, 'Invalid context registration uuid');
    var statementActorEntities = toEntities_0(_this__u8e3s4.kpt_1, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp3_safe_receiver = _this__u8e3s4.rpt_1;
    var authorityActor = tmp3_safe_receiver == null ? null : toEntities_0(tmp3_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp4_safe_receiver = _this__u8e3s4.opt_1;
    var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.rpz_1;
    var contextInstructorActorEntities = tmp5_safe_receiver == null ? null : toEntities_0(tmp5_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var statementObjectForeignKeys = objectForeignKeys(_this__u8e3s4.mpt_1, stringHasher, statementUuid);
    var tmp34_statementIdHi = statementUuid.vmd();
    var tmp35_statementIdLo = statementUuid.wmd();
    var tmp_3;
    var tmp_4;
    var tmp6_safe_receiver = _this__u8e3s4.kpt_1.bpz();
    if ((tmp6_safe_receiver == null ? null : tmp6_safe_receiver.wpx_1) === learningSpace.tnt_1) {
      var tmp7_safe_receiver = _this__u8e3s4.kpt_1.bpz();
      tmp_4 = (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.xpx_1) === xapiSession.pjz_1;
    } else {
      tmp_4 = false;
    }
    if (tmp_4) {
      tmp_3 = xapiSession.njz_1;
    } else {
      tmp_3 = new Long(0, 0);
    }
    var tmp36_statementActorPersonUid = tmp_3;
    var tmp37_statementActorUid = statementActorEntities.ept_1.uj3_1;
    var tmp9_safe_receiver = authorityActor == null ? null : authorityActor.ept_1;
    var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.uj3_1;
    var tmp38_authorityActorUid = tmp10_elvis_lhs == null ? new Long(0, 0) : tmp10_elvis_lhs;
    var tmp39_statementVerbUid = stringHasher.hm7(xapiRequireValidIRI(_this__u8e3s4.lpt_1.rq1_1, 'Statement ' + statementUuid + ' VerbID ' + _this__u8e3s4.lpt_1.rq1_1 + ' is not a valid IRI'));
    var tmp11_safe_receiver = _this__u8e3s4.npt_1;
    var tmp40_resultCompletion = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.apw_1;
    var tmp12_safe_receiver = _this__u8e3s4.npt_1;
    var tmp41_resultSuccess = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.bpw_1;
    var tmp13_safe_receiver = _this__u8e3s4.npt_1;
    var tmp14_safe_receiver = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.cpw_1;
    var tmp42_resultScoreScaled = tmp14_safe_receiver == null ? null : tmp14_safe_receiver.hq1_1;
    var tmp15_safe_receiver = _this__u8e3s4.npt_1;
    var tmp16_safe_receiver = tmp15_safe_receiver == null ? null : tmp15_safe_receiver.cpw_1;
    var tmp43_resultScoreRaw = tmp16_safe_receiver == null ? null : tmp16_safe_receiver.iq1_1;
    var tmp17_safe_receiver = _this__u8e3s4.npt_1;
    var tmp18_safe_receiver = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.cpw_1;
    var tmp44_resultScoreMin = tmp18_safe_receiver == null ? null : tmp18_safe_receiver.jq1_1;
    var tmp19_safe_receiver = _this__u8e3s4.npt_1;
    var tmp20_safe_receiver = tmp19_safe_receiver == null ? null : tmp19_safe_receiver.cpw_1;
    var tmp45_resultScoreMax = tmp20_safe_receiver == null ? null : tmp20_safe_receiver.kq1_1;
    var tmp21_safe_receiver = _this__u8e3s4.npt_1;
    var tmp46_resultDuration = xapiRequireDurationOrNullAsLong(tmp21_safe_receiver == null ? null : tmp21_safe_receiver.dpw_1);
    var tmp22_safe_receiver = _this__u8e3s4.npt_1;
    var tmp47_resultResponse = tmp22_safe_receiver == null ? null : tmp22_safe_receiver.epw_1;
    var tmp23_safe_receiver = _this__u8e3s4.ppt_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.vmd();
    var tmp50_contextRegistrationHi = tmp26_elvis_lhs == null ? new Long(0, 0) : tmp26_elvis_lhs;
    var tmp28_elvis_lhs = contextRegistration == null ? null : contextRegistration.wmd();
    var tmp51_contextRegistrationLo = tmp28_elvis_lhs == null ? new Long(0, 0) : tmp28_elvis_lhs;
    var tmp29_safe_receiver = _this__u8e3s4.opt_1;
    var tmp52_contextPlatform = tmp29_safe_receiver == null ? null : tmp29_safe_receiver.upz_1;
    var tmp31_safe_receiver = contextInstructorActorEntities == null ? null : contextInstructorActorEntities.ept_1;
    var tmp32_elvis_lhs = tmp31_safe_receiver == null ? null : tmp31_safe_receiver.uj3_1;
    var tmp53_contextInstructorActorUid = tmp32_elvis_lhs == null ? new Long(0, 0) : tmp32_elvis_lhs;
    var tmp54_statementContentEntryUid = xapiSession.sjz_1;
    var tmp55_statementClazzUid = xapiSession.qjz_1;
    var tmp56_statementCbUid = xapiSession.rjz_1;
    var tmp_6;
    if (isCompletionOrProgress(_this__u8e3s4)) {
      var tmp_7;
      if (xapiSession.sjz_1.equals(new Long(0, 0))) {
        tmp_7 = true;
      } else {
        var tmp_8 = _this__u8e3s4.mpt_1;
        var tmp33_safe_receiver = tmp_8 instanceof XapiActivityStatementObject ? tmp_8 : null;
        tmp_7 = (tmp33_safe_receiver == null ? null : tmp33_safe_receiver.oq0_1) === xapiSession.ujz_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.mpt_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.vmd(), statementUuid.wmd(), 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.lpt_1, stringHasher);
    var tmp62_safe_receiver = _this__u8e3s4.opt_1;
    var tmp63_safe_receiver = tmp62_safe_receiver == null ? null : tmp62_safe_receiver.ypz_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.mpt_1, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, statementUuid, learningSpace));
  }
  function isCompletionOrProgress(_this__u8e3s4) {
    _init_properties_XapiStatement_kt__raho1n();
    var tmp;
    var tmp0_safe_receiver = _this__u8e3s4.npt_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.apw_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).l4r = 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.g3b();
    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_123.n4r();
        break;
      case 3:
        tmp_2 = Companion_instance_113.n4r();
        break;
      case 4:
        tmp_2 = Companion_getInstance_85().n4r();
        break;
      case 0:
        tmp_2 = Companion_instance_124.n4r();
        break;
      case 1:
        tmp_2 = Companion_getInstance_90().n4r();
        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_74() {
  }
  protoOf(Companion_74).n4r = function () {
    return $serializer_getInstance_67();
  };
  var Companion_instance_123;
  function Companion_getInstance_91() {
    return Companion_instance_123;
  }
  function $serializer_55() {
    $serializer_instance_55 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivityStatementObject', this, 3);
    tmp0_serialDesc.t4f('objectType', true);
    tmp0_serialDesc.t4f('id', false);
    tmp0_serialDesc.t4f('definition', true);
    this.vq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_55).q44 = function () {
    return this.vq1_1;
  };
  protoOf($serializer_55).k4g = 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_59())];
  };
  protoOf($serializer_55).s44 = function (decoder) {
    var tmp0_desc = this.vq1_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.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_59(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.w48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.w48(tmp0_desc, 2, $serializer_getInstance_59(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return XapiActivityStatementObject_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_55).wq1 = function (encoder, value) {
    var tmp0_desc = this.vq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.nq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.nq0_1);
    }
    tmp1_output.w49(tmp0_desc, 1, value.oq0_1);
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.pq0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, $serializer_getInstance_59(), value.pq0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_55).r44 = function (encoder, value) {
    return this.wq1(encoder, value instanceof XapiActivityStatementObject ? value : THROW_CCE());
  };
  var $serializer_instance_55;
  function $serializer_getInstance_67() {
    if ($serializer_instance_55 == null)
      new $serializer_55();
    return $serializer_instance_55;
  }
  function XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_67().vq1_1);
    }
    if (0 === (seen1 & 1))
      $this.nq0_1 = null;
    else
      $this.nq0_1 = objectType;
    $this.oq0_1 = id;
    if (0 === (seen1 & 4))
      $this.pq0_1 = null;
    else
      $this.pq0_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.nq0_1 = objectType;
    this.oq0_1 = id;
    this.pq0_1 = definition;
  }
  protoOf(XapiActivityStatementObject).npz = function () {
    return this.nq0_1;
  };
  protoOf(XapiActivityStatementObject).toString = function () {
    return 'XapiActivityStatementObject(objectType=' + this.nq0_1 + ', id=' + this.oq0_1 + ', definition=' + this.pq0_1 + ')';
  };
  protoOf(XapiActivityStatementObject).hashCode = function () {
    var result = this.nq0_1 == null ? 0 : this.nq0_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.oq0_1) | 0;
    result = imul(result, 31) + (this.pq0_1 == null ? 0 : this.pq0_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.nq0_1, tmp0_other_with_cast.nq0_1))
      return false;
    if (!(this.oq0_1 === tmp0_other_with_cast.oq0_1))
      return false;
    if (!equals(this.pq0_1, tmp0_other_with_cast.pq0_1))
      return false;
    return true;
  };
  function objectForeignKeys(_this__u8e3s4, stringHasher, statementUuid) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = new Pair(stringHasher.hm7(_this__u8e3s4.oq0_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.yq1_1);
            tmp = new Pair(uuid.vmd(), uuid.wmd());
          } else {
            if (_this__u8e3s4 instanceof XapiStatement) {
              var tmp_0 = statementUuid.vmd();
              // Inline function 'kotlin.Long.plus' call
              var tmp$ret$0 = statementUuid.wmd().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, learningSpace) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = listOf_0(new StatementEntities(VOID, VOID, VOID, VOID, listOf_0(toEntities(_this__u8e3s4.pq0_1, _this__u8e3s4.oq0_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.vmd();
            // Inline function 'kotlin.Long.plus' call
            var tmp$ret$0 = parentStatementUuid.wmd().lc(toLong(1));
            tmp = toEntities_3(_this__u8e3s4.vpt(Uuid_init_$Create$(tmp_0, tmp$ret$0).toString()), stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, null, true, learningSpace);
          } 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.npz();
    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_75() {
  }
  protoOf(Companion_75).n4r = function () {
    return $serializer_getInstance_68();
  };
  var Companion_instance_124;
  function Companion_getInstance_92() {
    return Companion_instance_124;
  }
  function $serializer_56() {
    $serializer_instance_56 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatementRef', this, 2);
    tmp0_serialDesc.t4f('objectType', false);
    tmp0_serialDesc.t4f('id', false);
    this.zq1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_56).q44 = function () {
    return this.zq1_1;
  };
  protoOf($serializer_56).k4g = 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_56).s44 = function (decoder) {
    var tmp0_desc = this.zq1_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.i48(tmp0_desc);
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.s48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiStatementRef_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_56).aq2 = function (encoder, value) {
    var tmp0_desc = this.zq1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.y49(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.xq1_1);
    tmp1_output.w49(tmp0_desc, 1, value.yq1_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_56).r44 = function (encoder, value) {
    return this.aq2(encoder, value instanceof XapiStatementRef ? value : THROW_CCE());
  };
  var $serializer_instance_56;
  function $serializer_getInstance_68() {
    if ($serializer_instance_56 == null)
      new $serializer_56();
    return $serializer_instance_56;
  }
  function XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_68().zq1_1);
    }
    $this.xq1_1 = objectType;
    $this.yq1_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).npz = function () {
    return this.xq1_1;
  };
  protoOf(XapiStatementRef).toString = function () {
    return 'XapiStatementRef(objectType=' + this.xq1_1 + ', id=' + this.yq1_1 + ')';
  };
  protoOf(XapiStatementRef).hashCode = function () {
    var result = this.xq1_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.yq1_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.xq1_1.equals(tmp0_other_with_cast.xq1_1))
      return false;
    if (!(this.yq1_1 === tmp0_other_with_cast.yq1_1))
      return false;
    return true;
  };
  function Companion_76() {
    Companion_instance_125 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.bq2_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_125;
  function Companion_getInstance_93() {
    if (Companion_instance_125 == null)
      new Companion_76();
    return Companion_instance_125;
  }
  function $serializer_57() {
    $serializer_instance_57 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiVerb', this, 2);
    tmp0_serialDesc.t4f('id', true);
    tmp0_serialDesc.t4f('display', true);
    this.cq2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_57).q44 = function () {
    return this.cq2_1;
  };
  protoOf($serializer_57).k4g = function () {
    var tmp0_cached = Companion_getInstance_93().bq2_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_57).s44 = function (decoder) {
    var tmp0_desc = this.cq2_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.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_93().bq2_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.w48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.w48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiVerb_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_57).dq2 = function (encoder, value) {
    var tmp0_desc = this.cq2_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_93().bq2_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.rq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, StringSerializer_getInstance(), value.rq1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.sq1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, tmp2_cached[1], value.sq1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_57).r44 = function (encoder, value) {
    return this.dq2(encoder, value instanceof XapiVerb ? value : THROW_CCE());
  };
  var $serializer_instance_57;
  function $serializer_getInstance_69() {
    if ($serializer_instance_57 == null)
      new $serializer_57();
    return $serializer_instance_57;
  }
  function XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_69().cq2_1);
    }
    if (0 === (seen1 & 1))
      $this.rq1_1 = null;
    else
      $this.rq1_1 = id;
    if (0 === (seen1 & 2))
      $this.sq1_1 = null;
    else
      $this.sq1_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_93();
    id = id === VOID ? null : id;
    display = display === VOID ? null : display;
    this.rq1_1 = id;
    this.sq1_1 = display;
  }
  protoOf(XapiVerb).toString = function () {
    return 'XapiVerb(id=' + this.rq1_1 + ', display=' + this.sq1_1 + ')';
  };
  protoOf(XapiVerb).hashCode = function () {
    var result = this.rq1_1 == null ? 0 : getStringHashCode(this.rq1_1);
    result = imul(result, 31) + (this.sq1_1 == null ? 0 : hashCode(this.sq1_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.rq1_1 == tmp0_other_with_cast.rq1_1))
      return false;
    if (!equals(this.sq1_1, tmp0_other_with_cast.sq1_1))
      return false;
    return true;
  };
  function get_VERB_COMPLETED() {
    return VERB_COMPLETED;
  }
  var VERB_COMPLETED;
  function VerbEntities(verbEntity, verbLangMapEntries) {
    this.hpt_1 = verbEntity;
    this.ipt_1 = verbLangMapEntries;
  }
  protoOf(VerbEntities).toString = function () {
    return 'VerbEntities(verbEntity=' + this.hpt_1 + ', verbLangMapEntries=' + this.ipt_1 + ')';
  };
  protoOf(VerbEntities).hashCode = function () {
    var result = this.hpt_1.hashCode();
    result = imul(result, 31) + hashCode(this.ipt_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.hpt_1.equals(tmp0_other_with_cast.hpt_1))
      return false;
    if (!equals(this.ipt_1, tmp0_other_with_cast.ipt_1))
      return false;
    return true;
  };
  function toVerbEntities(_this__u8e3s4, xxHasher) {
    var verbIri = xapiRequireValidIRI(_this__u8e3s4.rq1_1);
    var verbUid = xxHasher.hm7(verbIri);
    var tmp = new VerbEntity(verbUid, _this__u8e3s4.rq1_1);
    var tmp0_safe_receiver = _this__u8e3s4.sq1_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.hm7(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.hq2_1, $this.kq2_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.jq2_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.pq2(false);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = $this.lq2_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.mq2_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.yq2_1 = this$0;
    this.zq2_1 = $usageDurationVal;
    this.aq3_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.yq2_1.gq2_1.tok(listOf_0(createXapiStatement(this.yq2_1, this.zq2_1.lc(this.aq3_1), 100, true)), this.yq2_1.hq2_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.yq2_1, this.zq2_1, this.aq3_1, completion);
    i.bq3_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, learningSpace) {
    this.eq2_1 = saveStatementOnClearUseCase;
    this.fq2_1 = saveStatementOnUnloadUseCase;
    this.gq2_1 = xapiStatementResource;
    this.hq2_1 = xapiSession;
    this.iq2_1 = scope;
    this.jq2_1 = xapiActivityProvider;
    this.kq2_1 = learningSpace;
    this.lq2_1 = atomic$long$1(new Long(0, 0));
    this.mq2_1 = atomic$int$1(0);
    this.nq2_1 = atomic$long$1(new Long(0, 0));
    this.oq2_1 = atomic$boolean$1(false);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder).pq2 = function (active) {
    var tmp = Napier_getInstance();
    tmp.e5e(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda(active));
    if (active) {
      $l$block: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_0 = this.nq2_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.nq2_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.lq2_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).cq3 = function (progress) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.mq2_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).dq3 = function (oneCompletionStatementOnly) {
    var tmp = Napier_getInstance();
    tmp.e5e(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$lambda);
    var tmp_0;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = this.oq2_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.lq2_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.nq2_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.mq2_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.iq2_1, VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this, usageDurationVal, timeSinceActive, null));
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).um7 = function () {
    this.eq2_1.eq3(listOf_0(createFinalStatement(this)), this.hq2_1);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).fq3 = function () {
    var tmp0_safe_receiver = this.fq2_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.eq3(listOf_0(createFinalStatement(this)), this.hq2_1);
    }
  };
  function NonInteractiveContentXapiStatementRecorderFactory(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, learningSpace) {
    this.gq3_1 = saveStatementOnClearUseCase;
    this.hq3_1 = saveStatementOnUnloadUseCase;
    this.iq3_1 = xapiStatementResource;
    this.jq3_1 = learningSpace;
  }
  protoOf(NonInteractiveContentXapiStatementRecorderFactory).kq3 = function (xapiSession, scope, xapiActivityProvider) {
    return new NonInteractiveContentXapiStatementRecorder(this.gq3_1, this.hq3_1, this.iq3_1, xapiSession, scope, xapiActivityProvider, this.jq3_1);
  };
  function SaveStatementOnClearUseCase() {
  }
  function SaveStatementOnUnloadUseCase() {
  }
  function Companion_77() {
    Companion_instance_126 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.lq3_1 = [new ArrayListSerializer($serializer_getInstance_66()), null];
  }
  protoOf(Companion_77).n4r = function () {
    return $serializer_getInstance_70();
  };
  var Companion_instance_126;
  function Companion_getInstance_94() {
    if (Companion_instance_126 == null)
      new Companion_77();
    return Companion_instance_126;
  }
  function $serializer_58() {
    $serializer_instance_58 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.savestatementonclear.XapiStatementsAndSession', this, 2);
    tmp0_serialDesc.t4f('statements', false);
    tmp0_serialDesc.t4f('session', false);
    this.mq3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_58).q44 = function () {
    return this.mq3_1;
  };
  protoOf($serializer_58).k4g = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_94().lq3_1[0], $serializer_getInstance_6()];
  };
  protoOf($serializer_58).s44 = function (decoder) {
    var tmp0_desc = this.mq3_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.i48(tmp0_desc);
    var tmp7_cached = Companion_getInstance_94().lq3_1;
    if (tmp6_input.x48()) {
      tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.u48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.u48(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.j48(tmp0_desc);
    return XapiStatementsAndSession_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_58).nq3 = function (encoder, value) {
    var tmp0_desc = this.mq3_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_94().lq3_1;
    tmp1_output.y49(tmp0_desc, 0, tmp2_cached[0], value.oq3_1);
    tmp1_output.y49(tmp0_desc, 1, $serializer_getInstance_6(), value.pq3_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_58).r44 = function (encoder, value) {
    return this.nq3(encoder, value instanceof XapiStatementsAndSession ? value : THROW_CCE());
  };
  var $serializer_instance_58;
  function $serializer_getInstance_70() {
    if ($serializer_instance_58 == null)
      new $serializer_58();
    return $serializer_instance_58;
  }
  function XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_70().mq3_1);
    }
    $this.oq3_1 = statements;
    $this.pq3_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_94();
    this.oq3_1 = statements;
    this.pq3_1 = session;
  }
  protoOf(XapiStatementsAndSession).toString = function () {
    return 'XapiStatementsAndSession(statements=' + this.oq3_1 + ', session=' + this.pq3_1 + ')';
  };
  protoOf(XapiStatementsAndSession).hashCode = function () {
    var result = hashCode(this.oq3_1);
    result = imul(result, 31) + this.pq3_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.oq3_1, tmp0_other_with_cast.oq3_1))
      return false;
    if (!this.pq3_1.equals(tmp0_other_with_cast.pq3_1))
      return false;
    return true;
  };
  function ResumeOrStartXapiSessionUseCase() {
  }
  function UstadMobileConstants() {
    UstadMobileConstants_instance = this;
    this.qq3_1 = 'UTF-8';
    this.rq3_1 = 0;
    this.sq3_1 = 'UTC';
    this.tq3_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.uq3_1 = ['ar', 'arc', 'dv', 'fa', 'ha', 'he', 'khw', 'ks', 'ku', 'ps', 'ur', 'yi'];
    this.vq3_1 = 13;
    this.wq3_1 = 18;
    this.xq3_1 = 10000;
    this.yq3_1 = 512;
  }
  var UstadMobileConstants_instance;
  function UstadMobileConstants_getInstance() {
    if (UstadMobileConstants_instance == null)
      new UstadMobileConstants();
    return UstadMobileConstants_instance;
  }
  function Companion_78() {
    Companion_instance_127 = this;
    this.zq3_1 = new UstadGoOptions(null, false);
  }
  var Companion_instance_127;
  function Companion_getInstance_95() {
    if (Companion_instance_127 == null)
      new Companion_78();
    return Companion_instance_127;
  }
  function UstadGoOptions(popUpToViewName, popUpToInclusive, clearStack, serializer) {
    Companion_getInstance_95();
    popUpToViewName = popUpToViewName === VOID ? null : popUpToViewName;
    popUpToInclusive = popUpToInclusive === VOID ? false : popUpToInclusive;
    clearStack = clearStack === VOID ? false : clearStack;
    serializer = serializer === VOID ? null : serializer;
    this.aq4_1 = popUpToViewName;
    this.bq4_1 = popUpToInclusive;
    this.cq4_1 = clearStack;
    this.dq4_1 = serializer;
  }
  protoOf(UstadGoOptions).toString = function () {
    return 'UstadGoOptions(popUpToViewName=' + this.aq4_1 + ', popUpToInclusive=' + this.bq4_1 + ', clearStack=' + this.cq4_1 + ', serializer=' + this.dq4_1 + ')';
  };
  protoOf(UstadGoOptions).hashCode = function () {
    var result = this.aq4_1 == null ? 0 : getStringHashCode(this.aq4_1);
    result = imul(result, 31) + getBooleanHashCode(this.bq4_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cq4_1) | 0;
    result = imul(result, 31) + (this.dq4_1 == null ? 0 : hashCode(this.dq4_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.aq4_1 == tmp0_other_with_cast.aq4_1))
      return false;
    if (!(this.bq4_1 === tmp0_other_with_cast.bq4_1))
      return false;
    if (!(this.cq4_1 === tmp0_other_with_cast.cq4_1))
      return false;
    if (!equals(this.dq4_1, tmp0_other_with_cast.dq4_1))
      return false;
    return true;
  };
  function UiLanguage(langCode, langDisplay) {
    this.eq4_1 = langCode;
    this.fq4_1 = langDisplay;
  }
  protoOf(UiLanguage).toString = function () {
    return 'UiLanguage(langCode=' + this.eq4_1 + ', langDisplay=' + this.fq4_1 + ')';
  };
  protoOf(UiLanguage).hashCode = function () {
    var result = getStringHashCode(this.eq4_1);
    result = imul(result, 31) + getStringHashCode(this.fq4_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.eq4_1 === tmp0_other_with_cast.eq4_1))
      return false;
    if (!(this.fq4_1 === tmp0_other_with_cast.fq4_1))
      return false;
    return true;
  };
  function Companion_79() {
    Companion_instance_128 = this;
    this.gq4_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.gq4_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.hq4_1 = destination;
    this.iq4_1 = 'ustadmobileContent';
    this.jq4_1 = '';
    this.PREFKEY_LOCALE = 'locale';
    this.kq4_1 = 2;
    this.lq4_1 = 4;
    this.mq4_1 = 'ref';
    this.nq4_1 = 67108864;
    this.oq4_1 = 'dlenabled';
    this.pq4_1 = 16;
    this.qq4_1 = 32;
    this.rq4_1 = 64;
    this.sq4_1 = 'umclient';
    this.tq4_1 = '/umapp/#/';
    this.uq4_1 = 'sitedata';
    this.vq4_1 = 'container';
    this.wq4_1 = 'attachments';
    this.xq4_1 = 'rootViewName';
    this.yq4_1 = 'client_id';
  }
  protoOf(Companion_79).zq4 = function () {
    return this.PREFKEY_LOCALE;
  };
  var Companion_instance_128;
  function Companion_getInstance_96() {
    if (Companion_instance_128 == null)
      new Companion_79();
    return Companion_instance_128;
  }
  function UstadMobileSystemCommon(settings, langConfig) {
    Companion_getInstance_96();
    this.aq5_1 = settings;
    this.bq5_1 = langConfig;
    this.cq5_1 = null;
  }
  protoOf(UstadMobileSystemCommon).dq5 = function () {
    Companion_getInstance_140();
    return 'CourseListHome';
  };
  protoOf(UstadMobileSystemCommon).eq5 = 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.joj(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.fq5_1 = visible;
    this.gq5_1 = text;
    this.hq5_1 = enabled;
    this.iq5_1 = onClick;
  }
  protoOf(ActionBarButtonUiState).jq5 = function (visible, text, enabled, onClick) {
    return new ActionBarButtonUiState(visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).kq5 = function (visible, text, enabled, onClick, $super) {
    visible = visible === VOID ? this.fq5_1 : visible;
    text = text === VOID ? this.gq5_1 : text;
    enabled = enabled === VOID ? this.hq5_1 : enabled;
    onClick = onClick === VOID ? this.iq5_1 : onClick;
    return $super === VOID ? this.jq5(visible, text, enabled, onClick) : $super.jq5.call(this, visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).toString = function () {
    return 'ActionBarButtonUiState(visible=' + this.fq5_1 + ', text=' + this.gq5_1 + ', enabled=' + this.hq5_1 + ', onClick=' + this.iq5_1 + ')';
  };
  protoOf(ActionBarButtonUiState).hashCode = function () {
    var result = getBooleanHashCode(this.fq5_1);
    result = imul(result, 31) + (this.gq5_1 == null ? 0 : getStringHashCode(this.gq5_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hq5_1) | 0;
    result = imul(result, 31) + hashCode(this.iq5_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.fq5_1 === tmp0_other_with_cast.fq5_1))
      return false;
    if (!(this.gq5_1 == tmp0_other_with_cast.gq5_1))
      return false;
    if (!(this.hq5_1 === tmp0_other_with_cast.hq5_1))
      return false;
    if (!equals(this.iq5_1, tmp0_other_with_cast.iq5_1))
      return false;
    return true;
  };
  function AppActionButton(icon, contentDescription, onClick, id) {
    this.lq5_1 = icon;
    this.mq5_1 = contentDescription;
    this.nq5_1 = onClick;
    this.oq5_1 = id;
  }
  protoOf(AppActionButton).toString = function () {
    return 'AppActionButton(icon=' + this.lq5_1 + ', contentDescription=' + this.mq5_1 + ', onClick=' + this.nq5_1 + ', id=' + this.oq5_1 + ')';
  };
  protoOf(AppActionButton).hashCode = function () {
    var result = this.lq5_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.mq5_1) | 0;
    result = imul(result, 31) + hashCode(this.nq5_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.oq5_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.lq5_1.equals(tmp0_other_with_cast.lq5_1))
      return false;
    if (!(this.mq5_1 === tmp0_other_with_cast.mq5_1))
      return false;
    if (!equals(this.nq5_1, tmp0_other_with_cast.nq5_1))
      return false;
    if (!(this.oq5_1 === tmp0_other_with_cast.oq5_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.pq5_1 = visible;
    this.qq5_1 = searchText;
    this.rq5_1 = onSearchTextChanged;
  }
  protoOf(AppBarSearchUiState).sq5 = function (visible, searchText, onSearchTextChanged) {
    return new AppBarSearchUiState(visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).tq5 = function (visible, searchText, onSearchTextChanged, $super) {
    visible = visible === VOID ? this.pq5_1 : visible;
    searchText = searchText === VOID ? this.qq5_1 : searchText;
    onSearchTextChanged = onSearchTextChanged === VOID ? this.rq5_1 : onSearchTextChanged;
    return $super === VOID ? this.sq5(visible, searchText, onSearchTextChanged) : $super.sq5.call(this, visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).toString = function () {
    return 'AppBarSearchUiState(visible=' + this.pq5_1 + ', searchText=' + this.qq5_1 + ', onSearchTextChanged=' + this.rq5_1 + ')';
  };
  protoOf(AppBarSearchUiState).hashCode = function () {
    var result = getBooleanHashCode(this.pq5_1);
    result = imul(result, 31) + getStringHashCode(this.qq5_1) | 0;
    result = imul(result, 31) + hashCode(this.rq5_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.pq5_1 === tmp0_other_with_cast.pq5_1))
      return false;
    if (!(this.qq5_1 === tmp0_other_with_cast.qq5_1))
      return false;
    if (!equals(this.rq5_1, tmp0_other_with_cast.rq5_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.uq5_1 = fabState;
    this.vq5_1 = loadingState;
    this.wq5_1 = title;
    this.xq5_1 = navigationVisible;
    this.yq5_1 = hideBottomNavigation;
    this.zq5_1 = hideSettingsIcon;
    this.aq6_1 = userAccountIconVisible;
    this.bq6_1 = searchState;
    this.cq6_1 = actionBarButtonState;
    this.dq6_1 = overflowItems;
    this.eq6_1 = hideAppBar;
    this.fq6_1 = actionButtons;
    this.gq6_1 = leadingActionButton;
    this.hq6_1 = appBarColors;
  }
  protoOf(AppUiState).iq6 = 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).jq6 = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors, $super) {
    fabState = fabState === VOID ? this.uq5_1 : fabState;
    loadingState = loadingState === VOID ? this.vq5_1 : loadingState;
    title = title === VOID ? this.wq5_1 : title;
    navigationVisible = navigationVisible === VOID ? this.xq5_1 : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? this.yq5_1 : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? this.zq5_1 : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? this.aq6_1 : userAccountIconVisible;
    searchState = searchState === VOID ? this.bq6_1 : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? this.cq6_1 : actionBarButtonState;
    overflowItems = overflowItems === VOID ? this.dq6_1 : overflowItems;
    hideAppBar = hideAppBar === VOID ? this.eq6_1 : hideAppBar;
    actionButtons = actionButtons === VOID ? this.fq6_1 : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? this.gq6_1 : leadingActionButton;
    appBarColors = appBarColors === VOID ? this.hq6_1 : appBarColors;
    return $super === VOID ? this.iq6(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) : $super.iq6.call(this, fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).toString = function () {
    return 'AppUiState(fabState=' + this.uq5_1 + ', loadingState=' + this.vq5_1 + ', title=' + this.wq5_1 + ', navigationVisible=' + this.xq5_1 + ', hideBottomNavigation=' + this.yq5_1 + ', hideSettingsIcon=' + this.zq5_1 + ', userAccountIconVisible=' + this.aq6_1 + ', searchState=' + this.bq6_1 + ', actionBarButtonState=' + this.cq6_1 + ', overflowItems=' + this.dq6_1 + ', hideAppBar=' + this.eq6_1 + ', actionButtons=' + this.fq6_1 + ', leadingActionButton=' + this.gq6_1 + ', appBarColors=' + this.hq6_1 + ')';
  };
  protoOf(AppUiState).hashCode = function () {
    var result = this.uq5_1.hashCode();
    result = imul(result, 31) + this.vq5_1.hashCode() | 0;
    result = imul(result, 31) + (this.wq5_1 == null ? 0 : getStringHashCode(this.wq5_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xq5_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yq5_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zq5_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aq6_1) | 0;
    result = imul(result, 31) + this.bq6_1.hashCode() | 0;
    result = imul(result, 31) + this.cq6_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dq6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.eq6_1) | 0;
    result = imul(result, 31) + hashCode(this.fq6_1) | 0;
    result = imul(result, 31) + (this.gq6_1 == null ? 0 : this.gq6_1.hashCode()) | 0;
    result = imul(result, 31) + this.hq6_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.uq5_1.equals(tmp0_other_with_cast.uq5_1))
      return false;
    if (!this.vq5_1.equals(tmp0_other_with_cast.vq5_1))
      return false;
    if (!(this.wq5_1 == tmp0_other_with_cast.wq5_1))
      return false;
    if (!(this.xq5_1 === tmp0_other_with_cast.xq5_1))
      return false;
    if (!(this.yq5_1 === tmp0_other_with_cast.yq5_1))
      return false;
    if (!(this.zq5_1 === tmp0_other_with_cast.zq5_1))
      return false;
    if (!(this.aq6_1 === tmp0_other_with_cast.aq6_1))
      return false;
    if (!this.bq6_1.equals(tmp0_other_with_cast.bq6_1))
      return false;
    if (!this.cq6_1.equals(tmp0_other_with_cast.cq6_1))
      return false;
    if (!equals(this.dq6_1, tmp0_other_with_cast.dq6_1))
      return false;
    if (!(this.eq6_1 === tmp0_other_with_cast.eq6_1))
      return false;
    if (!equals(this.fq6_1, tmp0_other_with_cast.fq6_1))
      return false;
    if (!equals(this.gq6_1, tmp0_other_with_cast.gq6_1))
      return false;
    if (!this.hq6_1.equals(tmp0_other_with_cast.hq6_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.kq6_1 = visible;
    this.lq6_1 = text;
    this.mq6_1 = icon;
    this.nq6_1 = onClick;
  }
  protoOf(FabUiState).oq6 = function (visible, text, icon, onClick) {
    return new FabUiState(visible, text, icon, onClick);
  };
  protoOf(FabUiState).pq6 = function (visible, text, icon, onClick, $super) {
    visible = visible === VOID ? this.kq6_1 : visible;
    text = text === VOID ? this.lq6_1 : text;
    icon = icon === VOID ? this.mq6_1 : icon;
    onClick = onClick === VOID ? this.nq6_1 : onClick;
    return $super === VOID ? this.oq6(visible, text, icon, onClick) : $super.oq6.call(this, visible, text, icon, onClick);
  };
  protoOf(FabUiState).toString = function () {
    return 'FabUiState(visible=' + this.kq6_1 + ', text=' + this.lq6_1 + ', icon=' + this.mq6_1 + ', onClick=' + this.nq6_1 + ')';
  };
  protoOf(FabUiState).hashCode = function () {
    var result = getBooleanHashCode(this.kq6_1);
    result = imul(result, 31) + (this.lq6_1 == null ? 0 : getStringHashCode(this.lq6_1)) | 0;
    result = imul(result, 31) + this.mq6_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.nq6_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.kq6_1 === tmp0_other_with_cast.kq6_1))
      return false;
    if (!(this.lq6_1 == tmp0_other_with_cast.lq6_1))
      return false;
    if (!this.mq6_1.equals(tmp0_other_with_cast.mq6_1))
      return false;
    if (!equals(this.nq6_1, tmp0_other_with_cast.nq6_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_80() {
    Companion_instance_129 = this;
    this.qq6_1 = new LoadingUiState(State_INDETERMINATE_getInstance());
    this.rq6_1 = new LoadingUiState(State_NOT_LOADING_getInstance());
  }
  var Companion_instance_129;
  function Companion_getInstance_97() {
    if (Companion_instance_129 == null)
      new Companion_80();
    return Companion_instance_129;
  }
  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_97();
    loadingState = loadingState === VOID ? State_NOT_LOADING_getInstance() : loadingState;
    this.sq6_1 = loadingState;
  }
  protoOf(LoadingUiState).toString = function () {
    return 'LoadingUiState(loadingState=' + this.sq6_1 + ')';
  };
  protoOf(LoadingUiState).hashCode = function () {
    return this.sq6_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.sq6_1.equals(tmp0_other_with_cast.sq6_1))
      return false;
    return true;
  };
  function OverflowItem(label, onClick) {
    this.tq6_1 = label;
    this.uq6_1 = onClick;
  }
  protoOf(OverflowItem).toString = function () {
    return 'OverflowItem(label=' + this.tq6_1 + ', onClick=' + this.uq6_1 + ')';
  };
  protoOf(OverflowItem).hashCode = function () {
    var result = getStringHashCode(this.tq6_1);
    result = imul(result, 31) + hashCode(this.uq6_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.tq6_1 === tmp0_other_with_cast.tq6_1))
      return false;
    if (!equals(this.uq6_1, tmp0_other_with_cast.uq6_1))
      return false;
    return true;
  };
  function Snack(message, action, onAction) {
    action = action === VOID ? null : action;
    onAction = onAction === VOID ? null : onAction;
    this.vq6_1 = message;
    this.wq6_1 = action;
    this.xq6_1 = onAction;
  }
  protoOf(Snack).toString = function () {
    return 'Snack(message=' + this.vq6_1 + ', action=' + this.wq6_1 + ', onAction=' + this.xq6_1 + ')';
  };
  protoOf(Snack).hashCode = function () {
    var result = getStringHashCode(this.vq6_1);
    result = imul(result, 31) + (this.wq6_1 == null ? 0 : getStringHashCode(this.wq6_1)) | 0;
    result = imul(result, 31) + (this.xq6_1 == null ? 0 : hashCode(this.xq6_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.vq6_1 === tmp0_other_with_cast.vq6_1))
      return false;
    if (!(this.wq6_1 == tmp0_other_with_cast.wq6_1))
      return false;
    if (!equals(this.xq6_1, tmp0_other_with_cast.xq6_1))
      return false;
    return true;
  };
  function SnackBarDispatcher() {
  }
  function TabItem(viewName, args, label) {
    this.zq6_1 = viewName;
    this.aq7_1 = args;
    this.bq7_1 = label;
  }
  protoOf(TabItem).toString = function () {
    return 'TabItem(viewName=' + this.zq6_1 + ', args=' + this.aq7_1 + ', label=' + this.bq7_1 + ')';
  };
  protoOf(TabItem).hashCode = function () {
    var result = getStringHashCode(this.zq6_1);
    result = imul(result, 31) + hashCode(this.aq7_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.bq7_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.zq6_1 === tmp0_other_with_cast.zq6_1))
      return false;
    if (!equals(this.aq7_1, tmp0_other_with_cast.aq7_1))
      return false;
    if (!(this.bq7_1 === tmp0_other_with_cast.bq7_1))
      return false;
    return true;
  };
  function UstadContextMenuItem(label, onClick) {
    this.cq7_1 = label;
    this.dq7_1 = onClick;
  }
  protoOf(UstadContextMenuItem).toString = function () {
    return 'UstadContextMenuItem(label=' + this.cq7_1 + ', onClick=' + this.dq7_1 + ')';
  };
  protoOf(UstadContextMenuItem).hashCode = function () {
    var result = getStringHashCode(this.cq7_1);
    result = imul(result, 31) + hashCode(this.dq7_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.cq7_1 === tmp0_other_with_cast.cq7_1))
      return false;
    if (!equals(this.dq7_1, tmp0_other_with_cast.dq7_1))
      return false;
    return true;
  };
  function BuildConfigMap(delegate) {
    this.eq7_1 = delegate;
  }
  protoOf(BuildConfigMap).ba = function (key) {
    return this.eq7_1.q(key);
  };
  function Companion_81() {
    this.fq7_1 = '1,2,4';
  }
  var Companion_instance_130;
  function Companion_getInstance_98() {
    return Companion_instance_130;
  }
  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.gq7_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().jq7_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.gq7_1.a1(element_0.mq7_1)) {
        destination_1.i1(element_0);
      }
    }
    tmp_0.hq7_1 = destination_1;
    var tmp_1 = this;
    var tmp_2 = strings_getInstance().hmi_1;
    tmp_1.iq7_1 = plus(this.hq7_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.nq7_1 = settings;
  }
  protoOf(SettingsLocaleSettingDelegate).oq7 = function (value) {
    if (!(value == null)) {
      this.nq7_1.xm7('locale', value);
    } else {
      this.nq7_1.a2o('locale');
    }
  };
  protoOf(SettingsLocaleSettingDelegate).pq7 = function () {
    return this.nq7_1.ym7('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.qq7().eq4_1;
    } else {
      tmp = setting;
    }
    return tmp;
  }
  function Companion_82() {
    this.rq7_1 = 'locale';
    this.sq7_1 = 'com.ustadmobile.presetlocale';
    this.tq7_1 = 'localePresetDone';
    this.uq7_1 = 'en,fa,ps,ar,tg,bn,ne,my,rw,ru';
    this.vq7_1 = '';
  }
  var Companion_instance_131;
  function Companion_getInstance_99() {
    return Companion_instance_131;
  }
  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.apm_1 = systemLocales;
    this.bpm_1 = localeSettingDelegate;
    this.cpm_1 = availableLanguagesConfig;
    this.dpm_1 = fallbackLocaleCode;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = sorted(split(this.cpm_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().tq3_1.q(item);
      var tmp$ret$0 = new UiLanguage(item, tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    tmp.epm_1 = destination;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_1 = this.epm_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.eq4_1;
      destination_0.s(tmp$ret$3, element);
    }
    tmp_0.fpm_1 = destination_0;
    this.gpm_1 = displayLocaleForLangSetting(this, this.pq7());
    if (!this.fpm_1.r(this.dpm_1))
      throw IllegalStateException_init_$Create$('available languages ' + this.cpm_1 + ' does not ' + ("include fallback: '" + this.dpm_1 + "'"));
  }
  protoOf(SupportedLanguagesConfig).oq7 = function (value) {
    this.bpm_1.oq7(value);
    this.gpm_1 = displayLocaleForLangSetting(this, value);
  };
  protoOf(SupportedLanguagesConfig).pq7 = function () {
    return this.bpm_1.pq7();
  };
  protoOf(SupportedLanguagesConfig).wq7 = function (systemImpl) {
    var tmp0_elvis_lhs = this.pq7();
    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.xq7(systemImpl).w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.getCurrentLanguage.<anonymous>' call
        if (element.eq4_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).yq7 = function (useDeviceLangDisplay) {
    Companion_getInstance_96();
    return plus(listOf_0(new UiLanguage('', useDeviceLangDisplay)), this.epm_1);
  };
  protoOf(SupportedLanguagesConfig).xq7 = function (systemImpl) {
    return this.yq7(systemImpl.joj(strings_getInstance().nn4_1));
  };
  protoOf(SupportedLanguagesConfig).zq7 = function (preferredLocales) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.epm_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.eq4_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.fpm_1.q(tmp$ret$8));
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? ensureNotNull(this.fpm_1.q(this.dpm_1)) : tmp1_elvis_lhs;
  };
  protoOf(SupportedLanguagesConfig).qq7 = function (preferredLocales, $super) {
    preferredLocales = preferredLocales === VOID ? this.apm_1 : preferredLocales;
    return $super === VOID ? this.zq7(preferredLocales) : $super.zq7.call(this, preferredLocales);
  };
  function Companion_83() {
  }
  protoOf(Companion_83).aq8 = function (buildConfig) {
    var tmp = ensureNotNull(buildConfig.ba('com.ustadmobile.system.systemBaseUrl'));
    var tmp0_safe_receiver = buildConfig.ba('com.ustadmobile.system.presetLsUrl');
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_1;
      // Inline function 'com.ustadmobile.core.impl.config.Companion.fromUstadBuildConfig.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(tmp0_safe_receiver)) {
        tmp_1 = tmp0_safe_receiver;
      } else {
        tmp_1 = null;
      }
      tmp_0 = tmp_1;
    }
    var tmp_2 = tmp_0;
    var tmp1_safe_receiver = buildConfig.ba('com.ustadmobile.system.newPersonalAccountsLsUrl');
    var tmp_3;
    if (tmp1_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_4;
      // Inline function 'com.ustadmobile.core.impl.config.Companion.fromUstadBuildConfig.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(tmp1_safe_receiver)) {
        tmp_4 = tmp1_safe_receiver;
      } else {
        tmp_4 = null;
      }
      tmp_3 = tmp_4;
    }
    return new SystemUrlConfig(tmp, tmp_2, tmp_3);
  };
  var Companion_instance_132;
  function Companion_getInstance_100() {
    return Companion_instance_132;
  }
  function SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? null : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? null : newPersonalAccountsLearningSpaceUrl;
    this.uo5_1 = systemBaseUrl;
    this.vo5_1 = presetLearningSpaceUrl;
    this.wo5_1 = newPersonalAccountsLearningSpaceUrl;
    this.xo5_1 = this.vo5_1 == null;
  }
  protoOf(SystemUrlConfig).bq8 = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) {
    return new SystemUrlConfig(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).cq8 = function (systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl, $super) {
    systemBaseUrl = systemBaseUrl === VOID ? this.uo5_1 : systemBaseUrl;
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? this.vo5_1 : presetLearningSpaceUrl;
    newPersonalAccountsLearningSpaceUrl = newPersonalAccountsLearningSpaceUrl === VOID ? this.wo5_1 : newPersonalAccountsLearningSpaceUrl;
    return $super === VOID ? this.bq8(systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl) : $super.bq8.call(this, systemBaseUrl, presetLearningSpaceUrl, newPersonalAccountsLearningSpaceUrl);
  };
  protoOf(SystemUrlConfig).toString = function () {
    return 'SystemUrlConfig(systemBaseUrl=' + this.uo5_1 + ', presetLearningSpaceUrl=' + this.vo5_1 + ', newPersonalAccountsLearningSpaceUrl=' + this.wo5_1 + ')';
  };
  protoOf(SystemUrlConfig).hashCode = function () {
    var result = getStringHashCode(this.uo5_1);
    result = imul(result, 31) + (this.vo5_1 == null ? 0 : getStringHashCode(this.vo5_1)) | 0;
    result = imul(result, 31) + (this.wo5_1 == null ? 0 : getStringHashCode(this.wo5_1)) | 0;
    return result;
  };
  protoOf(SystemUrlConfig).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemUrlConfig))
      return false;
    var tmp0_other_with_cast = other instanceof SystemUrlConfig ? other : THROW_CCE();
    if (!(this.uo5_1 === tmp0_other_with_cast.uo5_1))
      return false;
    if (!(this.vo5_1 == tmp0_other_with_cast.vo5_1))
      return false;
    if (!(this.wo5_1 == tmp0_other_with_cast.wo5_1))
      return false;
    return true;
  };
  function Companion_84() {
    this.dq8_1 = 'com.ustadmobile.gopts';
    this.eq8_1 = 'com.ustadmobile.showpoweredbymsg';
    this.fq8_1 = 'com.ustadmobile.system.systemBaseUrl';
    this.gq8_1 = 'com.ustadmobile.system.presetLsUrl';
    this.hq8_1 = 'com.ustadmobile.system.newPersonalAccountsLsUrl';
  }
  var Companion_instance_133;
  function Companion_getInstance_101() {
    return Companion_instance_133;
  }
  function UstadBuildConfig() {
  }
  function commonClientDomainDiModule(learningSpaceScope) {
    return Module_init_$Create$('CommonDomainClient', VOID, VOID, commonClientDomainDiModule$lambda(learningSpaceScope));
  }
  function commonClientDomainDiModule$lambda$lambda($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // 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 tmp_1 = tmp.d58(tmp$ret$0, null);
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    return new SendClazzInvitesUseCaseSendToServerImpl(tmp_1, tmp_2, tmp$ret$3);
  }
  function commonClientDomainDiModule$lambda$lambda_0($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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 tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new GetUsernameSuggestionUseCase(tmp$ret$1, $this$singleton.od());
  }
  function commonClientDomainDiModule$lambda($learningSpaceScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.o56(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(LearningSpace), 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 = commonClientDomainDiModule$lambda$lambda;
      var tmp_2 = this_0.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(SendClazzInvitesUseCaseSendToServerImpl), 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.c5b(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.o56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_6 = typeToken(createKType(getKClass(LearningSpace), 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 = commonClientDomainDiModule$lambda$lambda_0;
      var tmp_7 = this_1.c56();
      var tmp_8 = this_1.b56();
      var tmp_9 = this_1.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_10 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      var tmp$ret$11 = new Singleton(tmp_7, tmp_8, tmp_9, tmp$ret$10, null, true, creator_0);
      tmp_5.c5b(tmp$ret$11);
      return Unit_instance;
    };
  }
  function commonDomainDiModule(learningSpaceScope) {
    return Module_init_$Create$('CommonDomain', VOID, VOID, commonDomainDiModule$lambda(learningSpaceScope));
  }
  function commonDomainDiModule$lambda$lambda($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // 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.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new EnrolIntoCourseUseCase(tmp_1, tmp$ret$3.tk2_1);
  }
  function commonDomainDiModule$lambda$lambda_0($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_repo = tmp.d58(tmp$ret$0, null).tk2_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.f58();
    // 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.d58(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // 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.d58(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.f58();
    // 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.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, null).tk2_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.f58();
    // 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.d58(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
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    return new GetAssignmentSubmitterNameUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_3($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new GetLocaleForSiteTermsUseCase(tmp_1, tmp$ret$3.wk2());
  }
  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.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new RequestEnrolmentUseCase(tmp$ret$1.wk2());
  }
  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.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new CreateNewClazzUseCase(tmp$ret$1.wk2());
  }
  function commonDomainDiModule$lambda$lambda_8($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(FilterUsernameUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // 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.d58(tmp$ret$2, 1);
    return new UsernameSuggestionUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_9($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ValidateEmailUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new ParseInviteUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_10($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // 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$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new CopyCourseUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_11($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$provider.f58();
    // 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.d58(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.f58();
    // 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.d58(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$provider.f58();
    // 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.d58(tmp$ret$8, null);
    return new SubmitMarkUseCase(tmp_1, tmp_2, tmp_5, tmp_8, tmp_11, tmp$ret$9);
  }
  function commonDomainDiModule$lambda$lambda_12($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    return new CreateXapiGroupForCourseGroupUseCase(tmp_1, tmp_2, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_13($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instanceOrNull' call
    var tmp_2 = $this$singleton.f58();
    // 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.e58(tmp$ret$2, 2);
    return new FormatStatementResponseUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_14($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new GetDefaultDestinationUseCase(tmp$ret$1, $this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_15($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new CheckRegistrationAllowedUseCase(tmp$ret$1);
  }
  function commonDomainDiModule$lambda$lambda_16($this$singleton) {
    return new CreateCredentialUsernameUseCase($this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_17($this$singleton) {
    return new ParseCredentialUsernameUseCase();
  }
  function commonDomainDiModule$lambda($learningSpaceScope) {
    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.o56(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_6 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$12, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_1 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_11 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_2 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_16 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$24, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_3 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_21 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_4 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_26 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$36, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_5 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$42, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_6 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(LearningSpace), 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.c56();
      var tmp_38 = this_7.b56();
      var tmp_39 = this_7.d56();
      // 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.c5b(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.o56(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_7 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_43 = typeToken(createKType(getKClass(LearningSpace), 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.c56();
      var tmp_45 = this_8.b56();
      var tmp_46 = this_8.d56();
      // 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.c5b(tmp$ret$53);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_48 = typeToken(createKType(getKClass(UsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var tmp_49 = $this$$receiver.o56(tmp$ret$54, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_50 = typeToken(createKType(getKClass(LearningSpace), 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.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_52 = typeToken(createKType(getKClass(UsernameSuggestionUseCase), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_52, TypeToken) ? tmp_52 : THROW_CCE();
      var tmp$ret$59 = new Provider(tmp_51, tmp$ret$58, creator_8);
      tmp_49.c5b(tmp$ret$59);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_53 = typeToken(createKType(getKClass(ParseInviteUseCase), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_53, TypeToken) ? tmp_53 : THROW_CCE();
      var tmp_54 = $this$$receiver.o56(tmp$ret$60, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_9 = commonDomainDiModule$lambda$lambda_9;
      var tmp_55 = $this$$receiver.c56();
      var tmp_56 = $this$$receiver.b56();
      var tmp_57 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_58 = typeToken(createKType(getKClass(ParseInviteUseCase), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_58, TypeToken) ? tmp_58 : THROW_CCE();
      var tmp$ret$63 = new Singleton(tmp_55, tmp_56, tmp_57, tmp$ret$62, null, true, creator_9);
      tmp_54.c5b(tmp$ret$63);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_59 = typeToken(createKType(getKClass(CopyCourseUseCase), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_59, TypeToken) ? tmp_59 : THROW_CCE();
      var tmp_60 = $this$$receiver.o56(tmp$ret$64, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_61 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_61, TypeToken) ? tmp_61 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$66, scope_9);
      var creator_10 = commonDomainDiModule$lambda$lambda_10;
      var tmp_62 = this_10.c56();
      var tmp_63 = this_10.b56();
      var tmp_64 = this_10.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_65 = typeToken(createKType(getKClass(CopyCourseUseCase), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_65, TypeToken) ? tmp_65 : THROW_CCE();
      var tmp$ret$69 = new Singleton(tmp_62, tmp_63, tmp_64, tmp$ret$68, null, true, creator_10);
      tmp_60.c5b(tmp$ret$69);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_66 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_66, TypeToken) ? tmp_66 : THROW_CCE();
      var tmp_67 = $this$$receiver.o56(tmp$ret$70, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_68 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$72 = isInterface(tmp_68, TypeToken) ? tmp_68 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$72, scope_10);
      var creator_11 = commonDomainDiModule$lambda$lambda_11;
      var tmp_69 = this_11.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_70 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$74 = isInterface(tmp_70, TypeToken) ? tmp_70 : THROW_CCE();
      var tmp$ret$75 = new Provider(tmp_69, tmp$ret$74, creator_11);
      tmp_67.c5b(tmp$ret$75);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_71 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$76 = isInterface(tmp_71, TypeToken) ? tmp_71 : THROW_CCE();
      var tmp_72 = $this$$receiver.o56(tmp$ret$76, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_11 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_73 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$78 = isInterface(tmp_73, TypeToken) ? tmp_73 : THROW_CCE();
      var this_12 = new ImplWithScope(tmp$ret$78, scope_11);
      var creator_12 = commonDomainDiModule$lambda$lambda_12;
      var tmp_74 = this_12.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_75 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$80 = isInterface(tmp_75, TypeToken) ? tmp_75 : THROW_CCE();
      var tmp$ret$81 = new Provider(tmp_74, tmp$ret$80, creator_12);
      tmp_72.c5b(tmp$ret$81);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_76 = typeToken(createKType(getKClass(FormatStatementResponseUseCase), arrayOf([]), false));
      var tmp$ret$82 = isInterface(tmp_76, TypeToken) ? tmp_76 : THROW_CCE();
      var tmp_77 = $this$$receiver.o56(tmp$ret$82, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_12 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_78 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$84 = isInterface(tmp_78, TypeToken) ? tmp_78 : THROW_CCE();
      var this_13 = new ImplWithScope(tmp$ret$84, scope_12);
      var creator_13 = commonDomainDiModule$lambda$lambda_13;
      var tmp_79 = this_13.c56();
      var tmp_80 = this_13.b56();
      var tmp_81 = this_13.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_82 = typeToken(createKType(getKClass(FormatStatementResponseUseCase), arrayOf([]), false));
      var tmp$ret$86 = isInterface(tmp_82, TypeToken) ? tmp_82 : THROW_CCE();
      var tmp$ret$87 = new Singleton(tmp_79, tmp_80, tmp_81, tmp$ret$86, null, true, creator_13);
      tmp_77.c5b(tmp$ret$87);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_83 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
      var tmp$ret$88 = isInterface(tmp_83, TypeToken) ? tmp_83 : THROW_CCE();
      var tmp_84 = $this$$receiver.o56(tmp$ret$88, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_13 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_85 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$90 = isInterface(tmp_85, TypeToken) ? tmp_85 : THROW_CCE();
      var this_14 = new ImplWithScope(tmp$ret$90, scope_13);
      var creator_14 = commonDomainDiModule$lambda$lambda_14;
      var tmp_86 = this_14.c56();
      var tmp_87 = this_14.b56();
      var tmp_88 = this_14.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_89 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
      var tmp$ret$92 = isInterface(tmp_89, TypeToken) ? tmp_89 : THROW_CCE();
      var tmp$ret$93 = new Singleton(tmp_86, tmp_87, tmp_88, tmp$ret$92, null, true, creator_14);
      tmp_84.c5b(tmp$ret$93);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_90 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$94 = isInterface(tmp_90, TypeToken) ? tmp_90 : THROW_CCE();
      var tmp_91 = $this$$receiver.o56(tmp$ret$94, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_14 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_92 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$96 = isInterface(tmp_92, TypeToken) ? tmp_92 : THROW_CCE();
      var this_15 = new ImplWithScope(tmp$ret$96, scope_14);
      var creator_15 = commonDomainDiModule$lambda$lambda_15;
      var tmp_93 = this_15.c56();
      var tmp_94 = this_15.b56();
      var tmp_95 = this_15.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_96 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$98 = isInterface(tmp_96, TypeToken) ? tmp_96 : THROW_CCE();
      var tmp$ret$99 = new Singleton(tmp_93, tmp_94, tmp_95, tmp$ret$98, null, true, creator_15);
      tmp_91.c5b(tmp$ret$99);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_97 = typeToken(createKType(getKClass(CreateCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$100 = isInterface(tmp_97, TypeToken) ? tmp_97 : THROW_CCE();
      var tmp_98 = $this$$receiver.o56(tmp$ret$100, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_15 = $learningSpaceScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_99 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$102 = isInterface(tmp_99, TypeToken) ? tmp_99 : THROW_CCE();
      var this_16 = new ImplWithScope(tmp$ret$102, scope_15);
      var creator_16 = commonDomainDiModule$lambda$lambda_16;
      var tmp_100 = this_16.c56();
      var tmp_101 = this_16.b56();
      var tmp_102 = this_16.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_103 = typeToken(createKType(getKClass(CreateCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$104 = isInterface(tmp_103, TypeToken) ? tmp_103 : THROW_CCE();
      var tmp$ret$105 = new Singleton(tmp_100, tmp_101, tmp_102, tmp$ret$104, null, true, creator_16);
      tmp_98.c5b(tmp$ret$105);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_104 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$106 = isInterface(tmp_104, TypeToken) ? tmp_104 : THROW_CCE();
      var tmp_105 = $this$$receiver.o56(tmp$ret$106, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_17 = commonDomainDiModule$lambda$lambda_17;
      var tmp_106 = $this$$receiver.c56();
      var tmp_107 = $this$$receiver.b56();
      var tmp_108 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_109 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
      var tmp$ret$108 = isInterface(tmp_109, TypeToken) ? tmp_109 : THROW_CCE();
      var tmp$ret$109 = new Singleton(tmp_106, tmp_107, tmp_108, tmp$ret$108, null, true, creator_17);
      tmp_105.c5b(tmp$ret$109);
      return Unit_instance;
    };
  }
  function CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, $this) {
    CourseTerminologyStrings.call($this, toTerminologyEntries(courseTerminology, json, systemImpl), courseTerminology.p8g_1);
    return $this;
  }
  function CourseTerminologyStrings_init_$Create$(courseTerminology, systemImpl, json) {
    return CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, objectCreate(protoOf(CourseTerminologyStrings)));
  }
  function Companion_85() {
    Companion_instance_134 = this;
    this.iq8_1 = new CourseTerminologyStrings(emptyList());
  }
  var Companion_instance_134;
  function Companion_getInstance_102() {
    if (Companion_instance_134 == null)
      new Companion_85();
    return Companion_instance_134;
  }
  function CourseTerminologyStrings(terminologyEntries, terminologyKey) {
    Companion_getInstance_102();
    terminologyKey = terminologyKey === VOID ? null : terminologyKey;
    this.jq8_1 = terminologyEntries;
    this.kq8_1 = terminologyKey;
  }
  protoOf(CourseTerminologyStrings).lq8 = function (messageId) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.jq8_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.locale.CourseTerminologyStrings.get.<anonymous>' call
        if (element.nq8_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.oq8_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.jq8_1, this.jq8_1);
  };
  protoOf(CourseTerminologyStrings).hashCode = function () {
    return hashCode(this.jq8_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.lq8(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.mq8_1 = id;
    this.nq8_1 = stringResource;
    this.oq8_1 = term;
    this.pq8_1 = errorMessage;
  }
  protoOf(TerminologyEntry).qq8 = function (id, stringResource, term, errorMessage) {
    return new TerminologyEntry(id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).rq8 = function (id, stringResource, term, errorMessage, $super) {
    id = id === VOID ? this.mq8_1 : id;
    stringResource = stringResource === VOID ? this.nq8_1 : stringResource;
    term = term === VOID ? this.oq8_1 : term;
    errorMessage = errorMessage === VOID ? this.pq8_1 : errorMessage;
    return $super === VOID ? this.qq8(id, stringResource, term, errorMessage) : $super.qq8.call(this, id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).toString = function () {
    return 'TerminologyEntry(id=' + this.mq8_1 + ', stringResource=' + this.nq8_1 + ', term=' + this.oq8_1 + ', errorMessage=' + this.pq8_1 + ')';
  };
  protoOf(TerminologyEntry).hashCode = function () {
    var result = getStringHashCode(this.mq8_1);
    result = imul(result, 31) + this.nq8_1.hashCode() | 0;
    result = imul(result, 31) + (this.oq8_1 == null ? 0 : getStringHashCode(this.oq8_1)) | 0;
    result = imul(result, 31) + (this.pq8_1 == null ? 0 : getStringHashCode(this.pq8_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.mq8_1 === tmp0_other_with_cast.mq8_1))
      return false;
    if (!this.nq8_1.equals(tmp0_other_with_cast.nq8_1))
      return false;
    if (!(this.oq8_1 == tmp0_other_with_cast.oq8_1))
      return false;
    if (!(this.pq8_1 == tmp0_other_with_cast.pq8_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListConstants() {
    ClazzEnrolmentListConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1000, strings_getInstance().hn5_1);
    var tmp_1 = to(1001, strings_getInstance().umy_1);
    var tmp_2 = to(1003, strings_getInstance().unf_1);
    tmp.sq8_1 = mapOf([tmp_0, tmp_1, tmp_2, to(1002, strings_getInstance().rn8_1)]);
    var tmp_3 = this;
    var tmp_4 = to(202, strings_getInstance().jmy_1);
    var tmp_5 = to(201, strings_getInstance().tmx_1);
    var tmp_6 = to(203, strings_getInstance().umx_1);
    tmp_3.tq8_1 = mapOf([tmp_4, tmp_5, tmp_6, to(200, strings_getInstance().imy_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().amt_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().bmt_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().cmt_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().dmt_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 203);
    var tmp_8 = strings_getInstance().gmt_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 205);
    var tmp_10 = strings_getInstance().emt_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 206);
    var tmp_12 = strings_getInstance().fmt_1;
    tmp.uq8_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().kmm_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().gmm_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 102);
    var tmp_4 = strings_getInstance().fmm_1;
    tmp.vq8_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().znh_1;
    Companion_getInstance_4();
    var tmp_1 = new MessageIdOption2(tmp_0, 102);
    var tmp_2 = strings_getInstance().znj_1;
    Companion_getInstance_4();
    tmp.wq8_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().ums_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().vms_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 101);
    var tmp_4 = strings_getInstance().wms_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 102);
    var tmp_6 = strings_getInstance().xms_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 103);
    var tmp_8 = strings_getInstance().yms_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 104);
    var tmp_10 = strings_getInstance().zms_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 105);
    var tmp_12 = strings_getInstance().gmy_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 106);
    var tmp_14 = strings_getInstance().hmy_1;
    tmp.xq8_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().lmu_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().mmu_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().nmu_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 3);
    var tmp_6 = strings_getInstance().omu_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 4);
    var tmp_8 = strings_getInstance().rmu_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 5);
    var tmp_10 = strings_getInstance().pmu_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 6);
    var tmp_12 = strings_getInstance().qmu_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 7);
    var tmp_14 = strings_getInstance().tmk_1;
    var tmp_15 = new MessageIdOption2(tmp_14, 8);
    var tmp_16 = strings_getInstance().smu_1;
    var tmp_17 = new MessageIdOption2(tmp_16, 9);
    var tmp_18 = strings_getInstance().umk_1;
    tmp.yq8_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().imy_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().tmx_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().fmm_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().umx_1;
    tmp.zq8_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().smk_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().rmk_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().tmk_1;
    tmp.jq7_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 4)]);
    var tmp_5 = this;
    var tmp_6 = strings_getInstance().umk_1;
    tmp_5.kq7_1 = plus(listOf_0(new MessageIdOption2(tmp_6, 0)), this.jq7_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().nmv_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().mmv_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().pnb_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 4);
    var tmp_6 = strings_getInstance().tmk_1;
    tmp.aq9_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().hn5_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1000);
    var tmp_2 = strings_getInstance().umy_1;
    tmp.bq9_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.cq9_1 = listOf([new MessageIdOption2(strings_getInstance().wmw_1, Companion_instance_29.hkw_1), new MessageIdOption2(strings_getInstance().xmw_1, Companion_instance_29.bkw_1), new MessageIdOption2(strings_getInstance().ymw_1, Companion_instance_29.ckw_1), new MessageIdOption2(strings_getInstance().zmw_1, Companion_instance_29.dkw_1), new MessageIdOption2(strings_getInstance().amx_1, Companion_instance_29.ekw_1), new MessageIdOption2(strings_getInstance().bmx_1, Companion_instance_29.fkw_1), new MessageIdOption2(strings_getInstance().cmx_1, Companion_instance_29.gkw_1)]);
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.cq9_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.mq7_1, item.lq7_1);
      destination.i1(tmp$ret$0);
    }
    tmp.dq9_1 = toMap(destination);
    this.eq9_1 = mapOf([to(Companion_instance_29.wkv_1, strings_getInstance().tmw_1), to(Companion_instance_29.xkv_1, strings_getInstance().rmw_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().bnk_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().cnk_1;
    tmp.fq9_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.gq9_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.hq9_1 = asSharedFlow(this.gq9_1);
  }
  protoOf(CommandFlowUstadNavController).iq9 = function (viewName, args, goOptions) {
    this.gq9_1.i1h(new NavigateNavCommand(viewName, args, goOptions));
  };
  protoOf(CommandFlowUstadNavController).jq9 = function (viewName, inclusive) {
    this.gq9_1.i1h(new PopNavCommand(viewName, inclusive));
  };
  function NavCommand(timestamp) {
    this.kq9_1 = timestamp;
  }
  function NavigateNavCommand(viewName, args, goOptions) {
    NavCommand.call(this, systemTimeInMillis());
    this.mq9_1 = viewName;
    this.nq9_1 = args;
    this.oq9_1 = goOptions;
  }
  protoOf(NavigateNavCommand).toString = function () {
    return 'NavigateNavCommand(viewName=' + this.mq9_1 + ', args=' + this.nq9_1 + ', goOptions=' + this.oq9_1 + ')';
  };
  protoOf(NavigateNavCommand).hashCode = function () {
    var result = getStringHashCode(this.mq9_1);
    result = imul(result, 31) + hashCode(this.nq9_1) | 0;
    result = imul(result, 31) + this.oq9_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.mq9_1 === tmp0_other_with_cast.mq9_1))
      return false;
    if (!equals(this.nq9_1, tmp0_other_with_cast.nq9_1))
      return false;
    if (!this.oq9_1.equals(tmp0_other_with_cast.oq9_1))
      return false;
    return true;
  };
  function PopNavCommand(viewName, inclusive) {
    NavCommand.call(this, systemTimeInMillis());
    this.qq9_1 = viewName;
    this.rq9_1 = inclusive;
  }
  protoOf(PopNavCommand).toString = function () {
    return 'PopNavCommand(viewName=' + this.qq9_1 + ', inclusive=' + this.rq9_1 + ')';
  };
  protoOf(PopNavCommand).hashCode = function () {
    var result = getStringHashCode(this.qq9_1);
    result = imul(result, 31) + getBooleanHashCode(this.rq9_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.qq9_1 === tmp0_other_with_cast.qq9_1))
      return false;
    if (!(this.rq9_1 === tmp0_other_with_cast.rq9_1))
      return false;
    return true;
  };
  function NavResult(key, timestamp, result) {
    this.sq9_1 = key;
    this.tq9_1 = timestamp;
    this.uq9_1 = result;
  }
  protoOf(NavResult).toString = function () {
    return 'NavResult(key=' + this.sq9_1 + ', timestamp=' + this.tq9_1.toString() + ', result=' + toString_0(this.uq9_1) + ')';
  };
  protoOf(NavResult).hashCode = function () {
    var result = getStringHashCode(this.sq9_1);
    result = imul(result, 31) + this.tq9_1.hashCode() | 0;
    result = imul(result, 31) + (this.uq9_1 == null ? 0 : hashCode(this.uq9_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.sq9_1 === tmp0_other_with_cast.sq9_1))
      return false;
    if (!this.tq9_1.equals(tmp0_other_with_cast.tq9_1))
      return false;
    if (!equals(this.uq9_1, tmp0_other_with_cast.uq9_1))
      return false;
    return true;
  };
  function NavResultDest(viewName, key) {
    this.vq9_1 = viewName;
    this.wq9_1 = key;
  }
  function NavResultReturner() {
  }
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation) {
    this.hqa_1 = $$this$unsafeFlow;
    this.iqa_1 = $key;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).nqa = function (value, $completion) {
    var tmp = this.oqa(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.nqa(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.lqa_1 = this.hqa_1;
            var tmp_1 = this;
            tmp_1.mqa_1 = this.jqa_1;
            if (this.mqa_1.sq9_1 === this.iqa_1) {
              this.hd_1 = 3;
              suspendResult = this.lqa_1.t1d(this.mqa_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.kqa_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).oqa = function (value, completion) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda(this.hqa_1, this.iqa_1, completion);
    i.jqa_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.nqa(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$49(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xqa_1 = _this__u8e3s4;
    this.yqa_1 = collector;
  }
  protoOf($collectCOROUTINE$49).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.zqa_1 = this.yqa_1;
            this.hd_1 = 1;
            var tmp_1 = NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0(this.zqa_1, this.xqa_1.bqb_1, null);
            suspendResult = this.xqa_1.aqb_1.a1c(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.cqb_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_1).t1d = function (value, $completion) {
    return this.cqb_1(value, $completion);
  };
  function _no_name_provided__qut3iv_0($this, $key) {
    this.aqb_1 = $this;
    this.bqb_1 = $key;
  }
  protoOf(_no_name_provided__qut3iv_0).dqb = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$49(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_0).a1c = function (collector, $completion) {
    return this.dqb(collector, $completion);
  };
  function NavResultReturnerImpl() {
    this.eqb_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
  }
  protoOf(NavResultReturnerImpl).xq9 = function (key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = this.eqb_1;
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_0(this_0, key);
  };
  protoOf(NavResultReturnerImpl).yq9 = function (result) {
    this.eqb_1.i1h(result);
  };
  function UstadNavController() {
  }
  function BitmaskFlag(flagVal, stringResource, enabled) {
    enabled = enabled === VOID ? false : enabled;
    this.fqb_1 = flagVal;
    this.gqb_1 = stringResource;
    this.hqb_1 = enabled;
  }
  protoOf(BitmaskFlag).iqb = function (flagVal, stringResource, enabled) {
    return new BitmaskFlag(flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).jqb = function (flagVal, stringResource, enabled, $super) {
    flagVal = flagVal === VOID ? this.fqb_1 : flagVal;
    stringResource = stringResource === VOID ? this.gqb_1 : stringResource;
    enabled = enabled === VOID ? this.hqb_1 : enabled;
    return $super === VOID ? this.iqb(flagVal, stringResource, enabled) : $super.iqb.call(this, flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).toString = function () {
    return 'BitmaskFlag(flagVal=' + this.fqb_1.toString() + ', stringResource=' + this.gqb_1 + ', enabled=' + this.hqb_1 + ')';
  };
  protoOf(BitmaskFlag).hashCode = function () {
    var result = this.fqb_1.hashCode();
    result = imul(result, 31) + this.gqb_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hqb_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.fqb_1.equals(tmp0_other_with_cast.fqb_1))
      return false;
    if (!this.gqb_1.equals(tmp0_other_with_cast.gqb_1))
      return false;
    if (!(this.hqb_1 === tmp0_other_with_cast.hqb_1))
      return false;
    return true;
  };
  function ListPagingSource(list) {
    PagingSource.call(this);
    this.lqb_1 = list;
  }
  protoOf(ListPagingSource).c5s = function (params, $completion) {
    var tmp0_elvis_lhs = params.s2();
    var startFrom = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
    var loadSize = params.h54_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.lqb_1.u();
    var b = startFrom + loadSize | 0;
    var tmp$ret$0 = Math.min(a, b);
    var subList = this.lqb_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.lqb_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).p54 = function (params, $completion) {
    return this.c5s(params, $completion);
  };
  function RefreshCommand(time) {
    time = time === VOID ? systemTimeInMillis() : time;
    this.mqb_1 = time;
  }
  function generateUid(_this__u8e3s4) {
    return toLong(_this__u8e3s4.ha4_1.hashCode()).rc(32).vc(toLong(_this__u8e3s4.ia4_1.hashCode()));
  }
  function get_totalAttendeeStatusRecorded(_this__u8e3s4) {
    return (_this__u8e3s4.na4_1 + _this__u8e3s4.pa4_1 | 0) + _this__u8e3s4.oa4_1 | 0;
  }
  function Activity(id, aType, lang) {
    lang = lang === VOID ? 'en' : lang;
    this.ep9_1 = aType;
    this.fp9_1 = lang;
    this.hp9_1 = null;
    this.ip9_1 = null;
    this.jp9_1 = null;
    this.kp9_1 = null;
    this.lp9_1 = new JsonObject(mapOf_0(to('id', JsonPrimitive_0(id))));
    this.gp9_1 = id;
  }
  protoOf(Activity).nqb = function (key, value) {
    // Inline function 'kotlin.collections.isNullOrEmpty' call
    var this_0 = this.kp9_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.kp9_1 = LinkedHashMap_init_$Create$();
    }
    // Inline function 'kotlin.collections.set' call
    ensureNotNull(this.kp9_1).s(key, value);
  };
  function Companion_86() {
    this.zp8_1 = 1;
  }
  protoOf(Companion_86).oqb = function (xpp, parseFlags) {
    var tcxml = new TinCanXML();
    var activity = null;
    var evtType = xpp.l7d();
    var storeActivities = (parseFlags & this.zp8_1) === this.zp8_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.k7d() == null);
        } else {
          tmp = false;
        }
        if (tmp) {
          tagName = ensureNotNull(xpp.k7d());
          if (!inExtensions) {
            if (tagName === 'activity') {
              activity = new Activity(ensureNotNull(xpp.m7d(null, 'id')), ensureNotNull(xpp.m7d(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).jp9_1 = xpp.j7d();
              } 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).ip9_1 = xpp.j7d();
                } 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).hp9_1 = xpp.j7d();
                  } else {
                    if (xpp.k7d() === 'extensions') {
                      inExtensions = true;
                    }
                  }
                }
              }
            }
          } else {
            if (tagName === 'extension') {
              extKey = ensureNotNull(xpp.m7d(null, 'key'));
              var tmp_7;
              var tmp_8 = xpp.e();
              if (tmp_8 === 4) {
                var tmp0_elvis_lhs = xpp.j7d();
                tmp_7 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              } else {
                tmp_7 = '';
              }
              extVal = tmp_7;
              ensureNotNull(activity).nqb(extKey, extVal);
            }
          }
        } else {
          var tmp_9 = evtType;
          if (tmp_9 === 3) {
            if (!(xpp.k7d() == null)) {
              if (xpp.k7d() === 'activity') {
                if (!(ensureNotNull(activity).jp9_1 == null)) {
                  tcxml.bp9_1 = activity;
                  if (!storeActivities) {
                    break $l$1;
                  }
                }
              } else if (xpp.k7d() === 'extensions') {
                inExtensions = false;
              }
            }
          }
        }
        evtType = xpp.e();
      }
       while (false);
      var tmp_10 = evtType;
    }
     while (!(tmp_10 === 1));
    return tcxml;
  };
  protoOf(Companion_86).ap9 = function (xpp, parseFlags, $super) {
    parseFlags = parseFlags === VOID ? 0 : parseFlags;
    return $super === VOID ? this.oqb(xpp, parseFlags) : $super.oqb.call(this, xpp, parseFlags);
  };
  var Companion_instance_135;
  function Companion_getInstance_103() {
    return Companion_instance_135;
  }
  function TinCanXML() {
    this.bp9_1 = null;
    this.cp9_1 = false;
    this.dp9_1 = null;
  }
  function Companion_87() {
    this.pqb_1 = 1000;
  }
  var Companion_instance_136;
  function Companion_getInstance_104() {
    return Companion_instance_136;
  }
  function UsernameSuggestionUseCase(filterUsernameUseCase, db) {
    this.qqb_1 = filterUsernameUseCase;
    this.rqb_1 = db;
  }
  function UsernameErrorException() {
  }
  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.vof_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.entryByUri.<anonymous>' call
        if (element.zof_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.hog_1;
  }
  function requireBodyUrlForUri(_this__u8e3s4, uri) {
    return requireEntryByUri(_this__u8e3s4, uri).hog_1;
  }
  function DiTag() {
    this.sqb_1 = 13;
    this.tqb_1 = 81;
    this.uqb_1 = 1;
    this.vqb_1 = 0;
    this.wqb_1 = 32;
    this.xqb_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.gqc_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.gqc_1.iqc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gqc_1.mqc_1 = null;
            this.hd_1 = 2;
            suspendResult = this.gqc_1.kqc_1(tryReceiveAll(this.gqc_1.lqc_1, this.gqc_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.gqc_1, completion);
    i.hqc_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.iqc_1 = maxWaitTime;
    this.jqc_1 = coroutineScope;
    this.kqc_1 = onCollate;
    this.lqc_1 = Channel(capacity, onBufferOverflow);
    this.mqc_1 = null;
  }
  protoOf(EventCollator2).s6x = function (event) {
    this.lqc_1.w19(event);
    if (this.mqc_1 == null) {
      var tmp = this;
      tmp.mqc_1 = launch(this.jqc_1, VOID, VOID, EventCollator2$receiveEvent$slambda_0(this, null));
    }
  };
  function ExceptionWithStringResource() {
  }
  function Companion_88() {
    Companion_instance_137 = this;
    this.nqc_1 = -1;
    this.oqc_1 = new MessageIdOption2(strings_getInstance().umk_1, this.nqc_1);
  }
  var Companion_instance_137;
  function Companion_getInstance_105() {
    if (Companion_instance_137 == null)
      new Companion_88();
    return Companion_instance_137;
  }
  function MessageIdOption2(stringResource, value) {
    Companion_getInstance_105();
    this.lq7_1 = stringResource;
    this.mq7_1 = value;
  }
  protoOf(MessageIdOption2).toString = function () {
    return 'MessageIdOption2(stringResource=' + this.lq7_1 + ', value=' + this.mq7_1 + ')';
  };
  protoOf(MessageIdOption2).hashCode = function () {
    var result = this.lq7_1.hashCode();
    result = imul(result, 31) + this.mq7_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.lq7_1.equals(tmp0_other_with_cast.lq7_1))
      return false;
    if (!(this.mq7_1 === tmp0_other_with_cast.mq7_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.pqc_1 = fieldMessageId;
    this.qqc_1 = flag;
    this.rqc_1 = order;
  }
  protoOf(SortOrderOption).toString = function () {
    return 'SortOrderOption(fieldMessageId=' + this.pqc_1 + ', flag=' + this.qqc_1 + ', order=' + this.rqc_1 + ')';
  };
  protoOf(SortOrderOption).hashCode = function () {
    var result = this.pqc_1.hashCode();
    result = imul(result, 31) + this.qqc_1 | 0;
    result = imul(result, 31) + (this.rqc_1 == null ? 0 : getBooleanHashCode(this.rqc_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.pqc_1.equals(tmp0_other_with_cast.pqc_1))
      return false;
    if (!(this.qqc_1 === tmp0_other_with_cast.qqc_1))
      return false;
    if (!(this.rqc_1 == tmp0_other_with_cast.rqc_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.op9_1 = _Char___init__impl__6a9atx(47);
    this.pp9_1 = 'file:///';
    this.qp9_1 = new Long(1073741824, 0);
    this.rp9_1 = new Long(1048576, 0);
    this.sp9_1 = new Long(1024, 0);
  }
  protoOf(UMFileUtil).lpi = 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).tp9 = 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).sqc = 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.sqc(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_259.tqc(item.s2()), Companion_instance_259.tqc(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_259.uqc(key)).z5(_Char___init__impl__6a9atx(61));
      var tmp = Companion_instance_259;
      var tmp_0 = ht.q(key);
      sb.y5(tmp.uqc((!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE()));
    }
    return sb.toString();
  };
  protoOf(UMFileUtil).vqc = 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).wqc = 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_89() {
    this.xqc_1 = '/#/';
  }
  protoOf(Companion_89).yqc = 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_89).zqc = function (url, divider, $super) {
    divider = divider === VOID ? '/#/' : divider;
    return $super === VOID ? this.yqc(url, divider) : $super.yqc.call(this, url, divider);
  };
  var Companion_instance_138;
  function Companion_getInstance_106() {
    return Companion_instance_138;
  }
  function UstadUrlComponents$arguments$delegate$lambda(this$0) {
    return function () {
      var parsedParams = UMFileUtil_getInstance().sqc(this$0.kom_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_259.tqc(item.s2()), Companion_instance_259.tqc(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.kom_1;
      if (charSequenceLength(this_0) === 0) {
        tmp = this$0.jom_1;
      } else {
        tmp = this$0.jom_1 + '?' + this$0.kom_1;
      }
      return tmp;
    };
  }
  function UstadUrlComponents(learningSpace, viewName, queryString) {
    this.iom_1 = learningSpace;
    this.jom_1 = viewName;
    this.kom_1 = queryString;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.lom_1 = lazy(tmp_0, UstadUrlComponents$arguments$delegate$lambda(this));
    var tmp_1 = this;
    tmp_1.mom_1 = lazy_0(UstadUrlComponents$viewUri$delegate$lambda(this));
  }
  protoOf(UstadUrlComponents).aqd = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.mom_1;
    viewUri$factory();
    return this_0.t2();
  };
  protoOf(UstadUrlComponents).bqd = function (divider) {
    return UMFileUtil_getInstance().lpi([this.iom_1, divider, this.aqd()]);
  };
  protoOf(UstadUrlComponents).nom = function (divider, $super) {
    var tmp;
    if (divider === VOID) {
      Companion_getInstance_96();
      tmp = '/umapp/#/';
    } else {
      tmp = divider;
    }
    divider = tmp;
    return $super === VOID ? this.bqd(divider) : $super.bqd.call(this, divider);
  };
  protoOf(UstadUrlComponents).toString = function () {
    return 'UstadUrlComponents(learningSpace=' + this.iom_1 + ', viewName=' + this.jom_1 + ', queryString=' + this.kom_1 + ')';
  };
  protoOf(UstadUrlComponents).hashCode = function () {
    var result = getStringHashCode(this.iom_1);
    result = imul(result, 31) + getStringHashCode(this.jom_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.kom_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.iom_1 === tmp0_other_with_cast.iom_1))
      return false;
    if (!(this.jom_1 === tmp0_other_with_cast.jom_1))
      return false;
    if (!(this.kom_1 === tmp0_other_with_cast.kom_1))
      return false;
    return true;
  };
  function viewUri$factory() {
    return getPropertyCallableRef('viewUri', 1, KProperty1, function (receiver) {
      return receiver.aqd();
    }, 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.s45(ListSerializer(Companion_instance_80.n4r()), tmp1_safe_receiver);
    }
    return tmp_0;
  }
  function paramMap(_this__u8e3s4, json) {
    var tmp0_safe_receiver = _this__u8e3s4.ebd_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.s45(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.nbw_1 * 100 / (_this__u8e3s4.lbw_1 + _this__u8e3s4.nbw_1);
    return roundToInt(this_0);
  }
  function textLength(_this__u8e3s4, limitType) {
    var tmp;
    if (limitType === 1) {
      var tmp0_safe_receiver = _this__u8e3s4.oc2_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.oc2_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.d7y_1) ? _this__u8e3s4.d7y_1.c7(_this__u8e3s4.b7y_1) > 0 : false)
      return _this__u8e3s4.d7y_1;
    else
      return _this__u8e3s4.b7y_1;
  }
  function maxScoreSummedIfModule(_this__u8e3s4, allBlocks) {
    var tmp = _this__u8e3s4.u7x_1;
    if (!(tmp === 100))
      return _this__u8e3s4.e7y_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.w7x_1.equals(_this__u8e3s4.t7x_1)) {
        numModBlocks = numModBlocks + 1 | 0;
        var tmp_0 = totalModPoints;
        var tmp1_elvis_lhs = element.e7y_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.o8g_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().qoh_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.joj(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.oq8_1;
      var tmp$ret$0 = to(item.mq8_1, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    return encodeStringMapToString(json, toMap(destination));
  }
  function onActiveLearningSpace(_this__u8e3s4) {
    // Inline function 'org.kodein.di.on' call
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(_this__u8e3s4).f58();
    // 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.d58(tmp$ret$0, null).ioa();
    var trigger = _this__u8e3s4.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp$ret$3 = tmp_1.h57(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().xmw_1;
      case 1:
        return strings_getInstance().ymw_1;
      case 2:
        return strings_getInstance().zmw_1;
      case 3:
        return strings_getInstance().amx_1;
      case 4:
        return strings_getInstance().bmx_1;
      case 5:
        return strings_getInstance().cmx_1;
      case 6:
        return strings_getInstance().wmw_1;
      default:
        return strings_getInstance().hmi_1;
    }
  }
  function stringResourceOrMessage(_this__u8e3s4, systemImpl) {
    var tmp0_safe_receiver = isInterface(_this__u8e3s4, ExceptionWithStringResource) ? _this__u8e3s4 : null;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bpf();
    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.stringResourceOrMessage.<anonymous>' call
      tmp = systemImpl.joj(tmp1_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var tmp_0;
    if (tmp3_elvis_lhs == null) {
      var tmp_1 = systemImpl.joj(strings_getInstance().qmi_1);
      var tmp2_elvis_lhs = _this__u8e3s4.message;
      tmp_0 = tmp_1 + ': ' + (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
    } else {
      tmp_0 = tmp3_elvis_lhs;
    }
    return tmp_0;
  }
  function verifySite(_this__u8e3s4, endpointUrl, timeout, json, $completion) {
    timeout = timeout === VOID ? new Long(30000, 0) : timeout;
    var tmp = new $verifySiteCOROUTINE$50(_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.y3s($timeout);
      return Unit_instance;
    };
  }
  function $verifySiteCOROUTINE$50(_this__u8e3s4, endpointUrl, timeout, json, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kqd_1 = _this__u8e3s4;
    this.lqd_1 = endpointUrl;
    this.mqd_1 = timeout;
    this.nqd_1 = json;
  }
  protoOf($verifySiteCOROUTINE$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.oqd_1 = UMFileUtil_getInstance().lpi([this.lqd_1, 'Site', 'verify']);
            var tmp_0 = this;
            tmp_0.pqd_1 = this.kqd_1;
            var tmp_1 = this;
            tmp_1.qqd_1 = this.oqd_1;
            var tmp_2 = this;
            tmp_2.rqd_1 = this.pqd_1;
            var tmp_3 = this;
            tmp_3.sqd_1 = this.rqd_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.qqd_1);
            header(this_0, 'cache-control', 'no-cache');
            timeout(this_0, verifySite$lambda(this.mqd_1));
            tmp_4.tqd_1 = this_0;
            this.tqd_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.uqd_1 = this.sqd_1;
            var tmp_6 = this;
            tmp_6.vqd_1 = this.tqd_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.vqd_1, this.uqd_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            var responseStr = suspendResult;
            return this.nqd_1.s45(Companion_instance_31.n4r(), 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.xqd_1;
    } else {
      // Inline function 'kotlin.collections.map' call
      var this_0 = _this__u8e3s4.o2n();
      // 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.n2n(item));
        destination.i1(tmp$ret$0);
      }
      tmp = toMap(destination);
    }
    return tmp;
  }
  function toLocalMidnight(_this__u8e3s4, timeZoneId) {
    return toLocalMidnight_0(_this__u8e3s4, Companion_getInstance_9().vmg(timeZoneId));
  }
  function toLocalEndOfDay(_this__u8e3s4, timeZoneId) {
    return toLocalEndOfDay_0(_this__u8e3s4, Companion_getInstance_9().vmg(timeZoneId));
  }
  function isDateOfBirthAnAdult(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) >= UstadMobileConstants_getInstance().wq3_1;
  }
  function isDateOfBirthAMinor(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) < UstadMobileConstants_getInstance().vq3_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.ymd(), Companion_getInstance_9().umg_1).gme();
  }
  function hasFlag(_this__u8e3s4, flag) {
    return (_this__u8e3s4 & flag) === flag;
  }
  function decodeStringMapFromString(_this__u8e3s4, string) {
    return _this__u8e3s4.s45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), string);
  }
  function encodeStringMapToString(_this__u8e3s4, stringMap) {
    return _this__u8e3s4.r45(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.o4p(ListSerializer(serializer), element);
    } else {
      if (element instanceof JsonObject) {
        tmp = listOf_0(_this__u8e3s4.o4p(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 toggle(_this__u8e3s4, item) {
    var indexOfItem = _this__u8e3s4.x(item);
    var tmp;
    if (indexOfItem < 0) {
      tmp = plus_1(_this__u8e3s4, item);
    } else {
      // Inline function 'kotlin.also' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
      this_0.s1(indexOfItem);
      tmp = toList(this_0);
    }
    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.smh(), LocalTime_init_$Create$(0, 0, 0));
  }
  function toLocalEndOfDay_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.smh(), LocalTime_init_$Create$(23, 59, 59));
  }
  function chopOffSeconds(_this__u8e3s4) {
    if (_this__u8e3s4.qmh() > 0 ? true : _this__u8e3s4.rmh() > 0) {
      return LocalDateTime_init_$Create$(_this__u8e3s4.smh(), LocalTime_init_$Create$(_this__u8e3s4.omh(), _this__u8e3s4.pmh()));
    } else {
      return _this__u8e3s4;
    }
  }
  function chopOffSeconds_0(_this__u8e3s4) {
    if (_this__u8e3s4.qmh() > 0 ? true : _this__u8e3s4.rmh() > 0)
      return LocalTime_init_$Create$(_this__u8e3s4.omh(), _this__u8e3s4.pmh());
    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_259.uqc(item.s2()) + '=' + Companion_instance_259.uqc(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.yqd_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_2).t1d = function (value, $completion) {
    return this.yqd_1(value, $completion);
  };
  function whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.hqe_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.jqe_1 = this.hqe_1;
            var tmp_1 = this;
            tmp_1.kqe_1 = this.iqe_1;
            this.hd_1 = 1;
            var it = this.kqe_1;
            suspendResult = this.jqe_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.hqe_1, completion);
    i.iqe_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$51(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tqe_1 = _this__u8e3s4;
    this.uqe_1 = collector;
  }
  protoOf($collectCOROUTINE$51).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.vqe_1 = this.uqe_1;
            this.hd_1 = 1;
            var tmp_1 = whenSubscribed$o$collect$slambda_0(this.vqe_1, null);
            suspendResult = this.tqe_1.wqe_1.a1c(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.wqe_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_1).xqe = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$51(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_1).a1c = function (collector, $completion) {
    return this.xqe(collector, $completion);
  };
  function whenSubscribed$slambda($block, resultContinuation) {
    this.gqf_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$slambda).iqf = function (active, $completion) {
    var tmp = this.jqf(active, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$slambda).he = function (p1, $completion) {
    return this.iqf((!(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.hqf_1) {
              this.hd_1 = 1;
              suspendResult = this.gqf_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).jqf = function (active, completion) {
    var i = new whenSubscribed$slambda(this.gqf_1, completion);
    i.hqf_1 = active;
    return i;
  };
  function whenSubscribed$slambda_0($block, resultContinuation) {
    var i = new whenSubscribed$slambda($block, resultContinuation);
    var l = function (active, $completion) {
      return i.iqf(active, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function navigateToLink(_this__u8e3s4, link, accountManager, openExternalLinkUseCase, goOptions, forceAccountSelection, userCanSelectServer, accountName, scope, linkTarget, dontSetCurrentSession, presetLearningSpaceUrl, checkRegistrationAllowedUseCase) {
    goOptions = goOptions === VOID ? Companion_getInstance_95().zq3_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;
    presetLearningSpaceUrl = presetLearningSpaceUrl === VOID ? null : presetLearningSpaceUrl;
    checkRegistrationAllowedUseCase = checkRegistrationAllowedUseCase === VOID ? null : checkRegistrationAllowedUseCase;
    var learningSpaceUrl = {_v: null};
    var viewUri = {_v: null};
    var tmp;
    if (startsWithHttpProtocol(link)) {
      tmp = contains(link, '/#/');
    } else {
      tmp = false;
    }
    if (tmp) {
      var urlComponents = Companion_instance_138.zqc(link);
      learningSpaceUrl._v = urlComponents.iom_1;
      viewUri._v = urlComponents.aqd();
    } else {
      if (!startsWithHttpProtocol(link)) {
        viewUri._v = link;
      }
    }
    if (presetLearningSpaceUrl == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.navigateToLink.<anonymous>' call
      learningSpaceUrl._v = presetLearningSpaceUrl;
    }
    var tmp_0;
    var tmp1_safe_receiver = viewUri._v;
    var tmp_1;
    if (tmp1_safe_receiver == null) {
      tmp_1 = null;
    } else {
      tmp_1 = startsWith(tmp1_safe_receiver, 'ParentalConsentManagement');
    }
    if (tmp_1 === true) {
      tmp_0 = minus(System_instance.ymd(), UstadMobileConstants_getInstance().wq3_1, Companion_getInstance_10().jmf_1, Companion_getInstance_9().umg_1).emh();
    } else {
      tmp_0 = new Long(0, 0);
    }
    var maxDateOfBirth = tmp_0;
    var tmp_2;
    if (viewUri._v == null ? true : (!userCanSelectServer ? !(learningSpaceUrl._v == null) : false) ? !(learningSpaceUrl._v === accountManager.ioa().tnt_1) : false) {
      openExternalLinkUseCase.spi(link, linkTarget);
      tmp_2 = null;
    } else {
      tmp_2 = launch(scope, VOID, VOID, navigateToLink$slambda_0(accountName, learningSpaceUrl, accountManager, dontSetCurrentSession, _this__u8e3s4, viewUri, goOptions, forceAccountSelection, maxDateOfBirth, checkRegistrationAllowedUseCase, 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.iq9(viewName, args, goOptions);
  }
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(function_0) {
    this.kqf_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1).ro0 = function (endpointUrl) {
    return this.kqf_1(endpointUrl);
  };
  function navigateToLink$slambda$lambda($learningSpaceUrl) {
    return function (filterUrl) {
      return filterUrl === $learningSpaceUrl._v;
    };
  }
  function navigateToLink$slambda$lambda_0($learningSpaceUrl) {
    return function (it) {
      return it === $learningSpaceUrl._v;
    };
  }
  function navigateToLink$slambda($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation) {
    this.tqf_1 = $accountName;
    this.uqf_1 = $learningSpaceUrl;
    this.vqf_1 = $accountManager;
    this.wqf_1 = $dontSetCurrentSession;
    this.xqf_1 = $this_navigateToLink;
    this.yqf_1 = $viewUri;
    this.zqf_1 = $goOptions;
    this.aqg_1 = $forceAccountSelection;
    this.bqg_1 = $maxDateOfBirth;
    this.cqg_1 = $checkRegistrationAllowedUseCase;
    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 = 16;
            if (!(this.tqf_1 == null) ? !(this.uqf_1._v == null) : false) {
              this.hd_1 = 9;
              continue $sm;
            } else {
              if ((!this.aqg_1 ? !isTemporary(this.vqf_1.ro9().knu_1) : false) ? this.uqf_1._v == null ? true : this.vqf_1.ioa().tnt_1 === this.uqf_1._v : false) {
                navigateToViewUri(this.xqf_1, this.yqf_1._v, this.zqf_1);
                this.hd_1 = 15;
                continue $sm;
              } else {
                if (!(this.uqf_1._v == null)) {
                  this.hd_1 = 1;
                  var tmp_0 = navigateToLink$slambda$lambda_0(this.uqf_1);
                  suspendResult = this.vqf_1.joa(this.bqg_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.gqg_1 = false;
                  this.hd_1 = 2;
                  continue $sm;
                }
              }
            }

          case 1:
            this.hqg_1 = suspendResult;
            this.gqg_1 = this.hqg_1 === 0;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.gqg_1) {
              this.fqg_1 = true;
              this.hd_1 = 5;
              continue $sm;
            } else {
              if (this.uqf_1._v == null) {
                this.hd_1 = 3;
                suspendResult = this.vqf_1.koa(this.bqg_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.iqg_1 = false;
                this.hd_1 = 4;
                continue $sm;
              }
            }

          case 3:
            this.jqg_1 = suspendResult;
            this.iqg_1 = this.jqg_1 === 0;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.fqg_1 = this.iqg_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (this.fqg_1) {
              var tmp_1 = this;
              var this_0 = LinkedHashMap_init_$Create$();
              Companion_getInstance_116();
              this_0.s('next', this.yqf_1._v);
              Companion_getInstance_125();
              this_0.s('noSessionChange', this.wqf_1.toString());
              var tmp0_safe_receiver = this.uqf_1._v;
              if (tmp0_safe_receiver == null)
                null;
              else {
                Companion_getInstance_116();
                this_0.s('learningSpaceUrl', tmp0_safe_receiver);
              }
              tmp_1.kqg_1 = this_0.f3();
              this.lqg_1 = this.uqf_1._v;
              if (this.lqg_1 == null) {
                this.mqg_1 = null;
                this.hd_1 = 8;
                continue $sm;
              } else {
                var tmp_2 = this;
                tmp_2.nqg_1 = this.lqg_1;
                var tmp_3 = this;
                tmp_3.oqg_1 = this.nqg_1;
                var tmp_4 = this;
                var tmp0_safe_receiver_0 = this.cqg_1;
                tmp_4.pqg_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0(new LearningSpace(this.oqg_1));
                if (this.pqg_1 == null) {
                  this.qqg_1 = null;
                  this.hd_1 = 7;
                  continue $sm;
                } else {
                  this.hd_1 = 6;
                  suspendResult = this.pqg_1.goi(this.yqf_1._v, this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            } else {
              var this_1 = LinkedHashMap_init_$Create$();
              Companion_getInstance_116();
              this_1.s('next', this.yqf_1._v);
              Companion_getInstance_125();
              this_1.s('noSessionChange', this.wqf_1.toString());
              var tmp0_safe_receiver_1 = this.uqf_1._v;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                this_1.s('filterByLearningSpace', tmp0_safe_receiver_1);
              }
              this_1.s('activeAccountMode', 'inlist');
              Companion_getInstance_116();
              this_1.s('listMode', ListViewMode_PICKER_getInstance().toString());
              Companion_getInstance_116();
              this_1.s('maxDob', this.bqg_1.toString());
              var args = this_1.f3();
              this.xqf_1.iq9('AccountList', toMap_0(args), this.zqf_1);
              this.hd_1 = 15;
              continue $sm;
            }

          case 6:
            this.qqg_1 = suspendResult;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.mqg_1 = this.qqg_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.rqg_1 = this.mqg_1;
            var tmp_5;
            if (this.rqg_1 === false) {
              tmp_5 = 'Login';
            } else {
              tmp_5 = 'AddAccountSelectNewOrExisting';
            }

            this.xqf_1.kp6(tmp_5, this.kqg_1);
            this.hd_1 = 15;
            continue $sm;
          case 9:
            this.hd_1 = 10;
            var tmp_6 = navigateToLink$slambda$lambda(this.uqf_1);
            suspendResult = this.vqf_1.so9(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            var element = tmp0_iterator.e();
            if (element.lnu_1.g96_1 === substringBefore_0(this.tqf_1, '@')) {
              this.eqg_1 = element;
              this.hd_1 = 14;
              continue $sm;
            } else {
              this.hd_1 = 12;
              continue $sm;
            }

          case 12:
            this.hd_1 = 11;
            continue $sm;
          case 13:
            this.eqg_1 = null;
            if (false) {
              this.hd_1 = 9;
              continue $sm;
            }

            this.hd_1 = 14;
            continue $sm;
          case 14:
            var session = this.eqg_1;
            if (!(session == null)) {
              var this_2 = this.vqf_1;
              var tmp_7;
              if (!this.wqf_1) {
                tmp_7 = this_2;
              } else {
                tmp_7 = null;
              }
              var tmp0_safe_receiver_2 = tmp_7;
              if (tmp0_safe_receiver_2 != null) {
                tmp0_safe_receiver_2.lnx(session);
              }
              navigateToViewUri(this.xqf_1, this.yqf_1._v, this.zqf_1);
            }

            this.hd_1 = 15;
            continue $sm;
          case 15:
            return Unit_instance;
          case 16:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 16) {
          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.tqf_1, this.uqf_1, this.vqf_1, this.wqf_1, this.xqf_1, this.yqf_1, this.zqf_1, this.aqg_1, this.bqg_1, this.cqg_1, completion);
    i.dqg_1 = $this$launch;
    return i;
  };
  function navigateToLink$slambda_0($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, resultContinuation) {
    var i = new navigateToLink$slambda($accountName, $learningSpaceUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $checkRegistrationAllowedUseCase, 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.g96_1 == null;
  }
  function toUmAccount(_this__u8e3s4, endpointUrl) {
    return new UmAccount(_this__u8e3s4.f96_1, _this__u8e3s4.g96_1, '', endpointUrl, _this__u8e3s4.h96_1, _this__u8e3s4.i96_1);
  }
  function personFullName(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.h96_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.i96_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  }
  function toXapiAgent(_this__u8e3s4, learningSpace) {
    var tmp = personFullName(_this__u8e3s4);
    var tmp0_elvis_lhs = _this__u8e3s4.g96_1;
    var tmp1_name = tmp0_elvis_lhs == null ? _this__u8e3s4.f96_1.toString() : tmp0_elvis_lhs;
    var tmp2_homePage = learningSpace.tnt_1;
    return new XapiAgent(tmp, VOID, VOID, VOID, VOID, new XapiAccount(tmp2_homePage, tmp1_name));
  }
  function toggle_0(_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, learningSpace) {
    Companion_getInstance_125();
    var tmp = to('selectedAccountPersonUid', personUid.toString());
    Companion_getInstance_125();
    return appendQueryArgs(_this__u8e3s4, mapOf([tmp, to('selectedAccountEndpointUrl', learningSpace.tnt_1)]));
  }
  function toNullIfBlank(_this__u8e3s4) {
    // Inline function 'kotlin.text.ifBlank' call
    var tmp;
    if (isBlank(_this__u8e3s4)) {
      // Inline function 'com.ustadmobile.core.util.ext.toNullIfBlank.<anonymous>' call
      tmp = null;
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function requireHttpPrefix(_this__u8e3s4, defaultProtocol) {
    defaultProtocol = defaultProtocol === VOID ? 'https' : defaultProtocol;
    return startsWithHttpProtocol(_this__u8e3s4) ? _this__u8e3s4 : defaultProtocol + '://' + _this__u8e3s4;
  }
  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.ymd() : instant;
    return gmtOffsetString(offsetAt(_this__u8e3s4, instant)) + ' ' + _this__u8e3s4.ymg();
  }
  function get_progressAsFloat(_this__u8e3s4) {
    var tmp = _this__u8e3s4.bcc_1.zc();
    // Inline function 'kotlin.takeIf' call
    var this_0 = _this__u8e3s4.acc_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$52(_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$53(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function ScopedGrantResult(sgUid) {
    this.wqh_1 = sgUid;
  }
  protoOf(ScopedGrantResult).toString = function () {
    return 'ScopedGrantResult(sgUid=' + this.wqh_1.toString() + ')';
  };
  protoOf(ScopedGrantResult).hashCode = function () {
    return this.wqh_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.wqh_1.equals(tmp0_other_with_cast.wqh_1))
      return false;
    return true;
  };
  function grantScopedPermission(_this__u8e3s4, toPerson, permissions, scopeTableId, scopeEntityUid, $completion) {
    return grantScopedPermission_0(_this__u8e3s4, toPerson.r96_1, permissions, scopeTableId, scopeEntityUid, $completion);
  }
  function grantScopedPermission_0(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion) {
    var tmp = new $grantScopedPermissionCOROUTINE$54(_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$55(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertPersonAndGroupCOROUTINE$52(_this__u8e3s4, entity, groupFlag, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.aqh_1 = _this__u8e3s4;
    this.bqh_1 = entity;
    this.cqh_1 = groupFlag;
  }
  protoOf($insertPersonAndGroupCOROUTINE$52).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.hga_1 = 'Person individual group';
            this_0.jga_1 = this.cqh_1;
            tmp_0.dqh_1 = this_0;
            this.hd_1 = 1;
            suspendResult = this.aqh_1.d7e().insertAsync(this.dqh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.eqh_1 = suspendResult;
            this.dqh_1.cga_1 = this.eqh_1;
            this.bqh_1.r96_1 = this.dqh_1.cga_1;
            this.hd_1 = 2;
            suspendResult = this.aqh_1.n7d().insertAsync(this.bqh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.fqh_1 = suspendResult;
            this.bqh_1.f96_1 = this.fqh_1;
            this.hd_1 = 3;
            suspendResult = this.aqh_1.e7e().insertAsync(PersonGroupMember_init_$Create$(this.bqh_1.f96_1, this.bqh_1.r96_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.aqh_1, this.bqh_1, tmp_1, 9, this.bqh_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return this.bqh_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$53(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.oqh_1 = _this__u8e3s4;
    this.pqh_1 = block;
  }
  protoOf($localFirstThenRepoIfFalseCOROUTINE$53).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.oqh_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x5i();
            tmp_0.qqh_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.rqh_1 = this.qqh_1;
            if (this.rqh_1 == null) {
              this.sqh_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.tqh_1 = this.rqh_1;
              var tmp_4 = this;
              tmp_4.uqh_1 = this.tqh_1;
              this.hd_1 = 1;
              suspendResult = this.pqh_1(this.uqh_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.sqh_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.vqh_1 = this.sqh_1;
            if (this.vqh_1 === true)
              return this.vqh_1;
            this.hd_1 = 3;
            suspendResult = this.pqh_1(this.oqh_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$54(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fqi_1 = _this__u8e3s4;
    this.gqi_1 = toGroupUid;
    this.hqi_1 = permissions;
    this.iqi_1 = scopeTableId;
    this.jqi_1 = scopeEntityUid;
  }
  protoOf($grantScopedPermissionCOROUTINE$54).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.fqi_1.y7e();
            var this_0 = new ScopedGrant();
            this_0.thl_1 = this.gqi_1;
            this_0.shl_1 = this.hqi_1;
            this_0.qhl_1 = this.iqi_1;
            this_0.rhl_1 = this.jqi_1;
            suspendResult = tmp_0.whk(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$55(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.sqi_1 = _this__u8e3s4;
    this.tqi_1 = block;
  }
  protoOf($localFirstThenRepoIfNullCOROUTINE$55).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.sqi_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x5i();
            tmp_0.uqi_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.vqi_1 = this.uqi_1;
            if (this.vqi_1 == null) {
              this.wqi_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.xqi_1 = this.vqi_1;
              var tmp_4 = this;
              tmp_4.yqi_1 = this.xqi_1;
              this.hd_1 = 1;
              suspendResult = this.tqi_1(this.yqi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.wqi_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.zqi_1 = this.wqi_1;
            if (!(this.zqi_1 == null))
              return this.zqi_1;
            this.hd_1 = 3;
            suspendResult = this.tqi_1(this.sqi_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 withLearningSpace(_this__u8e3s4, learningSpace) {
    var tmp0_elvis_lhs = _this__u8e3s4.gik_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.eik_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 UserSessionWithPersonAndLearningSpace(tmp_0, tmp_1, learningSpace);
  }
  function isTemporary(_this__u8e3s4) {
    var tmp = _this__u8e3s4.dik_1;
    var tmp_0 = tmp & 8;
    return tmp_0 === 8;
  }
  function setIfNoValueSetYet(_this__u8e3s4, key, value) {
    if (_this__u8e3s4.ba(key) == null) {
      _this__u8e3s4.aqj(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.cmi() / 3600 | 0;
    // Inline function 'kotlin.mod' call
    var r = _this__u8e3s4.cmi() % 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 displayName(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.ojl_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ajk_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.njl_1.ujj_1;
      tmp = tmp1_safe_receiver == null ? null : substringAfterLast(tmp1_safe_receiver, '/');
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var tmp3_elvis_lhs = tmp;
    return tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
  }
  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.pl5();
    while (!((_this__u8e3s4.e().equals(EventType_END_ELEMENT_getInstance()) ? _this__u8e3s4.pl5() === (initDepth - 1 | 0) : false) ? _this__u8e3s4.dc().equals(initTagName) : false)) {
      switch (_this__u8e3s4.ul5().za_1) {
        case 1:
          if (_this__u8e3s4.dc().ll9() === 'img') {
            var tmp1_elvis_lhs = _this__u8e3s4.m7d(null, 'alt');
            var textVal = tmp1_elvis_lhs == null ? _this__u8e3s4.m7d(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.sl5()));
          break;
        default:
          break;
      }
    }
    return this_0.toString();
  }
  function emptyStringValues() {
    return new MapStringValues(emptyMap());
  }
  function Companion_90() {
  }
  protoOf(Companion_90).b4e = function () {
    return new MapStringValues(emptyMap());
  };
  protoOf(Companion_90).n4r = function () {
    return new StringValuesSerializer();
  };
  protoOf(Companion_90).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_139;
  function Companion_getInstance_107() {
    return Companion_instance_139;
  }
  function IStringValues() {
  }
  function MapStringValues(map) {
    this.xqd_1 = map;
  }
  protoOf(MapStringValues).n2n = function (key) {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.xqd_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).o2n = function () {
    return this.xqd_1.o2();
  };
  function asIStringValues(_this__u8e3s4) {
    return new MapStringValues(_this__u8e3s4);
  }
  function StringValuesSerializer() {
    this.bqj_1 = MapSerializer(serializer_0(StringCompanionObject_instance), ListSerializer(serializer_0(StringCompanionObject_instance)));
    this.cqj_1 = SerialDescriptor('StringValuesSerializer', this.bqj_1.q44());
  }
  protoOf(StringValuesSerializer).q44 = function () {
    return this.cqj_1;
  };
  protoOf(StringValuesSerializer).s44 = function (decoder) {
    var stringMap = decoder.h48(this.bqj_1);
    return new MapStringValues(stringMap);
  };
  protoOf(StringValuesSerializer).dqj = function (encoder, value) {
    encoder.z49(this.bqj_1, toMap_1(value));
  };
  protoOf(StringValuesSerializer).r44 = function (encoder, value) {
    return this.dqj(encoder, (!(value == null) ? isInterface(value, IStringValues) : false) ? value : THROW_CCE());
  };
  function Companion_91() {
    this.eqj_1 = 'errCode';
    this.fqj_1 = 'msg';
    this.gqj_1 = 'stacktraceKey';
    this.hqj_1 = 'fromUri';
    this.iqj_1 = 'ErrorReport';
  }
  var Companion_instance_140;
  function Companion_getInstance_108() {
    return Companion_instance_140;
  }
  function Companion_92() {
    this.jqj_1 = 'HolidayCalendarDetail';
  }
  var Companion_instance_141;
  function Companion_getInstance_109() {
    return Companion_instance_141;
  }
  function Companion_93() {
    this.kqj_1 = 'InviteViaLink';
  }
  var Companion_instance_142;
  function Companion_getInstance_110() {
    return Companion_instance_142;
  }
  function Companion_94() {
    this.lqj_1 = 'LanguageDetailView';
  }
  var Companion_instance_143;
  function Companion_getInstance_111() {
    return Companion_instance_143;
  }
  function Companion_95() {
    this.mqj_1 = 'LanguageEditEditView';
  }
  var Companion_instance_144;
  function Companion_getInstance_112() {
    return Companion_instance_144;
  }
  function Companion_96() {
    this.nqj_1 = 'ScopedGrantDetail';
  }
  var Companion_instance_145;
  function Companion_getInstance_113() {
    return Companion_instance_145;
  }
  function Companion_97() {
    this.oqj_1 = 'SiteTermsDetailView';
    this.pqj_1 = 'SiteTermsDetailAcceptTerms';
    this.qqj_1 = 'useDisplayLocale';
    this.rqj_1 = 'showAccept';
  }
  var Companion_instance_146;
  function Companion_getInstance_114() {
    return Companion_instance_146;
  }
  function Companion_98() {
    Companion_instance_147 = this;
    this.sqj_1 = 'entity';
    this.tqj_1 = new Long(200, 0);
  }
  var Companion_instance_147;
  function Companion_getInstance_115() {
    if (Companion_instance_147 == null)
      new Companion_98();
    return Companion_instance_147;
  }
  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.wqj_1 = mode;
  }
  function ListViewMode_BROWSER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_BROWSER_instance;
  }
  function ListViewMode_PICKER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_PICKER_instance;
  }
  function Companion_99() {
    Companion_instance_148 = this;
    this.xqj_1 = 'clazzAction';
    this.yqj_1 = 'entityUid';
    this.zqj_1 = 'containerUid';
    this.aqk_1 = 'parentUid';
    this.bqk_1 = 'parentTitle';
    this.cqk_1 = 'entryid';
    this.dqk_1 = 'statementVerUid';
    this.eqk_1 = 'contextRegistrationIdHi';
    this.fqk_1 = 'contextRegistrationIdLo';
    this.gqk_1 = 'learnerGroupUid';
    this.hqk_1 = 'noiframe';
    this.iqk_1 = 'schoolUid';
    this.jqk_1 = 'content_type';
    this.kqk_1 = 'filterBySchoolUid';
    this.lqk_1 = 'filterByRole';
    this.mqk_1 = 'listMode';
    this.nqk_1 = 'getResultMode';
    this.oqk_1 = 'listAddMode';
    this.pqk_1 = 'filterByPermission';
    this.qqk_1 = 'clazzUid';
    this.rqk_1 = 'filterByPersonGroupUid';
    this.sqk_1 = 'filterByEnrolmentRole';
    this.tqk_1 = 'clazzAssignmentUid';
    this.uqk_1 = 'clazzAssignmentSubmitterUid';
    this.vqk_1 = 'personUid';
    this.wqk_1 = 'next';
    this.xqk_1 = 'site';
    this.yqk_1 = 'learningSpaceUrl';
    this.zqk_1 = 'openLink';
    this.aql_1 = 'account';
    this.bql_1 = 'accountEndpoint';
    this.cql_1 = 'snack_message';
    this.dql_1 = 'argCode';
    this.eql_1 = 'argCodeTable';
    this.fql_1 = 'argEntityName';
    this.gql_1 = '';
    this.hql_1 = 'root';
    this.iql_1 = 'current';
    this.jql_1 = 'goToComplete';
    this.kql_1 = 'saveDb';
    this.lql_1 = 'popUpToOnFinish';
    this.mql_1 = 'result_dest';
    this.nql_1 = 'result_viewname';
    this.oql_1 = 'registration_allowed';
    this.pql_1 = 'result_key';
    this.qql_1 = 'intMsg';
    this.rql_1 = 'title';
    this.sql_1 = 'navChild';
    this.tql_1 = 'activeTabIndex';
    this.uql_1 = 'maxDob';
    this.vql_1 = new Long(1, -955361223);
  }
  var Companion_instance_148;
  function Companion_getInstance_116() {
    if (Companion_instance_148 == null)
      new Companion_99();
    return Companion_instance_148;
  }
  function DetailViewModel(di, savedStateHandle, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.rqm_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.qqo_1 = errorReport;
    this.rqo_1 = fieldsEnabled;
  }
  protoOf(ErrorReportUiState).toString = function () {
    return 'ErrorReportUiState(errorReport=' + this.qqo_1 + ', fieldsEnabled=' + this.rqo_1 + ')';
  };
  protoOf(ErrorReportUiState).hashCode = function () {
    var result = this.qqo_1 == null ? 0 : hashCode(this.qqo_1);
    result = imul(result, 31) + getBooleanHashCode(this.rqo_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.qqo_1, tmp0_other_with_cast.qqo_1))
      return false;
    if (!(this.rqo_1 === tmp0_other_with_cast.rqo_1))
      return false;
    return true;
  };
  function HolidayCalendarDetailUIState(holidayCalendar, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.sqo_1 = holidayCalendar;
    this.tqo_1 = holidayList;
  }
  protoOf(HolidayCalendarDetailUIState).toString = function () {
    return 'HolidayCalendarDetailUIState(holidayCalendar=' + this.sqo_1 + ', holidayList=' + this.tqo_1 + ')';
  };
  protoOf(HolidayCalendarDetailUIState).hashCode = function () {
    var result = this.sqo_1 == null ? 0 : hashCode(this.sqo_1);
    result = imul(result, 31) + hashCode(this.tqo_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.sqo_1, tmp0_other_with_cast.sqo_1))
      return false;
    if (!equals(this.tqo_1, tmp0_other_with_cast.tqo_1))
      return false;
    return true;
  };
  function Companion_100() {
    this.uqo_1 = 'HolidayCalendarEdit';
  }
  var Companion_instance_149;
  function Companion_getInstance_117() {
    return Companion_instance_149;
  }
  function HolidayCalendarEditUiState(holidayCalendar, fieldsEnabled, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.vqo_1 = holidayCalendar;
    this.wqo_1 = fieldsEnabled;
    this.xqo_1 = holidayList;
  }
  protoOf(HolidayCalendarEditUiState).toString = function () {
    return 'HolidayCalendarEditUiState(holidayCalendar=' + this.vqo_1 + ', fieldsEnabled=' + this.wqo_1 + ', holidayList=' + this.xqo_1 + ')';
  };
  protoOf(HolidayCalendarEditUiState).hashCode = function () {
    var result = this.vqo_1 == null ? 0 : hashCode(this.vqo_1);
    result = imul(result, 31) + getBooleanHashCode(this.wqo_1) | 0;
    result = imul(result, 31) + (this.xqo_1 == null ? 0 : hashCode(this.xqo_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.vqo_1, tmp0_other_with_cast.vqo_1))
      return false;
    if (!(this.wqo_1 === tmp0_other_with_cast.wqo_1))
      return false;
    if (!equals(this.xqo_1, tmp0_other_with_cast.xqo_1))
      return false;
    return true;
  };
  function Companion_101() {
    this.yqo_1 = 'HolidayCalendarList';
  }
  var Companion_instance_150;
  function Companion_getInstance_118() {
    return Companion_instance_150;
  }
  function HolidayCalendarListUiState(holidayCalendarList) {
    var tmp;
    if (holidayCalendarList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = holidayCalendarList;
    }
    holidayCalendarList = tmp;
    this.zqo_1 = holidayCalendarList;
  }
  protoOf(HolidayCalendarListUiState).toString = function () {
    return 'HolidayCalendarListUiState(holidayCalendarList=' + this.zqo_1 + ')';
  };
  protoOf(HolidayCalendarListUiState).hashCode = function () {
    return hashCode(this.zqo_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.zqo_1, tmp0_other_with_cast.zqo_1))
      return false;
    return true;
  };
  function LanguageDetailUiState(language) {
    language = language === VOID ? null : language;
    this.aqp_1 = language;
  }
  protoOf(LanguageDetailUiState).toString = function () {
    return 'LanguageDetailUiState(language=' + this.aqp_1 + ')';
  };
  protoOf(LanguageDetailUiState).hashCode = function () {
    return this.aqp_1 == null ? 0 : this.aqp_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.aqp_1, tmp0_other_with_cast.aqp_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.bqp_1 = language;
    this.cqp_1 = fieldsEnabled;
    this.dqp_1 = languageNameError;
    this.eqp_1 = twoLettersCodeError;
    this.fqp_1 = threeLettersCodeError;
  }
  protoOf(LanguageEditUiState).toString = function () {
    return 'LanguageEditUiState(language=' + this.bqp_1 + ', fieldsEnabled=' + this.cqp_1 + ', languageNameError=' + this.dqp_1 + ', twoLettersCodeError=' + this.eqp_1 + ', threeLettersCodeError=' + this.fqp_1 + ')';
  };
  protoOf(LanguageEditUiState).hashCode = function () {
    var result = this.bqp_1 == null ? 0 : this.bqp_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.cqp_1) | 0;
    result = imul(result, 31) + (this.dqp_1 == null ? 0 : getStringHashCode(this.dqp_1)) | 0;
    result = imul(result, 31) + (this.eqp_1 == null ? 0 : getStringHashCode(this.eqp_1)) | 0;
    result = imul(result, 31) + (this.fqp_1 == null ? 0 : getStringHashCode(this.fqp_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.bqp_1, tmp0_other_with_cast.bqp_1))
      return false;
    if (!(this.cqp_1 === tmp0_other_with_cast.cqp_1))
      return false;
    if (!(this.dqp_1 == tmp0_other_with_cast.dqp_1))
      return false;
    if (!(this.eqp_1 == tmp0_other_with_cast.eqp_1))
      return false;
    if (!(this.fqp_1 == tmp0_other_with_cast.fqp_1))
      return false;
    return true;
  };
  function Companion_102() {
    this.gqp_1 = 'LanguageList';
  }
  var Companion_instance_151;
  function Companion_getInstance_119() {
    return Companion_instance_151;
  }
  function LanguageListUiState(languageList, sortOptions, sortOrder) {
    languageList = languageList === VOID ? emptyList() : languageList;
    var tmp;
    if (sortOptions === VOID) {
      var tmp_0 = strings_getInstance().pmk_1;
      var tmp_1 = new SortOrderOption(tmp_0, 1, true);
      var tmp_2 = strings_getInstance().pmk_1;
      var tmp_3 = new SortOrderOption(tmp_2, 2, false);
      var tmp_4 = strings_getInstance().cml_1;
      var tmp_5 = new SortOrderOption(tmp_4, 3, true);
      var tmp_6 = strings_getInstance().cml_1;
      var tmp_7 = new SortOrderOption(tmp_6, 4, false);
      var tmp_8 = strings_getInstance().dml_1;
      var tmp_9 = new SortOrderOption(tmp_8, 5, true);
      var tmp_10 = strings_getInstance().dml_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.hqp_1 = languageList;
    this.iqp_1 = sortOptions;
    this.jqp_1 = sortOrder;
  }
  protoOf(LanguageListUiState).toString = function () {
    return 'LanguageListUiState(languageList=' + this.hqp_1 + ', sortOptions=' + this.iqp_1 + ', sortOrder=' + this.jqp_1 + ')';
  };
  protoOf(LanguageListUiState).hashCode = function () {
    var result = hashCode(this.hqp_1);
    result = imul(result, 31) + hashCode(this.iqp_1) | 0;
    result = imul(result, 31) + this.jqp_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.hqp_1, tmp0_other_with_cast.hqp_1))
      return false;
    if (!equals(this.iqp_1, tmp0_other_with_cast.iqp_1))
      return false;
    if (!this.jqp_1.equals(tmp0_other_with_cast.jqp_1))
      return false;
    return true;
  };
  function LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation) {
    this.sqp_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda).uqp = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.uqp(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.tqp_1.u7d();
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.sqp_1.ba('entityUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.xfh(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).vny = function (it, completion) {
    var i = new LeavingReasonEditViewModel$slambda$slambda(this.sqp_1, completion);
    i.tqp_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.uqp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).dqq = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.dqq($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.u94_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).l78 = 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.dqq($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.bqr_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gqr(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_103() {
    this.hqr_1 = 'LeavingReasonEdit';
  }
  var Companion_instance_152;
  function Companion_getInstance_120() {
    return Companion_instance_152;
  }
  function LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.qqr_1 = this$0;
    this.rqr_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.tqr_1 = Companion_getInstance_11().n4r();
            this.hd_1 = 1;
            var tmp_0 = LeavingReasonEditViewModel$slambda$slambda_0(this.rqr_1, null);
            var tmp_1 = LeavingReasonEditViewModel$slambda$slambda_2(null);
            suspendResult = this.qqr_1.hqo(this.tqr_1, VOID, VOID, tmp_0, tmp_1, LeavingReasonEditViewModel$slambda$lambda(this.qqr_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.qqr_1.bqr_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.gqr(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.qqr_1, this.rqr_1, completion);
    i.sqr_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.cqs_1 = $commitDelay;
    this.dqs_1 = $entity;
    this.eqs_1 = $this;
    this.fqs_1 = $key;
    this.gqs_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.cqs_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.dqs_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.eqs_1.dqo(this.eqs_1.xqm_1, this.fqs_1, this.gqs_1, this.dqs_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.cqs_1, this.dqs_1, this.eqs_1, this.fqs_1, this.gqs_1, completion);
    i.hqs_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.bqr_1 = MutableStateFlow(new LeavingReasonEditUiState(VOID, VOID, false));
    this.cqr_1 = asStateFlow(this.bqr_1);
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, LeavingReasonEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(LeavingReasonEditViewModel).iqs = function (leavingReason) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqr_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.gqr(leavingReason);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_11().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.eqt_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.dqr_1 = leavingReason;
    this.eqr_1 = reasonTitleError;
    this.fqr_1 = fieldsEnabled;
  }
  protoOf(LeavingReasonEditUiState).jqt = function (leavingReason, reasonTitleError, fieldsEnabled) {
    return new LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).gqr = function (leavingReason, reasonTitleError, fieldsEnabled, $super) {
    leavingReason = leavingReason === VOID ? this.dqr_1 : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? this.eqr_1 : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fqr_1 : fieldsEnabled;
    return $super === VOID ? this.jqt(leavingReason, reasonTitleError, fieldsEnabled) : $super.jqt.call(this, leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).toString = function () {
    return 'LeavingReasonEditUiState(leavingReason=' + this.dqr_1 + ', reasonTitleError=' + this.eqr_1 + ', fieldsEnabled=' + this.fqr_1 + ')';
  };
  protoOf(LeavingReasonEditUiState).hashCode = function () {
    var result = this.dqr_1 == null ? 0 : hashCode(this.dqr_1);
    result = imul(result, 31) + (this.eqr_1 == null ? 0 : getStringHashCode(this.eqr_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fqr_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.dqr_1, tmp0_other_with_cast.dqr_1))
      return false;
    if (!(this.eqr_1 == tmp0_other_with_cast.eqr_1))
      return false;
    if (!(this.fqr_1 === tmp0_other_with_cast.fqr_1))
      return false;
    return true;
  };
  function Companion_104() {
    this.kqt_1 = 'ReportFilterEdit';
  }
  var Companion_instance_153;
  function Companion_getInstance_121() {
    return Companion_instance_153;
  }
  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.lqt_1 = fieldError;
    this.mqt_1 = conditionsError;
    this.nqt_1 = valuesError;
    this.oqt_1 = fieldsEnabled;
    this.pqt_1 = reportFilter;
    this.qqt_1 = uidAndLabelList;
    this.rqt_1 = createNewFilter;
    this.sqt_1 = reportFilterValueVisible;
    this.tqt_1 = reportFilterBetweenValueVisible;
    this.uqt_1 = reportFilterUidAndLabelListVisible;
  }
  protoOf(ReportFilterEditUiState).toString = function () {
    return 'ReportFilterEditUiState(fieldError=' + this.lqt_1 + ', conditionsError=' + this.mqt_1 + ', valuesError=' + this.nqt_1 + ', fieldsEnabled=' + this.oqt_1 + ', reportFilter=' + this.pqt_1 + ', uidAndLabelList=' + this.qqt_1 + ', createNewFilter=' + this.rqt_1 + ', reportFilterValueVisible=' + this.sqt_1 + ', reportFilterBetweenValueVisible=' + this.tqt_1 + ', reportFilterUidAndLabelListVisible=' + this.uqt_1 + ')';
  };
  protoOf(ReportFilterEditUiState).hashCode = function () {
    var result = this.lqt_1 == null ? 0 : getStringHashCode(this.lqt_1);
    result = imul(result, 31) + (this.mqt_1 == null ? 0 : getStringHashCode(this.mqt_1)) | 0;
    result = imul(result, 31) + (this.nqt_1 == null ? 0 : getStringHashCode(this.nqt_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oqt_1) | 0;
    result = imul(result, 31) + (this.pqt_1 == null ? 0 : this.pqt_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.qqt_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.rqt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.sqt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tqt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uqt_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.lqt_1 == tmp0_other_with_cast.lqt_1))
      return false;
    if (!(this.mqt_1 == tmp0_other_with_cast.mqt_1))
      return false;
    if (!(this.nqt_1 == tmp0_other_with_cast.nqt_1))
      return false;
    if (!(this.oqt_1 === tmp0_other_with_cast.oqt_1))
      return false;
    if (!equals(this.pqt_1, tmp0_other_with_cast.pqt_1))
      return false;
    if (!equals(this.qqt_1, tmp0_other_with_cast.qqt_1))
      return false;
    if (!(this.rqt_1 === tmp0_other_with_cast.rqt_1))
      return false;
    if (!(this.sqt_1 === tmp0_other_with_cast.sqt_1))
      return false;
    if (!(this.tqt_1 === tmp0_other_with_cast.tqt_1))
      return false;
    if (!(this.uqt_1 === tmp0_other_with_cast.uqt_1))
      return false;
    return true;
  };
  function ScopedGrantDetailUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    bitmaskList = bitmaskList === VOID ? emptyList() : bitmaskList;
    this.vqt_1 = entity;
    this.wqt_1 = bitmaskList;
  }
  protoOf(ScopedGrantDetailUiState).toString = function () {
    return 'ScopedGrantDetailUiState(entity=' + this.vqt_1 + ', bitmaskList=' + this.wqt_1 + ')';
  };
  protoOf(ScopedGrantDetailUiState).hashCode = function () {
    var result = this.vqt_1 == null ? 0 : hashCode(this.vqt_1);
    result = imul(result, 31) + hashCode(this.wqt_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.vqt_1, tmp0_other_with_cast.vqt_1))
      return false;
    if (!equals(this.wqt_1, tmp0_other_with_cast.wqt_1))
      return false;
    return true;
  };
  function Companion_105() {
    this.xqt_1 = 'ScopedGrantEdit';
    this.yqt_1 = 'grantToGroup';
    this.zqt_1 = 'grantToName';
    this.aqu_1 = 'grantTableId';
    this.bqu_1 = 'grantEntityUid';
    this.cqu_1 = 'permissionList';
  }
  var Companion_instance_154;
  function Companion_getInstance_122() {
    return Companion_instance_154;
  }
  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.dqu_1 = entity;
    this.equ_1 = bitmaskList;
  }
  protoOf(ScopedGrantEditUiState).toString = function () {
    return 'ScopedGrantEditUiState(entity=' + this.dqu_1 + ', bitmaskList=' + this.equ_1 + ')';
  };
  protoOf(ScopedGrantEditUiState).hashCode = function () {
    var result = this.dqu_1 == null ? 0 : hashCode(this.dqu_1);
    result = imul(result, 31) + hashCode(this.equ_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.dqu_1, tmp0_other_with_cast.dqu_1))
      return false;
    if (!equals(this.equ_1, tmp0_other_with_cast.equ_1))
      return false;
    return true;
  };
  function Companion_106() {
    Companion_instance_155 = this;
    this.fqu_1 = new Long(200, 0);
    this.gqu_1 = 'initPicUri';
  }
  var Companion_instance_155;
  function Companion_getInstance_123() {
    if (Companion_instance_155 == null)
      new Companion_106();
    return Companion_instance_155;
  }
  function UstadEditViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_123();
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.eqt_1 = null;
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.fqt_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  protoOf(UstadEditViewModel).gqt = function (detailViewName, entityUid, result, detailViewExtraArgs) {
    Companion_getInstance_116();
    var popUpToViewName = this.xqm_1.ba('result_viewname');
    Companion_getInstance_116();
    var saveToKey = this.xqm_1.ba('result_key');
    Companion_getInstance_125();
    var createdNewEntity = this.xqm_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_125();
      this_0.s('entityUid', entityUid.toString());
      var tmp = this_0.f3();
      Companion_getInstance_116();
      this.zqm_1.iq9(detailViewName, tmp, new UstadGoOptions('', true));
    } else {
      this.iqt(result);
    }
  };
  protoOf(UstadEditViewModel).hqt = function (detailViewName, entityUid, result, detailViewExtraArgs, $super) {
    detailViewExtraArgs = detailViewExtraArgs === VOID ? emptyMap() : detailViewExtraArgs;
    var tmp;
    if ($super === VOID) {
      this.gqt(detailViewName, entityUid, result, detailViewExtraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.gqt.call(this, detailViewName, entityUid, result, detailViewExtraArgs);
    }
    return tmp;
  };
  protoOf(UstadEditViewModel).hqu = function (newEntityStringResource, editEntityStringResource) {
    var tmp;
    if (!this.fqt_1.equals(new Long(0, 0))) {
      tmp = true;
    } else {
      Companion_getInstance_115();
      tmp = !(this.xqm_1.ba('entity') == null);
    }
    var isEditing = tmp;
    var tmp_0 = this.xqn();
    var tmp_1;
    if (isEditing) {
      tmp_1 = editEntityStringResource;
    } else {
      tmp_1 = newEntityStringResource;
    }
    return tmp_0.joj(tmp_1);
  };
  protoOf(UstadEditViewModel).iqu = function (prevFieldValue, currentFieldValue, currentErrorMessage) {
    return currentErrorMessage == null ? null : !equals(prevFieldValue, currentFieldValue) ? null : currentErrorMessage;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.tqu_1 = this$0;
    this.uqu_1 = $fabStringResource;
    this.vqu_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).iqf = function (hasAddPermission, $completion) {
    var tmp = this.jqf(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.iqf((!(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.tqu_1, this.wqu_1, this.uqu_1, this.vqu_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).jqf = function (hasAddPermission, completion) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this.tqu_1, this.uqu_1, this.vqu_1, completion);
    i.wqu_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.iqf(hasAddPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function setAddNewItemUiState($this, hasAddPermission, fabStringResource, onSetAddItemVisibility) {
    var tmp;
    if (hasAddPermission ? $this.xqv().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var tmp_0 = $this.xqn().joj(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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.setAddNewItemUiState.<anonymous>' call
        var nextValue = prevValue.jq6(fabState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    onSetAddItemVisibility(hasAddPermission ? $this.xqv().equals(ListViewMode_PICKER_getInstance()) : false);
  }
  function Companion_107() {
    this.yqv_1 = 'listMode';
  }
  var Companion_instance_156;
  function Companion_getInstance_124() {
    return Companion_instance_156;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_3(function_0) {
    this.zqv_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_3).t1d = function (value, $completion) {
    return this.zqv_1(value, $completion);
  };
  function UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation) {
    this.iqw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$searchEvtCollator$slambda).kqw = function (it, $completion) {
    var tmp = this.lqw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).he = function (p1, $completion) {
    return this.kqw((!(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.jqw_1);
          this.iqw_1.mqw(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).lqw = function (it, completion) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this.iqw_1, completion);
    i.jqw_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.kqw(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.bqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.createSearchEnabledState.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.bq6_1.tq5(VOID, searchText));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this$0.wqv_1.s6x(searchText);
      return Unit_instance;
    };
  }
  function UstadListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.nqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.wqw_1 = $hasPermissionFlow;
    this.xqw_1 = this$0;
    this.yqw_1 = $fabStringResource;
    this.zqw_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).m78 = function ($completion) {
    return this.j87($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.wqw_1());
            var tmp_1 = UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this.xqw_1, this.yqw_1, this.zqw_1, null);
            suspendResult = tmp_0.a1c(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).l78 = function (completion) {
    return new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda(this.wqw_1, this.xqw_1, this.yqw_1, this.zqw_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadListViewModel$onClickAdd$ref_0($boundThis) {
    var l = function () {
      $boundThis.nqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel(di, savedStateHandle, initialState, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.sqv_1 = MutableStateFlow(initialState);
    this.tqv_1 = asStateFlow(this.sqv_1);
    this.uqv_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.vqv_1 = asSharedFlow(this.uqv_1);
    var tmp = this;
    var tmp_0 = new Long(200, 0);
    var tmp_1 = this.oqn();
    var tmp_2 = BufferOverflow_DROP_OLDEST_getInstance();
    tmp.wqv_1 = new EventCollator2(tmp_0, tmp_1, 1, tmp_2, UstadListViewModel$searchEvtCollator$slambda_0(this, null));
  }
  protoOf(UstadListViewModel).xqv = function () {
    var tmp;
    var tmp_0;
    Companion_getInstance_116();
    if (this.xqm_1.ba('listMode') === ListViewMode_PICKER_getInstance().wqj_1) {
      tmp_0 = true;
    } else {
      var tmp_1;
      Companion_getInstance_116();
      if (!(this.xqm_1.ba('result_viewname') == null)) {
        Companion_getInstance_116();
        tmp_1 = !(this.xqm_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).aqx = function (visible) {
    return new AppBarSearchUiState(visible, VOID, UstadListViewModel$createSearchEnabledState$lambda(this));
  };
  protoOf(UstadListViewModel).bqx = function (visible, $super) {
    visible = visible === VOID ? true : visible;
    return $super === VOID ? this.aqx(visible) : $super.aqx.call(this, visible);
  };
  protoOf(UstadListViewModel).cqx = function (hasPermissionFlow, fabStringResource, onSetAddListItemVisibility, $completion) {
    return whenSubscribed(this.sqv_1, UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0(hasPermissionFlow, this, fabStringResource, onSetAddListItemVisibility, null), $completion);
  };
  protoOf(UstadListViewModel).dqx = function (hasAddPermission, stringResource, onClick) {
    var tmp;
    if (hasAddPermission ? this.xqv().equals(ListViewMode_BROWSER_getInstance()) : false) {
      tmp = new FabUiState(true, this.xqn().joj(stringResource), FabIcon_ADD_getInstance(), onClick);
    } else {
      tmp = new FabUiState(false);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).eqx = 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.dqx(hasAddPermission, stringResource, onClick) : $super.dqx.call(this, hasAddPermission, stringResource, onClick);
  };
  protoOf(UstadListViewModel).fqx = function (editViewName, extraArgs) {
    var resultDest = this.yqn();
    var tmp;
    if (!(resultDest == null)) {
      Companion_getInstance_116();
      var tmp_0 = to('result_viewname', resultDest.vq9_1);
      Companion_getInstance_116();
      tmp = plus_0(mapOf([tmp_0, to('result_key', resultDest.wq9_1)]), extraArgs);
    } else {
      tmp = extraArgs;
    }
    var args = tmp;
    this.zqm_1.kp6(editViewName, args);
  };
  protoOf(UstadListViewModel).gqx = function (editViewName, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.fqx(editViewName, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.fqx.call(this, editViewName, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).hqx = function (detailViewName, entityUid, result, extraArgs) {
    var resultDest = this.yqn();
    if (!(resultDest == null)) {
      this.iqt(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_125();
      this_0.s('entityUid', entityUid.toString());
      var tmp$ret$2 = this_0.f3();
      this.zqm_1.kp6(detailViewName, tmp$ret$2);
    }
  };
  protoOf(UstadListViewModel).iqx = function (detailViewName, entityUid, result, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.hqx(detailViewName, entityUid, result, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.hqx.call(this, detailViewName, entityUid, result, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).jqx = function (browseStringResource, selectStringResource) {
    var tmp = this.xqn();
    var tmp_0;
    if (this.xqv().equals(ListViewMode_BROWSER_getInstance())) {
      tmp_0 = browseStringResource;
    } else {
      tmp_0 = selectStringResource;
    }
    return tmp.joj(tmp_0);
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation) {
    this.sqx_1 = $$this$unsafeFlow;
    this.tqx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).nqa = function (value, $completion) {
    var tmp = this.oqa(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.nqa(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.wqx_1 = this.sqx_1;
            var tmp_1 = this;
            tmp_1.xqx_1 = this.uqx_1;
            var it = this.xqx_1;
            var isNew = it.tq9_1.c7(this.tqx_1.mqn_1) > 0;
            if (isNew) {
              _set_lastNavResultTimestampCollected__txfbew(this.tqx_1, it.tq9_1);
            }

            if (isNew) {
              this.hd_1 = 3;
              suspendResult = this.wqx_1.t1d(this.xqx_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.vqx_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).oqa = function (value, completion) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda(this.sqx_1, this.tqx_1, completion);
    i.uqx_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.nqa(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$59(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gqy_1 = _this__u8e3s4;
    this.hqy_1 = collector;
  }
  protoOf($collectCOROUTINE$59).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.iqy_1 = this.hqy_1;
            this.hd_1 = 1;
            var tmp_1 = UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0(this.iqy_1, this.gqy_1.kqy_1, null);
            suspendResult = this.gqy_1.jqy_1.a1c(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.mqn_1 = value;
    $this.xqm_1.aqj('collectedTs', value.toString());
  }
  function Companion_108() {
    Companion_instance_157 = this;
    this.lqy_1 = 'entityState';
    this.mqy_1 = 'collectedTs';
    this.nqy_1 = 'initState';
    this.oqy_1 = 'timeZone';
    this.pqy_1 = 'parentUid';
    this.qqy_1 = 'courseBlockUid';
    this.rqy_1 = 'entityUid';
    this.sqy_1 = 'serverUrl';
    this.tqy_1 = 'next';
    this.uqy_1 = 'maxDob';
    var tmp = this;
    Companion_getInstance_140();
    Companion_getInstance_169();
    Companion_getInstance_190();
    Companion_getInstance_204();
    tmp.vqy_1 = listOf(['CourseListHome', 'ContentEntryListHome', 'ConversationListHome', 'PersonListHome']);
    this.wqy_1 = 'openLink';
    this.xqy_1 = 'account';
    this.yqy_1 = 'popUpToOnFinish';
    this.zqy_1 = 'inviteCode';
    this.aqz_1 = 'clazzUid';
    this.bqz_1 = 'entryid';
    this.cqz_1 = 'personUid';
    this.dqz_1 = 't';
    this.eqz_1 = 'noSessionChange';
    this.fqz_1 = 'selectedAccountPersonUid';
    this.gqz_1 = 'selectedAccountEndpointUrl';
    this.hqz_1 = 'result_viewname';
    this.iqz_1 = 'result_key';
  }
  var Companion_instance_157;
  function Companion_getInstance_125() {
    if (Companion_instance_157 == null)
      new Companion_108();
    return Companion_instance_157;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_4(function_0) {
    this.jqz_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_4).t1d = function (value, $completion) {
    return this.jqz_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(function_0) {
    this.kqz_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0).spi = function (url, target) {
    return this.kqz_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.nqn();
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(this$0.a57()).f58();
      // 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.d58(tmp$ret$0, null);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(this$0.a57()).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
      return OnClickLinkUseCase_init_$Create$(this$0.zqm_1, tmp, tmp_2, tmp$ret$3);
    };
  }
  function _no_name_provided__qut3iv_2($this, this$0) {
    this.jqy_1 = $this;
    this.kqy_1 = this$0;
  }
  protoOf(_no_name_provided__qut3iv_2).dqb = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$59(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_2).a1c = function (collector, $completion) {
    return this.dqb(collector, $completion);
  };
  function UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation) {
    this.tqz_1 = this$0;
    this.uqz_1 = $deserializer;
    this.vqz_1 = $jsonStr;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$getJson$slambda).xqz = 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.xqz((!(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.tqz_1.m4r().s45(this.uqz_1, this.vqz_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.tqz_1, this.uqz_1, this.vqz_1, completion);
    i.wqz_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.xqz($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation) {
    this.gr0_1 = this$0;
    this.hr0_1 = $serializer;
    this.ir0_1 = $value;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$setJson$slambda).kr0 = 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.kr0((!(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.gr0_1.m4r().r45(this.hr0_1, this.ir0_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.gr0_1, this.hr0_1, this.ir0_1, completion);
    i.jr0_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.kr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    this.tr0_1 = this$0;
    this.ur0_1 = $permissionCheck;
    this.vr0_1 = $block;
    this.wr0_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 = 8;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 7;
            this.zr0_1 = this.tr0_1.sqn();
            if (this.zr0_1 == null) {
              this.ar1_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = localFirstThenRepoIfFalse(this.zr0_1, this.ur0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.ar1_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.br1_1 = this.ar1_1;
            if (this.br1_1 === false) {
              this.tr0_1.zqm_1.iq9('Error', emptyMap(), new UstadGoOptions(this.tr0_1.yqm_1, true));
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.vr0_1(this.xr0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.yr0_1 = Unit_instance;
            this.id_1 = 8;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.id_1 = 8;
            l$ret$5: do {
              var this_0 = this.tr0_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jq6(VOID, Companion_getInstance_97().rq6_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver = this.wr0_1;
            if (tmp1_safe_receiver == null)
              null;
            else
              tmp1_safe_receiver(true);
            return Unit_instance;
          case 7:
            this.id_1 = 8;
            var t = this.kd_1;
            l$ret$3: do {
              var this_1 = this.tr0_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jq6(VOID, Companion_getInstance_97().rq6_1);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp1_safe_receiver_0 = this.wr0_1;
            if (tmp1_safe_receiver_0 == null)
              null;
            else
              tmp1_safe_receiver_0(true);
            throw t;
          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(UstadViewModel$launchIfHasPermission$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this.tr0_1, this.ur0_1, this.vr0_1, this.wr0_1, completion);
    i.xr0_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.kr1_1 = $onSetFieldsEnabled;
    this.lr1_1 = this$0;
    this.mr1_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.kr1_1(false);
            l$ret$1: do {
              var this_0 = this.lr1_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jq6(VOID, Companion_getInstance_97().qq6_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.cq6_1.kq5(VOID, VOID, false));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.mr1_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.or1_1 = suspendResult;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.kr1_1(true);
            l$ret$7: do {
              var this_1 = this.lr1_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jq6(VOID, Companion_getInstance_97().rq6_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.cq6_1.kq5(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.kr1_1(true);
            l$ret$5: do {
              var this_2 = this.lr1_1.bqn_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.jq6(VOID, Companion_getInstance_97().rq6_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.cq6_1.kq5(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.kr1_1, this.lr1_1, this.mr1_1, completion);
    i.nr1_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$56(_this__u8e3s4, _this__u8e3s4_0, key, deserializer, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xr1_1 = _this__u8e3s4;
    this.yr1_1 = _this__u8e3s4_0;
    this.zr1_1 = key;
    this.ar2_1 = deserializer;
  }
  protoOf($getJsonCOROUTINE$56).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.br2_1 = this.yr1_1.ba(this.zr1_1);
            if (!(this.br2_1 == null)) {
              this.hd_1 = 1;
              var tmp_0 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_0, UstadViewModel$getJson$slambda_0(this.xr1_1, this.ar2_1, this.br2_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.cr2_1 = null;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.cr2_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.cr2_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$57(_this__u8e3s4, _this__u8e3s4_0, key, serializer, value, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lr2_1 = _this__u8e3s4;
    this.mr2_1 = _this__u8e3s4_0;
    this.nr2_1 = key;
    this.or2_1 = serializer;
    this.pr2_1 = value;
  }
  protoOf($setJsonCOROUTINE$57).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.lr2_1, this.or2_1, this.pr2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var jsonStr = suspendResult;
            this.mr2_1.aqj(this.nr2_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$58(_this__u8e3s4, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.yr2_1 = _this__u8e3s4;
    this.zr2_1 = serializer;
    this.ar3_1 = loadFromStateKeys;
    this.br3_1 = savedStateKey;
    this.cr3_1 = onLoadFromDb;
    this.dr3_1 = makeDefault;
    this.er3_1 = uiUpdate;
  }
  protoOf($loadEntityCOROUTINE$58).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 19;
            var tmp_0 = this;
            tmp_0.fr3_1 = this.ar3_1;
            this.gr3_1 = this.fr3_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.gr3_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.hr3_1 = this.gr3_1.e();
            var tmp_1 = this;
            tmp_1.ir3_1 = this.hr3_1;
            this.hd_1 = 2;
            suspendResult = this.yr2_1.cqo(this.yr2_1.xqm_1, this.ir3_1, this.zr2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.kr3_1 = this.cr3_1;
            if (this.kr3_1 == null) {
              this.lr3_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.kr3_1(this.yr2_1.rqn(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.lr3_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.mr3_1 = this.lr3_1;
            if (!(this.mr3_1 == null)) {
              this.er3_1(this.mr3_1);
            }

            this.id_1 = 13;
            this.or3_1 = this.yr2_1.sqn();
            if (this.or3_1 == null) {
              this.pr3_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.qr3_1 = this.or3_1;
              var tmp_3 = this;
              tmp_3.rr3_1 = this.qr3_1;
              this.sr3_1 = this.cr3_1;
              if (this.sr3_1 == null) {
                this.tr3_1 = null;
                this.hd_1 = 7;
                continue $sm;
              } else {
                this.hd_1 = 6;
                suspendResult = this.sr3_1(this.rr3_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 6:
            this.tr3_1 = suspendResult;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.pr3_1 = this.tr3_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.ur3_1 = this.pr3_1;
            if (this.ur3_1 == null) {
              this.hd_1 = 9;
              suspendResult = this.dr3_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.vr3_1 = this.ur3_1;
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            this.vr3_1 = suspendResult;
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.wr3_1 = this.vr3_1;
            if (!(this.wr3_1 == null)) {
              this.hd_1 = 11;
              suspendResult = this.yr2_1.dqo(this.yr2_1.xqm_1, this.br3_1, this.zr2_1, this.wr3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 12;
              continue $sm;
            }

          case 11:
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.er3_1(this.wr3_1);
            this.nr3_1 = this.wr3_1;
            this.id_1 = 19;
            this.hd_1 = 18;
            continue $sm;
          case 13:
            this.id_1 = 19;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Exception) {
              this.xr3_1 = this.kd_1;
              if (!(this.mr3_1 == null)) {
                this.hd_1 = 14;
                suspendResult = this.yr2_1.dqo(this.yr2_1.xqm_1, this.br3_1, this.zr2_1, this.mr3_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 15;
                continue $sm;
              }
            } else {
              throw this.kd_1;
            }

          case 14:
            this.hd_1 = 15;
            continue $sm;
          case 15:
            this.yr3_1 = this.mr3_1;
            if (this.yr3_1 == null) {
              this.hd_1 = 16;
              suspendResult = this.dr3_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.zr3_1 = this.yr3_1;
              this.hd_1 = 17;
              continue $sm;
            }

          case 16:
            var this_0 = suspendResult;
            this.er3_1(this_0);
            this.zr3_1 = this_0;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            this.nr3_1 = this.zr3_1;
            this.hd_1 = 18;
            continue $sm;
          case 18:
            this.id_1 = 19;
            return this.nr3_1;
          case 19:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 19) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UstadViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_125();
    ViewModel_init_$Init$(this);
    this.wqm_1 = di;
    this.xqm_1 = savedStateHandle;
    this.yqm_1 = destinationName;
    this.zqm_1 = new CommandFlowUstadNavController();
    this.aqn_1 = this.zqm_1.hq9_1;
    this.bqn_1 = MutableStateFlow(new AppUiState());
    this.cqn_1 = asStateFlow(this.bqn_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.dqn_1 = Instance(this, tmp$ret$0, null).a5d(this, accountManager$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.nqn().ioa();
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.h57(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(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_1.eqn_1 = Instance(this_0, tmp$ret$5, null).a5d(this, activeDataLayer$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.nqn().ioa();
    var trigger_0 = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$8 = tmp_6.h57(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.fqn_1 = Instance(this_1, tmp$ret$10, 1).a5d(this, activeDb$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.gqn_1 = Instance(this, tmp$ret$12, null).a5d(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.hqn_1 = Instance(this, tmp$ret$14, null).a5d(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.iqn_1 = Instance(this, tmp$ret$16, null).a5d(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.jqn_1 = Instance(this, tmp$ret$18, null).a5d(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.kqn_1 = Instance(this, tmp$ret$20, null).a5d(this, systemImpl$factory());
    var tmp_19 = this;
    tmp_19.lqn_1 = lazy_0(UstadViewModel$onClickLinkUseCase$delegate$lambda(this));
    var tmp_20 = this;
    var tmp0_safe_receiver = this.xqm_1.ba('collectedTs');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_20.mqn_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    if (this.mqn_1.equals(new Long(0, 0))) {
      _set_lastNavResultTimestampCollected__txfbew(this, systemTimeInMillis());
    }
  }
  protoOf(UstadViewModel).a57 = function () {
    return this.wqm_1;
  };
  protoOf(UstadViewModel).nqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.dqn_1;
    accountManager$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).oqn = function () {
    return get_viewModelScope(this);
  };
  protoOf(UstadViewModel).pqn = function () {
    return this.nqn().ro9().lnu_1.f96_1;
  };
  protoOf(UstadViewModel).qqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.eqn_1;
    activeDataLayer$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).rqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.fqn_1;
    activeDb$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).sqn = function () {
    return this.qqn().tk2_1;
  };
  protoOf(UstadViewModel).tqn = function () {
    return this.qqn().wk2();
  };
  protoOf(UstadViewModel).uqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.gqn_1;
    navResultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).m4r = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.hqn_1;
    json$factory_2();
    return this_0.t2();
  };
  protoOf(UstadViewModel).vqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.iqn_1;
    snackDispatcher$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).wqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.jqn_1;
    resultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).xqn = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.kqn_1;
    systemImpl$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).yqn = function () {
    var popUpToViewName = this.xqm_1.ba('result_viewname');
    var saveToKey = this.xqm_1.ba('result_key');
    var tmp;
    if (!(popUpToViewName == null) ? !(saveToKey == null) : false) {
      tmp = new NavResultDest(popUpToViewName, saveToKey);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UstadViewModel).zqn = function (value) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.<set-loadingState>.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, value);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(UstadViewModel).aqo = function () {
    return this.bqn_1.t2().vq5_1;
  };
  protoOf(UstadViewModel).bqo = function (_this__u8e3s4, key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.xq9(key);
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_2(this_0, this);
  };
  protoOf(UstadViewModel).cqo = function (_this__u8e3s4, key, deserializer, $completion) {
    var tmp = new $getJsonCOROUTINE$56(this, _this__u8e3s4, key, deserializer, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).dqo = function (_this__u8e3s4, key, serializer, value, $completion) {
    var tmp = new $setJsonCOROUTINE$57(this, _this__u8e3s4, key, serializer, value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).jqu = 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.iq9(viewName, args, goOptions);
  };
  protoOf(UstadViewModel).iqt = function (result) {
    var resultDest = this.yqn();
    if (!(resultDest == null)) {
      this.uqn().yq9(new NavResult(resultDest.wq9_1, systemTimeInMillis(), result));
      this.zqm_1.jq9(resultDest.vq9_1, false);
    } else {
      Companion_getInstance_116();
      this.zqm_1.jq9('', true);
    }
  };
  protoOf(UstadViewModel).eqo = 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.kqo(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.kqo(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.yqm_1;
      navArgs.s(key_1, value);
    }
    if (!(currentValue == null)) {
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_115();
      var value_0 = this.m4r().r45(serializer, currentValue);
      navArgs.s('entity', value_0);
    }
    this.zqm_1.iq9(nextViewName, toMap_0(navArgs), goOptions);
  };
  protoOf(UstadViewModel).fqo = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination, $super) {
    args = args === VOID ? emptyMap() : args;
    goOptions = goOptions === VOID ? Companion_getInstance_95().zq3_1 : goOptions;
    var tmp;
    if (overwriteDestination === VOID) {
      tmp = this instanceof UstadEditViewModel;
    } else {
      tmp = overwriteDestination;
    }
    overwriteDestination = tmp;
    var tmp_0;
    if ($super === VOID) {
      this.eqo(nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.eqo.call(this, nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
    }
    return tmp_0;
  };
  protoOf(UstadViewModel).gqo = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) {
    var tmp = new $loadEntityCOROUTINE$58(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).hqo = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion, $super) {
    var tmp;
    if (loadFromStateKeys === VOID) {
      Companion_getInstance_115();
      tmp = listOf(['entityState', 'entity']);
    } else {
      tmp = loadFromStateKeys;
    }
    loadFromStateKeys = tmp;
    savedStateKey = savedStateKey === VOID ? first_0(loadFromStateKeys) : savedStateKey;
    return $super === VOID ? this.gqo(serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) : $super.gqo.call(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
  };
  protoOf(UstadViewModel).iqo = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block) {
    if (setLoadingState) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.bqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.launchIfHasPermission.<anonymous>' call
          var nextValue = prevValue.jq6(VOID, Companion_getInstance_97().qq6_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (onSetFieldsEnabled == null)
      null;
    else
      onSetFieldsEnabled(false);
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, UstadViewModel$launchIfHasPermission$slambda_0(this, permissionCheck, block, onSetFieldsEnabled, null));
  };
  protoOf(UstadViewModel).jqo = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block, $super) {
    setLoadingState = setLoadingState === VOID ? false : setLoadingState;
    onSetFieldsEnabled = onSetFieldsEnabled === VOID ? null : onSetFieldsEnabled;
    var tmp;
    if ($super === VOID) {
      this.iqo(permissionCheck, setLoadingState, onSetFieldsEnabled, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.iqo.call(this, permissionCheck, setLoadingState, onSetFieldsEnabled, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).kqo = function (_this__u8e3s4, key) {
    putFromSavedStateIfPresent(_this__u8e3s4, this.xqm_1, key);
  };
  protoOf(UstadViewModel).lqo = 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.putAllFromSavedStateIfPresent.<anonymous>' call
      this.kqo(_this__u8e3s4, element);
    }
  };
  protoOf(UstadViewModel).kqu = function (onSetFieldsEnabled, block) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, UstadViewModel$launchWithLoadingIndicator$slambda_0(onSetFieldsEnabled, this, block, null));
  };
  protoOf(UstadViewModel).mqo = function (requireAdultAccount, args, block) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var apiUrlConfig$delegate = Instance(this, tmp$ret$0, null).a5d(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.nqn().ro9().lnu_1;
    if (isGuestUser(it) ? true : requireAdultAccount ? !isDateOfBirthAnAdult(Companion_getInstance_6().fmh(it.o96_1)) : false) {
      var tmp_0 = this.yqm_1 + '?' + toQueryString(args);
      var tmp_1 = this.nqn();
      var tmp_2 = UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda;
      navigateToLink(this.zqm_1, tmp_0, tmp_1, new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(tmp_2), new UstadGoOptions(this.yqm_1, true), VOID, ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(apiUrlConfig$delegate).xo5_1);
    } else {
      block();
    }
  };
  protoOf(UstadViewModel).nqo = function (requireAdultAccount, args, block, $super) {
    requireAdultAccount = requireAdultAccount === VOID ? false : requireAdultAccount;
    var tmp;
    if ($super === VOID) {
      this.mqo(requireAdultAccount, args, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.mqo.call(this, requireAdultAccount, args, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).oqo = function (contentEntryUid, clazzUid, cbUid) {
    var registrationUuid = uuid4();
    var activityId = this.nqn().ioa().tnt_1 + 'ns/xapi/contentEntry/' + contentEntryUid.toString();
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this.a57()).f58();
    // 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.d58(tmp$ret$0, null);
    var tmp_1 = get_doorPrimaryKeyManager(this.rqn());
    var tmp1_xseUid = tmp_1.n62(400122);
    var tmp2_xseAccountPersonUid = this.pqn();
    var tmp0_elvis_lhs = this.nqn().ro9().lnu_1.g96_1;
    var tmp3_xseAccountUsername = tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs;
    var tmp4_xseRootActivityUid = xxStringHasher.hm7(activityId);
    var tmp5_xseRegistrationHi = registrationUuid.vmd();
    var tmp6_xseRegistrationLo = registrationUuid.wmd();
    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).pqo = function (contentEntryUid, clazzUid, cbUid, $super) {
    contentEntryUid = contentEntryUid === VOID ? new Long(0, 0) : contentEntryUid;
    var tmp;
    if (clazzUid === VOID) {
      var tmp0_safe_receiver = this.xqm_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.xqm_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.oqo(contentEntryUid, clazzUid, cbUid) : $super.oqo.call(this, contentEntryUid, clazzUid, cbUid);
  };
  function accountManager$factory() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.nqn();
    }, null);
  }
  function activeDataLayer$factory() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.qqn();
    }, null);
  }
  function activeDb$factory() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.rqn();
    }, null);
  }
  function navResultReturner$factory() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.uqn();
    }, null);
  }
  function json$factory_1() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.m4r();
    }, null);
  }
  function snackDispatcher$factory() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.vqn();
    }, null);
  }
  function resultReturner$factory() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.wqn();
    }, null);
  }
  function systemImpl$factory() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.xqn();
    }, null);
  }
  function accountManager$factory_0() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.nqn();
    }, null);
  }
  function activeDataLayer$factory_0() {
    return getPropertyCallableRef('activeDataLayer', 1, KProperty1, function (receiver) {
      return receiver.qqn();
    }, null);
  }
  function activeDb$factory_0() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.rqn();
    }, null);
  }
  function navResultReturner$factory_0() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.uqn();
    }, null);
  }
  function json$factory_2() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.m4r();
    }, null);
  }
  function snackDispatcher$factory_0() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.vqn();
    }, null);
  }
  function resultReturner$factory_0() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.wqn();
    }, null);
  }
  function systemImpl$factory_0() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.xqn();
    }, null);
  }
  function Companion_109() {
    this.ar4_1 = 'OpenLicenses';
  }
  var Companion_instance_158;
  function Companion_getInstance_126() {
    return Companion_instance_158;
  }
  function OpenLicensesViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'EpubContent');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.about.OpenLicensesViewModel.<anonymous>' call
        var tmp0_title = this.xqn().joj(strings_getInstance().vnm_1);
        var nextValue = prevValue.jq6(VOID, VOID, tmp0_title, false, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda$lambda($credentialResult) {
    return function () {
      return 'Error occurred: ' + $credentialResult.br4_1;
    };
  }
  function _get_supportLangConfig__jc22wi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yr4_1;
    supportLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zr4_1;
    setLanguageUseCase$factory_0();
    return this_0.t2();
  }
  function _get_decodeUserHandleUseCase__wbsil7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ar5_1;
    decodeUserHandleUseCase$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.br5_1;
    apiUrlConfig$factory_2();
    return this_0.t2();
  }
  function _get_impl__d88w17($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cr5_1;
    impl$factory_0();
    return this_0.t2();
  }
  function _get_getCredentialUseCase__qofq9r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.er5_1;
    getCredentialUseCase$factory_0();
    return this_0.t2();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gr5_1;
    parseCredentialUsernameUseCase$factory_0();
    return this_0.t2();
  }
  function getCredentials($this) {
    var tmp = $this.oqn();
    launch(tmp, VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda_0($this, null));
  }
  function onLoginWithUsernameAndPasswordFromCredentialManager($this, credentialUsername, password) {
    var tmp = $this.oqn();
    launch(tmp, VOID, VOID, AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda_0($this, credentialUsername, password, null));
  }
  function goToNextDestAfterSignIn($this, person, serverUrl) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_0 = $this.a57();
    var context = new LearningSpace(serverUrl);
    var trigger = this_0.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.h57(tmp$ret$0, context);
    var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
    var tmp_1 = get_direct(tmp$ret$2).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var getDefaultDestinationUseCase = tmp_1.d58(tmp$ret$3, null);
    Companion_getInstance_116();
    var tmp0_elvis_lhs = $this.xqm_1.ba('next');
    var nextDestVal = tmp0_elvis_lhs == null ? getDefaultDestinationUseCase.qpe() : tmp0_elvis_lhs;
    var tmp_3 = Napier_getInstance();
    tmp_3.k5e(VOID, VOID, AddAccountSelectNewOrExistingViewModel$goToNextDestAfterSignIn$lambda(nextDestVal));
    $this.jqu($this.zqm_1, appendSelectedAccount(nextDestVal, person.f96_1, new LearningSpace(serverUrl)), new UstadGoOptions(VOID, VOID, true));
  }
  function Companion_110() {
    this.hr5_1 = 'AddAccountSelectNewOrExisting';
  }
  var Companion_instance_159;
  function Companion_getInstance_127() {
    return Companion_instance_159;
  }
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this$0, resultContinuation) {
    this.qr5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$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(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$getCredentials$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.id_1 = 5;
            this.sr5_1 = _get_getCredentialUseCase__qofq9r(this.qr5_1);
            if (this.sr5_1 == null) {
              this.tr5_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.sr5_1.jpb(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.tr5_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.ur5_1 = this.tr5_1;
            var tmp_0 = this.ur5_1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              var tmp_1 = this;
              var tmp1_elvis_lhs = this.ur5_1.fr6_1.upb_1.qpb_1;
              var tmp_2;
              if (tmp1_elvis_lhs == null) {
                throw IllegalStateException_init_$Create$('userHandle not found');
              } else {
                tmp_2 = tmp1_elvis_lhs;
              }
              tmp_1.vr5_1 = tmp_2;
              this.wr5_1 = _get_decodeUserHandleUseCase__wbsil7(this.qr5_1).np9(this.vr5_1);
              this.xr5_1 = this.wr5_1.y6();
              this.hd_1 = 3;
              suspendResult = this.qr5_1.nqn().qoa(this.ur5_1.fr6_1, this.xr5_1.tnt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_3 = this.ur5_1;
              if (tmp_3 instanceof PasswordCredentialResult) {
                onLoginWithUsernameAndPasswordFromCredentialManager(this.qr5_1, this.ur5_1.dr6_1, this.ur5_1.er6_1);
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4 = this.ur5_1;
                if (tmp_4 instanceof Error_1) {
                  var tmp_5 = Napier_getInstance();
                  tmp_5.s5e(VOID, VOID, AddAccountSelectNewOrExistingViewModel$getCredentials$slambda$lambda(this.ur5_1));
                  l$ret$1: do {
                    var this_0 = this.qr5_1.xr4_1;
                    while (true) {
                      var prevValue = this_0.t2();
                      var nextValue = prevValue.cr6(VOID, VOID, VOID, this.ur5_1.br4_1);
                      if (this_0.y1k(prevValue, nextValue)) {
                        break l$ret$1;
                      }
                    }
                  }
                   while (false);
                  this.hd_1 = 4;
                  continue $sm;
                } else {
                  var tmp_6 = this.ur5_1;
                  if (tmp_6 instanceof NoCredentialAvailableResult) {
                    this.hd_1 = 4;
                    continue $sm;
                  } else {
                    if (this.ur5_1 == null) {
                      this.hd_1 = 4;
                      continue $sm;
                    } else {
                      this.hd_1 = 4;
                      continue $sm;
                    }
                  }
                }
              }
            }

          case 3:
            var account = suspendResult;
            goToNextDestAfterSignIn(this.qr5_1, account.dkz(), this.xr5_1.tnt_1);
            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 Exception) {
              var e = this.kd_1;
              Napier_getInstance().q5e('AddAccountSelectNewOrExistingViewModel: getCredentials: Error occurred', e);
              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(AddAccountSelectNewOrExistingViewModel$getCredentials$slambda).v1m = function ($this$launch, completion) {
    var i = new AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this.qr5_1, completion);
    i.rr5_1 = $this$launch;
    return i;
  };
  function AddAccountSelectNewOrExistingViewModel$getCredentials$slambda_0(this$0, resultContinuation) {
    var i = new AddAccountSelectNewOrExistingViewModel$getCredentials$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this$0, $credentialUsername, $password, resultContinuation) {
    this.or6_1 = this$0;
    this.pr6_1 = $credentialUsername;
    this.qr6_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$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(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$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.sr6_1 = null;
            this.tr6_1 = _get_parseCredentialUsernameUseCase__8m48wk(this.or6_1).np9(this.pr6_1);
            this.ur6_1 = this.tr6_1.y6();
            this.vr6_1 = this.tr6_1.z6();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            var tmp_0 = this.or6_1.nqn();
            var this_0 = this.vr6_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.qr6_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            Companion_getInstance_116();
            var tmp1_safe_receiver = this.or6_1.xqm_1.ba('maxDob');
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toLong_0(tmp1_safe_receiver);
            suspendResult = tmp_0.roa(tmp_1, tmp_2, this.ur6_1.tnt_1, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.or6_1.dr5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var account = suspendResult;
            var tmp_3 = this;
            goToNextDestAfterSignIn(this.or6_1, account.dkz(), this.ur6_1.tnt_1);
            tmp_3.wr6_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof AdultAccountRequiredException) {
              var e = this.kd_1;
              var tmp_5 = this;
              this.sr6_1 = _get_impl__d88w17(this.or6_1).joj(strings_getInstance().inf_1);
              tmp_5.wr6_1 = Unit_instance;
              this.id_1 = 5;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_6 = this.kd_1;
              if (tmp_6 instanceof UnauthorizedException) {
                var e_0 = this.kd_1;
                var tmp_7 = this;
                this.sr6_1 = _get_impl__d88w17(this.or6_1).joj(strings_getInstance().zmi_1);
                tmp_7.wr6_1 = Unit_instance;
                this.id_1 = 5;
                this.hd_1 = 6;
                continue $sm;
              } else {
                var tmp_8 = this.kd_1;
                if (tmp_8 instanceof ConsentNotGrantedException) {
                  var e_1 = this.kd_1;
                  var tmp_9 = this;
                  this.sr6_1 = _get_impl__d88w17(this.or6_1).joj(strings_getInstance().hnf_1);
                  tmp_9.wr6_1 = Unit_instance;
                  this.id_1 = 5;
                  this.hd_1 = 6;
                  continue $sm;
                } else {
                  var tmp_10 = this.kd_1;
                  if (tmp_10 instanceof Exception) {
                    var e_2 = this.kd_1;
                    var tmp_11 = this;
                    this.sr6_1 = _get_impl__d88w17(this.or6_1).joj(strings_getInstance().amj_1);
                    tmp_11.wr6_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.or6_1.zqn(Companion_getInstance_97().rq6_1);
            if (!(this.sr6_1 == null)) {
              this.or6_1.vqn().yq6(new Snack(toString(this.sr6_1)));
            }

            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            this.or6_1.zqn(Companion_getInstance_97().rq6_1);
            if (!(this.sr6_1 == null)) {
              this.or6_1.vqn().yq6(new Snack(toString(this.sr6_1)));
            }

            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(AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda).v1m = function ($this$launch, completion) {
    var i = new AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this.or6_1, this.pr6_1, this.qr6_1, completion);
    i.rr6_1 = $this$launch;
    return i;
  };
  function AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda_0(this$0, $credentialUsername, $password, resultContinuation) {
    var i = new AddAccountSelectNewOrExistingViewModel$onLoginWithUsernameAndPasswordFromCredentialManager$slambda(this$0, $credentialUsername, $password, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddAccountSelectNewOrExistingViewModel$goToNextDestAfterSignIn$lambda($nextDestVal) {
    return function () {
      return 'AddAccountSelectNewOrExistingViewModel: go to next destination: ' + $nextDestVal;
    };
  }
  function AddAccountSelectNewOrExistingViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'AddAccountSelectNewOrExisting');
    this.xr4_1 = MutableStateFlow(new AddAccountSelectNewOrExistingUiState());
    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.yr4_1 = Instance(this, tmp$ret$0, null).a5d(this, supportLangConfig$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.zr4_1 = Instance(this, tmp$ret$2, null).a5d(this, setLanguageUseCase$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(DecodeUserHandleUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.ar5_1 = Instance(this, tmp$ret$4, null).a5d(this, decodeUserHandleUseCase$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.br5_1 = Instance(this, tmp$ret$6, null).a5d(this, apiUrlConfig$factory_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(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.cr5_1 = Instance(this, tmp$ret$8, null).a5d(this, impl$factory());
    var tmp_9 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_9.dr5_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(GetCredentialUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.er5_1 = InstanceOrNull(this, tmp$ret$10, null).a5d(this, getCredentialUseCase$factory());
    this.fr5_1 = asStateFlow(this.xr4_1);
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.gr5_1 = Instance(this, tmp$ret$12, null).a5d(this, parseCredentialUsernameUseCase$factory());
    this.bqn_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, false, VOID, VOID, VOID, true));
    var allLanguages = _get_supportLangConfig__jc22wi(this).xq7(this.xqn());
    var currentLanguage = _get_supportLangConfig__jc22wi(this).wq7(this.xqn());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.xr4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.<anonymous>' call
        var nextValue = new AddAccountSelectNewOrExistingUiState(currentLanguage, allLanguages);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    getCredentials(this);
  }
  protoOf(AddAccountSelectNewOrExistingViewModel).xr6 = function () {
    this.yr6(true);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).zr6 = function () {
    this.yr6(false);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).yr6 = function (isNewUser) {
    var tmp;
    if (isNewUser) {
      Companion_getInstance_213();
      tmp = 'new';
    } else {
      Companion_getInstance_213();
      tmp = 'existing';
    }
    var userType = tmp;
    // 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.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.navigateUser.<anonymous>' call
    this.lqo(this_0, Companion_getInstance_213().hr7_1);
    Companion_getInstance_125();
    this.kqo(this_0, 'next');
    Companion_getInstance_213();
    this_0.s('newOrExisting', userType);
    var tmp0_safe_receiver = _get_apiUrlConfig__mldllg_0(this).vo5_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      Companion_getInstance_116();
      this_0.s('learningSpaceUrl', tmp0_safe_receiver);
    }
    var args = this_0.f3();
    var tmp_0;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    var this_1 = _get_apiUrlConfig__mldllg_0(this).vo5_1;
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_1 == null ? true : charSequenceLength(this_1) === 0)) {
      var tmp_1;
      if (isNewUser) {
        tmp_1 = 'RegisterAgeRedirect';
      } else {
        tmp_1 = 'Login';
      }
      tmp_0 = tmp_1;
    } else {
      // Inline function 'kotlin.text.isNullOrEmpty' call
      var this_2 = _get_apiUrlConfig__mldllg_0(this).wo5_1;
      // Inline function 'kotlin.contracts.contract' call
      if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
        tmp_0 = 'LearningSpaceList';
      } else {
        tmp_0 = 'AddAccountSelectUserType';
      }
    }
    var destination = tmp_0;
    this.zqm_1.kp6(destination, args);
  };
  protoOf(AddAccountSelectNewOrExistingViewModel).jr7 = function (uiLanguage) {
    if (!uiLanguage.equals(this.xr4_1.t2().yr5_1)) {
      var result = _get_setLanguageUseCase__st7nci(this).gpi(uiLanguage, 'AddAccountSelectNewOrExisting', this.zqm_1);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.xr4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectneworexisting.AddAccountSelectNewOrExistingViewModel.onLanguageSelected.<anonymous>' call
          var nextValue = prevValue.cr6(uiLanguage, VOID, result.epi_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  function AddAccountSelectNewOrExistingUiState(currentLanguage, languageList, showWaitForRestart, errorText) {
    currentLanguage = currentLanguage === VOID ? new UiLanguage('en', 'English') : currentLanguage;
    languageList = languageList === VOID ? listOf_0(currentLanguage) : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? false : showWaitForRestart;
    errorText = errorText === VOID ? null : errorText;
    this.yr5_1 = currentLanguage;
    this.zr5_1 = languageList;
    this.ar6_1 = showWaitForRestart;
    this.br6_1 = errorText;
  }
  protoOf(AddAccountSelectNewOrExistingUiState).kr7 = function (currentLanguage, languageList, showWaitForRestart, errorText) {
    return new AddAccountSelectNewOrExistingUiState(currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).cr6 = function (currentLanguage, languageList, showWaitForRestart, errorText, $super) {
    currentLanguage = currentLanguage === VOID ? this.yr5_1 : currentLanguage;
    languageList = languageList === VOID ? this.zr5_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.ar6_1 : showWaitForRestart;
    errorText = errorText === VOID ? this.br6_1 : errorText;
    return $super === VOID ? this.kr7(currentLanguage, languageList, showWaitForRestart, errorText) : $super.kr7.call(this, currentLanguage, languageList, showWaitForRestart, errorText);
  };
  protoOf(AddAccountSelectNewOrExistingUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUiState(currentLanguage=' + this.yr5_1 + ', languageList=' + this.zr5_1 + ', showWaitForRestart=' + this.ar6_1 + ', errorText=' + this.br6_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUiState).hashCode = function () {
    var result = this.yr5_1.hashCode();
    result = imul(result, 31) + hashCode(this.zr5_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ar6_1) | 0;
    result = imul(result, 31) + (this.br6_1 == null ? 0 : getStringHashCode(this.br6_1)) | 0;
    return result;
  };
  protoOf(AddAccountSelectNewOrExistingUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddAccountSelectNewOrExistingUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddAccountSelectNewOrExistingUiState ? other : THROW_CCE();
    if (!this.yr5_1.equals(tmp0_other_with_cast.yr5_1))
      return false;
    if (!equals(this.zr5_1, tmp0_other_with_cast.zr5_1))
      return false;
    if (!(this.ar6_1 === tmp0_other_with_cast.ar6_1))
      return false;
    if (!(this.br6_1 == tmp0_other_with_cast.br6_1))
      return false;
    return true;
  };
  function supportLangConfig$factory() {
    return getPropertyCallableRef('supportLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportLangConfig__jc22wi(receiver);
    }, null);
  }
  function setLanguageUseCase$factory() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function decodeUserHandleUseCase$factory() {
    return getPropertyCallableRef('decodeUserHandleUseCase', 1, KProperty1, function (receiver) {
      return _get_decodeUserHandleUseCase__wbsil7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_1() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function impl$factory() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function getCredentialUseCase$factory() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk(receiver);
    }, null);
  }
  function supportLangConfig$factory_0() {
    return getPropertyCallableRef('supportLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportLangConfig__jc22wi(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_0() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function decodeUserHandleUseCase$factory_0() {
    return getPropertyCallableRef('decodeUserHandleUseCase', 1, KProperty1, function (receiver) {
      return _get_decodeUserHandleUseCase__wbsil7(receiver);
    }, null);
  }
  function apiUrlConfig$factory_2() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function impl$factory_0() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function getCredentialUseCase$factory_0() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_0() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk(receiver);
    }, null);
  }
  function _get_apiUrlConfig__mldllg_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gr8_1;
    apiUrlConfig$factory_4();
    return this_0.t2();
  }
  function Companion_111() {
    this.kr8_1 = 'AddAccountSelectUserType';
  }
  var Companion_instance_160;
  function Companion_getInstance_128() {
    return Companion_instance_160;
  }
  function AddAccountSelectNewOrExistingUserTypeViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'AddAccountSelectUserType');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.gr8_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_3());
    this.hr8_1 = MutableStateFlow(new AddAccountSelectNewOrExistingUserTypeUiState());
    var tmp_1 = this;
    Companion_getInstance_213();
    var tmp_2 = savedStateHandle.ba('newOrExisting');
    Companion_getInstance_213();
    tmp_1.ir8_1 = tmp_2 === 'new';
    this.jr8_1 = _get_apiUrlConfig__mldllg_1(this).wo5_1;
    var tmp_3;
    if (this.ir8_1) {
      tmp_3 = this.xqn().joj(strings_getInstance().dnq_1);
    } else {
      tmp_3 = this.xqn().joj(strings_getInstance().enq_1);
    }
    var tmp0_title = tmp_3;
    this.bqn_1.x1k(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false, VOID, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.hr8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.<anonymous>' call
        var nextValue = prevValue.p6s(!(this.jr8_1 == null));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).mr8 = function () {
    return asStateFlow(this.hr8_1);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).nr8 = function () {
    var tmp;
    Companion_getInstance_213();
    var tmp_0 = this.xqm_1.ba('newOrExisting');
    Companion_getInstance_213();
    if (tmp_0 === 'new') {
      tmp = 'RegisterAgeRedirect';
    } else {
      tmp = 'Login';
    }
    var tmp_1 = tmp;
    // 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.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.onClickPersonalAccount.<anonymous>' call
    this.lqo(this_0, Companion_getInstance_213().hr7_1);
    Companion_getInstance_213();
    this_0.s('personalAccount', 'true');
    Companion_getInstance_116();
    var tmp0_elvis_lhs = this.jr8_1;
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$('Personal account button should not have been there...');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    this_0.s('learningSpaceUrl', tmp_2);
    var tmp$ret$2 = this_0.f3();
    this.zqm_1.kp6(tmp_1, tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).or8 = 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.account.addaccountselectusertype.AddAccountSelectNewOrExistingUserTypeViewModel.onClickJoinLearningSpace.<anonymous>' call
    this.lqo(this_0, Companion_getInstance_213().hr7_1);
    var tmp$ret$2 = this_0.f3();
    this.zqm_1.kp6('LearningSpaceList', tmp$ret$2);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeViewModel).pr8 = function () {
  };
  function AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount) {
    showAddPersonalAccount = showAddPersonalAccount === VOID ? false : showAddPersonalAccount;
    this.lr8_1 = showAddPersonalAccount;
  }
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).p6s = function (showAddPersonalAccount) {
    return new AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).toString = function () {
    return 'AddAccountSelectNewOrExistingUserTypeUiState(showAddPersonalAccount=' + this.lr8_1 + ')';
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).hashCode = function () {
    return getBooleanHashCode(this.lr8_1);
  };
  protoOf(AddAccountSelectNewOrExistingUserTypeUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddAccountSelectNewOrExistingUserTypeUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddAccountSelectNewOrExistingUserTypeUiState ? other : THROW_CCE();
    if (!(this.lr8_1 === tmp0_other_with_cast.lr8_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_3() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function apiUrlConfig$factory_4() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function AccountListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.yr8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda).xnx = function (it, $completion) {
    var tmp = this.ynx(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.xnx(p1 instanceof UserSessionWithPersonAndLearningSpace ? 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.yr8_1.bra_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.pra(this.zr8_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).ynx = function (it, completion) {
    var i = new AccountListViewModel$slambda$slambda(this.yr8_1, completion);
    i.zr8_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.xnx(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yra_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda$slambda).arb = function (accountList, $completion) {
    var tmp = this.brb(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.arb((!(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.yra_1.nqn().ro9().knu_1.rij_1;
          var this_0 = this.zra_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var isFilteredOutActiveAccount = this.yra_1.xr9_1 === 'header' ? element.knu_1.rij_1.equals(currentUserSessionUid) : false;
            var isFilteredOutByEndpoint = !(this.yra_1.wr9_1 == null) ? !(element.mnu_1.tnt_1 === this.yra_1.wr9_1) : false;
            var isFilteredOutByDateOfBirth = this.yra_1.yr9_1.c7(new Long(0, 0)) > 0 ? element.lnu_1.o96_1.c7(this.yra_1.yr9_1) > 0 : false;
            if (!(((isFilteredOutActiveAccount ? true : isFilteredOutByEndpoint) ? true : isFilteredOutByDateOfBirth) ? true : isTemporary(element.knu_1))) {
              destination.i1(element);
            }
          }
          var accountsToDisplay = destination;
          l$ret$1: do {
            var this_1 = this.yra_1.bra_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.pra(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).brb = function (accountList, completion) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this.yra_1, completion);
    i.zra_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.arb(accountList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.krb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($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.krb_1.nqn().hoa();
            var tmp_1 = AccountListViewModel$slambda$slambda$slambda_0(this.krb_1, null);
            suspendResult = tmp_0.a1c(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).l78 = function (completion) {
    return new AccountListViewModel$slambda$slambda_1(this.krb_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function AccountListViewModel$onClickLogout$slambda$lambda_0(this$0) {
    return function (it) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var this_0 = this$0.a57();
      var trigger = this_0.d57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
      var tmp$ret$1 = tmp.h57(tmp$ret$0, it);
      var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
      var tmp_1 = get_direct(tmp$ret$2).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_2 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
      return tmp_1.d58(tmp$ret$3, null);
    };
  }
  function _get_apiUrlConfig__mldllg_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zr9_1;
    apiUrlConfig$factory_6();
    return this_0.t2();
  }
  function _get_shareAppUseCase__louoas($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ara_1;
    shareAppUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dra_1;
    getVersionUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchOpenLicensesUseCase__f5qz1z($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.era_1;
    launchOpenLicensesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fra_1;
    getShowPoweredByUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_112() {
    this.lrb_1 = 'AccountList';
    this.mrb_1 = 'filterByLearningSpace';
    this.nrb_1 = 'activeAccountMode';
    this.orb_1 = 'header';
    this.prb_1 = 'inlist';
  }
  var Companion_instance_161;
  function Companion_getInstance_129() {
    return Companion_instance_161;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_5(function_0) {
    this.qrb_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_5).t1d = function (value, $completion) {
    return this.qrb_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(function_0) {
    this.rrb_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0).spi = function (url, target) {
    return this.rrb_1(url, target);
  };
  function AccountListViewModel$slambda(this$0, resultContinuation) {
    this.arc_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.arc_1.nqn().foa();
            var tmp_1 = AccountListViewModel$slambda$slambda_0(this.arc_1, null);
            suspendResult = tmp_0.a1c(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.arc_1, completion);
    i.brc_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.krc_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.krc_1.bra_1, AccountListViewModel$slambda$slambda_2(this.krc_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.krc_1, completion);
    i.lrc_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.urc_1 = this$0;
    this.vrc_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.urc_1.nqn().poa(this.vrc_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_$receiver = this.urc_1.zqm_1;
            Companion_getInstance_140();
            var tmp1_link = 'CourseListHome';
            var tmp2_accountManager = this.urc_1.nqn();
            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_2(this.urc_1).xo5_1;
            var tmp5_goOptions = new UstadGoOptions(VOID, VOID, true);
            var tmp6_presetLearningSpaceUrl = _get_apiUrlConfig__mldllg_2(this.urc_1).vo5_1;
            navigateToLink(tmp0_$receiver, tmp1_link, tmp2_accountManager, tmp3_openExternalLinkUseCase, tmp5_goOptions, VOID, tmp4_userCanSelectServer, VOID, VOID, VOID, VOID, tmp6_presetLearningSpaceUrl, AccountListViewModel$onClickLogout$slambda$lambda_0(this.urc_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$onClickLogout$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickLogout$slambda(this.urc_1, this.vrc_1, completion);
    i.wrc_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$onClickAddAccount$slambda(this$0, $args, resultContinuation) {
    this.frd_1 = this$0;
    this.grd_1 = $args;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickAddAccount$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$onClickAddAccount$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickAddAccount$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.frd_1.gra_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.frd_1.gra_1.v7e().lhn(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.ird_1 = false;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var tmp0_safe_receiver = suspendResult;
            var ARGUMENT = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xhn_1;
            this.ird_1 = ARGUMENT === false;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.ird_1) {
              var this_0 = LinkedHashMap_init_$Create$();
              this.frd_1.lqo(this_0, Companion_getInstance_213().hr7_1);
              Companion_getInstance_213();
              this_0.s('newOrExisting', 'existing');
              Companion_getInstance_116();
              this_0.s('learningSpaceUrl', toString_0(_get_apiUrlConfig__mldllg_2(this.frd_1).vo5_1));
              var arg = this_0.f3();
              this.frd_1.zqm_1.kp6('Login', arg);
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.frd_1.zqm_1.kp6('AddAccountSelectNewOrExisting', this.grd_1);
              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(AccountListViewModel$onClickAddAccount$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickAddAccount$slambda(this.frd_1, this.grd_1, completion);
    i.hrd_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickAddAccount$slambda_0(this$0, $args, resultContinuation) {
    var i = new AccountListViewModel$onClickAddAccount$slambda(this$0, $args, 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.rrd_1 = this$0;
    this.srd_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.rrd_1.nqn().poa(this.srd_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.rrd_1, this.srd_1, completion);
    i.trd_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.cre_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.cre_1.j87(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.cre_1, completion);
    i.dre_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).f58();
      // 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.d58(tmp$ret$0, null);
      tmp = new StartUserSessionUseCase(tmp$ret$1);
    } else {
      tmp = startUserSessionUseCase;
    }
    startUserSessionUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'AccountList');
    this.vr9_1 = startUserSessionUseCase;
    this.wr9_1 = savedStateHandle.ba('filterByLearningSpace');
    var tmp_2 = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('activeAccountMode');
    tmp_2.xr9_1 = tmp0_elvis_lhs == null ? 'header' : tmp0_elvis_lhs;
    var tmp_3 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('maxDob');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.yr9_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(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.zr9_1 = Instance(this, tmp$ret$2, null).a5d(this, apiUrlConfig$factory_5());
    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.ara_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, shareAppUseCase$factory());
    this.bra_1 = MutableStateFlow(new AccountListUiState(VOID, VOID, _get_apiUrlConfig__mldllg_2(this).xo5_1, VOID, VOID, !(_get_shareAppUseCase__louoas(this) == null)));
    this.cra_1 = asStateFlow(this.bra_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.dra_1 = InstanceOrNull(this, tmp$ret$6, null).a5d(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.era_1 = InstanceOrNull(this, tmp$ret$8, null).a5d(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.fra_1 = InstanceOrNull(this, tmp$ret$10, null).a5d(this, getShowPoweredByUseCase$factory());
    var tmp_14 = this;
    var tmp0_safe_receiver_0 = _get_apiUrlConfig__mldllg_2(this).vo5_1;
    var tmp_15;
    if (tmp0_safe_receiver_0 == null) {
      tmp_15 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.presetRepo.<anonymous>' call
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var context = new LearningSpace(tmp0_safe_receiver_0);
      var trigger = di.d57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp_16 = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_17 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
      var tmp$ret$13 = tmp_16.h57(tmp$ret$12, context);
      var tmp$ret$14 = On(di, tmp$ret$13, trigger);
      var tmp_18 = get_direct(tmp$ret$14).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
      var tmp$ret$15 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      tmp_15 = tmp_18.d58(tmp$ret$15, null).tk2_1;
    }
    tmp_14.gra_1 = tmp_15;
    var tmp_20 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toBoolean(tmp0_safe_receiver_1);
    tmp_20.hra_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_21;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().wqj_1) {
      tmp_21 = this.xqn().joj(strings_getInstance().tna_1);
    } else {
      tmp_21 = this.xqn().joj(strings_getInstance().xml_1);
    }
    var tmp0_title = tmp_21;
    this.bqn_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.bra_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.<anonymous>' call
        var tmp0_safe_receiver_2 = _get_getVersionUseCase__n7x57g(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.qpe();
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ope_1;
        var tmp_22 = 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.qpe();
        var nextValue = prevValue.pra(VOID, VOID, VOID, tmp_22, 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.oqn();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_23;
    // Inline function 'com.ustadmobile.core.viewmodel.account.list.AccountListViewModel.<anonymous>' call
    if (this.xr9_1 === 'header') {
      tmp_23 = this_1;
    } else {
      tmp_23 = null;
    }
    var tmp1_safe_receiver_0 = tmp_23;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      launch(tmp1_safe_receiver_0, VOID, VOID, AccountListViewModel$slambda_0(this, null));
    }
    var tmp_24 = this.oqn();
    launch(tmp_24, VOID, VOID, AccountListViewModel$slambda_2(this, null));
  }
  protoOf(AccountListViewModel).ere = function () {
    var tmp0_elvis_lhs = this.bra_1.t2().ira_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSession = tmp;
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, AccountListViewModel$onClickLogout$slambda_0(this, currentSession, null));
  };
  protoOf(AccountListViewModel).fre = function () {
    var tmp0_safe_receiver = this.bra_1.t2().ira_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lnu_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f96_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var personUid = tmp;
    Companion_getInstance_125();
    this.zqm_1.kp6('PersonDetailView', mapOf_0(to('entityUid', personUid.toString())));
  };
  protoOf(AccountListViewModel).gre = 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.account.list.AccountListViewModel.onClickAddAccount.<anonymous>' call
    if (!(this.wr9_1 == null)) {
      Companion_getInstance_125();
      this_0.s('serverUrl', this.wr9_1);
    }
    Companion_getInstance_125();
    Companion_getInstance_125();
    this.lqo(this_0, listOf(['next', 'noSessionChange']));
    Companion_getInstance_125();
    Companion_getInstance_125();
    var tmp0_elvis_lhs = this.xqm_1.ba('maxDob');
    this_0.s('maxDob', tmp0_elvis_lhs == null ? '0' : tmp0_elvis_lhs);
    var args = this_0.f3();
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickAddAccount$slambda_0(this, args, null));
  };
  protoOf(AccountListViewModel).hre = function (sessionWithPersonAndLearningSpace) {
    var tmp;
    if (sessionWithPersonAndLearningSpace.lnu_1.n96_1) {
      Companion_getInstance_169();
      tmp = 'ContentEntryListHome';
    } else {
      Companion_getInstance_140();
      tmp = 'CourseListHome';
    }
    var viewName = tmp;
    var tmp1_$this = this.vr9_1;
    var tmp2_navController = this.zqm_1;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = this.xqm_1.ba('next');
    var tmp3_nextDest = tmp0_elvis_lhs == null ? viewName : tmp0_elvis_lhs;
    var tmp4_dontSetCurrentSession = this.hra_1;
    tmp1_$this.kpo(sessionWithPersonAndLearningSpace, tmp3_nextDest, tmp2_navController, VOID, tmp4_dontSetCurrentSession);
  };
  protoOf(AccountListViewModel).ire = function (session) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickDeleteAccount$slambda_0(this, session, null));
  };
  protoOf(AccountListViewModel).jre = function () {
    var launchUseCaseVal = _get_launchOpenLicensesUseCase__f5qz1z(this);
    if (!(launchUseCaseVal == null)) {
      var tmp = this.oqn();
      launch(tmp, VOID, VOID, AccountListViewModel$onClickOpenLicenses$slambda_0(launchUseCaseVal, null));
    } else {
      this.zqm_1.kp6('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.ira_1 = headerAccount;
    this.jra_1 = accountsList;
    this.kra_1 = showAccountEndpoint;
    this.lra_1 = version;
    this.mra_1 = showPoweredBy;
    this.nra_1 = shareAppOptionVisible;
    this.ora_1 = shareAppBottomSheetVisible;
  }
  protoOf(AccountListUiState).kre = function () {
    return !(this.ira_1 == null) ? !this.ira_1.lnu_1.f96_1.equals(new Long(0, 0)) : false;
  };
  protoOf(AccountListUiState).lre = function () {
    return !(this.ira_1 == null) ? !isGuestUser(this.ira_1.lnu_1) : false;
  };
  protoOf(AccountListUiState).mre = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    return new AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).pra = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible, $super) {
    headerAccount = headerAccount === VOID ? this.ira_1 : headerAccount;
    accountsList = accountsList === VOID ? this.jra_1 : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? this.kra_1 : showAccountEndpoint;
    version = version === VOID ? this.lra_1 : version;
    showPoweredBy = showPoweredBy === VOID ? this.mra_1 : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? this.nra_1 : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? this.ora_1 : shareAppBottomSheetVisible;
    return $super === VOID ? this.mre(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) : $super.mre.call(this, headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).toString = function () {
    return 'AccountListUiState(headerAccount=' + this.ira_1 + ', accountsList=' + this.jra_1 + ', showAccountEndpoint=' + this.kra_1 + ', version=' + this.lra_1 + ', showPoweredBy=' + this.mra_1 + ', shareAppOptionVisible=' + this.nra_1 + ', shareAppBottomSheetVisible=' + this.ora_1 + ')';
  };
  protoOf(AccountListUiState).hashCode = function () {
    var result = this.ira_1 == null ? 0 : this.ira_1.hashCode();
    result = imul(result, 31) + hashCode(this.jra_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kra_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.lra_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mra_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nra_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ora_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.ira_1, tmp0_other_with_cast.ira_1))
      return false;
    if (!equals(this.jra_1, tmp0_other_with_cast.jra_1))
      return false;
    if (!(this.kra_1 === tmp0_other_with_cast.kra_1))
      return false;
    if (!(this.lra_1 === tmp0_other_with_cast.lra_1))
      return false;
    if (!(this.mra_1 === tmp0_other_with_cast.mra_1))
      return false;
    if (!(this.nra_1 === tmp0_other_with_cast.nra_1))
      return false;
    if (!(this.ora_1 === tmp0_other_with_cast.ora_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_5() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(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_6() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(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 launchSetTitleFromClazzUid(_this__u8e3s4, clazzUid, updateUi) {
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(_this__u8e3s4.a57());
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var dataLayer$delegate = Instance(this_0, tmp$ret$0, null).a5d(null, getLocalDelegateReference('dataLayer', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.takeIf' call
    var this_1 = _this__u8e3s4.oqn();
    // 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, dataLayer$delegate, updateUi, null));
    }
  }
  function launchSetTitleFromClazzUid$lambda($dataLayer$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('dataLayer', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $dataLayer$delegate.t2();
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_6(function_0) {
    this.nre_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_6).t1d = function (value, $completion) {
    return this.nre_1(value, $completion);
  };
  function launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation) {
    this.wre_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).yre = function (it, $completion) {
    var tmp = this.zre(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).he = function (p1, $completion) {
    return this.yre((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.wre_1(this.xre_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).zre = function (it, completion) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda(this.wre_1, completion);
    i.xre_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.yre(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function launchSetTitleFromClazzUid$slambda($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation) {
    this.irf_1 = $clazzUid;
    this.jrf_1 = $dataLayer$delegate;
    this.krf_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.jrf_1).wk2().o7d().z8c(this.irf_1);
            var tmp_1 = launchSetTitleFromClazzUid$slambda$slambda_0(this.krf_1, null);
            suspendResult = tmp_0.a1c(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.irf_1, this.jrf_1, this.krf_1, completion);
    i.lrf_1 = $this$launch;
    return i;
  };
  function launchSetTitleFromClazzUid$slambda_0($clazzUid, $dataLayer$delegate, $updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda($clazzUid, $dataLayer$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.kq8_1;
    if (!equals(tmp, terminology == null ? null : terminology.p8g_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.o7d().z8c(clazzUid);
    var tmp_0 = collectClazzNameAndUpdateTitle$slambda_0(appUiState, null);
    return tmp.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_7(tmp_0), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_7(function_0) {
    this.mrf_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_7).t1d = function (value, $completion) {
    return this.mrf_1(value, $completion);
  };
  function collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation) {
    this.vrf_1 = $appUiState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectClazzNameAndUpdateTitle$slambda).yre = function (clazzTitle, $completion) {
    var tmp = this.zre(clazzTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).he = function (p1, $completion) {
    return this.yre((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.vrf_1;
          var tmp_0;
          if (!(this.vrf_1.t2().wq5_1 == this.wrf_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.jq6(VOID, VOID, this.wrf_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).zre = function (clazzTitle, completion) {
    var i = new collectClazzNameAndUpdateTitle$slambda(this.vrf_1, completion);
    i.wrf_1 = clazzTitle;
    return i;
  };
  function collectClazzNameAndUpdateTitle$slambda_0($appUiState, resultContinuation) {
    var i = new collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation);
    var l = function (clazzTitle, $completion) {
      return i.yre(clazzTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function get_blockTypeStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.u7x_1;
    var tmp;
    if (tmp0_subject === 102) {
      tmp = strings_getInstance().vn2_1;
    } else {
      if (tmp0_subject === 104) {
        tmp = strings_getInstance().in4_1;
      } else {
        if (tmp0_subject === 100) {
          tmp = strings_getInstance().lnh_1;
        } else {
          if (tmp0_subject === 103) {
            tmp = strings_getInstance().vn3_1;
          } else {
            if (tmp0_subject === 105) {
              tmp = strings_getInstance().qnh_1;
            } else {
              tmp = strings_getInstance().hmi_1;
            }
          }
        }
      }
    }
    return tmp;
  }
  function CoursePermissionConstants() {
    CoursePermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().onn_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1, 0));
    var tmp_2 = strings_getInstance().unn_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().lnj_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(2, 0));
    var tmp_6 = strings_getInstance().pnn_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(4, 0));
    var tmp_8 = strings_getInstance().qnn_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(8, 0));
    var tmp_10 = strings_getInstance().rnn_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(16, 0));
    var tmp_12 = strings_getInstance().gn2_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(32, 0));
    var tmp_14 = strings_getInstance().in2_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(64, 0));
    var tmp_16 = strings_getInstance().snn_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(128, 0));
    var tmp_18 = strings_getInstance().tnn_1;
    PermissionFlags_getInstance();
    tmp.xrf_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$60(_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.cdl_1;
    var tmp;
    if (tmp0_subject === 1000) {
      tmp = strings_getInstance().sml_1;
    } else {
      if (tmp0_subject === 1001) {
        tmp = strings_getInstance().xmy_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function getTitleForCoursePermission$slambda($entity, resultContinuation) {
    this.trg_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda).vrg = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda).he = function (p1, $completion) {
    return this.vrg(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.urg_1.q7d().ge7(this.trg_1.bdl_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).vny = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda(this.trg_1, completion);
    i.urg_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_0($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.vrg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function getTitleForCoursePermission$slambda_1($entity, resultContinuation) {
    this.erh_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda_1).grh = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda_1).he = function (p1, $completion) {
    return this.grh(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.frh_1.n7d();
            var tmp0_safe_receiver = this.erh_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ddl_1;
            suspendResult = tmp_0.mg4(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).vny = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda_1(this.erh_1, completion);
    i.frh_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.grh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $getTitleForCoursePermissionCOROUTINE$60(_this__u8e3s4, entity, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.grg_1 = _this__u8e3s4;
    this.hrg_1 = entity;
  }
  protoOf($getTitleForCoursePermissionCOROUTINE$60).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.grg_1.a57()).f58();
            var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
            tmp_0.irg_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            var tmp0_safe_receiver = this.hrg_1;
            tmp_3.jrg_1 = tmp0_safe_receiver == null ? null : titleStringResource(tmp0_safe_receiver);
            if (!(this.jrg_1 == null)) {
              this.hd_1 = 2;
              var tmp_4 = this.grg_1.tqn();
              suspendResult = localFirstThenRepoIfNull(tmp_4, getTitleForCoursePermission$slambda_0(this.hrg_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_5 = this.grg_1.tqn();
              suspendResult = localFirstThenRepoIfNull(tmp_5, getTitleForCoursePermission$slambda_2(this.hrg_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp5_elvis_lhs = suspendResult;
            this.krg_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.irg_1, this.grg_1.xqn());
            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.nq8_1.equals(this.jrg_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.oq8_1;
            tmp_6.krg_1 = tmp4_elvis_lhs == null ? this.grg_1.xqn().joj(this.jrg_1) : tmp4_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.krg_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.prh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).rrh = function (it, $completion) {
    var tmp = this.srh(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.rrh((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.qrh_1;
          var clazz = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z8j_1;
          var tmp_0;
          if (clazz == null) {
            tmp_0 = emptyList();
          } else {
            var tmp_1;
            var tmp_2 = clazz.b8e_1;
            Companion_getInstance_4();
            if (hasFlag_0(tmp_2, new Long(1, 0))) {
              tmp_1 = this.qrh_1.a8k_1;
            } else {
              tmp_1 = false;
            }
            tmp_0 = createTabList(this.prh_1, tmp_1, this.qrh_1.b8k_1, this.qrh_1.c8k_1);
          }
          var tabList = tmp_0;
          l$ret$1: do {
            var this_0 = this.prh_1.pri_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sri(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).srh = function (it, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this.prh_1, completion);
    i.qrh_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.rrh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.brj_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.brj_1.rqn().o7d().x8c(this.brj_1.pqn(), this.brj_1.rqm_1);
            var tmp_1 = ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this.brj_1, null);
            suspendResult = tmp_0.a1c(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.brj_1, completion);
    i.crj_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.lrj_1 = $this_launch;
    this.mrj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.lrj_1, VOID, VOID, ClazzDetailViewModel$slambda$slambda$slambda_0(this.mrj_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).l78 = function (completion) {
    return new ClazzDetailViewModel$slambda$slambda(this.lrj_1, this.mrj_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function createTabList($this, showAttendance, showMembers, showProgressReport) {
    Companion_getInstance_116();
    var tabs = mutableListOf([new TabItem('CourseDetailOverviewView', mapOf_0(to('entityUid', $this.rqm_1.toString())), $this.xqn().joj(strings_getInstance().xni_1))]);
    if (showMembers) {
      Companion_getInstance_116();
      tabs.i1(new TabItem('CourseMembers', mapOf_0(to('clazzUid', $this.rqm_1.toString())), capitalizeFirstLetter($this.xqn().joj(strings_getInstance().nn1_1))));
    }
    if (showProgressReport) {
      Companion_getInstance_116();
      tabs.i1(new TabItem('Gradebook', mapOf_0(to('clazzUid', $this.rqm_1.toString())), $this.xqn().joj(strings_getInstance().nnp_1)));
    }
    if (showAttendance) {
      Companion_getInstance_116();
      tabs.i1(new TabItem('CourseLogListAttendanceView', mapOf_0(to('clazzUid', $this.rqm_1.toString())), $this.xqn().joj(strings_getInstance().lml_1)));
    }
    Companion_getInstance_116();
    tabs.i1(new TabItem('CourseGroups', mapOf_0(to('clazzUid', $this.rqm_1.toString())), $this.xqn().joj(strings_getInstance().xn0_1)));
    return toList(tabs);
  }
  function Companion_113() {
    this.nrj_1 = 'Course';
  }
  var Companion_instance_162;
  function Companion_getInstance_130() {
    return Companion_instance_162;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_8(function_0) {
    this.orj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_8).t1d = function (value, $completion) {
    return this.orj_1(value, $completion);
  };
  function ClazzDetailViewModel$slambda(this$0, resultContinuation) {
    this.xrj_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.xrj_1.pri_1, ClazzDetailViewModel$slambda$slambda_0(this.yrj_1, this.xrj_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.xrj_1, completion);
    i.yrj_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.pri_1 = MutableStateFlow(new ClazzDetailUiState());
    this.qri_1 = asStateFlow(this.pri_1);
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzDetailViewModel$slambda_0(this, null));
  }
  function ClazzDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.rri_1 = tabs;
  }
  protoOf(ClazzDetailUiState).sri = function (tabs) {
    return new ClazzDetailUiState(tabs);
  };
  protoOf(ClazzDetailUiState).toString = function () {
    return 'ClazzDetailUiState(tabs=' + this.rri_1 + ')';
  };
  protoOf(ClazzDetailUiState).hashCode = function () {
    return hashCode(this.rri_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.rri_1, tmp0_other_with_cast.rri_1))
      return false;
    return true;
  };
  var ClazzAction_EDIT_instance;
  var ClazzAction_COPY_instance;
  function valueOf_0(value) {
    switch (value) {
      case 'EDIT':
        return ClazzAction_EDIT_getInstance();
      case 'COPY':
        return ClazzAction_COPY_getInstance();
      default:
        ClazzAction_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  var ClazzAction_entriesInitialized;
  function ClazzAction_initEntries() {
    if (ClazzAction_entriesInitialized)
      return Unit_instance;
    ClazzAction_entriesInitialized = true;
    ClazzAction_EDIT_instance = new ClazzAction('EDIT', 0);
    ClazzAction_COPY_instance = new ClazzAction('COPY', 1);
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.hrk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).iqf = function (hasPermission, $completion) {
    var tmp = this.jqf(hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.iqf((!(p1 == null) ? typeof p1 === 'boolean' : 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;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.hrk_1.frl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vrl(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.irk_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).jqf = function (hasPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this.hrk_1, completion);
    i.irk_1 = hasPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermission, $completion) {
      return i.iqf(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.erm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$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.erm_1.tqn().p7f();
            var tmp_1 = this.erm_1.nqn().goa().vky_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.ui0(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this.erm_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(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(ClazzDetailOverviewViewModel$slambda$slambda).l78 = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda(this.erm_1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.nrm_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).rrm = function (value, $completion) {
    var tmp = this.srm(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.rrm(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.prm_1 = this.nrm_1;
            var tmp_1 = this;
            tmp_1.qrm_1 = this.orm_1;
            this.hd_1 = 1;
            var it = this.qrm_1;
            suspendResult = this.prm_1.t1d(it.xdn_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).srm = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.nrm_1, completion);
    i.orm_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.rrm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$61(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.brn_1 = _this__u8e3s4;
    this.crn_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.drn_1 = this.crn_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.drn_1, null);
            suspendResult = this.brn_1.ern_1.a1c(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.nrn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).prn = function (courseBlockList, $completion) {
    var tmp = this.qrn(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.prn((!(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.nrn_1.frl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vrl(VOID, VOID, this.orn_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).qrn = function (courseBlockList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.nrn_1, completion);
    i.orn_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.prn(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.zrn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).bro = function (blockStatuses, $completion) {
    var tmp = this.cro(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.bro((!(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.zrn_1.frl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vrl(VOID, VOID, VOID, this.aro_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).cro = function (blockStatuses, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this.zrn_1, completion);
    i.aro_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.bro(blockStatuses, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.lro_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).nro = function (scheduleList, $completion) {
    var tmp = this.oro(scheduleList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.nro((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$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.lro_1.frl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vrl(VOID, this.mro_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_3).oro = function (scheduleList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.lro_1, completion);
    i.mro_1 = scheduleList;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (scheduleList, $completion) {
      return i.nro(scheduleList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.xro_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.xro_1.tqn().p7d().icl(this.xro_1.rqm_1, false, false, systemTimeInMillis(), this.xro_1.pqn());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.xro_1, null);
            suspendResult = tmp_0.a1c(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.xro_1, completion);
    i.yro_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.hrp_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.hrp_1.tqn().j7e().oje(this.hrp_1.rqm_1, listOf_0(this.hrp_1.pqn()), this.hrp_1.pqn());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this.hrp_1, null);
            suspendResult = tmp_0.a1c(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.hrp_1, completion);
    i.irp_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 ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.rrp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$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(ClazzDetailOverviewViewModel$slambda$slambda$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$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.rrp_1.tqn().n7e().zhd(this.rrp_1.rqm_1);
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.rrp_1, null);
            suspendResult = tmp_0.a1c(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_3).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_3(this.rrp_1, completion);
    i.srp_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$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 _no_name_provided__qut3iv_3($this) {
    this.ern_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_3).xqe = 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_3).a1c = function (collector, $completion) {
    return this.xqe(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.brq_1 = $this_launch;
    this.crq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).iqf = function (hasViewPermission, $completion) {
    var tmp = this.jqf(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.iqf((!(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.drq_1) {
            launch(this.brq_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.crq_1, null));
            launch(this.brq_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this.crq_1, null));
            launch(this.brq_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_4(this.crq_1, null));
          } else {
            l$ret$1: do {
              var this_0 = this.crq_1.frl_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vrl(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).jqf = function (hasViewPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.brq_1, this.crq_1, completion);
    i.drq_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.iqf(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.frl_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.vrl(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).orq = function (clazzWithDisplayDetails, permissions, $completion) {
    var tmp = this.prq(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.orq(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.mrq_1;
          var tmp_0;
          if (this.nrq_1.xdn_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).prq = function (clazzWithDisplayDetails, permissions, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.mrq_1 = clazzWithDisplayDetails;
    i.nrq_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.orq(clazzWithDisplayDetails, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.yrq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).arr = function (it, $completion) {
    var tmp = this.brr(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.arr((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.yrq_1.frl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vrl(this.zrq_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          var tmp1_currentTerminologyStrings = this.yrq_1.frl_1.t2().rrl_1;
          var tmp0_safe_receiver = this.zrq_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q8k_1;
          var tmp3_json = this.yrq_1.m4r();
          var tmp4_systemImpl = this.yrq_1.xqn();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this.yrq_1));
          l$ret$3: do {
            var this_1 = this.yrq_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.zrq_1;
              var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.p8k_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s8d_1;
              var nextValue_0 = prevValue_0.jq6(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).brr = function (it, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.yrq_1, completion);
    i.zrq_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.arr(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation) {
    this.krr_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).rrm = function (value, $completion) {
    var tmp = this.srm(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.rrm(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.mrr_1 = this.krr_1;
            var tmp_1 = this;
            tmp_1.nrr_1 = this.lrr_1;
            this.hd_1 = 1;
            var it = this.nrr_1;
            suspendResult = this.mrr_1.t1d(it.ydn_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).srm = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1(this.krr_1, completion);
    i.lrr_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.rrm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$62(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wrr_1 = _this__u8e3s4;
    this.xrr_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.yrr_1 = this.xrr_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2(this.yrr_1, null);
            suspendResult = this.wrr_1.zrr_1.a1c(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.zrr_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_4).xqe = 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_4).a1c = function (collector, $completion) {
    return this.xqe(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.irs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).iqf = function (hasEditPermission, $completion) {
    var tmp = this.jqf(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.iqf((!(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.irs_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.jq6(prevValue.uq5_1.pq6(this.jrs_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.irs_1.frl_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.vrl(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.jrs_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).jqf = function (hasEditPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.irs_1, completion);
    i.jrs_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.iqf(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation) {
    this.srs_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).rrm = function (value, $completion) {
    var tmp = this.srm(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.rrm(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.urs_1 = this.srs_1;
            var tmp_1 = this;
            tmp_1.vrs_1 = this.trs_1;
            this.hd_1 = 1;
            var it = this.vrs_1;
            suspendResult = this.urs_1.t1d(it.zdn_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).srm = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3(this.srs_1, completion);
    i.trs_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.rrm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$63(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ert_1 = _this__u8e3s4;
    this.frt_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.grt_1 = this.frt_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4(this.grt_1, null);
            suspendResult = this.ert_1.hrt_1.a1c(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.hrt_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_5).xqe = 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_5).a1c = function (collector, $completion) {
    return this.xqe(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.qrt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).iqf = function (canAddStudent, $completion) {
    var tmp = this.jqf(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.iqf((!(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.qrt_1.frl_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vrl(VOID, VOID, VOID, VOID, this.rrt_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).jqf = function (canAddStudent, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.qrt_1, completion);
    i.rrt_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.iqf(canAddStudent, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.aru_1 = $permissionFlow;
    this.bru_1 = this$0;
    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 this_0 = this.aru_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_3(this_0));
            suspendResult = collectLatest(tmp_0, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.cru_1, this.bru_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_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this.aru_1, this.bru_1, completion);
    i.cru_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_2($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$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 ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, $permissionFlow, resultContinuation) {
    this.lru_1 = this$0;
    this.mru_1 = $permissionFlow;
    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 tmp_0 = this.lru_1.tqn().o7d().y8c(this.lru_1.rqm_1, systemTimeInMillis(), this.lru_1.pqn());
            var tmp_1 = combine(tmp_0, this.mru_1, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_2 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.lru_1, null);
            suspendResult = tmp_1.a1c(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_3).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this.lru_1, this.mru_1, completion);
    i.nru_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(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_5($permissionFlow, this$0, resultContinuation) {
    this.wru_1 = $permissionFlow;
    this.xru_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.wru_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_4(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.xru_1, null);
            suspendResult = tmp_0.a1c(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.wru_1, this.xru_1, completion);
    i.yru_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$slambda_7($permissionFlow, this$0, resultContinuation) {
    this.hrv_1 = $permissionFlow;
    this.irv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$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(ClazzDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$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.hrv_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_5(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.irv_1, null);
            suspendResult = tmp_0.a1c(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_7).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_7(this.hrv_1, this.irv_1, completion);
    i.jrv_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_8($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_7($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_1($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.srv_1 = $this_launch;
    this.trv_1 = $permissionFlow;
    this.urv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$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.srv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this.trv_1, this.urv_1, null));
          launch(this.srv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this.urv_1, this.trv_1, null));
          launch(this.srv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_6(this.trv_1, this.urv_1, null));
          launch(this.srv_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_8(this.trv_1, this.urv_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_1).l78 = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda_1(this.srv_1, this.trv_1, this.urv_1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_2($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda_1($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hrl_1;
    setClipboardStringUseCase$factory_0();
    return this_0.t2();
  }
  function _get_copyCourseUseCase__jeltyi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.krl_1;
    copyCourseUseCase$factory_0();
    return this_0.t2();
  }
  function onClickEdit($this) {
    Companion_getInstance_116();
    var tmp = to('entityUid', $this.rqm_1.toString());
    Companion_getInstance_116();
    $this.zqm_1.kp6('CourseEdit', mapOf([tmp, to('clazzAction', 'EDIT')]));
  }
  function Companion_114() {
    this.vrv_1 = 'CourseDetailOverviewView';
  }
  var Companion_instance_163;
  function Companion_getInstance_131() {
    return Companion_instance_163;
  }
  function ClazzAction(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_9(function_0) {
    this.wrv_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_9).t1d = function (value, $completion) {
    return this.wrv_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, resultContinuation) {
    this.frw_1 = this$0;
    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.frw_1.frl_1, ClazzDetailOverviewViewModel$slambda$slambda_0(this.frw_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.frw_1, completion);
    i.grw_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda_1(this$0, $permissionFlow, resultContinuation) {
    this.prw_1 = this$0;
    this.qrw_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$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_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$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.prw_1.frl_1, ClazzDetailOverviewViewModel$slambda$slambda_2(this.rrw_1, this.qrw_1, this.prw_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_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda_1(this.prw_1, this.qrw_1, completion);
    i.rrw_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda_2(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$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$onClickCopyCourse$slambda(this$0, resultContinuation) {
    this.arx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$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$onClickCopyCourse$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$onClickCopyCourse$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.arx_1.frl_1.t2().erx();
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.crx_1 = tmp_1;
            this.drx_1 = this.arx_1.frl_1.t2().mrl_1;
            this.hd_1 = 1;
            suspendResult = _get_copyCourseUseCase__jeltyi(this.arx_1).hrx(this.crx_1, this.drx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            this_0.irx_1.s8d_1 = this.arx_1.xqn().joj(strings_getInstance().dnr_1) + ' ' + this_0.irx_1.s8d_1;
            var copyResult = this_0;
            Companion_getInstance_116();
            var tmp_2 = to('clazzAction', 'COPY');
            Companion_getInstance_115();
            var this_1 = this.arx_1.m4r();
            var value = copyResult.irx_1;
            var this_2 = this_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(ClazzWithHolidayCalendarAndAndTerminology), arrayOf([]), false));
            var tmp_3 = to('entity', this_1.r45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), value));
            var this_4 = this.arx_1.m4r();
            var value_0 = copyResult.jrx_1;
            var this_5 = this_4.t45();
            var this_6 = serializer(this_5, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(getKClass(CourseBlockAndEditEntities), arrayOf([]), false))]), false));
            var tmp_4 = to('courseblocks', this_4.r45(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), value_0));
            var this_7 = this.arx_1.m4r();
            var value_1 = copyResult.krx_1;
            var this_8 = this_7.t45();
            var this_9 = serializer(this_8, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(getKClass(Schedule), arrayOf([]), false))]), false));
            this.arx_1.zqm_1.kp6('CourseEdit', mapOf([tmp_2, tmp_3, tmp_4, to('schedule', this_7.r45(isInterface(this_9, KSerializer) ? this_9 : THROW_CCE(), value_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$onClickCopyCourse$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this.arx_1, completion);
    i.brx_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$onClickCopyCourse$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$onClickCopyCourse$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAction_EDIT_getInstance() {
    ClazzAction_initEntries();
    return ClazzAction_EDIT_instance;
  }
  function ClazzAction_COPY_getInstance() {
    ClazzAction_initEntries();
    return ClazzAction_COPY_instance;
  }
  function ClazzDetailOverviewViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'CourseDetailOverviewView' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    this.frl_1 = MutableStateFlow(new ClazzDetailOverviewUiState());
    this.grl_1 = asStateFlow(this.frl_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.hrl_1 = Instance(this, tmp$ret$0, null).a5d(this, setClipboardStringUseCase$factory());
    this.irl_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.jrl_1 = asSharedFlow(this.irl_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(CopyCourseUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.krl_1 = Instance(this_0, tmp$ret$2, null).a5d(this, copyCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>' call
        var tmp_3 = this.xqn().joj(strings_getInstance().tmv_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.jq6(new FabUiState(false, tmp_3, tmp_4, ClazzDetailOverviewViewModel$onClickEdit$ref(this)));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.oqn();
    launch(tmp_5, VOID, VOID, ClazzDetailOverviewViewModel$slambda_0(this, null));
    var tmp_6 = this.tqn().o7f();
    var tmp_7 = this.pqn();
    PermissionFlags_getInstance();
    var tmp_8 = new Long(1, 0);
    PermissionFlags_getInstance();
    var tmp_9 = new Long(2, 0);
    PermissionFlags_getInstance();
    var permissionFlow = shareIn(tmp_6.idk(tmp_7, this.rqm_1, tmp_8, tmp_9, new Long(8, 0)), this.oqn(), Companion_getInstance_12().v1h());
    var tmp_10 = this.oqn();
    launch(tmp_10, VOID, VOID, ClazzDetailOverviewViewModel$slambda_2(this, permissionFlow, null));
  }
  protoOf(ClazzDetailOverviewViewModel).lrx = function (code) {
    _get_setClipboardStringUseCase__31i1s1(this).pp1(code);
    this.vqn().yq6(new Snack(this.xqn().joj(strings_getInstance().vn8_1)));
  };
  protoOf(ClazzDetailOverviewViewModel).mrx = function (courseBlock) {
    Companion_getInstance_125();
    var tmp = to('entityUid', courseBlock.t7x_1.toString());
    Companion_getInstance_125();
    var navArgs = mapOf([tmp, to('clazzUid', this.rqm_1.toString())]);
    var tmp0_subject = courseBlock.u7x_1;
    if (tmp0_subject === 100) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.frl_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.onClickCourseBlock.<anonymous>' call
          var nextValue = prevValue.vrl(VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.qrl_1, courseBlock.t7x_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this.irl_1.i1h(new RefreshCommand());
    } else {
      if (tmp0_subject === 102) {
        this.zqm_1.kp6('CourseText', navArgs);
      } else {
        if (tmp0_subject === 103) {
          this.zqm_1.kp6('CourseAssignment', navArgs);
        } else {
          if (tmp0_subject === 105) {
            this.zqm_1.kp6('CourseDiscussion', navArgs);
          } else {
            if (tmp0_subject === 104) {
              Companion_getInstance_160();
              Companion_getInstance_125();
              var tmp_0 = to('entityUid', courseBlock.l7y_1.toString());
              Companion_getInstance_125();
              var tmp_1 = to('clazzUid', this.rqm_1.toString());
              Companion_getInstance_125();
              this.zqm_1.kp6('ContentEntry', mapOf([tmp_0, tmp_1, to('courseBlockUid', courseBlock.t7x_1.toString())]));
            }
          }
        }
      }
    }
  };
  protoOf(ClazzDetailOverviewViewModel).nrx = function () {
    Companion_getInstance_125();
    this.zqm_1.kp6('CoursePermissionList', mapOf_0(to('clazzUid', this.rqm_1.toString())));
  };
  protoOf(ClazzDetailOverviewViewModel).orx = function () {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzDetailOverviewViewModel$onClickCopyCourse$slambda_0(this, null));
  };
  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.nrl_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.zcn_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w7x_1;
        if (!this$0.qrl_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, canAddNewCourse) {
    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;
    canAddNewCourse = canAddNewCourse === VOID ? false : canAddNewCourse;
    this.lrl_1 = clazzAndDetail;
    this.mrl_1 = scheduleList;
    this.nrl_1 = courseBlockList;
    this.orl_1 = blockStatusesForActiveUser;
    this.prl_1 = clazzCodeVisible;
    this.qrl_1 = collapsedBlockUids;
    this.rrl_1 = terminologyStrings;
    this.srl_1 = managePermissionVisible;
    this.trl_1 = canAddNewCourse;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.url_1 = lazy(tmp_0, ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this));
  }
  protoOf(ClazzDetailOverviewUiState).erx = function () {
    var tmp0_safe_receiver = this.lrl_1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p8k_1;
  };
  protoOf(ClazzDetailOverviewUiState).prx = function () {
    var tmp;
    var tmp0_safe_receiver = this.lrl_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p8k_1;
    if (isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z8d_1)) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.lrl_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.p8k_1;
      tmp = isDateSet(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.a8e_1);
    }
    return tmp;
  };
  protoOf(ClazzDetailOverviewUiState).qrx = function () {
    var tmp0_safe_receiver = this.lrl_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s8k_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).rrx = function () {
    var tmp0_safe_receiver = this.lrl_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t8k_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).srx = function () {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.nrl_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.zcn_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7x_1;
        if (tmp_0 === 100) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  protoOf(ClazzDetailOverviewUiState).trx = function () {
    var tmp2_safe_receiver = this.rrl_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.lq8(strings_getInstance().xmy_1);
    var tmp = (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs) + ': ' + this.rrx() + ', ';
    var tmp0_safe_receiver = this.rrl_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lq8(strings_getInstance().sml_1);
    return tmp + ((tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs) + ': ' + this.qrx());
  };
  protoOf(ClazzDetailOverviewUiState).urx = function () {
    return this.srl_1;
  };
  protoOf(ClazzDetailOverviewUiState).vrx = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.url_1;
    displayBlockList$factory();
    return this_0.t2();
  };
  protoOf(ClazzDetailOverviewUiState).wrx = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) {
    return new ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).vrl = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse, $super) {
    clazzAndDetail = clazzAndDetail === VOID ? this.lrl_1 : clazzAndDetail;
    scheduleList = scheduleList === VOID ? this.mrl_1 : scheduleList;
    courseBlockList = courseBlockList === VOID ? this.nrl_1 : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? this.orl_1 : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? this.prl_1 : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? this.qrl_1 : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? this.rrl_1 : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? this.srl_1 : managePermissionVisible;
    canAddNewCourse = canAddNewCourse === VOID ? this.trl_1 : canAddNewCourse;
    return $super === VOID ? this.wrx(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse) : $super.wrx.call(this, clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, canAddNewCourse);
  };
  protoOf(ClazzDetailOverviewUiState).toString = function () {
    return 'ClazzDetailOverviewUiState(clazzAndDetail=' + this.lrl_1 + ', scheduleList=' + this.mrl_1 + ', courseBlockList=' + this.nrl_1 + ', blockStatusesForActiveUser=' + this.orl_1 + ', clazzCodeVisible=' + this.prl_1 + ', collapsedBlockUids=' + this.qrl_1 + ', terminologyStrings=' + this.rrl_1 + ', managePermissionVisible=' + this.srl_1 + ', canAddNewCourse=' + this.trl_1 + ')';
  };
  protoOf(ClazzDetailOverviewUiState).hashCode = function () {
    var result = this.lrl_1 == null ? 0 : this.lrl_1.hashCode();
    result = imul(result, 31) + hashCode(this.mrl_1) | 0;
    result = imul(result, 31) + hashCode(this.nrl_1) | 0;
    result = imul(result, 31) + hashCode(this.orl_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.prl_1) | 0;
    result = imul(result, 31) + hashCode(this.qrl_1) | 0;
    result = imul(result, 31) + (this.rrl_1 == null ? 0 : this.rrl_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.srl_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.trl_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.lrl_1, tmp0_other_with_cast.lrl_1))
      return false;
    if (!equals(this.mrl_1, tmp0_other_with_cast.mrl_1))
      return false;
    if (!equals(this.nrl_1, tmp0_other_with_cast.nrl_1))
      return false;
    if (!equals(this.orl_1, tmp0_other_with_cast.orl_1))
      return false;
    if (!(this.prl_1 === tmp0_other_with_cast.prl_1))
      return false;
    if (!equals(this.qrl_1, tmp0_other_with_cast.qrl_1))
      return false;
    if (!equals(this.rrl_1, tmp0_other_with_cast.rrl_1))
      return false;
    if (!(this.srl_1 === tmp0_other_with_cast.srl_1))
      return false;
    if (!(this.trl_1 === tmp0_other_with_cast.trl_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function copyCourseUseCase$factory() {
    return getPropertyCallableRef('copyCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_copyCourseUseCase__jeltyi(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_0() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function copyCourseUseCase$factory_0() {
    return getPropertyCallableRef('copyCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_copyCourseUseCase__jeltyi(receiver);
    }, null);
  }
  function displayBlockList$factory() {
    return getPropertyCallableRef('displayBlockList', 1, KProperty1, function (receiver) {
      return receiver.vrx();
    }, null);
  }
  function Companion_115() {
    Companion_instance_164 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.xrx_1 = [null, new ArrayListSerializer($serializer_getInstance_7()), new ArrayListSerializer($serializer_getInstance_8())];
  }
  var Companion_instance_164;
  function Companion_getInstance_132() {
    if (Companion_instance_164 == null)
      new Companion_115();
    return Companion_instance_164;
  }
  function $serializer_59() {
    $serializer_instance_59 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.detailoverview.CopyCourseUseCase.CopyCourseResult', this, 3);
    tmp0_serialDesc.t4f('clazz', false);
    tmp0_serialDesc.t4f('courseBlocks', false);
    tmp0_serialDesc.t4f('schedules', false);
    this.yrx_1 = tmp0_serialDesc;
  }
  protoOf($serializer_59).q44 = function () {
    return this.yrx_1;
  };
  protoOf($serializer_59).k4g = function () {
    var tmp0_cached = Companion_getInstance_132().xrx_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_9(), tmp0_cached[1], tmp0_cached[2]];
  };
  protoOf($serializer_59).s44 = function (decoder) {
    var tmp0_desc = this.yrx_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.i48(tmp0_desc);
    var tmp8_cached = Companion_getInstance_132().xrx_1;
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_9(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.u48(tmp0_desc, 0, $serializer_getInstance_9(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.u48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.u48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return CopyCourseResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_59).zrx = function (encoder, value) {
    var tmp0_desc = this.yrx_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_132().xrx_1;
    tmp1_output.y49(tmp0_desc, 0, $serializer_getInstance_9(), value.irx_1);
    tmp1_output.y49(tmp0_desc, 1, tmp2_cached[1], value.jrx_1);
    tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.krx_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_59).r44 = function (encoder, value) {
    return this.zrx(encoder, value instanceof CopyCourseResult ? value : THROW_CCE());
  };
  var $serializer_instance_59;
  function $serializer_getInstance_71() {
    if ($serializer_instance_59 == null)
      new $serializer_59();
    return $serializer_instance_59;
  }
  function CopyCourseResult_init_$Init$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_71().yrx_1);
    }
    $this.irx_1 = clazz;
    $this.jrx_1 = courseBlocks;
    $this.krx_1 = schedules;
    return $this;
  }
  function CopyCourseResult_init_$Create$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker) {
    return CopyCourseResult_init_$Init$(seen1, clazz, courseBlocks, schedules, serializationConstructorMarker, objectCreate(protoOf(CopyCourseResult)));
  }
  function CopyCourseResult(clazz, courseBlocks, schedules) {
    Companion_getInstance_132();
    this.irx_1 = clazz;
    this.jrx_1 = courseBlocks;
    this.krx_1 = schedules;
  }
  protoOf(CopyCourseResult).toString = function () {
    return 'CopyCourseResult(clazz=' + this.irx_1 + ', courseBlocks=' + this.jrx_1 + ', schedules=' + this.krx_1 + ')';
  };
  protoOf(CopyCourseResult).hashCode = function () {
    var result = this.irx_1.hashCode();
    result = imul(result, 31) + hashCode(this.jrx_1) | 0;
    result = imul(result, 31) + hashCode(this.krx_1) | 0;
    return result;
  };
  protoOf(CopyCourseResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CopyCourseResult))
      return false;
    var tmp0_other_with_cast = other instanceof CopyCourseResult ? other : THROW_CCE();
    if (!this.irx_1.equals(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;
    return true;
  };
  function shallowCopyTo(_this__u8e3s4, $this, target) {
    target.s8d_1 = _this__u8e3s4.s8d_1;
    target.t8d_1 = _this__u8e3s4.t8d_1;
    target.u8d_1 = _this__u8e3s4.u8d_1;
    target.v8d_1 = _this__u8e3s4.v8d_1;
    target.w8d_1 = _this__u8e3s4.w8d_1;
    target.x8d_1 = _this__u8e3s4.x8d_1;
    target.y8d_1 = _this__u8e3s4.y8d_1;
    target.z8d_1 = _this__u8e3s4.z8d_1;
    target.a8e_1 = _this__u8e3s4.a8e_1;
    target.b8e_1 = _this__u8e3s4.b8e_1;
    target.c8e_1 = _this__u8e3s4.c8e_1;
    target.d8e_1 = _this__u8e3s4.d8e_1;
    target.e8e_1 = _this__u8e3s4.e8e_1;
    target.f8e_1 = _this__u8e3s4.f8e_1;
    target.g8e_1 = _this__u8e3s4.g8e_1;
    target.h8e_1 = _this__u8e3s4.h8e_1;
    target.i8e_1 = _this__u8e3s4.i8e_1;
    target.j8e_1 = _this__u8e3s4.j8e_1;
    target.k8e_1 = _this__u8e3s4.k8e_1;
    target.l8e_1 = _this__u8e3s4.l8e_1;
    target.m8e_1 = _this__u8e3s4.m8e_1;
    target.n8e_1 = _this__u8e3s4.n8e_1;
    target.o8e_1 = _this__u8e3s4.o8e_1;
  }
  function CopyCourseUseCase$invoke$lambda($newScheduleUid, $clazz) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.uhe_1 = $newScheduleUid;
      $this$shallowCopy.bhf_1 = $clazz.r8d_1;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$64(_this__u8e3s4, clazz, scheduleListVal, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.iry_1 = _this__u8e3s4;
    this.jry_1 = clazz;
    this.kry_1 = scheduleListVal;
  }
  protoOf($invokeCOROUTINE$64).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 = this.iry_1.frx_1.p7d().hcl(this.jry_1.r8d_1, false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.lry_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.iry_1.frx_1.g7f().sft(this.jry_1.r8d_1, false, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.mry_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = this.iry_1.frx_1.o7d().u8c(this.jry_1.r8d_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.nry_1 = suspendResult;
            this.ory_1 = this.nry_1 == null ? new ClazzWithHolidayCalendarAndAndTerminology() : this.nry_1;
            var tmp_0 = this;
            var this_0 = this.lry_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 tmp_1 = ensureNotNull(item.icn_1);
              var tmp0_elvis_lhs = item.jcn_1;
              var tmp_2 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.icn_1).t7x_1) : tmp0_elvis_lhs;
              var tmp_3 = item.kcn_1;
              var tmp_4 = item.lcn_1;
              var tmp_5 = item.mcn_1;
              var tmp_6 = item.ncn_1;
              var this_1 = this.mry_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();
                var tmp_7 = element.qfu_1;
                var tmp0_safe_receiver = item.mcn_1;
                if (tmp_7.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n7t_1)) {
                  destination_0.i1(element);
                }
              }
              destination.i1(new CourseBlockAndEditEntities(tmp_1, tmp_2, tmp_3, VOID, VOID, VOID, tmp_4, tmp_5, tmp_6, destination_0));
            }

            tmp_0.pry_1 = destination;
            this.qry_1 = get_doorPrimaryKeyManager(this.iry_1.frx_1);
            this.hd_1 = 4;
            Companion_getInstance_4();
            suspendResult = this.qry_1.o62(6, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.rry_1 = suspendResult;
            this.sry_1 = this.iry_1.grx_1.goa().vky_1;
            this.hd_1 = 5;
            suspendResult = this.qry_1.o62(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.try_1 = suspendResult;
            var tmp_8 = this;
            tmp_8.ury_1 = this.pry_1;
            var tmp_9 = this;
            tmp_9.vry_1 = this.ury_1;
            var tmp_10 = this;
            tmp_10.wry_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ury_1, 10));
            this.xry_1 = this.vry_1.w();
            this.hd_1 = 6;
            continue $sm;
          case 6:
            if (!this.xry_1.f()) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.yry_1 = this.xry_1.e();
            var tmp_11 = this;
            tmp_11.zry_1 = this.yry_1;
            this.hd_1 = 7;
            suspendResult = this.qry_1.o62(124, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.arz_1 = suspendResult;
            this.brz_1 = this.zry_1.uk8_1;
            if (this.brz_1 == null) {
              this.crz_1 = null;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.hd_1 = 8;
              suspendResult = this.qry_1.o62(520, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp1_caUid = suspendResult;
            this.crz_1 = this.brz_1.xkd(tmp1_caUid, VOID, VOID, new Long(0, 0), VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, 1, VOID, VOID, VOID, VOID, this.rry_1);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            var copiedAssignment = this.crz_1;
            var tmp4_elvis_lhs = copiedAssignment == null ? null : copiedAssignment.n7t_1;
            var ARGUMENT = this.zry_1.zk8(this.zry_1.nk8_1.hkm(this.arz_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.rry_1, VOID, VOID, VOID, tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs), VOID, VOID, VOID, VOID, VOID, VOID, copiedAssignment);
            this.wry_1.i1(ARGUMENT);
            this.hd_1 = 6;
            continue $sm;
          case 10:
            var courseBlocks = this.wry_1;
            shallowCopyTo(this.jry_1, this.iry_1, this.ory_1);
            var tmp_12 = this.ory_1;
            var tmp1_safe_receiver = this.ory_1.l8g_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hkn(this.rry_1);
            tmp_12.l8g_1 = tmp2_elvis_lhs == null ? new CoursePicture(this.rry_1) : tmp2_elvis_lhs;
            this.ory_1.r8d_1 = this.rry_1;
            this.ory_1.p8e_1 = this.sry_1;
            this.ory_1.r8d_1 = this.rry_1;
            this.ory_1.p8e_1 = this.sry_1;
            var this_2 = this.kry_1;
            var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var item_0 = tmp0_iterator_1.e();
              destination_1.i1(shallowCopy_3(item_0, CopyCourseUseCase$invoke$lambda(this.try_1, this.jry_1)));
            }

            var schedules = destination_1;
            return new CopyCourseResult(this.ory_1, courseBlocks, schedules);
          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 CopyCourseUseCase(repoOrDb, accountManager) {
    this.frx_1 = repoOrDb;
    this.grx_1 = accountManager;
  }
  protoOf(CopyCourseUseCase).hrx = function (clazz, scheduleListVal, $completion) {
    var tmp = new $invokeCOROUTINE$64(this, clazz, scheduleListVal, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function ClazzEditViewModel$slambda$slambda$slambda$lambda(this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.l8g_1 = new CoursePicture(this$0.fqt_1);
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lrz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).prz = function (it, $completion) {
    var tmp = this.vny(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.prz(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.mrz_1.o7d();
            var tmp_1;
            if (!this.lrz_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.nrz_1 = tmp_1;
            if (this.nrz_1 == null) {
              this.orz_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.nrz_1.u8c(this.lrz_1.fqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.orz_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_safe_receiver = this.orz_1;
            var tmp_2;
            if (tmp1_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var updatedClazz = tmp1_safe_receiver;
              if (tmp1_safe_receiver.l8g_1 == null) {
                var tmp_3 = updatedClazz;
                updatedClazz = shallowCopy_4(tmp_3, ClazzEditViewModel$slambda$slambda$slambda$lambda(this.lrz_1));
              }
              tmp_2 = updatedClazz;
            }

            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).vny = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this.lrz_1, completion);
    i.mrz_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.prz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.yrz_1 = this$0;
    this.zrz_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).es0 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.es0($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.as0_1 = new ClazzWithHolidayCalendarAndAndTerminology();
            var tmp_1 = this;
            tmp_1.bs0_1 = this.as0_1;
            this.bs0_1.r8d_1 = this.yrz_1.js1_1;
            this.bs0_1.s8d_1 = '';
            this.bs0_1.x8d_1 = true;
            this.bs0_1.z8d_1 = systemTimeInMillis();
            this.bs0_1.j8e_1 = getDefaultTimeZoneId();
            var tmp_2 = this.bs0_1;
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.zrz_1.ba('schoolUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            tmp_2.c8e_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp_3 = this;
            var this_0 = this.yrz_1.tqn().q7d();
            var tmp_4;
            if (!this.bs0_1.e8e_1.equals(new Long(0, 0))) {
              tmp_4 = this_0;
            } else {
              tmp_4 = null;
            }

            tmp_3.cs0_1 = tmp_4;
            if (this.cs0_1 == null) {
              this.ds0_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.cs0_1.ge7(this.bs0_1.e8e_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ds0_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.ds0_1;
            this.bs0_1.k8g_1 = ARGUMENT;
            this.bs0_1.l8g_1 = new CoursePicture(this.yrz_1.js1_1);
            this.bs0_1.p8e_1 = this.yrz_1.pqn();
            return this.as0_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).l78 = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_1(this.yrz_1, this.zrz_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.es0($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.hs1_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.us1(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.ds2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).hs2 = function (it, $completion) {
    var tmp = this.vny(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.hs2(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.es2_1.n7e();
            var tmp_1;
            if (!this.ds2_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.fs2_1 = tmp_1;
            if (this.fs2_1 == null) {
              this.gs2_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.fs2_1.ahe(this.ds2_1.fqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.gs2_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.gs2_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).vny = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this.ds2_1, completion);
    i.es2_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.hs2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).qs2 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).m78 = function ($completion) {
    return this.qs2($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).l78 = 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.qs2($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.hs1_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.us1(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.zs2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).hs3 = function (db, $completion) {
    var tmp = this.vny(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.hs3(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.as3_1.p7d();
            var tmp_1;
            if (!this.zs2_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.bs3_1 = tmp_1;
            if (this.bs3_1 == null) {
              this.cs3_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.bs3_1.hcl(this.zs2_1.fqt_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.cs3_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.ds3_1 = this.cs3_1;
            this.es3_1 = this.ds3_1 == null ? emptyList() : this.ds3_1;
            var tmp_2 = this;
            var this_1 = this.as3_1.g7f();
            var tmp_3;
            if (!this.zs2_1.fqt_1.equals(new Long(0, 0))) {
              tmp_3 = this_1;
            } else {
              tmp_3 = null;
            }

            tmp_2.fs3_1 = tmp_3;
            if (this.fs3_1 == null) {
              this.gs3_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              this.hd_1 = 3;
              suspendResult = this.fs3_1.sft(this.zs2_1.fqt_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.gs3_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp3_elvis_lhs = this.gs3_1;
            var assignmentPeerAllocations = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            var this_2 = this.es3_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.icn_1);
              var tmp0_elvis_lhs = item.jcn_1;
              var tmp_5 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.icn_1).t7x_1) : tmp0_elvis_lhs;
              var tmp_6 = item.kcn_1;
              var tmp_7 = item.lcn_1;
              var tmp_8 = item.mcn_1;
              var tmp_9 = item.ncn_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.qfu_1;
                var tmp0_safe_receiver = item.mcn_1;
                if (tmp_10.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n7t_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).vny = function (db, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this.zs2_1, completion);
    i.as3_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.hs3(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).qs3 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).m78 = function ($completion) {
    return this.qs3($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).l78 = 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.qs3($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.hs1_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.us1(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.uhe_1.equals($returnedSchedule.uhe_1);
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation) {
    this.zs3_1 = this$0;
    this.as4_1 = $newSchedules;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).kr0 = 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.kr0((!(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.zs3_1.m4r().r45(ListSerializer(Companion_instance_29.n4r()), this.as4_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.zs3_1, this.as4_1, completion);
    i.bs4_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.kr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation) {
    this.ks4_1 = this$0;
    this.ls4_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.ms4_1.uq9_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.ns4_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.ks4_1.hs1_1.t2().rs1_1;
            tmp_3.os4_1 = replaceOrAppend(tmp_4, this.ns4_1, ClazzEditViewModel$slambda$slambda$slambda$lambda_0(this.ns4_1));
            l$ret$1: do {
              var this_0 = this.ks4_1.hs1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.us1(VOID, VOID, VOID, VOID, VOID, this.os4_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.ks4_1, this.os4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.ls4_1.aqj('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).oqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this.ks4_1, this.ls4_1, completion);
    i.ms4_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation) {
    this.xs4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.ys4_1.uq9_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.zs4_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.xs4_1.hs1_1.t2().ss1_1;
            var tmp1_safe_receiver = this.xs4_1.hs1_1.t2().ns1_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.r8d_1;
            tmp_3.as5_1 = this.xs4_1.cs1_1.fpb(tmp_4, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.zs4_1);
            this.hd_1 = 1;
            suspendResult = updateCourseBlockList(this.xs4_1, this.as5_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).oqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this.xs4_1, completion);
    i.ys4_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_1($timeZoneId) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.j8e_1 = $timeZoneId;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation) {
    this.js5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.ks5_1.uq9_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.js5_1.hs1_1.t2().ns1_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_1(timeZoneId));
          }
          this.js5_1.ls5(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).oqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this.js5_1, completion);
    i.ks5_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_2($newTerminology) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.e8e_1 = $newTerminology.m8g_1;
      $this$shallowCopy.k8g_1 = $newTerminology;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation) {
    this.us5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.vs5_1.uq9_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.us5_1.hs1_1.t2().ns1_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_2(newTerminology));
          }
          this.us5_1.ls5(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).oqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this.us5_1, completion);
    i.vs5_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_3($newDescription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.t8d_1 = $newDescription;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation) {
    this.es6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.fs6_1.uq9_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.es6_1.hs1_1.t2().ns1_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_4(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_3(newDescription));
          }
          this.es6_1.ls5(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).oqa = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this.es6_1, completion);
    i.fs6_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.os6_1 = this$0;
    this.ps6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda).rs6 = 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.rs6((!(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_33.n4r();
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_0(this.os6_1, null);
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_2(this.os6_1, this.ps6_1, null);
            suspendResult = this.os6_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEditViewModel$slambda$slambda$lambda(this.os6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_123();
            var tmp1_safe_receiver = this_0 == null ? null : this_0.l8g_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s8g_1;
            setIfNoValueSetYet(this.ps6_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.os6_1, this.ps6_1, completion);
    i.qs6_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.rs6($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.as7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_1).cs7 = 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.cs7((!(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_29.n4r());
            var tmp_1 = listOf_0('schedule');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_4(this.as7_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.as7_1.hqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_0(this.as7_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.as7_1, completion);
    i.bs7_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.cs7($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.ls7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_3).ns7 = 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.ns7((!(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_13().n4r());
            var tmp_1 = listOf_0('courseblocks');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_8(this.ls7_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_10(null);
            suspendResult = this.ls7_1.hqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_1(this.ls7_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.ls7_1, completion);
    i.ms7_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.ns7($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.ws7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_5).kr0 = 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.kr0((!(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.ws7_1.m4r();
          var value = this.ws7_1.hs1_1.t2();
          var this_1 = this_0.t45();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzEditUiState), arrayOf([]), false));
          return this_0.r45(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.ws7_1, completion);
    i.xs7_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.kr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation) {
    this.gs8_1 = this$0;
    this.hs8_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.gs8_1.bqo(this.gs8_1.wqn(), 'Schedule');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_12(this.gs8_1, this.hs8_1, null);
            suspendResult = tmp_0.a1c(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.gs8_1, this.hs8_1, completion);
    i.is8_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.rs8_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.rs8_1.bqo(this.rs8_1.wqn(), 'courseblock');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_14(this.rs8_1, null);
            suspendResult = tmp_0.a1c(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.rs8_1, completion);
    i.ss8_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.bs9_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.bs9_1.bqo(this.bs9_1.wqn(), 'timeZone');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_16(this.bs9_1, null);
            suspendResult = tmp_0.a1c(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.bs9_1, completion);
    i.cs9_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.ls9_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.ls9_1.bqo(this.ls9_1.wqn(), 'terminology');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_18(this.ls9_1, null);
            suspendResult = tmp_0.a1c(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.ls9_1, completion);
    i.ms9_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.vs9_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.vs9_1.bqo(this.vs9_1.wqn(), 'clazzDescriptionHtml');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_20(this.vs9_1, null);
            suspendResult = tmp_0.a1c(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.vs9_1, completion);
    i.ws9_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.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda($clazzUid) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.bhf_1 = $clazzUid;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0(it) {
    return it.uhe_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1(it) {
    return it.nk8_1.t7x_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2(it) {
    return it.n7t_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3(it) {
    return it.nfu_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    this.gsa_1 = this$0;
    this.hsa_1 = $initEntity;
    this.isa_1 = $updateImage;
    this.jsa_1 = $coursePictureVal;
    this.ksa_1 = $entity;
    this.lsa_1 = $initState;
    this.msa_1 = $courseBlockListVal;
    this.nsa_1 = $updatedCourseBlockPictures;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.gsa_1.fqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_createNewClazzUseCase__mo489e(this.gsa_1).qoy(this.hsa_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.gsa_1.tqn().o7d().v8c(this.hsa_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.isa_1 ? !(this.jsa_1 == null) : false) {
              this.jsa_1.r8g_1 = systemTimeInMillis();
              this.jsa_1.q8g_1 = this.ksa_1.r8d_1;
              this.hd_1 = 4;
              suspendResult = this.gsa_1.rqn().d7f().ge4(this.jsa_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.psa_1 = this.ksa_1.r8d_1;
            var tmp_0 = this;
            var this_0 = this.gsa_1.hs1_1.t2().rs1_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_3(item, ClazzEditViewModel$onClickSave$slambda$slambda$lambda(this.psa_1)));
            }

            tmp_0.qsa_1 = destination;
            this.hd_1 = 6;
            suspendResult = this.gsa_1.tqn().n7e().xhd(this.qsa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.gsa_1.tqn().n7e();
            suspendResult = deactivateByUids(tmp_1, findKeysNotInOtherList(this.lsa_1.rs1_1, this.qsa_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.rsa_1 = this.gsa_1.ds1_1.hpb(this.msa_1);
            this.hd_1 = 8;
            var tmp_2 = this.gsa_1.tqn().p7d();
            var this_1 = this.rsa_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.nk8_1);
            }

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

            continue $sm;
          case 8:
            this.hd_1 = 9;
            var tmp_3 = this.gsa_1.tqn().p7d();
            suspendResult = deactivateByUids_0(tmp_3, findKeysNotInOtherList(this.lsa_1.ss1_1, this.rsa_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.msa_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.uk8_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_1.i1(tmp0_safe_receiver);
              }
            }

            tmp_4.ssa_1 = destination_1;
            this.hd_1 = 10;
            suspendResult = this.gsa_1.tqn().q7e().r7s(this.ssa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var this_3 = this.lsa_1.ss1_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.uk8_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_2.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_5.tsa_1 = findKeysNotInOtherList(destination_2, this.ssa_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2);
            var tmp_6 = this;
            var this_4 = this.gsa_1.tqn().q7e();
            var tmp_7;
            if (!this.tsa_1.c1()) {
              tmp_7 = this_4;
            } else {
              tmp_7 = null;
            }

            tmp_6.usa_1 = tmp_7;
            if (this.usa_1 == null) {
              this.vsa_1 = null;
              this.hd_1 = 12;
              continue $sm;
            } else {
              this.hd_1 = 11;
              suspendResult = this.usa_1.s7s(this.tsa_1, false, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 11:
            var tmp_8 = this;
            tmp_8.vsa_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            var tmp_9 = this;
            var this_5 = this.msa_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.wk8_1;
              addAll(destination_3, list);
            }

            tmp_9.wsa_1 = destination_3;
            var tmp_10 = this;
            var this_6 = this.lsa_1.ss1_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.wk8_1;
              addAll(destination_4, list_0);
            }

            tmp_10.xsa_1 = destination_4;
            this.hd_1 = 13;
            var tmp_11 = this.gsa_1.tqn().g7f();
            suspendResult = deactivateByUids_1(tmp_11, findKeysNotInOtherList(this.xsa_1, this.wsa_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.gsa_1.tqn().g7f().tft(this.wsa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 14:
            var tmp_12 = this;
            var this_7 = this.msa_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.rk8_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_5.i1(tmp0_safe_receiver_1);
              }
            }

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

            this.asb_1 = this.zsa_1.e();
            var tmp_13 = this;
            tmp_13.bsb_1 = this.asb_1;
            this.hd_1 = 16;
            suspendResult = this.gsa_1.fs1_1.lp5(this.bsb_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.gsa_1.rqn().q7f();
            var tmp_15;
            if (!this.nsa_1.c1()) {
              tmp_15 = this_8;
            } else {
              tmp_15 = null;
            }

            tmp_14.csb_1 = tmp_15;
            if (this.csb_1 == null) {
              this.dsb_1 = null;
              this.hd_1 = 19;
              continue $sm;
            } else {
              this.hd_1 = 18;
              suspendResult = this.csb_1.hd1(this.nsa_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 18:
            var tmp_16 = this;
            tmp_16.dsb_1 = Unit_instance;
            this.hd_1 = 19;
            continue $sm;
          case 19:
            Napier_getInstance().i5e('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).vny = function (it, completion) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this.gsa_1, this.hsa_1, this.isa_1, this.jsa_1, this.ksa_1, this.lsa_1, this.msa_1, this.nsa_1, completion);
    i.osa_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda$lambda($updatedBlock) {
    return function (it) {
      return it.nk8_1.t7x_1.equals($updatedBlock.nk8_1.t7x_1);
    };
  }
  function _get_createNewClazzUseCase__mo489e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ks1_1;
    createNewClazzUseCase$factory_0();
    return this_0.t2();
  }
  function updateCourseBlockList($this, newCourseBlockList, $completion) {
    var tmp = new $updateCourseBlockListCOROUTINE$65($this, newCourseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function hasErrors(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.os1_1 == null) ? true : !(_this__u8e3s4.ps1_1 == null)) ? true : !(_this__u8e3s4.qs1_1 == null);
  }
  function updateCourseBlock($this, updatedBlock) {
    var tmp = $this.oqn();
    launch(tmp, VOID, VOID, ClazzEditViewModel$updateCourseBlock$slambda_0($this, updatedBlock, null));
  }
  function Companion_116() {
    this.psb_1 = 'CourseEdit';
    this.qsb_1 = 'Schedule';
    this.rsb_1 = 'schedule';
    this.ssb_1 = 'courseblock';
    this.tsb_1 = 'timeZone';
    this.usb_1 = 'terminology';
    this.vsb_1 = 'courseblocks';
    this.wsb_1 = 'clazzDescriptionHtml';
  }
  var Companion_instance_165;
  function Companion_getInstance_133() {
    return Companion_instance_165;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_10(function_0) {
    this.xsb_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_10).t1d = function (value, $completion) {
    return this.xsb_1(value, $completion);
  };
  function ClazzEditViewModel$slambda(this$0, resultContinuation) {
    this.gsc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda).jsc = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.gsc_1.fqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              var tmp_0 = this.hsc_1.o7f();
              var tmp_1 = this.gsc_1.pqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.jdk(tmp_1, this.gsc_1.fqt_1, new Long(2, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_2 = this.hsc_1.p7f();
              var tmp_3 = this.gsc_1.pqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_2.ti0(tmp_3, new Long(512, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.isc_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.isc_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.isc_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).vny = function (it, completion) {
    var i = new ClazzEditViewModel$slambda(this.gsc_1, completion);
    i.hsc_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.jsc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.ssc_1 = $savedStateHandle;
    this.tsc_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.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_0(this.tsc_1, this.ssc_1, null));
            var tmp_1 = async(this.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_2(this.tsc_1, null));
            suspendResult = awaitAll([tmp_0, tmp_1, async(this.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_4(this.tsc_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_125();
            if (this.ssc_1.ba('initState') == null) {
              var tmp_2 = this;
              Companion_getInstance_125();
              tmp_2.vsc_1 = 'initState';
              this.hd_1 = 2;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzEditViewModel$slambda$slambda_6(this.tsc_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.ssc_1.aqj(this.vsc_1, ARGUMENT);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            launch(this.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_8(this.tsc_1, this.ssc_1, null));
            launch(this.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_10(this.tsc_1, null));
            launch(this.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_12(this.tsc_1, null));
            launch(this.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_14(this.tsc_1, null));
            launch(this.usc_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_16(this.tsc_1, null));
            l$ret$1: do {
              var this_0 = this.tsc_1.hs1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.us1(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.tsc_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_4 = Companion_getInstance_97().rq6_1;
                var tmp_5 = this.tsc_1.xqn().joj(strings_getInstance().hn3_1);
                var nextValue_0 = prevValue_0.jq6(VOID, tmp_4, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, ClazzEditViewModel$onClickSave$ref(this.tsc_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.ssc_1, this.tsc_1, completion);
    i.usc_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.esd_1 = this$0;
    this.fsd_1 = $newCourseBlockList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).kr0 = 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.kr0((!(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.esd_1.m4r().r45(ListSerializer(Companion_getInstance_13().n4r()), this.fsd_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.esd_1, this.fsd_1, completion);
    i.gsd_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.kr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.psd_1 = $commitDelay;
    this.qsd_1 = $entity;
    this.rsd_1 = $this;
    this.ssd_1 = $key;
    this.tsd_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.psd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.qsd_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.rsd_1.dqo(this.rsd_1.xqm_1, this.ssd_1, this.tsd_1, this.qsd_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.psd_1, this.qsd_1, this.rsd_1, this.ssd_1, this.tsd_1, completion);
    i.usd_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.b8e_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.s8d_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.s8d_1 = tmp_0;
      var tmp_1 = $this$shallowCopy;
      var tmp_2 = Companion_getInstance_6().fmh($initEntity.z8d_1);
      // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
      var tmp0_elvis_lhs = $initEntity.j8e_1;
      var tmp$ret$1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
      tmp_1.z8d_1 = toLocalMidnight(tmp_2, tmp$ret$1).emh();
      var tmp_3;
      var tmp_4 = $this$shallowCopy.a8e_1;
      Companion_getInstance_2();
      if (!tmp_4.equals(new Long(-1, 2147483647))) {
        var tmp_5 = $this$shallowCopy;
        var tmp_6 = Companion_getInstance_6().fmh($initEntity.a8e_1);
        // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
        var tmp0_elvis_lhs_0 = $initEntity.j8e_1;
        var tmp$ret$2 = tmp0_elvis_lhs_0 == null ? 'UTC' : tmp0_elvis_lhs_0;
        tmp_5.a8e_1 = toLocalEndOfDay(tmp_6, tmp$ret$2).emh();
        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.hs1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.us1(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation) {
    this.dse_1 = this$0;
    this.ese_1 = $entity;
    this.fse_1 = $initEntity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($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_125();
            suspendResult = this.dse_1.cqo(this.dse_1.xqm_1, 'initState', Companion_getInstance_134().n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.hse_1 = tmp_1;
            Napier_getInstance().i5e('onClickSave: start transaction');
            this.ise_1 = this.dse_1.hs1_1.t2().ss1_1;
            this.jse_1 = this.ese_1.l8g_1;
            var tmp_2 = this;
            var tmp_3;
            if (!(this.jse_1 == null)) {
              Companion_getInstance_123();
              var tmp_4 = this.dse_1.xqm_1.ba('initPicUri');
              var tmp1_safe_receiver = this.ese_1.l8g_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.s8g_1;
              tmp_3 = !(tmp_4 === (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs));
            } else {
              tmp_3 = false;
            }

            tmp_2.kse_1 = tmp_3;
            var tmp_5 = this;
            var this_0 = this.ise_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.ok8_1;
              var imageUriNow = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y7y_1;
              var tmp$ret$0;
              l$ret$1: do {
                var tmp0_iterator_0 = this.hse_1.ss1_1.w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  var tmp0_safe_receiver_0 = element_0.ok8_1;
                  var tmp_6 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.w7y_1;
                  var tmp1_safe_receiver_0 = element.ok8_1;
                  if (equals(tmp_6, tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.w7y_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.ok8_1;
              var initImageUri = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.y7y_1;
              var tmp3_safe_receiver = element.ok8_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.lse_1 = destination;
            this.hd_1 = 2;
            var tmp_9 = this.dse_1.rqn();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzEditViewModel$onClickSave$slambda$slambda_0(this.dse_1, this.fse_1, this.kse_1, this.jse_1, this.ese_1, this.hse_1, this.ise_1, this.lse_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Napier_getInstance().i5e('onClickSave: transaction done');
            var tmp_10 = this;
            tmp_10.mse_1 = this.ise_1;
            this.nse_1 = this.mse_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.nse_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.ose_1 = this.nse_1.e();
            var tmp_11 = this;
            tmp_11.pse_1 = this.ose_1;
            this.qse_1 = this.pse_1.pk8_1;
            if (this.qse_1 == null) {
              this.rse_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.sse_1 = this.qse_1;
              var tmp_13 = this;
              tmp_13.tse_1 = this.sse_1;
              this.hd_1 = 4;
              var tmp$ret$2;
              l$ret$3: do {
                var tmp0_iterator_1 = this.hse_1.ss1_1.w();
                while (tmp0_iterator_1.f()) {
                  var element_1 = tmp0_iterator_1.e();
                  var tmp0_safe_receiver_2 = element_1.ok8_1;
                  var tmp_14 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.w7y_1;
                  var tmp1_safe_receiver_2 = this.pse_1.ok8_1;
                  if (equals(tmp_14, tmp1_safe_receiver_2 == null ? null : tmp1_safe_receiver_2.w7y_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.ok8_1;
              suspendResult = this.dse_1.es1_1.epb(this.tse_1, null, this.pse_1.qk8_1, tmp1_safe_receiver_3 == null ? null : tmp1_safe_receiver_3.y7y_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.rse_1 = this.sse_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.dse_1.gs1_1;
            var tmp_16;
            if (this.kse_1) {
              tmp_16 = this_1;
            } else {
              tmp_16 = null;
            }

            tmp_15.use_1 = tmp_16;
            if (this.use_1 == null) {
              this.vse_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 7;
              var tmp_17 = this.ese_1.r8d_1;
              var tmp3_safe_receiver_0 = this.jse_1;
              suspendResult = this.use_1.uor(tmp_17, 125, tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.s8g_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 7:
            var tmp_18 = this;
            tmp_18.vse_1 = Unit_instance;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_19 = this;
            tmp_19.wse_1 = this.lse_1;
            this.xse_1 = this.wse_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.xse_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.yse_1 = this.xse_1.e();
            var tmp_20 = this;
            tmp_20.zse_1 = this.yse_1;
            this.hd_1 = 10;
            var tmp_21 = this.zse_1.w7y_1;
            suspendResult = this.dse_1.gs1_1.uor(tmp_21, 6677, this.zse_1.y7y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.hd_1 = 9;
            continue $sm;
          case 11:
            Napier_getInstance().i5e('onClickSave: done');
            this.dse_1.hqt('Course', this.ese_1.r8d_1, this.ese_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).l78 = function (completion) {
    return new ClazzEditViewModel$onClickSave$slambda(this.dse_1, this.ese_1, this.fse_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation) {
    this.ksf_1 = this$0;
    this.lsf_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.ksf_1, this.lsf_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.ksf_1, this.lsf_1, completion);
    i.msf_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.vsf_1 = this$0;
    this.wsf_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.vsf_1.hs1_1.t2().ss1_1;
            suspendResult = updateCourseBlockList(this.vsf_1, replace_0(tmp_0, this.wsf_1, ClazzEditViewModel$updateCourseBlock$slambda$lambda(this.wsf_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.vsf_1, this.wsf_1, completion);
    i.xsf_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.gsg_1 = this$0;
    this.hsg_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.gsg_1.hs1_1.t2().ss1_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (!element.nk8_1.t7x_1.equals(this.hsg_1.nk8_1.t7x_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateCourseBlockList(this.gsg_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.gsg_1, this.hsg_1, completion);
    i.isg_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$65(_this__u8e3s4, newCourseBlockList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.msb_1 = _this__u8e3s4;
    this.nsb_1 = newCourseBlockList;
  }
  protoOf($updateCourseBlockListCOROUTINE$65).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.msb_1.hs1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.us1(VOID, VOID, VOID, VOID, VOID, VOID, this.nsb_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.osb_1 = this.msb_1.xqm_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, ClazzEditViewModel$updateCourseBlockList$slambda_0(this.msb_1, this.nsb_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.osb_1.aqj('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(onActiveLearningSpace(di)).f58();
      // 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.d58(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(onActiveLearningSpace(di)).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = tmp_3.d58(tmp$ret$2, null).tk2_1;
      // Inline function 'org.kodein.di.instance' call
      var tmp_6 = get_direct(onActiveLearningSpace(di)).f58();
      // 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.d58(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(onActiveLearningSpace(di)).f58();
      // 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.d58(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(onActiveLearningSpace(di)).f58();
      // 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.d58(tmp$ret$0_1, null);
    } else {
      tmp_11 = enqueueSavePictureUseCase;
    }
    enqueueSavePictureUseCase = tmp_11;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseEdit');
    this.cs1_1 = addOrUpdateCourseBlockUseCase;
    this.ds1_1 = updateCourseBlocksOnReorderOrCommitUseCase;
    this.es1_1 = saveContentEntryUseCase;
    this.fs1_1 = importContentUseCase;
    this.gs1_1 = enqueueSavePictureUseCase;
    this.hs1_1 = MutableStateFlow(new ClazzEditUiState());
    this.is1_1 = asStateFlow(this.hs1_1);
    var tmp_14 = this;
    Companion_getInstance_125();
    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.rqn());
      Companion_getInstance_4();
      tmp_15 = tmp_16.n62(6);
    } else {
      tmp_15 = tmp1_elvis_lhs;
    }
    tmp_14.js1_1 = tmp_15;
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.ks1_1 = Instance(this_0, tmp$ret$10, null).a5d(this, createNewClazzUseCase$factory());
    var tmp_19 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzAction');
    var tmp_20;
    if (tmp0_safe_receiver_0 == null) {
      tmp_20 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.clazzAction.<anonymous>' call
      tmp_20 = valueOf_0(tmp0_safe_receiver_0);
    }
    var tmp1_elvis_lhs_0 = tmp_20;
    tmp_19.ls1_1 = tmp1_elvis_lhs_0 == null ? ClazzAction_EDIT_getInstance() : tmp1_elvis_lhs_0;
    var title = this.hqu(strings_getInstance().jnj_1, this.ls1_1.equals(ClazzAction_COPY_getInstance()) ? strings_getInstance().cnr_1 : strings_getInstance().lnj_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_97().qq6_1;
        var nextValue = new AppUiState(VOID, tmp0_loadingState, title, VOID, true);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_21 = ClazzEditViewModel$slambda_0(this, null);
    this.jqo(tmp_21, VOID, VOID, ClazzEditViewModel$slambda_2(savedStateHandle, this, null));
  }
  protoOf(ClazzEditViewModel).ls5 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.hs1_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.ns1_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.a8e_1;
        var tmp6_clazzEndDateError = this.iqu(tmp, entity == null ? null : entity.a8e_1, prevValue.ps1_1);
        var tmp0_safe_receiver = prevValue.ns1_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z8d_1;
        var tmp7_clazzStartDateError = this.iqu(tmp_0, entity == null ? null : entity.z8d_1, prevValue.os1_1);
        var tmp4_safe_receiver = prevValue.ns1_1;
        var tmp_1 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.s8d_1;
        var tmp8_clazzNameError = this.iqu(tmp_1, entity == null ? null : entity.s8d_1, prevValue.qs1_1);
        var nextValue = prevValue.us1(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_33.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.oqn();
    tmp_2.eqt_1 = launch(tmp_3, VOID, VOID, ClazzEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEditViewModel).jsg = function (checked) {
    var tmp0_safe_receiver = this.hs1_1.t2().ns1_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy_4(tmp0_safe_receiver, ClazzEditViewModel$onCheckedAttendanceChanged$lambda(checked));
    }
    this.ls5(tmp);
  };
  protoOf(ClazzEditViewModel).ksg = function () {
    this.fqo('ScheduleEdit', 'Schedule', null, Companion_instance_29.n4r());
  };
  protoOf(ClazzEditViewModel).lsg = function (schedule) {
    this.fqo('ScheduleEdit', 'Schedule', schedule, Companion_instance_29.n4r());
  };
  protoOf(ClazzEditViewModel).msg = function (schedule) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.hs1_1.t2().rs1_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.uhe_1.equals(schedule.uhe_1)) {
        destination.i1(element);
      }
    }
    var newSchedules = destination;
    this.xqm_1.aqj('schedule', this.m4r().r45(ListSerializer(Companion_instance_29.n4r()), newSchedules));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.hs1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
        var nextValue = prevValue.us1(VOID, VOID, VOID, VOID, VOID, newSchedules);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzEditViewModel).nsg = function (blockType) {
    if (blockType === 104) {
      Companion_getInstance_169();
      var tmp = Companion_getInstance_13().n4r();
      Companion_getInstance_116();
      var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().toString());
      Companion_getInstance_116();
      var tmp_1 = to('clazzUid', this.js1_1.toString());
      Companion_getInstance_174();
      var tmp_2 = to('blockType', (104).toString());
      this.fqo('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_174();
      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_174();
    this_0.s('blockType', blockType.toString());
    Companion_getInstance_116();
    this_0.s('clazzUid', this.js1_1.toString());
    if (blockType === 103) {
      var tmp0_safe_receiver = this.hs1_1.t2().ns1_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k8g_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.m4r().r45(Companion_instance_34.n4r(), tmp1_safe_receiver));
      }
    }
    var tmp2_args = this_0.f3();
    var tmp3_serializer = Companion_getInstance_13().n4r();
    this.fqo(viewName, keyName, null, tmp3_serializer, tmp2_args);
  };
  protoOf(ClazzEditViewModel).xs9 = function () {
    var tmp0_elvis_lhs = this.hs1_1.t2().ns1_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var initEntity = tmp;
    if (this.aqo().equals(Companion_getInstance_97().qq6_1)) {
      Napier_getInstance().i5e('onClickSave: indeterminate');
      return Unit_instance;
    }
    if (initEntity.z8d_1.equals(new Long(0, 0))) {
      Napier_getInstance().i5e('onClickSave: clazzstarttime = 0');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.hs1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.us1(VOID, VOID, this.xqn().joj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (initEntity.a8e_1.c7(initEntity.z8d_1) <= 0) {
      Napier_getInstance().i5e('onClickSave: endbeforestart');
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.hs1_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.us1(VOID, VOID, VOID, this.xqn().joj(strings_getInstance().pnl_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_2 = initEntity.s8d_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.hs1_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.us1(VOID, VOID, VOID, VOID, this.xqn().joj(strings_getInstance().znl_1));
          if (this_3.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (hasErrors(this.hs1_1.t2(), this)) {
      Napier_getInstance().i5e('onClickSave: hasErrors');
      return Unit_instance;
    }
    var entity = shallowCopy_4(initEntity, ClazzEditViewModel$onClickSave$lambda(initEntity));
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.hs1_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.us1(VOID, entity);
        if (this_4.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_0 = ClazzEditViewModel$onClickSave$lambda_0(this);
    this.kqu(tmp_0, ClazzEditViewModel$onClickSave$slambda_0(this, entity, initEntity, null));
  };
  protoOf(ClazzEditViewModel).osg = function (from, to) {
    // Inline function 'kotlin.apply' call
    var this_0 = toMutableList(this.hs1_1.t2().ss1_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.ds1_1.gpb(reorderedList, to);
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onCourseBlockMoved$slambda_0(this, newList, null));
  };
  protoOf(ClazzEditViewModel).psg = function () {
    Companion_getInstance_116();
    var tmp = to('result_key', 'timeZone');
    Companion_getInstance_116();
    this.zqm_1.kp6('TimeZoneList', mapOf([tmp, to('result_viewname', this.yqm_1)]));
  };
  protoOf(ClazzEditViewModel).qsg = function () {
  };
  protoOf(ClazzEditViewModel).rsg = function () {
    this.fqo('CourseTerminologyList', 'terminology', null, Companion_instance_34.n4r());
  };
  protoOf(ClazzEditViewModel).ssg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true)));
  };
  protoOf(ClazzEditViewModel).tsg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false)));
  };
  protoOf(ClazzEditViewModel).usg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, block.nk8_1.v7x_1 + 1 | 0)));
  };
  protoOf(ClazzEditViewModel).vsg = function (block) {
    updateCourseBlock(this, block.zk8(block.nk8_1.hkm(VOID, VOID, block.nk8_1.v7x_1 - 1 | 0)));
  };
  protoOf(ClazzEditViewModel).wsg = function (block) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this, block, null));
  };
  protoOf(ClazzEditViewModel).xsg = function (block) {
    var tmp0_subject = block.nk8_1.u7x_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_174();
      var tmp1_nextViewName = 'CourseBlockEdit';
      var tmp2_key = 'courseblock';
      var tmp3_serializer = Companion_getInstance_13().n4r();
      this.fqo(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_13().n4r();
        // 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_116();
        this_0.s('clazzUid', this.js1_1.toString());
        var tmp0_safe_receiver = this.hs1_1.t2().ns1_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k8g_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.m4r().r45(Companion_instance_34.n4r(), tmp1_safe_receiver));
        }
        var tmp7_args = this_0.f3();
        this.fqo(tmp4_nextViewName, tmp5_key, block, tmp6_serializer, tmp7_args);
      }
    }
  };
  function CourseBlockUiState(block) {
    this.ysg_1 = block;
  }
  protoOf(CourseBlockUiState).zsg = function () {
    var tmp;
    var tmp_0 = this.ysg_1.nk8_1.u7x_1;
    if (!(tmp_0 === 100)) {
      tmp = this.ysg_1.nk8_1.v7x_1 < 3;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockUiState).ash = function () {
    return this.ysg_1.nk8_1.v7x_1 > 0;
  };
  protoOf(CourseBlockUiState).bsh = function () {
    return !this.ysg_1.nk8_1.k7y_1;
  };
  protoOf(CourseBlockUiState).csh = function () {
    return this.ysg_1.nk8_1.k7y_1;
  };
  function Companion_117() {
    Companion_instance_166 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.asf_1 = [null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_8()), new ArrayListSerializer($serializer_getInstance_7()), null];
    this.bsf_1 = 3;
  }
  protoOf(Companion_117).n4r = function () {
    return $serializer_getInstance_72();
  };
  var Companion_instance_166;
  function Companion_getInstance_134() {
    if (Companion_instance_166 == null)
      new Companion_117();
    return Companion_instance_166;
  }
  function $serializer_60() {
    $serializer_instance_60 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditUiState', this, 8);
    tmp0_serialDesc.t4f('fieldsEnabled', true);
    tmp0_serialDesc.t4f('entity', true);
    tmp0_serialDesc.t4f('clazzStartDateError', true);
    tmp0_serialDesc.t4f('clazzEndDateError', true);
    tmp0_serialDesc.t4f('clazzNameError', true);
    tmp0_serialDesc.t4f('clazzSchedules', true);
    tmp0_serialDesc.t4f('courseBlockList', true);
    tmp0_serialDesc.t4f('timeZone', true);
    this.dsh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_60).q44 = function () {
    return this.dsh_1;
  };
  protoOf($serializer_60).k4g = function () {
    var tmp0_cached = Companion_getInstance_134().asf_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_60).s44 = function (decoder) {
    var tmp0_desc = this.dsh_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.i48(tmp0_desc);
    var tmp13_cached = Companion_getInstance_134().asf_1;
    if (tmp12_input.x48()) {
      tmp4_local0 = tmp12_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.w48(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.u48(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.u48(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.s48(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.w48(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.w48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.u48(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.u48(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.s48(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.j48(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_60).esh = function (encoder, value) {
    var tmp0_desc = this.dsh_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_134().asf_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ms1_1 === false)) {
      tmp1_output.o49(tmp0_desc, 0, value.ms1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.ns1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 1, $serializer_getInstance_9(), value.ns1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.os1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 2, StringSerializer_getInstance(), value.os1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ps1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.ps1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.qs1_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.qs1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !equals(value.rs1_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 5, tmp2_cached[5], value.rs1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !equals(value.ss1_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 6, tmp2_cached[6], value.ss1_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.ts1_1 === 'UTC')) {
      tmp1_output.w49(tmp0_desc, 7, value.ts1_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_60).r44 = function (encoder, value) {
    return this.esh(encoder, value instanceof ClazzEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_60;
  function $serializer_getInstance_72() {
    if ($serializer_instance_60 == null)
      new $serializer_60();
    return $serializer_instance_60;
  }
  function ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_72().dsh_1);
    }
    if (0 === (seen1 & 1))
      $this.ms1_1 = false;
    else
      $this.ms1_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.ns1_1 = null;
    else
      $this.ns1_1 = entity;
    if (0 === (seen1 & 4))
      $this.os1_1 = null;
    else
      $this.os1_1 = clazzStartDateError;
    if (0 === (seen1 & 8))
      $this.ps1_1 = null;
    else
      $this.ps1_1 = clazzEndDateError;
    if (0 === (seen1 & 16))
      $this.qs1_1 = null;
    else
      $this.qs1_1 = clazzNameError;
    if (0 === (seen1 & 32))
      $this.rs1_1 = emptyList();
    else
      $this.rs1_1 = clazzSchedules;
    if (0 === (seen1 & 64))
      $this.ss1_1 = emptyList();
    else
      $this.ss1_1 = courseBlockList;
    if (0 === (seen1 & 128))
      $this.ts1_1 = 'UTC';
    else
      $this.ts1_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_134();
    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.ms1_1 = fieldsEnabled;
    this.ns1_1 = entity;
    this.os1_1 = clazzStartDateError;
    this.ps1_1 = clazzEndDateError;
    this.qs1_1 = clazzNameError;
    this.rs1_1 = clazzSchedules;
    this.ss1_1 = courseBlockList;
    this.ts1_1 = timeZone;
  }
  protoOf(ClazzEditUiState).fsh = function () {
    var tmp;
    var tmp0_safe_receiver = this.ns1_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b8e_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).gsh = function (courseBlockAndEditEntities) {
    return new CourseBlockUiState(courseBlockAndEditEntities);
  };
  protoOf(ClazzEditUiState).hsh = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    return new ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).us1 = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.ms1_1 : fieldsEnabled;
    entity = entity === VOID ? this.ns1_1 : entity;
    clazzStartDateError = clazzStartDateError === VOID ? this.os1_1 : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? this.ps1_1 : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? this.qs1_1 : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? this.rs1_1 : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? this.ss1_1 : courseBlockList;
    timeZone = timeZone === VOID ? this.ts1_1 : timeZone;
    return $super === VOID ? this.hsh(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) : $super.hsh.call(this, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).toString = function () {
    return 'ClazzEditUiState(fieldsEnabled=' + this.ms1_1 + ', entity=' + this.ns1_1 + ', clazzStartDateError=' + this.os1_1 + ', clazzEndDateError=' + this.ps1_1 + ', clazzNameError=' + this.qs1_1 + ', clazzSchedules=' + this.rs1_1 + ', courseBlockList=' + this.ss1_1 + ', timeZone=' + this.ts1_1 + ')';
  };
  protoOf(ClazzEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.ms1_1);
    result = imul(result, 31) + (this.ns1_1 == null ? 0 : this.ns1_1.hashCode()) | 0;
    result = imul(result, 31) + (this.os1_1 == null ? 0 : getStringHashCode(this.os1_1)) | 0;
    result = imul(result, 31) + (this.ps1_1 == null ? 0 : getStringHashCode(this.ps1_1)) | 0;
    result = imul(result, 31) + (this.qs1_1 == null ? 0 : getStringHashCode(this.qs1_1)) | 0;
    result = imul(result, 31) + hashCode(this.rs1_1) | 0;
    result = imul(result, 31) + hashCode(this.ss1_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ts1_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.ms1_1 === tmp0_other_with_cast.ms1_1))
      return false;
    if (!equals(this.ns1_1, tmp0_other_with_cast.ns1_1))
      return false;
    if (!(this.os1_1 == tmp0_other_with_cast.os1_1))
      return false;
    if (!(this.ps1_1 == tmp0_other_with_cast.ps1_1))
      return false;
    if (!(this.qs1_1 == tmp0_other_with_cast.qs1_1))
      return false;
    if (!equals(this.rs1_1, tmp0_other_with_cast.rs1_1))
      return false;
    if (!equals(this.ss1_1, tmp0_other_with_cast.ss1_1))
      return false;
    if (!(this.ts1_1 === tmp0_other_with_cast.ts1_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.t7x_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.u7x_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.w7x_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.w7x_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.t7x_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.xax_1)) {
          var blockForStatus = moduleBlockUids.q(element_3.xax_1);
          if ((blockForStatus == null ? null : isCompleteable(blockForStatus)) === true) {
            numCompleteableBlocksInModule = numCompleteableBlocksInModule + 1 | 0;
          }
          var tmp3_safe_receiver = blockForStatus == null ? null : blockForStatus.e7y_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.bay_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.e7y_1;
            totalPointsScored = tmp_3 + tmp4_safe_receiver * (tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs);
            numBlocksWithScoreResult = numBlocksWithScoreResult + 1 | 0;
          }
          if (element_3.zax_1) {
            numModsComplete = numModsComplete + 1 | 0;
          }
          var tmp6_safe_receiver = element_3.aay_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.wax_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.xax_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.u7x_1);
  }
  function markFor(_this__u8e3s4, maxPoints) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var scaledMarkVal = _this__u8e3s4.bay_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$66(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qsh_1 = _this__u8e3s4;
    this.rsh_1 = params;
  }
  protoOf($loadCOROUTINE$66).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.qsh_1.j6c();
            this.hd_1 = 1;
            suspendResult = this.qsh_1.ysh_1.p54(this.rsh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ssh_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.qsh_1.zsh_1.j7e();
            var tmp_1 = this.ssh_1;
            var tmp0_safe_receiver = tmp_1 instanceof Page ? tmp_1 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c54_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.a96_1;
                var tmp0_safe_receiver_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.f96_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.nje(this.qsh_1.asi_1, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs, this.qsh_1.bsi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var blockResults = suspendResult;
            var tmp3_subject = this.ssh_1;
            var tmp_3;
            if (tmp3_subject instanceof Page) {
              var tmp_4 = this.ssh_1;
              var studentListResultCasted = tmp_4 instanceof Page ? tmp_4 : THROW_CCE();
              var this_0 = studentListResultCasted.c54_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.wax_1;
                  var tmp0_safe_receiver_2 = item.a96_1;
                  if (tmp_5.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.f96_1)) {
                    destination_1.i1(element_0);
                  }
                }
                destination_0.i1(new StudentAndBlockStatuses(item, destination_1));
              }
              tmp_3 = new Page(destination_0, studentListResultCasted.d54_1, studentListResultCasted.e54_1, studentListResultCasted.f54_1, studentListResultCasted.g54_1);
            } else {
              if (tmp3_subject instanceof Error_0) {
                tmp_3 = new Error_0(this.ssh_1.b54_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$67(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ksi_1 = _this__u8e3s4;
    this.lsi_1 = params;
  }
  protoOf($loadHttpCOROUTINE$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 = this.ksi_1.ysh_1;
            tmp_0.msi_1 = isInterface(tmp_1, PagingSourceWithHttpLoader) ? tmp_1 : null;
            if (this.msi_1 == null) {
              this.nsi_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.msi_1.y6e(this.lsi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.nsi_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_elvis_lhs = this.nsi_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.ysh_1 = studentListPagingSource;
    this.zsh_1 = db;
    this.asi_1 = clazzUid;
    this.bsi_1 = accountPersonUid;
  }
  protoOf(ClazzGradebookPagingSource).osi = function (params, $completion) {
    var tmp = new $loadCOROUTINE$66(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).p54 = function (params, $completion) {
    return this.osi(params, $completion);
  };
  protoOf(ClazzGradebookPagingSource).x6e = function (params, $completion) {
    var tmp = new $loadHttpCOROUTINE$67(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).y6e = function (params, $completion) {
    return this.x6e(params, $completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.xsi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).zsi = function (courseBlockList, $completion) {
    var tmp = this.asj(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.zsi((!(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.xsi_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.hsk(this.ysi_1, this.xsi_1.csk_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).asj = function (courseBlockList, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this.xsi_1, completion);
    i.ysi_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.zsi(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.qsk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).yre = function (it, $completion) {
    var tmp = this.zre(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.yre((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.qsk_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.jq6(VOID, VOID, this.rsk_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).zre = function (it, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this.qsk_1, completion);
    i.rsk_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.yre(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.asl_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.asl_1.tqn().p7d().ocl(this.asl_1.bsk_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this.asl_1, null);
            suspendResult = tmp_0.a1c(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.asl_1, completion);
    i.bsl_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.ksl_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.ksl_1.tqn().o7d().b8d(this.ksl_1.bsk_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this.ksl_1, null);
            suspendResult = tmp_0.a1c(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.ksl_1, completion);
    i.lsl_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.usl_1 = $this_launch;
    this.vsl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.usl_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_0(this.vsl_1, null));
          launch(this.usl_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_2(this.vsl_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).l78 = function (completion) {
    return new ClazzGradebookViewModel$slambda$slambda(this.usl_1, this.vsl_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_118() {
    this.wsl_1 = 'Gradebook';
  }
  var Companion_instance_167;
  function Companion_getInstance_135() {
    return Companion_instance_167;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_11(function_0) {
    this.xsl_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_11).t1d = function (value, $completion) {
    return this.xsl_1(value, $completion);
  };
  function ClazzGradebookViewModel$studentPagingSource$lambda(this$0) {
    return function () {
      var tmp = this$0.tqn().t7d();
      return new ClazzGradebookPagingSource(tmp.k93(this$0.bsk_1, 1000, 1, '%', 0, this$0.pqn(), systemTimeInMillis()), this$0.rqn(), this$0.bsk_1, this$0.pqn());
    };
  }
  function ClazzGradebookViewModel$slambda(this$0, resultContinuation) {
    this.gsm_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.gsm_1.sqv_1, ClazzGradebookViewModel$slambda$slambda_0(this.hsm_1, this.gsm_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.gsm_1, completion);
    i.hsm_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_125();
    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.bsk_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.csk_1 = ClazzGradebookViewModel$studentPagingSource$lambda(this);
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, ClazzGradebookViewModel$slambda_0(this, null));
  }
  protoOf(ClazzGradebookViewModel).mqw = function (searchText) {
  };
  protoOf(ClazzGradebookViewModel).nqw = 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.dsk_1 = courseBlocks;
    this.esk_1 = results;
    this.fsk_1 = isFullScreen;
    this.gsk_1 = scale;
  }
  protoOf(ClazzGradebookUiState).ism = function (courseBlocks, results, isFullScreen, scale) {
    return new ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).hsk = function (courseBlocks, results, isFullScreen, scale, $super) {
    courseBlocks = courseBlocks === VOID ? this.dsk_1 : courseBlocks;
    results = results === VOID ? this.esk_1 : results;
    isFullScreen = isFullScreen === VOID ? this.fsk_1 : isFullScreen;
    scale = scale === VOID ? this.gsk_1 : scale;
    return $super === VOID ? this.ism(courseBlocks, results, isFullScreen, scale) : $super.ism.call(this, courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).toString = function () {
    return 'ClazzGradebookUiState(courseBlocks=' + this.dsk_1 + ', results=' + this.esk_1 + ', isFullScreen=' + this.fsk_1 + ', scale=' + this.gsk_1 + ')';
  };
  protoOf(ClazzGradebookUiState).hashCode = function () {
    var result = hashCode(this.dsk_1);
    result = imul(result, 31) + hashCode(this.esk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fsk_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.gsk_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.dsk_1, tmp0_other_with_cast.dsk_1))
      return false;
    if (!equals(this.esk_1, tmp0_other_with_cast.esk_1))
      return false;
    if (!(this.fsk_1 === tmp0_other_with_cast.fsk_1))
      return false;
    if (!equals(this.gsk_1, tmp0_other_with_cast.gsk_1))
      return false;
    return true;
  };
  function get_thumbnailUri(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.icp_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z7y_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.kcp_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gax_1;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    return tmp;
  }
  function maxScoreForBlock(_this__u8e3s4, block) {
    var blockVal = block.hcp_1;
    var tmp;
    var tmp_0 = blockVal == null ? null : blockVal.u7x_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.hcp_1;
          if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w7x_1, blockVal.t7x_1)) {
            var tmp1_safe_receiver = element.hcp_1;
            tmp_2 = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.e7y_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.hcp_1;
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.e7y_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.hcp_1;
            if (equals(tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.w7x_1, blockVal.t7x_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.e7y_1;
    }
    return tmp;
  }
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.rsm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).tsm = function (inviteAndClazz, $completion) {
    var tmp = this.usm(inviteAndClazz, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.tsm((p1 == null ? true : p1 instanceof ClazzInviteAndClazz) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$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.rsm_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              var tmp0_safe_receiver = this.ssm_1;
              if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1) == null)) {
                tmp_0 = Companion_getInstance_97().rq6_1;
              } else {
                tmp_0 = Companion_getInstance_97().qq6_1;
              }
              var nextValue = prevValue.jq6(VOID, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.rsm_1.qsn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.ssm_1;
              var nextValue_0 = prevValue_0.xsn(this.ssm_1, !((tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.p9n_1) == null));
              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(ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda).usm = function (inviteAndClazz, completion) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this.rsm_1, completion);
    i.ssm_1 = inviteAndClazz;
    return i;
  };
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (inviteAndClazz, $completion) {
      return i.tsm(inviteAndClazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.gso_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzInviteRedeemViewModel$lambda$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ClazzInviteRedeemViewModel$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;
            var tmp_0 = this.gso_1.tqn().e7g().k9m(this.gso_1.tsn_1);
            var tmp_1 = ClazzInviteRedeemViewModel$lambda$slambda$slambda$slambda_0(this.gso_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(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(ClazzInviteRedeemViewModel$lambda$slambda$slambda).l78 = function (completion) {
    return new ClazzInviteRedeemViewModel$lambda$slambda$slambda(this.gso_1, completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_clazzInviteRedeemUseCase__c3cagh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ssn_1;
    clazzInviteRedeemUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_119() {
    this.hso_1 = 'ClazzInviteRedeem';
  }
  var Companion_instance_168;
  function Companion_getInstance_136() {
    return Companion_instance_168;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_12(function_0) {
    this.iso_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_12).t1d = function (value, $completion) {
    return this.iso_1(value, $completion);
  };
  function ClazzInviteRedeemViewModel$lambda$slambda(this$0, resultContinuation) {
    this.rso_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$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(ClazzInviteRedeemViewModel$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$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 = whenSubscribed(this.rso_1.qsn_1, ClazzInviteRedeemViewModel$lambda$slambda$slambda_0(this.rso_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(ClazzInviteRedeemViewModel$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda(this.rso_1, completion);
    i.sso_1 = $this$launch;
    return i;
  };
  function ClazzInviteRedeemViewModel$lambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$lambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.bqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.oqn();
      launch(tmp, VOID, VOID, ClazzInviteRedeemViewModel$lambda$slambda_0(this$0, null));
      return Unit_instance;
    };
  }
  function ClazzInviteRedeemViewModel$processDecision$slambda(this$0, $isAccepting, resultContinuation) {
    this.bsp_1 = this$0;
    this.csp_1 = $isAccepting;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteRedeemViewModel$processDecision$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(ClazzInviteRedeemViewModel$processDecision$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteRedeemViewModel$processDecision$slambda).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.bsp_1.qsn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.xsn(VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_clazzInviteRedeemUseCase__c3cagh(this.bsp_1).ipg(this.bsp_1.tsn_1, this.csp_1, this.bsp_1.nqn().goa().vky_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            this.bsp_1.vqn().yq6(new Snack(result.jpg_1));
            Companion_getInstance_140();
            this.bsp_1.zqm_1.iq9('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_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              l$ret$3: do {
                var this_1 = this.bsp_1.qsn_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var tmp0_errorText = stringResourceOrMessage(e, this.bsp_1.xqn());
                  var nextValue_0 = prevValue_0.xsn(VOID, true, tmp0_errorText);
                  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(ClazzInviteRedeemViewModel$processDecision$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzInviteRedeemViewModel$processDecision$slambda(this.bsp_1, this.csp_1, completion);
    i.dsp_1 = $this$launch;
    return i;
  };
  function ClazzInviteRedeemViewModel$processDecision$slambda_0(this$0, $isAccepting, resultContinuation) {
    var i = new ClazzInviteRedeemViewModel$processDecision$slambda(this$0, $isAccepting, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzInviteRedeemViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'ClazzInviteRedeem');
    this.qsn_1 = MutableStateFlow(new ClazzInviteRedeemUiState());
    this.rsn_1 = asStateFlow(this.qsn_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ClazzInviteRedeemUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.ssn_1 = Instance(this_0, tmp$ret$0, null).a5d(this, clazzInviteRedeemUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_125();
    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.tsn_1 = tmp_2;
    Companion_getInstance_125();
    var tmp_3 = mapOf_0(to('inviteCode', this.tsn_1));
    this.mqo(false, tmp_3, ClazzInviteRedeemViewModel$lambda(this));
  }
  protoOf(ClazzInviteRedeemViewModel).esp = function (isAccepting) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.oqn();
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteredeem.ClazzInviteRedeemViewModel.processDecision.<anonymous>' call
    if (this.qsn_1.t2().vsn_1) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, VOID, VOID, ClazzInviteRedeemViewModel$processDecision$slambda_0(this, isAccepting, null));
    }
  };
  function ClazzInviteRedeemUiState(clazzInvite, enabled, errorText) {
    clazzInvite = clazzInvite === VOID ? null : clazzInvite;
    enabled = enabled === VOID ? false : enabled;
    errorText = errorText === VOID ? null : errorText;
    this.usn_1 = clazzInvite;
    this.vsn_1 = enabled;
    this.wsn_1 = errorText;
  }
  protoOf(ClazzInviteRedeemUiState).fsp = function () {
    var tmp0_safe_receiver = this.usn_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j9n_1;
    return tmp === 0;
  };
  protoOf(ClazzInviteRedeemUiState).gsp = function () {
    var tmp;
    if (this.vsn_1) {
      var tmp0_safe_receiver = this.usn_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1;
      var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j9n_1;
      tmp = tmp_0 === 0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzInviteRedeemUiState).hsp = function () {
    var tmp;
    var tmp0_safe_receiver = this.usn_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p9n_1) == null)) {
      var tmp1_safe_receiver = this.usn_1.p9n_1;
      var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j9n_1;
      tmp = !(tmp_0 === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzInviteRedeemUiState).isp = function (clazzInvite, enabled, errorText) {
    return new ClazzInviteRedeemUiState(clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).xsn = function (clazzInvite, enabled, errorText, $super) {
    clazzInvite = clazzInvite === VOID ? this.usn_1 : clazzInvite;
    enabled = enabled === VOID ? this.vsn_1 : enabled;
    errorText = errorText === VOID ? this.wsn_1 : errorText;
    return $super === VOID ? this.isp(clazzInvite, enabled, errorText) : $super.isp.call(this, clazzInvite, enabled, errorText);
  };
  protoOf(ClazzInviteRedeemUiState).toString = function () {
    return 'ClazzInviteRedeemUiState(clazzInvite=' + this.usn_1 + ', enabled=' + this.vsn_1 + ', errorText=' + this.wsn_1 + ')';
  };
  protoOf(ClazzInviteRedeemUiState).hashCode = function () {
    var result = this.usn_1 == null ? 0 : this.usn_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.vsn_1) | 0;
    result = imul(result, 31) + (this.wsn_1 == null ? 0 : getStringHashCode(this.wsn_1)) | 0;
    return result;
  };
  protoOf(ClazzInviteRedeemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteRedeemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteRedeemUiState ? other : THROW_CCE();
    if (!equals(this.usn_1, tmp0_other_with_cast.usn_1))
      return false;
    if (!(this.vsn_1 === tmp0_other_with_cast.vsn_1))
      return false;
    if (!(this.wsn_1 == tmp0_other_with_cast.wsn_1))
      return false;
    return true;
  };
  function clazzInviteRedeemUseCase$factory() {
    return getPropertyCallableRef('clazzInviteRedeemUseCase', 1, KProperty1, function (receiver) {
      return _get_clazzInviteRedeemUseCase__c3cagh(receiver);
    }, null);
  }
  function clazzInviteRedeemUseCase$factory_0() {
    return getPropertyCallableRef('clazzInviteRedeemUseCase', 1, KProperty1, function (receiver) {
      return _get_clazzInviteRedeemUseCase__c3cagh(receiver);
    }, null);
  }
  function _get_parseInviteUseCase__fcfumo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.esq_1;
    parseInviteUseCase$factory_0();
    return this_0.t2();
  }
  function _get_sendClazzInvitesUseCase__utu0z8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fsq_1;
    sendClazzInvitesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_hideKeyboardUseCase__8r7d6l($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ksq_1;
    hideKeyboardUseCase$factory_0();
    return this_0.t2();
  }
  function sendContactsToServer($this, contacts, $completion) {
    var tmp = new $sendContactsToServerCOROUTINE$68($this, contacts, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_120() {
    this.wsq_1 = 'invite_via_contact';
    this.xsq_1 = 'person_role';
    this.ysq_1 = 'clazz_uid';
  }
  var Companion_instance_169;
  function Companion_getInstance_137() {
    return Companion_instance_169;
  }
  function ClazzInviteViaContactViewModel$onClickSend$ref($boundThis) {
    var l = function () {
      $boundThis.zsq();
      return Unit_instance;
    };
    l.callableName = 'onClickSend';
    return l;
  }
  function ClazzInviteViaContactViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.isr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzInviteViaContactViewModel$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(ClazzInviteViaContactViewModel$onClickSend$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzInviteViaContactViewModel$onClickSend$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 tmp0_safe_receiver = _get_hideKeyboardUseCase__8r7d6l(this.isr_1);
            if (tmp0_safe_receiver == null)
              null;
            else {
              tmp0_safe_receiver.rpe();
            }

            this.ksr_1 = this.isr_1.isq_1.t2().osr_1;
            if (this.ksr_1.c1()) {
              this.lsr_1 = this.isr_1.isq_1.t2().psr_1;
              var this_0 = this.lsr_1;
              if (!(this_0 == null ? true : isBlank(this_0))) {
                this.msr_1 = _get_parseInviteUseCase__fcfumo(this.isr_1).np9(this.lsr_1);
                this.hd_1 = 4;
                suspendResult = sendContactsToServer(this.isr_1, this.msr_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 3;
                continue $sm;
              }
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            suspendResult = sendContactsToServer(this.isr_1, this.ksr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            var noContactFoundMessage = this.isr_1.xqn().joj(strings_getInstance().knr_1);
            l$ret$1: do {
              var this_1 = this.isr_1.isq_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.qsr(noContactFoundMessage);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.isr_1.rsr(noContactFoundMessage);
            return Unit_instance;
          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(ClazzInviteViaContactViewModel$onClickSend$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzInviteViaContactViewModel$onClickSend$slambda(this.isr_1, completion);
    i.jsr_1 = $this$launch;
    return i;
  };
  function ClazzInviteViaContactViewModel$onClickSend$slambda_0(this$0, resultContinuation) {
    var i = new ClazzInviteViaContactViewModel$onClickSend$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $sendContactsToServerCOROUTINE$68(_this__u8e3s4, contacts, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tsq_1 = _this__u8e3s4;
    this.usq_1 = contacts;
  }
  protoOf($sendContactsToServerCOROUTINE$68).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.usq_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.tsr_1) {
                destination.i1(element);
              }
            }

            tmp_0.vsq_1 = destination;
            if (this.vsq_1.c1()) {
              var noValidContactFoundMessage = this.tsq_1.xqn().joj(strings_getInstance().jnr_1);
              l$ret$1: do {
                var this_1 = this.tsq_1.isq_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.qsr(noValidContactFoundMessage);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.tsq_1.rsr(noValidContactFoundMessage);
              return Unit_instance;
            }

            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_1 = _get_sendClazzInvitesUseCase__utu0z8(this.tsq_1);
            var this_2 = this.vsq_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();
              destination_0.i1(item.ssr_1);
            }

            suspendResult = tmp_1.jph(new SendClazzInvitesRequest(destination_0, this.tsq_1.gsq_1, this.tsq_1.hsq_1, this.tsq_1.nqn().ro9().lnu_1.f96_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tsq_1.vqn().yq6(new Snack(this.tsq_1.xqn().joj(strings_getInstance().kns_1)));
            Companion_getInstance_204();
            this.tsq_1.zqm_1.jq9('People', true);
            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;
              var tmp_3 = this.tsq_1.vqn();
              var tmp_4 = this.tsq_1.xqn().joj(strings_getInstance().qmi_1);
              var tmp0_elvis_lhs = e.message;
              tmp_3.yq6(new Snack(tmp_4 + ': ' + (tmp0_elvis_lhs == null ? '' : tmp0_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);
  };
  function ClazzInviteViaContactViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'invite_via_contact');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ParseInviteUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.esq_1 = Instance(this, tmp$ret$0, null).a5d(this, parseInviteUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.fsq_1 = Instance(this_0, tmp$ret$2, null).a5d(this, sendClazzInvitesUseCase$factory());
    var tmp_3 = this;
    var tmp0_safe_receiver = savedStateHandle.ba('clazz_uid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.gsq_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_4 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('person_role');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_4.hsq_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    this.isq_1 = MutableStateFlow(new ClazzInviteViaContactUiState());
    this.jsq_1 = asStateFlow(this.isq_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(HideKeyboardUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.ksq_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, hideKeyboardUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, this.xqn().joj(strings_getInstance().fnr_1), VOID, true);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.bqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.<anonymous>' call
        var tmp_7 = this.xqn().joj(strings_getInstance().zml_1);
        var nextValue_0 = prevValue_0.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, ClazzInviteViaContactViewModel$onClickSend$ref(this)));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzInviteViaContactViewModel).zsq = function () {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzInviteViaContactViewModel$onClickSend$slambda_0(this, null));
  };
  protoOf(ClazzInviteViaContactViewModel).rsr = function (error) {
    this.vqn().yq6(new Snack(error));
  };
  protoOf(ClazzInviteViaContactViewModel).vsr = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.isq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onClickChipSubmit.<anonymous>' call
        var nextValue = prevValue.qsr(VOID, plus(prevValue.osr_1, _get_parseInviteUseCase__fcfumo(this).np9(text)));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    return last(tmp$ret$1.osr_1);
  };
  protoOf(ClazzInviteViaContactViewModel).wsr = function (removedChipTexts) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.isq_1.t2().osr_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.inviteviacontact.ClazzInviteViaContactViewModel.onChipsRemoved.<anonymous>' call
      if (!removedChipTexts.a1(element.ssr_1)) {
        destination.i1(element);
      }
    }
    var newChips = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.isq_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onChipsRemoved.<anonymous>' call
        var nextValue = prevValue.qsr(VOID, newChips);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzInviteViaContactViewModel).xsr = function (newValue) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.isq_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.inviteviacontact.ClazzInviteViaContactViewModel.onTextFieldValueChanged.<anonymous>' call
        var nextValue = prevValue.qsr(VOID, VOID, newValue);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function ClazzInviteViaContactUiState(contactError, chips, textFieldValue) {
    contactError = contactError === VOID ? null : contactError;
    chips = chips === VOID ? emptyList() : chips;
    textFieldValue = textFieldValue === VOID ? null : textFieldValue;
    this.nsr_1 = contactError;
    this.osr_1 = chips;
    this.psr_1 = textFieldValue;
  }
  protoOf(ClazzInviteViaContactUiState).ysr = function (contactError, chips, textFieldValue) {
    return new ClazzInviteViaContactUiState(contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).qsr = function (contactError, chips, textFieldValue, $super) {
    contactError = contactError === VOID ? this.nsr_1 : contactError;
    chips = chips === VOID ? this.osr_1 : chips;
    textFieldValue = textFieldValue === VOID ? this.psr_1 : textFieldValue;
    return $super === VOID ? this.ysr(contactError, chips, textFieldValue) : $super.ysr.call(this, contactError, chips, textFieldValue);
  };
  protoOf(ClazzInviteViaContactUiState).toString = function () {
    return 'ClazzInviteViaContactUiState(contactError=' + this.nsr_1 + ', chips=' + this.osr_1 + ', textFieldValue=' + this.psr_1 + ')';
  };
  protoOf(ClazzInviteViaContactUiState).hashCode = function () {
    var result = this.nsr_1 == null ? 0 : getStringHashCode(this.nsr_1);
    result = imul(result, 31) + hashCode(this.osr_1) | 0;
    result = imul(result, 31) + (this.psr_1 == null ? 0 : getStringHashCode(this.psr_1)) | 0;
    return result;
  };
  protoOf(ClazzInviteViaContactUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteViaContactUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteViaContactUiState ? other : THROW_CCE();
    if (!(this.nsr_1 == tmp0_other_with_cast.nsr_1))
      return false;
    if (!equals(this.osr_1, tmp0_other_with_cast.osr_1))
      return false;
    if (!(this.psr_1 == tmp0_other_with_cast.psr_1))
      return false;
    return true;
  };
  function InviteViaContactChip(text, isValid, inviteType) {
    this.ssr_1 = text;
    this.tsr_1 = isValid;
    this.usr_1 = inviteType;
  }
  protoOf(InviteViaContactChip).toString = function () {
    return 'InviteViaContactChip(text=' + this.ssr_1 + ', isValid=' + this.tsr_1 + ', inviteType=' + this.usr_1 + ')';
  };
  protoOf(InviteViaContactChip).hashCode = function () {
    var result = getStringHashCode(this.ssr_1);
    result = imul(result, 31) + getBooleanHashCode(this.tsr_1) | 0;
    result = imul(result, 31) + this.usr_1 | 0;
    return result;
  };
  protoOf(InviteViaContactChip).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof InviteViaContactChip))
      return false;
    var tmp0_other_with_cast = other instanceof InviteViaContactChip ? other : THROW_CCE();
    if (!(this.ssr_1 === tmp0_other_with_cast.ssr_1))
      return false;
    if (!(this.tsr_1 === tmp0_other_with_cast.tsr_1))
      return false;
    if (!(this.usr_1 === tmp0_other_with_cast.usr_1))
      return false;
    return true;
  };
  function parseInviteUseCase$factory() {
    return getPropertyCallableRef('parseInviteUseCase', 1, KProperty1, function (receiver) {
      return _get_parseInviteUseCase__fcfumo(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8(receiver);
    }, null);
  }
  function hideKeyboardUseCase$factory() {
    return getPropertyCallableRef('hideKeyboardUseCase', 1, KProperty1, function (receiver) {
      return _get_hideKeyboardUseCase__8r7d6l(receiver);
    }, null);
  }
  function parseInviteUseCase$factory_0() {
    return getPropertyCallableRef('parseInviteUseCase', 1, KProperty1, function (receiver) {
      return _get_parseInviteUseCase__fcfumo(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory_0() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8(receiver);
    }, null);
  }
  function hideKeyboardUseCase$factory_0() {
    return getPropertyCallableRef('hideKeyboardUseCase', 1, KProperty1, function (receiver) {
      return _get_hideKeyboardUseCase__8r7d6l(receiver);
    }, null);
  }
  function _get_makeLinkUseCase__qbv742($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wss_1;
    makeLinkUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setClipboardStringUseCase__31i1s1_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yss_1;
    setClipboardStringUseCase$factory_2();
    return this_0.t2();
  }
  function _get_shareTextUseCase__god44g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zss_1;
    shareTextUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_121() {
    this.bst_1 = 'InviteWithLink';
  }
  var Companion_instance_170;
  function Companion_getInstance_138() {
    return Companion_instance_170;
  }
  function ClazzInviteViaLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'InviteWithLink');
    this.uss_1 = MutableStateFlow(new ClazzInviteViaLinkUiState());
    this.vss_1 = asStateFlow(this.uss_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.wss_1 = Instance(this_0, tmp$ret$0, null).a5d(this, makeLinkUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_125();
    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.xss_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.yss_1 = Instance(this, tmp$ret$2, null).a5d(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.zss_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(this, shareTextUseCase$factory());
    var tmp_7 = this;
    var tmp_8 = _get_makeLinkUseCase__qbv742(this);
    Companion_getInstance_125();
    tmp_7.ast_1 = tmp_8.kpi('JoinWithCode', mapOf_0(to('inviteCode', this.xss_1)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.ClazzInviteViaLinkViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().an9_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.uss_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.ClazzInviteViaLinkViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.est(this.ast_1, !(_get_shareTextUseCase__god44g(this) == null));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzInviteViaLinkViewModel).fst = function () {
    _get_setClipboardStringUseCase__31i1s1_0(this).pp1(this.ast_1);
    this.vqn().yq6(new Snack(this.xqn().joj(strings_getInstance().vn8_1)));
  };
  function ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton) {
    inviteLink = inviteLink === VOID ? null : inviteLink;
    showShareLinkButton = showShareLinkButton === VOID ? false : showShareLinkButton;
    this.cst_1 = inviteLink;
    this.dst_1 = showShareLinkButton;
  }
  protoOf(ClazzInviteViaLinkUiState).est = function (inviteLink, showShareLinkButton) {
    return new ClazzInviteViaLinkUiState(inviteLink, showShareLinkButton);
  };
  protoOf(ClazzInviteViaLinkUiState).toString = function () {
    return 'ClazzInviteViaLinkUiState(inviteLink=' + this.cst_1 + ', showShareLinkButton=' + this.dst_1 + ')';
  };
  protoOf(ClazzInviteViaLinkUiState).hashCode = function () {
    var result = this.cst_1 == null ? 0 : getStringHashCode(this.cst_1);
    result = imul(result, 31) + getBooleanHashCode(this.dst_1) | 0;
    return result;
  };
  protoOf(ClazzInviteViaLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzInviteViaLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzInviteViaLinkUiState ? other : THROW_CCE();
    if (!(this.cst_1 == tmp0_other_with_cast.cst_1))
      return false;
    if (!(this.dst_1 === tmp0_other_with_cast.dst_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.dsu_1;
    requestEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_122() {
    this.esu_1 = 'JoinWithCode';
  }
  var Companion_instance_171;
  function Companion_getInstance_139() {
    return Companion_instance_171;
  }
  function JoinWithCodeViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.bqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jq6(VOID, VOID, this$0.xqn().joj(strings_getInstance().knj_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.bsu_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onClickJoin.<anonymous>.<anonymous>' call
          var nextValue = prevValue.isu(VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation) {
    this.rsu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).m78 = function ($completion) {
    return this.j87($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.rsu_1);
            var tmp_1 = this.rsu_1.bsu_1.t2().gsu_1;
            var tmp_2 = this.rsu_1.nqn().ro9().lnu_1;
            suspendResult = tmp_0.op1(tmp_1, tmp_2, 1000, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rsu_1.vqn().yq6(new Snack(this.rsu_1.xqn().joj(strings_getInstance().knn_1)));
            if (!(this.rsu_1.yqn() == null)) {
              this.rsu_1.iqt(null);
            } else {
              Companion_getInstance_140();
              this.rsu_1.zqm_1.iq9('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().qno_1;
              } else {
                if (e instanceof AlreadyHasPendingRequestException) {
                  tmp_4 = strings_getInstance().jnn_1;
                } else {
                  if (e instanceof AlreadyEnroledInClassException) {
                    tmp_4 = strings_getInstance().wna_1;
                  } else {
                    tmp_4 = strings_getInstance().qmi_1;
                  }
                }
              }
              var errorMessage = tmp_4;
              l$ret$1: do {
                var this_0 = this.rsu_1.bsu_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_5 = this.rsu_1.xqn().joj(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.isu(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).l78 = function (completion) {
    return new JoinWithCodeViewModel$onClickJoin$slambda(this.rsu_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function JoinWithCodeViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'JoinWithCode');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    tmp.bsu_1 = MutableStateFlow(new JoinWithCodeUiState(VOID, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
    this.csu_1 = asStateFlow(this.bsu_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.dsu_1 = Instance(this_0, tmp$ret$0, null).a5d(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_125();
    this.kqo(this_1, 'inviteCode');
    var tmp_2 = this_1.f3();
    this.nqo(VOID, tmp_2, JoinWithCodeViewModel$lambda(this));
  }
  protoOf(JoinWithCodeViewModel).ssu = function (codeVal) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bsu_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onCodeValueChange.<anonymous>' call
        var nextValue = prevValue.isu(null, codeVal);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(JoinWithCodeViewModel).tsu = function () {
    var tmp = JoinWithCodeViewModel$onClickJoin$lambda(this);
    this.kqu(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.fsu_1 = codeError;
    this.gsu_1 = code;
    this.hsu_1 = fieldsEnabled;
  }
  protoOf(JoinWithCodeUiState).usu = function (codeError, code, fieldsEnabled) {
    return new JoinWithCodeUiState(codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).isu = function (codeError, code, fieldsEnabled, $super) {
    codeError = codeError === VOID ? this.fsu_1 : codeError;
    code = code === VOID ? this.gsu_1 : code;
    fieldsEnabled = fieldsEnabled === VOID ? this.hsu_1 : fieldsEnabled;
    return $super === VOID ? this.usu(codeError, code, fieldsEnabled) : $super.usu.call(this, codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).toString = function () {
    return 'JoinWithCodeUiState(codeError=' + this.fsu_1 + ', code=' + this.gsu_1 + ', fieldsEnabled=' + this.hsu_1 + ')';
  };
  protoOf(JoinWithCodeUiState).hashCode = function () {
    var result = this.fsu_1 == null ? 0 : getStringHashCode(this.fsu_1);
    result = imul(result, 31) + getStringHashCode(this.gsu_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hsu_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.fsu_1 == tmp0_other_with_cast.fsu_1))
      return false;
    if (!(this.gsu_1 === tmp0_other_with_cast.gsu_1))
      return false;
    if (!(this.hsu_1 === tmp0_other_with_cast.hsu_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.dsv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda).iqf = function (hasPermission, $completion) {
    var tmp = this.jqf(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.iqf((!(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.dsv_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_newClazzListOptionVisible = this.esv_1 ? this.dsv_1.xqv().equals(ListViewMode_PICKER_getInstance()) : false;
              var nextValue = prevValue.qsv(tmp0_newClazzListOptionVisible, VOID, VOID, VOID, VOID, VOID, this.esv_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).jqf = function (hasPermission, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this.dsv_1, completion);
    i.esv_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.iqf(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.zsv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.zsv_1.tqn().p7f();
            var tmp_1 = this.zsv_1.nqn().goa().vky_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.ui0(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_0(this.zsv_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_13(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).l78 = function (completion) {
    return new ClazzListViewModel$slambda$slambda(this.zsv_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.isw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).ksw = function (it, $completion) {
    var tmp = this.lsw(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.ksw((!(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.isw_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.qsv(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.jsw_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).lsw = function (it, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this.isw_1, completion);
    i.jsw_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.ksw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.usw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($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.usw_1.tqn().n7f();
            var tmp_1 = this.usw_1.pqn();
            var tmp_2 = tmp_0.tex(tmp_1, 1);
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_2(this.usw_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_13(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).l78 = function (completion) {
    return new ClazzListViewModel$slambda$slambda_1(this.usw_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_123() {
    Companion_instance_172 = this;
    this.vsw_1 = 'CourseList';
    this.wsw_1 = 'CourseListHome';
    this.xsw_1 = listOf(['CourseList', 'CourseListHome']);
    this.ysw_1 = 'excludeAlreadySelectedClazzList';
  }
  var Companion_instance_172;
  function Companion_getInstance_140() {
    if (Companion_instance_172 == null)
      new Companion_123();
    return Companion_instance_172;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_13(function_0) {
    this.zsw_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_13).t1d = function (value, $completion) {
    return this.zsw_1(value, $completion);
  };
  function ClazzListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().o7d().w8c(toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_1), this$0.nqn().goa().vky_1, this$0.asy_1, this$0.sqv_1.t2().isv_1.qqc_1, this$0.sqv_1.t2().ksv_1, systemTimeInMillis(), this$0.bsy_1);
    };
  }
  function ClazzListViewModel$slambda(this$0, resultContinuation) {
    this.lsy_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.lsy_1.sqv_1, ClazzListViewModel$slambda$slambda_0(this.lsy_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.lsy_1, completion);
    i.msy_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.vsy_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.vsy_1.sqv_1, ClazzListViewModel$slambda$slambda_2(this.vsy_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.vsy_1, completion);
    i.wsy_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.fsz_1 = this$0;
    this.gsz_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.fsz_1.tqn().n7f();
            var tmp_1 = this.gsz_1.key_1;
            suspendResult = tmp_0.uex(tmp_1, 4, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.fsz_1.vqn().yq6(new Snack(this.fsz_1.xqn().joj(strings_getInstance().lnn_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.fsz_1, this.gsz_1, completion);
    i.hsz_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_140();
    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.asy_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_116();
    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.bsy_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.csy_1 = ClazzListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        var tmp0_searchState = this.bqx();
        var tmp1_title = this.jqx(strings_getInstance().wni_1, strings_getInstance().wni_1);
        var tmp2_fabState = this.eqx(!this.pqn().equals(new Long(0, 0)), strings_getInstance().xni_1);
        var nextValue = prevValue.jq6(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.sqv_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.xqn().joj(get_dayStringResource(element_0));
          result.s(element_0, tmp$ret$11);
        }
        var tmp1_clazzList = this.csy_1;
        var nextValue_0 = prevValue_0.qsv(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.oqn();
    launch(tmp_6, VOID, VOID, ClazzListViewModel$slambda_0(this, null));
    var tmp_7 = this.oqn();
    launch(tmp_7, VOID, VOID, ClazzListViewModel$slambda_2(this, null));
  }
  protoOf(ClazzListViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).nqw = function () {
    this.gqx('CourseEdit');
  };
  protoOf(ClazzListViewModel).isz = function () {
    Companion_getInstance_116();
    Companion_getInstance_4();
    this.zqm_1.kp6('JoinWithCode', mapOf_0(to('argCodeTable', (6).toString())));
  };
  protoOf(ClazzListViewModel).jsz = function (entry) {
    this.iqx('Course', entry.r8d_1, entry);
  };
  protoOf(ClazzListViewModel).ksz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.qsv(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).lsz = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.qsv(VOID, VOID, VOID, VOID, VOID, filterOption.mq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).msz = function (enrolmentRequest) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this, enrolmentRequest, null));
  };
  function Companion_124() {
    Companion_instance_173 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().pmk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().pmk_1;
    var tmp_3 = new SortOrderOption(tmp_2, 2, false);
    var tmp_4 = strings_getInstance().lml_1;
    var tmp_5 = new SortOrderOption(tmp_4, 3, true);
    var tmp_6 = strings_getInstance().lml_1;
    tmp.nsz_1 = listOf([tmp_1, tmp_3, tmp_5, new SortOrderOption(tmp_6, 4, false)]);
  }
  var Companion_instance_173;
  function Companion_getInstance_141() {
    if (Companion_instance_173 == null)
      new Companion_124();
    return Companion_instance_173;
  }
  function ClazzListUiState$_init_$lambda_r0y0x0() {
    return new EmptyPagingSource();
  }
  function ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    Companion_getInstance_141();
    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_141().nsz_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().mnj_1;
      tmp_1 = listOf([new MessageIdOption2(tmp_2, 5), new MessageIdOption2(strings_getInstance().zmz_1, 0)]);
    } else {
      tmp_1 = filterOptions;
    }
    filterOptions = tmp_1;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    this.fsv_1 = newClazzListOptionVisible;
    this.gsv_1 = clazzList;
    this.hsv_1 = sortOptions;
    this.isv_1 = activeSortOrderOption;
    this.jsv_1 = fieldsEnabled;
    this.ksv_1 = selectedChipId;
    this.lsv_1 = canAddNewCourse;
    this.msv_1 = pendingEnrolments;
    this.nsv_1 = filterOptions;
    this.osv_1 = dayOfWeekStrings;
    this.psv_1 = localDateTimeNow;
  }
  protoOf(ClazzListUiState).osz = 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).qsv = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow, $super) {
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? this.fsv_1 : newClazzListOptionVisible;
    clazzList = clazzList === VOID ? this.gsv_1 : clazzList;
    sortOptions = sortOptions === VOID ? this.hsv_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.isv_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.jsv_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.ksv_1 : selectedChipId;
    canAddNewCourse = canAddNewCourse === VOID ? this.lsv_1 : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? this.msv_1 : pendingEnrolments;
    filterOptions = filterOptions === VOID ? this.nsv_1 : filterOptions;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.osv_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.psv_1 : localDateTimeNow;
    return $super === VOID ? this.osz(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) : $super.osz.call(this, newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).toString = function () {
    return 'ClazzListUiState(newClazzListOptionVisible=' + this.fsv_1 + ', clazzList=' + this.gsv_1 + ', sortOptions=' + this.hsv_1 + ', activeSortOrderOption=' + this.isv_1 + ', fieldsEnabled=' + this.jsv_1 + ', selectedChipId=' + this.ksv_1 + ', canAddNewCourse=' + this.lsv_1 + ', pendingEnrolments=' + this.msv_1 + ', filterOptions=' + this.nsv_1 + ', dayOfWeekStrings=' + this.osv_1 + ', localDateTimeNow=' + this.psv_1 + ')';
  };
  protoOf(ClazzListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.fsv_1);
    result = imul(result, 31) + hashCode(this.gsv_1) | 0;
    result = imul(result, 31) + hashCode(this.hsv_1) | 0;
    result = imul(result, 31) + this.isv_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jsv_1) | 0;
    result = imul(result, 31) + this.ksv_1 | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lsv_1) | 0;
    result = imul(result, 31) + hashCode(this.msv_1) | 0;
    result = imul(result, 31) + hashCode(this.nsv_1) | 0;
    result = imul(result, 31) + hashCode(this.osv_1) | 0;
    result = imul(result, 31) + this.psv_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.fsv_1 === tmp0_other_with_cast.fsv_1))
      return false;
    if (!equals(this.gsv_1, tmp0_other_with_cast.gsv_1))
      return false;
    if (!equals(this.hsv_1, tmp0_other_with_cast.hsv_1))
      return false;
    if (!this.isv_1.equals(tmp0_other_with_cast.isv_1))
      return false;
    if (!(this.jsv_1 === tmp0_other_with_cast.jsv_1))
      return false;
    if (!(this.ksv_1 === tmp0_other_with_cast.ksv_1))
      return false;
    if (!(this.lsv_1 === tmp0_other_with_cast.lsv_1))
      return false;
    if (!equals(this.msv_1, tmp0_other_with_cast.msv_1))
      return false;
    if (!equals(this.nsv_1, tmp0_other_with_cast.nsv_1))
      return false;
    if (!equals(this.osv_1, tmp0_other_with_cast.osv_1))
      return false;
    if (!this.psv_1.equals(tmp0_other_with_cast.psv_1))
      return false;
    return true;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).zsz = function (entity, permissions, $completion) {
    var tmp = this.at0(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.zsz(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.xsz_1;
          var tmp_0;
          if (this.ysz_1.hdn_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return new Pair(tmp_0, this.ysz_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).at0 = function (entity, permissions, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.xsz_1 = entity;
    i.ysz_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.zsz(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.jt0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).qt0 = function (it, $completion) {
    var tmp = this.rt0(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.qt0(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.lt0_1 = this.kt0_1;
            this.mt0_1 = this.lt0_1.y6();
            this.nt0_1 = this.lt0_1.z6();
            this.ot0_1 = this.nt0_1;
            this.pt0_1 = this.ot0_1.z6();
            l$ret$1: do {
              var this_0 = this.jt0_1.ot1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.mt0_1 == null)) {
                  tmp_0 = CoursePermissionConstants_getInstance().xrf_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.tt1(this.mt0_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.jt0_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jq6(prevValue_0.uq5_1.pq6(this.pt0_1));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.mt0_1 == null)) {
              this.hd_1 = 1;
              suspendResult = getTitleForCoursePermission(this.jt0_1, this.mt0_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.jt0_1.bqn_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.jq6(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).rt0 = function (it, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.jt0_1, completion);
    i.kt0_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.qt0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.ct2_1 = $entityFlow;
    this.dt2_1 = $permissionFlow;
    this.et2_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.ct2_1, this.dt2_1, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            suspendResult = collectLatest(tmp_0, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.et2_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.ct2_1, this.dt2_1, this.et2_1, completion);
    i.ft2_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.ot2_1 = $this_launch;
    this.pt2_1 = $entityFlow;
    this.qt2_1 = $permissionFlow;
    this.rt2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.ot2_1, VOID, VOID, CoursePermissionDetailViewModel$slambda$slambda$slambda_0(this.pt2_1, this.qt2_1, this.rt2_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).l78 = function (completion) {
    return new CoursePermissionDetailViewModel$slambda$slambda(this.ot2_1, this.pt2_1, this.qt2_1, this.rt2_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.j87($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_125();
    var tmp0_safe_receiver = $this.ot1_1.t2().rt1_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zdk_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_125();
    $this.kqo(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    $this.zqm_1.kp6('CoursePermissionEdit', tmp$ret$2);
  }
  function Companion_125() {
    this.st2_1 = 'CoursePermissionDetail';
  }
  var Companion_instance_174;
  function Companion_getInstance_142() {
    return Companion_instance_174;
  }
  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.bt3_1 = this$0;
    this.ct3_1 = $entityFlow;
    this.dt3_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.bt3_1.ot1_1, CoursePermissionDetailViewModel$slambda$slambda_0(this.et3_1, this.ct3_1, this.dt3_1, this.bt3_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.bt3_1, this.ct3_1, this.dt3_1, completion);
    i.et3_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.ot1_1 = MutableStateFlow(new CoursePermissionDetailUiState());
    this.pt1_1 = asStateFlow(this.ot1_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.qt1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var entityFlow = this.tqn().o7f().p7s(this.rqm_1, this.qt1_1);
    var tmp_0 = this.tqn().o7f();
    var tmp_1 = this.pqn();
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = tmp_0.gdk(tmp_1, this.qt1_1, tmp_2, new Long(2, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.<anonymous>' call
        var tmp_3 = this.xqn().joj(strings_getInstance().tmv_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.jq6(new FabUiState(VOID, tmp_3, tmp_4, CoursePermissionDetailViewModel$onClickEdit$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.oqn();
    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.rt1_1 = coursePermission;
    this.st1_1 = permissionLabels;
  }
  protoOf(CoursePermissionDetailUiState).tt1 = function (coursePermission, permissionLabels) {
    return new CoursePermissionDetailUiState(coursePermission, permissionLabels);
  };
  protoOf(CoursePermissionDetailUiState).toString = function () {
    return 'CoursePermissionDetailUiState(coursePermission=' + this.rt1_1 + ', permissionLabels=' + this.st1_1 + ')';
  };
  protoOf(CoursePermissionDetailUiState).hashCode = function () {
    var result = this.rt1_1 == null ? 0 : this.rt1_1.hashCode();
    result = imul(result, 31) + hashCode(this.st1_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.rt1_1, tmp0_other_with_cast.rt1_1))
      return false;
    if (!equals(this.st1_1, tmp0_other_with_cast.st1_1))
      return false;
    return true;
  };
  function CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.nt3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda).pt3 = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.pt3(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.ot3_1.o7f().cdk(this.nt3_1.fqt_1, this.nt3_1.pt4_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).vny = function (db, completion) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this.nt3_1, completion);
    i.ot3_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.pt3(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.yt4_1 = this$0;
    this.zt4_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).sdq = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.sdq($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.yt4_1.rqn());
            Companion_getInstance_5();
            suspendResult = tmp_0.o62(10012, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            Companion_getInstance_125();
            var tmp0_safe_receiver = this.zt4_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.zt4_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_125();
            var tmp4_safe_receiver = this.zt4_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).l78 = function (completion) {
    return new CoursePermissionEditViewModel$slambda$slambda_1(this.yt4_1, this.zt4_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.sdq($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.nt4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.dt5(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.mt5_1 = this$0;
    this.nt5_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.mt5_1.tqn().o7f().ddk(this.nt5_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).vny = function (it, completion) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this.mt5_1, this.nt5_1, completion);
    i.ot5_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_126() {
    this.pt5_1 = 'CoursePermissionEdit';
    this.qt5_1 = 'grantToRole';
  }
  var Companion_instance_175;
  function Companion_getInstance_143() {
    return Companion_instance_175;
  }
  function CoursePermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.zt5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda).jsc = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.at6_1.o7f();
            var tmp_1 = this.zt5_1.pqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.zt5_1.pt4_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).vny = function (it, completion) {
    var i = new CoursePermissionEditViewModel$slambda(this.zt5_1, completion);
    i.at6_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.jsc(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.nt4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.dt5(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.jt6_1 = this$0;
    this.kt6_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().n4r();
            var tmp_1 = CoursePermissionEditViewModel$slambda$slambda_0(this.jt6_1, null);
            var tmp_2 = CoursePermissionEditViewModel$slambda$slambda_2(this.jt6_1, this.kt6_1, null);
            suspendResult = this.jt6_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, CoursePermissionEditViewModel$slambda$lambda(this.jt6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$1: do {
              var this_0 = this.jt6_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.jt6_1.xqn().joj(strings_getInstance().hn3_1);
                var nextValue = prevValue.jq6(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, CoursePermissionEditViewModel$onClickSave$ref(this.jt6_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.jt6_1.nt4_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.dt5(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.jt6_1, this.kt6_1, completion);
    i.lt6_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.nt4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.dt5(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.vt6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($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.vt6_1.nt4_1.t2().at5_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

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

            continue $sm;
          case 1:
            Companion_getInstance_116();
            var popUpToOnFinish = this.vt6_1.xqm_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.vt6_1.zqm_1.jq9(popUpToOnFinish, false);
            } else {
              this.vt6_1.hqt('CoursePermissionDetail', this.wt6_1.zdk_1, this.wt6_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).l78 = function (completion) {
    return new CoursePermissionEditViewModel$onClickSave$slambda(this.vt6_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CoursePermissionEdit');
    this.nt4_1 = MutableStateFlow(new CoursePermissionEditUiState());
    this.ot4_1 = asStateFlow(this.nt4_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.pt4_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.nt4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.dt5(VOID, VOID, CoursePermissionConstants_getInstance().xrf_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_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.jq6(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.jqo(tmp_0, VOID, tmp_1, CoursePermissionEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(CoursePermissionEditViewModel).xt6 = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nt4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onTogglePermission.<anonymous>' call
        var entityVal = prevValue.at5_1;
        var tmp;
        if (!(entityVal == null)) {
          tmp = prevValue.dt5(entityVal.ckn(VOID, VOID, VOID, VOID, VOID, VOID, toggleFlag(entityVal.fdl_1, flag)));
        } else {
          tmp = prevValue;
        }
        var nextValue = tmp;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(CoursePermissionEditViewModel).xs9 = function () {
    var tmp = CoursePermissionEditViewModel$onClickSave$lambda(this);
    this.kqu(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.at5_1 = entity;
    this.bt5_1 = fieldsEnabled;
    this.ct5_1 = permissionLabels;
  }
  protoOf(CoursePermissionEditUiState).yt6 = function (entity, fieldsEnabled, permissionLabels) {
    return new CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).dt5 = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.at5_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.bt5_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.ct5_1 : permissionLabels;
    return $super === VOID ? this.yt6(entity, fieldsEnabled, permissionLabels) : $super.yt6.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).toString = function () {
    return 'CoursePermissionEditUiState(entity=' + this.at5_1 + ', fieldsEnabled=' + this.bt5_1 + ', permissionLabels=' + this.ct5_1 + ')';
  };
  protoOf(CoursePermissionEditUiState).hashCode = function () {
    var result = this.at5_1 == null ? 0 : this.at5_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.bt5_1) | 0;
    result = imul(result, 31) + hashCode(this.ct5_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.at5_1, tmp0_other_with_cast.at5_1))
      return false;
    if (!(this.bt5_1 === tmp0_other_with_cast.bt5_1))
      return false;
    if (!equals(this.ct5_1, tmp0_other_with_cast.ct5_1))
      return false;
    return true;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ht7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).jt7 = function (it, $completion) {
    var tmp = this.kt7(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.jt7(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.it7_1;
          var hasViewPermission = tmp0_container.y6();
          var hasEditPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.ht7_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp1_permissionLabels = CoursePermissionConstants_getInstance().xrf_1;
              var this_1 = this.ht7_1.mt8_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.rt8(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.ht7_1.bqn_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var nextValue_0 = prevValue_0.jq6(prevValue_0.uq5_1.pq6(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).kt7 = function (it, completion) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this.ht7_1, completion);
    i.it7_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.jt7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.at9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.at9_1.tqn().o7f();
            var tmp_1 = this.at9_1.pqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.at9_1.lt8_1, tmp_2, new Long(2, 0)));
            var tmp_4 = CoursePermissionListViewModel$slambda$slambda$slambda_0(this.at9_1, null);
            suspendResult = tmp_3.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_14(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).l78 = function (completion) {
    return new CoursePermissionListViewModel$slambda$slambda(this.at9_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_127() {
    this.bt9_1 = 'CoursePermissionList';
    this.ct9_1 = 'permissionResult';
  }
  var Companion_instance_176;
  function Companion_getInstance_144() {
    return Companion_instance_176;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_14(function_0) {
    this.dt9_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_14).t1d = function (value, $completion) {
    return this.dt9_1(value, $completion);
  };
  function CoursePermissionListViewModel$pagingSource$lambda(this$0) {
    return function () {
      return this$0.tqn().o7f().bdk(this$0.lt8_1, false);
    };
  }
  function CoursePermissionListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.nqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CoursePermissionListViewModel$slambda(this$0, resultContinuation) {
    this.mt9_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.mt9_1.sqv_1, CoursePermissionListViewModel$slambda$slambda_0(this.mt9_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.mt9_1, completion);
    i.nt9_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.wt9_1 = this$0;
    this.xt9_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.wt9_1.tqn().o7f().eca(this.xt9_1.zdk_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.wt9_1, this.xt9_1, completion);
    i.yt9_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_116();
    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.lt8_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.mt8_1 = CoursePermissionListViewModel$pagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.<anonymous>' call
        var tmp3_title = this.xqn().joj(strings_getInstance().ln1_1);
        var tmp0_text = this.xqn().joj(strings_getInstance().ln1_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.jq6(tmp4_fabState, VOID, tmp3_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, CoursePermissionListViewModel$slambda_0(this, null));
  }
  protoOf(CoursePermissionListViewModel).mqw = function (searchText) {
  };
  protoOf(CoursePermissionListViewModel).nqw = function () {
    Companion_getInstance_116();
    var tmp = to('clazzUid', this.lt8_1.toString());
    Companion_getInstance_116();
    var goToOnPersonSelectedArg = appendQueryArgs('CoursePermissionEdit', mapOf([tmp, to('popUpToOnFinish', this.yqm_1)]));
    Companion_getInstance_204();
    var tmp_0 = Companion_getInstance_5().n4r();
    // 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_116();
    this_0.s('listMode', ListViewMode_PICKER_getInstance().wqj_1);
    this_0.s('goToOnPersonSelected', goToOnPersonSelectedArg);
    var tmp$ret$2 = this_0.f3();
    this.fqo('People', 'permissionResult', null, tmp_0, tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).zt9 = 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_125();
    this_0.s('entityUid', coursePermission.zdk_1.toString());
    Companion_getInstance_125();
    this.kqo(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    this.zqm_1.kp6('CoursePermissionDetail', tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).ata = function (coursePermission) {
    var tmp = this.oqn();
    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.nt8_1 = permissionsList;
    this.ot8_1 = permissionLabels;
    this.pt8_1 = courseTerminology;
    this.qt8_1 = showDeleteOption;
  }
  protoOf(CoursePermissionListUiState).bta = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    return new CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).rt8 = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption, $super) {
    permissionsList = permissionsList === VOID ? this.nt8_1 : permissionsList;
    permissionLabels = permissionLabels === VOID ? this.ot8_1 : permissionLabels;
    courseTerminology = courseTerminology === VOID ? this.pt8_1 : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? this.qt8_1 : showDeleteOption;
    return $super === VOID ? this.bta(permissionsList, permissionLabels, courseTerminology, showDeleteOption) : $super.bta.call(this, permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).toString = function () {
    return 'CoursePermissionListUiState(permissionsList=' + this.nt8_1 + ', permissionLabels=' + this.ot8_1 + ', courseTerminology=' + this.pt8_1 + ', showDeleteOption=' + this.qt8_1 + ')';
  };
  protoOf(CoursePermissionListUiState).hashCode = function () {
    var result = hashCode(this.nt8_1);
    result = imul(result, 31) + hashCode(this.ot8_1) | 0;
    result = imul(result, 31) + (this.pt8_1 == null ? 0 : hashCode(this.pt8_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qt8_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.nt8_1, tmp0_other_with_cast.nt8_1))
      return false;
    if (!equals(this.ot8_1, tmp0_other_with_cast.ot8_1))
      return false;
    if (!equals(this.pt8_1, tmp0_other_with_cast.pt8_1))
      return false;
    if (!(this.qt8_1 === tmp0_other_with_cast.qt8_1))
      return false;
    return true;
  };
  function avatarName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.r7v_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.s7v_1;
    } else {
      tmp = _this__u8e3s4.r7v_1.toString();
    }
    return tmp;
  }
  function avatarColorName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.r7v_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.s7v_1;
    } else {
      tmp = _this__u8e3s4.r7v_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().bnh_1;
    TextLimitType_LIMIT_WORDS_instance = new TextLimitType('LIMIT_WORDS', 0, tmp, 1);
    var tmp_0 = strings_getInstance().cnh_1;
    TextLimitType_LIMIT_CHARS_instance = new TextLimitType('LIMIT_CHARS', 1, tmp_0, 2);
  }
  var MarkingType_TEACHER_instance;
  var MarkingType_PEERS_instance;
  function Companion_128() {
  }
  protoOf(Companion_128).nkb = 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.eta_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_2(values_3()) : tmp0_elvis_lhs;
  };
  var Companion_instance_177;
  function Companion_getInstance_145() {
    return Companion_instance_177;
  }
  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.hta_1 = stringResource;
    this.ita_1 = value;
  }
  function MarkingType(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.eta_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().pn6_1);
    Companion_getInstance_1();
    var tmp_1 = to(2, strings_getInstance().on6_1);
    Companion_getInstance_1();
    tmp.jta_1 = mapOf([tmp_0, tmp_1, to(0, strings_getInstance().qn6_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.lad_1.c7(new Long(0, 0)) > 0) {
      var tmp_0 = _this__u8e3s4.lad_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.fcb_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.dcb_1;
    var tmp_0 = tmp1_elvis_lhs == null ? 'application/octet-stream' : tmp1_elvis_lhs;
    var tmp2_elvis_lhs = _this__u8e3s4.ecb_1;
    return new OpenBlobItem(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, toLong(_this__u8e3s4.gcb_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.rbw_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1;
        var tmp1_safe_receiver = element.rbw_1;
        if (equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ibw_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().rbw_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.obw_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().rbw_1;
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.obw_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.rbw_1;
      if (equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.obw_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.rbw_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lbw_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.wkc_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.rbw_1;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.nbw_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.xkc_1 = roundToInt(tmp$ret$3 / latestUnique.u());
    return this_0;
  }
  function _no_name_provided__qut3iv_6($this) {
    this.kta_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_6).o = function () {
    return this.kta_1.w();
  };
  protoOf(_no_name_provided__qut3iv_6).lta = function (element) {
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
    var tmp0_safe_receiver = element.rbw_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1;
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  };
  protoOf(_no_name_provided__qut3iv_6).p = function (element) {
    return this.lta(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.wcb_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zca_1, item.kc2_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.mta_1 = block;
    this.nta_1 = assignmentMark;
    this.ota_1 = assignmentStatus;
  }
  protoOf(UstadAssignmentSubmissionHeaderUiState).toString = function () {
    return 'UstadAssignmentSubmissionHeaderUiState(block=' + this.mta_1 + ', assignmentMark=' + this.nta_1 + ', assignmentStatus=' + this.ota_1 + ')';
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).hashCode = function () {
    var result = this.mta_1 == null ? 0 : this.mta_1.hashCode();
    result = imul(result, 31) + (this.nta_1 == null ? 0 : this.nta_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ota_1 == null ? 0 : this.ota_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.mta_1, tmp0_other_with_cast.mta_1))
      return false;
    if (!equals(this.nta_1, tmp0_other_with_cast.nta_1))
      return false;
    if (!(this.ota_1 == tmp0_other_with_cast.ota_1))
      return false;
    return true;
  };
  function UstadCourseAssignmentMarkListItemUiState(mark, localDateTimeNow, dayOfWeekStrings) {
    mark = mark === VOID ? new CourseAssignmentMarkAndMarkerName() : mark;
    this.pta_1 = mark;
    this.qta_1 = localDateTimeNow;
    this.rta_1 = dayOfWeekStrings;
  }
  protoOf(UstadCourseAssignmentMarkListItemUiState).sta = function () {
    var tmp0_safe_receiver = this.pta_1.rbw_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_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).tta = function () {
    var tmp0_elvis_lhs = this.pta_1.sbw_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = this.pta_1.tbw_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).uta = function () {
    return !(this.sta() === 0);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).vta = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.pta_1.rbw_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.nbw_1;
    return !(it == null) ? !(it === 0.0) : false;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).toString = function () {
    return 'UstadCourseAssignmentMarkListItemUiState(mark=' + this.pta_1 + ', localDateTimeNow=' + this.qta_1 + ', dayOfWeekStrings=' + this.rta_1 + ')';
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).hashCode = function () {
    var result = this.pta_1.hashCode();
    result = imul(result, 31) + this.qta_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.rta_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.pta_1.equals(tmp0_other_with_cast.pta_1))
      return false;
    if (!this.qta_1.equals(tmp0_other_with_cast.qta_1))
      return false;
    if (!equals(this.rta_1, tmp0_other_with_cast.rta_1))
      return false;
    return true;
  };
  function Companion_129() {
    this.wta_1 = 'CourseAssignment';
  }
  var Companion_instance_178;
  function Companion_getInstance_146() {
    return Companion_instance_178;
  }
  function ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation) {
    this.ftb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailViewModel$slambda).itb = function (clazzAssignment, permissionPair, $completion) {
    var tmp = this.jtb(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.itb(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.htb_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasLearnerRecordPermission = tmp0_container.z6();
          var tmp_0;
          if (hasCourseViewPermission) {
            var tmp_1;
            var tmp1_safe_receiver = this.gtb_1;
            var tmp_2 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a7u_1;
            if (tmp_2 === 2) {
              tmp_1 = true;
            } else {
              tmp_1 = hasLearnerRecordPermission;
            }
            var hasSubmissionsTab = tmp_1;
            Companion_getInstance_125();
            var tmp_3 = to('entityUid', this.ftb_1.rqm_1.toString());
            Companion_getInstance_125();
            var tabArgs = mapOf([tmp_3, to('clazzUid', this.ftb_1.htc_1.toString())]);
            var tabs = mutableListOf([new TabItem('CourseAssignmentDetailOverviewView', tabArgs, this.ftb_1.xqn().joj(strings_getInstance().xn5_1))]);
            if (hasSubmissionsTab) {
              var tmp_4;
              var tmp_5;
              if (!hasLearnerRecordPermission) {
                var tmp2_safe_receiver = this.gtb_1;
                var tmp_6 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.a7u_1;
                tmp_5 = tmp_6 === 2;
              } else {
                tmp_5 = false;
              }
              if (tmp_5) {
                tmp_4 = this.ftb_1.xqn().joj(strings_getInstance().rng_1);
              } else {
                tmp_4 = this.ftb_1.xqn().joj(strings_getInstance().gnh_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).jtb = function (clazzAssignment, permissionPair, completion) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this.ftb_1, completion);
    i.gtb_1 = clazzAssignment;
    i.htb_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.itb(clazzAssignment, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.htc_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var assignmentFlow = this.tqn().q7e().p7s(this.rqm_1, this.htc_1);
    var tmp_0 = this.tqn().o7f();
    var tmp_1 = this.nqn().goa().vky_1;
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = distinctUntilChanged(tmp_0.gdk(tmp_1, this.htc_1, tmp_2, new Long(128, 0)));
    var tmp_3 = this;
    tmp_3.gtc_1 = combine(assignmentFlow, permissionFlow, ClazzAssignmentDetailViewModel$slambda_0(this, null));
  }
  function ClazzAssignmentDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.itc_1 = tabs;
  }
  protoOf(ClazzAssignmentDetailUiState).toString = function () {
    return 'ClazzAssignmentDetailUiState(tabs=' + this.itc_1 + ')';
  };
  protoOf(ClazzAssignmentDetailUiState).hashCode = function () {
    return hashCode(this.itc_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.itc_1, tmp0_other_with_cast.itc_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.rtc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).ttc = function (it, $completion) {
    var tmp = this.utc(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.ttc((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.rtc_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.atd(this.stc_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).utc = function (it, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this.rtc_1, completion);
    i.stc_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.ttc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jtd_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.jtd_1.tqn().q7e().k7s(this.jtd_1.lte_1, this.jtd_1.mte_1, this.jtd_1.pqn(), this.jtd_1.xqn().joj(strings_getInstance().bng_1));
            var tmp_1 = ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this.jtd_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this.jtd_1, completion);
    i.ktd_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.bqn_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.jq6(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation) {
    this.wte_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.wte_1.tqn().q7d().fe7(this.wte_1.lte_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.wte_1.sqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.atd(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.wte_1, completion);
    i.xte_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.gtf_1 = $this_launch;
    this.htf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($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.gtf_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this.htf_1, null));
          launchSetTitleFromClazzUid(this.htf_1, this.htf_1.mte_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this.htf_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).l78 = function (completion) {
    return new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1(this.gtf_1, this.htf_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_130() {
    this.itf_1 = 'CourseAssignmentSubmissionsTab';
  }
  var Companion_instance_179;
  function Companion_getInstance_147() {
    return Companion_instance_179;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_15(function_0) {
    this.jtf_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_15).t1d = function (value, $completion) {
    return this.jtf_1(value, $completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().q7e().l7s(this$0.lte_1, this$0.mte_1, this$0.pqn(), this$0.xqn().joj(strings_getInstance().bng_1), toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_1), this$0.sqv_1.t2().ytc_1.qqc_1);
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation) {
    this.stf_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.ttf_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this.stf_1, null));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.stf_1.sqv_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2(this.ttf_1, this.stf_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.stf_1, completion);
    i.ttf_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_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.lte_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this;
    Companion_getInstance_125();
    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.mte_1 = tmp_2;
    var tmp_3 = this;
    tmp_3.nte_1 = ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue = prevValue.atd(VOID, this.nte_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_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.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.bqx());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_4 = this.oqn();
    launch(tmp_4, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this, null));
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).utf = function (assignmentSubmitter) {
    var tmp = to('assignmentUid', this.lte_1.toString());
    var tmp_0 = to('submitterUid', assignmentSubmitter.r7v_1.toString());
    Companion_getInstance_125();
    this.zqm_1.kp6('CourseAssignmentSubmitter', mapOf([tmp, tmp_0, to('clazzUid', this.mte_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).vtf = function (sortOrderOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.onChangeSortOption.<anonymous>' call
        var nextValue = prevValue.atd(VOID, VOID, VOID, sortOrderOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).nqw = function () {
  };
  function Companion_131() {
    Companion_instance_180 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().pmk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 5, true);
    var tmp_2 = strings_getInstance().pmk_1;
    tmp.wtf_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 6, false)]);
  }
  var Companion_instance_180;
  function Companion_getInstance_148() {
    if (Companion_instance_180 == null)
      new Companion_131();
    return Companion_instance_180;
  }
  function ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    Companion_getInstance_148();
    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_148().wtf_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    this.vtc_1 = progressSummary;
    this.wtc_1 = assignmentSubmitterList;
    this.xtc_1 = sortOptions;
    this.ytc_1 = sortOption;
    this.ztc_1 = courseTerminology;
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).xtf = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    return new ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).atd = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology, $super) {
    progressSummary = progressSummary === VOID ? this.vtc_1 : progressSummary;
    assignmentSubmitterList = assignmentSubmitterList === VOID ? this.wtc_1 : assignmentSubmitterList;
    sortOptions = sortOptions === VOID ? this.xtc_1 : sortOptions;
    sortOption = sortOption === VOID ? this.ytc_1 : sortOption;
    courseTerminology = courseTerminology === VOID ? this.ztc_1 : courseTerminology;
    return $super === VOID ? this.xtf(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) : $super.xtf.call(this, progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).toString = function () {
    return 'ClazzAssignmentDetailSubmissionsTabUiState(progressSummary=' + this.vtc_1 + ', assignmentSubmitterList=' + this.wtc_1 + ', sortOptions=' + this.xtc_1 + ', sortOption=' + this.ytc_1 + ', courseTerminology=' + this.ztc_1 + ')';
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).hashCode = function () {
    var result = this.vtc_1 == null ? 0 : hashCode(this.vtc_1);
    result = imul(result, 31) + hashCode(this.wtc_1) | 0;
    result = imul(result, 31) + hashCode(this.xtc_1) | 0;
    result = imul(result, 31) + this.ytc_1.hashCode() | 0;
    result = imul(result, 31) + (this.ztc_1 == null ? 0 : hashCode(this.ztc_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.vtc_1, tmp0_other_with_cast.vtc_1))
      return false;
    if (!equals(this.wtc_1, tmp0_other_with_cast.wtc_1))
      return false;
    if (!equals(this.xtc_1, tmp0_other_with_cast.xtc_1))
      return false;
    if (!this.ytc_1.equals(tmp0_other_with_cast.ytc_1))
      return false;
    if (!equals(this.ztc_1, tmp0_other_with_cast.ztc_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).v7v_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).u7v_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.ytf_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function AssignmentSubmitterSummaryUiState(person) {
    this.ytf_1 = person;
  }
  protoOf(AssignmentSubmitterSummaryUiState).toString = function () {
    return AssignmentSubmitterSummaryUiState__toString_impl_fdil8u(this.ytf_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).hashCode = function () {
    return AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1(this.ytf_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).equals = function (other) {
    return AssignmentSubmitterSummaryUiState__equals_impl_zhk063(this.ytf_1, other);
  };
  function get_listItemUiState(_this__u8e3s4) {
    return _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(_this__u8e3s4);
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.htg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).nqa = function (it, $completion) {
    var tmp = this.oqa(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.nqa(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.itg_1.uq9_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.htg_1.ati(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).oqa = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this.htg_1, completion);
    i.itg_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.nqa(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jti_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).lti = function (assignmentData, $completion) {
    var tmp = this.mti(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.lti((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.jti_1.gth_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.kti_1;
              var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7y_1;
              Companion_getInstance_1();
              var isEnrolledButNotInGroup = equals(tmp_0, new Long(-1, -1));
              var tmp1_safe_receiver = this.kti_1;
              var tmp9_assignment = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7y_1;
              var tmp2_safe_receiver = this.kti_1;
              var tmp10_courseBlock = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.r7y_1;
              var tmp3_safe_receiver = this.kti_1;
              var tmp11_courseBlockPicture = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.s7y_1;
              var tmp5_safe_receiver = this.kti_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.u7y_1;
              var tmp12_submitterUid = tmp6_elvis_lhs == null ? new Long(0, 0) : tmp6_elvis_lhs;
              var tmp4_safe_receiver = this.kti_1;
              var tmp13_courseGroupSet = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.t7y_1;
              var tmp_1;
              if (isEnrolledButNotInGroup) {
                tmp_1 = this.jti_1.xqn().joj(strings_getInstance().qnk_1);
              } else {
                tmp_1 = null;
              }
              var tmp14_unassignedError = tmp_1;
              var tmp7_safe_receiver = this.kti_1;
              var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.v7y_1;
              var tmp15_showModerateOptions = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
              var nextValue = prevValue.otj(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).mti = function (assignmentData, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.jti_1, completion);
    i.kti_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.lti(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).ztj = function (submissions, submissionFiles, $completion) {
    var tmp = this.atk(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.ztj(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.xtj_1, this.ytj_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).atk = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.xtj_1 = submissions;
    i.ytj_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.ztj(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.jtk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ltk = function (it, $completion) {
    var tmp = this.mtk(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.ltk((!(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.jtk_1.gth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.otj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ktk_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).mtk = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.jtk_1, completion);
    i.ktk_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.ltk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.vtk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).xtk = function (it, $completion) {
    var tmp = this.ytk(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.xtk((!(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.vtk_1.gth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.otj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.wtk_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).ytk = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.vtk_1, completion);
    i.wtk_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.xtk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.htl_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ltl = function (value, $completion) {
    var tmp = this.mtl(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.ltl(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.jtl_1 = this.htl_1;
            var tmp_1 = this;
            tmp_1.ktl_1 = this.itl_1;
            this.hd_1 = 1;
            var tmp0_safe_receiver = this.ktl_1.ntl_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kc2_1;
            suspendResult = this.jtl_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).mtl = function (value, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.htl_1, completion);
    i.itl_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.ltl(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$69(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wtl_1 = _this__u8e3s4;
    this.xtl_1 = collector;
  }
  protoOf($collectCOROUTINE$69).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.ytl_1 = this.xtl_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.ytl_1, null);
            suspendResult = this.wtl_1.ztl_1.a1c(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);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.itm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ktm = function (it, $completion) {
    var tmp = this.ltm(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.ktm((!(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.itm_1.gth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.otj(VOID, VOID, VOID, VOID, VOID, this.jtm_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).ltm = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.itm_1, completion);
    i.jtm_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.ktm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_7($this) {
    this.ztl_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_7).mtm = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$69(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_7).a1c = function (collector, $completion) {
    return this.mtm(collector, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.vtm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).xtm = function (submissionUid, $completion) {
    var tmp = this.ytm(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.xtm(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.vtm_1.rqn().s7e().aca(this.wtm_1));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.vtm_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ytm = function (submissionUid, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.vtm_1, completion);
    i.wtm_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.xtm(submissionUid, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation) {
    this.htn_1 = $entityFlow;
    this.itn_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.itn_1, null);
            suspendResult = this.htn_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(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.htn_1, this.itn_1, completion);
    i.jtn_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.bqn_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.jq6(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.stn_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.utn_1 = this.stn_1.tqn().r7e().vc1(this.stn_1.pqn(), this.stn_1.rqm_1);
            this.vtn_1 = this.stn_1.tqn().s7e().bca(this.stn_1.pqn(), this.stn_1.rqm_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.utn_1, this.vtn_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.stn_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this.stn_1, completion);
    i.ttn_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.eto_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.eto_1.tqn().t7e().pbv(this.eto_1.pqn(), this.eto_1.rqm_1);
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.eto_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this.eto_1, completion);
    i.fto_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.oto_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.oto_1.ith_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_7(this_0));
            suspendResult = collectLatest(tmp_0, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.oto_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.oto_1, completion);
    i.pto_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.yto_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.yto_1.bqo(this.yto_1.uqn(), 'submissionHtml');
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this.yto_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this.yto_1, completion);
    i.zto_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.itp_1 = $this_launch;
    this.jtp_1 = this$0;
    this.ktp_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.j87($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.itp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2(this.ktp_1, this.jtp_1, null));
          launchSetTitleFromClazzUid(this.jtp_1, this.jtp_1.rth_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this.jtp_1));
          launch(this.itp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this.jtp_1, null));
          launch(this.itp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this.jtp_1, null));
          launch(this.itp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this.jtp_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).l78 = function (completion) {
    return new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1(this.itp_1, this.jtp_1, this.ktp_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation) {
    this.ttp_1 = this$0;
    this.utp_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.ttp_1.tqn().s7e();
            var tmp0_safe_receiver = this.utp_1.wcb_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yca_1;
            suspendResult = tmp_0.eca(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).vny = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this.ttp_1, this.utp_1, completion);
    i.vtp_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.uny(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.gth_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.otj(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.sth_1;
    saveAndUploadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelTransferJobUseCase__o6e2y4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tth_1;
    cancelTransferJobUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.uth_1;
    openBlobUiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_ustadAccountManager__el9prc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wth_1;
    ustadAccountManager$factory_0();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xth_1;
    showSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yth_1;
    dismissSocialWarningUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zth_1;
    openExternalLinkUseCase$factory_0();
    return this_0.t2();
  }
  function newCourseAssignmentSubmission($this) {
    var tmp = get_doorPrimaryKeyManager($this.rqn());
    Companion_getInstance_1();
    var tmp0_casUid = tmp.n62(522);
    var tmp1_casAssignmentUid = $this.rqm_1;
    var tmp2_casClazzUid = $this.rth_1;
    var tmp3_casSubmitterPersonUid = $this.nqn().ro9().lnu_1.f96_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.wcb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.vth_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.oqn();
    tmp_0.vth_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_132() {
    this.wtp_1 = 'latestSubmission';
    this.xtp_1 = 'submissionHtml';
    this.ytp_1 = 'CourseAssignmentDetailOverviewView';
  }
  var Companion_instance_181;
  function Companion_getInstance_149() {
    return Companion_instance_181;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_16(function_0) {
    this.ztp_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_16).t1d = function (value, $completion) {
    return this.ztp_1(value, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().u7e().oac(this$0.pqn(), this$0.rqm_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().u7e().qac(this$0.rqm_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    this.itq_1 = this$0;
    this.jtq_1 = $savedStateHandle;
    this.ktq_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.itq_1.cqo(this.jtq_1, 'latestSubmission', Companion_getInstance_1().n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.mtq_1 = suspendResult;
            this.ntq_1 = this.mtq_1 == null ? newCourseAssignmentSubmission(this.itq_1) : this.mtq_1;
            l$ret$1: do {
              var this_0 = this.itq_1.ith_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.otq(this.ntq_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.ltq_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this.itq_1, null));
            this.hd_1 = 2;
            suspendResult = whenSubscribed(this.itq_1.gth_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2(this.ltq_1, this.itq_1, this.ktq_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.itq_1, this.jtq_1, this.ktq_1, completion);
    i.ltq_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.xtq_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.xtq_1).pp1(toString_0(_get_ustadAccountManager__el9prc(this.xtq_1).ro9().lnu_1.g96_1));
          l$ret$1: do {
            var this_0 = this.xtq_1.gth_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.otj(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.xtq_1, completion);
    i.ytq_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.oc2_1 = $text;
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation) {
    this.htr_1 = $submissionToSave;
    this.itr_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.htr_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.itr_1.dqo(this.itr_1.xqm_1, 'latestSubmission', Companion_getInstance_1().n4r(), this.htr_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.htr_1, this.itr_1, completion);
    i.jtr_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.str_1 = this$0;
    this.ttr_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.str_1.tqn().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = this.ttr_1;
            this_0.jad_1 = this.str_1.pqn();
            this_0.lad_1 = this.str_1.gth_1.t2().rti_1;
            this_0.had_1 = this.str_1.rqm_1;
            this_0.gad_1 = this.str_1.kth_1.t2();
            this_0.oad_1 = systemTimeInMillis();
            suspendResult = tmp_0.mac(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.str_1.kth_1.x1k('');
            tmp_1.vtr_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.str_1.zqn(Companion_getInstance_97().rq6_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.str_1.zqn(Companion_getInstance_97().rq6_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.str_1, this.ttr_1, completion);
    i.utr_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.ets_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.ets_1.tqn().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = new Long(0, 0);
            this_0.jad_1 = this.ets_1.pqn();
            this_0.had_1 = this.ets_1.rqm_1;
            this_0.gad_1 = this.ets_1.mth_1.t2();
            this_0.oad_1 = systemTimeInMillis();
            suspendResult = tmp_0.mac(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.ets_1.mth_1.x1k('');
            tmp_1.gts_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.ets_1.zqn(Companion_getInstance_97().rq6_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.ets_1.zqn(Companion_getInstance_97().rq6_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.ets_1, completion);
    i.fts_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.pts_1 = this$0;
    this.qts_1 = $size;
    this.rts_1 = $mimeType;
    this.sts_1 = $fileName;
    this.tts_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.pts_1.rqn());
            suspendResult = tmp_0.o62(90, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vts_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.pts_1.ith_1.t2().ntl_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kc2_1;
            tmp_1.wts_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.xts_1 = this.pts_1.gth_1.t2().rti_1;
            this.yts_1 = this.qts_1.mb();
            this.zts_1 = this.pts_1.rqm_1;
            this.att_1 = this.pts_1.rth_1;
            this.btt_1 = new CourseAssignmentSubmissionFile(this.vts_1, this.wts_1, this.xts_1, this.zts_1, this.att_1, this.rts_1, this.sts_1, this.tts_1, this.yts_1);
            this.hd_1 = 2;
            suspendResult = this.pts_1.rqn().s7e().zc9(listOf_0(this.btt_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.pts_1);
            var tmp_3 = this.btt_1.yca_1;
            suspendResult = tmp_2.hor(listOf_0(new SaveLocalUriAsBlobItem(this.tts_1, tmp_3, 90, this.rts_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().m5e('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.pts_1, this.qts_1, this.rts_1, this.sts_1, this.tts_1, completion);
    i.uts_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.ktt_1 = this$0;
    this.ltt_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.ktt_1.fth_1.loj(this.ktt_1.tqn(), this.ktt_1.gth_1.t2().rti_1, this.ktt_1.rqm_1, this.ktt_1.nqn().ro9().lnu_1.f96_1, this.ltt_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.ktt_1.ith_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.otq(newCourseAssignmentSubmission(this.ktt_1));
                if (this_0.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_0.ott_1 = tmp$ret$0.ntl_1;
            l$ret$3: do {
              var this_1 = this.ktt_1.gth_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.otj(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.ott_1 == null)) {
              this.hd_1 = 3;
              suspendResult = this.ktt_1.dqo(this.ktt_1.xqm_1, 'latestSubmission', Companion_getInstance_1().n4r(), this.ott_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.ktt_1.vqn().yq6(new Snack(this.ktt_1.xqn().joj(strings_getInstance().pn6_1)));
            tmp_1.ntt_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().q5e('Exception submitting assignment: ' + e, e);
              l$ret$7: do {
                var this_2 = this.ktt_1.gth_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.otj(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.ntt_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.ktt_1.gth_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.otj(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.ktt_1.zqn(Companion_getInstance_97().rq6_1);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            l$ret$11: do {
              var this_4 = this.ktt_1.gth_1;
              while (true) {
                var prevValue_3 = this_4.t2();
                var nextValue_3 = prevValue_3.otj(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.ktt_1.zqn(Companion_getInstance_97().rq6_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.ktt_1, this.ltt_1, completion);
    i.mtt_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.xtt_1 = this$0;
    this.ytt_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.xtt_1.tqn();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this.xtt_1, this.ytt_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp0_safe_receiver = this.ytt_1.xcb_1;
            tmp_1.atu_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zcb_1;
            if (this.atu_1 == null) {
              this.btu_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.ctu_1 = this.atu_1;
              var tmp_3 = this;
              tmp_3.dtu_1 = this.ctu_1;
              this.etu_1 = _get_cancelTransferJobUseCase__o6e2y4(this.xtt_1);
              if (this.etu_1 == null) {
                this.ftu_1 = null;
                this.hd_1 = 3;
                continue $sm;
              } else {
                this.hd_1 = 2;
                suspendResult = this.etu_1.i1i(this.dtu_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 2:
            var tmp_4 = this;
            tmp_4.ftu_1 = Unit_instance;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.btu_1 = this.ctu_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.xtt_1, this.ytt_1, completion);
    i.ztt_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.otu_1 = this$0;
    this.ptu_1 = $submissionFile;
    this.qtu_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.stu_1 = _get_openBlobUiUseCase__fzusqz(this.otu_1);
            if (this.stu_1 == null) {
              this.ttu_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.ptu_1);
              suspendResult = this.stu_1.lop(tmp_0, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this.otu_1), this.qtu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.ttu_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.otu_1, this.ptu_1, this.qtu_1, completion);
    i.rtu_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.ctv_1 = this$0;
    this.dtv_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.ctv_1.tqn().u7e().nac(this.dtv_1.fad_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ctv_1.vqn().yq6(new Snack(this.ctv_1.xqn().joj(strings_getInstance().lmj_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.ctv_1, this.dtv_1, completion);
    i.etv_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).f58();
      // 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.d58(tmp$ret$0, null);
      tmp = new SubmitAssignmentUseCase(tmp$ret$1);
    } else {
      tmp = submitAssignmentUseCase;
    }
    submitAssignmentUseCase = tmp;
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    this.fth_1 = submitAssignmentUseCase;
    this.gth_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.xqn().eq5()));
    this.hth_1 = asStateFlow(this.gth_1);
    this.ith_1 = MutableStateFlow(new ClazzAssignmentDetailoverviewSubmissionUiState());
    this.jth_1 = asStateFlow(this.ith_1);
    this.kth_1 = MutableStateFlow('');
    this.lth_1 = asStateFlow(this.kth_1);
    this.mth_1 = MutableStateFlow('');
    this.nth_1 = asStateFlow(this.mth_1);
    var tmp_2 = this;
    tmp_2.oth_1 = ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_3 = this;
    tmp_3.pth_1 = ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this);
    this.qth_1 = null;
    var tmp_4 = this;
    Companion_getInstance_125();
    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.rth_1 = tmp_5;
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.sth_1 = Instance(this_0, tmp$ret$2, null).a5d(this, saveAndUploadUseCase$factory());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveLearningSpace(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.tth_1 = InstanceOrNull(this_1, tmp$ret$4, null).a5d(this, cancelTransferJobUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_2 = onActiveLearningSpace(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.uth_1 = InstanceOrNull(this_2, tmp$ret$6, null).a5d(this, openBlobUiUseCase$factory());
    this.vth_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.wth_1 = Instance(di, tmp$ret$8, null).a5d(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.xth_1 = Instance(di, tmp$ret$10, null).a5d(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.yth_1 = Instance(di, tmp$ret$12, null).a5d(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.zth_1 = Instance(di, tmp$ret$14, null).a5d(this, openExternalLinkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.gth_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp_20 = this.pqn();
        var tmp_21 = this.nqn().ro9().lnu_1.ckr();
        var tmp0_safe_receiver_0 = this.nqn().ro9().nnu_1;
        var nextValue = prevValue.otj(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.g97_1, VOID, VOID, VOID, VOID, VOID, VOID, _get_showSocialWarningUseCase__ft8jc6(this).np9(toString_0(_get_ustadAccountManager__el9prc(this).ro9().lnu_1.g96_1)));
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var entityFlow = shareIn(this.tqn().q7e().t7s(this.rqm_1, this.rth_1, this.nqn().goa().vky_1), this.oqn(), Companion_getInstance_12().v1h());
    var tmp_22 = this.oqn();
    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.gth_1;
      while (true) {
        var prevValue_0 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp0_privateComments = this.oth_1;
        var tmp1_courseComments = this.pth_1;
        var nextValue_0 = prevValue_0.otj(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).ftv = function () {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).gtv = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gth_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickMarksFilterChip.<anonymous>' call
        var nextValue = prevValue.otj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.mq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ati = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.ith_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.ntl_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_0(tmp0_safe_receiver, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda(text));
        }
        var nextValue = prevValue.otq(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var submissionToSave = tmp$ret$1.ntl_1;
    var tmp0_safe_receiver_0 = this.qth_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.oqn();
    tmp_0.qth_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0(submissionToSave, this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).htv = function (text) {
    this.kth_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).itv = function () {
    var submitterUid = this.gth_1.t2().rti_1;
    if (submitterUid.c7(new Long(0, 0)) <= 0)
      return Unit_instance;
    if (this.aqo().equals(Companion_getInstance_97().qq6_1))
      return Unit_instance;
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this, submitterUid, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).jtv = function (text) {
    this.mth_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ktv = function () {
    if (this.aqo().equals(Companion_getInstance_97().qq6_1))
      return Unit_instance;
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ltv = function (uri, fileName, mimeType, size) {
    var tmp0_safe_receiver = this.gth_1.t2().nti_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x7t_1;
    var assignmentSizeLimit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (size.c7(toLong(imul(imul(assignmentSizeLimit, 1024), 1024))) > 0) {
      this.vqn().yq6(new Snack(this.xqn().joj(strings_getInstance().bmu_1)));
      return Unit_instance;
    }
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this, size, mimeType, fileName, uri, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).mtv = function () {
    if (!this.gth_1.t2().yti_1)
      return Unit_instance;
    var tmp0_elvis_lhs = this.ith_1.t2().ntl_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.gth_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickSubmit.<anonymous>' call
        var nextValue = prevValue.otj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this, submission, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ntv = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gth_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.otj(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.ktj_1, submission.kc2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).otv = function () {
    Companion_getInstance_125();
    var tmp0_safe_receiver = this.gth_1.t2().qti_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a7z_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_125();
    this.zqm_1.kp6('CourseGroupSet', mapOf([tmp, to('clazzUid', this.rth_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).ptv = function (file) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this, file, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).qtv = function (file) {
    openSubmissionFileAsBlob(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).rtv = function (comments) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq($this) {
    return latestUniqueMarksByMarker($this.vti_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().jnl_1;
      var tmp_4 = new MessageIdOption2(tmp_3, 1);
      var tmp_5 = strings_getInstance().zmz_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.ymd(), Companion_getInstance_9().xmh()) : 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.nti_1 = assignment;
    this.oti_1 = courseBlock;
    this.pti_1 = courseBlockPicture;
    this.qti_1 = courseGroupSet;
    this.rti_1 = submitterUid;
    this.sti_1 = editableSubmissionFiles;
    this.tti_1 = submissionTooLong;
    this.uti_1 = submissions;
    this.vti_1 = markList;
    this.wti_1 = courseComments;
    this.xti_1 = privateComments;
    this.yti_1 = fieldsEnabled;
    this.zti_1 = selectedChipId;
    this.atj_1 = gradeFilterChips;
    this.btj_1 = submissionHeaderUiState;
    this.ctj_1 = unassignedError;
    this.dtj_1 = submissionError;
    this.etj_1 = activeUserPersonUid;
    this.ftj_1 = activeUserPersonName;
    this.gtj_1 = activeUserPictureUri;
    this.htj_1 = courseTerminology;
    this.itj_1 = localDateTimeNow;
    this.jtj_1 = dayOfWeekStringMap;
    this.ktj_1 = collapsedSubmissions;
    this.ltj_1 = openingFileSubmissionState;
    this.mtj_1 = showModerateOptions;
    this.ntj_1 = showSocialWarning;
  }
  protoOf(ClazzAssignmentDetailOverviewUiState).stv = function () {
    var tmp0_safe_receiver = this.oti_1;
    return isDateSet(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7y_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ttv = function () {
    return this.utv();
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).vtv = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = this.ctj_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).wtv = function () {
    var tmp0_safe_receiver = this.nti_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s7t_1) === true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).xtv = function () {
    return this.rti_1.c7(new Long(0, 0)) > 0;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ytv = function () {
    var tmp;
    if (this.xtv()) {
      var tmp0_safe_receiver = this.nti_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t7t_1) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ztv = function () {
    var timeNow = systemTimeInMillis();
    var tmp0_safe_receiver = this.oti_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7y_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.oti_1;
    if (isDateSet(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.d7y_1)) {
      var tmp3_safe_receiver = this.oti_1;
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.d7y_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).utv = function () {
    if (!this.xtv())
      return false;
    if (!this.ztv())
      return false;
    var tmp;
    var tmp0_safe_receiver = this.nti_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z7t_1;
    if (tmp_0 === 1) {
      // Inline function 'kotlin.collections.isNotEmpty' call
      tmp = !this.uti_1.c1();
    } else {
      tmp = false;
    }
    if (tmp) {
      return false;
    }
    return true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).atw = function () {
    var tmp;
    var tmp_0;
    if (this.utv()) {
      var tmp0_safe_receiver = this.nti_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7t_1) === true;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.sti_1.u() < this.nti_1.y7t_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).btw = function () {
    return this.xtv() ? submissionStatusFor(this.vti_1, this.uti_1) : null;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ctw = function () {
    return !(this.dtw() == null);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).etw = 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.dtw();
    return !(it == null) ? !(it.xkc_1 === 0) : false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).ftw = function () {
    var tmp;
    var tmp0_safe_receiver = this.nti_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7u_1) === true) {
      tmp = this.utv();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).gtw = function () {
    var tmp;
    if (this.zti_1 === 1) {
      tmp = _get_latestUniqueMarksByMarker__e0a3pq(this);
    } else {
      tmp = this.vti_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).dtw = function () {
    return averageMark(this.vti_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).htw = function () {
    var tmp0_safe_receiver = this.nti_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q7t_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).itw = 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).otj = 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.nti_1 : assignment;
    courseBlock = courseBlock === VOID ? this.oti_1 : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? this.pti_1 : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? this.qti_1 : courseGroupSet;
    submitterUid = submitterUid === VOID ? this.rti_1 : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? this.sti_1 : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? this.tti_1 : submissionTooLong;
    submissions = submissions === VOID ? this.uti_1 : submissions;
    markList = markList === VOID ? this.vti_1 : markList;
    courseComments = courseComments === VOID ? this.wti_1 : courseComments;
    privateComments = privateComments === VOID ? this.xti_1 : privateComments;
    fieldsEnabled = fieldsEnabled === VOID ? this.yti_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.zti_1 : selectedChipId;
    gradeFilterChips = gradeFilterChips === VOID ? this.atj_1 : gradeFilterChips;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? this.btj_1 : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? this.ctj_1 : unassignedError;
    submissionError = submissionError === VOID ? this.dtj_1 : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.etj_1 : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? this.ftj_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.gtj_1 : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? this.htj_1 : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? this.itj_1 : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? this.jtj_1 : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.ktj_1 : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? this.ltj_1 : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? this.mtj_1 : showModerateOptions;
    showSocialWarning = showSocialWarning === VOID ? this.ntj_1 : showSocialWarning;
    return $super === VOID ? this.itw(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.itw.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.nti_1 + ', courseBlock=' + this.oti_1 + ', courseBlockPicture=' + this.pti_1 + ', courseGroupSet=' + this.qti_1 + ', submitterUid=' + this.rti_1.toString() + ', editableSubmissionFiles=' + this.sti_1 + ', submissionTooLong=' + this.tti_1 + ', submissions=' + this.uti_1 + ', markList=' + this.vti_1 + ', courseComments=' + this.wti_1 + ', privateComments=' + this.xti_1 + ', fieldsEnabled=' + this.yti_1 + ', selectedChipId=' + this.zti_1 + ', gradeFilterChips=' + this.atj_1 + ', submissionHeaderUiState=' + this.btj_1 + ', unassignedError=' + this.ctj_1 + ', submissionError=' + this.dtj_1 + ', activeUserPersonUid=' + this.etj_1.toString() + ', activeUserPersonName=' + this.ftj_1 + ', activeUserPictureUri=' + this.gtj_1 + ', courseTerminology=' + this.htj_1 + ', localDateTimeNow=' + this.itj_1 + ', dayOfWeekStringMap=' + this.jtj_1 + ', collapsedSubmissions=' + this.ktj_1 + ', openingFileSubmissionState=' + this.ltj_1 + ', showModerateOptions=' + this.mtj_1 + ', showSocialWarning=' + this.ntj_1 + ')';
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hashCode = function () {
    var result = this.nti_1 == null ? 0 : this.nti_1.hashCode();
    result = imul(result, 31) + (this.oti_1 == null ? 0 : this.oti_1.hashCode()) | 0;
    result = imul(result, 31) + (this.pti_1 == null ? 0 : this.pti_1.hashCode()) | 0;
    result = imul(result, 31) + (this.qti_1 == null ? 0 : hashCode(this.qti_1)) | 0;
    result = imul(result, 31) + this.rti_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.sti_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tti_1) | 0;
    result = imul(result, 31) + hashCode(this.uti_1) | 0;
    result = imul(result, 31) + hashCode(this.vti_1) | 0;
    result = imul(result, 31) + hashCode(this.wti_1) | 0;
    result = imul(result, 31) + hashCode(this.xti_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yti_1) | 0;
    result = imul(result, 31) + this.zti_1 | 0;
    result = imul(result, 31) + hashCode(this.atj_1) | 0;
    result = imul(result, 31) + this.btj_1.hashCode() | 0;
    result = imul(result, 31) + (this.ctj_1 == null ? 0 : getStringHashCode(this.ctj_1)) | 0;
    result = imul(result, 31) + (this.dtj_1 == null ? 0 : getStringHashCode(this.dtj_1)) | 0;
    result = imul(result, 31) + this.etj_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.ftj_1) | 0;
    result = imul(result, 31) + (this.gtj_1 == null ? 0 : getStringHashCode(this.gtj_1)) | 0;
    result = imul(result, 31) + (this.htj_1 == null ? 0 : hashCode(this.htj_1)) | 0;
    result = imul(result, 31) + this.itj_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.jtj_1) | 0;
    result = imul(result, 31) + hashCode(this.ktj_1) | 0;
    result = imul(result, 31) + (this.ltj_1 == null ? 0 : this.ltj_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mtj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ntj_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.nti_1, tmp0_other_with_cast.nti_1))
      return false;
    if (!equals(this.oti_1, tmp0_other_with_cast.oti_1))
      return false;
    if (!equals(this.pti_1, tmp0_other_with_cast.pti_1))
      return false;
    if (!equals(this.qti_1, tmp0_other_with_cast.qti_1))
      return false;
    if (!this.rti_1.equals(tmp0_other_with_cast.rti_1))
      return false;
    if (!equals(this.sti_1, tmp0_other_with_cast.sti_1))
      return false;
    if (!(this.tti_1 === tmp0_other_with_cast.tti_1))
      return false;
    if (!equals(this.uti_1, tmp0_other_with_cast.uti_1))
      return false;
    if (!equals(this.vti_1, tmp0_other_with_cast.vti_1))
      return false;
    if (!equals(this.wti_1, tmp0_other_with_cast.wti_1))
      return false;
    if (!equals(this.xti_1, tmp0_other_with_cast.xti_1))
      return false;
    if (!(this.yti_1 === tmp0_other_with_cast.yti_1))
      return false;
    if (!(this.zti_1 === tmp0_other_with_cast.zti_1))
      return false;
    if (!equals(this.atj_1, tmp0_other_with_cast.atj_1))
      return false;
    if (!this.btj_1.equals(tmp0_other_with_cast.btj_1))
      return false;
    if (!(this.ctj_1 == tmp0_other_with_cast.ctj_1))
      return false;
    if (!(this.dtj_1 == tmp0_other_with_cast.dtj_1))
      return false;
    if (!this.etj_1.equals(tmp0_other_with_cast.etj_1))
      return false;
    if (!(this.ftj_1 === tmp0_other_with_cast.ftj_1))
      return false;
    if (!(this.gtj_1 == tmp0_other_with_cast.gtj_1))
      return false;
    if (!equals(this.htj_1, tmp0_other_with_cast.htj_1))
      return false;
    if (!this.itj_1.equals(tmp0_other_with_cast.itj_1))
      return false;
    if (!equals(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 (!equals(this.ltj_1, tmp0_other_with_cast.ltj_1))
      return false;
    if (!(this.mtj_1 === tmp0_other_with_cast.mtj_1))
      return false;
    if (!(this.ntj_1 === tmp0_other_with_cast.ntj_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission) {
    editableSubmission = editableSubmission === VOID ? null : editableSubmission;
    this.ntl_1 = editableSubmission;
  }
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).otq = function (editableSubmission) {
    return new ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission);
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).toString = function () {
    return 'ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission=' + this.ntl_1 + ')';
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).hashCode = function () {
    return this.ntl_1 == null ? 0 : this.ntl_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.ntl_1, tmp0_other_with_cast.ntl_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.rtw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).iqf = function (noSubmissions, $completion) {
    var tmp = this.jqf(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.iqf((!(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.stw_1 ? this.rtw_1.rtx_1.t2().xtx_1 : false) {
            l$ret$1: do {
              var this_0 = this.rtw_1.rtx_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.fty(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).jqf = function (noSubmissions, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this.rtw_1, completion);
    i.stw_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.iqf(noSubmissions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.oty_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.oty_1.rqn().r7e();
            var tmp0_safe_receiver = this.oty_1.rtx_1.t2().pty();
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n7t_1;
            var tmp_1 = tmp_0.uc1(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this.oty_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(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).l78 = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this.oty_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.yty_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.zty_1.uq9_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.yty_1.rtx_1.t2().pty();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nk8_1;
          this.yty_1.atz(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hkm(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).oqa = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this.yty_1, completion);
    i.zty_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda($groupSet) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.q7t_1 = $groupSet.a7z_1;
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.jtz_1 = $commitDelay;
    this.ktz_1 = $entity;
    this.ltz_1 = $this;
    this.mtz_1 = $key;
    this.ntz_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.jtz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ktz_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ltz_1.dqo(this.ltz_1.xqm_1, this.mtz_1, this.ntz_1, this.ktz_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.jtz_1, this.ktz_1, this.ltz_1, this.mtz_1, this.ntz_1, completion);
    i.otz_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.xtz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.ytz_1.uq9_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.xtz_1.rtx_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp3_safe_receiver = prevValue.pty();
              var tmp_2;
              if (tmp3_safe_receiver == null) {
                tmp_2 = null;
              } else {
                var tmp0_safe_receiver = prevValue.pty();
                var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_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.a7z_1.equals(new Long(0, 0))) {
                  tmp_5 = groupSet;
                } else {
                  tmp_5 = null;
                }
                var tmp2_safe_receiver = tmp_5;
                tmp_2 = tmp3_safe_receiver.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_4, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.b7z_1);
              }
              var nextValue = prevValue.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.cty_1.ku0(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.xtz_1;
          var entity = newState.pty();
          var serializer = Companion_getInstance_13().n4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_125();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.eqt_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_6 = this_1;
          var tmp_7 = this_1.oqn();
          tmp_6.eqt_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).oqa = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this.xtz_1, completion);
    i.ytz_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.tu0_1 = $commitDelay;
    this.uu0_1 = $entity;
    this.vu0_1 = $this;
    this.wu0_1 = $key;
    this.xu0_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.tu0_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.uu0_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.vu0_1.dqo(this.vu0_1.xqm_1, this.wu0_1, this.xu0_1, this.uu0_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.tu0_1, this.uu0_1, this.vu0_1, this.wu0_1, this.xu0_1, completion);
    i.yu0_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.hu1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.iu1_1.uq9_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.hu1_1.rtx_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.cty_1.ztz_1;
              var nextValue = prevValue.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.cty_1.ku0(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(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.hu1_1;
          var entity = newState.pty();
          var serializer = Companion_getInstance_13().n4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_125();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.eqt_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_2 = this_1;
          var tmp_3 = this_1.oqn();
          tmp_2.eqt_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).oqa = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this.hu1_1, completion);
    i.iu1_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).su1 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.su1(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).vny = function (it, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(completion);
    i.ru1_1 = it;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.su1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.bu2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).cu2 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.cu2($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.bu2_1.rqn());
          var assignmentUid = tmp_0.n62(520);
          var this_0 = new CourseBlock();
          var tmp_1 = this_0;
          var tmp_2 = get_doorPrimaryKeyManager(this.bu2_1.rqn());
          tmp_1.t7x_1 = tmp_2.n62(124);
          var tmp_3 = this_0;
          tmp_3.u7x_1 = 103;
          this_0.l7y_1 = assignmentUid;
          var tmp_4 = this_0;
          tmp_4.z7x_1 = 102;
          this_0.e7y_1 = 10.0;
          this_0.f7y_1 = 0.0;
          var this_1 = new ClazzAssignment();
          this_1.n7t_1 = assignmentUid;
          this_1.f7u_1 = this.bu2_1.utx_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).l78 = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda_1(this.bu2_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.cu2($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.rtx_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = prevValue.cty_1.ku0(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.uk8_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.q7t_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.fty(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.lu2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).kr0 = 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.kr0((!(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.lu2_1.m4r();
          var value = this.lu2_1.rtx_1.t2();
          var this_1 = this_0.t45();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzAssignmentEditUiState), arrayOf([]), false));
          return this_0.r45(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.lu2_1, completion);
    i.mu2_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.kr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.vu2_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.vu2_1.rtx_1, ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this.vu2_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.vu2_1, completion);
    i.wu2_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.fu3_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.fu3_1.uqn();
            Companion_getInstance_174();
            var tmp_1 = this.fu3_1.bqo(tmp_0, 'courseBlockDesc');
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this.fu3_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(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.fu3_1, completion);
    i.gu3_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.pu3_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.pu3_1.bqo(this.pu3_1.uqn(), 'groupSet');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this.pu3_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentEditViewModel$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this.pu3_1, completion);
    i.qu3_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.zu3_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.zu3_1.bqo(this.zu3_1.uqn(), 'peerAllocationsResult');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this.zu3_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentEditViewModel$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this.zu3_1, completion);
    i.au4_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.ju4_1 = this$0;
    this.ku4_1 = $initStateJson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).mu4 = 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.mu4((!(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.ju4_1.m4r().s45(Companion_getInstance_151().n4r(), this.ku4_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.ju4_1, this.ku4_1, completion);
    i.lu4_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.mu4($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$lambda($this$shallowCopy) {
    $this$shallowCopy.q7t_1 = new Long(0, 0);
    return Unit_instance;
  }
  function _get_snackDisaptcher__bp310a($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ttx_1;
    snackDisaptcher$factory_0();
    return this_0.t2();
  }
  function hasErrors_0(_this__u8e3s4, $this) {
    return ((((((!(_this__u8e3s4.aty_1 == null) ? true : !(_this__u8e3s4.cty_1.gu0_1 == null)) ? true : !(_this__u8e3s4.cty_1.fu0_1 == null)) ? true : !(_this__u8e3s4.cty_1.iu0_1 == null)) ? true : !(_this__u8e3s4.ytx_1 == null)) ? true : !(_this__u8e3s4.bty_1 == null)) ? true : !(_this__u8e3s4.ety_1 == null)) ? true : _this__u8e3s4.cty_1.ou4();
  }
  function checkNoSubmissionsMade($this, $completion) {
    var tmp = $this.rqn().r7e();
    var tmp0_safe_receiver = $this.rtx_1.t2().pty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n7t_1;
    return tmp.tc1(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, $completion);
  }
  function Companion_133() {
    this.pu4_1 = 'groupSet';
    this.qu4_1 = 'peerAllocationsResult';
    this.ru4_1 = 'terminology';
    this.su4_1 = 'CourseAssignmentEdit';
    this.tu4_1 = 5;
    this.uu4_1 = 100;
    this.vu4_1 = 'groupSubmissionOn';
  }
  var Companion_instance_182;
  function Companion_getInstance_150() {
    return Companion_instance_182;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_17(function_0) {
    this.wu4_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_17).t1d = function (value, $completion) {
    return this.wu4_1(value, $completion);
  };
  function ClazzAssignmentEditViewModel$_init_$lambda_wdhfey(db, systemImpl) {
    return new UpdatePeerReviewAllocationUseCase(db, systemImpl);
  }
  function ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.fu5_1 = this$0;
    this.gu5_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.fu5_1.cqo(this.gu5_1, 'terminology', Companion_instance_34.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.iu5_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = Companion_getInstance_13().n4r();
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda_2(this.fu5_1, null);
            suspendResult = this.fu5_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzAssignmentEditViewModel$slambda$lambda(this.gu5_1, this.fu5_1, this.iu5_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Companion_getInstance_125();
            if (this.gu5_1.ba('initState') == null) {
              var tmp_3 = this;
              Companion_getInstance_125();
              tmp_3.ju5_1 = 'initState';
              this.hd_1 = 3;
              var tmp_4 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_4, ClazzAssignmentEditViewModel$slambda$slambda_4(this.fu5_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.gu5_1.aqj(this.ju5_1, ARGUMENT);
            this.hd_1 = 4;
            continue $sm;
          case 4:
            l$ret$1: do {
              var this_0 = this.fu5_1.rtx_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ku5(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.fu5_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_5 = Companion_getInstance_97().rq6_1;
                var tmp_6 = this.fu5_1.xqn().joj(strings_getInstance().tmr_1);
                var nextValue_0 = prevValue_0.jq6(VOID, tmp_5, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_6, VOID, ClazzAssignmentEditViewModel$onClickSave$ref(this.fu5_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.hu5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_6(this.fu5_1, null));
            launch(this.hu5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_8(this.fu5_1, null));
            launch(this.hu5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_10(this.fu5_1, null));
            launch(this.hu5_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_12(this.fu5_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.fu5_1, this.gu5_1, completion);
    i.hu5_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.tu5_1 = $commitDelay;
    this.uu5_1 = $entity;
    this.vu5_1 = $this;
    this.wu5_1 = $key;
    this.xu5_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.tu5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.uu5_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.vu5_1.dqo(this.vu5_1.xqm_1, this.wu5_1, this.xu5_1, this.uu5_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.tu5_1, this.uu5_1, this.vu5_1, this.wu5_1, this.xu5_1, completion);
    i.yu5_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.hu6_1 = $commitDelay;
    this.iu6_1 = $entity;
    this.ju6_1 = $this;
    this.ku6_1 = $key;
    this.lu6_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.hu6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.iu6_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ju6_1.dqo(this.ju6_1.xqm_1, this.ku6_1, this.lu6_1, this.iu6_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.hu6_1, this.iu6_1, this.ju6_1, this.ku6_1, this.lu6_1, completion);
    i.mu6_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.vu6_1 = $commitDelay;
    this.wu6_1 = $entity;
    this.xu6_1 = $this;
    this.yu6_1 = $key;
    this.zu6_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.vu6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.wu6_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.xu6_1.dqo(this.xu6_1.xqm_1, this.yu6_1, this.zu6_1, this.wu6_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.vu6_1, this.wu6_1, this.xu6_1, this.yu6_1, this.zu6_1, completion);
    i.au7_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.rtx_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ku5(true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.ju7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($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_125();
            tmp_0.ku7_1 = this.ju7_1.xqm_1.ba('initState');
            if (this.ku7_1 == null) {
              this.lu7_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.mu7_1 = this.ku7_1;
              var tmp_2 = this;
              tmp_2.nu7_1 = this.mu7_1;
              this.hd_1 = 1;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this.ju7_1, this.nu7_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

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

            tmp_4.pu7_1 = tmp_5;
            var tmp_6 = this;
            var tmp2_safe_receiver = this.ju7_1.rtx_1.t2().pty();
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.uk8_1;
            var tmp_7;
            if (tmp3_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_7 = tmp3_elvis_lhs;
            }

            tmp_6.qu7_1 = tmp_7;
            var tmp_8 = this;
            var tmp4_safe_receiver = this.ju7_1.rtx_1.t2().pty();
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.nk8_1;
            var tmp_9;
            if (tmp5_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_9 = tmp5_elvis_lhs;
            }

            tmp_8.ru7_1 = tmp_9;
            if (!this.qu7_1.v7t_1 ? !this.qu7_1.b7u_1 : false) {
              l$ret$1: do {
                var this_0 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.fty(VOID, VOID, VOID, VOID, VOID, this.ju7_1.xqn().joj(strings_getInstance().ank_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            }

            var it = this.ru7_1.e7y_1;
            if (it == null ? true : it <= 0.0) {
              l$ret$3: do {
                var this_1 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.cty_1.ku0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ju7_1.xqn().joj(strings_getInstance().vmn_1)));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.ru7_1.b7y_1.c7(this.ru7_1.a7y_1) <= 0) {
              l$ret$5: do {
                var this_2 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.cty_1.ku0(VOID, VOID, VOID, VOID, VOID, VOID, this.ju7_1.xqn().joj(strings_getInstance().sn9_1)));
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
            }

            if (this.ru7_1.d7y_1.c7(this.ru7_1.b7y_1) < 0) {
              l$ret$7: do {
                var this_3 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_2.cty_1.ku0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ju7_1.xqn().joj(strings_getInstance().gn6_1)));
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
            }

            var containsArg = this.qu7_1.x7t_1;
            if (!(5 <= containsArg ? containsArg <= 100 : false)) {
              l$ret$9: do {
                var this_4 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue_3 = this_4.t2();
                  var nextValue_3 = prevValue_3.fty(VOID, VOID, VOID, VOID, VOID, VOID, this.ju7_1.xqn().koj(strings_getInstance().ing_1, ['5', '100']));
                  if (this_4.y1k(prevValue_3, nextValue_3)) {
                    break l$ret$9;
                  }
                }
              }
               while (false);
            }

            var this_5 = this.ru7_1.x7x_1;
            if (this_5 == null ? true : isBlank(this_5)) {
              l$ret$11: do {
                var this_6 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue_4 = this_6.t2();
                  var nextValue_4 = prevValue_4.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_4.cty_1.ku0(VOID, VOID, VOID, VOID, VOID, this.ju7_1.xqn().joj(strings_getInstance().znl_1)));
                  if (this_6.y1k(prevValue_4, nextValue_4)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
            }

            if (this.ju7_1.rtx_1.t2().dty_1 ? this.qu7_1.q7t_1.equals(new Long(0, 0)) : false) {
              l$ret$13: do {
                var this_7 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue_5 = this_7.t2();
                  var nextValue_5 = prevValue_5.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ju7_1.xqn().joj(strings_getInstance().vmn_1));
                  if (this_7.y1k(prevValue_5, nextValue_5)) {
                    break l$ret$13;
                  }
                }
              }
               while (false);
            }

            this.su7_1 = null;
            var tmp6_safe_receiver = this.pu7_1.pty();
            var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.uk8_1;
            if (!equals(tmp7_safe_receiver == null ? null : tmp7_safe_receiver.q7t_1, this.qu7_1.q7t_1)) {
              this.hd_1 = 3;
              suspendResult = checkNoSubmissionsMade(this.ju7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.tu7_1 = false;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.uu7_1 = suspendResult;
            this.tu7_1 = !this.uu7_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (this.tu7_1) {
              this.su7_1 = this.ju7_1.xqn().joj(strings_getInstance().qmi_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.pu7_1.pty();
            var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.uk8_1;
            if (!((tmp9_safe_receiver == null ? null : tmp9_safe_receiver.a7u_1) === this.qu7_1.a7u_1)) {
              tmp_10 = this.su7_1 == null;
            } else {
              tmp_10 = false;
            }

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

          case 6:
            this.wu7_1 = suspendResult;
            this.vu7_1 = !this.wu7_1;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (this.vu7_1) {
              this.su7_1 = this.ju7_1.xqn().joj(strings_getInstance().qmi_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.qu7_1.a7u_1;
            if (tmp_12 === 2) {
              tmp_11 = this.qu7_1.g7u_1 < 1;
            } else {
              tmp_11 = false;
            }

            if (tmp_11) {
              l$ret$15: do {
                var this_8 = this.ju7_1.rtx_1;
                while (true) {
                  var prevValue_6 = this_8.t2();
                  var nextValue_6 = prevValue_6.fty(VOID, VOID, VOID, this.ju7_1.xqn().joj(strings_getInstance().anh_1));
                  if (this_8.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$15;
                  }
                }
              }
               while (false);
            }

            this.xu7_1 = this.su7_1;
            if (hasErrors_0(this.ju7_1.rtx_1.t2(), this.ju7_1) ? true : !(this.xu7_1 == null)) {
              var tmp10_safe_receiver = this.xu7_1;
              if (tmp10_safe_receiver == null)
                null;
              else {
                _get_snackDisaptcher__bp310a(this.ju7_1).yq6(new Snack(tmp10_safe_receiver));
              }
              return Unit_instance;
            }

            var tmp_13;
            var tmp_14 = this.qu7_1.a7u_1;
            if (tmp_14 === 2) {
              var tmp11_safe_receiver = this.pu7_1.pty();
              var tmp12_safe_receiver = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.uk8_1;
              tmp_13 = !((tmp12_safe_receiver == null ? null : tmp12_safe_receiver.g7u_1) === this.qu7_1.g7u_1);
            } else {
              tmp_13 = false;
            }

            if (tmp_13) {
              this.hd_1 = 9;
              var tmp_15 = this.ju7_1.qtx_1(this.ju7_1.rqn(), this.ju7_1.xqn());
              var tmp13_safe_receiver = this.ju7_1.rtx_1.t2().pty();
              var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.wk8_1;
              suspendResult = tmp_15.gpk(tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs, this.qu7_1.q7t_1, this.qu7_1.f7u_1, this.qu7_1.n7t_1, this.qu7_1.g7u_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.ju7_1.rtx_1;
              while (true) {
                var prevValue_7 = this_9.t2();
                var tmp0_safe_receiver = prevValue_7.cty_1.ztz_1;
                var nextValue_7 = prevValue_7.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_7.cty_1.ku0(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(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.ju7_1.rtx_1;
            var tmp_16;
            var tmp_17;
            var tmp0_safe_receiver_0 = this_10.t2().pty();
            var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.uk8_1;
            if (!equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7t_1, new Long(0, 0))) {
              tmp_17 = !this_10.t2().dty_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.cty_1.ztz_1;
                  var tmp_18;
                  if (tmp1_safe_receiver_0 == null) {
                    tmp_18 = null;
                  } else {
                    var tmp0_safe_receiver_1 = prevValue_8.cty_1.ztz_1.uk8_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.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_19, null);
                  }
                  var nextValue_8 = prevValue_8.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_8.cty_1.ku0(tmp_18));
                  if (tmp15_safe_receiver.y1k(prevValue_8, nextValue_8)) {
                    break l$ret$19;
                  }
                }
              }
               while (false);
            }

            this.ju7_1.iqt(this.ju7_1.rtx_1.t2().pty());
            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).l78 = function (completion) {
    return new ClazzAssignmentEditViewModel$onClickSave$slambda(this.ju7_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.j87($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.qtx_1 = peerReviewAllocationUseCaseFactory;
    var tmp_0 = this;
    var tmp0_completionCriteriaOptions = Companion_getInstance_151().nu4_1;
    var tmp1_timeZone = Companion_getInstance_9().xmh().ymg();
    tmp_0.rtx_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.stx_1 = asStateFlow(this.rtx_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.ttx_1 = Instance(this, tmp$ret$0, null).a5d(this, snackDisaptcher$factory());
    var tmp_3 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.utx_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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_97().qq6_1;
        var tmp1_title = this.hqu(strings_getInstance().yn5_1, strings_getInstance().zn5_1);
        var nextValue = prevValue.jq6(VOID, tmp0_loadingState, tmp1_title, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_4 = this.oqn();
    launch(tmp_4, VOID, VOID, ClazzAssignmentEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ClazzAssignmentEditViewModel).yu7 = function (groupSubmissionOn) {
    this.xqm_1.aqj('groupSubmissionOn', groupSubmissionOn.toString());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rtx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onGroupSubmissionOnChanged.<anonymous>' call
        var tmp;
        if (!(prevValue.ety_1 == null) ? groupSubmissionOn : false) {
          tmp = prevValue.ety_1;
        } else {
          tmp = null;
        }
        var nextValue = prevValue.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, groupSubmissionOn, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentEditViewModel).zu7 = function (assignment) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.rtx_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.cty_1.ztz_1;
        var tmp9_courseBlockEditUiState = prevValue.cty_1.ku0(tmp8_safe_receiver == null ? null : tmp8_safe_receiver.zk8(VOID, VOID, VOID, VOID, VOID, VOID, VOID, assignment));
        var tmp;
        var tmp_0;
        if (!(prevValue.bty_1 == null)) {
          var tmp_1 = assignment == null ? null : assignment.x7t_1;
          var tmp6_safe_receiver = prevValue.pty();
          var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.uk8_1;
          tmp_0 = tmp_1 == (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.x7t_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.bty_1;
        } else {
          tmp = null;
        }
        var tmp10_sizeLimitError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.aty_1 == null)) {
          tmp_4 = (assignment == null ? null : assignment.v7t_1) === false;
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = !assignment.b7u_1;
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.aty_1;
        } else {
          tmp_2 = null;
        }
        var tmp11_submissionRequiredError = tmp_2;
        var tmp_5;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.ytx_1 == null)) {
          var tmp_8 = assignment == null ? null : assignment.g7u_1;
          var tmp1_safe_receiver = prevValue.pty();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.uk8_1;
          tmp_7 = tmp_8 == (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g7u_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          var tmp_9 = assignment == null ? null : assignment.a7u_1;
          tmp_6 = tmp_9 === 2;
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = prevValue.ytx_1;
        } else {
          tmp_5 = null;
        }
        var tmp12_reviewerCountError = tmp_5;
        var nextValue = prevValue.fty(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.pty();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_10 = this;
    var tmp_11 = this.oqn();
    tmp_10.eqt_1 = launch(tmp_11, VOID, VOID, ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).atz = function (courseBlock) {
    if (courseBlock == null) {
      Napier_getInstance().m5e('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.rtx_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.pty();
        var prevBlock = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
        var tmp8_$this = prevValue.cty_1;
        var tmp1_safe_receiver = prevValue.pty();
        var tmp9_block = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zk8(courseBlock);
        var tmp5_safe_receiver = prevValue.cty_1.ztz_1;
        var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.nk8_1;
        var tmp10_caMaxPointsError = this.iqu(tmp6_safe_receiver == null ? null : tmp6_safe_receiver.e7y_1, courseBlock.e7y_1, prevValue.cty_1.gu0_1);
        var tmp;
        var tmp_0;
        var tmp_1;
        if (!(prevValue.cty_1.fu0_1 == null)) {
          tmp_1 = equals(prevBlock == null ? null : prevBlock.b7y_1, courseBlock.b7y_1);
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp_0 = prevBlock.a7y_1.equals(courseBlock.a7y_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.cty_1.fu0_1;
        } else {
          tmp = null;
        }
        var tmp11_caDeadlineError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.cty_1.iu0_1 == null)) {
          tmp_4 = equals(prevBlock == null ? null : prevBlock.b7y_1, courseBlock.b7y_1);
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = prevBlock.d7y_1.equals(courseBlock.d7y_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.cty_1.iu0_1;
        } else {
          tmp_2 = null;
        }
        var tmp12_caGracePeriodError = tmp_2;
        var tmp2_safe_receiver = prevValue.cty_1.ztz_1;
        var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
        var tmp13_caTitleError = this.iqu(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.x7x_1, courseBlock.x7x_1, prevValue.cty_1.eu0_1);
        var nextValue = prevValue.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp8_$this.ku0(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.pty();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_5 = this;
    var tmp_6 = this.oqn();
    tmp_5.eqt_1 = launch(tmp_6, VOID, VOID, ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).au8 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.rtx_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.cty_1.ztz_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.cty_1.ztz_1.ok8_1;
          tmp = tmp1_safe_receiver.zk8(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lkm(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.fty(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.cty_1.ku0(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.pty();
    var serializer = Companion_getInstance_13().n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.oqn();
    tmp_0.eqt_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentEditViewModel$onPictureChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).bu8 = function () {
    var tmp = serializer_0(StringCompanionObject_instance);
    Companion_getInstance_125();
    var tmp0_safe_receiver = this.rtx_1.t2().pty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f7u_1;
    this.fqo('CourseGroups', 'groupSet', null, tmp, mapOf_0(to('clazzUid', (tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs).toString())));
  };
  protoOf(ClazzAssignmentEditViewModel).cu8 = function () {
    var tmp0_safe_receiver = this.rtx_1.t2().pty();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_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_18.n4r());
    var tmp_1 = this.m4r();
    var tmp_2 = ListSerializer(Companion_instance_18.n4r());
    var tmp2_safe_receiver = this.rtx_1.t2().pty();
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.wk8_1;
    var tmp_3 = to('allocations', tmp_1.r45(tmp_2, tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs));
    var tmp_4 = to('groupSetUid', assignmentVal.q7t_1.toString());
    Companion_getInstance_125();
    var tmp_5 = to('clazzUid', assignmentVal.f7u_1.toString());
    var tmp_6 = to('numReviewers', assignmentVal.g7u_1.toString());
    Companion_getInstance_116();
    this.fqo('PeerReviewerAllocationEdit', 'peerAllocationsResult', null, tmp_0, mapOf([tmp_3, tmp_4, tmp_5, tmp_6, to('clazzAssignmentUid', assignmentVal.n7t_1.toString())]));
  };
  protoOf(ClazzAssignmentEditViewModel).xs9 = function () {
    if (!this.rtx_1.t2().vtx_1)
      return Unit_instance;
    var tmp = ClazzAssignmentEditViewModel$onClickSave$lambda(this);
    this.kqu(tmp, ClazzAssignmentEditViewModel$onClickSave$slambda_0(this, null));
  };
  function Companion_134() {
    Companion_instance_183 = this;
    this.nu4_1 = listOf([CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()]);
  }
  protoOf(Companion_134).n4r = function () {
    return $serializer_getInstance_73();
  };
  var Companion_instance_183;
  function Companion_getInstance_151() {
    if (Companion_instance_183 == null)
      new Companion_134();
    return Companion_instance_183;
  }
  function $serializer_61() {
    $serializer_instance_61 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditUiState', this, 10);
    tmp0_serialDesc.t4f('fieldsEnabled', true);
    tmp0_serialDesc.t4f('markingTypeEnabled', true);
    tmp0_serialDesc.t4f('groupSetEnabled', true);
    tmp0_serialDesc.t4f('reviewerCountError', true);
    tmp0_serialDesc.t4f('courseTerminology', true);
    tmp0_serialDesc.t4f('submissionRequiredError', true);
    tmp0_serialDesc.t4f('sizeLimitError', true);
    tmp0_serialDesc.t4f('courseBlockEditUiState', true);
    tmp0_serialDesc.t4f('groupSubmissionOn', true);
    tmp0_serialDesc.t4f('groupSetError', true);
    this.du8_1 = tmp0_serialDesc;
  }
  protoOf($serializer_61).q44 = function () {
    return this.du8_1;
  };
  protoOf($serializer_61).k4g = 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_75(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_61).s44 = function (decoder) {
    var tmp0_desc = this.du8_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.i48(tmp0_desc);
    if (tmp14_input.x48()) {
      tmp4_local0 = tmp14_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp14_input.k48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp14_input.k48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp14_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp14_input.w48(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp14_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp14_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp14_input.u48(tmp0_desc, 7, $serializer_getInstance_75(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp14_input.k48(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp14_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp14_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp14_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp14_input.k48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp14_input.k48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp14_input.w48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp14_input.w48(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp14_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp14_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp14_input.u48(tmp0_desc, 7, $serializer_getInstance_75(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp14_input.k48(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp14_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp14_input.j48(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_61).eu8 = function (encoder, value) {
    var tmp0_desc = this.du8_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vtx_1 === false)) {
      tmp1_output.o49(tmp0_desc, 0, value.vtx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.wtx_1 === true)) {
      tmp1_output.o49(tmp0_desc, 1, value.wtx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.xtx_1 === true)) {
      tmp1_output.o49(tmp0_desc, 2, value.xtx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.ytx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 3, StringSerializer_getInstance(), value.ytx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.ztx_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, $serializer_getInstance_10(), value.ztx_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.aty_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.aty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.bty_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.bty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !value.cty_1.equals(new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_151().nu4_1))) {
      tmp1_output.y49(tmp0_desc, 7, $serializer_getInstance_75(), value.cty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.dty_1 === false)) {
      tmp1_output.o49(tmp0_desc, 8, value.dty_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.ety_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.ety_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_61).r44 = function (encoder, value) {
    return this.eu8(encoder, value instanceof ClazzAssignmentEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_61;
  function $serializer_getInstance_73() {
    if ($serializer_instance_61 == null)
      new $serializer_61();
    return $serializer_instance_61;
  }
  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_73().du8_1);
    }
    if (0 === (seen1 & 1))
      $this.vtx_1 = false;
    else
      $this.vtx_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.wtx_1 = true;
    else
      $this.wtx_1 = markingTypeEnabled;
    if (0 === (seen1 & 4))
      $this.xtx_1 = true;
    else
      $this.xtx_1 = groupSetEnabled;
    if (0 === (seen1 & 8))
      $this.ytx_1 = null;
    else
      $this.ytx_1 = reviewerCountError;
    if (0 === (seen1 & 16))
      $this.ztx_1 = null;
    else
      $this.ztx_1 = courseTerminology;
    if (0 === (seen1 & 32))
      $this.aty_1 = null;
    else
      $this.aty_1 = submissionRequiredError;
    if (0 === (seen1 & 64))
      $this.bty_1 = null;
    else
      $this.bty_1 = sizeLimitError;
    if (0 === (seen1 & 128))
      $this.cty_1 = new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_151().nu4_1);
    else
      $this.cty_1 = courseBlockEditUiState;
    if (0 === (seen1 & 256))
      $this.dty_1 = false;
    else
      $this.dty_1 = groupSubmissionOn;
    if (0 === (seen1 & 512))
      $this.ety_1 = null;
    else
      $this.ety_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_151();
    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_151().nu4_1) : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? false : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? null : groupSetError;
    this.vtx_1 = fieldsEnabled;
    this.wtx_1 = markingTypeEnabled;
    this.xtx_1 = groupSetEnabled;
    this.ytx_1 = reviewerCountError;
    this.ztx_1 = courseTerminology;
    this.aty_1 = submissionRequiredError;
    this.bty_1 = sizeLimitError;
    this.cty_1 = courseBlockEditUiState;
    this.dty_1 = groupSubmissionOn;
    this.ety_1 = groupSetError;
  }
  protoOf(ClazzAssignmentEditUiState).pty = function () {
    return this.cty_1.ztz_1;
  };
  protoOf(ClazzAssignmentEditUiState).fu8 = function () {
    var tmp0_safe_receiver = this.pty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a7u_1;
    return tmp === 2;
  };
  protoOf(ClazzAssignmentEditUiState).gu8 = function () {
    var tmp0_safe_receiver = this.pty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b7u_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).hu8 = function () {
    var tmp0_safe_receiver = this.pty();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uk8_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v7t_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).ku5 = function (fieldsEnabled) {
    return this.fty(fieldsEnabled, VOID, VOID, VOID, VOID, VOID, VOID, this.cty_1.ku0(VOID, VOID, VOID, fieldsEnabled));
  };
  protoOf(ClazzAssignmentEditUiState).iu8 = 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).fty = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.vtx_1 : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? this.wtx_1 : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? this.xtx_1 : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? this.ytx_1 : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? this.ztx_1 : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? this.aty_1 : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? this.bty_1 : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.cty_1 : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? this.dty_1 : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? this.ety_1 : groupSetError;
    return $super === VOID ? this.iu8(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) : $super.iu8.call(this, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).toString = function () {
    return 'ClazzAssignmentEditUiState(fieldsEnabled=' + this.vtx_1 + ', markingTypeEnabled=' + this.wtx_1 + ', groupSetEnabled=' + this.xtx_1 + ', reviewerCountError=' + this.ytx_1 + ', courseTerminology=' + this.ztx_1 + ', submissionRequiredError=' + this.aty_1 + ', sizeLimitError=' + this.bty_1 + ', courseBlockEditUiState=' + this.cty_1 + ', groupSubmissionOn=' + this.dty_1 + ', groupSetError=' + this.ety_1 + ')';
  };
  protoOf(ClazzAssignmentEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.vtx_1);
    result = imul(result, 31) + getBooleanHashCode(this.wtx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xtx_1) | 0;
    result = imul(result, 31) + (this.ytx_1 == null ? 0 : getStringHashCode(this.ytx_1)) | 0;
    result = imul(result, 31) + (this.ztx_1 == null ? 0 : hashCode(this.ztx_1)) | 0;
    result = imul(result, 31) + (this.aty_1 == null ? 0 : getStringHashCode(this.aty_1)) | 0;
    result = imul(result, 31) + (this.bty_1 == null ? 0 : getStringHashCode(this.bty_1)) | 0;
    result = imul(result, 31) + this.cty_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dty_1) | 0;
    result = imul(result, 31) + (this.ety_1 == null ? 0 : getStringHashCode(this.ety_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.vtx_1 === tmp0_other_with_cast.vtx_1))
      return false;
    if (!(this.wtx_1 === tmp0_other_with_cast.wtx_1))
      return false;
    if (!(this.xtx_1 === tmp0_other_with_cast.xtx_1))
      return false;
    if (!(this.ytx_1 == tmp0_other_with_cast.ytx_1))
      return false;
    if (!equals(this.ztx_1, tmp0_other_with_cast.ztx_1))
      return false;
    if (!(this.aty_1 == tmp0_other_with_cast.aty_1))
      return false;
    if (!(this.bty_1 == tmp0_other_with_cast.bty_1))
      return false;
    if (!this.cty_1.equals(tmp0_other_with_cast.cty_1))
      return false;
    if (!(this.dty_1 === tmp0_other_with_cast.dty_1))
      return false;
    if (!(this.ety_1 == tmp0_other_with_cast.ety_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.ru8_1 = this$0;
    this.su8_1 = $savedStateHandle;
    this.tu8_1 = $primaryKeyManager;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).nu9 = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.nu9(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.ru8_1.cqo(this.su8_1, 'allocations', ListSerializer(Companion_instance_18.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vu8_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.uu8_1.q7e().n7s(this.ru8_1.oua_1, this.ru8_1.rua_1, systemTimeInMillis(), this.ru8_1.xqn().joj(strings_getInstance().bng_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.wu8_1 = suspendResult;
            Napier_getInstance().i5e('Number of submitters: ' + this.wu8_1.u());
            var tmp_0 = this;
            tmp_0.xu8_1 = this.wu8_1;
            var tmp_1 = this;
            tmp_1.yu8_1 = this.xu8_1;
            var tmp_2 = this;
            tmp_2.zu8_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.xu8_1, 10));
            this.au9_1 = this.yu8_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.au9_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.bu9_1 = this.au9_1.e();
            var tmp_3 = this;
            tmp_3.cu9_1 = this.bu9_1;
            this.du9_1 = new AssignmentSubmitterSummary(this.cu9_1.e7x_1, this.cu9_1.d7x_1);
            var tmp_4 = this;
            var tmp0_safe_receiver = this.vu8_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.pfu_1.equals(this.cu9_1.e7x_1)) {
                  destination.i1(element);
                }
              }
              tmp_5 = destination;
            }

            var tmp1_elvis_lhs = tmp_5;
            tmp_4.eu9_1 = trimToSize(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.ru8_1.pua_1);
            var tmp_6 = this;
            tmp_6.fu9_1 = this.ru8_1.pua_1;
            if (this.eu9_1.u() < this.fu9_1) {
              var tmp_7 = this;
              tmp_7.hu9_1 = until(this.eu9_1.u(), this.fu9_1);
              var tmp_8 = this;
              tmp_8.iu9_1 = this.hu9_1;
              var tmp_9 = this;
              tmp_9.ju9_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.hu9_1, 10));
              this.ku9_1 = this.iu9_1.w();
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.gu9_1 = this.eu9_1;
              this.hd_1 = 7;
              continue $sm;
            }

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

            this.lu9_1 = this.ku9_1.e();
            var tmp_11 = this;
            tmp_11.mu9_1 = this.lu9_1;
            this.hd_1 = 5;
            suspendResult = this.tu8_1.o62(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = new PeerReviewerAllocation(ARGUMENT, VOID, this.cu9_1.e7x_1, this.ru8_1.qua_1);
            this.ju9_1.i1(ARGUMENT_0);
            this.hd_1 = 4;
            continue $sm;
          case 6:
            var ARGUMENT_1 = this.ju9_1;
            this.gu9_1 = plus(this.eu9_1, ARGUMENT_1);
            this.hd_1 = 7;
            continue $sm;
          case 7:
            var ARGUMENT_2 = this.gu9_1;
            var ARGUMENT_3 = new AssignmentSubmitterAndAllocations(this.du9_1, ARGUMENT_2);
            this.zu8_1.i1(ARGUMENT_3);
            this.hd_1 = 3;
            continue $sm;
          case 8:
            return this.zu8_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).vny = function (db, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this.ru8_1, this.su8_1, this.tu8_1, completion);
    i.uu8_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.nu9(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).aub = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.aub($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).l78 = 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.aub($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.mua_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.cub(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.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_135() {
    this.dub_1 = 'allocations';
    this.eub_1 = 'groupSetUid';
    this.fub_1 = 'numReviewers';
    this.gub_1 = 'PeerReviewerAllocationEdit';
  }
  var Companion_instance_184;
  function Companion_getInstance_152() {
    return Companion_instance_184;
  }
  function PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.pub_1 = this$0;
    this.qub_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.sub_1 = get_doorPrimaryKeyManager(this.pub_1.rqn());
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_getInstance_14().n4r());
            var tmp_1 = PeerReviewerAllocationEditViewModel$slambda$slambda_0(this.pub_1, this.qub_1, this.sub_1, null);
            var tmp_2 = PeerReviewerAllocationEditViewModel$slambda$slambda_2(null);
            suspendResult = this.pub_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, PeerReviewerAllocationEditViewModel$slambda$lambda(this.pub_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.pub_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.pub_1.xqn().joj(strings_getInstance().tmr_1);
                var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, true, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, PeerReviewerAllocationEditViewModel$onClickSave$ref(this.pub_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.pub_1, this.qub_1, completion);
    i.rub_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.nfu_1.equals($allocation.nfu_1);
    };
  }
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation) {
    this.buc_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.buc_1.mua_1.t2().bub_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var list = element.pkc_1;
              addAll(destination, list);
            }

            suspendResult = this.buc_1.lua_1.fpk(destination, this.buc_1.rua_1, this.buc_1.oua_1, this.buc_1.qua_1, this.buc_1.pua_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.buc_1.mua_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = prevValue.bub_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.pfu_1.equals(item.okc_1.r7v_1)) {
                      destination_1.i1(element_0);
                    }
                  }
                  destination_0.i1(new AssignmentSubmitterAndAllocations(item.okc_1, destination_1));
                }
                var nextValue = prevValue.cub(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.buc_1, completion);
    i.cuc_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(onActiveLearningSpace(di)).f58();
      // 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.d58(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(di).f58();
      // 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.d58(tmp$ret$2, null);
      tmp = new UpdatePeerReviewAllocationUseCase(tmp_2, tmp$ret$3);
    } else {
      tmp = updatePeerReviewAllocationUseCase;
    }
    updatePeerReviewAllocationUseCase = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'PeerReviewerAllocationEdit');
    this.lua_1 = updatePeerReviewAllocationUseCase;
    this.mua_1 = MutableStateFlow(new PeerReviewerAllocationEditUIState());
    this.nua_1 = asStateFlow(this.mua_1);
    var tmp_5 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_5.oua_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.pua_1 = tmp1_elvis_lhs_0 == null ? 1 : tmp1_elvis_lhs_0;
    var tmp_7 = this;
    Companion_getInstance_116();
    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.qua_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.rua_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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().unk_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.oqn();
    launch(tmp_9, VOID, VOID, PeerReviewerAllocationEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(PeerReviewerAllocationEditViewModel).duc = function (allocation) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mua_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.bub_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.okc_1.r7v_1.equals(allocation.pfu_1)) {
            tmp = item.rkc(VOID, replace_0(item.pkc_1, allocation, PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda(allocation)));
          } else {
            tmp = item;
          }
          var tmp$ret$0 = tmp;
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.cub(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PeerReviewerAllocationEditViewModel).euc = function () {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this, null));
  };
  protoOf(PeerReviewerAllocationEditViewModel).xs9 = function () {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var this_0 = this.mua_1.t2().bub_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.pkc_1;
      addAll(destination, list);
    }
    this.iqt(destination);
  };
  function PeerReviewerAllocationEditUIState(submitterListWithAllocations) {
    submitterListWithAllocations = submitterListWithAllocations === VOID ? emptyList() : submitterListWithAllocations;
    this.bub_1 = submitterListWithAllocations;
  }
  protoOf(PeerReviewerAllocationEditUIState).fuc = function (allocation) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.bub_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.okc_1.r7v_1.equals(allocation.pfu_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.pkc_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.nfu_1.equals(allocation.nfu_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.ofu_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.bub_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.okc_1.r7v_1.equals(allocation.pfu_1) ? !otherMarkersAlreadySelected.a1(element_1.okc_1.r7v_1) : false) {
        destination_1.i1(element_1);
      }
    }
    return destination_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).cub = function (submitterListWithAllocations) {
    return new PeerReviewerAllocationEditUIState(submitterListWithAllocations);
  };
  protoOf(PeerReviewerAllocationEditUIState).toString = function () {
    return 'PeerReviewerAllocationEditUIState(submitterListWithAllocations=' + this.bub_1 + ')';
  };
  protoOf(PeerReviewerAllocationEditUIState).hashCode = function () {
    return hashCode(this.bub_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.bub_1, tmp0_other_with_cast.bub_1))
      return false;
    return true;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ouc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).quc = function (it, $completion) {
    var tmp = this.ruc(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.quc((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.ouc_1.oud_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.xue(VOID, this.puc_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).ruc = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this.ouc_1, completion);
    i.puc_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.quc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.guf_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.guf_1.tqn().p7d().ncl(this.guf_1.sud_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this.guf_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.guf_1, completion);
    i.huf_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).ztj = function (submissions, submissionFiles, $completion) {
    var tmp = this.atk(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.ztj(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.quf_1, this.ruf_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).atk = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(completion);
    i.quf_1 = submissions;
    i.ruf_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.ztj(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.aug_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).ltk = function (it, $completion) {
    var tmp = this.mtk(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.ltk((!(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.aug_1.oud_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.xue(VOID, VOID, VOID, this.bug_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).mtk = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.aug_1, completion);
    i.bug_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.ltk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.kug_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).xtk = function (it, $completion) {
    var tmp = this.ytk(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.xtk((!(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.kug_1.oud_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.xue(VOID, VOID, VOID, VOID, VOID, this.lug_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).ytk = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this.kug_1, completion);
    i.lug_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.xtk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.uug_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.uug_1).foo(this.uug_1.tud_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var submitterName = suspendResult;
            l$ret$1: do {
              var this_0 = this.uug_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jq6(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.uug_1, completion);
    i.vug_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.euh_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.fuh_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.euh_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.euh_1, completion);
    i.fuh_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.ouh_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.quh_1 = this.ouh_1.tqn().r7e().rc1(this.ouh_1.tud_1, this.ouh_1.sud_1);
            this.ruh_1 = this.ouh_1.tqn().s7e().cca(this.ouh_1.tud_1, this.ouh_1.sud_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.quh_1, this.ruh_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.ouh_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this.ouh_1, completion);
    i.puh_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.aui_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.aui_1.tqn().t7e().qbv(this.aui_1.tud_1, this.aui_1.sud_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this.aui_1, null);
            suspendResult = tmp_0.a1c(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(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this.aui_1, completion);
    i.bui_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.kui_1 = this$0;
    this.lui_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).nui = function (permissionPair, $completion) {
    var tmp = this.oui(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.nui(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.mui_1.qdo_1) {
            l$ret$1: do {
              var this_0 = this.kui_1.oud_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_privateCommentsList = this.kui_1.vud_1;
                var tmp1_activeUserPersonUid = this.kui_1.pqn();
                var tmp2_activeUserSubmitterId = this.mui_1.sdo_1;
                var tmp_0;
                if (this.mui_1.pdo_1) {
                  var this_1 = new CourseAssignmentMark();
                  this_1.lbw_1 = -1.0;
                  tmp_0 = this_1;
                } else {
                  tmp_0 = null;
                }
                var tmp3_draftMark = tmp_0;
                var tmp4_showModerateOptions = this.mui_1.rdo_1;
                var nextValue = prevValue.xue(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.lui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.kui_1, null));
            launch(this.lui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.kui_1, null));
            launch(this.lui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this.kui_1, null));
            launch(this.lui_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this.kui_1, null));
          } else {
            l$ret$3: do {
              var this_2 = this.kui_1.oud_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp0_submissionList = emptyList();
                var tmp1_marks = emptyList();
                var nextValue_0 = prevValue_0.xue(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).oui = function (permissionPair, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this.kui_1, this.lui_1, completion);
    i.mui_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.nui(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.xui_1 = $permissionFlow;
    this.yui_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.xui_1);
            suspendResult = collectLatest(tmp_0, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this.yui_1, this.zui_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.xui_1, this.yui_1, completion);
    i.zui_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.iuj_1 = $this_launch;
    this.juj_1 = $permissionFlow;
    this.kuj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.iuj_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0(this.juj_1, this.kuj_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).l78 = function (completion) {
    return new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda(this.iuj_1, this.juj_1, this.kuj_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.j87($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.oud_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.xue(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.wud_1;
    assignmentSubmitterNameUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yud_1;
    openBlobUiUseCase$factory_2();
    return this_0.t2();
  }
  function _get_submitMarkUseCase__y8b5kx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zud_1;
    submitMarkUseCase$factory_0();
    return this_0.t2();
  }
  function openSubmissionFileAsBlob_0($this, file, intent) {
    var tmp0_elvis_lhs = file.wcb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.xud_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.oqn();
    tmp_0.xud_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_136() {
    this.luj_1 = 'assignmentUid';
    this.muj_1 = 'submitterUid';
    this.nuj_1 = 'CourseAssignmentSubmitter';
  }
  var Companion_instance_185;
  function Companion_getInstance_153() {
    return Companion_instance_185;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_18(function_0) {
    this.ouj_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_18).t1d = function (value, $completion) {
    return this.ouj_1(value, $completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().u7e().pac(this$0.tud_1, this$0.sud_1, false);
    };
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.xuj_1 = this$0;
    this.yuj_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.xuj_1.oud_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0(this.zuj_1, this.yuj_1, this.xuj_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.xuj_1, this.yuj_1, completion);
    i.zuj_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.iuk_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.iuk_1.tqn().u7e();
            var this_0 = new Comments();
            this_0.kad_1 = this.iuk_1.tud_1;
            this_0.lad_1 = this.iuk_1.oud_1.t2().pue_1;
            this_0.jad_1 = this.iuk_1.pqn();
            this_0.had_1 = this.iuk_1.sud_1;
            this_0.gad_1 = this.iuk_1.qud_1.t2();
            this_0.oad_1 = systemTimeInMillis();
            suspendResult = tmp_0.mac(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.iuk_1.qud_1.x1k('');
            tmp_1.kuk_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.iuk_1.zqn(Companion_getInstance_97().rq6_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.iuk_1.zqn(Companion_getInstance_97().rq6_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.iuk_1, completion);
    i.juk_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.tuk_1 = this$0;
    this.uuk_1 = $assignment;
    this.vuk_1 = $draftMark;
    this.wuk_1 = $submissions;
    this.xuk_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.tuk_1);
            var tmp_1 = this.tuk_1.nqn().ro9().lnu_1;
            var this_0 = this.wuk_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.ekb_1);
            }

            suspendResult = tmp_0.oom(tmp_1, this.uuk_1, this.tuk_1.uud_1, this.tuk_1.tud_1, this.vuk_1, destination, this.xuk_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.tuk_1.oud_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = new CourseAssignmentMark();
                this_2.lbw_1 = -1.0;
                var nextValue = prevValue.xue(VOID, VOID, VOID, VOID, VOID, VOID, this_2);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_2.zuk_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.tuk_1.vqn().yq6(new Snack('Error: ' + e.message));
              Napier_getInstance().m5e('Exception submitting mark:', e);
              tmp_4.zuk_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.tuk_1.oud_1;
              while (true) {
                var prevValue_0 = this_3.t2();
                var nextValue_0 = prevValue_0.xue(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.tuk_1.oud_1;
              while (true) {
                var prevValue_1 = this_4.t2();
                var nextValue_1 = prevValue_1.xue(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.tuk_1, this.uuk_1, this.vuk_1, this.wuk_1, this.xuk_1, completion);
    i.yuk_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.iul_1 = this$0;
    this.jul_1 = $submissionFile;
    this.kul_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.mul_1 = _get_openBlobUiUseCase__fzusqz_0(this.iul_1);
            if (this.mul_1 == null) {
              this.nul_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.jul_1);
              suspendResult = this.mul_1.lop(tmp_0, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this.iul_1), this.kul_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.nul_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.iul_1, this.jul_1, this.kul_1, completion);
    i.lul_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.wul_1 = this$0;
    this.xul_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.wul_1.tqn().u7e().nac(this.xul_1.fad_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wul_1.vqn().yq6(new Snack(this.wul_1.xqn().joj(strings_getInstance().lmj_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.wul_1, this.xul_1, completion);
    i.yul_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.oud_1 = MutableStateFlow(new ClazzAssignmentSubmitterDetailUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.xqn().eq5()));
    this.pud_1 = asStateFlow(this.oud_1);
    this.qud_1 = MutableStateFlow('');
    this.rud_1 = asStateFlow(this.qud_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.sud_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.tud_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_125();
    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.uud_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.vud_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.nqn().ioa();
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$1 = tmp_7.h57(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.wud_1 = Instance(this_0, tmp$ret$3, null).a5d(this, assignmentSubmitterNameUseCase$factory());
    this.xud_1 = null;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveLearningSpace(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.yud_1 = InstanceOrNull(this_1, tmp$ret$5, null).a5d(this, openBlobUiUseCase$factory_1());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveLearningSpace(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.zud_1 = Instance(this_2, tmp$ret$7, null).a5d(this, submitMarkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.oud_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.<anonymous>' call
        var tmp_14 = this.nqn().ro9().lnu_1.ckr();
        var tmp0_safe_receiver_2 = this.nqn().ro9().nnu_1;
        var nextValue = prevValue.xue(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.h97_1);
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var permissionFlow = this.tqn().o7f().kdk(this.pqn(), this.sud_1, this.uud_1, this.tud_1);
    var tmp_15 = this.oqn();
    launch(tmp_15, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel).zul = function (text) {
    this.qud_1.x1k(text);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).aum = function () {
    if (this.aqo().equals(Companion_getInstance_97().qq6_1))
      return Unit_instance;
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).bum = function (draftMark) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.oud_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.gue_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lbw_1;
        if (tmp_0 == (draftMark == null ? null : draftMark.lbw_1)) {
          tmp = prevValue.aue_1;
        } else {
          tmp = null;
        }
        var tmp2_submitMarkError = tmp;
        var nextValue = prevValue.xue(tmp2_submitMarkError, VOID, VOID, VOID, VOID, VOID, draftMark);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).cum = function () {
    if (!this.oud_1.t2().dum())
      return Unit_instance;
    var tmp0_elvis_lhs = this.oud_1.t2().gue_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var draftMark = tmp;
    var submissions = this.oud_1.t2().due_1;
    var tmp1_elvis_lhs = this.oud_1.t2().bue_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.uco_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.vco_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    var assignment = tmp_2;
    if (draftMark.lbw_1 === -1.0) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.oud_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
          var nextValue = prevValue.xue(this.xqn().joj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    } else {
      if (draftMark.lbw_1 < 0.0) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_1 = this.oud_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.xue(this.xqn().joj(strings_getInstance().anh_1));
            if (this_1.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      } else {
        var tmp_3 = draftMark.lbw_1;
        var tmp4_elvis_lhs = courseBlock.e7y_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.oud_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.xue(this.xqn().joj(strings_getInstance().ynl_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.oud_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.xue(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_3.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_4 = this.oqn();
    launch(tmp_4, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this, assignment, draftMark, submissions, courseBlock, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).eum = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.oud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickGradeFilterChip.<anonymous>' call
        var nextValue = prevValue.xue(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.mq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).ntv = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.oud_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.xue(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle_0(prevValue.uue_1, submission.kc2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).qtv = function (file) {
    openSubmissionFileAsBlob_0(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).rtv = function (comments) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq_0($this) {
    return latestUniqueMarksByMarker($this.fue_1);
  }
  function sam$kotlin_Comparator$0_1(function_0) {
    this.fum_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_1).pa = function (a, b) {
    return this.fum_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.rbw_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.obw_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.rbw_1;
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.obw_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().jnl_1;
      var tmp_2 = new MessageIdOption2(tmp_1, 1);
      var tmp_3 = strings_getInstance().zmz_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.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? null : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    this.aue_1 = submitMarkError;
    this.bue_1 = block;
    this.cue_1 = gradeFilterChips;
    this.due_1 = submissionList;
    this.eue_1 = submissionAttachments;
    this.fue_1 = marks;
    this.gue_1 = draftMark;
    this.hue_1 = markSubmissionInProgress;
    this.iue_1 = markNextStudentVisible;
    this.jue_1 = fieldsEnabled;
    this.kue_1 = markListSelectedChipId;
    this.lue_1 = markListFilterOptions;
    this.mue_1 = privateCommentsList;
    this.nue_1 = newPrivateCommentTextVisible;
    this.oue_1 = activeUserPersonUid;
    this.pue_1 = activeUserSubmitterId;
    this.que_1 = activeUserPersonName;
    this.rue_1 = activeUserPictureUri;
    this.sue_1 = localDateTimeNow;
    this.tue_1 = dayOfWeekStrings;
    this.uue_1 = collapsedSubmissions;
    this.vue_1 = openingFileState;
    this.wue_1 = showModerateOptions;
  }
  protoOf(ClazzAssignmentSubmitterDetailUiState).dum = function () {
    var tmp;
    if (!this.hue_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.bue_1;
      var tmp_0;
      if (!((it == null ? null : it.vco_1) == null)) {
        tmp_0 = !(it.uco_1 == null);
      } else {
        tmp_0 = false;
      }
      tmp = tmp_0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).btw = function () {
    return submissionStatusFor(this.fue_1, this.due_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).gum = 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.rbw_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lbw_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).hum = function (mark) {
    return new UstadCourseAssignmentMarkListItemUiState(mark, this.sue_1, this.tue_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).ium = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.fue_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.rbw_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1, this.pue_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().hnk_1;
    } else {
      tmp = strings_getInstance().xng_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).jum = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.fue_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.rbw_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibw_1, this.pue_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().ink_1;
    } else {
      tmp = strings_getInstance().yng_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).gtw = function () {
    var tmp;
    if (this.kue_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.fue_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).kum = function () {
    return hasUpdatedMarks(this.fue_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).lum = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.fue_1.c1();
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).mum = 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).xue = 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.aue_1 : submitMarkError;
    block = block === VOID ? this.bue_1 : block;
    gradeFilterChips = gradeFilterChips === VOID ? this.cue_1 : gradeFilterChips;
    submissionList = submissionList === VOID ? this.due_1 : submissionList;
    submissionAttachments = submissionAttachments === VOID ? this.eue_1 : submissionAttachments;
    marks = marks === VOID ? this.fue_1 : marks;
    draftMark = draftMark === VOID ? this.gue_1 : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? this.hue_1 : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? this.iue_1 : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? this.jue_1 : fieldsEnabled;
    markListSelectedChipId = markListSelectedChipId === VOID ? this.kue_1 : markListSelectedChipId;
    markListFilterOptions = markListFilterOptions === VOID ? this.lue_1 : markListFilterOptions;
    privateCommentsList = privateCommentsList === VOID ? this.mue_1 : privateCommentsList;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? this.nue_1 : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.oue_1 : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? this.pue_1 : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? this.que_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.rue_1 : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? this.sue_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.tue_1 : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.uue_1 : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? this.vue_1 : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? this.wue_1 : showModerateOptions;
    return $super === VOID ? this.mum(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) : $super.mum.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.aue_1 + ', block=' + this.bue_1 + ', gradeFilterChips=' + this.cue_1 + ', submissionList=' + this.due_1 + ', submissionAttachments=' + this.eue_1 + ', marks=' + this.fue_1 + ', draftMark=' + this.gue_1 + ', markSubmissionInProgress=' + this.hue_1 + ', markNextStudentVisible=' + this.iue_1 + ', fieldsEnabled=' + this.jue_1 + ', markListSelectedChipId=' + this.kue_1 + ', markListFilterOptions=' + this.lue_1 + ', privateCommentsList=' + this.mue_1 + ', newPrivateCommentTextVisible=' + this.nue_1 + ', activeUserPersonUid=' + this.oue_1.toString() + ', activeUserSubmitterId=' + this.pue_1.toString() + ', activeUserPersonName=' + this.que_1 + ', activeUserPictureUri=' + this.rue_1 + ', localDateTimeNow=' + this.sue_1 + ', dayOfWeekStrings=' + this.tue_1 + ', collapsedSubmissions=' + this.uue_1 + ', openingFileState=' + this.vue_1 + ', showModerateOptions=' + this.wue_1 + ')';
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).hashCode = function () {
    var result = this.aue_1 == null ? 0 : getStringHashCode(this.aue_1);
    result = imul(result, 31) + (this.bue_1 == null ? 0 : this.bue_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.cue_1) | 0;
    result = imul(result, 31) + hashCode(this.due_1) | 0;
    result = imul(result, 31) + hashCode(this.eue_1) | 0;
    result = imul(result, 31) + hashCode(this.fue_1) | 0;
    result = imul(result, 31) + (this.gue_1 == null ? 0 : hashCode(this.gue_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hue_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.iue_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jue_1) | 0;
    result = imul(result, 31) + this.kue_1 | 0;
    result = imul(result, 31) + hashCode(this.lue_1) | 0;
    result = imul(result, 31) + hashCode(this.mue_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nue_1) | 0;
    result = imul(result, 31) + this.oue_1.hashCode() | 0;
    result = imul(result, 31) + this.pue_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.que_1) | 0;
    result = imul(result, 31) + (this.rue_1 == null ? 0 : getStringHashCode(this.rue_1)) | 0;
    result = imul(result, 31) + this.sue_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.tue_1) | 0;
    result = imul(result, 31) + hashCode(this.uue_1) | 0;
    result = imul(result, 31) + (this.vue_1 == null ? 0 : this.vue_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wue_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.aue_1 == tmp0_other_with_cast.aue_1))
      return false;
    if (!equals(this.bue_1, tmp0_other_with_cast.bue_1))
      return false;
    if (!equals(this.cue_1, tmp0_other_with_cast.cue_1))
      return false;
    if (!equals(this.due_1, tmp0_other_with_cast.due_1))
      return false;
    if (!equals(this.eue_1, tmp0_other_with_cast.eue_1))
      return false;
    if (!equals(this.fue_1, tmp0_other_with_cast.fue_1))
      return false;
    if (!equals(this.gue_1, tmp0_other_with_cast.gue_1))
      return false;
    if (!(this.hue_1 === tmp0_other_with_cast.hue_1))
      return false;
    if (!(this.iue_1 === tmp0_other_with_cast.iue_1))
      return false;
    if (!(this.jue_1 === tmp0_other_with_cast.jue_1))
      return false;
    if (!(this.kue_1 === tmp0_other_with_cast.kue_1))
      return false;
    if (!equals(this.lue_1, tmp0_other_with_cast.lue_1))
      return false;
    if (!equals(this.mue_1, tmp0_other_with_cast.mue_1))
      return false;
    if (!(this.nue_1 === tmp0_other_with_cast.nue_1))
      return false;
    if (!this.oue_1.equals(tmp0_other_with_cast.oue_1))
      return false;
    if (!this.pue_1.equals(tmp0_other_with_cast.pue_1))
      return false;
    if (!(this.que_1 === tmp0_other_with_cast.que_1))
      return false;
    if (!(this.rue_1 == tmp0_other_with_cast.rue_1))
      return false;
    if (!this.sue_1.equals(tmp0_other_with_cast.sue_1))
      return false;
    if (!equals(this.tue_1, tmp0_other_with_cast.tue_1))
      return false;
    if (!equals(this.uue_1, tmp0_other_with_cast.uue_1))
      return false;
    if (!equals(this.vue_1, tmp0_other_with_cast.vue_1))
      return false;
    if (!(this.wue_1 === tmp0_other_with_cast.wue_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.sqv_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.cun(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 ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lun_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).nun = function (nameAndTerminology, $completion) {
    var tmp = this.oun(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.nun((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.lun_1.sqv_1.t2().zum_1;
          var tmp0_safe_receiver = this.mun_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u8l_1;
          var tmp3_json = this.lun_1.m4r();
          var tmp4_systemImpl = this.lun_1.xqn();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this.lun_1));
          l$ret$1: do {
            var this_0 = this.lun_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver_0 = this.mun_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.t8l_1;
              var nextValue = prevValue.jq6(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).oun = function (nameAndTerminology, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this.lun_1, completion);
    i.mun_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.nun(nameAndTerminology, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.xun_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).jt7 = function (it, $completion) {
    var tmp = this.kt7(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.jt7(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.xun_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.cun(VOID, VOID, VOID, VOID, this.yun_1.hdn_1, this.yun_1.idn_1, this.yun_1.idn_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).kt7 = function (it, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this.xun_1, completion);
    i.yun_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.jt7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.huo_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.huo_1.tqn().o7d().a8d(this.huo_1.lup_1);
            var tmp_1 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this.huo_1, null);
            suspendResult = tmp_0.a1c(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(ClazzMemberListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this.huo_1, completion);
    i.iuo_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.yup_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.yup_1.rqn().o7f();
            var tmp_1 = this.yup_1.pqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.yup_1.lup_1, tmp_2, new Long(8, 0)));
            var tmp_4 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this.yup_1, null);
            suspendResult = tmp_3.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(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.yup_1, completion);
    i.zup_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$0, $this_launch, resultContinuation) {
    this.iuq_1 = this$0;
    this.juq_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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;
          l$ret$1: do {
            var this_0 = this.iuq_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.cun(VOID, VOID, VOID, this.iuq_1.oup_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          launch(this.juq_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_0(this.iuq_1, null));
          launch(this.juq_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_2(this.iuq_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).l78 = function (completion) {
    return new ClazzMemberListViewModel$slambda$slambda(this.iuq_1, this.juq_1, completion);
  };
  function ClazzMemberListViewModel$slambda$slambda_0(this$0, $this_launch, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda(this$0, $this_launch, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation) {
    this.suq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).grh = function (it, $completion) {
    var tmp = this.vny(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.grh(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.tuq_1.o7d().s8c(this.suq_1.lup_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.o8e_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).vny = function (it, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this.suq_1, completion);
    i.tuq_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.grh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_sendClazzInvitesUseCase__utu0z8_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jup_1;
    sendClazzInvitesUseCase$factory_2();
    return this_0.t2();
  }
  function _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kup_1;
    approveOrDeclinePendingEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function getMembersAsPagingSource($this, roleId) {
    var tmp0_$this = $this.tqn().t7d();
    var tmp1_clazzUid = $this.lup_1;
    var tmp2_sortOrder = $this.sqv_1.t2().vum_1.qqc_1;
    var tmp3_filter = $this.sqv_1.t2().xum_1;
    var tmp4_searchText = toQueryLikeParam($this.bqn_1.t2().bq6_1.qq5_1);
    var tmp5_accountPersonUid = $this.pqn();
    var tmp6_currentTime = systemTimeInMillis();
    PermissionFlags_getInstance();
    var tmp7_permission = new Long(8192, 0);
    return tmp0_$this.j93(tmp1_clazzUid, roleId, tmp2_sortOrder, tmp4_searchText, tmp3_filter, tmp5_accountPersonUid, tmp6_currentTime, tmp7_permission);
  }
  function Companion_137() {
    this.uuq_1 = 'CourseMembers';
  }
  var Companion_instance_186;
  function Companion_getInstance_154() {
    return Companion_instance_186;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_19(function_0) {
    this.vuq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_19).t1d = function (value, $completion) {
    return this.vuq_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$pendingInvitesPagingSource$lambda(this$0) {
    return function () {
      return this$0.tqn().e7g().m9m(this$0.nqn().ro9().knu_1.wij_1, this$0.lup_1, systemTimeInMillis());
    };
  }
  function ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this$0) {
    return function () {
      var tmp0_$this = this$0.tqn().n7f();
      var tmp1_clazzUid = this$0.lup_1;
      var tmp2_searchText = toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_1);
      var tmp4_sortOrder = this$0.sqv_1.t2().vum_1.qqc_1;
      return tmp0_$this.vex(tmp1_clazzUid, false, 1, tmp2_searchText, tmp4_sortOrder);
    };
  }
  function ClazzMemberListViewModel$slambda(this$0, resultContinuation) {
    this.eur_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.eur_1.sqv_1, ClazzMemberListViewModel$slambda$slambda_0(this.eur_1, this.fur_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.eur_1, completion);
    i.fur_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.our_1 = this$0;
    this.pur_1 = $enrolmentDetails;
    this.qur_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.our_1).zoz(this.pur_1, this.qur_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this.our_1.vqn();
            var tmp_1 = this.our_1.xqn();
            var tmp_2 = this.qur_1 ? strings_getInstance().mnn_1 : strings_getInstance().nnn_1;
            var tmp0_elvis_lhs = this.pur_1.oey_1;
            tmp_0.yq6(new Snack(tmp_1.koj(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.our_1.vqn();
              var tmp_5 = this.our_1.xqn().joj(strings_getInstance().qmi_1);
              var tmp1_elvis_lhs = e.message;
              tmp_4.yq6(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.our_1, this.pur_1, this.qur_1, completion);
    i.rur_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.aus_1 = this$0;
    this.bus_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.aus_1.sqn();
            var tmp_1;
            if (this.bus_1 === 1000) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

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

          case 1:
            this.eus_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var clazzCode = this.eus_1;
            var tmp_2;
            if (this.bus_1 === 1000) {
              tmp_2 = strings_getInstance().tml_1;
            } else {
              tmp_2 = strings_getInstance().vmy_1;
            }

            var titleStringResource = tmp_2;
            var tmp1_safe_receiver = this.aus_1.sqv_1.t2().zum_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lq8(titleStringResource);
            var title = tmp2_elvis_lhs == null ? this.aus_1.xqn().joj(titleStringResource) : tmp2_elvis_lhs;
            Companion_getInstance_116();
            var tmp_3 = to('clazzUid', this.aus_1.lup_1.toString());
            Companion_getInstance_116();
            var tmp_4 = to('popUpToOnFinish', this.aus_1.yqm_1);
            var goToOnPersonSelectedArg = appendQueryArgs('EnrolmentEdit', mapOf([tmp_3, tmp_4, to('role', this.bus_1.toString())]));
            var this_1 = LinkedHashMap_init_$Create$();
            Companion_getInstance_204();
            this_1.s('exlcudeFromClazz', this.aus_1.lup_1.toString());
            Companion_getInstance_116();
            this_1.s('listMode', ListViewMode_PICKER_getInstance().wqj_1);
            this_1.s('goToOnPersonSelected', goToOnPersonSelectedArg);
            Companion_getInstance_204();
            this_1.s('showAddViaContact', 'true');
            Companion_getInstance_204();
            this_1.s('role', this.bus_1.toString());
            Companion_getInstance_125();
            this_1.s('t', title);
            Companion_getInstance_204();
            PermissionFlags_getInstance();
            this_1.s('rptsl', (new Long(2048, 0)).toString());
            if (!(clazzCode == null)) {
              Companion_getInstance_204();
              this_1.s('showAddViaInviteLink', clazzCode);
            }

            var args = this_1.f3();
            Companion_getInstance_204();
            this.aus_1.zqm_1.kp6('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.aus_1, this.bus_1, completion);
    i.cus_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$onClickRevokeInvite$slambda(this$0, $contact, resultContinuation) {
    this.nus_1 = this$0;
    this.ous_1 = $contact;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$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$onClickRevokeInvite$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickRevokeInvite$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.nus_1.tqn().e7g().n9m(this.ous_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$onClickRevokeInvite$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickRevokeInvite$slambda(this.nus_1, this.ous_1, completion);
    i.pus_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickRevokeInvite$slambda_0(this$0, $contact, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickRevokeInvite$slambda(this$0, $contact, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickResendInvite$slambda(this$0, $clazzInvite, resultContinuation) {
    this.yus_1 = this$0;
    this.zus_1 = $clazzInvite;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickResendInvite$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$onClickResendInvite$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickResendInvite$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_sendClazzInvitesUseCase__utu0z8_0(this.yus_1).jph(new SendClazzInvitesRequest(listOf_0(this.zus_1.h9n_1), this.zus_1.f9n_1, this.zus_1.e9n_1, this.yus_1.nqn().ro9().lnu_1.f96_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.yus_1.vqn().yq6(new Snack(this.yus_1.xqn().joj(strings_getInstance().lns_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$onClickResendInvite$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickResendInvite$slambda(this.yus_1, this.zus_1, completion);
    i.aut_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickResendInvite$slambda_0(this$0, $clazzInvite, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickResendInvite$slambda(this$0, $clazzInvite, 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
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(SendClazzInvitesUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.jup_1 = Instance(this_0, tmp$ret$0, null).a5d(this, sendClazzInvitesUseCase$factory_1());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.nqn().ioa();
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.h57(tmp$ret$2, context);
    var this_1 = On(this, tmp$ret$3, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_2.kup_1 = Instance(this_1, tmp$ret$5, null).a5d(this, approveOrDeclinePendingEnrolmentUseCase$factory());
    var tmp_6 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_7;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_7 = tmp1_elvis_lhs;
    }
    tmp_6.lup_1 = tmp_7;
    var tmp_8 = this;
    tmp_8.mup_1 = ClazzMemberListViewModel$teacherListPagingSource$lambda(this);
    var tmp_9 = this;
    tmp_9.nup_1 = ClazzMemberListViewModel$studentListPagingSource$lambda(this);
    var tmp_10 = this;
    tmp_10.oup_1 = ClazzMemberListViewModel$pendingInvitesPagingSource$lambda(this);
    var tmp_11 = this;
    tmp_11.pup_1 = ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.sqv_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_3 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_3.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_3.length;
        while (inductionVariable < last) {
          var element = this_3[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$7 = this.xqn().joj(get_dayStringResource(element));
          result.s(element, tmp$ret$7);
        }
        var nextValue = prevValue.cun(this.nup_1, this.mup_1, this.pup_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.bqn_1;
      while (true) {
        var prevValue_0 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.jq6(VOID, VOID, VOID, true, VOID, VOID, VOID, this.bqx(), new ActionBarButtonUiState(false));
        if (this_4.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_12 = this.oqn();
    launch(tmp_12, VOID, VOID, ClazzMemberListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzMemberListViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).nqw = function () {
  };
  protoOf(ClazzMemberListViewModel).lsz = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.cun(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, filterOption.mq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).but = function (enrolmentDetails, approved) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this, enrolmentDetails, approved, null));
  };
  protoOf(ClazzMemberListViewModel).cut = function (role) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this, role, null));
  };
  protoOf(ClazzMemberListViewModel).dut = function (entry) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = entry.a96_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
    var tmp = to('personUid', (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString());
    Companion_getInstance_116();
    this.zqm_1.kp6('CourseEnrolments', mapOf([tmp, to('clazzUid', this.lup_1.toString())]));
  };
  protoOf(ClazzMemberListViewModel).ksz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.cun(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).eut = function (contact) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRevokeInvite$slambda_0(this, contact, null));
  };
  protoOf(ClazzMemberListViewModel).fut = function (clazzInvite) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickResendInvite$slambda_0(this, clazzInvite, null));
  };
  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$_init_$lambda_dc27oi_2() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, 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;
    var tmp_2;
    if (pendingInviteList === VOID) {
      tmp_2 = ClazzMemberListUiState$_init_$lambda_dc27oi_2;
    } else {
      tmp_2 = pendingInviteList;
    }
    pendingInviteList = tmp_2;
    addTeacherVisible = addTeacherVisible === VOID ? false : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? false : addStudentVisible;
    pendingInviteListVisible = pendingInviteListVisible === VOID ? false : pendingInviteListVisible;
    var tmp_3;
    if (sortOptions === VOID) {
      var tmp_4 = strings_getInstance().cmk_1;
      var tmp_5 = new SortOrderOption(tmp_4, 1, true);
      var tmp_6 = strings_getInstance().cmk_1;
      var tmp_7 = new SortOrderOption(tmp_6, 2, false);
      var tmp_8 = strings_getInstance().bmk_1;
      var tmp_9 = new SortOrderOption(tmp_8, 3, true);
      var tmp_10 = strings_getInstance().bmk_1;
      var tmp_11 = new SortOrderOption(tmp_10, 4, false);
      var tmp_12 = strings_getInstance().pmx_1;
      var tmp_13 = new SortOrderOption(tmp_12, 7, true);
      var tmp_14 = strings_getInstance().pmx_1;
      var tmp_15 = new SortOrderOption(tmp_14, 8, false);
      var tmp_16 = strings_getInstance().qmx_1;
      var tmp_17 = new SortOrderOption(tmp_16, 9, true);
      var tmp_18 = strings_getInstance().qmx_1;
      tmp_3 = listOf([tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, new SortOrderOption(tmp_18, 10, false)]);
    } else {
      tmp_3 = sortOptions;
    }
    sortOptions = tmp_3;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_19;
    if (selectedChipId === VOID) {
      tmp_19 = 1;
    } else {
      tmp_19 = selectedChipId;
    }
    selectedChipId = tmp_19;
    var tmp_20;
    if (filterOptions === VOID) {
      var tmp_21 = strings_getInstance().gn0_1;
      tmp_20 = listOf([new MessageIdOption2(tmp_21, 1), new MessageIdOption2(strings_getInstance().zmz_1, 0)]);
    } else {
      tmp_20 = filterOptions;
    }
    filterOptions = tmp_20;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.num_1 = studentList;
    this.oum_1 = teacherList;
    this.pum_1 = pendingStudentList;
    this.qum_1 = pendingInviteList;
    this.rum_1 = addTeacherVisible;
    this.sum_1 = addStudentVisible;
    this.tum_1 = pendingInviteListVisible;
    this.uum_1 = sortOptions;
    this.vum_1 = activeSortOrderOption;
    this.wum_1 = fieldsEnabled;
    this.xum_1 = selectedChipId;
    this.yum_1 = filterOptions;
    this.zum_1 = terminologyStrings;
    this.aun_1 = localDateTimeNow;
    this.bun_1 = dayOfWeekStrings;
  }
  protoOf(ClazzMemberListUiState).gut = function (studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    return new ClazzMemberListUiState(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).cun = function (studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings, $super) {
    studentList = studentList === VOID ? this.num_1 : studentList;
    teacherList = teacherList === VOID ? this.oum_1 : teacherList;
    pendingStudentList = pendingStudentList === VOID ? this.pum_1 : pendingStudentList;
    pendingInviteList = pendingInviteList === VOID ? this.qum_1 : pendingInviteList;
    addTeacherVisible = addTeacherVisible === VOID ? this.rum_1 : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? this.sum_1 : addStudentVisible;
    pendingInviteListVisible = pendingInviteListVisible === VOID ? this.tum_1 : pendingInviteListVisible;
    sortOptions = sortOptions === VOID ? this.uum_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.vum_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.wum_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.xum_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.yum_1 : filterOptions;
    terminologyStrings = terminologyStrings === VOID ? this.zum_1 : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.aun_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.bun_1 : dayOfWeekStrings;
    return $super === VOID ? this.gut(studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) : $super.gut.call(this, studentList, teacherList, pendingStudentList, pendingInviteList, addTeacherVisible, addStudentVisible, pendingInviteListVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).toString = function () {
    return 'ClazzMemberListUiState(studentList=' + this.num_1 + ', teacherList=' + this.oum_1 + ', pendingStudentList=' + this.pum_1 + ', pendingInviteList=' + this.qum_1 + ', addTeacherVisible=' + this.rum_1 + ', addStudentVisible=' + this.sum_1 + ', pendingInviteListVisible=' + this.tum_1 + ', sortOptions=' + this.uum_1 + ', activeSortOrderOption=' + this.vum_1 + ', fieldsEnabled=' + this.wum_1 + ', selectedChipId=' + this.xum_1 + ', filterOptions=' + this.yum_1 + ', terminologyStrings=' + this.zum_1 + ', localDateTimeNow=' + this.aun_1 + ', dayOfWeekStrings=' + this.bun_1 + ')';
  };
  protoOf(ClazzMemberListUiState).hashCode = function () {
    var result = hashCode(this.num_1);
    result = imul(result, 31) + hashCode(this.oum_1) | 0;
    result = imul(result, 31) + hashCode(this.pum_1) | 0;
    result = imul(result, 31) + hashCode(this.qum_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rum_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.sum_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tum_1) | 0;
    result = imul(result, 31) + hashCode(this.uum_1) | 0;
    result = imul(result, 31) + this.vum_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wum_1) | 0;
    result = imul(result, 31) + this.xum_1 | 0;
    result = imul(result, 31) + hashCode(this.yum_1) | 0;
    result = imul(result, 31) + (this.zum_1 == null ? 0 : this.zum_1.hashCode()) | 0;
    result = imul(result, 31) + this.aun_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.bun_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.num_1, tmp0_other_with_cast.num_1))
      return false;
    if (!equals(this.oum_1, tmp0_other_with_cast.oum_1))
      return false;
    if (!equals(this.pum_1, tmp0_other_with_cast.pum_1))
      return false;
    if (!equals(this.qum_1, tmp0_other_with_cast.qum_1))
      return false;
    if (!(this.rum_1 === tmp0_other_with_cast.rum_1))
      return false;
    if (!(this.sum_1 === tmp0_other_with_cast.sum_1))
      return false;
    if (!(this.tum_1 === tmp0_other_with_cast.tum_1))
      return false;
    if (!equals(this.uum_1, tmp0_other_with_cast.uum_1))
      return false;
    if (!this.vum_1.equals(tmp0_other_with_cast.vum_1))
      return false;
    if (!(this.wum_1 === tmp0_other_with_cast.wum_1))
      return false;
    if (!(this.xum_1 === tmp0_other_with_cast.xum_1))
      return false;
    if (!equals(this.yum_1, tmp0_other_with_cast.yum_1))
      return false;
    if (!equals(this.zum_1, tmp0_other_with_cast.zum_1))
      return false;
    if (!this.aun_1.equals(tmp0_other_with_cast.aun_1))
      return false;
    if (!equals(this.bun_1, tmp0_other_with_cast.bun_1))
      return false;
    return true;
  };
  function sendClazzInvitesUseCase$factory_1() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8_0(receiver);
    }, null);
  }
  function approveOrDeclinePendingEnrolmentUseCase$factory() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function sendClazzInvitesUseCase$factory_2() {
    return getPropertyCallableRef('sendClazzInvitesUseCase', 1, KProperty1, function (receiver) {
      return _get_sendClazzInvitesUseCase__utu0z8_0(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.put_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).tut = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.tut(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.qut_1.t7d();
            var tmp_1;
            if (!this.put_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.rut_1 = tmp_1;
            if (this.rut_1 == null) {
              this.sut_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.rut_1.f93(this.put_1.fqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.sut_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.sut_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).vny = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this.put_1, completion);
    i.qut_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.tut(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.cuu_1 = $savedStateHandle;
    this.duu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).guu = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.guu($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.euu_1 = new ClazzEnrolmentWithLeavingReason();
            var tmp_1 = this;
            tmp_1.fuu_1 = this.euu_1;
            var tmp_2 = this.fuu_1;
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.cuu_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.d8i_1 = tmp_3;
            var tmp_4 = this.fuu_1;
            Companion_getInstance_116();
            var tmp2_safe_receiver = this.cuu_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.c8i_1 = tmp_5;
            this.fuu_1.e8i_1 = systemTimeInMillis();
            var tmp_6 = this.fuu_1;
            var tmp4_safe_receiver = this.cuu_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.g8i_1 = tmp_7;
            this.hd_1 = 1;
            suspendResult = this.duu_1.tqn().o7d().c8d(this.fuu_1.d8i_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.fuu_1.s94_1 = ARGUMENT;
            return this.euu_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).l78 = function (completion) {
    return new ClazzEnrolmentEditViewModel$slambda$slambda_1(this.cuu_1, this.duu_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.guu($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.euv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ouv(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.xuv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).zuv = 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.zuv((!(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.xuv_1.tqn().q7d();
            var tmp0_safe_receiver = this.xuv_1.euv_1.t2().huv_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d8i_1;
            suspendResult = tmp_0.ee7(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.xuv_1, completion);
    i.yuv_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.zuv($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get_enrolIntoCourseUseCase__jh2n4b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.guv_1;
    enrolIntoCourseUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_1(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.iuv_1 == null) ? true : !(_this__u8e3s4.juv_1 == null)) ? true : !(_this__u8e3s4.kuv_1 == null);
  }
  function Companion_138() {
    this.auw_1 = 'EnrolmentEdit';
    this.buw_1 = 'role';
  }
  var Companion_instance_187;
  function Companion_getInstance_155() {
    return Companion_instance_187;
  }
  function ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation) {
    this.kuw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.luw_1.o7f().edk(this.kuw_1.pqn(), this.kuw_1.fqt_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).vny = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this.kuw_1, completion);
    i.luw_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.jsc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.uuw_1 = this$0;
    this.vuw_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_35.n4r();
            var tmp_1 = ClazzEnrolmentEditViewModel$slambda$slambda_0(this.uuw_1, null);
            var tmp_2 = ClazzEnrolmentEditViewModel$slambda$slambda_2(this.vuw_1, this.uuw_1, null);
            suspendResult = this.uuw_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEnrolmentEditViewModel$slambda$lambda(this.uuw_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = this.uuw_1.rqn().o7f();
            var tmp_4 = this.uuw_1.pqn();
            var tmp0_safe_receiver = this.uuw_1.euv_1.t2().huv_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d8i_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.hdk(tmp_4, tmp_5, tmp_6, new Long(16, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.xuw_1 = suspendResult;
            this.yuw_1 = this.xuw_1.y6();
            this.zuw_1 = this.xuw_1.z6();
            var tmp_7 = this;
            tmp_7.aux_1 = async(this.wuw_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda$slambda_4(this.uuw_1, null));
            var tmp_8 = this;
            var this_0 = ArrayList_init_$Create$();
            if (this.yuw_1) {
              this_0.i1(1000);
            }

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

            tmp_8.bux_1 = this_0.f3();
            this.hd_1 = 3;
            suspendResult = this.aux_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.uuw_1.xqn(), this.uuw_1.m4r());
            }

            var terminologyStrings = tmp_9;
            l$ret$1: do {
              var this_1 = this.uuw_1.euv_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.ouv(VOID, VOID, VOID, VOID, true, terminologyStrings, this.bux_1);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_2 = this.uuw_1.bqn_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp_10 = Companion_getInstance_97().rq6_1;
                var tmp_11 = this.uuw_1.xqn().joj(strings_getInstance().hn3_1);
                var nextValue_0 = prevValue_0.jq6(VOID, tmp_10, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_11, VOID, ClazzEnrolmentEditViewModel$onClickSave$ref(this.uuw_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.uuw_1, this.vuw_1, completion);
    i.wuw_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.kux_1 = $commitDelay;
    this.lux_1 = $entity;
    this.mux_1 = $this;
    this.nux_1 = $key;
    this.oux_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.kux_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.lux_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.mux_1.dqo(this.mux_1.xqm_1, this.nux_1, this.oux_1, this.lux_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.kux_1, this.lux_1, this.mux_1, this.nux_1, this.oux_1, completion);
    i.pux_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.yux_1 = this$0;
    this.zux_1 = $entity;
    this.auy_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.yux_1.fqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_enrolIntoCourseUseCase__jh2n4b(this.yux_1).loz(this.zux_1, this.auy_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.yux_1.rqn().t7d().g93(this.zux_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_116();
            var popUpToOnFinish = this.yux_1.xqm_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.yux_1.zqm_1.jq9(popUpToOnFinish, false);
            } else {
              this.yux_1.iqt(this.zux_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.yux_1, this.zux_1, this.auy_1, completion);
    i.buy_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.euv_1 = MutableStateFlow(new ClazzEnrolmentEditUiState(VOID, VOID, VOID, VOID, false));
    this.fuv_1 = asStateFlow(this.euv_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.guv_1 = Instance(this_0, tmp$ret$0, null).a5d(this, enrolIntoCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, Companion_getInstance_97().qq6_1, this.hqu(strings_getInstance().zmx_1, strings_getInstance().ymx_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzEnrolmentEditViewModel$slambda_0(this, null);
    this.jqo(tmp_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ClazzEnrolmentEditViewModel).cuy = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.euv_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.huv_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8i_1;
        var tmp_0 = this.iqu(tmp, entity == null ? null : entity.g8i_1, prevValue.iuv_1);
        var tmp2_safe_receiver = prevValue.huv_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.e8i_1;
        var nextValue = prevValue.ouv(entity, tmp_0, this.iqu(tmp_1, entity == null ? null : entity.e8i_1, prevValue.juv_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_35.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.oqn();
    tmp_2.eqt_1 = launch(tmp_3, VOID, VOID, ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEnrolmentEditViewModel).xs9 = function () {
    if (this.aqo().equals(Companion_getInstance_97().qq6_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.euv_1.t2().huv_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    var timeZoneVal = entity.s94_1;
    if (timeZoneVal == null) {
      this.vqn().yq6(new Snack('Error: no time zone for course'));
      return Unit_instance;
    }
    this.zqn(Companion_getInstance_97().qq6_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.euv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.ouv(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (entity.g8i_1 === 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.euv_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.ouv(VOID, this.xqn().joj(strings_getInstance().vmn_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    if (entity.e8i_1.c7(toLong(imul(get_MS_PER_HOUR(), 24))) <= 0) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.euv_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.ouv(VOID, VOID, this.xqn().joj(strings_getInstance().vmn_1));
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (entity.f8i_1.c7(entity.e8i_1) <= 0) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.euv_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.ouv(VOID, VOID, VOID, this.xqn().joj(strings_getInstance().sn9_1));
          if (this_3.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
    }
    if (hasErrors_1(this.euv_1.t2(), this)) {
      $l$block_3: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.euv_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.ouv(VOID, VOID, VOID, VOID, true);
          if (this_4.y1k(prevValue_3, nextValue_3)) {
            break $l$block_3;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_0 = this.oqn();
    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.huv_1 = clazzEnrolment;
    this.iuv_1 = roleSelectedError;
    this.juv_1 = startDateError;
    this.kuv_1 = endDateError;
    this.luv_1 = fieldsEnabled;
    this.muv_1 = courseTerminology;
    this.nuv_1 = roleOptions;
  }
  protoOf(ClazzEnrolmentEditUiState).duy = function () {
    var tmp0_safe_receiver = this.huv_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8i_1;
    return tmp === 1000;
  };
  protoOf(ClazzEnrolmentEditUiState).euy = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    return new ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).ouv = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions, $super) {
    clazzEnrolment = clazzEnrolment === VOID ? this.huv_1 : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? this.iuv_1 : roleSelectedError;
    startDateError = startDateError === VOID ? this.juv_1 : startDateError;
    endDateError = endDateError === VOID ? this.kuv_1 : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? this.luv_1 : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? this.muv_1 : courseTerminology;
    roleOptions = roleOptions === VOID ? this.nuv_1 : roleOptions;
    return $super === VOID ? this.euy(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) : $super.euy.call(this, clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).toString = function () {
    return 'ClazzEnrolmentEditUiState(clazzEnrolment=' + this.huv_1 + ', roleSelectedError=' + this.iuv_1 + ', startDateError=' + this.juv_1 + ', endDateError=' + this.kuv_1 + ', fieldsEnabled=' + this.luv_1 + ', courseTerminology=' + this.muv_1 + ', roleOptions=' + this.nuv_1 + ')';
  };
  protoOf(ClazzEnrolmentEditUiState).hashCode = function () {
    var result = this.huv_1 == null ? 0 : hashCode(this.huv_1);
    result = imul(result, 31) + (this.iuv_1 == null ? 0 : getStringHashCode(this.iuv_1)) | 0;
    result = imul(result, 31) + (this.juv_1 == null ? 0 : getStringHashCode(this.juv_1)) | 0;
    result = imul(result, 31) + (this.kuv_1 == null ? 0 : getStringHashCode(this.kuv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.luv_1) | 0;
    result = imul(result, 31) + (this.muv_1 == null ? 0 : this.muv_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.nuv_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.huv_1, tmp0_other_with_cast.huv_1))
      return false;
    if (!(this.iuv_1 == tmp0_other_with_cast.iuv_1))
      return false;
    if (!(this.juv_1 == tmp0_other_with_cast.juv_1))
      return false;
    if (!(this.kuv_1 == tmp0_other_with_cast.kuv_1))
      return false;
    if (!(this.luv_1 === tmp0_other_with_cast.luv_1))
      return false;
    if (!equals(this.muv_1, tmp0_other_with_cast.muv_1))
      return false;
    if (!equals(this.nuv_1, tmp0_other_with_cast.nuv_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.nuy_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).rrm = function (value, $completion) {
    var tmp = this.srm(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.rrm(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.puy_1 = this.nuy_1;
            var tmp_1 = this;
            tmp_1.quy_1 = this.ouy_1;
            this.hd_1 = 1;
            var it = this.quy_1;
            suspendResult = this.puy_1.t1d(it.zdn_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).srm = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda(this.nuy_1, completion);
    i.ouy_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.rrm(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$70(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zuy_1 = _this__u8e3s4;
    this.auz_1 = collector;
  }
  protoOf($collectCOROUTINE$70).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.buz_1 = this.auz_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0(this.buz_1, null);
            suspendResult = this.zuy_1.cuz_1.a1c(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);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.luz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).rrm = function (it, $completion) {
    var tmp = this.srm(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.rrm(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.muz_1;
          var canEditTeacherEnrolments = tmp0_container.y6();
          var canEditStudentEnrolments = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.luz_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uuz(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).srm = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this.luz_1, completion);
    i.muz_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.rrm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.dv0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).fv0 = function (it, $completion) {
    var tmp = this.gv0(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.fv0((!(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.dv0_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uuz(this.ev0_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).gv0 = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this.dv0_1, completion);
    i.ev0_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.fv0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.pv0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).iqf = function (canViewMembers, $completion) {
    var tmp = this.jqf(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.iqf((!(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.qv0_1) {
              tmp_1 = this.pv0_1.tqn().t7d().e93(this.pv0_1.tv1_1, this.pv0_1.sv1_1);
            } else {
              tmp_1 = flowOf(emptyList());
            }

            tmp_0.rv0_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this.pv0_1, null);
            suspendResult = this.rv0_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(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).jqf = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this.pv0_1, completion);
    i.qv0_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.iqf(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.cv2_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).iqf = function (value, $completion) {
    var tmp = this.jqf(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.iqf((!(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.fv2_1 = this.cv2_1;
            var tmp_1 = this;
            tmp_1.gv2_1 = this.dv2_1;
            if (this.gv2_1) {
              this.hd_1 = 3;
              suspendResult = this.fv2_1.t1d(this.gv2_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.ev2_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).jqf = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda(this.cv2_1, completion);
    i.dv2_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.iqf(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$71(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pv2_1 = _this__u8e3s4;
    this.qv2_1 = collector;
  }
  protoOf($collectCOROUTINE$71).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.rv2_1 = this.qv2_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.rv2_1, null);
            suspendResult = this.pv2_1.sv2_1.a1c(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);
  };
  function _no_name_provided__qut3iv_8($this) {
    this.sv2_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_8).xqe = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$71(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_8).a1c = function (collector, $completion) {
    return this.xqe(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.bv3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).iqf = function (canViewMembers, $completion) {
    var tmp = this.jqf(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.iqf((!(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.cv3_1) {
              this.hd_1 = 1;
              suspendResult = this.bv3_1.tqn().t7d().l93(this.bv3_1.tv1_1, this.bv3_1.sv1_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.e9a_1;
            var personName = '' + tmp_0 + ' ' + (courseAndPersonName == null ? null : courseAndPersonName.f9a_1);
            l$ret$1: do {
              var this_0 = this.bv3_1.sqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.uuz(VOID, personName, courseAndPersonName == null ? null : courseAndPersonName.d9a_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.bv3_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jq6(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).jqf = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this.bv3_1, completion);
    i.cv3_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.iqf(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lv3_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.lv3_1.tqn().q7d().ee7(this.lv3_1.sv1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.lv3_1.sqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.uuz(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.lv3_1, completion);
    i.mv3_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.vv3_1 = $permissionFlow;
    this.wv3_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.vv3_1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this.wv3_1, null);
            suspendResult = tmp_0.a1c(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(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1(this.vv3_1, this.wv3_1, completion);
    i.xv3_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.gv4_1 = $canViewMembersFlow;
    this.hv4_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.gv4_1);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this.hv4_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.gv4_1, this.hv4_1, completion);
    i.iv4_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.rv4_1 = $canViewMembersFlow;
    this.sv4_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.rv4_1);
            var tmp_0 = new _no_name_provided__qut3iv_8(this_0);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this.sv4_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.rv4_1, this.sv4_1, completion);
    i.tv4_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.cuz_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_9).xqe = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$70(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_9).a1c = function (collector, $completion) {
    return this.xqe(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    this.cv5_1 = $this_launch;
    this.dv5_1 = this$0;
    this.ev5_1 = $permissionFlow;
    this.fv5_1 = $canViewMembersFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.cv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this.dv5_1, null));
          launch(this.cv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_2(this.ev5_1, this.dv5_1, null));
          launch(this.cv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_4(this.fv5_1, this.dv5_1, null));
          launch(this.cv5_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_6(this.fv5_1, this.dv5_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).l78 = function (completion) {
    return new ClazzEnrolmentListViewModel$slambda$slambda(this.cv5_1, this.dv5_1, this.ev5_1, this.fv5_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_139() {
    this.gv5_1 = 'CourseEnrolments';
  }
  var Companion_instance_188;
  function Companion_getInstance_156() {
    return Companion_instance_188;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_20(function_0) {
    this.hv5_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_20).t1d = function (value, $completion) {
    return this.hv5_1(value, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation) {
    this.qv5_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.qv5_1.rqn().o7f();
            var tmp_2 = this.qv5_1.pqn();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_4 = new Long(8, 0);
            PermissionFlags_getInstance();
            tmp_0.sv5_1 = shareIn(tmp_1.idk(tmp_2, this.qv5_1.sv1_1, tmp_3, tmp_4, new Long(8192, 0)), this.qv5_1.oqn(), Companion_getInstance_12().v1h());
            var tmp_5 = this;
            var this_0 = this.sv5_1;
            tmp_5.tv5_1 = new _no_name_provided__qut3iv_9(this_0);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qv5_1.sqv_1, ClazzEnrolmentListViewModel$slambda$slambda_0(this.rv5_1, this.qv5_1, this.sv5_1, this.tv5_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.qv5_1, completion);
    i.rv5_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_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.sv1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_116();
    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.tv1_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this.oqn();
    launch(tmp_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzEnrolmentListViewModel).uv5 = function (enrolment) {
    var tmp = Companion_instance_35.n4r();
    Companion_getInstance_116();
    this.fqo('EnrolmentEdit', '', null, tmp, mapOf_0(to('entityUid', enrolment.b8i_1.toString())), VOID, true);
  };
  protoOf(ClazzEnrolmentListViewModel).vv5 = function () {
    Companion_getInstance_116();
    this.zqm_1.kp6('PersonDetailView', mapOf_0(to('entityUid', this.tv1_1.toString())));
  };
  protoOf(ClazzEnrolmentListViewModel).mqw = function (searchText) {
  };
  protoOf(ClazzEnrolmentListViewModel).nqw = 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.nuz_1 = enrolmentList;
    this.ouz_1 = personName;
    this.puz_1 = courseName;
    this.quz_1 = canEditTeacherEnrolments;
    this.ruz_1 = canEditStudentEnrolments;
    this.suz_1 = courseTerminology;
    this.tuz_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListUiState).wv5 = function (enrolment) {
    var tmp;
    var tmp_0 = enrolment.g8i_1;
    if (tmp_0 === 1001) {
      tmp = this.quz_1;
    } else {
      tmp = this.quz_1;
    }
    var tmp0_canEdit = tmp;
    var tmp1_timeZone = this.tuz_1;
    return new ClazzEnrolmentListItemUiState(tmp0_canEdit, enrolment, tmp1_timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).xv5 = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    return new ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).uuz = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone, $super) {
    enrolmentList = enrolmentList === VOID ? this.nuz_1 : enrolmentList;
    personName = personName === VOID ? this.ouz_1 : personName;
    courseName = courseName === VOID ? this.puz_1 : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? this.quz_1 : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? this.ruz_1 : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? this.suz_1 : courseTerminology;
    timeZone = timeZone === VOID ? this.tuz_1 : timeZone;
    return $super === VOID ? this.xv5(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) : $super.xv5.call(this, enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).toString = function () {
    return 'ClazzEnrolmentListUiState(enrolmentList=' + this.nuz_1 + ', personName=' + this.ouz_1 + ', courseName=' + this.puz_1 + ', canEditTeacherEnrolments=' + this.quz_1 + ', canEditStudentEnrolments=' + this.ruz_1 + ', courseTerminology=' + this.suz_1 + ', timeZone=' + this.tuz_1 + ')';
  };
  protoOf(ClazzEnrolmentListUiState).hashCode = function () {
    var result = hashCode(this.nuz_1);
    result = imul(result, 31) + (this.ouz_1 == null ? 0 : getStringHashCode(this.ouz_1)) | 0;
    result = imul(result, 31) + (this.puz_1 == null ? 0 : getStringHashCode(this.puz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.quz_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ruz_1) | 0;
    result = imul(result, 31) + (this.suz_1 == null ? 0 : hashCode(this.suz_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.tuz_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.nuz_1, tmp0_other_with_cast.nuz_1))
      return false;
    if (!(this.ouz_1 == tmp0_other_with_cast.ouz_1))
      return false;
    if (!(this.puz_1 == tmp0_other_with_cast.puz_1))
      return false;
    if (!(this.quz_1 === tmp0_other_with_cast.quz_1))
      return false;
    if (!(this.ruz_1 === tmp0_other_with_cast.ruz_1))
      return false;
    if (!equals(this.suz_1, tmp0_other_with_cast.suz_1))
      return false;
    if (!(this.tuz_1 === tmp0_other_with_cast.tuz_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListItemUiState(canEdit, enrolment, timeZone) {
    canEdit = canEdit === VOID ? false : canEdit;
    this.yv5_1 = canEdit;
    this.zv5_1 = enrolment;
    this.av6_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListItemUiState).toString = function () {
    return 'ClazzEnrolmentListItemUiState(canEdit=' + this.yv5_1 + ', enrolment=' + this.zv5_1 + ', timeZone=' + this.av6_1 + ')';
  };
  protoOf(ClazzEnrolmentListItemUiState).hashCode = function () {
    var result = getBooleanHashCode(this.yv5_1);
    result = imul(result, 31) + hashCode(this.zv5_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.av6_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.yv5_1 === tmp0_other_with_cast.yv5_1))
      return false;
    if (!equals(this.zv5_1, tmp0_other_with_cast.zv5_1))
      return false;
    if (!(this.av6_1 === tmp0_other_with_cast.av6_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().tn9_1);
    RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_NEW_SCHEDULE', 1, strings_getInstance().un9_1);
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jv6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).lv6 = function (clazz, $completion) {
    var tmp = this.mv6(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.lv6((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.jv6_1.sqv_1;
          var tmp_0;
          var tmp_1 = this_0.t2().ov6_1;
          var tmp0_safe_receiver = this.kv6_1;
          if (!(tmp_1 === (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j8e_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.kv6_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.j8e_1;
                var nextValue = prevValue.vv6(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.jv6_1.bqn_1;
          var tmp_2;
          var tmp_3 = this_1.t2().wq5_1;
          var tmp0_safe_receiver_2 = this.kv6_1;
          if (!(tmp_3 == (tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.s8d_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.kv6_1;
                var nextValue_0 = prevValue_0.jq6(VOID, VOID, tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.s8d_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).mv6 = function (clazz, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this.jv6_1, completion);
    i.kv6_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.lv6(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.sqv_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.vv6(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.yv7(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).jv8 = function (hasPermission, hasLogs, $completion) {
    var tmp = this.kv8(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.jv8(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.hv8_1, this.iv8_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).kv8 = function (hasPermission, hasLogs, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.hv8_1 = hasPermission;
    i.iv8_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.jv8(hasPermission, hasLogs, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.tv8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).vv8 = function (it, $completion) {
    var tmp = this.wv8(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.vv8(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.uv8_1.xv8_1) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
          }
          if (this.uv8_1.xv8_1 ? this.uv8_1.yv8_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.tv8_1.sqv_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.vv6(VOID, VOID, options);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.tv8_1.bqn_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_0 = !options.c1();
              var tmp_1 = this.tv8_1.xqn().joj(strings_getInstance().wmu_1);
              var tmp_2 = FabIcon_ADD_getInstance();
              var nextValue_0 = prevValue_0.jq6(new FabUiState(tmp_0, tmp_1, tmp_2, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda(options, this.tv8_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).wv8 = function (it, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this.tv8_1, completion);
    i.uv8_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.vv8(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.hv9_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.hv9_1.tqn().o7d().t8c(this.hv9_1.wv7_1);
            var tmp_1 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this.hv9_1, null);
            suspendResult = tmp_0.a1c(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(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this.hv9_1, completion);
    i.iv9_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.rv9_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.rv9_1.tqn().o7f();
            var tmp_2 = this.rv9_1.pqn();
            PermissionFlags_getInstance();
            tmp_0.tv9_1 = tmp_1.fdk(tmp_2, this.rv9_1.wv7_1, new Long(64, 0));
            var tmp_3 = this;
            var tmp_4 = this.rv9_1.tqn().m7e();
            tmp_3.uv9_1 = tmp_4.ka3(this.rv9_1.wv7_1, 8);
            this.hd_1 = 1;
            var tmp_5 = combine(this.tv9_1, this.uv9_1, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_6 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this.rv9_1, null);
            suspendResult = tmp_5.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(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.rv9_1, completion);
    i.sv9_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.dva_1 = $this_launch;
    this.eva_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.dva_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this.eva_1, null));
          launch(this.dva_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this.eva_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).l78 = function (completion) {
    return new ClazzLogListAttendanceViewModel$slambda$slambda(this.dva_1, this.eva_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function RecordAttendanceOption(name, ordinal, stringResource) {
    Enum.call(this, name, ordinal);
    this.hva_1 = stringResource;
  }
  function PermissionAndExistingLogs(hasRecordPermission, hasExistingLogs) {
    this.xv8_1 = hasRecordPermission;
    this.yv8_1 = hasExistingLogs;
  }
  protoOf(PermissionAndExistingLogs).toString = function () {
    return 'PermissionAndExistingLogs(hasRecordPermission=' + this.xv8_1 + ', hasExistingLogs=' + this.yv8_1 + ')';
  };
  protoOf(PermissionAndExistingLogs).hashCode = function () {
    var result = getBooleanHashCode(this.xv8_1);
    result = imul(result, 31) + getBooleanHashCode(this.yv8_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.xv8_1 === tmp0_other_with_cast.xv8_1))
      return false;
    if (!(this.yv8_1 === tmp0_other_with_cast.yv8_1))
      return false;
    return true;
  };
  function Companion_140() {
    this.iva_1 = 'CourseLogListAttendanceView';
  }
  var Companion_instance_189;
  function Companion_getInstance_157() {
    return Companion_instance_189;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_21(function_0) {
    this.jva_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_21).t1d = function (value, $completion) {
    return this.jva_1(value, $completion);
  };
  function ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp = this$0.tqn().m7e();
      return tmp.ia3(this$0.wv7_1, 8);
    };
  }
  function ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.sva_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.sva_1.sqv_1, ClazzLogListAttendanceViewModel$slambda$slambda_0(this.tva_1, this.sva_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.sva_1, completion);
    i.tva_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.cvb_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.cvb_1.tqn().m7e().la3(this.cvb_1.wv7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var mostRecentLogUid = suspendResult;
            var this_0 = this.cvb_1.zqm_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_116();
              tmp0_safe_receiver.kp6('EditAttendance', mapOf_0(to('entityUid', mostRecentLogUid.toString())));
            }

            this.cvb_1.evb();
            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.cvb_1, completion);
    i.dvb_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_116();
    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.wv7_1 = tmp_1;
    var tmp_2 = this;
    tmp_2.xv7_1 = ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.vv6(VOID, VOID, VOID, this.xv7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.oqn();
    launch(tmp_3, VOID, VOID, ClazzLogListAttendanceViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogListAttendanceViewModel).evb = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.vv6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).mqw = function (searchText) {
  };
  protoOf(ClazzLogListAttendanceViewModel).nqw = function () {
  };
  protoOf(ClazzLogListAttendanceViewModel).yv7 = function (option) {
    var tmp0 = option.za_1;
    if (tmp0 === 1) {
      Companion_getInstance_125();
      var tmp = to('timeZone', this.sqv_1.t2().ov6_1);
      Companion_getInstance_116();
      this.fqx('ClazzLogEdit', mapOf([tmp, to('clazzUid', this.wv7_1.toString())]));
      this.evb();
    } else if (tmp0 === 0) {
      if (this.aqo().equals(Companion_getInstance_97().qq6_1))
        return Unit_instance;
      this.zqn(Companion_getInstance_97().qq6_1);
      var tmp_0 = this.oqn();
      launch(tmp_0, VOID, VOID, ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this, null));
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).fvb = function (clazzLog) {
    Companion_getInstance_116();
    var tmp = to('entityUid', clazzLog.ga4_1.toString());
    Companion_getInstance_125();
    this.zqm_1.kp6('EditAttendance', mapOf([tmp, to('clazzUid', this.wv7_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().xmh().ymg() : 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().fmv_1, 7), new MessageIdOption2(strings_getInstance().fmx_1, 30), new MessageIdOption2(strings_getInstance().rmz_1, 90)]) : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    this.nv6_1 = graphData;
    this.ov6_1 = timeZoneId;
    this.pv6_1 = recordAttendanceOptions;
    this.qv6_1 = clazzLogsList;
    this.rv6_1 = fieldsEnabled;
    this.sv6_1 = selectedChipId;
    this.tv6_1 = viewIdToNumDays;
    this.uv6_1 = createNewOptionsVisible;
  }
  protoOf(ClazzLogListAttendanceUiState).gvb = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    return new ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).vv6 = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible, $super) {
    graphData = graphData === VOID ? this.nv6_1 : graphData;
    timeZoneId = timeZoneId === VOID ? this.ov6_1 : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? this.pv6_1 : recordAttendanceOptions;
    clazzLogsList = clazzLogsList === VOID ? this.qv6_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.rv6_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.sv6_1 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? this.tv6_1 : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.uv6_1 : createNewOptionsVisible;
    return $super === VOID ? this.gvb(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) : $super.gvb.call(this, graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).toString = function () {
    return 'ClazzLogListAttendanceUiState(graphData=' + this.nv6_1 + ', timeZoneId=' + this.ov6_1 + ', recordAttendanceOptions=' + this.pv6_1 + ', clazzLogsList=' + this.qv6_1 + ', fieldsEnabled=' + this.rv6_1 + ', selectedChipId=' + this.sv6_1 + ', viewIdToNumDays=' + this.tv6_1 + ', createNewOptionsVisible=' + this.uv6_1 + ')';
  };
  protoOf(ClazzLogListAttendanceUiState).hashCode = function () {
    var result = this.nv6_1 == null ? 0 : this.nv6_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.ov6_1) | 0;
    result = imul(result, 31) + hashCode(this.pv6_1) | 0;
    result = imul(result, 31) + hashCode(this.qv6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rv6_1) | 0;
    result = imul(result, 31) + this.sv6_1 | 0;
    result = imul(result, 31) + hashCode(this.tv6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uv6_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.nv6_1, tmp0_other_with_cast.nv6_1))
      return false;
    if (!(this.ov6_1 === tmp0_other_with_cast.ov6_1))
      return false;
    if (!equals(this.pv6_1, tmp0_other_with_cast.pv6_1))
      return false;
    if (!equals(this.qv6_1, tmp0_other_with_cast.qv6_1))
      return false;
    if (!(this.rv6_1 === tmp0_other_with_cast.rv6_1))
      return false;
    if (!(this.sv6_1 === tmp0_other_with_cast.sv6_1))
      return false;
    if (!equals(this.tv6_1, tmp0_other_with_cast.tv6_1))
      return false;
    if (!(this.uv6_1 === tmp0_other_with_cast.uv6_1))
      return false;
    return true;
  };
  function ClazzLogEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda).qvb = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qvb(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).vny = function (it, completion) {
    var i = new ClazzLogEditViewModel$slambda$slambda(completion);
    i.pvb_1 = it;
    return i;
  };
  function ClazzLogEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.qvb(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.zvb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).avc = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.avc($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.ha4_1 = this.zvb_1.bvd_1;
          this_0.ia4_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).l78 = function (completion) {
    return new ClazzLogEditViewModel$slambda$slambda_1(this.zvb_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.avc($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.zvc_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gvd(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_141() {
    this.hvd_1 = 'ClazzLogEdit';
  }
  var Companion_instance_190;
  function Companion_getInstance_158() {
    return Companion_instance_190;
  }
  function ClazzLogEditViewModel$slambda(this$0, resultContinuation) {
    this.qvd_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_36.n4r();
            var tmp_1 = ClazzLogEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzLogEditViewModel$slambda$slambda_2(this.qvd_1, null);
            suspendResult = this.qvd_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzLogEditViewModel$slambda$lambda(this.qvd_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.qvd_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.qvd_1.xqn().joj(strings_getInstance().vmj_1);
                var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ClazzLogEditViewModel$onClickSave$ref(this.qvd_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.qvd_1.zvc_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.gvd(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.qvd_1, completion);
    i.rvd_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.ave_1 = $commitDelay;
    this.bve_1 = $entity;
    this.cve_1 = $this;
    this.dve_1 = $key;
    this.eve_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.ave_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.bve_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.cve_1.dqo(this.cve_1.xqm_1, this.dve_1, this.eve_1, this.bve_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.ave_1, this.bve_1, this.cve_1, this.dve_1, this.eve_1, completion);
    i.fve_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.ga4_1 = generateUid($this$shallowCopy);
    return Unit_instance;
  }
  function ClazzLogEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ClazzLogEdit');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_elvis_lhs = savedStateHandle.ba('timeZone');
    tmp.yvc_1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
    this.zvc_1 = MutableStateFlow(new ClazzLogEditUiState(VOID, VOID, this.yvc_1));
    this.avd_1 = asStateFlow(this.zvc_1);
    var tmp_0 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.bvd_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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().un9_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.oqn();
    launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogEditViewModel).gve = function (clazzLog) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zvc_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.dvd_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ia4_1;
        var nextValue = prevValue.gvd(VOID, clazzLog, VOID, this.iqu(tmp, clazzLog == null ? null : clazzLog.ia4_1, prevValue.fvd_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_36.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.oqn();
    tmp_0.eqt_1 = launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$onEntityChanged$slambda_0(commitDelay, clazzLog, this, key, serializer, null));
  };
  protoOf(ClazzLogEditViewModel).xs9 = function () {
    var tmp0_elvis_lhs = this.zvc_1.t2().dvd_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var clazzLog = tmp;
    var errorMsg = !isDateSet(clazzLog.ia4_1) ? strings_getInstance().vmn_1 : clazzLog.ia4_1.c7(systemTimeInMillis()) > 0 ? strings_getInstance().wnm_1 : null;
    if (!(errorMsg == null)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.zvc_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.gvd(VOID, VOID, VOID, this.xqn().joj(errorMsg));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    var clazzLogWithUid = shallowCopy_6(clazzLog, ClazzLogEditViewModel$onClickSave$lambda);
    var newClazzLogJson = this.m4r().r45(Companion_instance_36.n4r(), clazzLogWithUid);
    var tmp_0 = to('newclazzlog', newClazzLogJson);
    Companion_getInstance_125();
    this.zqm_1.kp6('EditAttendance', mapOf([tmp_0, to('clazzUid', this.bvd_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.cvd_1 = fieldsEnabled;
    this.dvd_1 = clazzLog;
    this.evd_1 = timeZone;
    this.fvd_1 = dateError;
  }
  protoOf(ClazzLogEditUiState).hve = function (fieldsEnabled, clazzLog, timeZone, dateError) {
    return new ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).gvd = function (fieldsEnabled, clazzLog, timeZone, dateError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.cvd_1 : fieldsEnabled;
    clazzLog = clazzLog === VOID ? this.dvd_1 : clazzLog;
    timeZone = timeZone === VOID ? this.evd_1 : timeZone;
    dateError = dateError === VOID ? this.fvd_1 : dateError;
    return $super === VOID ? this.hve(fieldsEnabled, clazzLog, timeZone, dateError) : $super.hve.call(this, fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).toString = function () {
    return 'ClazzLogEditUiState(fieldsEnabled=' + this.cvd_1 + ', clazzLog=' + this.dvd_1 + ', timeZone=' + this.evd_1 + ', dateError=' + this.fvd_1 + ')';
  };
  protoOf(ClazzLogEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.cvd_1);
    result = imul(result, 31) + (this.dvd_1 == null ? 0 : this.dvd_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.evd_1) | 0;
    result = imul(result, 31) + (this.fvd_1 == null ? 0 : getStringHashCode(this.fvd_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.cvd_1 === tmp0_other_with_cast.cvd_1))
      return false;
    if (!equals(this.dvd_1, tmp0_other_with_cast.dvd_1))
      return false;
    if (!(this.evd_1 === tmp0_other_with_cast.evd_1))
      return false;
    if (!(this.fvd_1 == tmp0_other_with_cast.fvd_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.ia4_1;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.ia4_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation) {
    this.qve_1 = this$0;
    this.rve_1 = $newClazzLogVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).tve = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.tve(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.sve_1.m7e();
            suspendResult = tmp_0.ja3(this.qve_1.wvf_1, 8, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var dbLogList = suspendResult;
            var tmp_1;
            if (!(this.rve_1 == null)) {
              var this_0 = plus(dbLogList, listOf_0(this.rve_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).vny = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this.qve_1, this.rve_1, completion);
    i.sve_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.tve(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).fvg = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.fvg($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).l78 = 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.fvg($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.rvf_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mvg(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.vvg_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.vvg_1.tqn().o7d().c8d(this.vvg_1.rvf_1.t2().xvg().ha4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var timeZone = suspendResult;
            l$ret$1: do {
              var this_0 = this.vvg_1.rvf_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mvg(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.vvg_1, completion);
    i.wvg_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.xs9();
      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.d9z_1;
          if (tmp_1 === 1) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      tmp.na4_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.d9z_1;
          if (tmp_4 === 2) {
            count_0 = count_0 + 1 | 0;
            checkCountOverflow(count_0);
          }
        }
        tmp$ret$2 = count_0;
      }
      tmp_2.oa4_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.d9z_1;
          if (tmp_7 === 4) {
            count_1 = count_1 + 1 | 0;
            checkCountOverflow(count_1);
          }
        }
        tmp$ret$4 = count_1;
      }
      tmp_5.pa4_1 = tmp$ret$4;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    this.gvh_1 = this$0;
    this.hvh_1 = $clazzLogsToSave;
    this.ivh_1 = $attendanceRecordsToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.gvh_1.tqn().m7e().ma3(this.hvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.gvh_1.tqn().l7e().g9y(this.ivh_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).vny = function (it, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this.gvh_1, this.hvh_1, this.ivh_1, completion);
    i.jvh_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_newClazzLog__zdra0r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tvf_1;
    newClazzLog$factory();
    return this_0.t2();
  }
  function _set_currentClazzLogIndex__l00dbq($this, value) {
    $this.xqm_1.aqj('activeIndex', toString_0(value));
  }
  function _get_currentClazzLogIndex__yy31c2($this) {
    var tmp0_safe_receiver = $this.xqm_1.ba('activeIndex');
    return tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
  }
  function savePersonAndAttendanceRecords($this, clazzLogUid, records, $completion) {
    var tmp = new $savePersonAndAttendanceRecordsCOROUTINE$72($this, clazzLogUid, records, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function commitAttendanceRecordsToState($this, $completion) {
    var tmp = new $commitAttendanceRecordsToStateCOROUTINE$73($this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_142() {
    this.mvi_1 = 'newclazzlog';
    this.nvi_1 = 'EditAttendance';
    this.ovi_1 = 'activeIndex';
    this.pvi_1 = 'log_';
    this.qvi_1 = 'logsToSave';
  }
  var Companion_instance_191;
  function Companion_getInstance_159() {
    return Companion_instance_191;
  }
  function sam$kotlin_Comparator$0_2(function_0) {
    this.rvi_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_2).pa = function (a, b) {
    return this.rvi_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.m4r().s45(Companion_instance_36.n4r(), tmp0_safe_receiver);
      }
      return tmp;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.avj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.bvj_1.o7f();
            var tmp_1 = this.avj_1.pqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.avj_1.wvf_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).vny = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this.avj_1, completion);
    i.bvj_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.jsc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation) {
    this.kvj_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.mvj_1 = _get_newClazzLog__zdra0r(this.kvj_1);
            this.hd_1 = 1;
            var tmp_0 = this.kvj_1.rqn().o7f();
            var tmp_1 = this.kvj_1.pqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.kvj_1.wvf_1, new Long(64, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nvj_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = ListSerializer(Companion_instance_36.n4r());
            var tmp_3 = ClazzLogEditAttendanceViewModel$slambda$slambda_0(this.kvj_1, this.mvj_1, null);
            var tmp_4 = ClazzLogEditAttendanceViewModel$slambda$slambda_2(null);
            suspendResult = this.kvj_1.hqo(tmp_2, VOID, VOID, tmp_3, tmp_4, ClazzLogEditAttendanceViewModel$slambda$lambda(this.kvj_1, this.nvj_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            launch(this.lvj_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda$slambda_4(this.kvj_1, null));
            var currentClazzLogIndexVal = _get_currentClazzLogIndex__yy31c2(this.kvj_1);
            var tmp_5;
            if (!(currentClazzLogIndexVal == null)) {
              tmp_5 = currentClazzLogIndexVal;
            } else if (!(this.mvj_1 == null)) {
              var tmp0_elvis_lhs = this.kvj_1.rvf_1.t2().ovj(this.mvj_1.ga4_1);
              tmp_5 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
            } else if (!this.kvj_1.fqt_1.equals(new Long(0, 0))) {
              var tmp1_elvis_lhs = this.kvj_1.rvf_1.t2().ovj(this.kvj_1.fqt_1);
              tmp_5 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            } else {
              tmp_5 = this.kvj_1.rvf_1.t2().ivg_1.u() - 1 | 0;
            }

            var startIndex = tmp_5;
            this.kvj_1.pvj(this.kvj_1.rvf_1.t2().ivg_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.kvj_1, completion);
    i.lvj_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.yvj_1 = $clazzLog;
    this.zvj_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.bvk_1 = 'log_' + this.yvj_1.ga4_1.toString();
            this.hd_1 = 1;
            suspendResult = this.zvj_1.cqo(this.zvj_1.xqm_1, this.bvk_1, ListSerializer(Companion_instance_38.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.cvk_1 = suspendResult;
            if (this.cvk_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.zvj_1.tqn().l7e().f9y(this.yvj_1.ha4_1, this.yvj_1.ga4_1, this.yvj_1.ia4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.dvk_1 = this.cvk_1;
              this.hd_1 = 8;
              continue $sm;
            }

          case 2:
            this.evk_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.fvk_1 = this.evk_1;
            var tmp_1 = this;
            tmp_1.gvk_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.evk_1, 10));
            this.hvk_1 = this.fvk_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.hvk_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.ivk_1 = this.hvk_1.e();
            var tmp_2 = this;
            tmp_2.jvk_1 = this.ivk_1;
            if (this.jvk_1.x9z_1 == null) {
              this.lvk_1 = this.jvk_1.v9z_1;
              var tmp_3 = this;
              tmp_3.mvk_1 = new ClazzLogAttendanceRecord();
              var tmp_4 = this;
              tmp_4.nvk_1 = this.mvk_1;
              this.hd_1 = 4;
              var tmp_5 = get_doorPrimaryKeyManager(this.zvj_1.rqn());
              suspendResult = tmp_5.o62(15, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_6 = this;
              tmp_6.kvk_1 = this.jvk_1;
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.ovk_1 = suspendResult;
            this.nvk_1.a9z_1 = this.ovk_1;
            var tmp_7 = this.nvk_1;
            var tmp0_safe_receiver = this.jvk_1.v9z_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
            tmp_7.c9z_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.nvk_1.b9z_1 = this.yvj_1.ga4_1;
            this.pvk_1 = this.mvk_1;
            this.qvk_1 = this.jvk_1.w9z_1;
            this.kvk_1 = new PersonAndClazzLogAttendanceRecord(this.lvk_1, this.qvk_1, this.pvk_1);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.rvk_1 = this.kvk_1;
            this.gvk_1.i1(this.rvk_1);
            this.hd_1 = 3;
            continue $sm;
          case 6:
            this.svk_1 = this.gvk_1;
            var tmp_8 = this;
            tmp_8.tvk_1 = this.svk_1;
            this.hd_1 = 7;
            suspendResult = savePersonAndAttendanceRecords(this.zvj_1, this.yvj_1.ga4_1, this.tvk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.dvk_1 = this.svk_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var personAndAttendanceRecords = this.dvk_1;
            l$ret$1: do {
              var this_0 = this.zvj_1.rvf_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.mvg(personAndAttendanceRecords, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.zvj_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_9;
                if (!prevValue_0.cq6_1.fq5_1) {
                  var tmp_10 = this.zvj_1.rvf_1.t2().kvg_1;
                  var tmp_11 = this.zvj_1.xqn().joj(strings_getInstance().hn3_1);
                  tmp_9 = prevValue_0.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(tmp_10, tmp_11, VOID, ClazzLogEditAttendanceViewModel$onClickSave$ref(this.zvj_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.yvj_1, this.zvj_1, completion);
    i.avk_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.v9z_1;
      var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
      var tmp1_safe_receiver = $record.v9z_1;
      return equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f96_1);
    };
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation) {
    this.cvl_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.cvl_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.cvl_1, completion);
    i.dvl_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.d9z_1 = $status;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation) {
    this.mvl_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.mvl_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.mvl_1, completion);
    i.nvl_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.wvl_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.yvl_1 = this.wvl_1.vvf_1;
            var tmp_1 = this;
            tmp_1.zvl_1 = null;
            this.hd_1 = 2;
            suspendResult = this.yvl_1.a24(this.zvl_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.bvm_1 = ArrayList_init_$Create$();
            var tmp_3 = this;
            tmp_3.cvm_1 = ArrayList_init_$Create$();
            this.hd_1 = 4;
            suspendResult = this.wvl_1.cqo(this.wvl_1.xqm_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.dvm_1 = suspendResult;
            this.evm_1 = this.dvm_1 == null ? emptyList() : this.dvm_1;
            var tmp_4 = this;
            tmp_4.fvm_1 = this.evm_1;
            this.gvm_1 = this.fvm_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.gvm_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.hvm_1 = this.gvm_1.e();
            var tmp_5 = this;
            tmp_5.ivm_1 = this.hvm_1;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.wvl_1.rvf_1.t2().ivg_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.ga4_1.equals(this.ivm_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.jvm_1 = tmp$ret$0;
            this.hd_1 = 6;
            suspendResult = this.wvl_1.cqo(this.wvl_1.xqm_1, 'log_' + this.ivm_1.toString(), ListSerializer(Companion_instance_38.n4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.kvm_1 = suspendResult;
            var tmp_7 = this;
            var tmp_8;
            if (this.kvm_1 == null) {
              tmp_8 = null;
            } else {
              var this_0 = this.kvm_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.x9z_1;
                if (tmp0_safe_receiver == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver);
                }
              }
              tmp_8 = destination;
            }

            tmp_7.lvm_1 = tmp_8;
            this.mvm_1 = this.lvm_1 == null ? emptyList() : this.lvm_1;
            var this_1 = this.bvm_1;
            var element_1 = shallowCopy_6(this.jvm_1, ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda(this.mvm_1));
            this_1.i1(element_1);
            var this_2 = this.cvm_1;
            var elements = this.mvm_1;
            addAll(this_2, elements);
            this.hd_1 = 5;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            var tmp_9 = this.wvl_1.tqn();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this.wvl_1, this.bvm_1, this.cvm_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.avm_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 11;
            this.yvl_1.l23(this.zvl_1);
            if (!(_get_newClazzLog__zdra0r(this.wvl_1) == null)) {
              this.wvl_1.zqm_1.jq9('ClazzLogEdit', true);
            } else {
              this.wvl_1.iqt(this.wvl_1.rvf_1.t2().xvg());
            }

            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.yvl_1.l23(this.zvl_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.wvl_1, completion);
    i.xvl_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$72(_this__u8e3s4, clazzLogUid, records, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.svh_1 = _this__u8e3s4;
    this.tvh_1 = clazzLogUid;
    this.uvh_1 = records;
  }
  protoOf($savePersonAndAttendanceRecordsCOROUTINE$72).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.vvh_1 = 'log_' + this.tvh_1.toString();
            this.hd_1 = 1;
            suspendResult = this.svh_1.dqo(this.svh_1.xqm_1, this.vvh_1, ListSerializer(Companion_instance_38.n4r()), this.uvh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.wvh_1 = suspendResult;
            this.xvh_1 = this.wvh_1 == null ? null : toSet(this.wvh_1);
            this.yvh_1 = this.xvh_1 == null ? emptySet() : this.xvh_1;
            if (!this.yvh_1.a1(this.tvh_1)) {
              this.zvh_1 = plus_2(this.yvh_1, this.tvh_1);
              this.hd_1 = 3;
              suspendResult = this.svh_1.dqo(this.svh_1.xqm_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), toList(this.zvh_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$73(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ivi_1 = _this__u8e3s4;
  }
  protoOf($commitAttendanceRecordsToStateCOROUTINE$73).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.jvi_1 = this.ivi_1.vvf_1;
            var tmp_1 = this;
            tmp_1.kvi_1 = null;
            this.hd_1 = 1;
            suspendResult = this.jvi_1.a24(this.kvi_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.ivi_1, this.ivi_1.rvf_1.t2().xvg().ga4_1, this.ivi_1.rvf_1.t2().gvg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.lvi_1 = suspendResult;
            this.id_1 = 6;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.jvi_1.l23(this.kvi_1);
            return Unit_instance;
          case 5:
            this.id_1 = 6;
            var t = this.kd_1;
            this.jvi_1.l23(this.kvi_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.rvf_1 = MutableStateFlow(new ClazzLogEditAttendanceUiState());
    this.svf_1 = asStateFlow(this.rvf_1);
    var tmp = this;
    tmp.tvf_1 = lazy_0(ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda(savedStateHandle, this));
    this.uvf_1 = null;
    this.vvf_1 = Mutex();
    var tmp_0 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.wvf_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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().wmu_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzLogEditAttendanceViewModel$slambda_0(this, null);
    this.jqo(tmp_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda_2(this, null));
  }
  protoOf(ClazzLogEditAttendanceViewModel).pvj = function (clazzLog, forceLoad) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.rvf_1.t2().ivg_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.ga4_1.equals(clazzLog.ga4_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.rvf_1.t2().hvg_1 : false)
      return Unit_instance;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rvf_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.ivg_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.ga4_1.equals(clazzLog.ga4_1)) {
              tmp$ret$3 = index_0;
              break $l$block_0;
            }
            index_0 = index_0 + 1 | 0;
          }
          tmp$ret$3 = -1;
        }
        var nextValue = prevValue.mvg(VOID, tmp$ret$3, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block_1;
        }
      }
    }
    var tmp0_safe_receiver = this.uvf_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.uvf_1 = launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0(clazzLog, this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).nvm = function (clazzLog, forceLoad, $super) {
    forceLoad = forceLoad === VOID ? false : forceLoad;
    var tmp;
    if ($super === VOID) {
      this.pvj(clazzLog, forceLoad);
      tmp = Unit_instance;
    } else {
      tmp = $super.pvj.call(this, clazzLog, forceLoad);
    }
    return tmp;
  };
  protoOf(ClazzLogEditAttendanceViewModel).ovm = function (record) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rvf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClazzLogAttendanceChanged.<anonymous>' call
        var nextValue = prevValue.mvg(replace_0(prevValue.gvg_1, record, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda(record)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).pvm = function (status) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.rvf_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.gvg_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.x9z_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.bka(VOID, VOID, tmp);
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.mvg(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).xs9 = function () {
    var tmp = this.oqn();
    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.gvg_1 = clazzLogAttendanceRecordList;
    this.hvg_1 = currentClazzLogIndex;
    this.ivg_1 = clazzLogsList;
    this.jvg_1 = fieldsEnabled;
    this.kvg_1 = canEdit;
    this.lvg_1 = timeZone;
  }
  protoOf(ClazzLogEditAttendanceUiState).ovj = 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.ivg_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.ga4_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).xvg = function () {
    return this.ivg_1.v(this.hvg_1);
  };
  protoOf(ClazzLogEditAttendanceUiState).qvm = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    return new ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).mvg = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone, $super) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? this.gvg_1 : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? this.hvg_1 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? this.ivg_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.jvg_1 : fieldsEnabled;
    canEdit = canEdit === VOID ? this.kvg_1 : canEdit;
    timeZone = timeZone === VOID ? this.lvg_1 : timeZone;
    return $super === VOID ? this.qvm(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) : $super.qvm.call(this, clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).toString = function () {
    return 'ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList=' + this.gvg_1 + ', currentClazzLogIndex=' + this.hvg_1 + ', clazzLogsList=' + this.ivg_1 + ', fieldsEnabled=' + this.jvg_1 + ', canEdit=' + this.kvg_1 + ', timeZone=' + this.lvg_1 + ')';
  };
  protoOf(ClazzLogEditAttendanceUiState).hashCode = function () {
    var result = hashCode(this.gvg_1);
    result = imul(result, 31) + this.hvg_1 | 0;
    result = imul(result, 31) + hashCode(this.ivg_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jvg_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kvg_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.lvg_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.gvg_1, tmp0_other_with_cast.gvg_1))
      return false;
    if (!(this.hvg_1 === tmp0_other_with_cast.hvg_1))
      return false;
    if (!equals(this.ivg_1, tmp0_other_with_cast.ivg_1))
      return false;
    if (!(this.jvg_1 === tmp0_other_with_cast.jvg_1))
      return false;
    if (!(this.kvg_1 === tmp0_other_with_cast.kvg_1))
      return false;
    if (!(this.lvg_1 === tmp0_other_with_cast.lvg_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().anp_1;
        break;
      case 4:
        tmp = strings_getInstance().bnp_1;
        break;
      case 3:
        tmp = strings_getInstance().cnp_1;
        break;
      case 2:
        tmp = strings_getInstance().dnp_1;
        break;
      case 1:
        tmp = strings_getInstance().enp_1;
        break;
      case 0:
        tmp = strings_getInstance().fnp_1;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function get_contentTypeStringResource(_this__u8e3s4) {
    var tmp;
    if (!_this__u8e3s4.caw_1) {
      tmp = strings_getInstance().hnd_1;
    } else {
      var tmp0_subject = _this__u8e3s4.haw_1;
      var tmp_0;
      if (tmp0_subject === 1) {
        tmp_0 = strings_getInstance().bmn_1;
      } else {
        if (tmp0_subject === 2) {
          tmp_0 = strings_getInstance().zmm_1;
        } else {
          if (tmp0_subject === 3) {
            tmp_0 = strings_getInstance().amn_1;
          } else {
            if (tmp0_subject === 4) {
              tmp_0 = strings_getInstance().mna_1;
            } else {
              if (tmp0_subject === 5) {
                tmp_0 = strings_getInstance().emn_1;
              } else {
                if (tmp0_subject === 6) {
                  tmp_0 = strings_getInstance().cmn_1;
                } else {
                  if (tmp0_subject === 7) {
                    tmp_0 = strings_getInstance().dmn_1;
                  } else {
                    tmp_0 = strings_getInstance().hmi_1;
                  }
                }
              }
            }
          }
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function Companion_143() {
    Companion_instance_192 = this;
    this.rvm_1 = 'ContentEntry';
    var tmp = this;
    Companion_getInstance_125();
    Companion_getInstance_125();
    Companion_getInstance_125();
    Companion_getInstance_125();
    tmp.svm_1 = listOf(['entityUid', 'clazzUid', 'parentUid', 'courseBlockUid']);
  }
  var Companion_instance_192;
  function Companion_getInstance_160() {
    if (Companion_instance_192 == null)
      new Companion_143();
    return Companion_instance_192;
  }
  function ContentEntryDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_160();
    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.lqo(this_0, Companion_getInstance_160().svm_1);
    var tmp$ret$2 = this_0.f3();
    var tmp_0 = new TabItem('ContentEntryDetailOverviewView', tmp$ret$2, this.xqn().joj(strings_getInstance().bn5_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.detail.ContentEntryDetailViewModel._uiState.<anonymous>' call
    this.lqo(this_1, Companion_getInstance_160().svm_1);
    var tmp$ret$5 = this_1.f3();
    tmp.pvn_1 = MutableStateFlow(new ContentEntryDetailUiState(listOf([tmp_0, new TabItem('ContentEntryDetailAttemptsPersonList', tmp$ret$5, this.xqn().joj(strings_getInstance().lmn_1))])));
    this.qvn_1 = asStateFlow(this.pvn_1);
  }
  function ContentEntryDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.rvn_1 = tabs;
  }
  protoOf(ContentEntryDetailUiState).toString = function () {
    return 'ContentEntryDetailUiState(tabs=' + this.rvn_1 + ')';
  };
  protoOf(ContentEntryDetailUiState).hashCode = function () {
    return hashCode(this.rvn_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.rvn_1, tmp0_other_with_cast.rvn_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.avo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).cvo = function (contentEntry, $completion) {
    var tmp = this.dvo(contentEntry, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.cvo((p1 == null ? true : p1 instanceof ContentEntry) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$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.avo_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.bvo_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_1;
              var nextValue = prevValue.jq6(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(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda).dvo = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this.avo_1, completion);
    i.bvo_1 = contentEntry;
    return i;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (contentEntry, $completion) {
      return i.cvo(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.mvo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$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.mvo_1.tqn().v7d().yau(this.mvo_1.nvp_1);
            var tmp_1 = ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda$slambda_0(this.mvo_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda).l78 = function (completion) {
    return new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this.mvo_1, completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function buildSortOptions($this, db, $completion) {
    var tmp = new $buildSortOptionsCOROUTINE$74($this, db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_144() {
    this.zvp_1 = 'ContentEntryDetailAttemptsPersonList';
  }
  var Companion_instance_193;
  function Companion_getInstance_161() {
    return Companion_instance_193;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_22(function_0) {
    this.avq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_22).t1d = function (value, $completion) {
    return this.avq_1(value, $completion);
  };
  function ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this$0) {
    return function () {
      return this$0.tqn().j7e().pje(this$0.nvp_1, this$0.pqn(), toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_1), this$0.sqv_1.t2().dvq_1.qqc_1);
    };
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda(this$0, resultContinuation) {
    this.nvq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$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(ContentEntryDetailAttemptsPersonListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$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;
            tmp_0.pvq_1 = filterNotNull(listOf([this.nvq_1.rqn(), this.nvq_1.sqn()]));
            this.qvq_1 = this.pvq_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.qvq_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.rvq_1 = this.qvq_1.e();
            var tmp_1 = this;
            tmp_1.svq_1 = this.rvq_1;
            this.hd_1 = 2;
            suspendResult = buildSortOptions(this.nvq_1, this.svq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var sortOptions = suspendResult;
            l$ret$1: do {
              var this_0 = this.nvq_1.sqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.tvq(VOID, sortOptions);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 1;
            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(ContentEntryDetailAttemptsPersonListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda(this.nvq_1, completion);
    i.ovq_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this$0, resultContinuation) {
    this.cvr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$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(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel$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.cvr_1.sqv_1, ContentEntryDetailAttemptsPersonListViewModel$slambda$slambda_0(this.cvr_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(ContentEntryDetailAttemptsPersonListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this.cvr_1, completion);
    i.dvr_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsPersonListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsPersonListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $buildSortOptionsCOROUTINE$74(_this__u8e3s4, db, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xvp_1 = _this__u8e3s4;
    this.yvp_1 = db;
  }
  protoOf($buildSortOptionsCOROUTINE$74).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.yvp_1.j7e().tje(this.xvp_1.nvp_1, this.xvp_1.pqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var list = suspendResult;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_0;
              if (isInterface(list, Collection)) {
                tmp_0 = list.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = list.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (!(element.xjf_1 == null)) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            var tmp_1 = tmp$ret$0;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp_2;
              if (isInterface(list, Collection)) {
                tmp_2 = list.c1();
              } else {
                tmp_2 = false;
              }
              if (tmp_2) {
                tmp$ret$2 = false;
                break l$ret$3;
              }
              var tmp0_iterator_0 = list.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                if (!(element_0.ijf_1 == null)) {
                  tmp$ret$2 = true;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = false;
            }
             while (false);
            var tmp0_container = new Pair(tmp_1, tmp$ret$2);
            var hasProgressData = tmp0_container.y6();
            var hasScoreData = tmp0_container.z6();
            var this_0 = ArrayList_init_$Create$();
            var tmp_3 = strings_getInstance().cmk_1;
            var tmp_4 = new SortOrderOption(tmp_3, 1, true);
            var tmp_5 = strings_getInstance().cmk_1;
            var tmp_6 = new SortOrderOption(tmp_5, 2, false);
            var tmp_7 = strings_getInstance().bmk_1;
            var tmp_8 = new SortOrderOption(tmp_7, 3, true);
            var tmp_9 = strings_getInstance().bmk_1;
            this_0.m1(listOf([tmp_4, tmp_6, tmp_8, new SortOrderOption(tmp_9, 4, false)]));
            if (hasScoreData) {
              var tmp_10 = strings_getInstance().emk_1;
              var tmp_11 = new SortOrderOption(tmp_10, 5, true);
              var tmp_12 = strings_getInstance().emk_1;
              this_0.m1(listOf([tmp_11, new SortOrderOption(tmp_12, 6, false)]));
            }

            if (hasProgressData) {
              var tmp_13 = strings_getInstance().xnq_1;
              var tmp_14 = new SortOrderOption(tmp_13, 7, true);
              var tmp_15 = strings_getInstance().xnq_1;
              this_0.m1(listOf([tmp_14, new SortOrderOption(tmp_15, 8, false)]));
            }

            var tmp_16 = strings_getInstance().jnl_1;
            var tmp_17 = new SortOrderOption(tmp_16, 10, null);
            var tmp_18 = strings_getInstance().dmk_1;
            this_0.m1(listOf([tmp_17, new SortOrderOption(tmp_18, 9, null)]));
            return this_0.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);
  };
  function ContentEntryDetailAttemptsPersonListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsPersonList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsPersonListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nvp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.ovp_1 = ContentEntryDetailAttemptsPersonListViewModel$attemptsPersonListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.bqx());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.sqv_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.tvq(this.ovp_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.oqn();
    launch(tmp_1, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_0(this, null));
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsPersonListViewModel$slambda_2(this, null));
  }
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).evr = function (entry) {
    Companion_getInstance_116();
    var tmp = to('personUid', entry.sjg_1.f96_1.toString());
    Companion_getInstance_116();
    this.zqm_1.kp6('ContentEntryDetailAttemptsSessionList', mapOf([tmp, to('entryid', this.nvp_1.toString())]));
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).nqw = function () {
  };
  protoOf(ContentEntryDetailAttemptsPersonListViewModel).ksz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsPersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.tvq(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  function ContentEntryDetailAttemptsPersonListUiState$_init_$lambda_s6nk3z() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList, sortOptions, sortOption, showSortOptions) {
    var tmp;
    if (attemptsPersonList === VOID) {
      tmp = ContentEntryDetailAttemptsPersonListUiState$_init_$lambda_s6nk3z;
    } else {
      tmp = attemptsPersonList;
    }
    attemptsPersonList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().jnl_1;
      var tmp_2 = new SortOrderOption(tmp_1, 10, null);
      var tmp_3 = strings_getInstance().dmk_1;
      tmp_0 = listOf([tmp_2, new SortOrderOption(tmp_3, 9, null)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    this.bvq_1 = attemptsPersonList;
    this.cvq_1 = sortOptions;
    this.dvq_1 = sortOption;
    this.evq_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsPersonListUiState).fvr = function (attemptsPersonList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).tvq = function (attemptsPersonList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsPersonList = attemptsPersonList === VOID ? this.bvq_1 : attemptsPersonList;
    sortOptions = sortOptions === VOID ? this.cvq_1 : sortOptions;
    sortOption = sortOption === VOID ? this.dvq_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.evq_1 : showSortOptions;
    return $super === VOID ? this.fvr(attemptsPersonList, sortOptions, sortOption, showSortOptions) : $super.fvr.call(this, attemptsPersonList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsPersonListUiState(attemptsPersonList=' + this.bvq_1 + ', sortOptions=' + this.cvq_1 + ', sortOption=' + this.dvq_1 + ', showSortOptions=' + this.evq_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).hashCode = function () {
    var result = hashCode(this.bvq_1);
    result = imul(result, 31) + hashCode(this.cvq_1) | 0;
    result = imul(result, 31) + this.dvq_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.evq_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsPersonListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsPersonListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsPersonListUiState ? other : THROW_CCE();
    if (!equals(this.bvq_1, tmp0_other_with_cast.bvq_1))
      return false;
    if (!equals(this.cvq_1, tmp0_other_with_cast.cvq_1))
      return false;
    if (!this.dvq_1.equals(tmp0_other_with_cast.dvq_1))
      return false;
    if (!(this.evq_1 === tmp0_other_with_cast.evq_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ovr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).qvr = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qvr((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$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 = firstOrNull_1(this.ovr_1.tqn().n7d().qg4(this.ovr_1.svs_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(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this.ovr_1, completion);
    i.pvr_1 = $this$async;
    return i;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.qvr($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.cvt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).evt = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.evt((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$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 = firstOrNull_1(this.cvt_1.tqn().v7d().yau(this.cvt_1.rvs_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(ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this.cvt_1, completion);
    i.dvt_1 = $this$async;
    return i;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.evt($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_145() {
    this.fvt_1 = 'ContentEntryDetailAttemptsSessionList';
  }
  var Companion_instance_194;
  function Companion_getInstance_162() {
    return Companion_instance_194;
  }
  function ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this$0) {
    return function () {
      return this$0.tqn().j7e().qje(this$0.rvs_1, this$0.svs_1, this$0.pqn(), this$0.sqv_1.t2().ivt_1.qqc_1);
    };
  }
  function ContentEntryDetailAttemptsSessionListViewModel$slambda(this$0, resultContinuation) {
    this.svt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$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(ContentEntryDetailAttemptsSessionListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel$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.uvt_1 = async(this.tvt_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_0(this.svt_1, null));
            var tmp_1 = this;
            tmp_1.vvt_1 = async(this.tvt_1, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda$slambda_2(this.svt_1, null));
            this.hd_1 = 1;
            suspendResult = this.uvt_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wvt_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.vvt_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var contentEntry = suspendResult;
            var tmp0_safe_receiver = this.wvt_1;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1;
            var tmp1_safe_receiver = this.wvt_1;
            var tmp_3 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ag9_1;
            var tmp3_elvis_lhs = contentEntry == null ? null : contentEntry.oav_1;
            var combinedTitle = '' + tmp_2 + ' ' + tmp_3 + ' - ' + (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs);
            l$ret$1: do {
              var this_0 = this.svt_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jq6(VOID, VOID, combinedTitle);
                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(ContentEntryDetailAttemptsSessionListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda(this.svt_1, completion);
    i.tvt_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsSessionListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsSessionListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsSessionListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsSessionList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsSessionListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.rvs_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_116();
    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.svs_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.tvs_1 = ContentEntryDetailAttemptsSessionListViewModel$attemptsSessionListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.<anonymous>' call
        var nextValue = prevValue.xvt(this.tvs_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, ContentEntryDetailAttemptsSessionListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).yvt = function (entry) {
    Companion_getInstance_116();
    var tmp = to('personUid', this.svs_1.toString());
    Companion_getInstance_116();
    var tmp_0 = to('entryid', this.rvs_1.toString());
    Companion_getInstance_116();
    var tmp_1 = to('contextRegistrationIdHi', entry.cji_1.toString());
    Companion_getInstance_116();
    this.zqm_1.kp6('ContentEntryDetailAttemptsStatementList', mapOf([tmp, tmp_0, tmp_1, to('contextRegistrationIdLo', entry.dji_1.toString())]));
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).ksz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsSessionListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsSessionList = this.tvs_1;
        var nextValue = prevValue.xvt(tmp0_attemptsSessionList, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).mqw = function (searchText) {
  };
  protoOf(ContentEntryDetailAttemptsSessionListViewModel).nqw = function () {
  };
  function ContentEntryDetailAttemptsSessionListUiState$_init_$lambda_970utq() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList, sortOptions, sortOption, showSortOptions) {
    var tmp;
    if (attemptsSessionList === VOID) {
      tmp = ContentEntryDetailAttemptsSessionListUiState$_init_$lambda_970utq;
    } else {
      tmp = attemptsSessionList;
    }
    attemptsSessionList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().jnl_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, null);
      var tmp_3 = strings_getInstance().dmk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, null);
      var tmp_5 = strings_getInstance().emk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().emk_1;
      var tmp_8 = new SortOrderOption(tmp_7, 4, false);
      var tmp_9 = strings_getInstance().fmk_1;
      var tmp_10 = new SortOrderOption(tmp_9, 5, true);
      var tmp_11 = strings_getInstance().fmk_1;
      tmp_0 = listOf([tmp_2, tmp_4, tmp_6, tmp_8, tmp_10, new SortOrderOption(tmp_11, 6, false)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    this.gvt_1 = attemptsSessionList;
    this.hvt_1 = sortOptions;
    this.ivt_1 = sortOption;
    this.jvt_1 = showSortOptions;
  }
  protoOf(ContentEntryDetailAttemptsSessionListUiState).zvt = function (attemptsSessionList, sortOptions, sortOption, showSortOptions) {
    return new ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).xvt = function (attemptsSessionList, sortOptions, sortOption, showSortOptions, $super) {
    attemptsSessionList = attemptsSessionList === VOID ? this.gvt_1 : attemptsSessionList;
    sortOptions = sortOptions === VOID ? this.hvt_1 : sortOptions;
    sortOption = sortOption === VOID ? this.ivt_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.jvt_1 : showSortOptions;
    return $super === VOID ? this.zvt(attemptsSessionList, sortOptions, sortOption, showSortOptions) : $super.zvt.call(this, attemptsSessionList, sortOptions, sortOption, showSortOptions);
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsSessionListUiState(attemptsSessionList=' + this.gvt_1 + ', sortOptions=' + this.hvt_1 + ', sortOption=' + this.ivt_1 + ', showSortOptions=' + this.jvt_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).hashCode = function () {
    var result = hashCode(this.gvt_1);
    result = imul(result, 31) + hashCode(this.hvt_1) | 0;
    result = imul(result, 31) + this.ivt_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jvt_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsSessionListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsSessionListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsSessionListUiState ? other : THROW_CCE();
    if (!equals(this.gvt_1, tmp0_other_with_cast.gvt_1))
      return false;
    if (!equals(this.hvt_1, tmp0_other_with_cast.hvt_1))
      return false;
    if (!this.ivt_1.equals(tmp0_other_with_cast.ivt_1))
      return false;
    if (!(this.jvt_1 === tmp0_other_with_cast.jvt_1))
      return false;
    return true;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ivu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).kvu = function (verbs, $completion) {
    var tmp = this.lvu(verbs, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.kvu((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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.ivu_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.svu(VOID, VOID, VOID, VOID, this.jvu_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(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda).lvu = function (verbs, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this.ivu_1, completion);
    i.jvu_1 = verbs;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (verbs, $completion) {
      return i.kvu(verbs, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.bvv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).cvo = function (contentEntry, $completion) {
    var tmp = this.dvo(contentEntry, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.cvo((p1 == null ? true : p1 instanceof ContentEntry) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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.bvv_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.cvv_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_1;
              var nextValue = prevValue.jq6(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(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1).dvo = function (contentEntry, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this.bvv_1, completion);
    i.cvv_1 = contentEntry;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (contentEntry, $completion) {
      return i.cvo(contentEntry, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lvv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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.lvv_1.tqn().j7e().sje(this.lvv_1.ovw_1, this.lvv_1.pvw_1, this.lvv_1.nvw_1, this.lvv_1.qvw_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_0(this.lvv_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this.lvv_1, completion);
    i.mvv_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.bvx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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.bvx_1.tqn().v7d().yau(this.bvx_1.qvw_1);
            var tmp_1 = ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda$slambda_2(this.bvx_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_1(this.bvx_1, completion);
    i.cvx_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$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 ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.lvx_1 = $this_launch;
    this.mvx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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.lvx_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_0(this.mvx_1, null));
          launch(this.lvx_1, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda$slambda_2(this.mvx_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda).l78 = function (completion) {
    return new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda(this.lvx_1, this.mvx_1, completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_formatStatementResponseUseCase__m72qwj($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rvw_1;
    formatStatementResponseUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_146() {
    this.nvx_1 = 'ContentEntryDetailAttemptsStatementList';
  }
  var Companion_instance_195;
  function Companion_getInstance_163() {
    return Companion_instance_195;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_23(function_0) {
    this.ovx_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_23).t1d = function (value, $completion) {
    return this.ovx_1(value, $completion);
  };
  function ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this$0) {
    return function () {
      return this$0.tqn().j7e().rje(this$0.ovw_1, this$0.pvw_1, this$0.pqn(), this$0.nvw_1, this$0.qvw_1, toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_1), this$0.sqv_1.t2().ovu_1.qqc_1, this$0.sqv_1.t2().rvu_1);
    };
  }
  function ContentEntryDetailAttemptsStatementListViewModel$slambda(this$0, resultContinuation) {
    this.xvx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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(ContentEntryDetailAttemptsStatementListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel$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.xvx_1.sqv_1, ContentEntryDetailAttemptsStatementListViewModel$slambda$slambda_0(this.yvx_1, this.xvx_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(ContentEntryDetailAttemptsStatementListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda(this.xvx_1, completion);
    i.yvx_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailAttemptsStatementListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailAttemptsStatementListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailAttemptsStatementListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'ContentEntryDetailAttemptsStatementList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryDetailAttemptsStatementListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nvw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('contextRegistrationIdHi');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.ovw_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('contextRegistrationIdLo');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_1.pvw_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_2 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver_2 = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_2.qvw_1 = tmp1_elvis_lhs_2 == null ? new Long(0, 0) : tmp1_elvis_lhs_2;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(FormatStatementResponseUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.rvw_1 = Instance(this_0, tmp$ret$0, null).a5d(this, formatStatementResponseUseCase$factory());
    var tmp_5 = this;
    tmp_5.svw_1 = ContentEntryDetailAttemptsStatementListViewModel$attemptsStatementListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.sqv_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.<anonymous>' call
        var nextValue = prevValue.svu(this.svw_1);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.bqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.aqx(true));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.oqn();
    launch(tmp_6, VOID, VOID, ContentEntryDetailAttemptsStatementListViewModel$slambda_0(this, null));
  }
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).ksz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onSortOrderChanged.<anonymous>' call
        var tmp0_attemptsStatementList = this.svw_1;
        var nextValue = prevValue.svu(tmp0_attemptsStatementList, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).zvx = function (verbEntity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailattemptlisttab.ContentEntryDetailAttemptsStatementListViewModel.onVerbFilterToggled.<anonymous>' call
        var nextValue = prevValue.svu(VOID, VOID, VOID, VOID, VOID, toggle(prevValue.rvu_1, verbEntity.tjj_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).nqw = function () {
  };
  protoOf(ContentEntryDetailAttemptsStatementListViewModel).avy = function (statementEntity) {
    return _get_formatStatementResponseUseCase__m72qwj(this).kpx(statementEntity.njj_1, statementEntity.qjj_1);
  };
  function ContentEntryDetailAttemptsStatementListUiState$_init_$lambda_o4i91x() {
    return new EmptyPagingSource();
  }
  function ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) {
    var tmp;
    if (attemptsStatementList === VOID) {
      tmp = ContentEntryDetailAttemptsStatementListUiState$_init_$lambda_o4i91x;
    } else {
      tmp = attemptsStatementList;
    }
    attemptsStatementList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().hmk_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().hmk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().emk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, false);
      var tmp_7 = strings_getInstance().emk_1;
      tmp_0 = listOf([tmp_2, tmp_4, tmp_6, new SortOrderOption(tmp_7, 4, true)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    availableVerbs = availableVerbs === VOID ? emptyList() : availableVerbs;
    deselectedVerbUids = deselectedVerbUids === VOID ? emptyList() : deselectedVerbUids;
    this.mvu_1 = attemptsStatementList;
    this.nvu_1 = sortOptions;
    this.ovu_1 = sortOption;
    this.pvu_1 = showSortOptions;
    this.qvu_1 = availableVerbs;
    this.rvu_1 = deselectedVerbUids;
  }
  protoOf(ContentEntryDetailAttemptsStatementListUiState).bvy = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) {
    return new ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).svu = function (attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids, $super) {
    attemptsStatementList = attemptsStatementList === VOID ? this.mvu_1 : attemptsStatementList;
    sortOptions = sortOptions === VOID ? this.nvu_1 : sortOptions;
    sortOption = sortOption === VOID ? this.ovu_1 : sortOption;
    showSortOptions = showSortOptions === VOID ? this.pvu_1 : showSortOptions;
    availableVerbs = availableVerbs === VOID ? this.qvu_1 : availableVerbs;
    deselectedVerbUids = deselectedVerbUids === VOID ? this.rvu_1 : deselectedVerbUids;
    return $super === VOID ? this.bvy(attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids) : $super.bvy.call(this, attemptsStatementList, sortOptions, sortOption, showSortOptions, availableVerbs, deselectedVerbUids);
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).toString = function () {
    return 'ContentEntryDetailAttemptsStatementListUiState(attemptsStatementList=' + this.mvu_1 + ', sortOptions=' + this.nvu_1 + ', sortOption=' + this.ovu_1 + ', showSortOptions=' + this.pvu_1 + ', availableVerbs=' + this.qvu_1 + ', deselectedVerbUids=' + this.rvu_1 + ')';
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).hashCode = function () {
    var result = hashCode(this.mvu_1);
    result = imul(result, 31) + hashCode(this.nvu_1) | 0;
    result = imul(result, 31) + this.ovu_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pvu_1) | 0;
    result = imul(result, 31) + hashCode(this.qvu_1) | 0;
    result = imul(result, 31) + hashCode(this.rvu_1) | 0;
    return result;
  };
  protoOf(ContentEntryDetailAttemptsStatementListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailAttemptsStatementListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailAttemptsStatementListUiState ? other : THROW_CCE();
    if (!equals(this.mvu_1, tmp0_other_with_cast.mvu_1))
      return false;
    if (!equals(this.nvu_1, tmp0_other_with_cast.nvu_1))
      return false;
    if (!this.ovu_1.equals(tmp0_other_with_cast.ovu_1))
      return false;
    if (!(this.pvu_1 === tmp0_other_with_cast.pvu_1))
      return false;
    if (!equals(this.qvu_1, tmp0_other_with_cast.qvu_1))
      return false;
    if (!equals(this.rvu_1, tmp0_other_with_cast.rvu_1))
      return false;
    return true;
  };
  function formatStatementResponseUseCase$factory() {
    return getPropertyCallableRef('formatStatementResponseUseCase', 1, KProperty1, function (receiver) {
      return _get_formatStatementResponseUseCase__m72qwj(receiver);
    }, null);
  }
  function formatStatementResponseUseCase$factory_0() {
    return getPropertyCallableRef('formatStatementResponseUseCase', 1, KProperty1, function (receiver) {
      return _get_formatStatementResponseUseCase__m72qwj(receiver);
    }, null);
  }
  function get_statementSummary(_this__u8e3s4) {
    return new StatementSummaryEntity(_this__u8e3s4.wjg_1, _this__u8e3s4.vjg_1);
  }
  function get_statementSummary_0(_this__u8e3s4) {
    return new StatementSummaryEntity(_this__u8e3s4.iji_1, _this__u8e3s4.hji_1);
  }
  function get_verbDisplayName(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.pjj_1;
    var tmp3_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ajk_1;
    var tmp;
    if (tmp3_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.ojj_1;
      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ujj_1;
      tmp = tmp2_safe_receiver == null ? null : substringAfterLast(tmp2_safe_receiver, '/');
    } else {
      tmp = tmp3_elvis_lhs;
    }
    var tmp4_elvis_lhs = tmp;
    return tmp4_elvis_lhs == null ? '' : tmp4_elvis_lhs;
  }
  function StatementSummaryEntity(successful, completed) {
    this.cvy_1 = successful;
    this.dvy_1 = completed;
  }
  protoOf(StatementSummaryEntity).toString = function () {
    return 'StatementSummaryEntity(successful=' + this.cvy_1 + ', completed=' + this.dvy_1 + ')';
  };
  protoOf(StatementSummaryEntity).hashCode = function () {
    var result = this.cvy_1 == null ? 0 : getBooleanHashCode(this.cvy_1);
    result = imul(result, 31) + getBooleanHashCode(this.dvy_1) | 0;
    return result;
  };
  protoOf(StatementSummaryEntity).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementSummaryEntity))
      return false;
    var tmp0_other_with_cast = other instanceof StatementSummaryEntity ? other : THROW_CCE();
    if (!(this.cvy_1 == tmp0_other_with_cast.cvy_1))
      return false;
    if (!(this.dvy_1 === tmp0_other_with_cast.dvy_1))
      return false;
    return true;
  };
  function get_descriptionStringRes(_this__u8e3s4) {
    return _this__u8e3s4.cvy_1 === true ? strings_getInstance().gmm_1 : _this__u8e3s4.cvy_1 === false ? strings_getInstance().fmm_1 : _this__u8e3s4.dvy_1 ? strings_getInstance().kmm_1 : strings_getInstance().jmm_1;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mvy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).ovy = function (it, $completion) {
    var tmp = this.pvy(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.ovy((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.mvy_1.mvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.pw0(VOID, this.nvy_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).pvy = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.mvy_1, completion);
    i.nvy_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.ovy(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.yw0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).grh = function (db, $completion) {
    var tmp = this.vny(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.grh(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.zw0_1.v7d().uau(this.yw0_1.aw0_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).vny = function (db, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this.yw0_1, completion);
    i.zw0_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.grh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.iw1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).kw1 = function (it, $completion) {
    var tmp = this.lw1(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.kw1((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.iw1_1.mvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.pw0(VOID, VOID, this.jw1_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).lw1 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.iw1_1, completion);
    i.jw1_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.kw1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.uw1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ww1 = function (it, $completion) {
    var tmp = this.xw1(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.ww1((!(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.uw1_1.mvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.pw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.vw1_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).xw1 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.uw1_1, completion);
    i.vw1_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.ww1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.gw2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).iw2 = function (it, $completion) {
    var tmp = this.jw2(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.iw2((!(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.gw2_1.mvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.pw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hw2_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).jw2 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.gw2_1, completion);
    i.hw2_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.iw2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.sw2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).uw2 = function (it, $completion) {
    var tmp = this.vw2(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.uw2((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.sw2_1.mvz_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.pw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.tw2_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).vw2 = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this.sw2_1, completion);
    i.tw2_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.uw2(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.ew3_1 = this$0;
    this.fw3_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.ew3_1.tqn().v7d();
            Companion_getInstance_125();
            var tmp0_safe_receiver = this.fw3_1.ba('courseBlockUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp_0.tau(this.ew3_1.rqm_1, this.ew3_1.zvz_1, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.ew3_1.pqn());
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.ew3_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(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.ew3_1, this.fw3_1, completion);
    i.gw3_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.pw3_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_169();
            if (this.pw3_1.aw0_1.equals(new Long(1, 0))) {
              var tmp_0 = this;
              tmp_0.rw3_1 = this.pw3_1.xqn().joj(strings_getInstance().vni_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.pw3_1.tqn();
              suspendResult = localFirstThenRepoIfNull(tmp_1, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this.pw3_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.rw3_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var parentTitle = this.rw3_1;
            l$ret$1: do {
              var this_0 = this.pw3_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jq6(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.pw3_1, completion);
    i.qw3_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.bqn_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.jq6(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.aw4_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.aw4_1.tqn().i7f().hbq(this.aw4_1.rqm_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.aw4_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this.aw4_1, completion);
    i.bw4_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.kw4_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.kw4_1.rqn().j7f();
            var tmp_1 = tmp_0.mic(this.kw4_1.rqm_1, 1);
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.kw4_1, null);
            suspendResult = tmp_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(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.kw4_1, completion);
    i.lw4_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.uw4_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.uw4_1.rqn().c7f().obb(this.uw4_1.rqm_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.uw4_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this.uw4_1, completion);
    i.vw4_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.ew5_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.ew5_1.rqn().l7f().dfr(this.ew5_1.rqm_1, this.ew5_1.gw5().q64_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this.ew5_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this.ew5_1, completion);
    i.fw5_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.pw5_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.rw5_1 = _get_httpClient__2ty1zc_0(this.pw5_1);
            var tmp_1 = this;
            tmp_1.sw5_1 = this.pw5_1.nqn().ioa().tnt_1 + 'api/contententryimportjob/importjobs';
            var tmp_2 = this;
            tmp_2.tw5_1 = this.rw5_1;
            var tmp_3 = this;
            tmp_3.uw5_1 = this.tw5_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.sw5_1);
            parameter(this_0, 'contententryuid', this.pw5_1.rqm_1.toString());
            header(this_0, 'cache-control', 'no-store');
            tmp_4.vw5_1 = this_0;
            this.vw5_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.ww5_1 = this.uw5_1;
            var tmp_6 = this;
            tmp_6.xw5_1 = this.vw5_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.xw5_1, this.ww5_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 3:
            var remoteImportJobsJson = suspendResult;
            var remoteImportJobs = this.pw5_1.m4r().s45(ListSerializer(Companion_instance_40.n4r()), remoteImportJobsJson);
            var tmp$ret$0;
            l$ret$1: do {
              var this_1 = this.pw5_1.mvz_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.pw0(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.kw0_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.k5e(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.pw5_1, completion);
    i.qw5_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.hw6_1 = $this_launch;
    this.iw6_1 = this$0;
    this.jw6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.hw6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this.iw6_1, this.jw6_1, null));
          if (this.iw6_1.zvz_1.equals(new Long(0, 0)) ? !this.iw6_1.aw0_1.equals(new Long(0, 0)) : false) {
            launch(this.hw6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this.iw6_1, null));
          }
          launchSetTitleFromClazzUid(this.iw6_1, this.iw6_1.zvz_1, ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this.iw6_1));
          launch(this.hw6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this.iw6_1, null));
          launch(this.hw6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this.iw6_1, null));
          launch(this.hw6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this.iw6_1, null));
          launch(this.hw6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this.iw6_1, null));
          launch(this.hw6_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this.iw6_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).l78 = function (completion) {
    return new ContentEntryDetailOverviewViewModel$slambda$slambda(this.hw6_1, this.iw6_1, this.jw6_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation) {
    this.sw6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).bp7 = function (it, $completion) {
    var tmp = this.vny(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.bp7(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.tw6_1.i7f().gbq(this.sw6_1.rqm_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).vny = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this.sw6_1, completion);
    i.tw6_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.bp7(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.nvz_1;
    makeContentEntryAvailableOfflineUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelDownloadUseCase__t8wbc4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ovz_1;
    cancelDownloadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_defaultLaunchContentEntryUseCase__lyydsx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rvz_1;
    defaultLaunchContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchXapiUseCase__jmtlap($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.svz_1;
    launchXapiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchEpubUseCase__sunqd7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tvz_1;
    launchEpubUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelImportContentEntryUseCase__kqom1e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vvz_1;
    cancelImportContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelRemoteContentEntryImportUseCase__8yb0xk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wvz_1;
    cancelRemoteContentEntryImportUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xvz_1;
    dismissRemoteContentEntryImportErrorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yvz_1;
    httpClient$factory_2();
    return this_0.t2();
  }
  function Companion_147() {
    this.uw6_1 = 'ContentEntryDetailOverviewView';
    this.vw6_1 = 'target';
  }
  var Companion_instance_196;
  function Companion_getInstance_164() {
    return Companion_instance_196;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_24(function_0) {
    this.ww6_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_24).t1d = function (value, $completion) {
    return this.ww6_1(value, $completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.fw7_1 = this$0;
    this.gw7_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.fw7_1.mvz_1, ContentEntryDetailOverviewViewModel$slambda$slambda_0(this.hw7_1, this.fw7_1, this.gw7_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.fw7_1, this.gw7_1, completion);
    i.hw7_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.qw7_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.qw7_1.zqn(Companion_getInstance_97().qq6_1);
            Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen launched');
            l$ret$1: do {
              var this_0 = this.qw7_1.mvz_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.pw0(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.qw7_1.tqn();
            suspendResult = localFirstThenRepoIfNull(tmp_0, ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this.qw7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.tw7_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.qw7_1.uvz_1;
            var tmp_2;
            if (tmp0_safe_receiver == null) {
              tmp_2 = null;
            } else {
              tmp_2 = Companion_instance_98.vmg(tmp0_safe_receiver);
            }

            var tmp1_elvis_lhs = tmp_2;
            tmp_1.uw7_1 = tmp1_elvis_lhs == null ? LinkTarget_DEFAULT_getInstance() : tmp1_elvis_lhs;
            if (!(this.tw7_1 == null)) {
              var tmp_3 = this;
              var tmp2_subject = this.tw7_1.oax_1;
              var tmp_4;
              if (tmp2_subject === 'xapi') {
                tmp_4 = _get_launchXapiUseCase__jmtlap(this.qw7_1);
              } else {
                if (tmp2_subject === 'epub') {
                  tmp_4 = _get_launchEpubUseCase__sunqd7(this.qw7_1);
                } else {
                  tmp_4 = null;
                }
              }
              tmp_3.vw7_1 = tmp_4;
              var tmp_5 = this;
              var tmp3_elvis_lhs = this.vw7_1;
              tmp_5.ww7_1 = tmp3_elvis_lhs == null ? _get_defaultLaunchContentEntryUseCase__lyydsx(this.qw7_1) : tmp3_elvis_lhs;
              Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen : Launching using ' + this.ww7_1);
              this.hd_1 = 3;
              Companion_getInstance_125();
              var tmp4_safe_receiver = this.qw7_1.xqm_1.ba('courseBlockUid');
              var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
              suspendResult = this.ww7_1.lp6(this.tw7_1, this.qw7_1.zqm_1, this.qw7_1.zvz_1, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs, this.uw7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen: latestContentEntryVersion = null');
              this.qw7_1.vqn().yq6(new Snack(this.qw7_1.xqn().joj(strings_getInstance().tnm_1)));
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.sw7_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.qw7_1.vqn().yq6(new Snack(this.qw7_1.xqn().joj(strings_getInstance().qmi_1) + (':' + e.message)));
              Napier_getInstance().m5e('ContentEntryDetailOverview: Exception opening content', e);
              tmp_7.sw7_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.qw7_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$5: do {
              var this_1 = this.qw7_1.mvz_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.pw0(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.qw7_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$7: do {
              var this_2 = this.qw7_1.mvz_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.pw0(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.qw7_1, completion);
    i.rw7_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.fw8_1 = this$0;
    this.gw8_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.fw8_1).op4(this.gw8_1, this.fw8_1.pqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.fw8_1.vqn().yq6(new Snack(this.fw8_1.xqn().joj(strings_getInstance().jmj_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.fw8_1.vqn().yq6(new Snack(this.fw8_1.xqn().joj(strings_getInstance().qmi_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.fw8_1, this.gw8_1, completion);
    i.hw8_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.qw8_1 = this$0;
    this.rw8_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.qw8_1).op4(this.rw8_1, this.qw8_1.pqn(), 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.o5e(VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda);
              this.qw8_1.vqn().yq6(new Snack(this.qw8_1.xqn().joj(strings_getInstance().qmi_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.qw8_1, this.rw8_1, completion);
    i.sw8_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.mvz_1 = MutableStateFlow(new ContentEntryDetailOverviewUiState());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.nvz_1 = Instance(this_0, tmp$ret$0, null).a5d(this, makeContentEntryAvailableOfflineUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(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.ovz_1 = Instance(this_1, tmp$ret$2, null).a5d(this, cancelDownloadUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveLearningSpace(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.pvz_1 = Instance(this_2, tmp$ret$4, null).a5d(this, nodeIdAndAuth$factory());
    this.qvz_1 = asStateFlow(this.mvz_1);
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = onActiveLearningSpace(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.rvz_1 = Instance(this_3, tmp$ret$6, null).a5d(this, defaultLaunchContentEntryUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_4 = onActiveLearningSpace(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.svz_1 = InstanceOrNull(this_4, tmp$ret$8, null).a5d(this, launchXapiUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_5 = onActiveLearningSpace(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.tvz_1 = InstanceOrNull(this_5, tmp$ret$10, null).a5d(this, launchEpubUseCase$factory());
    this.uvz_1 = savedStateHandle.ba('target');
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_6 = onActiveLearningSpace(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.vvz_1 = InstanceOrNull(this_6, tmp$ret$12, null).a5d(this, cancelImportContentEntryUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_7 = onActiveLearningSpace(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.wvz_1 = Instance(this_7, tmp$ret$14, null).a5d(this, cancelRemoteContentEntryImportUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_8 = onActiveLearningSpace(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.xvz_1 = Instance(this_8, tmp$ret$16, null).a5d(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.yvz_1 = Instance(di, tmp$ret$18, null).a5d(this, httpClient$factory_1());
    var tmp_19 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_19.zvz_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_20 = this;
    Companion_getInstance_125();
    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.aw0_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.mvz_1;
      while (true) {
        var prevValue = this_9.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>' call
        var nextValue = prevValue.pw0(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.pqn());
        if (this_9.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_21 = this.oqn();
    launch(tmp_21, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ContentEntryDetailOverviewViewModel).gw5 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.pvz_1;
    nodeIdAndAuth$factory_0();
    return this_0.t2();
  };
  protoOf(ContentEntryDetailOverviewViewModel).tw8 = function () {
    Napier_getInstance().i5e('ContentEntryDetailOverviewViewModel: onClickOpen');
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).uw8 = function (jobUid) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).vw8 = function (jobUid) {
    var tmp = this.oqn();
    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.bw0_1 = scoreProgress;
    this.cw0_1 = contentEntry;
    this.dw0_1 = latestContentEntryVersion;
    this.ew0_1 = contentEntryButtons;
    this.fw0_1 = locallyAvailable;
    this.gw0_1 = markCompleteVisible;
    this.hw0_1 = translationVisibile;
    this.iw0_1 = availableTranslations;
    this.jw0_1 = activeImportJobs;
    this.kw0_1 = remoteImportJobs;
    this.lw0_1 = activeUploadJobs;
    this.mw0_1 = offlineItemAndState;
    this.nw0_1 = openButtonEnabled;
    this.ow0_1 = activeUserPersonUid;
  }
  protoOf(ContentEntryDetailOverviewUiState).ww8 = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.cw0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hax_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rav_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).xw8 = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.cw0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hax_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sav_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).yw8 = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.cw0_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hax_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.uav_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).zw8 = function () {
    return false;
  };
  protoOf(ContentEntryDetailOverviewUiState).aw9 = function () {
    return !(this.bw0_1 == null);
  };
  protoOf(ContentEntryDetailOverviewUiState).bw9 = function () {
    var tmp0_safe_receiver = this.dw0_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.uax_1.c7(new Long(0, 0)) > 0 ? tmp0_safe_receiver.uax_1.c7(new Long(0, 0)) > 0 : false) ? tmp0_safe_receiver.uax_1.c7(tmp0_safe_receiver.vax_1) < 0 : false;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).cw9 = function () {
    var tmp0_safe_receiver = this.dw0_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.uax_1.c7(new Long(0, 0)) > 0;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).dw9 = function (importJobProgress) {
    return importJobProgress.ubb_1.equals(this.ow0_1);
  };
  protoOf(ContentEntryDetailOverviewUiState).ew9 = 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).pw0 = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, $super) {
    scoreProgress = scoreProgress === VOID ? this.bw0_1 : scoreProgress;
    contentEntry = contentEntry === VOID ? this.cw0_1 : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? this.dw0_1 : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? this.ew0_1 : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? this.fw0_1 : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? this.gw0_1 : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? this.hw0_1 : translationVisibile;
    availableTranslations = availableTranslations === VOID ? this.iw0_1 : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? this.jw0_1 : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? this.kw0_1 : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? this.lw0_1 : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? this.mw0_1 : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? this.nw0_1 : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.ow0_1 : activeUserPersonUid;
    return $super === VOID ? this.ew9(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) : $super.ew9.call(this, scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).toString = function () {
    return 'ContentEntryDetailOverviewUiState(scoreProgress=' + this.bw0_1 + ', contentEntry=' + this.cw0_1 + ', latestContentEntryVersion=' + this.dw0_1 + ', contentEntryButtons=' + this.ew0_1 + ', locallyAvailable=' + this.fw0_1 + ', markCompleteVisible=' + this.gw0_1 + ', translationVisibile=' + this.hw0_1 + ', availableTranslations=' + this.iw0_1 + ', activeImportJobs=' + this.jw0_1 + ', remoteImportJobs=' + this.kw0_1 + ', activeUploadJobs=' + this.lw0_1 + ', offlineItemAndState=' + this.mw0_1 + ', openButtonEnabled=' + this.nw0_1 + ', activeUserPersonUid=' + this.ow0_1.toString() + ')';
  };
  protoOf(ContentEntryDetailOverviewUiState).hashCode = function () {
    var result = this.bw0_1 == null ? 0 : this.bw0_1.hashCode();
    result = imul(result, 31) + (this.cw0_1 == null ? 0 : this.cw0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.dw0_1 == null ? 0 : this.dw0_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ew0_1 == null ? 0 : hashCode(this.ew0_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fw0_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gw0_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hw0_1) | 0;
    result = imul(result, 31) + hashCode(this.iw0_1) | 0;
    result = imul(result, 31) + hashCode(this.jw0_1) | 0;
    result = imul(result, 31) + hashCode(this.kw0_1) | 0;
    result = imul(result, 31) + hashCode(this.lw0_1) | 0;
    result = imul(result, 31) + (this.mw0_1 == null ? 0 : this.mw0_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nw0_1) | 0;
    result = imul(result, 31) + this.ow0_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.bw0_1, tmp0_other_with_cast.bw0_1))
      return false;
    if (!equals(this.cw0_1, tmp0_other_with_cast.cw0_1))
      return false;
    if (!equals(this.dw0_1, tmp0_other_with_cast.dw0_1))
      return false;
    if (!equals(this.ew0_1, tmp0_other_with_cast.ew0_1))
      return false;
    if (!(this.fw0_1 === tmp0_other_with_cast.fw0_1))
      return false;
    if (!(this.gw0_1 === tmp0_other_with_cast.gw0_1))
      return false;
    if (!(this.hw0_1 === tmp0_other_with_cast.hw0_1))
      return false;
    if (!equals(this.iw0_1, tmp0_other_with_cast.iw0_1))
      return false;
    if (!equals(this.jw0_1, tmp0_other_with_cast.jw0_1))
      return false;
    if (!equals(this.kw0_1, tmp0_other_with_cast.kw0_1))
      return false;
    if (!equals(this.lw0_1, tmp0_other_with_cast.lw0_1))
      return false;
    if (!equals(this.mw0_1, tmp0_other_with_cast.mw0_1))
      return false;
    if (!(this.nw0_1 === tmp0_other_with_cast.nw0_1))
      return false;
    if (!this.ow0_1.equals(tmp0_other_with_cast.ow0_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.gw5();
    }, 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_1() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(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.gw5();
    }, 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_2() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(receiver);
    }, null);
  }
  function get_progress(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4.rbb_1.c7(new Long(0, 0)) > 0) {
      tmp = _this__u8e3s4.qbb_1.zc() / _this__u8e3s4.rbb_1.zc();
    } else {
      tmp = 0.0;
    }
    return tmp;
  }
  function ContentEntryEditViewModel$slambda$slambda$lambda($newContentEntryUid, this$0, $savedStateHandle) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.nav_1 = $newContentEntryUid;
      var tmp;
      if (this$0.hwa_1) {
        var tmp_0 = $this$shallowCopy;
        tmp_0.jaw_1 = 2;
        var tmp_1 = $this$shallowCopy;
        Companion_getInstance_125();
        var tmp0_safe_receiver = $savedStateHandle.ba('clazzUid');
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        tmp_1.iaw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
        tmp = Unit_instance;
      } else {
        var tmp_2 = $this$shallowCopy;
        tmp_2.jaw_1 = 1;
        $this$shallowCopy.iaw_1 = this$0.pqn();
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda($newDecription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.pav_1 = $newDecription;
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.qwa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).nqa = function (it, $completion) {
    var tmp = this.oqa(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.nqa(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.rwa_1.uq9_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.qwa_1.ewa_1.t2().swa_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ok7_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.qwa_1.ewb(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).oqa = function (it, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this.qwa_1, completion);
    i.rwa_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.nqa(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack) {
    return function (it) {
      return it.tog_1 === $newSubtitleTrack.tog_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.nwb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).nqa = function (navResult, $completion) {
    var tmp = this.oqa(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.nqa(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.owb_1.uq9_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.nwb_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).oqa = function (navResult, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this.nwb_1, completion);
    i.owb_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.nqa(navResult, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.xwb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda).bwc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.bwc(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.ywb_1;
            var tmp_1;
            if (!this.xwb_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.zwb_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7d();
            if (this.zwb_1 == null) {
              this.awc_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.zwb_1.sau(this.xwb_1.fqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.awc_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp2_safe_receiver = this.awc_1;
            var tmp_2;
            if (tmp2_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var tmp_3;
              if (!(tmp2_safe_receiver.bax_1 == null)) {
                var tmp_4 = tmp2_safe_receiver.bax_1;
                var tmp0_elvis_lhs = tmp2_safe_receiver.cax_1;
                tmp_3 = new ContentEntryAndContentJob(tmp_4, VOID, VOID, tmp0_elvis_lhs == null ? new ContentEntryPicture2(this.xwb_1.fqt_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).vny = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this.xwb_1, completion);
    i.ywb_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.bwc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.kwc_1 = this$0;
    this.lwc_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).nwc = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.nwc($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.kwc_1.rqn());
            tmp_0.mwc_1 = tmp_1.n62(42);
            this.hd_1 = 1;
            suspendResult = this.kwc_1.cqo(this.lwc_1, 'metadata', Companion_instance_81.n4r(), 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.goh_1;
              var pictureUri = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fax_1;
              if (!(pictureUri == null)) {
                Companion_getInstance_123();
                this.lwc_1.aqj('initPicUri', '');
              }
              var tmp_3 = shallowCopy_8(importedMetaData.doh_1, ContentEntryEditViewModel$slambda$slambda$lambda(this.mwc_1, this.kwc_1, this.lwc_1));
              var tmp1_cjiPluginId = importedMetaData.eoh_1;
              var tmp2_sourceUri = importedMetaData.doh_1.wav_1;
              var tmp3_cjiOriginalFilename = importedMetaData.foh_1;
              var tmp4_cjiOwnerPersonUid = this.kwc_1.pqn();
              var tmp_4 = new ContentEntryImportJob(VOID, tmp2_sourceUri, tmp3_cjiOriginalFilename, this.mwc_1, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_cjiPluginId, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_cjiOwnerPersonUid);
              var tmp5_safe_receiver = importedMetaData.goh_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.eki(this.mwc_1);
              var this_0 = new ContentEntryAndContentJob(tmp_3, VOID, tmp_4, tmp6_elvis_lhs == null ? new ContentEntryPicture2(this.mwc_1) : tmp6_elvis_lhs);
              var tmp_5 = this.kwc_1.xqn();
              var tmp_6 = strings_getInstance().nnc_1;
              var tmp0_elvis_lhs = importedMetaData.foh_1;
              var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? importedMetaData.doh_1.wav_1 : tmp0_elvis_lhs;
              this.lwc_1.aqj('savedTitle', tmp_5.koj(tmp_6, [tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs]));
              tmp_2 = this_0;
            } else {
              var this_1 = new ContentEntry();
              this_1.nav_1 = this.mwc_1;
              var tmp_7 = this_1;
              var tmp0_safe_receiver_0 = this.lwc_1.ba('leaf');
              tmp_7.caw_1 = (tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0)) === true;
              this_1.iaw_1 = this.kwc_1.pqn();
              tmp_2 = new ContentEntryAndContentJob(this_1, VOID, VOID, new ContentEntryPicture2(this.mwc_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).l78 = function (completion) {
    return new ContentEntryEditViewModel$slambda$slambda_1(this.kwc_1, this.lwc_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.nwc($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.ewa_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.qk7_1;
          var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramSubtitles(tmp1_safe_receiver, this$0.m4r());
          var nextValue = prevValue.owc(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.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.xwc_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.xwc_1.bqo(this.xwc_1.uqn(), 'contentEntryDesc');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_0(this.xwc_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryEditViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this.xwc_1, completion);
    i.ywc_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.hwd_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.hwd_1.bqo(this.hwd_1.uqn(), 'subtitleKey');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_2(this.hwd_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this.hwd_1, completion);
    i.iwd_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.ewa_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.dwb_1);
        var tmp0_safe_receiver = prevValue.swa_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qk7_1;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramMap(tmp1_safe_receiver, $this.m4r());
        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.m4r().r45(ListSerializer(Companion_instance_80.n4r()), updatedSubtitles);
        this_1.s(key, value);
        var contentJobParam = this_1;
        var tmp4_safe_receiver = prevValue.swa_1;
        var tmp;
        if (tmp4_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp3_safe_receiver = prevValue.swa_1.qk7_1;
          tmp = tmp4_safe_receiver.tk7(VOID, VOID, tmp3_safe_receiver == null ? null : tmp3_safe_receiver.tkh(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.m4r().r45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), contentJobParam)));
        }
        var tmp5_entity = tmp;
        var nextValue = prevValue.owc(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.swa_1);
  }
  function scheduleEntityCommit($this, entity) {
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_41.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = $this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = $this;
    var tmp_0 = $this.oqn();
    tmp.eqt_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.zwa_1 == null);
  }
  function Companion_148() {
    this.jwd_1 = 'leaf';
    this.kwd_1 = 'courseBlock';
    this.lwd_1 = 'ContentEntryEdit';
    this.mwd_1 = 'metadata';
    this.nwd_1 = 'savedTitle';
    this.owd_1 = 'goToOnContentEntryDone';
    this.pwd_1 = 'contentEntryDesc';
    this.qwd_1 = 'subtitleKey';
    this.rwd_1 = 1;
    this.swd_1 = 2;
  }
  var Companion_instance_197;
  function Companion_getInstance_165() {
    return Companion_instance_197;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_25(function_0) {
    this.twd_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_25).t1d = function (value, $completion) {
    return this.twd_1(value, $completion);
  };
  function ContentEntryEditViewModel$slambda(this$0, resultContinuation) {
    this.cwe_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.cwe_1.hwa_1) {
              this.ewe_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = this.dwe_1.p7f();
              var tmp_1 = this.cwe_1.pqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.ti0(tmp_1, new Long(65536, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ewe_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.ewe_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).vny = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda(this.cwe_1, completion);
    i.dwe_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.jsc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.nwe_1 = this$0;
    this.owe_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_41.n4r();
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda_0(this.nwe_1, null);
            var tmp_2 = ContentEntryEditViewModel$slambda$slambda_2(this.nwe_1, this.owe_1, null);
            suspendResult = this.nwe_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ContentEntryEditViewModel$slambda$lambda(this.nwe_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            Companion_getInstance_123();
            var tmp1_safe_receiver = it == null ? null : it.rk7_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fax_1;
            setIfNoValueSetYet(this.owe_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            var tmp0_safe_receiver = this.nwe_1.ewa_1.t2().swa_1;
            var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ok7_1;
            var isLeaf = (tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.caw_1) === true;
            var savedStateTitle = this.owe_1.ba('savedTitle');
            var title = !(savedStateTitle == null) ? savedStateTitle : (this.nwe_1.fqt_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.nwe_1.xqn().joj(strings_getInstance().nna_1) : (!this.nwe_1.fqt_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.nwe_1.xqn().joj(strings_getInstance().tnl_1) : this.nwe_1.xqn().joj(strings_getInstance().snl_1);
            l$ret$1: do {
              var this_0 = this.nwe_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.nwe_1.xqn();
                var tmp0_subject = this.nwe_1.gwa_1;
                var tmp_4 = tmp_3.joj(tmp0_subject === 1 ? strings_getInstance().vmj_1 : tmp0_subject === 2 ? strings_getInstance().tmr_1 : strings_getInstance().hn3_1);
                var nextValue = prevValue.jq6(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_4, VOID, ContentEntryEditViewModel$onClickSave$ref(this.nwe_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.nwe_1.ewa_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.owc(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.pwe_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_4(this.nwe_1, null));
            launch(this.pwe_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_6(this.nwe_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.nwe_1, this.owe_1, completion);
    i.pwe_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.ywe_1 = $commitDelay;
    this.zwe_1 = $entity;
    this.awf_1 = $this;
    this.bwf_1 = $key;
    this.cwf_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.ywe_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.zwe_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.awf_1.dqo(this.awf_1.xqm_1, this.bwf_1, this.cwf_1, this.zwe_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.ywe_1, this.zwe_1, this.awf_1, this.bwf_1, this.cwf_1, completion);
    i.dwf_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.tog_1 === $subtitleTrack.tog_1)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    this.mwf_1 = this$0;
    this.nwf_1 = $contentEntryVal;
    this.owf_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_125();
            var tmp0_safe_receiver = this.mwf_1.xqm_1.ba('parentUid');
            tmp_0.qwf_1 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            this.hd_1 = 1;
            var tmp_1 = this.mwf_1.fqt_1.equals(new Long(0, 0)) ? this.qwf_1 : null;
            Companion_getInstance_123();
            suspendResult = this.mwf_1.cwa_1.epb(this.nwf_1, tmp_1, this.owf_1.rk7_1, this.mwf_1.xqm_1.ba('initPicUri'), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rwf_1 = this.owf_1.qk7_1;
            if (!(this.rwf_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.mwf_1.dwa_1.lp5(this.rwf_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_125();
            var popUpToOnFinish = this.mwf_1.xqm_1.ba('popUpToOnFinish');
            if (!(this.mwf_1.yqn() == null)) {
              this.mwf_1.iqt(this.nwf_1);
            } else {
              this.mwf_1.zqm_1.jq9(popUpToOnFinish == null ? this.mwf_1.yqm_1 : popUpToOnFinish, true);
            }

            if (hasErrors_2(this.mwf_1.ewa_1.t2(), this.mwf_1)) {
              this.mwf_1.zqn(Companion_getInstance_97().rq6_1);
              l$ret$1: do {
                var this_0 = this.mwf_1.ewa_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.owc(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.mwf_1, this.nwf_1, this.owf_1, completion);
    i.pwf_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(onActiveLearningSpace(di)).f58();
      // 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.d58(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(onActiveLearningSpace(di)).f58();
      // 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.d58(tmp$ret$0_0, null);
    } else {
      tmp_2 = enqueueContentEntryImportUseCase;
    }
    enqueueContentEntryImportUseCase = tmp_2;
    UstadEditViewModel.call(this, di, savedStateHandle, 'ContentEntryEdit');
    this.cwa_1 = saveContentEntryUseCase;
    this.dwa_1 = enqueueContentEntryImportUseCase;
    this.ewa_1 = MutableStateFlow(new ContentEntryEditUiState());
    this.fwa_1 = asStateFlow(this.ewa_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.gwa_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    this.hwa_1 = this.gwa_1 === 1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_6 = ContentEntryEditViewModel$slambda_0(this, null);
    this.jqo(tmp_6, VOID, VOID, ContentEntryEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ContentEntryEditViewModel).ewb = function (contentEntry) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.ewa_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.swa_1;
        var nextValue = prevValue.owc(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tk7(contentEntry));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.swa_1);
  };
  protoOf(ContentEntryEditViewModel).au8 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.ewa_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.swa_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.swa_1.rk7_1;
          tmp = tmp1_safe_receiver.tk7(VOID, VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eki(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.owc(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.swa_1);
  };
  protoOf(ContentEntryEditViewModel).swf = function (compressionLevel) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ewa_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.swa_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.swa_1.qk7_1;
          tmp = tmp1_safe_receiver.tk7(VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tkh(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, compressionLevel.ap2_1));
        }
        var nextValue = prevValue.owc(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryEditViewModel).twf = function (uri, fileName) {
    var tmp = Companion_instance_80.n4r();
    // 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.fqo('GetSubtitle', 'subtitleKey', null, tmp, tmp$ret$2);
  };
  protoOf(ContentEntryEditViewModel).uwf = function (subtitleTrack) {
    this.fqo('SubtitleEdit', 'subtitleKey', subtitleTrack, Companion_instance_80.n4r());
  };
  protoOf(ContentEntryEditViewModel).vwf = function (subtitleTrack) {
    updateSubtitles(this, ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda(subtitleTrack));
  };
  protoOf(ContentEntryEditViewModel).xs9 = function () {
    var entityVal = this.ewa_1.t2().swa_1;
    var tmp0_safe_receiver = this.ewa_1.t2().swa_1;
    var contentEntry = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ok7_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ewa_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.oav_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : isBlank(this_1)) {
          tmp = this.xqn().joj(strings_getInstance().znl_1);
        } else {
          tmp = null;
        }
        var nextValue = prevValue.owc(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_2(this.ewa_1.t2(), this)) {
      this.zqn(Companion_getInstance_97().rq6_1);
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.ewa_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.owc(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.ok7_1;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var contentEntryVal = tmp_0;
    if (!this.ewa_1.t2().wwa_1) {
      return Unit_instance;
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.ewa_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.owc(VOID, VOID, VOID, VOID, false);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (this.gwa_1 === 1) {
      Companion_getInstance_174();
      // 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_174();
      var key = 'SelectedContentEntry';
      var value = this.m4r().r45(Companion_instance_41.n4r(), entityVal);
      this_4.s(key, value);
      this.lqo(this_4, Companion_getInstance_174().cwg_1);
      var tmp$ret$9 = this_4.f3();
      this.zqm_1.kp6('CourseBlockEdit', tmp$ret$9);
    } else if (this.gwa_1 === 2) {
      this.iqt(entityVal);
    } else {
      var tmp_1 = this.oqn();
      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.swa_1 = entity;
    this.twa_1 = licenceOptions;
    this.uwa_1 = storageOptions;
    this.vwa_1 = courseBlockEditUiState;
    this.wwa_1 = fieldsEnabled;
    this.xwa_1 = updateContentVisible;
    this.ywa_1 = importError;
    this.zwa_1 = titleError;
    this.awb_1 = selectedContainerStorageDir;
    this.bwb_1 = metadataResult;
    this.cwb_1 = compressionEnabled;
    this.dwb_1 = subtitles;
  }
  protoOf(ContentEntryEditUiState).dwg = function () {
    var tmp0_safe_receiver = this.swa_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qk7_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vbc_1;
    return tmp === 101;
  };
  protoOf(ContentEntryEditUiState).ewg = 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).owc = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles, $super) {
    entity = entity === VOID ? this.swa_1 : entity;
    licenceOptions = licenceOptions === VOID ? this.twa_1 : licenceOptions;
    storageOptions = storageOptions === VOID ? this.uwa_1 : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.vwa_1 : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? this.wwa_1 : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? this.xwa_1 : updateContentVisible;
    importError = importError === VOID ? this.ywa_1 : importError;
    titleError = titleError === VOID ? this.zwa_1 : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? this.awb_1 : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? this.bwb_1 : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? this.cwb_1 : compressionEnabled;
    subtitles = subtitles === VOID ? this.dwb_1 : subtitles;
    return $super === VOID ? this.ewg(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) : $super.ewg.call(this, entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).toString = function () {
    return 'ContentEntryEditUiState(entity=' + this.swa_1 + ', licenceOptions=' + this.twa_1 + ', storageOptions=' + this.uwa_1 + ', courseBlockEditUiState=' + this.vwa_1 + ', fieldsEnabled=' + this.wwa_1 + ', updateContentVisible=' + this.xwa_1 + ', importError=' + this.ywa_1 + ', titleError=' + this.zwa_1 + ', selectedContainerStorageDir=' + this.awb_1 + ', metadataResult=' + this.bwb_1 + ', compressionEnabled=' + this.cwb_1 + ', subtitles=' + this.dwb_1 + ')';
  };
  protoOf(ContentEntryEditUiState).hashCode = function () {
    var result = this.swa_1 == null ? 0 : this.swa_1.hashCode();
    result = imul(result, 31) + hashCode(this.twa_1) | 0;
    result = imul(result, 31) + hashCode(this.uwa_1) | 0;
    result = imul(result, 31) + this.vwa_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wwa_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xwa_1) | 0;
    result = imul(result, 31) + (this.ywa_1 == null ? 0 : getStringHashCode(this.ywa_1)) | 0;
    result = imul(result, 31) + (this.zwa_1 == null ? 0 : getStringHashCode(this.zwa_1)) | 0;
    result = imul(result, 31) + (this.awb_1 == null ? 0 : hashCode(this.awb_1)) | 0;
    result = imul(result, 31) + (this.bwb_1 == null ? 0 : this.bwb_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cwb_1) | 0;
    result = imul(result, 31) + hashCode(this.dwb_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.swa_1, tmp0_other_with_cast.swa_1))
      return false;
    if (!equals(this.twa_1, tmp0_other_with_cast.twa_1))
      return false;
    if (!equals(this.uwa_1, tmp0_other_with_cast.uwa_1))
      return false;
    if (!this.vwa_1.equals(tmp0_other_with_cast.vwa_1))
      return false;
    if (!(this.wwa_1 === tmp0_other_with_cast.wwa_1))
      return false;
    if (!(this.xwa_1 === tmp0_other_with_cast.xwa_1))
      return false;
    if (!(this.ywa_1 == tmp0_other_with_cast.ywa_1))
      return false;
    if (!(this.zwa_1 == tmp0_other_with_cast.zwa_1))
      return false;
    if (!equals(this.awb_1, tmp0_other_with_cast.awb_1))
      return false;
    if (!equals(this.bwb_1, tmp0_other_with_cast.bwb_1))
      return false;
    if (!(this.cwb_1 === tmp0_other_with_cast.cwb_1))
      return false;
    if (!equals(this.dwb_1, tmp0_other_with_cast.dwb_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.bwh_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.getmetadata.ContentEntryGetMetadataViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ewh(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_149() {
    this.fwh_1 = 'uri';
    this.gwh_1 = 'filename';
    this.hwh_1 = 'ContentEntryGetMetadata';
  }
  var Companion_instance_198;
  function Companion_getInstance_166() {
    return Companion_instance_198;
  }
  function ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation) {
    this.qwh_1 = this$0;
    this.rwh_1 = $uriArg;
    this.swh_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.uwh_1 = this.qwh_1.awh_1;
            this.vwh_1 = Companion_getInstance_3().o2r(this.rwh_1);
            this.wwh_1 = this.qwh_1.nqn().ioa();
            this.hd_1 = 1;
            suspendResult = this.uwh_1.ep3(this.vwh_1, this.swh_1, this.wwh_1, ContentEntryGetMetadataViewModel$slambda$lambda(this.qwh_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.qwh_1.m4r().r45(Companion_instance_81.n4r(), metadataResult));
            this.qwh_1.lqo(this_0, Companion_getInstance_174().cwg_1);
            Companion_getInstance_116();
            this.qwh_1.kqo(this_0, 'result_viewname');
            Companion_getInstance_116();
            this.qwh_1.kqo(this_0, 'result_key');
            Companion_getInstance_125();
            this.qwh_1.kqo(this_0, 'parentUid');
            this.qwh_1.zqm_1.iq9('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.qwh_1.xqn().joj(strings_getInstance().ymt_1) + ' : ' + e.message;
              } else {
                if (e instanceof UnsupportedContentException) {
                  var tmp_2 = this.qwh_1.xqn();
                  var tmp_3 = strings_getInstance().amu_1;
                  var tmp3_elvis_lhs = e.message;
                  tmp_1 = tmp_2.koj(tmp_3, [tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs]);
                } else {
                  tmp_1 = this.qwh_1.xqn().joj(strings_getInstance().qmi_1) + ' : other: ' + e.message;
                }
              }
              var errorMessage = tmp_1;
              l$ret$1: do {
                var this_1 = this.qwh_1.bwh_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.ewh(prevValue.dwh_1.lp3(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.qwh_1, this.rwh_1, this.swh_1, completion);
    i.twh_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(onActiveLearningSpace(di)).f58();
      // 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.d58(tmp$ret$0, null);
    } else {
      tmp = contentEntryGetMetaDataFromUriUseCase;
    }
    contentEntryGetMetaDataFromUriUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryGetMetadata');
    this.awh_1 = contentEntryGetMetaDataFromUriUseCase;
    this.bwh_1 = MutableStateFlow(new ContentEntryGetMetadataUiState());
    this.cwh_1 = asStateFlow(this.bwh_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.oqn();
    launch(tmp_3, VOID, VOID, ContentEntryGetMetadataViewModel$slambda_0(this, uriArg, fileName, null));
  }
  function ContentEntryGetMetadataUiState(status) {
    status = status === VOID ? new ContentEntryGetMetadataStatus() : status;
    this.dwh_1 = status;
  }
  protoOf(ContentEntryGetMetadataUiState).ewh = function (status) {
    return new ContentEntryGetMetadataUiState(status);
  };
  protoOf(ContentEntryGetMetadataUiState).toString = function () {
    return 'ContentEntryGetMetadataUiState(status=' + this.dwh_1 + ')';
  };
  protoOf(ContentEntryGetMetadataUiState).hashCode = function () {
    return this.dwh_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.dwh_1.equals(tmp0_other_with_cast.dwh_1))
      return false;
    return true;
  };
  function _get_getSubtitleTrackUseCase__ux9onr($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.uwi_1;
    getSubtitleTrackUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_150() {
    this.vwi_1 = 'GetSubtitle';
  }
  var Companion_instance_199;
  function Companion_getInstance_167() {
    return Companion_instance_199;
  }
  function GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.ewj_1 = this$0;
    this.fwj_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.ewj_1);
            var tmp_1 = Companion_getInstance_3();
            var tmp_2 = tmp_1.o2r(require_0(this.fwj_1, 'uri'));
            suspendResult = tmp_0.rp3(tmp_2, require_0(this.fwj_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_125();
            this_0.s('entityState', this.ewj_1.m4r().r45(Companion_instance_80.n4r(), subtitleTrack));
            Companion_getInstance_125();
            this.ewj_1.kqo(this_0, 'result_viewname');
            Companion_getInstance_125();
            this.ewj_1.kqo(this_0, 'result_key');
            this.ewj_1.zqm_1.iq9('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.ewj_1.swi_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.iwj(this.ewj_1.xqn().joj(strings_getInstance().qmi_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.ewj_1, this.fwj_1, completion);
    i.gwj_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.swi_1 = MutableStateFlow(new GetSubtitleUiState());
    this.twi_1 = asStateFlow(this.swi_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.nqn().ioa();
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(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.uwi_1 = Instance(this_0, tmp$ret$3, null).a5d(this, getSubtitleTrackUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.getsubtitle.GetSubtitleViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().nnc_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.oqn();
    launch(tmp_3, VOID, VOID, GetSubtitleViewModel$slambda_0(this, savedStateHandle, null));
  }
  function GetSubtitleUiState(error) {
    error = error === VOID ? null : error;
    this.hwj_1 = error;
  }
  protoOf(GetSubtitleUiState).iwj = function (error) {
    return new GetSubtitleUiState(error);
  };
  protoOf(GetSubtitleUiState).toString = function () {
    return 'GetSubtitleUiState(error=' + this.hwj_1 + ')';
  };
  protoOf(GetSubtitleUiState).hashCode = function () {
    return this.hwj_1 == null ? 0 : getStringHashCode(this.hwj_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.hwj_1 == tmp0_other_with_cast.hwj_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_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gwk_1;
    httpClient$factory_4();
    return this_0.t2();
  }
  function Companion_151() {
    this.jwk_1 = 'ContentEntryImportLink';
    this.kwk_1 = 'importUrl';
  }
  var Companion_instance_200;
  function Companion_getInstance_168() {
    return Companion_instance_200;
  }
  function ContentEntryImportLinkViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.lwk();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation) {
    this.uwk_1 = this$0;
    this.vwk_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.uwk_1.xqm_1.aqj('importUrl', this.vwk_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.uwk_1, this.vwk_1, completion);
    i.wwk_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.fwl_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.jwl_1 = _get_httpClient__2ty1zc_1(this.fwl_1);
            var tmp_1 = this;
            tmp_1.kwl_1 = this.jwl_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.fwl_1.nqn().ioa().tnt_1 + 'api/import/validateLink');
            parameter(this_0, 'url', this.fwl_1.ewk_1.t2().qwl_1);
            set_expectSuccess(this_0, false);
            tmp_2.lwl_1 = this_0;
            this.lwl_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_3 = this;
            tmp_3.mwl_1 = this.kwl_1;
            var tmp_4 = this;
            tmp_4.nwl_1 = this.lwl_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.nwl_1, this.mwl_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.owl_1 = suspendResult;
            if (!this.owl_1.j3b().equals(Companion_getInstance_0().f2y_1)) {
              l$ret$1: do {
                var this_1 = this.fwl_1.ewk_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.twl(VOID, this.fwl_1.xqn().joj(strings_getInstance().xmt_1), true);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.iwl_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.pwl_1 = this.fwl_1.m4r();
            this.hd_1 = 5;
            suspendResult = bodyAsText(this.owl_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var string = suspendResult;
            var this_2 = this.pwl_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(MetadataResult), arrayOf([]), false));
            var metadataResult = this.pwl_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            var tmp_6 = this;
            var tmp_7;
            if (this.fwl_1.iwk_1 === 'ContentEntryEdit') {
              var this_4 = LinkedHashMap_init_$Create$();
              this_4.s('metadata', this.fwl_1.m4r().r45(Companion_instance_81.n4r(), metadataResult));
              this.fwl_1.kqo(this_4, 'courseBlock');
              this.fwl_1.kqo(this_4, 'goToOnContentEntryDone');
              Companion_getInstance_116();
              this.fwl_1.kqo(this_4, 'result_viewname');
              Companion_getInstance_116();
              this.fwl_1.kqo(this_4, 'result_key');
              Companion_getInstance_125();
              this.fwl_1.kqo(this_4, 'parentUid');
              Companion_getInstance_125();
              this_4.s('popUpToOnFinish', 'ContentEntryImportLink');
              this.fwl_1.zqm_1.kp6('ContentEntryEdit', this_4.f3());
              tmp_7 = Unit_instance;
            } else {
              this.fwl_1.iqt(metadataResult);
              tmp_7 = Unit_instance;
            }

            tmp_6.hwl_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.fwl_1.ewk_1;
              while (true) {
                var prevValue_0 = this_5.t2();
                var nextValue_0 = prevValue_0.twl(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.fwl_1.vqn().yq6(new Snack(this.fwl_1.xqn().joj(strings_getInstance().qmi_1) + (': ' + e)));
              tmp_9.hwl_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.fwl_1.ewk_1;
              while (true) {
                var prevValue_1 = this_6.t2();
                var nextValue_1 = prevValue_1.twl(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.fwl_1.ewk_1;
              while (true) {
                var prevValue_2 = this_7.t2();
                var nextValue_2 = prevValue_2.twl(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.fwl_1, completion);
    i.gwl_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.ewk_1 = MutableStateFlow(new ContentEntryImportLinkUiState());
    this.fwk_1 = asStateFlow(this.ewk_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.gwk_1 = Instance(this, tmp$ret$0, null).a5d(this, httpClient$factory_3());
    this.hwk_1 = null;
    var tmp_1 = this;
    Companion_getInstance_125();
    tmp_1.iwk_1 = savedStateHandle.ba('next');
    var tmp_2 = this.xqn().joj(strings_getInstance().lmt_1);
    var tmp_3 = this.xqn().joj(strings_getInstance().vmj_1);
    this.bqn_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.ewk_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.twl(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(ContentEntryImportLinkViewModel).uwl = function (url) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ewk_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onChangeLink.<anonymous>' call
        var nextValue = prevValue.twl(url, !(url === prevValue.qwl_1) ? null : prevValue.rwl_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.hwk_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.hwk_1 = launch(tmp_0, VOID, VOID, ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this, url, null));
  };
  protoOf(ContentEntryImportLinkViewModel).lwk = function () {
    if (!this.ewk_1.t2().swl_1) {
      return Unit_instance;
    }
    if (isBlank(this.ewk_1.t2().qwl_1)) {
      Napier_getInstance().i5e('link is blank');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.ewk_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.twl(VOID, this.xqn().joj(strings_getInstance().vmn_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.ewk_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.twl(VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.hwk_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    this.xqm_1.aqj('importUrl', this.ewk_1.t2().qwl_1);
    var tmp = this.oqn();
    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.qwl_1 = url;
    this.rwl_1 = linkError;
    this.swl_1 = fieldsEnabled;
  }
  protoOf(ContentEntryImportLinkUiState).vwl = function (url, linkError, fieldsEnabled) {
    return new ContentEntryImportLinkUiState(url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).twl = function (url, linkError, fieldsEnabled, $super) {
    url = url === VOID ? this.qwl_1 : url;
    linkError = linkError === VOID ? this.rwl_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.swl_1 : fieldsEnabled;
    return $super === VOID ? this.vwl(url, linkError, fieldsEnabled) : $super.vwl.call(this, url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).toString = function () {
    return 'ContentEntryImportLinkUiState(url=' + this.qwl_1 + ', linkError=' + this.rwl_1 + ', fieldsEnabled=' + this.swl_1 + ')';
  };
  protoOf(ContentEntryImportLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.qwl_1);
    result = imul(result, 31) + (this.rwl_1 == null ? 0 : getStringHashCode(this.rwl_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.swl_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.qwl_1 === tmp0_other_with_cast.qwl_1))
      return false;
    if (!(this.rwl_1 == tmp0_other_with_cast.rwl_1))
      return false;
    if (!(this.swl_1 === tmp0_other_with_cast.swl_1))
      return false;
    return true;
  };
  function httpClient$factory_3() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(receiver);
    }, null);
  }
  function httpClient$factory_4() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(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).pav_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).caw_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.wwl_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function ContentEntryListItemUiState(contentEntry) {
    this.wwl_1 = contentEntry;
  }
  protoOf(ContentEntryListItemUiState).toString = function () {
    return ContentEntryListItemUiState__toString_impl_2mjydu(this.wwl_1);
  };
  protoOf(ContentEntryListItemUiState).hashCode = function () {
    return ContentEntryListItemUiState__hashCode_impl_odpv6p(this.wwl_1);
  };
  protoOf(ContentEntryListItemUiState).equals = function (other) {
    return ContentEntryListItemUiState__equals_impl_d3bksl(this.wwl_1, other);
  };
  function get_listItemUiState_0(_this__u8e3s4) {
    return _ContentEntryListItemUiState___init__impl__r5o9qy(_this__u8e3s4);
  }
  function ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.fwm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).iqf = function (hasNewContentPermission, $completion) {
    var tmp = this.jqf(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.iqf((!(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.fwm_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (!(prevValue.wwm_1 === this.gwm_1)) {
                tmp_0 = prevValue.ywm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.gwm_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.fwm_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.jq6(prevValue_0.uq5_1.pq6(this.gwm_1 ? !this.fwm_1.ewo_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).jqf = function (hasNewContentPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this.fwm_1, completion);
    i.gwm_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.iqf(hasNewContentPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation) {
    this.pwo_1 = this$0;
    this.qwo_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.pwo_1.awo_1) {
              this.hd_1 = 2;
              var tmp_0 = ContentEntryListViewModel$slambda$slambda$slambda_0(this.pwo_1, null);
              suspendResult = this.qwo_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(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).l78 = function (completion) {
    return new ContentEntryListViewModel$slambda$slambda(this.pwo_1, this.qwo_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.zwo_1 = $savedStateHandle;
    this.awp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_1).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.bwp_1.uq9_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.cwp_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_safe_receiver = this.zwo_1.ba('entriesToMove');
            var tmp_4;
            if (tmp1_safe_receiver == null) {
              tmp_4 = null;
            } else {
              tmp_4 = this.awp_1.m4r().s45(ListSerializer(Companion_instance_203.n4r()), 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.dwp_1 = tmp_5;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_moveContentEntriesUseCase__fb3hfi(this.awp_1).xp9(this.cwp_1, toSet(this.dwp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.awp_1.vqn().yq6(new Snack(this.awp_1.xqn().koj(strings_getInstance().rn9_1, [this.dwp_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().m5e('Could not move entries', e);
              var tmp_7 = this.awp_1.vqn();
              var tmp3_elvis_lhs = e.message;
              tmp_7.yq6(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.awp_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).oqa = function (result, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_1(this.zwo_1, this.awp_1, completion);
    i.bwp_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.nqa(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).owp = function (uiState, hasPermission, $completion) {
    var tmp = this.pwp(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.owp(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.mwp_1, this.nwp_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).pwp = function (uiState, hasPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(completion);
    i.mwp_1 = uiState;
    i.nwp_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.owp(uiState, hasPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.ywp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_5).awq = function (it, $completion) {
    var tmp = this.bwq(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.awq(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.zwp_1.w6_1.twm_1.c1()) {
            tmp_0 = this.zwp_1.x6_1;
          } else {
            tmp_0 = false;
          }
          var showMoveIcon = tmp_0;
          if (!(showMoveIcon === !this.ywp_1.bqn_1.t2().fq6_1.c1())) {
            l$ret$1: do {
              var this_0 = this.ywp_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (showMoveIcon) {
                  var tmp_2 = AppStateIcon_MOVE_getInstance();
                  var tmp_3 = this.ywp_1.xqn().joj(strings_getInstance().fmn_1);
                  var tmp_4 = new AppActionButton(tmp_2, tmp_3, ContentEntryListViewModel$onClickMoveAction$ref(this.ywp_1), 'action_move');
                  var tmp_5 = AppStateIcon_DELETE_getInstance();
                  var tmp_6 = this.ywp_1.xqn().joj(strings_getInstance().kmj_1);
                  tmp_1 = listOf([tmp_4, new AppActionButton(tmp_5, tmp_6, ContentEntryListViewModel$onClickDeleteAction$ref(this.ywp_1), 'action_delete')]);
                } else {
                  tmp_1 = emptyList();
                }
                var nextValue = prevValue.jq6(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).bwq = function (it, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this.ywp_1, completion);
    i.zwp_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.awq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_moveContentEntriesUseCase__fb3hfi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fwo_1;
    moveContentEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deleteEntriesUseCase__hkwqc9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gwo_1;
    deleteEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function setSelectedItems($this, selectedEntries) {
    $this.xqm_1.aqj('selectedEntries', $this.m4r().r45(ListSerializer(Companion_instance_203.n4r()), toList(selectedEntries)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var nextValue = prevValue.ywm(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.sqv_1.t2().twm_1.u();
    var hasSelectedItems = numItemsSelected > 0;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = $this.bqn_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.xqn().cwq(plurals_getInstance().tns_1, numItemsSelected);
        } else {
          tmp = $this.dwo_1;
        }
        var tmp1_title = tmp;
        var tmp_0;
        if (hasSelectedItems) {
          var tmp_1 = AppStateIcon_CLOSE_getInstance();
          var tmp_2 = $this.xqn().joj(strings_getInstance().znm_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.jq6(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.xqm_1.aqj('entriesToMove', $this.m4r().r45(ListSerializer(Companion_instance_203.n4r()), toList(entries)));
    var tmp = Companion_instance_28.n4r();
    $this.fqo('PickContentEntry', 'moveToDestinationResult', null, tmp, mapOf([to('listMode', ListViewMode_PICKER_getInstance().wqj_1), to('selectFolder', 'true')]));
  }
  function onClickMoveAction($this) {
    selectDestinationToMoveEntries($this, $this.sqv_1.t2().twm_1);
  }
  function launchDeleteEntries($this, entries) {
    var tmp = $this.oqn();
    launch(tmp, VOID, VOID, ContentEntryListViewModel$launchDeleteEntries$slambda_0($this, entries, null));
  }
  function onClickDeleteAction($this) {
    launchDeleteEntries($this, $this.sqv_1.t2().twm_1);
  }
  function Companion_152() {
    Companion_instance_201 = this;
    this.dwq_1 = 'ContentEntries';
    this.ewq_1 = 'ContentEntryListHome';
    this.fwq_1 = 'PickContentEntry';
    this.gwq_1 = listOf(['ContentEntries', 'ContentEntryListHome', 'PickContentEntry']);
    this.hwq_1 = 'filter';
    this.iwq_1 = 1;
    this.jwq_1 = 2;
    this.kwq_1 = 3;
    this.lwq_1 = 4;
    this.mwq_1 = new Long(1, 0);
    this.nwq_1 = 'chipId';
    this.owq_1 = 'moveToDestinationResult';
    this.pwq_1 = 'selectFolder';
    this.qwq_1 = 'selectedEntries';
    this.rwq_1 = 'entriesToMove';
  }
  var Companion_instance_201;
  function Companion_getInstance_169() {
    if (Companion_instance_201 == null)
      new Companion_152();
    return Companion_instance_201;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_26(function_0) {
    this.swq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_26).t1d = function (value, $completion) {
    return this.swq_1(value, $completion);
  };
  function createContextMenuItemsForEntry$entriesToAction(this$0, rightClickedItem) {
    var selectedEntries = this$0.sqv_1.t2().twm_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.sqv_1.t2().jwm_1) {
        case 2:
          tmp = this$0.tqn().v7d().xau(this$0.pqn());
          break;
        case 3:
          tmp = this$0.tqn().v7d().wau(this$0.pqn());
          break;
        case 4:
          tmp = this$0.tqn().v7d().vau(this$0.pqn(), this$0.zwn_1, new Long(0, 0), new Long(0, 0), this$0.sqv_1.t2().owm_1.qqc_1, false);
          break;
        case 1:
          tmp = this$0.tqn().v7d().vau(this$0.pqn(), this$0.zwn_1, new Long(0, 0), new Long(0, 0), this$0.sqv_1.t2().owm_1.qqc_1, false);
          break;
        default:
          tmp = new EmptyPagingSource();
          break;
      }
      return tmp;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$ref($boundThis) {
    var l = function (p0) {
      return $boundThis.twq(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.sqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ywm(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.cwr_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.cwr_1.yqn() == null) ? !this.cwr_1.bwo_1 : false) {
              this.ewr_1 = this.cwr_1.xqn().joj(strings_getInstance().ine_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              if (this.cwr_1.zwn_1.equals(new Long(1, 0))) {
                this.ewr_1 = this.cwr_1.xqn().joj(strings_getInstance().vni_1);
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.cwr_1.tqn().v7d().uau(this.cwr_1.zwn_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp0_elvis_lhs = suspendResult;
            this.ewr_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.ewr_1;
            this.cwr_1.dwo_1 = ARGUMENT;
            l$ret$1: do {
              var this_0 = this.cwr_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jq6(VOID, VOID, this.cwr_1.dwo_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.cwr_1, completion);
    i.dwr_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.nwr_1 = this$0;
    this.owr_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.nwr_1.sqv_1, ContentEntryListViewModel$slambda$slambda_0(this.nwr_1, this.owr_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.nwr_1, this.owr_1, completion);
    i.pwr_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.ywr_1 = this$0;
    this.zwr_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.ywr_1.bqo(this.ywr_1.wqn(), 'moveToDestinationResult');
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_2(this.zwr_1, this.ywr_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryListViewModel$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_3(this.ywr_1, this.zwr_1, completion);
    i.aws_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.jws_1 = this$0;
    this.kws_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.jws_1.sqv_1, this.kws_1, ContentEntryListViewModel$slambda$slambda_4(null));
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_6(this.jws_1, null);
            suspendResult = tmp_0.a1c(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(ContentEntryListViewModel$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_5(this.jws_1, this.kws_1, completion);
    i.lws_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.uws_1 = this$0;
    this.vws_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.uws_1).cp3(this.vws_1, this.uws_1.pqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            setSelectedItems(this.uws_1, emptySet());
            this.uws_1.vqn().yq6(new Snack(this.uws_1.xqn().cwq(plurals_getInstance().uns_1, this.vws_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.uws_1, this.vws_1, completion);
    i.wws_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_169();
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryListUiState(), destName);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.zwn_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.awo_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.bwo_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    tmp_3.cwo_1 = ContentEntryListViewModel$pagingSourceFactory$lambda(this);
    this.dwo_1 = '';
    this.ewo_1 = this.bwo_1 ? this.xqv().equals(ListViewMode_PICKER_getInstance()) : false;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.fwo_1 = Instance(this_0, tmp$ret$0, null).a5d(this, moveContentEntriesUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(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.gwo_1 = Instance(this_1, tmp$ret$2, null).a5d(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.m4r().s45(ListSerializer(Companion_instance_203.n4r()), 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.sqv_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp0_contentEntryList = this.cwo_1;
        var tmp1_showSelectFolderButton = this.ewo_1;
        var tmp2_contextMenuItems = ContentEntryListViewModel$createContextMenuItemsForEntry$ref(this);
        var nextValue = prevValue.ywm(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.bqn_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp_9 = this.xqn().joj(strings_getInstance().in4_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var nextValue_0 = prevValue_0.jq6(new FabUiState(false, tmp_9, tmp_10, ContentEntryListViewModel$lambda(this)), VOID, VOID, VOID, this.xqv().equals(ListViewMode_PICKER_getInstance()));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    if (this.awo_1 ? this.zwn_1.equals(new Long(1, 0)) : false) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.sqv_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().wnd_1, 2), new MessageIdOption2(strings_getInstance().tnk_1, 3), new MessageIdOption2(strings_getInstance().vni_1, 4)]);
          var nextValue_1 = prevValue_1.ywm(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.tqn().p7f();
    var tmp_12 = this.nqn().goa().vky_1;
    PermissionFlags_getInstance();
    var hasPermissionFlow = shareIn(tmp_11.ui0(tmp_12, new Long(65536, 0)), this.oqn(), Companion_getInstance_12().v1h());
    var tmp_13 = this.oqn();
    launch(tmp_13, VOID, VOID, ContentEntryListViewModel$slambda_0(this, null));
    var tmp_14 = this.oqn();
    launch(tmp_14, VOID, VOID, ContentEntryListViewModel$slambda_2(this, hasPermissionFlow, null));
    var tmp_15 = this.oqn();
    launch(tmp_15, VOID, VOID, ContentEntryListViewModel$slambda_4(this, savedStateHandle, null));
    var tmp_16 = this.oqn();
    launch(tmp_16, VOID, VOID, ContentEntryListViewModel$slambda_6(this, hasPermissionFlow, null));
  }
  protoOf(ContentEntryListViewModel).twq = function (entry) {
    var uiStateVal = this.sqv_1.t2();
    var tmp;
    if (uiStateVal.wwm_1 ? this.xqv().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var rightClickedItem = asSelectedItem(entry);
      if (!uiStateVal.twm_1.a1(rightClickedItem)) {
        setSelectedItems(this, emptySet());
      }
      var tmp_0 = this.xqn().joj(strings_getInstance().dnn_1);
      var tmp_1 = new UstadContextMenuItem(tmp_0, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this, rightClickedItem));
      var tmp_2 = this.xqn().joj(strings_getInstance().kmj_1);
      tmp = listOf([tmp_1, new UstadContextMenuItem(tmp_2, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this, rightClickedItem))]);
    } else {
      tmp = emptyList();
    }
    return tmp;
  };
  protoOf(ContentEntryListViewModel).mqw = function (searchText) {
  };
  protoOf(ContentEntryListViewModel).nqw = function () {
  };
  protoOf(ContentEntryListViewModel).evb = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.ywm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).xws = function () {
    this.evb();
    // 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_125();
    this_0.s('parentUid', this.zwn_1.toString());
    var tmp$ret$2 = this_0.f3();
    this.fqx('ContentEntryEdit', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).yws = function () {
    this.evb();
    // 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_125();
    this_0.s('parentUid', this.zwn_1.toString());
    Companion_getInstance_125();
    this_0.s('next', 'ContentEntryEdit');
    this.lqo(this_0, Companion_getInstance_174().cwg_1);
    var tmp$ret$2 = this_0.f3();
    this.fqx('ContentEntryImportLink', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).zws = function (fileUri, fileName) {
    this.evb();
    // 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_125();
    this_0.s('parentUid', this.zwn_1.toString());
    this.lqo(this_0, Companion_getInstance_174().cwg_1);
    var tmp$ret$2 = this_0.f3();
    this.fqx('ContentEntryGetMetadata', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).awt = function (entry) {
    if (entry == null)
      return Unit_instance;
    var tmp0_safe_receiver = this.xqm_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.caw_1 ? this.ewo_1 : false)
      return Unit_instance;
    else {
      var tmp;
      if (this.xqv().equals(ListViewMode_PICKER_getInstance()) ? entry.caw_1 : false) {
        tmp = goToOnContentEntryEdit === 1;
      } else {
        tmp = false;
      }
      if (tmp) {
        Companion_getInstance_174();
        var tmp2_nextViewName = 'CourseBlockEdit';
        var tmp3_key = 'courseblock';
        var tmp4_serializer = Companion_getInstance_13().n4r();
        // 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.lqo(this_0, Companion_getInstance_174().cwg_1);
        Companion_getInstance_174();
        this_0.s('SelectedContentEntry', this.m4r().r45(Companion_instance_41.n4r(), new ContentEntryAndContentJob(entry)));
        var tmp5_args = this_0.f3();
        this.fqo(tmp2_nextViewName, tmp3_key, null, tmp4_serializer, tmp5_args, VOID, false);
      } else {
        if (entry.caw_1) {
          Companion_getInstance_160();
          Companion_getInstance_116();
          var tmp_0 = to('entityUid', entry.nav_1.toString());
          Companion_getInstance_125();
          this.zqm_1.kp6('ContentEntry', mapOf([tmp_0, to('parentUid', this.zwn_1.toString())]));
        } else {
          var tmp_1;
          if (this.yqm_1 === 'ContentEntryListHome') {
            tmp_1 = 'ContentEntries';
          } else {
            tmp_1 = this.yqm_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_125();
          this_1.s('parentUid', entry.nav_1.toString());
          Companion_getInstance_116();
          this.kqo(this_1, 'result_key');
          Companion_getInstance_116();
          this.kqo(this_1, 'result_viewname');
          this.kqo(this_1, 'selectFolder');
          this.kqo(this_1, 'goToOnContentEntryDone');
          var tmp$ret$5 = this_1.f3();
          this.zqm_1.kp6(tmp_2, tmp$ret$5);
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).bwt = 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.nav_1 = this.zwn_1;
    this.iqt(this_0);
  };
  protoOf(ContentEntryListViewModel).cwt = function (entry, selected) {
    var currentSelection = this.sqv_1.t2().twm_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.qay_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nav_1;
        if (!element.zp2_1.equals(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    }
    setSelectedItems(this, tmp);
  };
  protoOf(ContentEntryListViewModel).lsz = function (filterOption) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.sqv_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().jwm_1 === filterOption.mq7_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.ywm(VOID, VOID, filterOption.mq7_1);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    this.xqm_1.aqj('chipId', filterOption.mq7_1.toString());
    this.uqv_1.i1h(new RefreshCommand());
  };
  function Companion_153() {
    Companion_instance_202 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().xmm_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().xmm_1;
    tmp.dwt_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_202;
  function Companion_getInstance_170() {
    if (Companion_instance_202 == null)
      new Companion_153();
    return Companion_instance_202;
  }
  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_170();
    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_170().dwt_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.hwm_1 = filterMode;
    this.iwm_1 = contentEntryList;
    this.jwm_1 = selectedChipId;
    this.kwm_1 = filterOptions;
    this.lwm_1 = showHiddenEntries;
    this.mwm_1 = onlyFolderFilter;
    this.nwm_1 = sortOptions;
    this.owm_1 = activeSortOption;
    this.pwm_1 = createNewFolderItemVisible;
    this.qwm_1 = importFromLinkItemVisible;
    this.rwm_1 = importFromFileItemVisible;
    this.swm_1 = createNewOptionsVisible;
    this.twm_1 = selectedEntries;
    this.uwm_1 = showSelectFolderButton;
    this.vwm_1 = contextMenuItems;
    this.wwm_1 = hasWritePermission;
    var tmp_2 = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.twm_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.zp2_1;
      destination.i1(tmp$ret$1);
    }
    tmp_2.xwm_1 = toSet(destination);
  }
  protoOf(ContentEntryListUiState).ewt = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.kwm_1.c1();
  };
  protoOf(ContentEntryListUiState).fwt = 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).ywm = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission, $super) {
    filterMode = filterMode === VOID ? this.hwm_1 : filterMode;
    contentEntryList = contentEntryList === VOID ? this.iwm_1 : contentEntryList;
    selectedChipId = selectedChipId === VOID ? this.jwm_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.kwm_1 : filterOptions;
    showHiddenEntries = showHiddenEntries === VOID ? this.lwm_1 : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? this.mwm_1 : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? this.nwm_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? this.owm_1 : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? this.pwm_1 : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? this.qwm_1 : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? this.rwm_1 : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.swm_1 : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? this.twm_1 : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? this.uwm_1 : showSelectFolderButton;
    contextMenuItems = contextMenuItems === VOID ? this.vwm_1 : contextMenuItems;
    hasWritePermission = hasWritePermission === VOID ? this.wwm_1 : hasWritePermission;
    return $super === VOID ? this.fwt(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) : $super.fwt.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.hwm_1 + ', contentEntryList=' + this.iwm_1 + ', selectedChipId=' + this.jwm_1 + ', filterOptions=' + this.kwm_1 + ', showHiddenEntries=' + this.lwm_1 + ', onlyFolderFilter=' + this.mwm_1 + ', sortOptions=' + this.nwm_1 + ', activeSortOption=' + this.owm_1 + ', createNewFolderItemVisible=' + this.pwm_1 + ', importFromLinkItemVisible=' + this.qwm_1 + ', importFromFileItemVisible=' + this.rwm_1 + ', createNewOptionsVisible=' + this.swm_1 + ', selectedEntries=' + this.twm_1 + ', showSelectFolderButton=' + this.uwm_1 + ', contextMenuItems=' + this.vwm_1 + ', hasWritePermission=' + this.wwm_1 + ')';
  };
  protoOf(ContentEntryListUiState).hashCode = function () {
    var result = this.hwm_1;
    result = imul(result, 31) + hashCode(this.iwm_1) | 0;
    result = imul(result, 31) + this.jwm_1 | 0;
    result = imul(result, 31) + hashCode(this.kwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mwm_1) | 0;
    result = imul(result, 31) + hashCode(this.nwm_1) | 0;
    result = imul(result, 31) + this.owm_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.swm_1) | 0;
    result = imul(result, 31) + hashCode(this.twm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uwm_1) | 0;
    result = imul(result, 31) + hashCode(this.vwm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wwm_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.hwm_1 === tmp0_other_with_cast.hwm_1))
      return false;
    if (!equals(this.iwm_1, tmp0_other_with_cast.iwm_1))
      return false;
    if (!(this.jwm_1 === tmp0_other_with_cast.jwm_1))
      return false;
    if (!equals(this.kwm_1, tmp0_other_with_cast.kwm_1))
      return false;
    if (!(this.lwm_1 === tmp0_other_with_cast.lwm_1))
      return false;
    if (!(this.mwm_1 === tmp0_other_with_cast.mwm_1))
      return false;
    if (!equals(this.nwm_1, tmp0_other_with_cast.nwm_1))
      return false;
    if (!this.owm_1.equals(tmp0_other_with_cast.owm_1))
      return false;
    if (!(this.pwm_1 === tmp0_other_with_cast.pwm_1))
      return false;
    if (!(this.qwm_1 === tmp0_other_with_cast.qwm_1))
      return false;
    if (!(this.rwm_1 === tmp0_other_with_cast.rwm_1))
      return false;
    if (!(this.swm_1 === tmp0_other_with_cast.swm_1))
      return false;
    if (!equals(this.twm_1, tmp0_other_with_cast.twm_1))
      return false;
    if (!(this.uwm_1 === tmp0_other_with_cast.uwm_1))
      return false;
    if (!equals(this.vwm_1, tmp0_other_with_cast.vwm_1))
      return false;
    if (!(this.wwm_1 === tmp0_other_with_cast.wwm_1))
      return false;
    return true;
  };
  function Companion_154() {
  }
  protoOf(Companion_154).n4r = function () {
    return $serializer_getInstance_74();
  };
  var Companion_instance_203;
  function Companion_getInstance_171() {
    return Companion_instance_203;
  }
  function $serializer_62() {
    $serializer_instance_62 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListSelectedItem', this, 3);
    tmp0_serialDesc.t4f('contentEntryUid', false);
    tmp0_serialDesc.t4f('contentEntryParentChildJoinUid', false);
    tmp0_serialDesc.t4f('parentContentEntryUid', false);
    this.gwt_1 = tmp0_serialDesc;
  }
  protoOf($serializer_62).q44 = function () {
    return this.gwt_1;
  };
  protoOf($serializer_62).k4g = 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_62).s44 = function (decoder) {
    var tmp0_desc = this.gwt_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.i48(tmp0_desc);
    if (tmp7_input.x48()) {
      tmp4_local0 = tmp7_input.o48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.o48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.o48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.o48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.j48(tmp0_desc);
    return ContentEntryListSelectedItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_62).hwt = function (encoder, value) {
    var tmp0_desc = this.gwt_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    tmp1_output.s49(tmp0_desc, 0, value.zp2_1);
    tmp1_output.s49(tmp0_desc, 1, value.ap3_1);
    tmp1_output.s49(tmp0_desc, 2, value.bp3_1);
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_62).r44 = function (encoder, value) {
    return this.hwt(encoder, value instanceof ContentEntryListSelectedItem ? value : THROW_CCE());
  };
  var $serializer_instance_62;
  function $serializer_getInstance_74() {
    if ($serializer_instance_62 == null)
      new $serializer_62();
    return $serializer_instance_62;
  }
  function ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_74().gwt_1);
    }
    $this.zp2_1 = contentEntryUid;
    $this.ap3_1 = contentEntryParentChildJoinUid;
    $this.bp3_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.zp2_1 = contentEntryUid;
    this.ap3_1 = contentEntryParentChildJoinUid;
    this.bp3_1 = parentContentEntryUid;
  }
  protoOf(ContentEntryListSelectedItem).toString = function () {
    return 'ContentEntryListSelectedItem(contentEntryUid=' + this.zp2_1.toString() + ', contentEntryParentChildJoinUid=' + this.ap3_1.toString() + ', parentContentEntryUid=' + this.bp3_1.toString() + ')';
  };
  protoOf(ContentEntryListSelectedItem).hashCode = function () {
    var result = this.zp2_1.hashCode();
    result = imul(result, 31) + this.ap3_1.hashCode() | 0;
    result = imul(result, 31) + this.bp3_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.zp2_1.equals(tmp0_other_with_cast.zp2_1))
      return false;
    if (!this.ap3_1.equals(tmp0_other_with_cast.ap3_1))
      return false;
    if (!this.bp3_1.equals(tmp0_other_with_cast.bp3_1))
      return false;
    return true;
  };
  function asSelectedItem(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.qay_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nav_1;
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp2_safe_receiver = _this__u8e3s4.say_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xay_1;
    var tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.say_1;
    var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.uay_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).rwt = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.rwt(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).vny = function (db, completion) {
    var i = new SubtitleEditViewModel$slambda$slambda(completion);
    i.qwt_1 = db;
    return i;
  };
  function SubtitleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.rwt(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.awu_1 = $savedStateHandle;
    this.bwu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda_1).cwu = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.cwu($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.awu_1.ba('uri');
          var tmp2_uri = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
          var tmp1_elvis_lhs = this.awu_1.ba('filename');
          var tmp3_title = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
          var tmp4_langCode = _get_supportedLanguagesConfig__bd0744(this.bwu_1).gpm_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).l78 = function (completion) {
    return new SubtitleEditViewModel$slambda$slambda_1(this.awu_1, this.bwu_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.cwu($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.bwv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gwv(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.awv_1;
    supportedLanguagesConfig$factory_0();
    return this_0.t2();
  }
  function Companion_155() {
    this.hwv_1 = 'uri';
    this.iwv_1 = 'filename';
    this.jwv_1 = 'SubtitleEdit';
  }
  var Companion_instance_204;
  function Companion_getInstance_172() {
    return Companion_instance_204;
  }
  function SubtitleEditViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.kwv();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.twv_1 = this$0;
    this.uwv_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_80.n4r();
            var tmp_1 = SubtitleEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SubtitleEditViewModel$slambda$slambda_2(this.uwv_1, this.twv_1, null);
            suspendResult = this.twv_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, SubtitleEditViewModel$slambda$lambda(this.twv_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.twv_1.bwv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.gwv(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.twv_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.cq6_1.kq5(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.twv_1, this.uwv_1, completion);
    i.vwv_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.eww_1 = $commitDelay;
    this.fww_1 = $entity;
    this.gww_1 = $this;
    this.hww_1 = $key;
    this.iww_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.eww_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.fww_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.gww_1.dqo(this.gww_1.xqm_1, this.hww_1, this.iww_1, this.fww_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.eww_1, this.fww_1, this.gww_1, this.hww_1, this.iww_1, completion);
    i.jww_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.awv_1 = Instance(this, tmp$ret$0, null).a5d(this, supportedLanguagesConfig$factory());
    this.bwv_1 = MutableStateFlow(new SubtitleEditUiState());
    this.cwv_1 = asSharedFlow(this.bwv_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>' call
        var tmp_1 = this.xqn().joj(strings_getInstance().vnq_1);
        var tmp_2 = this.xqn().joj(strings_getInstance().tmr_1);
        var nextValue = prevValue.jq6(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.oqn();
    launch(tmp_3, VOID, VOID, SubtitleEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(SubtitleEditViewModel).kww = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bwv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.gwv(entity);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_80.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.eqt_1 = launch(tmp_0, VOID, VOID, SubtitleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SubtitleEditViewModel).kwv = function () {
    this.iqt(this.bwv_1.t2().dwv_1);
  };
  function SubtitleEditUiState(entity, titleError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    titleError = titleError === VOID ? null : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.dwv_1 = entity;
    this.ewv_1 = titleError;
    this.fwv_1 = fieldsEnabled;
  }
  protoOf(SubtitleEditUiState).lww = function (entity, titleError, fieldsEnabled) {
    return new SubtitleEditUiState(entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).gwv = function (entity, titleError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.dwv_1 : entity;
    titleError = titleError === VOID ? this.ewv_1 : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fwv_1 : fieldsEnabled;
    return $super === VOID ? this.lww(entity, titleError, fieldsEnabled) : $super.lww.call(this, entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).toString = function () {
    return 'SubtitleEditUiState(entity=' + this.dwv_1 + ', titleError=' + this.ewv_1 + ', fieldsEnabled=' + this.fwv_1 + ')';
  };
  protoOf(SubtitleEditUiState).hashCode = function () {
    var result = this.dwv_1 == null ? 0 : this.dwv_1.hashCode();
    result = imul(result, 31) + (this.ewv_1 == null ? 0 : getStringHashCode(this.ewv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fwv_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.dwv_1, tmp0_other_with_cast.dwv_1))
      return false;
    if (!(this.ewv_1 == tmp0_other_with_cast.ewv_1))
      return false;
    if (!(this.fwv_1 === tmp0_other_with_cast.fwv_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.mww_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_156() {
    Companion_instance_205 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.mww_1 = lazy(tmp_0, CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9);
  }
  protoOf(Companion_156).nkb = 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.qww_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_2(values_4()) : tmp0_elvis_lhs;
  };
  protoOf(Companion_156).n4r = function () {
    return _get_$cachedSerializer__te6jhj_2(this);
  };
  protoOf(Companion_156).v4g = function (typeParamsSerializers) {
    return this.n4r();
  };
  var Companion_instance_205;
  function Companion_getInstance_173() {
    CompletionCriteria_initEntries();
    if (Companion_instance_205 == null)
      new Companion_156();
    return Companion_instance_205;
  }
  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().jn6_1;
    CompletionCriteria_AUTOMATIC_instance = new CompletionCriteria('AUTOMATIC', 0, tmp, 0);
    var tmp_0 = strings_getInstance().in6_1;
    CompletionCriteria_MIN_SCORE_instance = new CompletionCriteria('MIN_SCORE', 1, tmp_0, 1);
    var tmp_1 = strings_getInstance().kn6_1;
    CompletionCriteria_STUDENT_SELF_MARKS_instance = new CompletionCriteria('STUDENT_SELF_MARKS', 2, tmp_1, 2);
    var tmp_2 = strings_getInstance().pn6_1;
    CompletionCriteria_ASSIGNMENT_SUBMITTED_instance = new CompletionCriteria('ASSIGNMENT_SUBMITTED', 3, tmp_2, 100);
    var tmp_3 = strings_getInstance().zng_1;
    CompletionCriteria_ASSIGNMENT_GRADED_instance = new CompletionCriteria('ASSIGNMENT_GRADED', 4, tmp_3, 102);
    Companion_getInstance_173();
  }
  function CompletionCriteria(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.pww_1 = stringResource;
    this.qww_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.zww_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.awx_1.uq9_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.zww_1.ywx_1.t2().ztz_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nk8_1;
          this.zww_1.awy(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hkm(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).oqa = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this.zww_1, completion);
    i.awx_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.jwy_1 = this$0;
    this.kwy_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.lwy_1.uq9_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.jwy_1.ywx_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.ztz_1;
              var nextValue = prevValue.ku0(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(VOID, VOID, contentEntryResult.ok7_1, VOID, contentEntryResult.qk7_1, contentEntryResult.pk7_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          this.kwy_1.aqj('SavedSelectedContentEntry', this.jwy_1.m4r().r45(Companion_instance_41.n4r(), 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).oqa = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this.jwy_1, this.kwy_1, completion);
    i.lwy_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda).su1 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.su1(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).vny = function (it, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda(completion);
    i.uwy_1 = it;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.su1(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    this.dwz_1 = this$0;
    this.ewz_1 = $savedStateHandle;
    this.fwz_1 = $selectedContentEntry;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).cu2 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.cu2($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.dwz_1.rqn());
            suspendResult = tmp_0.o62(124, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            var this_0 = new CourseBlock();
            this_0.t7x_1 = newUid;
            this_0.j7y_1 = true;
            var tmp_1 = this_0;
            var tmp0_safe_receiver = this.ewz_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.u7x_1 = tmp_2;
            var tmp_3 = this_0;
            var tmp2_safe_receiver = this.fwz_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ok7_1;
            tmp_3.x7x_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.oav_1;
            var tmp_4 = this_0;
            var tmp4_safe_receiver = this.fwz_1;
            var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.ok7_1;
            tmp_4.y7x_1 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.pav_1;
            if (!(this.fwz_1 == null)) {
              var tmp_5 = this_0;
              var tmp6_safe_receiver = this.fwz_1.ok7_1;
              var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.nav_1;
              tmp_5.l7y_1 = tmp7_elvis_lhs == null ? new Long(0, 0) : tmp7_elvis_lhs;
              var tmp_6 = this_0;
              tmp_6.u7x_1 = 104;
            }

            var tmp0_safe_receiver_0 = this.fwz_1;
            var tmp5_contentEntry = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ok7_1;
            var tmp3_safe_receiver_0 = this.fwz_1;
            var tmp6_contentJob = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.pk7_1;
            var tmp2_safe_receiver_0 = this.fwz_1;
            var tmp7_contentJobItem = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.qk7_1;
            var tmp8_courseBlockPicture = new CourseBlockPicture(newUid);
            var tmp1_safe_receiver = this.fwz_1;
            var tmp9_contentEntryPicture = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.rk7_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).l78 = function (completion) {
    return new CourseBlockEditViewModel$slambda$slambda_1(this.dwz_1, this.ewz_1, this.fwz_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.cu2($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.ywx_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.ku0(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseBlockEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.owz_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.owz_1.bqo(this.owz_1.wqn(), 'courseBlockDesc');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_0(this.owz_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_27(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.owz_1, completion);
    i.pwz_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.ywz_1 = this$0;
    this.zwz_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.ywz_1.bqo(this.ywz_1.wqn(), 'courseBlockEditContentEntry');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_2(this.ywz_1, this.zwz_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_27(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.ywz_1, this.zwz_1, completion);
    i.ax0_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_157() {
    Companion_instance_206 = this;
    this.wwf_1 = 'CourseBlockEdit';
    this.xwf_1 = 'SelectedContentEntry';
    this.ywf_1 = 'blockType';
    this.zwf_1 = 'courseBlockDesc';
    this.awg_1 = 'courseBlockEditContentEntry';
    this.bwg_1 = 'SavedSelectedContentEntry';
    var tmp = this;
    Companion_getInstance_125();
    Companion_getInstance_116();
    Companion_getInstance_116();
    tmp.cwg_1 = listOf(['blockType', 'clazzUid', 'goToOnContentEntryDone', 'blockType', 'result_viewname', 'result_key', 'listMode']);
  }
  var Companion_instance_206;
  function Companion_getInstance_174() {
    if (Companion_instance_206 == null)
      new Companion_157();
    return Companion_instance_206;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_27(function_0) {
    this.bx0_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_27).t1d = function (value, $completion) {
    return this.bx0_1(value, $completion);
  };
  function CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.kx0_1 = this$0;
    this.lx0_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.kx0_1.cqo(this.lx0_1, 'SelectedContentEntry', Companion_instance_41.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nx0_1 = suspendResult;
            this.ox0_1 = Companion_getInstance_13().n4r();
            this.hd_1 = 2;
            var tmp_0 = CourseBlockEditViewModel$slambda$slambda_0(null);
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda_2(this.kx0_1, this.lx0_1, this.nx0_1, null);
            suspendResult = this.kx0_1.hqo(this.ox0_1, VOID, VOID, tmp_0, tmp_1, CourseBlockEditViewModel$slambda$lambda(this.kx0_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.px0_1 = suspendResult;
            var tmp_2 = this;
            var tmp1_safe_receiver = this.px0_1;
            tmp_2.qx0_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.pk8_1;
            var tmp_3 = this;
            var tmp2_safe_receiver = this.px0_1;
            tmp_3.rx0_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
            if (!(this.qx0_1 == null) ? !(this.rx0_1 == null) : false) {
              Companion_getInstance_115();
              if (this.lx0_1.ba('entity') == null) {
                this.sx0_1 = false;
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4;
                var tmp_5 = this.qx0_1.jaw_1;
                if (tmp_5 === 2) {
                  tmp_4 = this.qx0_1.iaw_1.equals(this.rx0_1.t7x_1);
                } else {
                  tmp_4 = false;
                }
                if (tmp_4) {
                  var tmp_6 = this;
                  tmp_6.sx0_1 = true;
                  this.hd_1 = 4;
                  continue $sm;
                } else {
                  var tmp_7 = this.qx0_1.jaw_1;
                  if (tmp_7 === 2) {
                    this.hd_1 = 3;
                    var tmp_8 = this.kx0_1.tqn().o7f();
                    var tmp_9 = this.kx0_1.pqn();
                    var tmp_10 = this.qx0_1.iaw_1;
                    PermissionFlags_getInstance();
                    suspendResult = tmp_8.jdk(tmp_9, tmp_10, new Long(2, 0), this);
                    if (suspendResult === get_COROUTINE_SUSPENDED()) {
                      return suspendResult;
                    }
                    continue $sm;
                  } else {
                    this.sx0_1 = false;
                    this.hd_1 = 4;
                    continue $sm;
                  }
                }
              }
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 3:
            this.sx0_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var canEditContentEntry = this.sx0_1;
            l$ret$1: do {
              var this_0 = this.kx0_1.ywx_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ku0(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.kx0_1.ywx_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.ku0(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.kx0_1.bqn_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var tmp0_safe_receiver = this.rx0_1;
                var tmp1_subject = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u7x_1;
                var tmp_11;
                if (tmp1_subject === 100) {
                  tmp_11 = this.kx0_1.hqu(strings_getInstance().inj_1, strings_getInstance().tnh_1);
                } else {
                  if (tmp1_subject === 102) {
                    tmp_11 = this.kx0_1.hqu(strings_getInstance().hnh_1, strings_getInstance().hnj_1);
                  } else {
                    if (tmp1_subject === 105) {
                      tmp_11 = this.kx0_1.hqu(strings_getInstance().jnk_1, strings_getInstance().knk_1);
                    } else {
                      if (tmp1_subject === 104) {
                        tmp_11 = this.kx0_1.xqn().joj(strings_getInstance().yno_1);
                      } else {
                        tmp_11 = '';
                      }
                    }
                  }
                }
                var tmp_12 = tmp_11;
                var tmp_13 = this.kx0_1.xqn().joj(strings_getInstance().tmr_1);
                var nextValue_1 = prevValue_1.jq6(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_13, VOID, CourseBlockEditViewModel$onClickSave$ref(this.kx0_1)));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            launch(this.mx0_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_4(this.kx0_1, null));
            launch(this.mx0_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_6(this.kx0_1, this.lx0_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.kx0_1, this.lx0_1, completion);
    i.mx0_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.bx1_1 = $commitDelay;
    this.cx1_1 = $entity;
    this.dx1_1 = $this;
    this.ex1_1 = $key;
    this.fx1_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.bx1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.cx1_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.dx1_1.dqo(this.dx1_1.xqm_1, this.ex1_1, this.fx1_1, this.cx1_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.bx1_1, this.cx1_1, this.dx1_1, this.ex1_1, this.fx1_1, completion);
    i.gx1_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.px1_1 = $commitDelay;
    this.qx1_1 = $entity;
    this.rx1_1 = $this;
    this.sx1_1 = $key;
    this.tx1_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.px1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.qx1_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.rx1_1.dqo(this.rx1_1.xqm_1, this.sx1_1, this.tx1_1, this.qx1_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.px1_1, this.qx1_1, this.rx1_1, this.sx1_1, this.tx1_1, completion);
    i.ux1_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_174();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseBlockEdit');
    this.ywx_1 = MutableStateFlow(new CourseBlockEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_getInstance_9().xmh().ymg()));
    this.zwx_1 = asStateFlow(this.ywx_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, CourseBlockEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(CourseBlockEditViewModel).awy = 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.ywx_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.ztz_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zk8(courseBlock);
        var tmp1_safe_receiver = prevValue.ztz_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.nk8_1;
        var nextValue = prevValue.ku0(tmp, VOID, VOID, VOID, VOID, this.iqu(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.x7x_1, courseBlock.x7x_1, prevValue.eu0_1));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.ztz_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().n4r();
    Companion_getInstance_115();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.oqn();
    tmp_0.eqt_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onEntityChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).vx1 = function () {
    var tmp0_safe_receiver = this.ywx_1.t2().ztz_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xk8();
    var tmp_0 = Companion_instance_41.n4r();
    // 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.ywx_1.t2().ztz_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.m4r().r45(Companion_instance_14.n4r(), tmp0_safe_receiver_0.nk8_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.fqo('ContentEntryEdit', 'courseBlockEditContentEntry', tmp, tmp_0, tmp$ret$3);
  };
  protoOf(CourseBlockEditViewModel).au8 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.ywx_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.ztz_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.ztz_1.ok8_1;
          tmp = tmp1_safe_receiver.zk8(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lkm(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.ku0(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.ztz_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().n4r();
    Companion_getInstance_115();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.oqn();
    tmp_0.eqt_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onPictureChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).xs9 = function () {
    var tmp0_elvis_lhs = this.ywx_1.t2().ztz_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.nk8_1.x7x_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.ywx_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.ku0(VOID, VOID, VOID, VOID, VOID, this.xqn().joj(strings_getInstance().znl_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (this.ywx_1.t2().ou4())
      return Unit_instance;
    this.iqt(this.ywx_1.t2().ztz_1);
  };
  function Companion_158() {
    Companion_instance_207 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.wx1_1 = [null, null, new ArrayListSerializer(Companion_getInstance_173().n4r()), null, null, null, null, null, null, null, null];
  }
  var Companion_instance_207;
  function Companion_getInstance_175() {
    if (Companion_instance_207 == null)
      new Companion_158();
    return Companion_instance_207;
  }
  function $serializer_63() {
    $serializer_instance_63 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditUiState', this, 11);
    tmp0_serialDesc.t4f('block', true);
    tmp0_serialDesc.t4f('canEditSelectedContentEntry', true);
    tmp0_serialDesc.t4f('completionCriteriaOptions', true);
    tmp0_serialDesc.t4f('fieldsEnabled', true);
    tmp0_serialDesc.t4f('caHideUntilDateError', true);
    tmp0_serialDesc.t4f('caTitleError', true);
    tmp0_serialDesc.t4f('caDeadlineError', true);
    tmp0_serialDesc.t4f('caMaxPointsError', true);
    tmp0_serialDesc.t4f('maxPointsRequired', true);
    tmp0_serialDesc.t4f('caGracePeriodError', true);
    tmp0_serialDesc.t4f('timeZone', true);
    this.xx1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_63).q44 = function () {
    return this.xx1_1;
  };
  protoOf($serializer_63).k4g = function () {
    var tmp0_cached = Companion_getInstance_175().wx1_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_7()), 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_63).s44 = function (decoder) {
    var tmp0_desc = this.xx1_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.i48(tmp0_desc);
    var tmp16_cached = Companion_getInstance_175().wx1_1;
    if (tmp15_input.x48()) {
      tmp4_local0 = tmp15_input.w48(tmp0_desc, 0, $serializer_getInstance_7(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp15_input.k48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp15_input.u48(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp15_input.k48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp15_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp15_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp15_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp15_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp15_input.k48(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp15_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp15_input.s48(tmp0_desc, 10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp15_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp15_input.w48(tmp0_desc, 0, $serializer_getInstance_7(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp15_input.k48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp15_input.u48(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp15_input.k48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp15_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp15_input.w48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp15_input.w48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp15_input.w48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp15_input.k48(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp15_input.w48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp15_input.s48(tmp0_desc, 10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp15_input.j48(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_63).yx1 = function (encoder, value) {
    var tmp0_desc = this.xx1_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_175().wx1_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.ztz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 0, $serializer_getInstance_7(), value.ztz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.au0_1 === false)) {
      tmp1_output.o49(tmp0_desc, 1, value.au0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !equals(value.bu0_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 2, tmp2_cached[2], value.bu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.cu0_1 === false)) {
      tmp1_output.o49(tmp0_desc, 3, value.cu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.du0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.du0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 5) ? true : !(value.eu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 5, StringSerializer_getInstance(), value.eu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 6) ? true : !(value.fu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 6, StringSerializer_getInstance(), value.fu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 7) ? true : !(value.gu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 7, StringSerializer_getInstance(), value.gu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 8) ? true : !(value.hu0_1 === false)) {
      tmp1_output.o49(tmp0_desc, 8, value.hu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 9) ? true : !(value.iu0_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 9, StringSerializer_getInstance(), value.iu0_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 10) ? true : !(value.ju0_1 === 'UTC')) {
      tmp1_output.w49(tmp0_desc, 10, value.ju0_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_63).r44 = function (encoder, value) {
    return this.yx1(encoder, value instanceof CourseBlockEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_63;
  function $serializer_getInstance_75() {
    if ($serializer_instance_63 == null)
      new $serializer_63();
    return $serializer_instance_63;
  }
  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_75().xx1_1);
    }
    if (0 === (seen1 & 1))
      $this.ztz_1 = null;
    else
      $this.ztz_1 = block;
    if (0 === (seen1 & 2))
      $this.au0_1 = false;
    else
      $this.au0_1 = canEditSelectedContentEntry;
    if (0 === (seen1 & 4))
      $this.bu0_1 = emptyList();
    else
      $this.bu0_1 = completionCriteriaOptions;
    if (0 === (seen1 & 8))
      $this.cu0_1 = false;
    else
      $this.cu0_1 = fieldsEnabled;
    if (0 === (seen1 & 16))
      $this.du0_1 = null;
    else
      $this.du0_1 = caHideUntilDateError;
    if (0 === (seen1 & 32))
      $this.eu0_1 = null;
    else
      $this.eu0_1 = caTitleError;
    if (0 === (seen1 & 64))
      $this.fu0_1 = null;
    else
      $this.fu0_1 = caDeadlineError;
    if (0 === (seen1 & 128))
      $this.gu0_1 = null;
    else
      $this.gu0_1 = caMaxPointsError;
    if (0 === (seen1 & 256))
      $this.hu0_1 = false;
    else
      $this.hu0_1 = maxPointsRequired;
    if (0 === (seen1 & 512))
      $this.iu0_1 = null;
    else
      $this.iu0_1 = caGracePeriodError;
    if (0 === (seen1 & 1024))
      $this.ju0_1 = 'UTC';
    else
      $this.ju0_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_175();
    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.ztz_1 = block;
    this.au0_1 = canEditSelectedContentEntry;
    this.bu0_1 = completionCriteriaOptions;
    this.cu0_1 = fieldsEnabled;
    this.du0_1 = caHideUntilDateError;
    this.eu0_1 = caTitleError;
    this.fu0_1 = caDeadlineError;
    this.gu0_1 = caMaxPointsError;
    this.hu0_1 = maxPointsRequired;
    this.iu0_1 = caGracePeriodError;
    this.ju0_1 = timeZone;
  }
  protoOf(CourseBlockEditUiState).zx1 = function () {
    var tmp0_safe_receiver = this.ztz_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z7x_1;
    return tmp === 1;
  };
  protoOf(CourseBlockEditUiState).ax2 = function () {
    var tmp;
    if (this.bx2()) {
      var tmp0_safe_receiver = this.ztz_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.b7y_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).etw = function () {
    var tmp;
    if (this.ax2()) {
      var tmp0_safe_receiver = this.ztz_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d7y_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).cx2 = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.bu0_1.c1();
  };
  protoOf(CourseBlockEditUiState).bx2 = function () {
    var tmp;
    var tmp0_safe_receiver = this.ztz_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u7x_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.ztz_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u7x_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).dx2 = function () {
    var tmp;
    var tmp0_safe_receiver = this.ztz_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.nk8_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u7x_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.ztz_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.nk8_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.u7x_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).ou4 = function () {
    return ((!(this.eu0_1 == null) ? true : !(this.fu0_1 == null)) ? true : !(this.iu0_1 == null)) ? true : !(this.gu0_1 == null);
  };
  protoOf(CourseBlockEditUiState).ex2 = 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).ku0 = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, $super) {
    block = block === VOID ? this.ztz_1 : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? this.au0_1 : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? this.bu0_1 : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? this.cu0_1 : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? this.du0_1 : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? this.eu0_1 : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? this.fu0_1 : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? this.gu0_1 : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? this.hu0_1 : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? this.iu0_1 : caGracePeriodError;
    timeZone = timeZone === VOID ? this.ju0_1 : timeZone;
    return $super === VOID ? this.ex2(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) : $super.ex2.call(this, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).toString = function () {
    return 'CourseBlockEditUiState(block=' + this.ztz_1 + ', canEditSelectedContentEntry=' + this.au0_1 + ', completionCriteriaOptions=' + this.bu0_1 + ', fieldsEnabled=' + this.cu0_1 + ', caHideUntilDateError=' + this.du0_1 + ', caTitleError=' + this.eu0_1 + ', caDeadlineError=' + this.fu0_1 + ', caMaxPointsError=' + this.gu0_1 + ', maxPointsRequired=' + this.hu0_1 + ', caGracePeriodError=' + this.iu0_1 + ', timeZone=' + this.ju0_1 + ')';
  };
  protoOf(CourseBlockEditUiState).hashCode = function () {
    var result = this.ztz_1 == null ? 0 : this.ztz_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.au0_1) | 0;
    result = imul(result, 31) + hashCode(this.bu0_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cu0_1) | 0;
    result = imul(result, 31) + (this.du0_1 == null ? 0 : getStringHashCode(this.du0_1)) | 0;
    result = imul(result, 31) + (this.eu0_1 == null ? 0 : getStringHashCode(this.eu0_1)) | 0;
    result = imul(result, 31) + (this.fu0_1 == null ? 0 : getStringHashCode(this.fu0_1)) | 0;
    result = imul(result, 31) + (this.gu0_1 == null ? 0 : getStringHashCode(this.gu0_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hu0_1) | 0;
    result = imul(result, 31) + (this.iu0_1 == null ? 0 : getStringHashCode(this.iu0_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.ju0_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.ztz_1, tmp0_other_with_cast.ztz_1))
      return false;
    if (!(this.au0_1 === tmp0_other_with_cast.au0_1))
      return false;
    if (!equals(this.bu0_1, tmp0_other_with_cast.bu0_1))
      return false;
    if (!(this.cu0_1 === tmp0_other_with_cast.cu0_1))
      return false;
    if (!(this.du0_1 == tmp0_other_with_cast.du0_1))
      return false;
    if (!(this.eu0_1 == tmp0_other_with_cast.eu0_1))
      return false;
    if (!(this.fu0_1 == tmp0_other_with_cast.fu0_1))
      return false;
    if (!(this.gu0_1 == tmp0_other_with_cast.gu0_1))
      return false;
    if (!(this.hu0_1 === tmp0_other_with_cast.hu0_1))
      return false;
    if (!(this.iu0_1 == tmp0_other_with_cast.iu0_1))
      return false;
    if (!(this.ju0_1 === tmp0_other_with_cast.ju0_1))
      return false;
    return true;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.nx2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).px2 = function (it, $completion) {
    var tmp = this.qx2(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.px2((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.nx2_1.nx3_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.rx3(this.ox2_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).qx2 = function (it, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this.nx2_1, completion);
    i.ox2_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.px2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ax4_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.ax4_1.tqn().p7d().gcl(this.ax4_1.rqm_1);
            var tmp_1 = TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this.ax4_1, null);
            suspendResult = tmp_0.a1c(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(TextBlockDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this.ax4_1, completion);
    i.bx4_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.bqn_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.jq6(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.kx4_1 = $this_launch;
    this.lx4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.kx4_1, VOID, VOID, TextBlockDetailViewModel$slambda$slambda$slambda_0(this.lx4_1, null));
          launchSetTitleFromClazzUid(this.lx4_1, this.lx4_1.px3_1, TextBlockDetailViewModel$slambda$slambda$lambda(this.lx4_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).l78 = function (completion) {
    return new TextBlockDetailViewModel$slambda$slambda(this.kx4_1, this.lx4_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_159() {
    this.mx4_1 = 'CourseText';
  }
  var Companion_instance_208;
  function Companion_getInstance_176() {
    return Companion_instance_208;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_28(function_0) {
    this.nx4_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_28).t1d = function (value, $completion) {
    return this.nx4_1(value, $completion);
  };
  function TextBlockDetailViewModel$slambda(this$0, resultContinuation) {
    this.wx4_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.wx4_1.nx3_1, TextBlockDetailViewModel$slambda$slambda_0(this.xx4_1, this.wx4_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.wx4_1, completion);
    i.xx4_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.nx3_1 = MutableStateFlow(new TextBlockDetailUiState());
    this.ox3_1 = asStateFlow(this.nx3_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.px3_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, TextBlockDetailViewModel$slambda_0(this, null));
  }
  function TextBlockDetailUiState(courseBlock) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    this.qx3_1 = courseBlock;
  }
  protoOf(TextBlockDetailUiState).rx3 = function (courseBlock) {
    return new TextBlockDetailUiState(courseBlock);
  };
  protoOf(TextBlockDetailUiState).toString = function () {
    return 'TextBlockDetailUiState(courseBlock=' + this.qx3_1 + ')';
  };
  protoOf(TextBlockDetailUiState).hashCode = function () {
    return this.qx3_1 == null ? 0 : this.qx3_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.qx3_1, tmp0_other_with_cast.qx3_1))
      return false;
    return true;
  };
  function CourseGroupSetDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.xx5();
      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).ix6 = function (entity, permissionPair, $completion) {
    var tmp = this.jx6(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.ix6(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.gx6_1, this.hx6_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).jx6 = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.gx6_1 = entity;
    i.hx6_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.ix6(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.sx6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).ux6 = function (it, $completion) {
    var tmp = this.vx6(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.ux6(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.tx6_1.x6_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasManageStudentPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.sx6_1.ux5_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.tx6_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.yx6(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.sx6_1.bqn_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_1 = this.sx6_1.xqn().joj(strings_getInstance().tmv_1);
              var tmp_2 = FabIcon_EDIT_getInstance();
              var nextValue_0 = prevValue_0.jq6(new FabUiState(hasManageStudentPermission, tmp_1, tmp_2, CourseGroupSetDetailViewModel$onClickEdit$ref(this.sx6_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).vx6 = function (it, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this.sx6_1, completion);
    i.tx6_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.ux6(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).jx7 = function (entity, permissionPair, $completion) {
    var tmp = this.kx7(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.jx7(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.hx7_1;
          var tmp_0;
          if (this.ix7_1.hdn_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).kx7 = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(completion);
    i.hx7_1 = entity;
    i.ix7_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.jx7(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.tx7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).vx7 = function (courseGroupSet, $completion) {
    var tmp = this.wx7(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.vx7((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.tx7_1.ux5_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yx6(this.ux7_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.tx7_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver = this.ux7_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7z_1;
              var nextValue_0 = prevValue_0.jq6(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).wx7 = function (courseGroupSet, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this.tx7_1, completion);
    i.ux7_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.vx7(courseGroupSet, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    this.fx8_1 = $memberListFlow;
    this.gx8_1 = $permissionsFlow;
    this.hx8_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.fx8_1, this.gx8_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this.hx8_1, null);
            suspendResult = tmp_0.a1c(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(CourseGroupSetDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda(this.fx8_1, this.gx8_1, this.hx8_1, completion);
    i.ix8_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.rx8_1 = $entityFlow;
    this.sx8_1 = $permissionsFlow;
    this.tx8_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.rx8_1, this.sx8_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(null));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this.tx8_1, null);
            suspendResult = tmp_0.a1c(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(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1(this.rx8_1, this.sx8_1, this.tx8_1, completion);
    i.ux8_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.dx9_1 = $this_launch;
    this.ex9_1 = $memberListFlow;
    this.fx9_1 = $permissionsFlow;
    this.gx9_1 = this$0;
    this.hx9_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.dx9_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_0(this.ex9_1, this.fx9_1, this.gx9_1, null));
          launch(this.dx9_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_2(this.hx9_1, this.fx9_1, this.gx9_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).l78 = function (completion) {
    return new CourseGroupSetDetailViewModel$slambda$slambda(this.dx9_1, this.ex9_1, this.fx9_1, this.gx9_1, this.hx9_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_160() {
    this.ix9_1 = 'CourseGroupSet';
  }
  var Companion_instance_209;
  function Companion_getInstance_177() {
    return Companion_instance_209;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_29(function_0) {
    this.jx9_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_29).t1d = function (value, $completion) {
    return this.jx9_1(value, $completion);
  };
  function CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation) {
    this.sx9_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.sx9_1.tqn().o7f();
            var tmp_2 = this.sx9_1.pqn();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(1, 0);
            PermissionFlags_getInstance();
            tmp_0.ux9_1 = shareIn(tmp_1.gdk(tmp_2, this.sx9_1.wx5_1, tmp_3, new Long(8, 0)), this.sx9_1.oqn(), Companion_getInstance_12().v1h());
            this.vx9_1 = this.sx9_1.tqn().s7d().td3(this.sx9_1.rqm_1, this.sx9_1.wx5_1, systemTimeInMillis(), 0, this.sx9_1.pqn());
            this.wx9_1 = this.sx9_1.tqn().r7d().t8c(this.sx9_1.rqm_1);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.sx9_1.ux5_1, CourseGroupSetDetailViewModel$slambda$slambda_0(this.tx9_1, this.vx9_1, this.ux9_1, this.sx9_1, this.wx9_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.sx9_1, completion);
    i.tx9_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.ux5_1 = MutableStateFlow(new CourseGroupSetDetailUiState());
    this.vx5_1 = asStateFlow(this.ux5_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.wx5_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, CourseGroupSetDetailViewModel$slambda_0(this, null));
  }
  protoOf(CourseGroupSetDetailViewModel).xx5 = function () {
    Companion_getInstance_116();
    var tmp = to('entityUid', this.rqm_1.toString());
    Companion_getInstance_125();
    this.zqm_1.kp6('CourseGroupsEdit', mapOf([tmp, to('clazzUid', this.wx5_1.toString())]));
  };
  function CourseGroupSetDetailUiState(courseGroupSet, membersList) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    this.wx6_1 = courseGroupSet;
    this.xx6_1 = membersList;
  }
  protoOf(CourseGroupSetDetailUiState).xx9 = function (courseGroupSet, membersList) {
    return new CourseGroupSetDetailUiState(courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).yx6 = function (courseGroupSet, membersList, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.wx6_1 : courseGroupSet;
    membersList = membersList === VOID ? this.xx6_1 : membersList;
    return $super === VOID ? this.xx9(courseGroupSet, membersList) : $super.xx9.call(this, courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).toString = function () {
    return 'CourseGroupSetDetailUiState(courseGroupSet=' + this.wx6_1 + ', membersList=' + this.xx6_1 + ')';
  };
  protoOf(CourseGroupSetDetailUiState).hashCode = function () {
    var result = this.wx6_1 == null ? 0 : hashCode(this.wx6_1);
    result = imul(result, 31) + hashCode(this.xx6_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.wx6_1, tmp0_other_with_cast.wx6_1))
      return false;
    if (!equals(this.xx6_1, tmp0_other_with_cast.xx6_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.gxa_1 = this$0;
    this.hxa_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).uxa = function (db, $completion) {
    var tmp = this.vny(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.uxa(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.ixa_1.s7d().sd3(this.gxa_1.fqt_1, this.gxa_1.uxb_1, systemTimeInMillis(), 0, this.gxa_1.pqn(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jxa_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.kxa_1 = this.jxa_1;
            var tmp_1 = this;
            tmp_1.lxa_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.jxa_1, 10));
            this.mxa_1 = this.kxa_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.mxa_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.nxa_1 = this.mxa_1.e();
            var tmp_2 = this;
            tmp_2.oxa_1 = this.nxa_1;
            if (this.oxa_1.hd5_1 == null) {
              var tmp_3 = this;
              tmp_3.qxa_1 = new CourseGroupMemberAndName();
              var tmp_4 = this;
              tmp_4.rxa_1 = this.qxa_1;
              this.rxa_1.id5_1 = this.oxa_1.id5_1;
              this.rxa_1.kd5_1 = this.oxa_1.kd5_1;
              this.rxa_1.jd5_1 = this.oxa_1.jd5_1;
              this.rxa_1.ld5_1 = this.oxa_1.ld5_1;
              var tmp_5 = this;
              tmp_5.sxa_1 = new CourseGroupMember();
              var tmp_6 = this;
              tmp_6.txa_1 = this.sxa_1;
              this.hd_1 = 3;
              var tmp_7 = get_doorPrimaryKeyManager(this.gxa_1.rqn());
              suspendResult = tmp_7.o62(243, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.pxa_1 = this.oxa_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.txa_1.pd4_1 = ARGUMENT;
            this.txa_1.qd4_1 = this.hxa_1;
            this.txa_1.sd4_1 = this.oxa_1.jd5_1;
            var ARGUMENT_0 = this.sxa_1;
            this.rxa_1.hd5_1 = ARGUMENT_0;
            this.pxa_1 = this.qxa_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var ARGUMENT_1 = this.pxa_1;
            this.lxa_1.i1(ARGUMENT_1);
            this.hd_1 = 2;
            continue $sm;
          case 5:
            return this.lxa_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).vny = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this.gxa_1, this.hxa_1, completion);
    i.ixa_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.uxa(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).dxc = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.dxc($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).l78 = 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.dxc($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.sxb_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.jxc(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.sxc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).wxc = function (db, $completion) {
    var tmp = this.vny(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.wxc(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.txc_1;
            var tmp_1;
            if (!this.sxc_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.uxc_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r7d();
            if (this.uxc_1 == null) {
              this.vxc_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.uxc_1.pdc(this.sxc_1.fqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.vxc_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.vxc_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).vny = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this.sxc_1, completion);
    i.txc_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.wxc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation) {
    this.fxd_1 = $courseGroupSetUid;
    this.gxd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).rdg = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).m78 = function ($completion) {
    return this.rdg($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.a7z_1 = this.fxd_1;
          this_0.e7z_1 = this.gxd_1.uxb_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).l78 = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_5(this.fxd_1, this.gxd_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.rdg($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.sxb_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.jxc(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.pxd_1 = this$0;
    this.qxd_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).sxd = 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.sxd((!(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_43.n4r());
            var tmp_1 = listOf_0('courseGroupMembers');
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this.pxd_1, this.qxd_1, null);
            var tmp_3 = CourseGroupSetEditViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.pxd_1.hqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, CourseGroupSetEditViewModel$slambda$slambda$lambda(this.pxd_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.pxd_1, this.qxd_1, completion);
    i.rxd_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.sxd($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation) {
    this.bxe_1 = this$0;
    this.cxe_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).exe = 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.exe((!(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_44.n4r();
            var tmp_1 = CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this.bxe_1, null);
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_6(this.cxe_1, this.bxe_1, null);
            suspendResult = this.bxe_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this.bxe_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.bxe_1, this.cxe_1, completion);
    i.dxe_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.exe($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.nxe_1 = this$0;
    this.oxe_1 = $courseGroupSet;
    this.pxe_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.nxe_1.tqn().r7d().qdc(this.oxe_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.nxe_1.tqn().s7d().ud3(this.pxe_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).vny = function (it, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this.nxe_1, this.oxe_1, this.pxe_1, completion);
    i.qxe_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_161() {
    this.rxe_1 = 'CourseGroupsEdit';
    this.sxe_1 = 'courseGroupMembers';
  }
  var Companion_instance_210;
  function Companion_getInstance_178() {
    return Companion_instance_210;
  }
  function CourseGroupSetEditViewModel$slambda(this$0, resultContinuation) {
    this.bxf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.cxf_1.o7f();
            var tmp_1 = this.bxf_1.pqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.jdk(tmp_1, this.bxf_1.uxb_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).vny = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda(this.bxf_1, completion);
    i.cxf_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.jsc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation) {
    this.lxf_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.lxf_1.fqt_1.equals(new Long(0, 0))) {
              this.nxf_1 = this.lxf_1.fqt_1;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = get_doorPrimaryKeyManager(this.lxf_1.rqn());
              suspendResult = tmp_0.o62(242, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

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

            continue $sm;
          case 3:
            l$ret$1: do {
              var this_0 = this.lxf_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_2 = this.lxf_1.xqn().joj(strings_getInstance().hn3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, true, CourseGroupSetEditViewModel$onClickSave$ref(this.lxf_1));
                var tmp1_loadingState = Companion_getInstance_97().rq6_1;
                var nextValue = prevValue.jq6(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.lxf_1.sxb_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jxc(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.lxf_1, completion);
    i.mxf_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.xxf_1 = $commitDelay;
    this.yxf_1 = $entity;
    this.zxf_1 = $this;
    this.axg_1 = $key;
    this.bxg_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.xxf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.yxf_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.zxf_1.dqo(this.zxf_1.xqm_1, this.axg_1, this.bxg_1, this.yxf_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.xxf_1, this.yxf_1, this.zxf_1, this.axg_1, this.bxg_1, completion);
    i.cxg_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.rd4_1 = $groupNumber;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0($personUid) {
    return function (it) {
      return it.jd5_1.equals($personUid);
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation) {
    this.lxg_1 = this$0;
    this.mxg_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.lxg_1.dqo(this.lxg_1.xqm_1, 'courseGroupMembers', ListSerializer(Companion_instance_43.n4r()), this.mxg_1.fxc_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.lxg_1, this.mxg_1, completion);
    i.nxg_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.rd4_1 = ($shuffledPersonUidList.x($it.jd5_1) % $totalGroups | 0) + 1 | 0;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation) {
    this.wxg_1 = this$0;
    this.xxg_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.wxg_1.dqo(this.wxg_1.xqm_1, 'courseGroupMembers', ListSerializer(Companion_instance_43.n4r()), this.xxg_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.wxg_1, this.xxg_1, completion);
    i.yxg_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.hxh_1 = this$0;
    this.ixh_1 = $courseGroupSet;
    this.jxh_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.hxh_1.tqn();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this.hxh_1, this.ixh_1, this.jxh_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this.ixh_1.a7z_1;
            Companion_getInstance_125();
            this.hxh_1.gqt('CourseGroupSet', tmp_1, this.ixh_1, mapOf_0(to('clazzUid', this.hxh_1.uxb_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.hxh_1, this.ixh_1, this.jxh_1, completion);
    i.kxh_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.sxb_1 = MutableStateFlow(new CourseGroupSetEditUiState());
    this.txb_1 = asStateFlow(this.sxb_1);
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.uxb_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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>' call
        var tmp0_title = this.hqu(strings_getInstance().nni_1, strings_getInstance().oni_1);
        var tmp1_loadingState = Companion_getInstance_97().qq6_1;
        var nextValue = prevValue.jq6(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.jqo(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetEditViewModel).lxh = function (courseGroupSet) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sxb_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.exc_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7z_1;
        var tmp_0 = this.iqu(tmp, courseGroupSet == null ? null : courseGroupSet.b7z_1, prevValue.gxc_1);
        var tmp2_safe_receiver = prevValue.exc_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.c7z_1;
        var nextValue = prevValue.jxc(courseGroupSet, VOID, tmp_0, this.iqu(tmp_1, courseGroupSet == null ? null : courseGroupSet.c7z_1, prevValue.hxc_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_44.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.oqn();
    tmp_2.eqt_1 = launch(tmp_3, VOID, VOID, CourseGroupSetEditViewModel$onEntityChanged$slambda_0(commitDelay, courseGroupSet, this, key, serializer, null));
  };
  protoOf(CourseGroupSetEditViewModel).mxh = function (personUid, groupNumber) {
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.sxb_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.fxc_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.jd5_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.hd5_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.skm(tmp);
        var nextValue = prevValue.jxc(VOID, replace_0(prevValue.fxc_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.oqn();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this, newState, null));
  };
  protoOf(CourseGroupSetEditViewModel).nxh = function () {
    var tmp0_safe_receiver = this.sxb_1.t2().exc_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c7z_1;
    var totalGroups = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.sxb_1.t2().fxc_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.jd5_1;
      destination.i1(tmp$ret$0);
    }
    var shuffledPersonUidList = shuffled(destination);
    // Inline function 'kotlin.collections.map' call
    var this_1 = this.sxb_1.t2().fxc_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.hd5_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.skm(tmp);
      destination_0.i1(tmp$ret$3);
    }
    var newMemberList = destination_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.sxb_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
        var nextValue = prevValue.jxc(VOID, newMemberList);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this, newMemberList, null));
  };
  protoOf(CourseGroupSetEditViewModel).xs9 = function () {
    var tmp0_elvis_lhs = this.sxb_1.t2().exc_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.sxb_1.t2().fxc_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.hd5_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.rd4_1 > courseGroupSet.c7z_1) {
          tmp$ret$4 = true;
          break $l$block_0;
        }
      }
      tmp$ret$4 = false;
    }
    var hasInvalidAssignments = tmp$ret$4;
    if (hasInvalidAssignments) {
      this.vqn().yq6(new Snack(this.xqn().joj(strings_getInstance().qmi_1)));
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_1 = courseGroupSet.b7z_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.sxb_1;
        while (true) {
          var prevValue = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.jxc(VOID, VOID, this.xqn().joj(strings_getInstance().vmn_1));
          if (this_2.y1k(prevValue, nextValue)) {
            break $l$block_1;
          }
        }
      }
    }
    if (courseGroupSet.c7z_1 < 1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.sxb_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.jxc(VOID, VOID, VOID, this.xqn().joj(strings_getInstance().anh_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if ((hasInvalidAssignments ? true : !(this.sxb_1.t2().hxc_1 == null)) ? true : !(this.sxb_1.t2().gxc_1 == null)) {
      return Unit_instance;
    }
    var tmp_1 = this.oqn();
    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.exc_1 = courseGroupSet;
    this.fxc_1 = membersList;
    this.gxc_1 = courseTitleError;
    this.hxc_1 = numOfGroupsError;
    this.ixc_1 = fieldsEnabled;
  }
  protoOf(CourseGroupSetEditUiState).oxh = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    return new CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).jxc = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.exc_1 : courseGroupSet;
    membersList = membersList === VOID ? this.fxc_1 : membersList;
    courseTitleError = courseTitleError === VOID ? this.gxc_1 : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? this.hxc_1 : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? this.ixc_1 : fieldsEnabled;
    return $super === VOID ? this.oxh(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) : $super.oxh.call(this, courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).toString = function () {
    return 'CourseGroupSetEditUiState(courseGroupSet=' + this.exc_1 + ', membersList=' + this.fxc_1 + ', courseTitleError=' + this.gxc_1 + ', numOfGroupsError=' + this.hxc_1 + ', fieldsEnabled=' + this.ixc_1 + ')';
  };
  protoOf(CourseGroupSetEditUiState).hashCode = function () {
    var result = this.exc_1 == null ? 0 : hashCode(this.exc_1);
    result = imul(result, 31) + hashCode(this.fxc_1) | 0;
    result = imul(result, 31) + (this.gxc_1 == null ? 0 : getStringHashCode(this.gxc_1)) | 0;
    result = imul(result, 31) + (this.hxc_1 == null ? 0 : getStringHashCode(this.hxc_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ixc_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.exc_1, tmp0_other_with_cast.exc_1))
      return false;
    if (!equals(this.fxc_1, tmp0_other_with_cast.fxc_1))
      return false;
    if (!(this.gxc_1 == tmp0_other_with_cast.gxc_1))
      return false;
    if (!(this.hxc_1 == tmp0_other_with_cast.hxc_1))
      return false;
    if (!(this.ixc_1 === tmp0_other_with_cast.ixc_1))
      return false;
    return true;
  };
  function CourseGroupSetListViewModel$slambda$lambda(this$0) {
    return function () {
      var tmp = this$0.tqn().o7f();
      var tmp_0 = this$0.pqn();
      PermissionFlags_getInstance();
      return tmp.fdk(tmp_0, this$0.pxi_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.sqv_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.e5e(VOID, VOID, CourseGroupSetListViewModel$slambda$lambda$lambda(visible));
          var nextValue = prevValue.vxi(visible);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.exj_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.exj_1.pxi_1, this.exj_1.rqn(), this.exj_1.bqn_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.exj_1, completion);
    i.fxj_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.oxj_1 = $this_launch;
    this.pxj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.oxj_1, VOID, VOID, CourseGroupSetListViewModel$slambda$slambda$slambda_0(this.pxj_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).l78 = function (completion) {
    return new CourseGroupSetListViewModel$slambda$slambda(this.oxj_1, this.pxj_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_162() {
    this.qxj_1 = 'CourseGroups';
  }
  var Companion_instance_211;
  function Companion_getInstance_179() {
    return Companion_instance_211;
  }
  function CourseGroupSetListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().r7d().odc(this$0.pxi_1, toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_1), this$0.sqv_1.t2().uxi_1.qqc_1);
    };
  }
  function CourseGroupSetListViewModel$slambda(this$0, resultContinuation) {
    this.zxj_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.zxj_1);
            var tmp_1 = strings_getInstance().xn0_1;
            suspendResult = this.zxj_1.cqx(tmp_0, tmp_1, CourseGroupSetListViewModel$slambda$lambda_0(this.zxj_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.zxj_1, completion);
    i.axk_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.jxk_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.jxk_1.sqv_1, CourseGroupSetListViewModel$slambda$slambda_0(this.kxk_1, this.jxk_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.jxk_1, completion);
    i.kxk_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_116();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.pxi_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.qxi_1 = CourseGroupSetListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue = prevValue.vxi(VOID, this.qxi_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_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.jq6(VOID, VOID, VOID, true, VOID, VOID, VOID, this.bqx());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.oqn();
    launch(tmp_1, VOID, VOID, CourseGroupSetListViewModel$slambda_0(this, null));
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, CourseGroupSetListViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetListViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).lxk = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.onSortOptionChanged.<anonymous>' call
        var nextValue = prevValue.vxi(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).nqw = function () {
    Companion_getInstance_116();
    this.fqx('CourseGroupsEdit', mapOf_0(to('clazzUid', this.pxi_1.toString())));
  };
  protoOf(CourseGroupSetListViewModel).mxk = function (entry) {
    var tmp = entry.a7z_1;
    Companion_getInstance_125();
    this.hqx('CourseGroupSet', tmp, entry, mapOf_0(to('clazzUid', this.pxi_1.toString())));
  };
  function Companion_163() {
    Companion_instance_212 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().pmk_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().pmk_1;
    tmp.nxk_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_212;
  function Companion_getInstance_180() {
    if (Companion_instance_212 == null)
      new Companion_163();
    return Companion_instance_212;
  }
  function CourseGroupSetListUiState$_init_$lambda_2d65m2() {
    return new EmptyPagingSource();
  }
  function CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption) {
    Companion_getInstance_180();
    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_180().nxk_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    this.rxi_1 = showAddItem;
    this.sxi_1 = courseGroupSets;
    this.txi_1 = sortOptions;
    this.uxi_1 = sortOption;
  }
  protoOf(CourseGroupSetListUiState).oxk = function (showAddItem, courseGroupSets, sortOptions, sortOption) {
    return new CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).vxi = function (showAddItem, courseGroupSets, sortOptions, sortOption, $super) {
    showAddItem = showAddItem === VOID ? this.rxi_1 : showAddItem;
    courseGroupSets = courseGroupSets === VOID ? this.sxi_1 : courseGroupSets;
    sortOptions = sortOptions === VOID ? this.txi_1 : sortOptions;
    sortOption = sortOption === VOID ? this.uxi_1 : sortOption;
    return $super === VOID ? this.oxk(showAddItem, courseGroupSets, sortOptions, sortOption) : $super.oxk.call(this, showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).toString = function () {
    return 'CourseGroupSetListUiState(showAddItem=' + this.rxi_1 + ', courseGroupSets=' + this.sxi_1 + ', sortOptions=' + this.txi_1 + ', sortOption=' + this.uxi_1 + ')';
  };
  protoOf(CourseGroupSetListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.rxi_1);
    result = imul(result, 31) + hashCode(this.sxi_1) | 0;
    result = imul(result, 31) + hashCode(this.txi_1) | 0;
    result = imul(result, 31) + this.uxi_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.rxi_1 === tmp0_other_with_cast.rxi_1))
      return false;
    if (!equals(this.sxi_1, tmp0_other_with_cast.sxi_1))
      return false;
    if (!equals(this.txi_1, tmp0_other_with_cast.txi_1))
      return false;
    if (!this.uxi_1.equals(tmp0_other_with_cast.uxi_1))
      return false;
    return true;
  };
  function CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.xxk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).vrg = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.vrg(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.yxk_1.q7d();
            var tmp_1;
            if (!this.xxk_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.zxk_1 = tmp_1;
            if (this.zxk_1 == null) {
              this.axl_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.zxk_1.ge7(this.xxk_1.fqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.axl_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.axl_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).vny = function (it, completion) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this.xxk_1, completion);
    i.yxk_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.vrg(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.jxl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).mxl = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.mxl($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.kxl_1 = new CourseTerminology();
            var tmp_1 = this;
            tmp_1.lxl_1 = this.kxl_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.jxl_1.rqn());
            suspendResult = tmp_2.o62(450, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.lxl_1.m8g_1 = ARGUMENT;
            return this.kxl_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).l78 = function (completion) {
    return new CourseTerminologyEditViewModel$slambda$slambda_1(this.jxl_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.mxl($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.kxm_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.qxm(VOID, terminology, VOID, toTerminologyEntries(terminology, this$0.m4r(), this$0.xqn()));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_164() {
    this.rxm_1 = 'CourseTerminologyEdit';
  }
  var Companion_instance_213;
  function Companion_getInstance_181() {
    return Companion_instance_213;
  }
  function CourseTerminologyEditViewModel$slambda(this$0, resultContinuation) {
    this.axn_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.cxn_1 = Companion_instance_34.n4r();
            this.hd_1 = 1;
            var tmp_0 = CourseTerminologyEditViewModel$slambda$slambda_0(this.axn_1, null);
            var tmp_1 = CourseTerminologyEditViewModel$slambda$slambda_2(this.axn_1, null);
            suspendResult = this.axn_1.hqo(this.cxn_1, VOID, VOID, tmp_0, tmp_1, CourseTerminologyEditViewModel$slambda$lambda(this.axn_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.axn_1.kxm_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.qxm(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.axn_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = this.axn_1.xqn().joj(strings_getInstance().hn3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, VOID, CourseTerminologyEditViewModel$onClickSave$ref(this.axn_1));
                var tmp1_loadingState = Companion_getInstance_97().rq6_1;
                var nextValue_0 = prevValue_0.jq6(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.axn_1, completion);
    i.bxn_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.lxn_1 = $commitDelay;
    this.mxn_1 = $entity;
    this.nxn_1 = $this;
    this.oxn_1 = $key;
    this.pxn_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.lxn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.mxn_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.nxn_1.dqo(this.nxn_1.xqm_1, this.oxn_1, this.pxn_1, this.mxn_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.lxn_1, this.mxn_1, this.nxn_1, this.oxn_1, this.pxn_1, completion);
    i.qxn_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.nq8_1.equals($terminologyEntry.nq8_1);
    };
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0($newTermList, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.o8g_1 = encodeToStringMap($newTermList, this$0.m4r());
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.zxn_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.zxn_1.kxm_1.t2().nxm_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.bxo_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.zxn_1.tqn().q7d().he7(this.bxo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.zxn_1.kxm_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.qxm(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.zxn_1.iqt(this.bxo_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.zxn_1, completion);
    i.axo_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.kxm_1 = MutableStateFlow(new CourseTerminologyEditUiState());
    this.lxm_1 = asStateFlow(this.kxm_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>' call
        var tmp0_title = this.hqu(strings_getInstance().hni_1, strings_getInstance().ini_1);
        var tmp1_loadingState = Companion_getInstance_97().qq6_1;
        var nextValue = prevValue.jq6(VOID, tmp1_loadingState, tmp0_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyEditViewModel).cxo = function (courseTerminology) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.kxm_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.qxm(VOID, courseTerminology);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_34.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.eqt_1 = launch(tmp_0, VOID, VOID, CourseTerminologyEditViewModel$onEntityChanged$slambda_0(commitDelay, courseTerminology, this, key, serializer, null));
  };
  protoOf(CourseTerminologyEditViewModel).dxo = function (terminologyEntry) {
    var tmp = this.kxm_1.t2().pxm_1;
    var newTermList = replace_0(tmp, terminologyEntry, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda(terminologyEntry));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.kxm_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onTerminologyTermChanged.<anonymous>' call
        var nextValue = prevValue.qxm(VOID, VOID, VOID, newTermList);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.kxm_1.t2().nxm_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.cxo(tmp_0);
  };
  protoOf(CourseTerminologyEditViewModel).xs9 = function () {
    if (!this.kxm_1.t2().oxm_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.kxm_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.qxm(VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.oqn();
    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.mxm_1 = titleError;
    this.nxm_1 = entity;
    this.oxm_1 = fieldsEnabled;
    this.pxm_1 = terminologyTermList;
  }
  protoOf(CourseTerminologyEditUiState).exo = function (titleError, entity, fieldsEnabled, terminologyTermList) {
    return new CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).qxm = function (titleError, entity, fieldsEnabled, terminologyTermList, $super) {
    titleError = titleError === VOID ? this.mxm_1 : titleError;
    entity = entity === VOID ? this.nxm_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.oxm_1 : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? this.pxm_1 : terminologyTermList;
    return $super === VOID ? this.exo(titleError, entity, fieldsEnabled, terminologyTermList) : $super.exo.call(this, titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).toString = function () {
    return 'CourseTerminologyEditUiState(titleError=' + this.mxm_1 + ', entity=' + this.nxm_1 + ', fieldsEnabled=' + this.oxm_1 + ', terminologyTermList=' + this.pxm_1 + ')';
  };
  protoOf(CourseTerminologyEditUiState).hashCode = function () {
    var result = this.mxm_1 == null ? 0 : getStringHashCode(this.mxm_1);
    result = imul(result, 31) + (this.nxm_1 == null ? 0 : hashCode(this.nxm_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oxm_1) | 0;
    result = imul(result, 31) + hashCode(this.pxm_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.mxm_1 == tmp0_other_with_cast.mxm_1))
      return false;
    if (!equals(this.nxm_1, tmp0_other_with_cast.nxm_1))
      return false;
    if (!(this.oxm_1 === tmp0_other_with_cast.oxm_1))
      return false;
    if (!equals(this.pxm_1, tmp0_other_with_cast.pxm_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.sqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.hxo(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_165() {
    this.ixo_1 = 'CourseTerminologyList';
  }
  var Companion_instance_214;
  function Companion_getInstance_182() {
    return Companion_instance_214;
  }
  function CourseTerminologyListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().q7d().de7();
    };
  }
  function CourseTerminologyListViewModel$slambda(this$0, resultContinuation) {
    this.rxo_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().fni_1;
            suspendResult = this.rxo_1.cqx(tmp_0, tmp_1, CourseTerminologyListViewModel$slambda$lambda_0(this.rxo_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.rxo_1, completion);
    i.sxo_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.txp_1 = CourseTerminologyListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.jqx(strings_getInstance().fni_1, strings_getInstance().gni_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.sqv_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.hxo(this.txp_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, CourseTerminologyListViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyListViewModel).nqw = function () {
    this.gqx('CourseTerminologyEdit');
  };
  protoOf(CourseTerminologyListViewModel).uxp = function (entry) {
    this.iqx('CourseTerminologyEdit', entry.m8g_1, entry);
  };
  protoOf(CourseTerminologyListViewModel).mqw = 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.fxo_1 = terminologyList;
    this.gxo_1 = showAddItemInList;
  }
  protoOf(CourseTerminologyListUiState).vxp = function (terminologyList, showAddItemInList) {
    return new CourseTerminologyListUiState(terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).hxo = function (terminologyList, showAddItemInList, $super) {
    terminologyList = terminologyList === VOID ? this.fxo_1 : terminologyList;
    showAddItemInList = showAddItemInList === VOID ? this.gxo_1 : showAddItemInList;
    return $super === VOID ? this.vxp(terminologyList, showAddItemInList) : $super.vxp.call(this, terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).toString = function () {
    return 'CourseTerminologyListUiState(terminologyList=' + this.fxo_1 + ', showAddItemInList=' + this.gxo_1 + ')';
  };
  protoOf(CourseTerminologyListUiState).hashCode = function () {
    var result = hashCode(this.fxo_1);
    result = imul(result, 31) + getBooleanHashCode(this.gxo_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.fxo_1, tmp0_other_with_cast.fxo_1))
      return false;
    if (!(this.gxo_1 === tmp0_other_with_cast.gxo_1))
      return false;
    return true;
  };
  function get_delItemContentTypeStringResource(_this__u8e3s4) {
    var tmp;
    var tmp_0;
    var tmp_1 = _this__u8e3s4.keg_1;
    if (tmp_1 === 7) {
      tmp_0 = _this__u8e3s4.oeg_1;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = strings_getInstance().hnd_1;
    } else {
      var tmp_2 = _this__u8e3s4.keg_1;
      if (tmp_2 === 7) {
        tmp = strings_getInstance().in4_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function _get_restoreDeletedItemUseCase__7lscig($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xxq_1;
    restoreDeletedItemUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deletePermanentlyUseCase__wdw610($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yxq_1;
    deletePermanentlyUseCase$factory_0();
    return this_0.t2();
  }
  function restoreItems($this, items) {
    var tmp = $this.oqn();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$restoreItems$slambda_0($this, items, null));
  }
  function Companion_166() {
    this.zxq_1 = 'DeletedItems';
  }
  var Companion_instance_215;
  function Companion_getInstance_183() {
    return Companion_instance_215;
  }
  function DeletedItemListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().m7f().deg(this$0.pqn(), false);
    };
  }
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation) {
    this.ixr_1 = this$0;
    this.jxr_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.ixr_1).rpc(this.jxr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ixr_1.vqn().yq6(new Snack(this.ixr_1.xqn().cwq(plurals_getInstance().uns_1, this.jxr_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().q5e('Exception deleting', e);
              this.ixr_1.vqn().yq6(new Snack(this.ixr_1.xqn().joj(strings_getInstance().qmi_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.ixr_1, this.jxr_1, completion);
    i.kxr_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.txr_1 = this$0;
    this.uxr_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.txr_1).rpc(this.uxr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.txr_1.vqn().yq6(new Snack(this.txr_1.xqn().cwq(plurals_getInstance().vns_1, this.uxr_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.txr_1, this.uxr_1, completion);
    i.vxr_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.wxq_1 = DeletedItemListViewModel$pagingSourceFactory$lambda(this);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.xxq_1 = Instance(this_0, tmp$ret$0, null).a5d(this, restoreDeletedItemUseCase$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(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.yxq_1 = Instance(this_1, tmp$ret$2, null).a5d(this, deletePermanentlyUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.sqv_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue = prevValue.axs(this.wxq_1);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.bqn_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().gnn_1));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(DeletedItemListViewModel).mqw = function (searchText) {
  };
  protoOf(DeletedItemListViewModel).bxs = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onDismissConfirmDialog.<anonymous>' call
        var nextValue = prevValue.axs(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).cxs = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onConfirmDeletePermanently.<anonymous>' call
        var nextValue = prevValue.axs(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var itemsToDelete = tmp$ret$1.zxr_1;
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this, itemsToDelete, null));
  };
  protoOf(DeletedItemListViewModel).dxs = function (item) {
    restoreItems(this, listOf_0(item));
  };
  protoOf(DeletedItemListViewModel).exs = function (item) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_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.xqn().cwq(plurals_getInstance().wns_1, 1);
        var nextValue = prevValue.axs(VOID, true, tmp1_deleteConfirmText, tmp0_itemsToConfirmDeletion);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).nqw = 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.wxr_1 = deletedItemsList;
    this.xxr_1 = confirmDialogVisible;
    this.yxr_1 = deleteConfirmText;
    this.zxr_1 = itemsToConfirmDeletion;
  }
  protoOf(DeletedItemListUiState).fxs = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    return new DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).axs = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion, $super) {
    deletedItemsList = deletedItemsList === VOID ? this.wxr_1 : deletedItemsList;
    confirmDialogVisible = confirmDialogVisible === VOID ? this.xxr_1 : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? this.yxr_1 : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? this.zxr_1 : itemsToConfirmDeletion;
    return $super === VOID ? this.fxs(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) : $super.fxs.call(this, deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).toString = function () {
    return 'DeletedItemListUiState(deletedItemsList=' + this.wxr_1 + ', confirmDialogVisible=' + this.xxr_1 + ', deleteConfirmText=' + this.yxr_1 + ', itemsToConfirmDeletion=' + this.zxr_1 + ')';
  };
  protoOf(DeletedItemListUiState).hashCode = function () {
    var result = hashCode(this.wxr_1);
    result = imul(result, 31) + getBooleanHashCode(this.xxr_1) | 0;
    result = imul(result, 31) + (this.yxr_1 == null ? 0 : getStringHashCode(this.yxr_1)) | 0;
    result = imul(result, 31) + hashCode(this.zxr_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.wxr_1, tmp0_other_with_cast.wxr_1))
      return false;
    if (!(this.xxr_1 === tmp0_other_with_cast.xxr_1))
      return false;
    if (!(this.yxr_1 == tmp0_other_with_cast.yxr_1))
      return false;
    if (!equals(this.zxr_1, tmp0_other_with_cast.zxr_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.nqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.rxt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).px2 = function (it, $completion) {
    var tmp = this.qx2(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.px2((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.rxt_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yxt(this.sxt_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).qx2 = function (it, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this.rxt_1, completion);
    i.sxt_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.px2(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.hxu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).jt7 = function (permissionPair, $completion) {
    var tmp = this.kt7(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.jt7(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.jxu_1 = this.ixu_1;
            this.kxu_1 = this.jxu_1.y6();
            this.lxu_1 = this.jxu_1.z6();
            if (this.kxu_1) {
              l$ret$1: do {
                var this_0 = this.hxu_1.bqn_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_0 = this.hxu_1.xqn().joj(strings_getInstance().vnj_1);
                  var tmp_1 = FabIcon_ADD_getInstance();
                  var nextValue = prevValue.jq6(new FabUiState(true, tmp_0, tmp_1, CourseDiscussionDetailViewModel$onClickAdd$ref(this.hxu_1)));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              l$ret$3: do {
                var this_1 = this.hxu_1.sqv_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.yxt(VOID, this.hxu_1.ixt_1, this.lxu_1, VOID, this.hxu_1.xqn().eq5());
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 1;
              var tmp_2 = this.hxu_1.tqn().p7d().gcl(this.hxu_1.gxt_1);
              var tmp_3 = CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this.hxu_1, null);
              suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_3), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$5: do {
                var this_2 = this.hxu_1.bqn_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.jq6(new FabUiState());
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              l$ret$7: do {
                var this_3 = this.hxu_1.sqv_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.yxt(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).kt7 = function (permissionPair, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this.hxu_1, completion);
    i.ixu_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.jt7(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation) {
    this.uxu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.uxu_1.tqn().o7f();
            var tmp_1 = this.uxu_1.pqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.uxu_1.hxt_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this.uxu_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).l78 = function (completion) {
    return new CourseDiscussionDetailViewModel$slambda$slambda(this.uxu_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_167() {
    this.vxu_1 = 'CourseDiscussion';
  }
  var Companion_instance_216;
  function Companion_getInstance_184() {
    return Companion_instance_216;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_30(function_0) {
    this.wxu_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_30).t1d = function (value, $completion) {
    return this.wxu_1(value, $completion);
  };
  function CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().h7f().uel(this$0.gxt_1, false);
    };
  }
  function CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation) {
    this.fxv_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.fxv_1.sqv_1, CourseDiscussionDetailViewModel$slambda$slambda_0(this.fxv_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.fxv_1, completion);
    i.gxv_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.bqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.courediscussiondetail.CourseDiscussionDetailViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jq6(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.pxv_1 = this$0;
    this.qxv_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.pxv_1.tqn().h7f().yel(this.qxv_1.nem_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.pxv_1.vqn().yq6(new Snack(this.pxv_1.xqn().joj(strings_getInstance().lmj_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.pxv_1, this.qxv_1, completion);
    i.rxv_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_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.gxt_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_125();
    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.hxt_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.ixt_1 = CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this);
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, CourseDiscussionDetailViewModel$slambda_0(this, null));
    launchSetTitleFromClazzUid(this, this.hxt_1, CourseDiscussionDetailViewModel$lambda(this));
  }
  protoOf(CourseDiscussionDetailViewModel).mqw = function (searchText) {
  };
  protoOf(CourseDiscussionDetailViewModel).nqw = function () {
    Companion_getInstance_125();
    var tmp = to('courseBlockUid', this.gxt_1.toString());
    Companion_getInstance_125();
    this.fqx('DiscussionPostEdit', mapOf([tmp, to('clazzUid', this.hxt_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).sxv = function (post) {
    Companion_getInstance_116();
    var tmp = to('entityUid', post.nem_1.toString());
    Companion_getInstance_125();
    this.zqm_1.kp6('CourseDiscussionPost', mapOf([tmp, to('clazzUid', this.hxt_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).txv = function (post) {
    var tmp = this.oqn();
    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.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.txt_1 = courseBlock;
    this.uxt_1 = posts;
    this.vxt_1 = showModerateOptions;
    this.wxt_1 = localDateTimeNow;
    this.xxt_1 = dayOfWeekStrings;
  }
  protoOf(CourseDiscussionDetailUiState).uxv = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).yxt = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    courseBlock = courseBlock === VOID ? this.txt_1 : courseBlock;
    posts = posts === VOID ? this.uxt_1 : posts;
    showModerateOptions = showModerateOptions === VOID ? this.vxt_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.wxt_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.xxt_1 : dayOfWeekStrings;
    return $super === VOID ? this.uxv(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.uxv.call(this, courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).toString = function () {
    return 'CourseDiscussionDetailUiState(courseBlock=' + this.txt_1 + ', posts=' + this.uxt_1 + ', showModerateOptions=' + this.vxt_1 + ', localDateTimeNow=' + this.wxt_1 + ', dayOfWeekStrings=' + this.xxt_1 + ')';
  };
  protoOf(CourseDiscussionDetailUiState).hashCode = function () {
    var result = this.txt_1 == null ? 0 : this.txt_1.hashCode();
    result = imul(result, 31) + hashCode(this.uxt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vxt_1) | 0;
    result = imul(result, 31) + this.wxt_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.xxt_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.txt_1, tmp0_other_with_cast.txt_1))
      return false;
    if (!equals(this.uxt_1, tmp0_other_with_cast.uxt_1))
      return false;
    if (!(this.vxt_1 === tmp0_other_with_cast.vxt_1))
      return false;
    if (!this.wxt_1.equals(tmp0_other_with_cast.wxt_1))
      return false;
    if (!equals(this.xxt_1, tmp0_other_with_cast.xxt_1))
      return false;
    return true;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.dxw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).nqa = function (result, $completion) {
    var tmp = this.oqa(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.nqa(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.exw_1.uq9_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.fxw_1 = tmp_2;
            this.hd_1 = 1;
            suspendResult = submitReply(this.dxw_1, this.fxw_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).oqa = function (result, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.dxw_1, completion);
    i.exw_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.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.oxw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).yre = function (postTitle, $completion) {
    var tmp = this.zre(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.yre((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.oxw_1.bqn_1;
          var tmp_0;
          if (!(this_0.t2().wq5_1 == this.pxw_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.jq6(VOID, VOID, this.pxw_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).zre = function (postTitle, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.oxw_1, completion);
    i.pxw_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.yre(postTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yxw_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.yxw_1.bqo(this.yxw_1.wqn(), 'replyTextResult');
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.yxw_1, null);
            suspendResult = tmp_0.a1c(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(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this.yxw_1, completion);
    i.zxw_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.ixx_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.ixx_1.tqn().h7f().z8c(this.ixx_1.rqm_1);
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.ixx_1, null);
            suspendResult = tmp_0.a1c(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(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this.ixx_1, completion);
    i.jxx_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.sxx_1 = this$0;
    this.txx_1 = $savedStateHandle;
    this.uxx_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).jt7 = function (permissionPair, $completion) {
    var tmp = this.kt7(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.jt7(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.vxx_1;
          var hasViewPermission = tmp0_container.y6();
          var hasModeratePermission = tmp0_container.z6();
          if (hasViewPermission) {
            l$ret$1: do {
              var this_0 = this.sxx_1.txy_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0 = this.sxx_1.pqn();
                var tmp_1 = this.sxx_1.nqn().ro9().lnu_1.ckr();
                var tmp0_safe_receiver = this.sxx_1.nqn().ro9().nnu_1;
                var nextValue = prevValue.hxz(this.sxx_1.sxy_1, tmp_0, tmp_1, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.h97_1, VOID, hasModeratePermission);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp1_elvis_lhs = this.txx_1.ba('replyText');
            this.sxx_1.vxy_1.x1k(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            launch(this.uxx_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this.sxx_1, null));
            launch(this.uxx_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this.sxx_1, null));
          } else {
            l$ret$3: do {
              var this_1 = this.sxx_1.txy_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda;
                var tmp_3 = this.sxx_1.pqn();
                var tmp_4 = this.sxx_1.nqn().ro9().lnu_1.ckr();
                var tmp0_safe_receiver_0 = this.sxx_1.nqn().ro9().nnu_1;
                var nextValue_0 = prevValue_0.hxz(tmp_2, tmp_3, tmp_4, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.h97_1, VOID, false);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp2_elvis_lhs = this.txx_1.ba('replyText');
            this.sxx_1.vxy_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).kt7 = function (permissionPair, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this.sxx_1, this.txx_1, this.uxx_1, completion);
    i.vxx_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.jt7(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.qxz_1 = this$0;
    this.rxz_1 = $savedStateHandle;
    this.sxz_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.qxz_1.tqn().o7f();
            var tmp_1 = this.qxz_1.pqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.gdk(tmp_1, this.qxz_1.yxy_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this.qxz_1, this.rxz_1, this.sxz_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).l78 = function (completion) {
    return new DiscussionPostDetailViewModel$slambda$slambda(this.qxz_1, this.rxz_1, this.sxz_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function submitReply($this, replyText, $completion) {
    var tmp = new $submitReplyCOROUTINE$75($this, replyText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_168() {
    this.jy0_1 = 'replyTextResult';
    this.ky0_1 = 'replyText';
    this.ly0_1 = 'CourseDiscussionPost';
  }
  var Companion_instance_217;
  function Companion_getInstance_185() {
    return Companion_instance_217;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_31(function_0) {
    this.my0_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_31).t1d = function (value, $completion) {
    return this.my0_1(value, $completion);
  };
  function DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().h7f().wel(this$0.rqm_1, false);
    };
  }
  function DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.vy0_1 = this$0;
    this.wy0_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.vy0_1.txy_1, DiscussionPostDetailViewModel$slambda$slambda_0(this.vy0_1, this.wy0_1, this.xy0_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.vy0_1, this.wy0_1, completion);
    i.xy0_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.gy1_1 = this$0;
    this.hy1_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.gy1_1.xqm_1.aqj('replyText', this.hy1_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.gy1_1, this.hy1_1, completion);
    i.iy1_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.ry1_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.ry1_1, this.ry1_1.vxy_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.ry1_1, completion);
    i.sy1_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.by2_1 = this$0;
    this.cy2_1 = $replyText;
    this.dy2_1 = $clazzAndBlockUids;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).uny = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).he = function (p1, $completion) {
    return this.uny(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.by2_1.tqn().h7f();
            var this_0 = new DiscussionPost();
            this_0.rem_1 = systemTimeInMillis();
            this_0.oem_1 = this.by2_1.rqm_1;
            this_0.qem_1 = this.cy2_1;
            this_0.uem_1 = this.by2_1.pqn();
            this_0.vem_1 = this.dy2_1.sco_1;
            this_0.sem_1 = this.dy2_1.tco_1;
            suspendResult = tmp_0.insertAsync(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.by2_1.fy2('');
            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).vny = function (it, completion) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this.by2_1, this.cy2_1, this.dy2_1, completion);
    i.ey2_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.oy2_1 = this$0;
    this.py2_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.oy2_1.tqn().h7f().yel(this.py2_1.nem_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.oy2_1.vqn().yq6(new Snack(this.oy2_1.xqn().joj(strings_getInstance().lmj_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.oy2_1, this.py2_1, completion);
    i.qy2_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$75(_this__u8e3s4, replyText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.by0_1 = _this__u8e3s4;
    this.cy0_1 = replyText;
  }
  protoOf($submitReplyCOROUTINE$75).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.by0_1.txy_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.hxz(VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.by0_1.zqn(Companion_getInstance_97().qq6_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.by0_1.rqn().p7d().lcl(this.by0_1.rqm_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.fy0_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.gy0_1 = this.fy0_1;
            if ((!(this.gy0_1 == null) ? !this.gy0_1.sco_1.equals(new Long(0, 0)) : false) ? !this.gy0_1.tco_1.equals(new Long(0, 0)) : false) {
              this.hy0_1 = this.gy0_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.by0_1.tqn().p7d().lcl(this.by0_1.rqm_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.hy0_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.iy0_1 = this.hy0_1;
            if ((this.iy0_1 == null ? true : this.iy0_1.tco_1.equals(new Long(0, 0))) ? true : this.iy0_1.sco_1.equals(new Long(0, 0))) {
              this.by0_1.vqn().yq6(new Snack(this.by0_1.xqn().joj(strings_getInstance().qmi_1)));
              this.ey0_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.by0_1.tqn();
            suspendResult = withDoorTransactionAsync(tmp_1, VOID, DiscussionPostDetailViewModel$submitReply$slambda_0(this.by0_1, this.cy0_1, this.iy0_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.dy0_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 8:
            this.id_1 = 11;
            this.by0_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$9: do {
              var this_1 = this.by0_1.txy_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.hxz(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.by0_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$11: do {
              var this_2 = this.by0_1.txy_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.hxz(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.by0_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$7: do {
              var this_3 = this.by0_1.txy_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.hxz(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.sxy_1 = DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this);
    this.txy_1 = MutableStateFlow(new DiscussionPostDetailUiState2());
    this.uxy_1 = asStateFlow(this.txy_1);
    this.vxy_1 = MutableStateFlow('');
    this.wxy_1 = asStateFlow(this.vxy_1);
    this.xxy_1 = null;
    var tmp_0 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.yxy_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this.oqn();
    launch(tmp_1, VOID, VOID, DiscussionPostDetailViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(DiscussionPostDetailViewModel).fy2 = function (replyText) {
    this.vxy_1.x1k(replyText);
    var tmp0_safe_receiver = this.xxy_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.xxy_1 = launch(tmp_0, VOID, VOID, DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this, replyText, null));
  };
  protoOf(DiscussionPostDetailViewModel).ry2 = function () {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this, null));
  };
  protoOf(DiscussionPostDetailViewModel).txv = function (post) {
    var tmp = this.oqn();
    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.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.zxy_1 = discussionPosts;
    this.axz_1 = loggedInPersonUid;
    this.bxz_1 = loggedInPersonName;
    this.cxz_1 = loggedInPersonPictureUri;
    this.dxz_1 = fieldsEnabled;
    this.exz_1 = showModerateOptions;
    this.fxz_1 = localDateTimeNow;
    this.gxz_1 = dayOfWeekStrings;
  }
  protoOf(DiscussionPostDetailUiState2).sy2 = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).hxz = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    discussionPosts = discussionPosts === VOID ? this.zxy_1 : discussionPosts;
    loggedInPersonUid = loggedInPersonUid === VOID ? this.axz_1 : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? this.bxz_1 : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? this.cxz_1 : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? this.dxz_1 : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? this.exz_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.fxz_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.gxz_1 : dayOfWeekStrings;
    return $super === VOID ? this.sy2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.sy2.call(this, discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).toString = function () {
    return 'DiscussionPostDetailUiState2(discussionPosts=' + this.zxy_1 + ', loggedInPersonUid=' + this.axz_1.toString() + ', loggedInPersonName=' + this.bxz_1 + ', loggedInPersonPictureUri=' + this.cxz_1 + ', fieldsEnabled=' + this.dxz_1 + ', showModerateOptions=' + this.exz_1 + ', localDateTimeNow=' + this.fxz_1 + ', dayOfWeekStrings=' + this.gxz_1 + ')';
  };
  protoOf(DiscussionPostDetailUiState2).hashCode = function () {
    var result = hashCode(this.zxy_1);
    result = imul(result, 31) + this.axz_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.bxz_1) | 0;
    result = imul(result, 31) + (this.cxz_1 == null ? 0 : getStringHashCode(this.cxz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dxz_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.exz_1) | 0;
    result = imul(result, 31) + this.fxz_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.gxz_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.zxy_1, tmp0_other_with_cast.zxy_1))
      return false;
    if (!this.axz_1.equals(tmp0_other_with_cast.axz_1))
      return false;
    if (!(this.bxz_1 === tmp0_other_with_cast.bxz_1))
      return false;
    if (!(this.cxz_1 == tmp0_other_with_cast.cxz_1))
      return false;
    if (!(this.dxz_1 === tmp0_other_with_cast.dxz_1))
      return false;
    if (!(this.exz_1 === tmp0_other_with_cast.exz_1))
      return false;
    if (!this.fxz_1.equals(tmp0_other_with_cast.fxz_1))
      return false;
    if (!equals(this.gxz_1, tmp0_other_with_cast.gxz_1))
      return false;
    return true;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.by3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).fy3 = function (it, $completion) {
    var tmp = this.vny(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.fy3(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.cy3_1.h7f();
            var tmp_1;
            if (!this.by3_1.fqt_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.dy3_1 = tmp_1;
            if (this.dy3_1 == null) {
              this.ey3_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.dy3_1.vel(this.by3_1.fqt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ey3_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.ey3_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).vny = function (it, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this.by3_1, completion);
    i.cy3_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.fy3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.oy3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).ry3 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.ry3($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.py3_1 = new DiscussionPost();
            var tmp_1 = this;
            tmp_1.qy3_1 = this.py3_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.oy3_1.rqn());
            suspendResult = tmp_2.o62(132, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.qy3_1.nem_1 = ARGUMENT;
            this.qy3_1.sem_1 = _get_courseBlockUidArg__1bqljt(this.oy3_1);
            this.qy3_1.uem_1 = this.oy3_1.nqn().goa().vky_1;
            this.qy3_1.rem_1 = systemTimeInMillis();
            return this.py3_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).l78 = function (completion) {
    return new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this.oy3_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.ry3($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.py4_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.vy4(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ey5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda).gy5 = 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.gy5((!(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_45.n4r();
            var tmp_1 = DiscussionPostEditViewModel$slambda$slambda$slambda_0(this.ey5_1, null);
            var tmp_2 = DiscussionPostEditViewModel$slambda$slambda$slambda_2(this.ey5_1, null);
            suspendResult = this.ey5_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, DiscussionPostEditViewModel$slambda$slambda$lambda(this.ey5_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.ey5_1, completion);
    i.fy5_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.gy5($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation) {
    this.py5_1 = this$0;
    this.qy5_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.py5_1.tqn().h7f().xel(this.qy5_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).vny = function (it, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this.py5_1, this.qy5_1, completion);
    i.ry5_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_discussionPostUid__impog9($this) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = $this.xqm_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_125();
    var tmp0_safe_receiver = $this.xqm_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_169() {
    this.sy5_1 = 'DiscussionPostEdit';
  }
  var Companion_instance_218;
  function Companion_getInstance_186() {
    return Companion_instance_218;
  }
  function DiscussionPostEditViewModel$slambda(this$0, resultContinuation) {
    this.by6_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.cy6_1, VOID, VOID, DiscussionPostEditViewModel$slambda$slambda_0(this.by6_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.by6_1.py4_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.vy4(VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.by6_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_0 = this.by6_1.xqn().joj(strings_getInstance().vnj_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$ref(this.by6_1));
                var tmp1_loadingState = Companion_getInstance_97().rq6_1;
                var nextValue_0 = prevValue_0.jq6(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.by6_1, completion);
    i.cy6_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.ly6_1 = $commitDelay;
    this.my6_1 = $entity;
    this.ny6_1 = $this;
    this.oy6_1 = $key;
    this.py6_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.ly6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.my6_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ny6_1.dqo(this.ny6_1.xqm_1, this.oy6_1, this.py6_1, this.my6_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.ly6_1, this.my6_1, this.ny6_1, this.oy6_1, this.py6_1, completion);
    i.qy6_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.zy6_1 = this$0;
    this.ay7_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.zy6_1.py4_1.t2().ty4_1 == null ? this.zy6_1.py4_1.t2().uy4_1 == null : false) {
              this.hd_1 = 1;
              suspendResult = this.zy6_1.rqn().p7d().mcl(this.ay7_1.sem_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 1:
            this.cy7_1 = suspendResult;
            this.ay7_1.vem_1 = this.cy7_1;
            if (this.ay7_1.vem_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = this.zy6_1.tqn().p7d().mcl(this.ay7_1.sem_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.dy7_1 = suspendResult;
            this.ay7_1.vem_1 = this.dy7_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_0 = this.zy6_1.tqn();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this.zy6_1, this.ay7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_1 = this.ay7_1.nem_1;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_125();
            this.zy6_1.kqo(this_0, 'clazzUid');
            this.zy6_1.gqt('CourseDiscussionPost', tmp_1, this.ay7_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.zy6_1, this.ay7_1, completion);
    i.by7_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.py4_1 = MutableStateFlow(new DiscussionPostEditUiState());
    this.qy4_1 = asStateFlow(this.py4_1);
    this.zqn(Companion_getInstance_97().qq6_1);
    var title = _get_discussionPostUid__impog9(this).equals(new Long(0, 0)) ? this.xqn().joj(strings_getInstance().unl_1) : this.xqn().joj(strings_getInstance().tmv_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_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.oqn();
    launch(tmp, VOID, VOID, DiscussionPostEditViewModel$slambda_0(this, null));
  }
  protoOf(DiscussionPostEditViewModel).ey7 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.py4_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.ry4_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pem_1;
        var tmp_0 = this.iqu(tmp, entity == null ? null : entity.pem_1, prevValue.ty4_1);
        var tmp2_safe_receiver = prevValue.ry4_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qem_1;
        var nextValue = prevValue.vy4(entity, VOID, tmp_0, this.iqu(tmp_1, entity == null ? null : entity.qem_1, prevValue.uy4_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_45.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.oqn();
    tmp_2.eqt_1 = launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(DiscussionPostEditViewModel).xs9 = function () {
    var tmp0_elvis_lhs = this.py4_1.t2().ry4_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.py4_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.pem_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = this.xqn().joj(strings_getInstance().vmn_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = post.qem_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_2 = this.xqn().joj(strings_getInstance().vmn_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.vy4(VOID, VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.oqn();
    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.ry4_1 = discussionPost;
    this.sy4_1 = fieldsEnabled;
    this.ty4_1 = discussionPostTitleError;
    this.uy4_1 = discussionPostDescError;
  }
  protoOf(DiscussionPostEditUiState).fy7 = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    return new DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).vy4 = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError, $super) {
    discussionPost = discussionPost === VOID ? this.ry4_1 : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? this.sy4_1 : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? this.ty4_1 : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? this.uy4_1 : discussionPostDescError;
    return $super === VOID ? this.fy7(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) : $super.fy7.call(this, discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).toString = function () {
    return 'DiscussionPostEditUiState(discussionPost=' + this.ry4_1 + ', fieldsEnabled=' + this.sy4_1 + ', discussionPostTitleError=' + this.ty4_1 + ', discussionPostDescError=' + this.uy4_1 + ')';
  };
  protoOf(DiscussionPostEditUiState).hashCode = function () {
    var result = this.ry4_1 == null ? 0 : hashCode(this.ry4_1);
    result = imul(result, 31) + getBooleanHashCode(this.sy4_1) | 0;
    result = imul(result, 31) + (this.ty4_1 == null ? 0 : getStringHashCode(this.ty4_1)) | 0;
    result = imul(result, 31) + (this.uy4_1 == null ? 0 : getStringHashCode(this.uy4_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.ry4_1, tmp0_other_with_cast.ry4_1))
      return false;
    if (!(this.sy4_1 === tmp0_other_with_cast.sy4_1))
      return false;
    if (!(this.ty4_1 == tmp0_other_with_cast.ty4_1))
      return false;
    if (!(this.uy4_1 == tmp0_other_with_cast.uy4_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.doe_1;
    } else {
      tmp = _this__u8e3s4.doe_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.ky8_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.yy8(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.hy9_1 = this$0;
    this.iy9_1 = $cevOpenUri;
    this.jy9_1 = $manifest;
    this.ky9_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda$slambda).uy9 = function (it, $completion) {
    var tmp = this.vy9(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.uy9(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.my9_1 = _get_httpClient__2ty1zc_2(this.hy9_1);
            var tmp_1 = this;
            tmp_1.ny9_1 = invoke$urlToLoad(this.ly9_1, this.iy9_1, this.jy9_1, this.hy9_1, this.ky9_1);
            var tmp_2 = this;
            tmp_2.oy9_1 = this.my9_1;
            var tmp_3 = this;
            tmp_3.py9_1 = this.oy9_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.ny9_1);
            tmp_4.qy9_1 = this_0;
            this.qy9_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.ry9_1 = this.py9_1;
            var tmp_6 = this;
            tmp_6.sy9_1 = this.qy9_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.sy9_1, this.ry9_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ty9_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.ty9_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).vy9 = function (it, completion) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this.hy9_1, this.iy9_1, this.jy9_1, this.ky9_1, completion);
    i.ly9_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.uy9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$urlToLoad_0(_this__u8e3s4, this$0, cevManifestUrlObj) {
    var tmp;
    if (this$0.gy8_1) {
      tmp = _this__u8e3s4.hog_1;
    } else {
      tmp = cevManifestUrlObj.gp2(_this__u8e3s4.zof_1).toString();
    }
    return tmp;
  }
  function EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    this.eya_1 = $manifest;
    this.fya_1 = $cevOpenUri;
    this.gya_1 = this$0;
    this.hya_1 = $opfBaseUrl;
    this.iya_1 = $argTocString;
    this.jya_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.lya_1 = requireEntryByUri(this.eya_1, this.fya_1);
            var tmp_0 = this;
            tmp_0.mya_1 = _get_httpClient__2ty1zc_2(this.gya_1);
            var tmp_1 = this;
            tmp_1.nya_1 = invoke$urlToLoad_0(this.lya_1, this.gya_1, this.jya_1);
            var tmp_2 = this;
            tmp_2.oya_1 = this.mya_1;
            var tmp_3 = this;
            tmp_3.pya_1 = this.oya_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.nya_1);
            tmp_4.qya_1 = this_0;
            this.qya_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_5 = this;
            tmp_5.rya_1 = this.pya_1;
            var tmp_6 = this;
            tmp_6.sya_1 = this.qya_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.sya_1, this.rya_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.uya_1 = suspendResult;
            this.vya_1 = _get_xml__e6jxp6(this.gya_1).s45(Companion_instance_75.n4r(), this.uya_1);
            var tmp_7 = this;
            var this_1 = this.vya_1.hof_1.moe_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.coe_1, element);
            }

            tmp_7.wya_1 = destination;
            var tmp_8 = this;
            var this_2 = this.vya_1.iof_1.lof_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.wya_1.q(element_0.ioe_1);
              var tmp_9;
              if (tmp0_safe_receiver == null) {
                tmp_9 = null;
              } else {
                tmp_9 = this.hya_1.gp2(tmp0_safe_receiver.doe_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.xya_1 = destination_0;
            var tmp_10 = this;
            var tmp0_safe_receiver_1 = this.vya_1.jof();
            var tmp_11;
            if (tmp0_safe_receiver_1 == null) {
              tmp_11 = null;
            } else {
              tmp_11 = this.hya_1.gp2(tmp0_safe_receiver_1.doe_1);
            }

            var tmp1_safe_receiver_0 = tmp_11;
            tmp_10.yya_1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.toString();
            l$ret$1: do {
              var this_3 = this.gya_1.ky8_1;
              while (true) {
                var prevValue = this_3.t2();
                var tmp0_safe_receiver_2 = firstOrNull(this.vya_1.gof_1.woe_1);
                var nextValue = prevValue.yy8(VOID, this.xya_1, VOID, VOID, VOID, this.yya_1, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.vod_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_4 = this.gya_1.bqn_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp0_safe_receiver_3 = firstOrNull(this.vya_1.gof_1.uoe_1);
                var tmp1_elvis_lhs = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.zod_1;
                var tmp_12 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
                var tmp2_elvis_lhs = this.iya_1;
                var tmp_13 = tmp2_elvis_lhs == null ? this.gya_1.xqn().joj(strings_getInstance().dnm_1) : tmp2_elvis_lhs;
                var nextValue_0 = prevValue_0.jq6(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, VOID, listOf_0(new OverflowItem(tmp_13, EpubContentViewModel$slambda$slambda$lambda(this.gya_1))));
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp_14 = this.gya_1;
            var tmp2_safe_receiver = this.vya_1.kof();
            var tmp_15;
            if (tmp2_safe_receiver == null) {
              tmp_15 = null;
            } else {
              tmp_15 = this.hya_1.gp2(tmp2_safe_receiver.doe_1).toString();
            }

            tmp_14.py8_1 = tmp_15;
            this.hd_1 = 3;
            suspendResult = this.gya_1.fy8_1.hpe(this.vya_1, EpubContentViewModel$slambda$slambda$slambda_0(this.gya_1, this.fya_1, this.eya_1, this.jya_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.gya_1.ky8_1;
              while (true) {
                var prevValue_1 = this_5.t2();
                var nextValue_1 = prevValue_1.yy8(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.eya_1, this.fya_1, this.gya_1, this.hya_1, this.iya_1, this.jya_1, completion);
    i.kya_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_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.iy8_1;
    httpClient$factory_6();
    return this_0.t2();
  }
  function _get_xml__e6jxp6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jy8_1;
    xml$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.my8_1;
    openExternalLinkUseCase$factory_2();
    return this_0.t2();
  }
  function Companion_170() {
    this.zya_1 = 'manifestUrl';
    this.ayb_1 = 'cevUri';
    this.byb_1 = 'navigationVisible';
    this.cyb_1 = 'tocString';
    this.dyb_1 = 'xapiStatementsUrl';
    this.eyb_1 = 'EpubContent';
  }
  var Companion_instance_219;
  function Companion_getInstance_187() {
    return Companion_instance_219;
  }
  function EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    this.nyb_1 = $argManifestUrl;
    this.oyb_1 = $argCevOpenUri;
    this.pyb_1 = this$0;
    this.qyb_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.nyb_1 == null) ? !(this.oyb_1 == null) : false) {
              var tmp_0 = this;
              tmp_0.syb_1 = to(this.nyb_1, this.oyb_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.pyb_1.tqn().i7f().fbq(this.pyb_1.hy8_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

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

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

            tmp_3.vyb_1 = tmp_4;
            var tmp_5 = this;
            var tmp2_elvis_lhs = this.uyb_1.nax_1;
            var tmp_6;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_6 = tmp2_elvis_lhs;
            }

            tmp_5.wyb_1 = tmp_6;
            this.syb_1 = to(this.vyb_1, this.wyb_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.xyb_1 = this.syb_1;
            this.yyb_1 = this.xyb_1.y6();
            this.zyb_1 = this.xyb_1.z6();
            this.ayc_1 = UrlKmp(this.yyb_1);
            this.byc_1 = this.ayc_1.gp2(this.zyb_1);
            var tmp_7 = this;
            tmp_7.cyc_1 = this.pyb_1.m4r();
            var tmp_8 = this;
            tmp_8.dyc_1 = _get_httpClient__2ty1zc_2(this.pyb_1);
            var tmp_9 = this;
            tmp_9.eyc_1 = this.yyb_1;
            var tmp_10 = this;
            tmp_10.fyc_1 = this.dyc_1;
            var tmp_11 = this;
            tmp_11.gyc_1 = this.fyc_1;
            var tmp_12 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.eyc_1);
            tmp_12.hyc_1 = this_0;
            this.hyc_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_13 = this;
            tmp_13.iyc_1 = this.gyc_1;
            var tmp_14 = this;
            tmp_14.jyc_1 = this.hyc_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.jyc_1, this.iyc_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 4:
            this.lyc_1 = suspendResult;
            var tmp_15 = this;
            var this_1 = this.cyc_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_15.myc_1 = this.cyc_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.lyc_1);
            this.hd_1 = 5;
            var tmp_16 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_16, EpubContentViewModel$slambda$slambda_0(this.myc_1, this.zyb_1, this.pyb_1, this.byc_1, this.qyb_1, this.ayc_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.nyb_1, this.oyb_1, this.pyb_1, this.qyb_1, completion);
    i.ryb_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).f58();
      // 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.d58(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.fy8_1 = getEpubTableOfContentsUseCase;
    this.gy8_1 = useBodyDataUrls;
    var tmp_2 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.hy8_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.iy8_1 = Instance(this, tmp$ret$2, null).a5d(this, httpClient$factory_5());
    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.jy8_1 = Instance(this, tmp$ret$4, null).a5d(this, xml$factory());
    this.ky8_1 = MutableStateFlow(new EpubContentUiState(this.hy8_1));
    this.ly8_1 = asStateFlow(this.ky8_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.my8_1 = Instance(this, tmp$ret$6, null).a5d(this, openExternalLinkUseCase$factory_1());
    this.ny8_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.oy8_1 = asSharedFlow(this.ny8_1);
    this.py8_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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, VOID, argNavigationVisible, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.oqn();
    launch(tmp_9, VOID, VOID, EpubContentViewModel$slambda_0(argManifestUrl, argCevOpenUri, this, argTocString, null));
  }
  protoOf(EpubContentViewModel).nyc = function () {
    var langCodeVal = this.ky8_1.t2().wy8_1;
    var titleVal = this.bqn_1.t2().wq5_1;
    var tmp;
    if (!(langCodeVal == null) ? !(titleVal == null) : false) {
      tmp = new TitleAndLangCode(titleVal, langCodeVal);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(EpubContentViewModel).oyc = function (baseUrl, href) {
    var url = UrlKmp(baseUrl).gp2(href);
    var urlStr = url.toString();
    var hashIndex = indexOf_0(urlStr, '#');
    var urlWithoutHash = substringBefore_0(urlStr, '#');
    var indexInSpine = this.ky8_1.t2().ry8_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.ny8_1.i1h(new EpubScrollCommand(indexInSpine, tmp));
    } else {
      _get_openExternalLinkUseCase__ku5z07_0(this).spi(url.toString(), LinkTarget_BLANK_getInstance());
    }
  };
  protoOf(EpubContentViewModel).pyc = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ky8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickTocItem.<anonymous>' call
        var nextValue = prevValue.yy8(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = this.py8_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var baseHref = tmp;
    var tmp1_elvis_lhs = tocItem.cpe_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var itemUrl = tmp_0;
    this.oyc(baseHref, itemUrl);
  };
  protoOf(EpubContentViewModel).qyc = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ky8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>' call
        var tmp;
        if (prevValue.uy8_1.a1(tocItem.ape_1)) {
          // Inline function 'kotlin.collections.filter' call
          // Inline function 'kotlin.collections.filterTo' call
          var this_1 = prevValue.uy8_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.ape_1)) {
              destination.i1(element);
            }
          }
          tmp = toSet(destination);
        } else {
          tmp = plus_2(prevValue.uy8_1, tocItem.ape_1);
        }
        var nextValue = prevValue.yy8(VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).ryc = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ky8_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onDismissTableOfContentsDrawer.<anonymous>' call
        var nextValue = prevValue.yy8(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).syc = function (index) {
    var spineSize = this.ky8_1.t2().ry8_1.u();
    if (spineSize <= 0)
      return Unit_instance;
    if (index === (spineSize - 1 | 0)) {
      this.dq3(true);
    } else {
      this.cq3(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.qy8_1 = contentEntryVersionUid;
    this.ry8_1 = spineUrls;
    this.sy8_1 = tableOfContents;
    this.ty8_1 = tableOfContentsOpen;
    this.uy8_1 = collapsedTocUids;
    this.vy8_1 = coverImageUrl;
    this.wy8_1 = langCode;
    var tmp = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.sy8_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.uy8_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.tyd(element_0)) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
        tmp$ret$0 = false;
      }
      if (!tmp$ret$0) {
        destination.i1(element);
      }
    }
    tmp.xy8_1 = destination;
  }
  protoOf(EpubContentUiState).uyd = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    return new EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).yy8 = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode, $super) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.qy8_1 : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? this.ry8_1 : spineUrls;
    tableOfContents = tableOfContents === VOID ? this.sy8_1 : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? this.ty8_1 : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? this.uy8_1 : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? this.vy8_1 : coverImageUrl;
    langCode = langCode === VOID ? this.wy8_1 : langCode;
    return $super === VOID ? this.uyd(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) : $super.uyd.call(this, contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).toString = function () {
    return 'EpubContentUiState(contentEntryVersionUid=' + this.qy8_1.toString() + ', spineUrls=' + this.ry8_1 + ', tableOfContents=' + this.sy8_1 + ', tableOfContentsOpen=' + this.ty8_1 + ', collapsedTocUids=' + this.uy8_1 + ', coverImageUrl=' + this.vy8_1 + ', langCode=' + this.wy8_1 + ')';
  };
  protoOf(EpubContentUiState).hashCode = function () {
    var result = this.qy8_1.hashCode();
    result = imul(result, 31) + hashCode(this.ry8_1) | 0;
    result = imul(result, 31) + hashCode(this.sy8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ty8_1) | 0;
    result = imul(result, 31) + hashCode(this.uy8_1) | 0;
    result = imul(result, 31) + (this.vy8_1 == null ? 0 : getStringHashCode(this.vy8_1)) | 0;
    result = imul(result, 31) + (this.wy8_1 == null ? 0 : getStringHashCode(this.wy8_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.qy8_1.equals(tmp0_other_with_cast.qy8_1))
      return false;
    if (!equals(this.ry8_1, tmp0_other_with_cast.ry8_1))
      return false;
    if (!equals(this.sy8_1, tmp0_other_with_cast.sy8_1))
      return false;
    if (!(this.ty8_1 === tmp0_other_with_cast.ty8_1))
      return false;
    if (!equals(this.uy8_1, tmp0_other_with_cast.uy8_1))
      return false;
    if (!(this.vy8_1 == tmp0_other_with_cast.vy8_1))
      return false;
    if (!(this.wy8_1 == tmp0_other_with_cast.wy8_1))
      return false;
    return true;
  };
  function EpubScrollCommand(spineIndex, hash) {
    hash = hash === VOID ? null : hash;
    this.vyd_1 = spineIndex;
    this.wyd_1 = hash;
  }
  protoOf(EpubScrollCommand).toString = function () {
    return 'EpubScrollCommand(spineIndex=' + this.vyd_1 + ', hash=' + this.wyd_1 + ')';
  };
  protoOf(EpubScrollCommand).hashCode = function () {
    var result = this.vyd_1;
    result = imul(result, 31) + (this.wyd_1 == null ? 0 : getStringHashCode(this.wyd_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.vyd_1 === tmp0_other_with_cast.vyd_1))
      return false;
    if (!(this.wyd_1 == tmp0_other_with_cast.wyd_1))
      return false;
    return true;
  };
  function EpubTocItem(uid, label, href, children, parentUids, indentLevel) {
    parentUids = parentUids === VOID ? emptySet() : parentUids;
    indentLevel = indentLevel === VOID ? 0 : indentLevel;
    this.ape_1 = uid;
    this.bpe_1 = label;
    this.cpe_1 = href;
    this.dpe_1 = children;
    this.epe_1 = parentUids;
    this.fpe_1 = indentLevel;
    var tmp = this;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp.gpe_1 = !this.dpe_1.c1();
  }
  protoOf(EpubTocItem).tyd = function (uid) {
    return this.epe_1.a1(uid);
  };
  protoOf(EpubTocItem).toString = function () {
    return 'EpubTocItem(uid=' + this.ape_1 + ', label=' + this.bpe_1 + ', href=' + this.cpe_1 + ', children=' + this.dpe_1 + ', parentUids=' + this.epe_1 + ', indentLevel=' + this.fpe_1 + ')';
  };
  protoOf(EpubTocItem).hashCode = function () {
    var result = this.ape_1;
    result = imul(result, 31) + getStringHashCode(this.bpe_1) | 0;
    result = imul(result, 31) + (this.cpe_1 == null ? 0 : getStringHashCode(this.cpe_1)) | 0;
    result = imul(result, 31) + hashCode(this.dpe_1) | 0;
    result = imul(result, 31) + hashCode(this.epe_1) | 0;
    result = imul(result, 31) + this.fpe_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.ape_1 === tmp0_other_with_cast.ape_1))
      return false;
    if (!(this.bpe_1 === tmp0_other_with_cast.bpe_1))
      return false;
    if (!(this.cpe_1 == tmp0_other_with_cast.cpe_1))
      return false;
    if (!equals(this.dpe_1, tmp0_other_with_cast.dpe_1))
      return false;
    if (!equals(this.epe_1, tmp0_other_with_cast.epe_1))
      return false;
    if (!(this.fpe_1 === tmp0_other_with_cast.fpe_1))
      return false;
    return true;
  };
  function httpClient$factory_5() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(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_6() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(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_171() {
    this.xyd_1 = 'Error';
  }
  var Companion_instance_220;
  function Companion_getInstance_188() {
    return Companion_instance_220;
  }
  function LoginViewModel$getCredentials$slambda$lambda($credentialResult) {
    return function () {
      return 'Error occurred: ' + $credentialResult.br4_1;
    };
  }
  function LoginViewModel$getCredentials$slambda$lambda_0($e) {
    return function () {
      return 'Error occurred: ' + $e.message;
    };
  }
  function _get_impl__d88w17_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xye_1;
    impl$factory_2();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yye_1;
    httpClient$factory_8();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zye_1;
    apiUrlConfig$factory_8();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.byf_1;
    setLanguageUseCase$factory_2();
    return this_0.t2();
  }
  function _get_languagesConfig__hebcss($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cyf_1;
    languagesConfig$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fyf_1;
    getVersionUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gyf_1;
    getShowPoweredByUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getCredentialUseCase__qofq9r_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jyf_1;
    getCredentialUseCase$factory_2();
    return this_0.t2();
  }
  function _get_parseCredentialUsernameUseCase__8m48wk_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kyf_1;
    parseCredentialUsernameUseCase$factory_2();
    return this_0.t2();
  }
  function onSiteVerified($this, site) {
    $this.ayf_1 = site;
    $this.zqn(Companion_getInstance_97().rq6_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.tye_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onSiteVerified.<anonymous>' call
        var tmp0_connectAsGuestVisible = site.whn_1;
        var nextValue = prevValue.ayg(VOID, VOID, true, VOID, VOID, VOID, tmp0_connectAsGuestVisible, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function goToNextDestAfterLoginOrGuestSelected($this, person) {
    var goOptions = new UstadGoOptions(VOID, VOID, true);
    var tmp = Napier_getInstance();
    tmp.k5e(VOID, VOID, LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda($this));
    if (person.n96_1) {
      var tmp_0 = $this;
      Companion_getInstance_169();
      tmp_0.vye_1 = 'ContentEntryListHome';
    }
    $this.jqu($this.zqm_1, appendSelectedAccount($this.vye_1, person.f96_1, new LearningSpace($this.wye_1)), goOptions);
  }
  function getCredentials_0($this) {
    var tmp0_elvis_lhs = _get_getCredentialUseCase__qofq9r_0($this);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var getCredentialUseCaseVal = tmp;
    var tmp_0 = $this.oqn();
    launch(tmp_0, VOID, VOID, LoginViewModel$getCredentials$slambda_0(getCredentialUseCaseVal, $this, null));
  }
  function Companion_172() {
    this.byg_1 = 'Login';
  }
  var Companion_instance_221;
  function Companion_getInstance_189() {
    return Companion_instance_221;
  }
  function LoginViewModel$slambda(this$0, resultContinuation) {
    this.kyg_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.kyg_1.ayf_1 == null)) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = verifySite(_get_httpClient__2ty1zc_3(this.kyg_1), this.kyg_1.wye_1, new Long(10000, 0), this.kyg_1.m4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.myg_1 = suspendResult;
            onSiteVerified(this.kyg_1, this.myg_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.nyg_1 = this.kd_1;
              Napier_getInstance().m5e('Could not load site object for ' + this.kyg_1.wye_1, this.nyg_1);
              l$ret$1: do {
                var this_0 = this.kyg_1.tye_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.ayg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, _get_impl__d88w17_0(this.kyg_1).joj(strings_getInstance().amj_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.kyg_1, completion);
    i.lyg_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.vye_1;
    };
  }
  function LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation) {
    this.wyg_1 = this$0;
    this.xyg_1 = $username;
    this.yyg_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 = 8;
            this.ayh_1 = null;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 7;
            this.id_1 = 6;
            this.hd_1 = 2;
            var tmp_0 = this.wyg_1.nqn();
            var this_0 = this.xyg_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.yyg_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            var tmp_3 = this.wyg_1.wye_1;
            Companion_getInstance_116();
            var tmp0_safe_receiver = this.wyg_1.xqm_1.ba('maxDob');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.roa(tmp_1, tmp_2, tmp_3, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.wyg_1.hyf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.cyh_1 = suspendResult;
            if (!this.wyg_1.iyf_1) {
              var tmp_4 = this;
              var this_2 = this.wyg_1.a57();
              var context = new LearningSpace(this.wyg_1.wye_1);
              var trigger = this_2.d57();
              var tmp_5 = Companion_instance_0;
              var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_7 = get_direct(On(this_2, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
              var tmp_8 = typeToken(createKType(getKClass(SavePasswordUseCase), arrayOf([]), false));
              tmp_4.dyh_1 = tmp_7.e58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), null);
              this.eyh_1 = this.dyh_1;
              if (this.eyh_1 == null) {
                this.fyh_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                var this_3 = this.xyg_1;
                var tmp_9 = toString(trim(isCharSequence(this_3) ? this_3 : THROW_CCE()));
                var this_4 = this.yyg_1;
                suspendResult = this.eyh_1.opc(tmp_9, toString(trim(isCharSequence(this_4) ? this_4 : THROW_CCE())), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 3:
            var tmp_10 = this;
            tmp_10.fyh_1 = Unit_instance;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            var tmp_11 = this;
            goToNextDestAfterLoginOrGuestSelected(this.wyg_1, this.cyh_1.dkz());
            tmp_11.byh_1 = Unit_instance;
            this.id_1 = 8;
            this.hd_1 = 9;
            continue $sm;
          case 6:
            this.id_1 = 7;
            var tmp_12 = this.kd_1;
            if (tmp_12 instanceof AdultAccountRequiredException) {
              var e = this.kd_1;
              var tmp_13 = this;
              this.ayh_1 = _get_impl__d88w17_0(this.wyg_1).joj(strings_getInstance().inf_1);
              tmp_13.byh_1 = Unit_instance;
              this.id_1 = 8;
              this.hd_1 = 9;
              continue $sm;
            } else {
              var tmp_14 = this.kd_1;
              if (tmp_14 instanceof UnauthorizedException) {
                var e_0 = this.kd_1;
                var tmp_15 = this;
                this.ayh_1 = _get_impl__d88w17_0(this.wyg_1).joj(strings_getInstance().zmi_1);
                tmp_15.byh_1 = Unit_instance;
                this.id_1 = 8;
                this.hd_1 = 9;
                continue $sm;
              } else {
                var tmp_16 = this.kd_1;
                if (tmp_16 instanceof ConsentNotGrantedException) {
                  var e_1 = this.kd_1;
                  var tmp_17 = this;
                  this.ayh_1 = _get_impl__d88w17_0(this.wyg_1).joj(strings_getInstance().hnf_1);
                  tmp_17.byh_1 = Unit_instance;
                  this.id_1 = 8;
                  this.hd_1 = 9;
                  continue $sm;
                } else {
                  var tmp_18 = this.kd_1;
                  if (tmp_18 instanceof Exception) {
                    var e_2 = this.kd_1;
                    var tmp_19 = this;
                    this.ayh_1 = _get_impl__d88w17_0(this.wyg_1).joj(strings_getInstance().amj_1);
                    tmp_19.byh_1 = Unit_instance;
                    this.id_1 = 8;
                    this.hd_1 = 9;
                    continue $sm;
                  } else {
                    throw this.kd_1;
                  }
                }
              }
            }

          case 7:
            this.id_1 = 8;
            var t = this.kd_1;
            this.wyg_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$3: do {
              var this_5 = this.wyg_1.tye_1;
              while (true) {
                var prevValue = this_5.t2();
                var nextValue = prevValue.ayg(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.ayh_1);
                if (this_5.y1k(prevValue, nextValue)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            throw t;
          case 8:
            throw this.kd_1;
          case 9:
            this.id_1 = 8;
            this.wyg_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$5: do {
              var this_6 = this.wyg_1.tye_1;
              while (true) {
                var prevValue_0 = this_6.t2();
                var nextValue_0 = prevValue_0.ayg(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, this.ayh_1);
                if (this_6.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_3 = $p;
        if (this.id_1 === 8) {
          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.wyg_1, this.xyg_1, this.yyg_1, completion);
    i.zyg_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.oyh_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.oyh_1.nqn().soa(this.oyh_1.wye_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var guestPerson = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.oyh_1, guestPerson.lnu_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.oyh_1, completion);
    i.pyh_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$getCredentials$slambda($getCredentialUseCaseVal, this$0, resultContinuation) {
    this.yyh_1 = $getCredentialUseCaseVal;
    this.zyh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$getCredentials$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$getCredentials$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$getCredentials$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.hd_1 = 1;
            suspendResult = this.yyh_1.jpb(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.byi_1 = suspendResult;
            var tmp_0 = this.byi_1;
            if (tmp_0 instanceof PasskeyCredentialResult) {
              this.hd_1 = 2;
              suspendResult = this.zyh_1.nqn().qoa(this.byi_1.fr6_1, this.zyh_1.wye_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this.byi_1;
              if (tmp_1 instanceof PasswordCredentialResult) {
                var tmp0_container = _get_parseCredentialUsernameUseCase__8m48wk_0(this.zyh_1).np9(this.byi_1.dr6_1);
                var learningSpace = tmp0_container.y6();
                var username = tmp0_container.z6();
                this.zyh_1.cyi(username);
                this.zyh_1.dyi(this.byi_1.er6_1);
                this.zyh_1.iyf_1 = true;
                var tmp_2 = this.zyh_1;
                var this_0 = learningSpace.tnt_1;
                Companion_getInstance_116();
                this.zyh_1.xqm_1.aqj('learningSpaceUrl', this_0);
                tmp_2.wye_1 = this_0;
                this.zyh_1.eyi();
                this.hd_1 = 3;
                continue $sm;
              } else {
                var tmp_3 = this.byi_1;
                if (tmp_3 instanceof Error_1) {
                  l$ret$1: do {
                    var this_1 = this.zyh_1.tye_1;
                    while (true) {
                      var prevValue = this_1.t2();
                      var nextValue = prevValue.ayg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.byi_1.br4_1);
                      if (this_1.y1k(prevValue, nextValue)) {
                        break l$ret$1;
                      }
                    }
                  }
                   while (false);
                  var tmp_4 = Napier_getInstance();
                  tmp_4.s5e(VOID, VOID, LoginViewModel$getCredentials$slambda$lambda(this.byi_1));
                  this.hd_1 = 3;
                  continue $sm;
                } else {
                  var tmp_5 = this.byi_1;
                  if (tmp_5 instanceof NoCredentialAvailableResult) {
                    this.hd_1 = 3;
                    continue $sm;
                  } else {
                    this.hd_1 = 3;
                    continue $sm;
                  }
                }
              }
            }

          case 2:
            var account = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.zyh_1, account.dkz());
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 4:
            this.id_1 = 5;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Exception) {
              var e = this.kd_1;
              var tmp_7 = Napier_getInstance();
              tmp_7.s5e(VOID, VOID, LoginViewModel$getCredentials$slambda$lambda_0(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(LoginViewModel$getCredentials$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$getCredentials$slambda(this.yyh_1, this.zyh_1, completion);
    i.ayi_1 = $this$launch;
    return i;
  };
  function LoginViewModel$getCredentials$slambda_0($getCredentialUseCaseVal, this$0, resultContinuation) {
    var i = new LoginViewModel$getCredentials$slambda($getCredentialUseCaseVal, 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.tye_1 = MutableStateFlow(new LoginUiState());
    this.uye_1 = asStateFlow(this.tye_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.xye_1 = Instance(this, tmp$ret$0, null).a5d(this, impl$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(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.yye_1 = Instance(this, tmp$ret$2, null).a5d(this, httpClient$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(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.zye_1 = Instance(this, tmp$ret$4, null).a5d(this, apiUrlConfig$factory_7());
    this.ayf_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.byf_1 = Instance(this, tmp$ret$6, null).a5d(this, setLanguageUseCase$factory_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(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.cyf_1 = Instance(this, tmp$ret$8, null).a5d(this, languagesConfig$factory());
    this.dyf_1 = new ValidateUsernameUseCase_0();
    this.eyf_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.fyf_1 = InstanceOrNull(this, tmp$ret$10, null).a5d(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.gyf_1 = InstanceOrNull(this, tmp$ret$12, null).a5d(this, getShowPoweredByUseCase$factory_1());
    var tmp_13 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_13.hyf_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    this.iyf_1 = false;
    var tmp_14 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_15 = typeToken(createKType(getKClass(GetCredentialUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_15, TypeToken) ? tmp_15 : THROW_CCE();
    tmp_14.jyf_1 = InstanceOrNull(this, tmp$ret$14, null).a5d(this, getCredentialUseCase$factory_1());
    var tmp_16 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_17 = typeToken(createKType(getKClass(ParseCredentialUsernameUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_17, TypeToken) ? tmp_17 : THROW_CCE();
    tmp_16.kyf_1 = Instance(this, tmp$ret$16, null).a5d(this, parseCredentialUsernameUseCase$factory_1());
    var tmp_18 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_19;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_19 = 'CourseListHome';
    } else {
      tmp_19 = tmp0_elvis_lhs;
    }
    tmp_18.vye_1 = tmp_19;
    var tmp_20 = this;
    Companion_getInstance_116();
    var tmp1_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp2_elvis_lhs = tmp1_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_3(this).vo5_1 : tmp1_elvis_lhs_0;
    tmp_20.wye_1 = tmp2_elvis_lhs == null ? 'http://localhost' : tmp2_elvis_lhs;
    Companion_getInstance_116();
    savedStateHandle.aqj('learningSpaceUrl', this.wye_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.tye_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
        var tmp_21 = this.xqn().joj(strings_getInstance().unm_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.qpe();
        var tmp_22 = tmp_21 + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ope_1);
        Companion_getInstance_116();
        var tmp_23 = savedStateHandle.ba('intMsg');
        var tmp_24 = _get_languagesConfig__hebcss(this).wq7(this.xqn());
        var tmp_25 = _get_languagesConfig__hebcss(this).xq7(this.xqn());
        var tmp2_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e_0(this);
        var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qpe();
        var nextValue = prevValue.ayg(VOID, VOID, VOID, VOID, VOID, tmp_22, VOID, tmp_23, VOID, tmp_24, tmp_25, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    Companion_getInstance_213();
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.tye_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.ayg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    var tmp3_title = _get_impl__d88w17_0(this).joj(strings_getInstance().imi_1);
    var baseAppUiState = new AppUiState(VOID, VOID, tmp3_title, false, VOID, VOID, false);
    this.wye_1 = requirePostfix(this.wye_1, '/');
    Companion_getInstance_116();
    var siteJsonStr = savedStateHandle.ba('site');
    if (!(siteJsonStr == null)) {
      this.bqn_1.x1k(baseAppUiState);
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_2 = this.m4r();
      // Inline function 'kotlinx.serialization.serializer' call
      var this_3 = this_2.t45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_4 = serializer(this_3, createKType(getKClass(Site), arrayOf([]), false));
      var tmp$ret$23 = isInterface(this_4, KSerializer) ? this_4 : THROW_CCE();
      var tmp$ret$24 = this_2.s45(tmp$ret$23, siteJsonStr);
      onSiteVerified(this, tmp$ret$24);
    } else {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_5 = this.tye_1;
        while (true) {
          var prevValue_1 = this_5.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_1 = prevValue_1.ayg(VOID, VOID, false);
          if (this_5.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
      this.bqn_1.x1k(baseAppUiState.jq6(VOID, Companion_getInstance_97().qq6_1));
      var tmp_26 = this.oqn();
      launch(tmp_26, VOID, VOID, LoginViewModel$slambda_0(this, null));
    }
    getCredentials_0(this);
  }
  protoOf(LoginViewModel).cyi = function (newValue) {
    this.iyf_1 = false;
    var filteredValue = this.eyf_1.mpe(newValue, '');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.tye_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onUsernameChanged.<anonymous>' call
        var nextValue = prevValue.ayg(filteredValue);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).dyi = function (password) {
    this.iyf_1 = false;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.tye_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.ayg(VOID, password);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).eyi = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.tye_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.lyf_1;
        var tmp0_username = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
        // Inline function 'kotlin.text.trim' call
        var this_2 = prevValue.myf_1;
        var tmp1_password = toString(trim(isCharSequence(this_2) ? this_2 : THROW_CCE()));
        var nextValue = prevValue.ayg(tmp0_username, tmp1_password, false, null, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var username = this.tye_1.t2().lyf_1;
    var password = this.tye_1.t2().myf_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.dyf_1.np9(username);
      if (!validationResult.equals(Companion_getInstance_74().mpo_1)) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_3 = this.tye_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.rpo_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_0(this).joj(tmp0_safe_receiver);
            }
            var nextValue_0 = prevValue_0.ayg(VOID, VOID, true, tmp_0);
            if (this_3.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      }
      this.zqn(Companion_getInstance_97().qq6_1);
      var tmp_1 = this.oqn();
      launch(tmp_1, VOID, VOID, LoginViewModel$onClickLogin$slambda_0(this, username, password, null));
    } else {
      this.zqn(Companion_getInstance_97().rq6_1);
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.tye_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.lyf_1;
          if (charSequenceLength(this_5) === 0) {
            tmp_2 = _get_impl__d88w17_0(this).joj(strings_getInstance().vmn_1);
          } else {
            tmp_2 = null;
          }
          var tmp_3 = tmp_2;
          var tmp_4;
          // Inline function 'kotlin.text.isEmpty' call
          var this_6 = prevValue_1.myf_1;
          if (charSequenceLength(this_6) === 0) {
            tmp_4 = _get_impl__d88w17_0(this).joj(strings_getInstance().vmn_1);
          } else {
            tmp_4 = null;
          }
          var nextValue_1 = prevValue_1.ayg(VOID, VOID, true, tmp_3, tmp_4);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).fyi = function (uiLanguage) {
    if (!uiLanguage.equals(this.tye_1.t2().uyf_1)) {
      var tmp = _get_setLanguageUseCase__st7nci_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.login.LoginViewModel.onChangeLanguage.<anonymous>' call
      Companion_getInstance_116();
      this.kqo(this_0, 'next');
      Companion_getInstance_116();
      this.kqo(this_0, 'learningSpaceUrl');
      Companion_getInstance_116();
      this.kqo(this_0, 'site');
      var tmp$ret$2 = this_0.f3();
      var result = tmp.fpi(uiLanguage, 'Login', this.zqm_1, tmp$ret$2);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.tye_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
          var nextValue = prevValue.ayg(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, uiLanguage, VOID, result.epi_1);
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).gyi = function () {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, LoginViewModel$onClickConnectAsGuest$slambda_0(this, null));
  };
  function LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) {
    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;
    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;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    errorText = errorText === VOID ? null : errorText;
    this.lyf_1 = username;
    this.myf_1 = password;
    this.nyf_1 = fieldsEnabled;
    this.oyf_1 = usernameError;
    this.pyf_1 = passwordError;
    this.qyf_1 = versionInfo;
    this.ryf_1 = connectAsGuestVisible;
    this.syf_1 = loginIntentMessage;
    this.tyf_1 = errorMessage;
    this.uyf_1 = currentLanguage;
    this.vyf_1 = languageList;
    this.wyf_1 = showWaitForRestart;
    this.xyf_1 = showPoweredBy;
    this.yyf_1 = isPersonalAccount;
    this.zyf_1 = errorText;
  }
  protoOf(LoginUiState).hyi = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) {
    return new LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText);
  };
  protoOf(LoginUiState).ayg = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText, $super) {
    username = username === VOID ? this.lyf_1 : username;
    password = password === VOID ? this.myf_1 : password;
    fieldsEnabled = fieldsEnabled === VOID ? this.nyf_1 : fieldsEnabled;
    usernameError = usernameError === VOID ? this.oyf_1 : usernameError;
    passwordError = passwordError === VOID ? this.pyf_1 : passwordError;
    versionInfo = versionInfo === VOID ? this.qyf_1 : versionInfo;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? this.ryf_1 : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? this.syf_1 : loginIntentMessage;
    errorMessage = errorMessage === VOID ? this.tyf_1 : errorMessage;
    currentLanguage = currentLanguage === VOID ? this.uyf_1 : currentLanguage;
    languageList = languageList === VOID ? this.vyf_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.wyf_1 : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? this.xyf_1 : showPoweredBy;
    isPersonalAccount = isPersonalAccount === VOID ? this.yyf_1 : isPersonalAccount;
    errorText = errorText === VOID ? this.zyf_1 : errorText;
    return $super === VOID ? this.hyi(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText) : $super.hyi.call(this, username, password, fieldsEnabled, usernameError, passwordError, versionInfo, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, isPersonalAccount, errorText);
  };
  protoOf(LoginUiState).toString = function () {
    return 'LoginUiState(username=' + this.lyf_1 + ', password=' + this.myf_1 + ', fieldsEnabled=' + this.nyf_1 + ', usernameError=' + this.oyf_1 + ', passwordError=' + this.pyf_1 + ', versionInfo=' + this.qyf_1 + ', connectAsGuestVisible=' + this.ryf_1 + ', loginIntentMessage=' + this.syf_1 + ', errorMessage=' + this.tyf_1 + ', currentLanguage=' + this.uyf_1 + ', languageList=' + this.vyf_1 + ', showWaitForRestart=' + this.wyf_1 + ', showPoweredBy=' + this.xyf_1 + ', isPersonalAccount=' + this.yyf_1 + ', errorText=' + this.zyf_1 + ')';
  };
  protoOf(LoginUiState).hashCode = function () {
    var result = getStringHashCode(this.lyf_1);
    result = imul(result, 31) + getStringHashCode(this.myf_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nyf_1) | 0;
    result = imul(result, 31) + (this.oyf_1 == null ? 0 : getStringHashCode(this.oyf_1)) | 0;
    result = imul(result, 31) + (this.pyf_1 == null ? 0 : getStringHashCode(this.pyf_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.qyf_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ryf_1) | 0;
    result = imul(result, 31) + (this.syf_1 == null ? 0 : getStringHashCode(this.syf_1)) | 0;
    result = imul(result, 31) + (this.tyf_1 == null ? 0 : getStringHashCode(this.tyf_1)) | 0;
    result = imul(result, 31) + this.uyf_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.vyf_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wyf_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xyf_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yyf_1) | 0;
    result = imul(result, 31) + (this.zyf_1 == null ? 0 : getStringHashCode(this.zyf_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.lyf_1 === tmp0_other_with_cast.lyf_1))
      return false;
    if (!(this.myf_1 === tmp0_other_with_cast.myf_1))
      return false;
    if (!(this.nyf_1 === tmp0_other_with_cast.nyf_1))
      return false;
    if (!(this.oyf_1 == tmp0_other_with_cast.oyf_1))
      return false;
    if (!(this.pyf_1 == tmp0_other_with_cast.pyf_1))
      return false;
    if (!(this.qyf_1 === tmp0_other_with_cast.qyf_1))
      return false;
    if (!(this.ryf_1 === tmp0_other_with_cast.ryf_1))
      return false;
    if (!(this.syf_1 == tmp0_other_with_cast.syf_1))
      return false;
    if (!(this.tyf_1 == tmp0_other_with_cast.tyf_1))
      return false;
    if (!this.uyf_1.equals(tmp0_other_with_cast.uyf_1))
      return false;
    if (!equals(this.vyf_1, tmp0_other_with_cast.vyf_1))
      return false;
    if (!(this.wyf_1 === tmp0_other_with_cast.wyf_1))
      return false;
    if (!(this.xyf_1 === tmp0_other_with_cast.xyf_1))
      return false;
    if (!(this.yyf_1 === tmp0_other_with_cast.yyf_1))
      return false;
    if (!(this.zyf_1 == tmp0_other_with_cast.zyf_1))
      return false;
    return true;
  };
  function impl$factory_1() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_7() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function apiUrlConfig$factory_7() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_1() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(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 getCredentialUseCase$factory_1() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r_0(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_1() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk_0(receiver);
    }, null);
  }
  function impl$factory_2() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_8() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function apiUrlConfig$factory_8() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_2() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(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 getCredentialUseCase$factory_2() {
    return getPropertyCallableRef('getCredentialUseCase', 1, KProperty1, function (receiver) {
      return _get_getCredentialUseCase__qofq9r_0(receiver);
    }, null);
  }
  function parseCredentialUsernameUseCase$factory_2() {
    return getPropertyCallableRef('parseCredentialUsernameUseCase', 1, KProperty1, function (receiver) {
      return _get_parseCredentialUsernameUseCase__8m48wk_0(receiver);
    }, null);
  }
  function daysUntil_0(_this__u8e3s4, other) {
    return daysUntil(Companion_getInstance_6().fmh(_this__u8e3s4.vfl_1), Companion_getInstance_6().fmh(other.vfl_1), Companion_getInstance_9().xmh());
  }
  function Companion_173() {
    Companion_instance_222 = this;
    this.iyi_1 = 'ConversationList';
    this.jyi_1 = 'ConversationListHome';
    this.kyi_1 = listOf(['ConversationList', 'ConversationListHome']);
  }
  var Companion_instance_222;
  function Companion_getInstance_190() {
    if (Companion_instance_222 == null)
      new Companion_173();
    return Companion_instance_222;
  }
  function ConversationListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().f7f().bfl(toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_1), this$0.pqn());
    };
  }
  function ConversationListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.nqw();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function ConversationListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_190();
    destinationName = destinationName === VOID ? 'ConversationList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ConversationListUiState(), destinationName);
    var tmp = this;
    tmp.lyj_1 = ConversationListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_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.xqn().joj(get_dayStringResource(element));
          result.s(element, tmp$ret$0);
        }
        var tmp1_conversations = this.lyj_1;
        var nextValue = prevValue.ryj(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.bqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        var tmp0_searchState = this.bqx();
        var tmp1_title = this.jqx(strings_getInstance().tni_1, strings_getInstance().qnl_1);
        var tmp_0 = this.xqn().joj(strings_getInstance().uni_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.jq6(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).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(ConversationListViewModel).nqw = function () {
    Companion_getInstance_204();
    var tmp = to('goToOnPersonSelected', 'MessageList');
    Companion_getInstance_116();
    var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().wqj_1);
    Companion_getInstance_204();
    var tmp_1 = to('excludeAlreadySelectedList', this.pqn().toString());
    Companion_getInstance_204();
    this.zqm_1.kp6('People', mapOf([tmp, tmp_0, tmp_1, to('popUpToOnPersonSelected', 'People')]));
  };
  protoOf(ConversationListViewModel).syj = function (entry) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = entry.xfm_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f96_1;
    this.zqm_1.kp6('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.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.myj_1 = conversations;
    this.nyj_1 = sortOptions;
    this.oyj_1 = showAddItem;
    this.pyj_1 = localDateTimeNow;
    this.qyj_1 = dayOfWeekStrings;
  }
  protoOf(ConversationListUiState).tyj = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    return new ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).ryj = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings, $super) {
    conversations = conversations === VOID ? this.myj_1 : conversations;
    sortOptions = sortOptions === VOID ? this.nyj_1 : sortOptions;
    showAddItem = showAddItem === VOID ? this.oyj_1 : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? this.pyj_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.qyj_1 : dayOfWeekStrings;
    return $super === VOID ? this.tyj(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) : $super.tyj.call(this, conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).toString = function () {
    return 'ConversationListUiState(conversations=' + this.myj_1 + ', sortOptions=' + this.nyj_1 + ', showAddItem=' + this.oyj_1 + ', localDateTimeNow=' + this.pyj_1 + ', dayOfWeekStrings=' + this.qyj_1 + ')';
  };
  protoOf(ConversationListUiState).hashCode = function () {
    var result = hashCode(this.myj_1);
    result = imul(result, 31) + hashCode(this.nyj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oyj_1) | 0;
    result = imul(result, 31) + this.pyj_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.qyj_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.myj_1, tmp0_other_with_cast.myj_1))
      return false;
    if (!equals(this.nyj_1, tmp0_other_with_cast.nyj_1))
      return false;
    if (!(this.oyj_1 === tmp0_other_with_cast.oyj_1))
      return false;
    if (!this.pyj_1.equals(tmp0_other_with_cast.pyj_1))
      return false;
    if (!equals(this.qyj_1, tmp0_other_with_cast.qyj_1))
      return false;
    return true;
  };
  function MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.cyk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda$slambda).con = function (it, $completion) {
    var tmp = this.don(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.con((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.cyk_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.dyk_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zg8_1;
              var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
              var tmp2_safe_receiver = this.dyk_1;
              var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ag9_1;
              var nextValue = prevValue.jq6(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).don = function (it, completion) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this.cyk_1, completion);
    i.dyk_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.con(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.myk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.myk_1.tqn().n7d().qg4(this.myk_1.nyl_1);
            var tmp_1 = MessageListViewModel$slambda$slambda$slambda_0(this.myk_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_32(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).l78 = function (completion) {
    return new MessageListViewModel$slambda$slambda(this.myk_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_ustadAccountManager__el9prc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.oyl_1;
    ustadAccountManager$factory_2();
    return this_0.t2();
  }
  function _get_showSocialWarningUseCase__ft8jc6_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pyl_1;
    showSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_dismissSocialWarningUseCase__st8mv5_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qyl_1;
    dismissSocialWarningUseCase$factory_2();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ryl_1;
    openExternalLinkUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_174() {
    this.tyl_1 = 'MessageList';
  }
  var Companion_instance_223;
  function Companion_getInstance_191() {
    return Companion_instance_223;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_32(function_0) {
    this.uyl_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_32).t1d = function (value, $completion) {
    return this.uyl_1(value, $completion);
  };
  function MessageListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().f7f().afl(this$0.pqn(), this$0.nyl_1);
    };
  }
  function MessageListViewModel$slambda(this$0, resultContinuation) {
    this.dym_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.dym_1.sqv_1, MessageListViewModel$slambda$slambda_0(this.dym_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.dym_1, completion);
    i.eym_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.nym_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.nym_1).pp1(toString_0(_get_ustadAccountManager__el9prc_0(this.nym_1).ro9().lnu_1.g96_1));
          l$ret$1: do {
            var this_0 = this.nym_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.vym(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.nym_1, completion);
    i.oym_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.eyn_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.eyn_1.tqn().f7f();
            var tmp0_messageSenderPersonUid = this.eyn_1.pqn();
            var this_0 = this.eyn_1.sqv_1.t2().rym_1;
            var tmp1_messageText = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var tmp2_messageToPersonUid = this.eyn_1.nyl_1;
            var tmp3_messageTimestamp = systemTimeInMillis();
            suspendResult = tmp_0.cfl(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.eyn_1.sqv_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.vym(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.eyn_1, completion);
    i.fyn_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_116();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nyl_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.oyl_1 = Instance(di, tmp$ret$0, null).a5d(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.pyl_1 = Instance(di, tmp$ret$2, null).a5d(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.qyl_1 = Instance(di, tmp$ret$4, null).a5d(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.ryl_1 = Instance(di, tmp$ret$6, null).a5d(this, openExternalLinkUseCase$factory_3());
    var tmp_8 = this;
    tmp_8.syl_1 = MessageListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(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.sqv_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.xqn().joj(get_dayStringResource(element));
          result.s(element, tmp$ret$10);
        }
        var tmp1_messages = this.syl_1;
        var tmp2_activePersonUid = this.pqn();
        var tmp3_showSocialWarning = _get_showSocialWarningUseCase__ft8jc6_0(this).np9(toString_0(_get_ustadAccountManager__el9prc_0(this).ro9().lnu_1.g96_1));
        var nextValue_0 = prevValue_0.vym(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.oqn();
    launch(tmp_9, VOID, VOID, MessageListViewModel$slambda_0(this, null));
  }
  protoOf(MessageListViewModel).ftv = function () {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, MessageListViewModel$onWarningDismiss$slambda_0(this, null));
  };
  protoOf(MessageListViewModel).mqw = function (searchText) {
    // Inline function 'kotlin.TODO' call
    var reason = 'Not yet implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(MessageListViewModel).nqw = function () {
  };
  protoOf(MessageListViewModel).gyn = function (text) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.onChangeNewMessageText.<anonymous>' call
        var nextValue = prevValue.vym(VOID, VOID, text);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(MessageListViewModel).zsq = function () {
    var tmp = this.oqn();
    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.ymd(), Companion_getInstance_9().xmh()) : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? true : showSocialWarning;
    this.pym_1 = messages;
    this.qym_1 = activePersonUid;
    this.rym_1 = newMessageText;
    this.sym_1 = dayOfWeekStrings;
    this.tym_1 = localDateTimeNow;
    this.uym_1 = showSocialWarning;
  }
  protoOf(MessageListUiState).hyn = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) {
    return new MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).vym = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning, $super) {
    messages = messages === VOID ? this.pym_1 : messages;
    activePersonUid = activePersonUid === VOID ? this.qym_1 : activePersonUid;
    newMessageText = newMessageText === VOID ? this.rym_1 : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.sym_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.tym_1 : localDateTimeNow;
    showSocialWarning = showSocialWarning === VOID ? this.uym_1 : showSocialWarning;
    return $super === VOID ? this.hyn(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning) : $super.hyn.call(this, messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, showSocialWarning);
  };
  protoOf(MessageListUiState).toString = function () {
    return 'MessageListUiState(messages=' + this.pym_1 + ', activePersonUid=' + this.qym_1.toString() + ', newMessageText=' + this.rym_1 + ', dayOfWeekStrings=' + this.sym_1 + ', localDateTimeNow=' + this.tym_1 + ', showSocialWarning=' + this.uym_1 + ')';
  };
  protoOf(MessageListUiState).hashCode = function () {
    var result = hashCode(this.pym_1);
    result = imul(result, 31) + this.qym_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.rym_1) | 0;
    result = imul(result, 31) + hashCode(this.sym_1) | 0;
    result = imul(result, 31) + this.tym_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uym_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.pym_1, tmp0_other_with_cast.pym_1))
      return false;
    if (!this.qym_1.equals(tmp0_other_with_cast.qym_1))
      return false;
    if (!(this.rym_1 === tmp0_other_with_cast.rym_1))
      return false;
    if (!equals(this.sym_1, tmp0_other_with_cast.sym_1))
      return false;
    if (!this.tym_1.equals(tmp0_other_with_cast.tym_1))
      return false;
    if (!(this.uym_1 === tmp0_other_with_cast.uym_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.iyn_1 = title;
    this.jyn_1 = langCode;
  }
  protoOf(TitleAndLangCode).toString = function () {
    return 'TitleAndLangCode(title=' + this.iyn_1 + ', langCode=' + this.jyn_1 + ')';
  };
  protoOf(TitleAndLangCode).hashCode = function () {
    var result = getStringHashCode(this.iyn_1);
    result = imul(result, 31) + getStringHashCode(this.jyn_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.iyn_1 === tmp0_other_with_cast.iyn_1))
      return false;
    if (!(this.jyn_1 === tmp0_other_with_cast.jyn_1))
      return false;
    return true;
  };
  function _get_statementRecorder__l4o9jw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ryd_1;
    statementRecorder$factory();
    return this_0.t2();
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0) {
    return function () {
      var titleAndLangCodeVal = this$0.nyc();
      var tmp = this$0.qyd_1.ujz_1;
      var tmp_0;
      if (!(titleAndLangCodeVal == null)) {
        tmp_0 = mapOf_0(to(titleAndLangCodeVal.jyn_1, titleAndLangCodeVal.iyn_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.pqo(this$0.pyd_1);
      var tmp_0 = this$0.oqn();
      return this$0.oyd_1.kq3(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(onActiveLearningSpace(di)).f58();
    // 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.oyd_1 = tmp_0.d58(tmp$ret$0, null);
    var tmp_2 = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.pyd_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.qyd_1 = this.pqo(this.pyd_1);
    var tmp_3 = this;
    tmp_3.ryd_1 = lazy_0(AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this));
  }
  protoOf(AbstractNonInteractiveContentViewModel).dq3 = function (oneCompletionStatementOnly) {
    _get_statementRecorder__l4o9jw(this).dq3(oneCompletionStatementOnly);
  };
  protoOf(AbstractNonInteractiveContentViewModel).syd = function (oneCompletionStatementOnly, $super) {
    oneCompletionStatementOnly = oneCompletionStatementOnly === VOID ? false : oneCompletionStatementOnly;
    var tmp;
    if ($super === VOID) {
      this.dq3(oneCompletionStatementOnly);
      tmp = Unit_instance;
    } else {
      tmp = $super.dq3.call(this, oneCompletionStatementOnly);
    }
    return tmp;
  };
  protoOf(AbstractNonInteractiveContentViewModel).cq3 = function (progress) {
    _get_statementRecorder__l4o9jw(this).cq3(progress);
  };
  protoOf(AbstractNonInteractiveContentViewModel).pq2 = function (active) {
    _get_statementRecorder__l4o9jw(this).pq2(active);
  };
  protoOf(AbstractNonInteractiveContentViewModel).um7 = function () {
    _get_statementRecorder__l4o9jw(this).um7();
    protoOf(UstadViewModel).um7.call(this);
  };
  protoOf(AbstractNonInteractiveContentViewModel).fq3 = function () {
    _get_statementRecorder__l4o9jw(this).fq3();
  };
  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.syn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).uyn = function (db, $completion) {
    var tmp = this.vny(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.uyn(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.tyn_1.x7e().vgs(this.syn_1.fqt_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.dgu_1;
              var tmp_2;
              if (tmp0_safe_receiver_0 == null) {
                tmp_2 = null;
              } else {
                tmp_2 = !(!tmp0_safe_receiver_0.eg8_1.equals(new Long(0, 0)) ? !tmp0_safe_receiver_0.eg8_1.equals(this.syn_1.pqn()) : 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).vny = function (db, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this.syn_1, completion);
    i.tyn_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.uyn(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).dyo = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).m78 = function ($completion) {
    return this.dyo($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).l78 = 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.dyo($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.byp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jyp(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.dyp_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.byp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
        var tmp1_safe_receiver = prevValue.eyp_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.eyp_1.dgu_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.pks(tmp_0);
        }
        var nextValue = prevValue.jyp(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.eyp_1;
    var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.dgu_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.oqn();
      launch(tmp_1, VOID, VOID, ParentalConsentManagementViewModel$updateStatus$slambda_0($this, tmp1_safe_receiver_0, null));
    }
    $this.vqn().yq6(new Snack($this.xqn().joj(strings_getInstance().znf_1)));
  }
  function Companion_175() {
    this.kyp_1 = 'ParentalConsentManagement';
  }
  var Companion_instance_224;
  function Companion_getInstance_192() {
    return Companion_instance_224;
  }
  function ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation) {
    this.typ_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_46.n4r();
            var tmp_1 = ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this.typ_1, null);
            var tmp_2 = ParentalConsentManagementViewModel$lambda$slambda$slambda_2(null);
            suspendResult = this.typ_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, ParentalConsentManagementViewModel$lambda$slambda$lambda(this.typ_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.typ_1.byp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jyp(VOID, VOID, VOID, !(prevValue.eyp_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.typ_1, completion);
    i.uyp_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.dyq_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.fyq_1 = this.dyq_1.tqn().w7e();
            this.hd_1 = 1;
            suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id(this.dyq_1).jpm(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            var terms = suspendResult;
            l$ret$1: do {
              var this_0 = this.dyq_1.byp_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jyp(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.dyq_1, completion);
    i.eyq_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.bqn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jq6(VOID, VOID, this$0.xqn().joj(strings_getInstance().qnb_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.oqn();
      launch(tmp, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_0(this$0, null));
      var tmp_0 = this$0.oqn();
      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.kg8_1 = $status;
      $this$shallowCopy.eg8_1 = this$0.pqn();
      $this$shallowCopy.lg8_1 = systemTimeInMillis();
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation) {
    this.pyq_1 = this$0;
    this.qyq_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.pyq_1.tqn().x7e().wgs(this.qyq_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.pyq_1, this.qyq_1, completion);
    i.ryq_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.byp_1 = MutableStateFlow(new ParentalConsentManagementUiState());
    this.cyp_1 = asStateFlow(this.byp_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.nqn().ioa();
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(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.dyp_1 = Instance(this_0, tmp$ret$3, null).a5d(this, getLocaleForSiteTermsUseCase$factory());
    Companion_getInstance_125();
    var tmp_3 = mapOf_0(to('entityUid', this.fqt_1.toString()));
    this.mqo(true, tmp_3, ParentalConsentManagementViewModel$lambda(this));
  }
  protoOf(ParentalConsentManagementViewModel).syq = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.byp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.eyp_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pks(personParentJoin);
        var tmp1_safe_receiver = prevValue.eyp_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.dgu_1;
        var tmp_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.gg8_1;
        var nextValue = prevValue.jyp(tmp, this.iqu(tmp_0, personParentJoin == null ? null : personParentJoin.gg8_1, prevValue.fyp_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ParentalConsentManagementViewModel).tyq = function () {
    var tmp0_safe_receiver = this.byp_1.t2().eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gg8_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.byp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
          var nextValue = prevValue.jyp(VOID, this.xqn().joj(strings_getInstance().vmn_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    updateStatus(this, 1);
  };
  protoOf(ParentalConsentManagementViewModel).uyq = function () {
    updateStatus(this, 2);
  };
  protoOf(ParentalConsentManagementViewModel).vyq = function () {
    var tmp0_safe_receiver = this.byp_1.t2().eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_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.eyp_1 = parentJoinAndMinor;
    this.fyp_1 = relationshipError;
    this.gyp_1 = siteTerms;
    this.hyp_1 = fieldsEnabled;
    this.iyp_1 = appName;
  }
  protoOf(ParentalConsentManagementUiState).wyq = function () {
    var tmp0_safe_receiver = this.eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).xyq = function () {
    var tmp0_safe_receiver = this.eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).yyq = function () {
    var tmp0_safe_receiver = this.eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.eg8_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).zyq = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_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.eg8_1;
    return !(it == null) ? !equals(it, new Long(0, 0)) : false;
  };
  protoOf(ParentalConsentManagementUiState).ayr = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_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.kg8_1;
    return !(it == null) ? !(it === 0) : false;
  };
  protoOf(ParentalConsentManagementUiState).byr = function () {
    var tmp0_safe_receiver = this.eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().nnb_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().onb_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).cyr = function () {
    var tmp0_safe_receiver = this.eyp_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.dgu_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kg8_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().lnb_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().mnb_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).dyr = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    return new ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).jyp = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName, $super) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? this.eyp_1 : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? this.fyp_1 : relationshipError;
    siteTerms = siteTerms === VOID ? this.gyp_1 : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? this.hyp_1 : fieldsEnabled;
    appName = appName === VOID ? this.iyp_1 : appName;
    return $super === VOID ? this.dyr(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) : $super.dyr.call(this, parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).toString = function () {
    return 'ParentalConsentManagementUiState(parentJoinAndMinor=' + this.eyp_1 + ', relationshipError=' + this.fyp_1 + ', siteTerms=' + this.gyp_1 + ', fieldsEnabled=' + this.hyp_1 + ', appName=' + this.iyp_1 + ')';
  };
  protoOf(ParentalConsentManagementUiState).hashCode = function () {
    var result = this.eyp_1 == null ? 0 : this.eyp_1.hashCode();
    result = imul(result, 31) + (this.fyp_1 == null ? 0 : getStringHashCode(this.fyp_1)) | 0;
    result = imul(result, 31) + (this.gyp_1 == null ? 0 : hashCode(this.gyp_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hyp_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.iyp_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.eyp_1, tmp0_other_with_cast.eyp_1))
      return false;
    if (!(this.fyp_1 == tmp0_other_with_cast.fyp_1))
      return false;
    if (!equals(this.gyp_1, tmp0_other_with_cast.gyp_1))
      return false;
    if (!(this.hyp_1 === tmp0_other_with_cast.hyp_1))
      return false;
    if (!(this.iyp_1 === tmp0_other_with_cast.iyp_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_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gys_1;
    httpClient$factory_10();
    return this_0.t2();
  }
  function Companion_176() {
    this.hys_1 = 'PdfContent';
  }
  var Companion_instance_225;
  function Companion_getInstance_193() {
    return Companion_instance_225;
  }
  function PdfContentViewModel$slambda(this$0, resultContinuation) {
    this.qys_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.qys_1.tqn().i7f().fbq(this.qys_1.dys_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            tmp_0.tys_1 = tmp_1;
            this.uys_1 = ensureNotNull(this.tys_1.pax_1);
            var tmp_2 = this;
            tmp_2.vys_1 = this.qys_1.m4r();
            var tmp_3 = this;
            tmp_3.wys_1 = _get_httpClient__2ty1zc_4(this.qys_1);
            var tmp_4 = this;
            tmp_4.xys_1 = this.uys_1;
            var tmp_5 = this;
            tmp_5.yys_1 = this.wys_1;
            var tmp_6 = this;
            tmp_6.zys_1 = this.yys_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.xys_1);
            tmp_7.ayt_1 = this_0;
            this.ayt_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.byt_1 = this.zys_1;
            var tmp_9 = this;
            tmp_9.cyt_1 = this.ayt_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.cyt_1, this.byt_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 3:
            this.eyt_1 = suspendResult;
            var tmp_10 = this;
            var this_1 = this.vys_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_10.fyt_1 = this.vys_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.eyt_1);
            var tmp_11 = this;
            var tmp1_elvis_lhs = this.tys_1.nax_1;
            var tmp_12;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_12 = tmp1_elvis_lhs;
            }

            tmp_11.gyt_1 = tmp_12;
            this.hyt_1 = UrlKmp(this.uys_1).gp2(this.gyt_1).toString();
            this.iyt_1 = bodyDataUrlForUri(this.fyt_1, this.gyt_1);
            l$ret$1: do {
              var this_3 = this.qys_1.eys_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.myt(this.hyt_1, this.iyt_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 4;
            suspendResult = this.qys_1.tqn().v7d().rau(this.tys_1.max_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var contentEntry = suspendResult;
            l$ret$3: do {
              var this_4 = this.qys_1.bqn_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp1_elvis_lhs_0 = contentEntry == null ? null : contentEntry.oav_1;
                var nextValue_0 = prevValue_0.jq6(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.qys_1, completion);
    i.rys_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_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.dys_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.eys_1 = MutableStateFlow(new PdfContentUiState());
    this.fys_1 = asStateFlow(this.eys_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.gys_1 = Instance(di, tmp$ret$0, null).a5d(this, httpClient$factory_9());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, PdfContentViewModel$slambda_0(this, null));
  }
  protoOf(PdfContentViewModel).nyc = function () {
    var tmp0_safe_receiver = this.eys_1.t2().lyt_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.oav_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.jyt_1 = pdfUrl;
    this.kyt_1 = dataUrl;
    this.lyt_1 = contentEntry;
  }
  protoOf(PdfContentUiState).nyt = function (pdfUrl, dataUrl, contentEntry) {
    return new PdfContentUiState(pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).myt = function (pdfUrl, dataUrl, contentEntry, $super) {
    pdfUrl = pdfUrl === VOID ? this.jyt_1 : pdfUrl;
    dataUrl = dataUrl === VOID ? this.kyt_1 : dataUrl;
    contentEntry = contentEntry === VOID ? this.lyt_1 : contentEntry;
    return $super === VOID ? this.nyt(pdfUrl, dataUrl, contentEntry) : $super.nyt.call(this, pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).toString = function () {
    return 'PdfContentUiState(pdfUrl=' + this.jyt_1 + ', dataUrl=' + this.kyt_1 + ', contentEntry=' + this.lyt_1 + ')';
  };
  protoOf(PdfContentUiState).hashCode = function () {
    var result = this.jyt_1 == null ? 0 : getStringHashCode(this.jyt_1);
    result = imul(result, 31) + (this.kyt_1 == null ? 0 : getStringHashCode(this.kyt_1)) | 0;
    result = imul(result, 31) + (this.lyt_1 == null ? 0 : this.lyt_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.jyt_1 == tmp0_other_with_cast.jyt_1))
      return false;
    if (!(this.kyt_1 == tmp0_other_with_cast.kyt_1))
      return false;
    if (!equals(this.lyt_1, tmp0_other_with_cast.lyt_1))
      return false;
    return true;
  };
  function httpClient$factory_9() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function httpClient$factory_10() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function PersonViewModelConstants() {
    this.oyt_1 = 'goToOnPersonSelected';
    this.pyt_1 = 'popUpToOnPersonSelected';
  }
  var PersonViewModelConstants_instance;
  function PersonViewModelConstants_getInstance() {
    return PersonViewModelConstants_instance;
  }
  function PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.yyt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda).byu = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.byu(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.zyt_1.n7d().mg4(this.yyt_1.fqt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ayu_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.zyt_1.p7f();
            var tmp_1 = this.yyt_1.pqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ti0(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.ayu_1 == null) {
              tmp_2 = null;
            } else {
              var tmp_3 = this.ayu_1.g96_1 == null ? 1 : hasResetPermission ? 2 : 3;
              var tmp_4 = this.ayu_1.f96_1;
              var tmp0_elvis_lhs = this.ayu_1.g96_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).vny = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this.yyt_1, completion);
    i.zyt_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.byu(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).kyu = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.kyu($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).l78 = 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.kyu($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.iyv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.uyv(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonAccountEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.dyw_1 = this$0;
    this.eyw_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.dyw_1).qnt(this.dyw_1.fqt_1, this.eyw_1.kyw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.dyw_1.tqn().n7d().sg4(this.dyw_1.fqt_1, this.eyw_1.iyw_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var numChanges = suspendResult;
            Napier_getInstance().q5e('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).vny = function (it, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this.dyw_1, this.eyw_1, completion);
    i.fyw_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_authManager__mo6de4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kyv_1;
    authManager$factory_0();
    return this_0.t2();
  }
  function _get_setPasswordUseCase__c0ja9b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lyv_1;
    setPasswordUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_177() {
    this.lyw_1 = 'AccountEdit';
    this.myw_1 = 1;
    this.nyw_1 = 2;
    this.oyw_1 = 3;
  }
  var Companion_instance_226;
  function Companion_getInstance_194() {
    return Companion_instance_226;
  }
  function PersonAccountEditViewModel$slambda(this$0, resultContinuation) {
    this.xyw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.xyw_1.fqt_1.equals(this.xyw_1.pqn())) {
              var tmp_0 = this;
              tmp_0.zyw_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.yyw_1.p7f();
              var tmp_2 = this.xyw_1.pqn();
              PermissionFlags_getInstance();
              suspendResult = tmp_1.ti0(tmp_2, new Long(32768, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.zyw_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.zyw_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).vny = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda(this.xyw_1, completion);
    i.yyw_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.jsc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda_1(this$0, resultContinuation) {
    this.iyx_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_227.n4r();
            var tmp_1 = PersonAccountEditViewModel$slambda$slambda_0(this.iyx_1, null);
            var tmp_2 = PersonAccountEditViewModel$slambda$slambda_2(null);
            suspendResult = this.iyx_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonAccountEditViewModel$slambda$lambda(this.iyx_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.iyx_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.iyx_1.xqn().joj(strings_getInstance().hn3_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, PersonAccountEditViewModel$onClickSave$ref(this.iyx_1));
                var tmp1_loadingState = Companion_getInstance_97().rq6_1;
                var nextValue = prevValue.jq6(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.iyx_1.iyv_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.uyv(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.iyx_1, completion);
    i.jyx_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.syx_1 = $commitDelay;
    this.tyx_1 = $entity;
    this.uyx_1 = $this;
    this.vyx_1 = $key;
    this.wyx_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.syx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.tyx_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.uyx_1.dqo(this.uyx_1.xqm_1, this.vyx_1, this.wyx_1, this.tyx_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.syx_1, this.tyx_1, this.uyx_1, this.vyx_1, this.wyx_1, completion);
    i.xyx_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.gyy_1 = $entity;
    this.hyy_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.gyy_1.gyw_1 === 1) {
              var validationResult = this.hyy_1.myv_1.np9(this.gyy_1.iyw_1);
              this.hyy_1.zqn(Companion_getInstance_97().rq6_1);
              if (!validationResult.equals(Companion_getInstance_74().mpo_1)) {
                l$ret$1: do {
                  var this_0 = this.hyy_1.iyv_1;
                  while (true) {
                    var prevValue = this_0.t2();
                    var tmp0_safe_receiver = validationResult.rpo_1;
                    var tmp_0;
                    if (tmp0_safe_receiver == null) {
                      tmp_0 = null;
                    } else {
                      tmp_0 = this.hyy_1.xqn().joj(tmp0_safe_receiver);
                    }
                    var tmp1_usernameError = tmp_0;
                    var nextValue = prevValue.uyv(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.gyy_1.kyw_1)) {
              l$ret$3: do {
                var this_1 = this.hyy_1.iyv_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.uyv(VOID, VOID, VOID, this.hyy_1.xqn().joj(strings_getInstance().vmn_1));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.gyy_1.gyw_1 === 3 ? isBlank(this.gyy_1.jyw_1) : false)
              if (this.hyy_1.iyv_1.t2().ou4()) {
                this.hyy_1.zqn(Companion_getInstance_97().rq6_1);
                l$ret$5: do {
                  var this_2 = this.hyy_1.iyv_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.uyv(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.gyy_1.gyw_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.hyy_1).ioi(this.hyy_1.pqn(), this.gyy_1.hyw_1, this.gyy_1.iyw_1, this.gyy_1.kyw_1, this.gyy_1.gyw_1 === 3 ? this.gyy_1.jyw_1 : null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hyy_1.vqn().yq6(new Snack(this.hyy_1.xqn().joj(strings_getInstance().nnm_1)));
            var tmp_1 = this;
            this.hyy_1.iqt(null);
            tmp_1.kyy_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.lyy_1 = this.kd_1;
              var tmp_3 = this;
              var tmp_4;
              var tmp_5 = this.lyy_1;
              if (tmp_5 instanceof UnauthorizedException) {
                l$ret$19: do {
                  var this_3 = this.hyy_1.iyv_1;
                  while (true) {
                    var prevValue_2 = this_3.t2();
                    var nextValue_2 = prevValue_2.uyv(VOID, VOID, this.hyy_1.xqn().joj(strings_getInstance().zmi_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.hyy_1.iyv_1;
                  while (true) {
                    var prevValue_3 = this_4.t2();
                    var nextValue_3 = prevValue_3.uyv(VOID, VOID, VOID, VOID, this.lyy_1.message);
                    if (this_4.y1k(prevValue_3, nextValue_3)) {
                      break l$ret$21;
                    }
                  }
                }
                 while (false);
                tmp_4 = Unit_instance;
              }
              tmp_3.kyy_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.myy_1 = this.kd_1;
            this.hyy_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$23: do {
              var this_5 = this.hyy_1.iyv_1;
              while (true) {
                var prevValue_4 = this_5.t2();
                var nextValue_4 = prevValue_4.uyv(VOID, VOID, VOID, VOID, VOID, true);
                if (this_5.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$23;
                }
              }
            }
             while (false);
            throw this.myy_1;
          case 5:
            this.id_1 = 14;
            this.hyy_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$25: do {
              var this_6 = this.hyy_1.iyv_1;
              while (true) {
                var prevValue_5 = this_6.t2();
                var nextValue_5 = prevValue_5.uyv(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.hyy_1.tqn().n7d().kg4(this.gyy_1.iyw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.nyy_1 = suspendResult;
            if (this.nyy_1 === 0) {
              this.hd_1 = 8;
              var tmp_6 = this.hyy_1.tqn();
              suspendResult = withDoorTransactionAsync(tmp_6, VOID, PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this.hyy_1, this.gyy_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$7: do {
                var this_7 = this.hyy_1.iyv_1;
                while (true) {
                  var prevValue_6 = this_7.t2();
                  var nextValue_6 = prevValue_6.uyv(VOID, this.hyy_1.xqn().joj(strings_getInstance().yn7_1));
                  if (this_7.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            this.hyy_1.iqt(null);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.jyy_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.hyy_1.iyv_1;
                while (true) {
                  var prevValue_7 = this_8.t2();
                  var nextValue_7 = prevValue_7.uyv(VOID, this.hyy_1.xqn().joj(strings_getInstance().amj_1));
                  if (this_8.y1k(prevValue_7, nextValue_7)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
              tmp_8.jyy_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.hyy_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$13: do {
              var this_9 = this.hyy_1.iyv_1;
              while (true) {
                var prevValue_8 = this_9.t2();
                var nextValue_8 = prevValue_8.uyv(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.hyy_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$15: do {
              var this_10 = this.hyy_1.iyv_1;
              while (true) {
                var prevValue_9 = this_10.t2();
                var nextValue_9 = prevValue_9.uyv(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.gyy_1, this.hyy_1, completion);
    i.iyy_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.iyv_1 = MutableStateFlow(new PersonAccountEditUiState());
    this.jyv_1 = asStateFlow(this.iyv_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.nqn().ioa();
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(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.kyv_1 = Instance(this_0, tmp$ret$3, null).a5d(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.nqn().ioa();
    var trigger_0 = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$6 = tmp_4.h57(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.lyv_1 = Instance(this_1, tmp$ret$8, null).a5d(this, setPasswordUseCase$factory());
    this.myv_1 = new ValidateUsernameUseCase_0();
    this.nyv_1 = new FilterUsernameUseCase();
    this.bqn_1.x1k(new AppUiState(VOID, Companion_getInstance_97().qq6_1));
    var tmp_7 = PersonAccountEditViewModel$slambda_0(this, null);
    this.jqo(tmp_7, VOID, VOID, PersonAccountEditViewModel$slambda_2(this, null));
  }
  protoOf(PersonAccountEditViewModel).oyy = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyv_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.iyw_1;
        var tmp1_safe_receiver = this.iyv_1.t2().oyv_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.iyw_1))) {
          tmp = entity == null ? null : entity.pyy(VOID, VOID, this.nyv_1.mpe(entity.iyw_1, ''));
        } else {
          tmp = entity;
        }
        var tmp_1 = tmp;
        var tmp_2;
        var tmp_3;
        if (!(prevValue.pyv_1 == null)) {
          var tmp3_safe_receiver = prevValue.oyv_1;
          var tmp_4 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.iyw_1;
          tmp_3 = tmp_4 == (entity == null ? null : entity.iyw_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.pyv_1;
        } else {
          tmp_2 = null;
        }
        var tmp_5 = tmp_2;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.qyv_1 == null)) {
          var tmp5_safe_receiver = prevValue.oyv_1;
          var tmp_8 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.jyw_1;
          tmp_7 = tmp_8 == (entity == null ? null : entity.jyw_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          tmp_6 = prevValue.qyv_1;
        } else {
          tmp_6 = null;
        }
        var tmp_9 = tmp_6;
        var tmp_10;
        var tmp_11;
        if (!(prevValue.ryv_1 == null)) {
          var tmp7_safe_receiver = prevValue.oyv_1;
          var tmp_12 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.kyw_1;
          tmp_11 = tmp_12 == (entity == null ? null : entity.kyw_1);
        } else {
          tmp_11 = false;
        }
        if (tmp_11) {
          tmp_10 = prevValue.ryv_1;
        } else {
          tmp_10 = null;
        }
        var nextValue = prevValue.uyv(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_227.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_13 = this;
    var tmp_14 = this.oqn();
    tmp_13.eqt_1 = launch(tmp_14, VOID, VOID, PersonAccountEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonAccountEditViewModel).xs9 = function () {
    if (this.aqo().equals(Companion_getInstance_97().qq6_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.iyv_1.t2().oyv_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    this.zqn(Companion_getInstance_97().qq6_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.iyv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.uyv(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.oqn();
    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.oyv_1 = personAccount;
    this.pyv_1 = usernameError;
    this.qyv_1 = currentPasswordError;
    this.ryv_1 = newPasswordError;
    this.syv_1 = errorMessage;
    this.tyv_1 = fieldsEnabled;
  }
  protoOf(PersonAccountEditUiState).qyy = function () {
    var tmp0_safe_receiver = this.oyv_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gyw_1) === 1;
  };
  protoOf(PersonAccountEditUiState).ryy = function () {
    var tmp0_safe_receiver = this.oyv_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gyw_1) === 3;
  };
  protoOf(PersonAccountEditUiState).ou4 = function () {
    return (!(this.pyv_1 == null) ? true : !(this.qyv_1 == null)) ? true : !(this.ryv_1 == null);
  };
  protoOf(PersonAccountEditUiState).syy = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    return new PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).uyv = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled, $super) {
    personAccount = personAccount === VOID ? this.oyv_1 : personAccount;
    usernameError = usernameError === VOID ? this.pyv_1 : usernameError;
    currentPasswordError = currentPasswordError === VOID ? this.qyv_1 : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? this.ryv_1 : newPasswordError;
    errorMessage = errorMessage === VOID ? this.syv_1 : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? this.tyv_1 : fieldsEnabled;
    return $super === VOID ? this.syy(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) : $super.syy.call(this, personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).toString = function () {
    return 'PersonAccountEditUiState(personAccount=' + this.oyv_1 + ', usernameError=' + this.pyv_1 + ', currentPasswordError=' + this.qyv_1 + ', newPasswordError=' + this.ryv_1 + ', errorMessage=' + this.syv_1 + ', fieldsEnabled=' + this.tyv_1 + ')';
  };
  protoOf(PersonAccountEditUiState).hashCode = function () {
    var result = this.oyv_1 == null ? 0 : this.oyv_1.hashCode();
    result = imul(result, 31) + (this.pyv_1 == null ? 0 : getStringHashCode(this.pyv_1)) | 0;
    result = imul(result, 31) + (this.qyv_1 == null ? 0 : getStringHashCode(this.qyv_1)) | 0;
    result = imul(result, 31) + (this.ryv_1 == null ? 0 : getStringHashCode(this.ryv_1)) | 0;
    result = imul(result, 31) + (this.syv_1 == null ? 0 : getStringHashCode(this.syv_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tyv_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.oyv_1, tmp0_other_with_cast.oyv_1))
      return false;
    if (!(this.pyv_1 == tmp0_other_with_cast.pyv_1))
      return false;
    if (!(this.qyv_1 == tmp0_other_with_cast.qyv_1))
      return false;
    if (!(this.ryv_1 == tmp0_other_with_cast.ryv_1))
      return false;
    if (!(this.syv_1 == tmp0_other_with_cast.syv_1))
      return false;
    if (!(this.tyv_1 === tmp0_other_with_cast.tyv_1))
      return false;
    return true;
  };
  function Companion_178() {
  }
  protoOf(Companion_178).n4r = function () {
    return $serializer_getInstance_76();
  };
  var Companion_instance_227;
  function Companion_getInstance_195() {
    return Companion_instance_227;
  }
  function $serializer_64() {
    $serializer_instance_64 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.accountedit.PersonUsernameAndPasswordModel', this, 5);
    tmp0_serialDesc.t4f('mode', true);
    tmp0_serialDesc.t4f('personUid', true);
    tmp0_serialDesc.t4f('username', true);
    tmp0_serialDesc.t4f('currentPassword', true);
    tmp0_serialDesc.t4f('newPassword', true);
    this.tyy_1 = tmp0_serialDesc;
  }
  protoOf($serializer_64).q44 = function () {
    return this.tyy_1;
  };
  protoOf($serializer_64).k4g = 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_64).s44 = function (decoder) {
    var tmp0_desc = this.tyy_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.i48(tmp0_desc);
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.n48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.o48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.s48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.n48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.o48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.s48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.s48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.s48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return PersonUsernameAndPasswordModel_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_64).uyy = function (encoder, value) {
    var tmp0_desc = this.tyy_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.gyw_1 === 1)) {
      tmp1_output.r49(tmp0_desc, 0, value.gyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !value.hyw_1.equals(new Long(0, 0))) {
      tmp1_output.s49(tmp0_desc, 1, value.hyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.iyw_1 === '')) {
      tmp1_output.w49(tmp0_desc, 2, value.iyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !(value.jyw_1 === '')) {
      tmp1_output.w49(tmp0_desc, 3, value.jyw_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.kyw_1 === '')) {
      tmp1_output.w49(tmp0_desc, 4, value.kyw_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_64).r44 = function (encoder, value) {
    return this.uyy(encoder, value instanceof PersonUsernameAndPasswordModel ? value : THROW_CCE());
  };
  var $serializer_instance_64;
  function $serializer_getInstance_76() {
    if ($serializer_instance_64 == null)
      new $serializer_64();
    return $serializer_instance_64;
  }
  function PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_76().tyy_1);
    }
    if (0 === (seen1 & 1))
      $this.gyw_1 = 1;
    else
      $this.gyw_1 = mode;
    if (0 === (seen1 & 2))
      $this.hyw_1 = new Long(0, 0);
    else
      $this.hyw_1 = personUid;
    if (0 === (seen1 & 4))
      $this.iyw_1 = '';
    else
      $this.iyw_1 = username;
    if (0 === (seen1 & 8))
      $this.jyw_1 = '';
    else
      $this.jyw_1 = currentPassword;
    if (0 === (seen1 & 16))
      $this.kyw_1 = '';
    else
      $this.kyw_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.gyw_1 = mode;
    this.hyw_1 = personUid;
    this.iyw_1 = username;
    this.jyw_1 = currentPassword;
    this.kyw_1 = newPassword;
  }
  protoOf(PersonUsernameAndPasswordModel).vyy = function (mode, personUid, username, currentPassword, newPassword) {
    return new PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).pyy = function (mode, personUid, username, currentPassword, newPassword, $super) {
    mode = mode === VOID ? this.gyw_1 : mode;
    personUid = personUid === VOID ? this.hyw_1 : personUid;
    username = username === VOID ? this.iyw_1 : username;
    currentPassword = currentPassword === VOID ? this.jyw_1 : currentPassword;
    newPassword = newPassword === VOID ? this.kyw_1 : newPassword;
    return $super === VOID ? this.vyy(mode, personUid, username, currentPassword, newPassword) : $super.vyy.call(this, mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).toString = function () {
    return 'PersonUsernameAndPasswordModel(mode=' + this.gyw_1 + ', personUid=' + this.hyw_1.toString() + ', username=' + this.iyw_1 + ', currentPassword=' + this.jyw_1 + ', newPassword=' + this.kyw_1 + ')';
  };
  protoOf(PersonUsernameAndPasswordModel).hashCode = function () {
    var result = this.gyw_1;
    result = imul(result, 31) + this.hyw_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.iyw_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.jyw_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.kyw_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.gyw_1 === tmp0_other_with_cast.gyw_1))
      return false;
    if (!this.hyw_1.equals(tmp0_other_with_cast.hyw_1))
      return false;
    if (!(this.iyw_1 === tmp0_other_with_cast.iyw_1))
      return false;
    if (!(this.jyw_1 === tmp0_other_with_cast.jyw_1))
      return false;
    if (!(this.kyw_1 === tmp0_other_with_cast.kyw_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.ryz_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.az0(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.uyz_1;
    bulkAddFromUriUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_179() {
    this.bz0_1 = 'BulkAddPersonRunImport';
    this.cz0_1 = 'uri';
  }
  var Companion_instance_228;
  function Companion_getInstance_196() {
    return Companion_instance_228;
  }
  function sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(function_0) {
    this.dz0_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0).ez0 = function (numImported, totalRecords) {
    return this.dz0_1(numImported, totalRecords);
  };
  function BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation) {
    this.nz0_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.nz0_1);
            var tmp_1 = Companion_getInstance_3().o2r(this.nz0_1.tyz_1);
            var tmp_2 = this.nz0_1.pqn();
            var tmp_3 = BulkAddPersonRunImportViewModel$slambda$lambda(this.nz0_1);
            suspendResult = tmp_0.ipl(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.nz0_1.ryz_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.az0(false, VOID, result.lpl_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().q5e('Exception running import', e);
              l$ret$3: do {
                var this_1 = this.nz0_1.ryz_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.cpl_1;
                  var nextValue_0 = prevValue_0.az0(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.nz0_1, completion);
    i.oz0_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.ryz_1 = MutableStateFlow(new BulkAddPersonRunImportUiState());
    this.syz_1 = asStateFlow(this.ryz_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.tyz_1 = tmp_0;
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.uyz_1 = Instance(this_0, tmp$ret$0, null).a5d(this, bulkAddFromUriUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().rno_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.oqn();
    launch(tmp_3, VOID, VOID, BulkAddPersonRunImportViewModel$slambda_0(this, null));
  }
  function Companion_180() {
    Companion_instance_229 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.pz0_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_54()), null];
  }
  var Companion_instance_229;
  function Companion_getInstance_197() {
    if (Companion_instance_229 == null)
      new Companion_180();
    return Companion_instance_229;
  }
  function $serializer_65() {
    $serializer_instance_65 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportUiState', this, 5);
    tmp0_serialDesc.t4f('inProgress', true);
    tmp0_serialDesc.t4f('totalRecords', true);
    tmp0_serialDesc.t4f('numImported', true);
    tmp0_serialDesc.t4f('errors', true);
    tmp0_serialDesc.t4f('errorMessage', true);
    this.qz0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_65).q44 = function () {
    return this.qz0_1;
  };
  protoOf($serializer_65).k4g = function () {
    var tmp0_cached = Companion_getInstance_197().pz0_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_65).s44 = function (decoder) {
    var tmp0_desc = this.qz0_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.i48(tmp0_desc);
    var tmp10_cached = Companion_getInstance_197().pz0_1;
    if (tmp9_input.x48()) {
      tmp4_local0 = tmp9_input.k48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.n48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.n48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.y48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.k48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.n48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.n48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.u48(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.w48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.j48(tmp0_desc);
    return BulkAddPersonRunImportUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_65).rz0 = function (encoder, value) {
    var tmp0_desc = this.qz0_1;
    var tmp1_output = encoder.i48(tmp0_desc);
    var tmp2_cached = Companion_getInstance_197().pz0_1;
    if (tmp1_output.e4a(tmp0_desc, 0) ? true : !(value.vyz_1 === true)) {
      tmp1_output.o49(tmp0_desc, 0, value.vyz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 1) ? true : !(value.wyz_1 === 0)) {
      tmp1_output.r49(tmp0_desc, 1, value.wyz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 2) ? true : !(value.xyz_1 === 0)) {
      tmp1_output.r49(tmp0_desc, 2, value.xyz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 3) ? true : !equals(value.yyz_1, emptyList())) {
      tmp1_output.y49(tmp0_desc, 3, tmp2_cached[3], value.yyz_1);
    }
    if (tmp1_output.e4a(tmp0_desc, 4) ? true : !(value.zyz_1 == null)) {
      tmp1_output.a4a(tmp0_desc, 4, StringSerializer_getInstance(), value.zyz_1);
    }
    tmp1_output.j48(tmp0_desc);
  };
  protoOf($serializer_65).r44 = function (encoder, value) {
    return this.rz0(encoder, value instanceof BulkAddPersonRunImportUiState ? value : THROW_CCE());
  };
  var $serializer_instance_65;
  function $serializer_getInstance_77() {
    if ($serializer_instance_65 == null)
      new $serializer_65();
    return $serializer_instance_65;
  }
  function BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_77().qz0_1);
    }
    if (0 === (seen1 & 1))
      $this.vyz_1 = true;
    else
      $this.vyz_1 = inProgress;
    if (0 === (seen1 & 2))
      $this.wyz_1 = 0;
    else
      $this.wyz_1 = totalRecords;
    if (0 === (seen1 & 4))
      $this.xyz_1 = 0;
    else
      $this.xyz_1 = numImported;
    if (0 === (seen1 & 8))
      $this.yyz_1 = emptyList();
    else
      $this.yyz_1 = errors;
    if (0 === (seen1 & 16))
      $this.zyz_1 = null;
    else
      $this.zyz_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_197();
    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.vyz_1 = inProgress;
    this.wyz_1 = totalRecords;
    this.xyz_1 = numImported;
    this.yyz_1 = errors;
    this.zyz_1 = errorMessage;
  }
  protoOf(BulkAddPersonRunImportUiState).ou4 = function () {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.yyz_1.c1()) {
      tmp = true;
    } else {
      tmp = !(this.zyz_1 == null);
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).jp3 = function () {
    var tmp;
    if (this.wyz_1 > 0) {
      tmp = this.xyz_1 / this.wyz_1;
    } else {
      tmp = 0.0;
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).sz0 = function (inProgress, totalRecords, numImported, errors, errorMessage) {
    return new BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).az0 = function (inProgress, totalRecords, numImported, errors, errorMessage, $super) {
    inProgress = inProgress === VOID ? this.vyz_1 : inProgress;
    totalRecords = totalRecords === VOID ? this.wyz_1 : totalRecords;
    numImported = numImported === VOID ? this.xyz_1 : numImported;
    errors = errors === VOID ? this.yyz_1 : errors;
    errorMessage = errorMessage === VOID ? this.zyz_1 : errorMessage;
    return $super === VOID ? this.sz0(inProgress, totalRecords, numImported, errors, errorMessage) : $super.sz0.call(this, inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).toString = function () {
    return 'BulkAddPersonRunImportUiState(inProgress=' + this.vyz_1 + ', totalRecords=' + this.wyz_1 + ', numImported=' + this.xyz_1 + ', errors=' + this.yyz_1 + ', errorMessage=' + this.zyz_1 + ')';
  };
  protoOf(BulkAddPersonRunImportUiState).hashCode = function () {
    var result = getBooleanHashCode(this.vyz_1);
    result = imul(result, 31) + this.wyz_1 | 0;
    result = imul(result, 31) + this.xyz_1 | 0;
    result = imul(result, 31) + hashCode(this.yyz_1) | 0;
    result = imul(result, 31) + (this.zyz_1 == null ? 0 : getStringHashCode(this.zyz_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.vyz_1 === tmp0_other_with_cast.vyz_1))
      return false;
    if (!(this.wyz_1 === tmp0_other_with_cast.wyz_1))
      return false;
    if (!(this.xyz_1 === tmp0_other_with_cast.xyz_1))
      return false;
    if (!equals(this.yyz_1, tmp0_other_with_cast.yyz_1))
      return false;
    if (!(this.zyz_1 == tmp0_other_with_cast.zyz_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.qz1_1;
    openBlobUiUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_181() {
    this.rz1_1 = 'BulkAddPersonSelectFile';
  }
  var Companion_instance_230;
  function Companion_getInstance_198() {
    return Companion_instance_230;
  }
  function BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation) {
    this.az2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.bz2_1.p7f();
            var tmp_1 = this.az2_1.pqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_0.wi0(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.hdn_1 ? it.idn_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).vny = function (db, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this.az2_1, completion);
    i.bz2_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.jsc(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.oz1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gz2(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.pz2_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.yz2_1 = this$0;
    this.zz2_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.yz2_1);
            var tmp_1 = new OpenBlobItem(this.zz2_1, 'text/csv', 'bulk-add-persons-template.csv', new Long(186, 0));
            suspendResult = tmp_0.lop(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.yz2_1, this.zz2_1, completion);
    i.az3_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.oz1_1 = MutableStateFlow(new BulkAddPersonSelectFileUiState());
    this.pz1_1 = asStateFlow(this.oz1_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(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.qz1_1 = Instance(this_0, tmp$ret$0, null).a5d(this, openBlobUiUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().rno_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.iqo(tmp_1, true, tmp_2, BulkAddPersonSelectFileViewModel$slambda_2(null));
  }
  protoOf(BulkAddPersonSelectFileViewModel).bz3 = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.oz1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.onFileSelected.<anonymous>' call
        var nextValue = prevValue.gz2(uri, name);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(BulkAddPersonSelectFileViewModel).cz3 = function () {
    var tmp0_elvis_lhs = this.oz1_1.t2().cz2_1;
    this.zqm_1.kp6('BulkAddPersonRunImport', mapOf_0(to('uri', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  protoOf(BulkAddPersonSelectFileViewModel).dz3 = function () {
    var templatePath = this.nqn().ioa().tnt_1 + 'staticfiles/bulkaddpersons/bulk-add-persons-template.csv';
    var tmp = this.oqn();
    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.cz2_1 = selectedFileUri;
    this.dz2_1 = selectedFileName;
    this.ez2_1 = fileSelectError;
    this.fz2_1 = fieldsEnabled;
  }
  protoOf(BulkAddPersonSelectFileUiState).ez3 = function () {
    return !(this.cz2_1 == null) ? this.fz2_1 : false;
  };
  protoOf(BulkAddPersonSelectFileUiState).fz3 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    return new BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).gz2 = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled, $super) {
    selectedFileUri = selectedFileUri === VOID ? this.cz2_1 : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? this.dz2_1 : selectedFileName;
    fileSelectError = fileSelectError === VOID ? this.ez2_1 : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fz2_1 : fieldsEnabled;
    return $super === VOID ? this.fz3(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) : $super.fz3.call(this, selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).toString = function () {
    return 'BulkAddPersonSelectFileUiState(selectedFileUri=' + this.cz2_1 + ', selectedFileName=' + this.dz2_1 + ', fileSelectError=' + this.ez2_1 + ', fieldsEnabled=' + this.fz2_1 + ')';
  };
  protoOf(BulkAddPersonSelectFileUiState).hashCode = function () {
    var result = this.cz2_1 == null ? 0 : getStringHashCode(this.cz2_1);
    result = imul(result, 31) + (this.dz2_1 == null ? 0 : getStringHashCode(this.dz2_1)) | 0;
    result = imul(result, 31) + (this.ez2_1 == null ? 0 : getStringHashCode(this.ez2_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fz2_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.cz2_1 == tmp0_other_with_cast.cz2_1))
      return false;
    if (!(this.dz2_1 == tmp0_other_with_cast.dz2_1))
      return false;
    if (!(this.ez2_1 == tmp0_other_with_cast.ez2_1))
      return false;
    if (!(this.fz2_1 === tmp0_other_with_cast.fz2_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 AddChildProfilesViewModel$slambda$slambda$slambda$lambda($childProfileResult) {
    return function (it) {
      return it.f96_1.equals($childProfileResult.f96_1);
    };
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).pz3 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.pz3(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$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 emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda).vny = function (it, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda(completion);
    i.oz3_1 = it;
    return i;
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_0(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.pz3(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).yz3 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.yz3($completion);
  };
  protoOf(AddChildProfilesViewModel$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(AddChildProfilesViewModel$slambda$slambda$slambda_1).l78 = function (completion) {
    return new AddChildProfilesViewModel$slambda$slambda$slambda_1(completion);
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_2(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.yz3($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.wz4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fz5(VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function AddChildProfilesViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.oz5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).nqa = function (result, $completion) {
    var tmp = this.oqa(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.nqa(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$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;
            var tmp_0 = this;
            var tmp_1 = this.pz5_1.uq9_1;
            var tmp0_elvis_lhs = tmp_1 instanceof Person ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.qz5_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.oz5_1.wz4_1.t2().bz5_1;
            tmp_3.rz5_1 = replaceOrAppend(tmp_4, this.qz5_1, AddChildProfilesViewModel$slambda$slambda$slambda$lambda(this.qz5_1));
            this.hd_1 = 1;
            suspendResult = updateChildProfileList(this.oz5_1, this.rz5_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(AddChildProfilesViewModel$slambda$slambda$slambda_3).oqa = function (result, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_3(this.oz5_1, completion);
    i.pz5_1 = result;
    return i;
  };
  function AddChildProfilesViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.nqa(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda$slambda(this$0, resultContinuation) {
    this.az6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda$slambda).u1m = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$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;
            var tmp_0 = ListSerializer(Companion_instance_3.n4r());
            var tmp_1 = listOf_0('persons');
            var tmp_2 = AddChildProfilesViewModel$slambda$slambda$slambda_0(null);
            var tmp_3 = AddChildProfilesViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.az6_1.hqo(tmp_0, tmp_1, VOID, tmp_2, tmp_3, AddChildProfilesViewModel$slambda$slambda$lambda(this.az6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_4 = this.az6_1.bqo(this.az6_1.uqn(), 'person');
            var tmp_5 = AddChildProfilesViewModel$slambda$slambda$slambda_4(this.az6_1, null);
            suspendResult = tmp_4.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_5), 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(AddChildProfilesViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new AddChildProfilesViewModel$slambda$slambda(this.az6_1, completion);
    i.bz6_1 = $this$async;
    return i;
  };
  function AddChildProfilesViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.u1m($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function updateChildProfileList($this, newChildProfileList, $completion) {
    var tmp = new $updateChildProfileListCOROUTINE$76($this, newChildProfileList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_182() {
    this.nz6_1 = 'AddChildProfile';
    this.oz6_1 = 'person';
    this.pz6_1 = 'persons';
  }
  var Companion_instance_231;
  function Companion_getInstance_199() {
    return Companion_instance_231;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_33(function_0) {
    this.qz6_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_33).t1d = function (value, $completion) {
    return this.qz6_1(value, $completion);
  };
  function AddChildProfilesViewModel$onClickFinish$ref($boundThis) {
    var l = function () {
      $boundThis.rz6();
      return Unit_instance;
    };
    l.callableName = 'onClickFinish';
    return l;
  }
  function AddChildProfilesViewModel$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$slambda).jsc = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return true;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda).vny = function (it, completion) {
    var i = new AddChildProfilesViewModel$slambda(completion);
    i.az7_1 = it;
    return i;
  };
  function AddChildProfilesViewModel$slambda_0(resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.jsc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$slambda_1(this$0, resultContinuation) {
    this.jz7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$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(AddChildProfilesViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          async(this.kz7_1, VOID, VOID, AddChildProfilesViewModel$slambda$slambda_0(this.jz7_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new AddChildProfilesViewModel$slambda_1(this.jz7_1, completion);
    i.kz7_1 = $this$launchIfHasPermission;
    return i;
  };
  function AddChildProfilesViewModel$slambda_2(this$0, resultContinuation) {
    var i = new AddChildProfilesViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation) {
    this.tz7_1 = this$0;
    this.uz7_1 = $newChildProfileList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).kr0 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).he = function (p1, $completion) {
    return this.kr0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$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.tz7_1.m4r().r45(ListSerializer(Companion_instance_3.n4r()), this.uz7_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$updateChildProfileList$slambda).v1m = function ($this$withContext, completion) {
    var i = new AddChildProfilesViewModel$updateChildProfileList$slambda(this.tz7_1, this.uz7_1, completion);
    i.vz7_1 = $this$withContext;
    return i;
  };
  function AddChildProfilesViewModel$updateChildProfileList$slambda_0(this$0, $newChildProfileList, resultContinuation) {
    var i = new AddChildProfilesViewModel$updateChildProfileList$slambda(this$0, $newChildProfileList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.kr0($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation) {
    this.ez8_1 = this$0;
    this.fz8_1 = $person;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$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(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$onClickDeleteChildProfile$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.ez8_1.wz4_1.t2().bz5_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (!element.f96_1.equals(this.fz8_1.f96_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateChildProfileList(this.ez8_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(AddChildProfilesViewModel$onClickDeleteChildProfile$slambda).v1m = function ($this$launch, completion) {
    var i = new AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this.ez8_1, this.fz8_1, completion);
    i.gz8_1 = $this$launch;
    return i;
  };
  function AddChildProfilesViewModel$onClickDeleteChildProfile$slambda_0(this$0, $person, resultContinuation) {
    var i = new AddChildProfilesViewModel$onClickDeleteChildProfile$slambda(this$0, $person, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddChildProfilesViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation) {
    this.pz8_1 = this$0;
    this.qz8_1 = $profile;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddChildProfilesViewModel$onProfileSelected$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(AddChildProfilesViewModel$onProfileSelected$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 10;
            this.sz8_1 = new UstadGoOptions(VOID, VOID, true);
            if (!this.pz8_1.wz4_1.t2().bz5_1.c1()) {
              var tmp_0 = this;
              var tmp0_elvis_lhs = this.pz8_1.sqn();
              tmp_0.tz8_1 = tmp0_elvis_lhs == null ? this.pz8_1.rqn() : tmp0_elvis_lhs;
              this.hd_1 = 1;
              suspendResult = this.tz8_1.n7d().jg4(this.pz8_1.wz4_1.t2().bz5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 7;
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            var this_0 = this.pz8_1.wz4_1.t2().bz5_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_ppjMinorPersonUid = item.f96_1;
              var tmp1_ppjParentPersonUid = this.pz8_1.nqn().goa().vky_1;
              var tmp3_ppjApprovalTiemstamp = systemTimeInMillis();
              destination.i1(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, tmp1_ppjParentPersonUid, tmp0_ppjMinorPersonUid, VOID, VOID, VOID, VOID, 1, tmp3_ppjApprovalTiemstamp));
            }

            tmp_1.uz8_1 = destination;
            var tmp_2 = this;
            tmp_2.vz8_1 = this.pz8_1.wz4_1.t2().bz5_1;
            this.wz8_1 = this.vz8_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.wz8_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.xz8_1 = this.wz8_1.e();
            var tmp_3 = this;
            tmp_3.yz8_1 = this.xz8_1;
            if (!this.yz8_1.equals(this.qz8_1)) {
              this.hd_1 = 3;
              suspendResult = this.pz8_1.nqn().to2(this.yz8_1, this.pz8_1.nqn().ioa().tnt_1, null, 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:
            this.hd_1 = 2;
            continue $sm;
          case 5:
            this.hd_1 = 6;
            suspendResult = this.tz8_1.x7e().tgs(this.uz8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (!this.qz8_1.equals(this.pz8_1.nqn().ro9().lnu_1)) {
              this.hd_1 = 8;
              suspendResult = this.pz8_1.nqn().to2(this.qz8_1, this.pz8_1.nqn().ioa().tnt_1, null, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            var sessionWithPersonAndLearningSpace = suspendResult;
            this.pz8_1.nqn().lnx(sessionWithPersonAndLearningSpace);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.pz8_1.jqu(this.pz8_1.zqm_1, appendSelectedAccount(this.pz8_1.xz4_1, this.qz8_1.f96_1, new LearningSpace(this.pz8_1.nqn().ioa().tnt_1)), this.sz8_1);
            return Unit_instance;
          case 10:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 10) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddChildProfilesViewModel$onProfileSelected$slambda).v1m = function ($this$launch, completion) {
    var i = new AddChildProfilesViewModel$onProfileSelected$slambda(this.pz8_1, this.qz8_1, completion);
    i.rz8_1 = $this$launch;
    return i;
  };
  function AddChildProfilesViewModel$onProfileSelected$slambda_0(this$0, $profile, resultContinuation) {
    var i = new AddChildProfilesViewModel$onProfileSelected$slambda(this$0, $profile, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateChildProfileListCOROUTINE$76(_this__u8e3s4, newChildProfileList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kz6_1 = _this__u8e3s4;
    this.lz6_1 = newChildProfileList;
  }
  protoOf($updateChildProfileListCOROUTINE$76).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.kz6_1.wz4_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.fz5(VOID, this.lz6_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.mz6_1 = this.kz6_1.xqm_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, AddChildProfilesViewModel$updateChildProfileList$slambda_0(this.kz6_1, this.lz6_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.mz6_1.aqj('persons', 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 AddChildProfilesViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'AddChildProfile');
    this.wz4_1 = MutableStateFlow(new AddChildProfilesUiState());
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.xz4_1 = tmp_0;
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveLearningSpace(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.yz4_1 = Instance(this_0, tmp$ret$0, null).a5d(this, repo$factory());
    this.zz4_1 = asStateFlow(this.wz4_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.wz4_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>' call
        var nextValue = prevValue.fz5(VOID, VOID, VOID, VOID, this.nqn().ro9().lnu_1);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.bqn_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.<anonymous>' call
        var tmp0_title = this.xqn().joj(strings_getInstance().znp_1);
        var tmp_3 = this.xqn().joj(strings_getInstance().bnq_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, AddChildProfilesViewModel$onClickFinish$ref(this));
        var nextValue_0 = prevValue_0.jq6(VOID, VOID, tmp0_title, false, true, VOID, false, VOID, tmp1_actionBarButtonState);
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_4 = AddChildProfilesViewModel$slambda_0(null);
    this.jqo(tmp_4, VOID, VOID, AddChildProfilesViewModel$slambda_2(this, null));
  }
  protoOf(AddChildProfilesViewModel).zz8 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.yz4_1;
    repo$factory_0();
    return this_0.t2();
  };
  protoOf(AddChildProfilesViewModel).rz6 = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.wz4_1.t2().bz5_1.c1()) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.wz4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onClickFinish.<anonymous>' call
          var nextValue = prevValue.fz5(VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      this.az9(this.nqn().goa().dkz());
    }
  };
  protoOf(AddChildProfilesViewModel).bz9 = function () {
    var tmp0_nextViewName = 'EditChildProfile';
    // 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.person.child.AddChildProfilesViewModel.onClickAddChileProfile.<anonymous>' call
    Companion_getInstance_115();
    this.xqm_1.ba('entity');
    var tmp2_args = this_0.f3();
    var tmp3_serializer = Companion_instance_3.n4r();
    this.fqo(tmp0_nextViewName, 'person', null, tmp3_serializer, tmp2_args);
  };
  protoOf(AddChildProfilesViewModel).cz9 = function (person) {
    var tmp0_nextViewName = 'EditChildProfile';
    var tmp2_serializer = Companion_instance_3.n4r();
    // 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.person.child.AddChildProfilesViewModel.onClickEditChileProfile.<anonymous>' call
    Companion_getInstance_115();
    this.xqm_1.ba('entity');
    var tmp3_args = this_0.f3();
    this.fqo(tmp0_nextViewName, 'person', person, tmp2_serializer, tmp3_args);
  };
  protoOf(AddChildProfilesViewModel).dz9 = function (person) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, AddChildProfilesViewModel$onClickDeleteChildProfile$slambda_0(this, person, null));
  };
  protoOf(AddChildProfilesViewModel).ez9 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.wz4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.AddChildProfilesViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.fz5(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(AddChildProfilesViewModel).az9 = function (profile) {
    var tmp = this.oqn();
    launch(tmp, VOID, VOID, AddChildProfilesViewModel$onProfileSelected$slambda_0(this, profile, null));
  };
  function AddChildProfilesUiState(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) {
    onAddChildProfile = onAddChildProfile === VOID ? null : onAddChildProfile;
    childProfiles = childProfiles === VOID ? emptyList() : childProfiles;
    personParenJoinList = personParenJoinList === VOID ? emptyList() : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? false : showProfileSelectionDialog;
    parent = parent === VOID ? null : parent;
    this.az5_1 = onAddChildProfile;
    this.bz5_1 = childProfiles;
    this.cz5_1 = personParenJoinList;
    this.dz5_1 = showProfileSelectionDialog;
    this.ez5_1 = parent;
  }
  protoOf(AddChildProfilesUiState).fz9 = function () {
    var tmp0_safe_receiver = this.ez5_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.person.child.AddChildProfilesUiState.<get-personAndChildrenList>.<anonymous>' call
      tmp = listOf_0(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp;
    return plus(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.bz5_1);
  };
  protoOf(AddChildProfilesUiState).gz9 = function (onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) {
    return new AddChildProfilesUiState(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(AddChildProfilesUiState).fz5 = function (onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent, $super) {
    onAddChildProfile = onAddChildProfile === VOID ? this.az5_1 : onAddChildProfile;
    childProfiles = childProfiles === VOID ? this.bz5_1 : childProfiles;
    personParenJoinList = personParenJoinList === VOID ? this.cz5_1 : personParenJoinList;
    showProfileSelectionDialog = showProfileSelectionDialog === VOID ? this.dz5_1 : showProfileSelectionDialog;
    parent = parent === VOID ? this.ez5_1 : parent;
    return $super === VOID ? this.gz9(onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent) : $super.gz9.call(this, onAddChildProfile, childProfiles, personParenJoinList, showProfileSelectionDialog, parent);
  };
  protoOf(AddChildProfilesUiState).toString = function () {
    return 'AddChildProfilesUiState(onAddChildProfile=' + this.az5_1 + ', childProfiles=' + this.bz5_1 + ', personParenJoinList=' + this.cz5_1 + ', showProfileSelectionDialog=' + this.dz5_1 + ', parent=' + this.ez5_1 + ')';
  };
  protoOf(AddChildProfilesUiState).hashCode = function () {
    var result = this.az5_1 == null ? 0 : getStringHashCode(this.az5_1);
    result = imul(result, 31) + hashCode(this.bz5_1) | 0;
    result = imul(result, 31) + hashCode(this.cz5_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dz5_1) | 0;
    result = imul(result, 31) + (this.ez5_1 == null ? 0 : this.ez5_1.hashCode()) | 0;
    return result;
  };
  protoOf(AddChildProfilesUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AddChildProfilesUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AddChildProfilesUiState ? other : THROW_CCE();
    if (!(this.az5_1 == tmp0_other_with_cast.az5_1))
      return false;
    if (!equals(this.bz5_1, tmp0_other_with_cast.bz5_1))
      return false;
    if (!equals(this.cz5_1, tmp0_other_with_cast.cz5_1))
      return false;
    if (!(this.dz5_1 === tmp0_other_with_cast.dz5_1))
      return false;
    if (!equals(this.ez5_1, tmp0_other_with_cast.ez5_1))
      return false;
    return true;
  };
  function repo$factory() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.zz8();
    }, null);
  }
  function repo$factory_0() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return receiver.zz8();
    }, null);
  }
  function EditChildProfileViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda).qz9 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EditChildProfileViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qz9(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$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(EditChildProfileViewModel$slambda$slambda).vny = function (it, completion) {
    var i = new EditChildProfileViewModel$slambda$slambda(completion);
    i.pz9_1 = it;
    return i;
  };
  function EditChildProfileViewModel$slambda$slambda_0(resultContinuation) {
    var i = new EditChildProfileViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.qz9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.zz9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$slambda$slambda_1).aza = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EditChildProfileViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.aza($completion);
  };
  protoOf(EditChildProfileViewModel$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.zz9_1.rqn());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            return new Person(newUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          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(EditChildProfileViewModel$slambda$slambda_1).l78 = function (completion) {
    return new EditChildProfileViewModel$slambda$slambda_1(this.zz9_1, completion);
  };
  function EditChildProfileViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new EditChildProfileViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.aza($completion);
    };
    l.$arity = 0;
    return l;
  }
  function EditChildProfileViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.yza_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.hzb(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_genderConfig__kyr0zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.azb_1;
    genderConfig$factory_0();
    return this_0.t2();
  }
  function hasErrors_3(_this__u8e3s4, $this) {
    return ((!(_this__u8e3s4.czb_1 == null) ? true : !(_this__u8e3s4.fzb_1 == null)) ? true : !(_this__u8e3s4.gzb_1 == null)) ? true : !(_this__u8e3s4.ezb_1 == null);
  }
  function Companion_183() {
    this.izb_1 = 'EditChildProfile';
  }
  var Companion_instance_232;
  function Companion_getInstance_200() {
    return Companion_instance_232;
  }
  function EditChildProfileViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.kwv();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function EditChildProfileViewModel$slambda(this$0, resultContinuation) {
    this.rzb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$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(EditChildProfileViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$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.tzb_1 = Companion_instance_3.n4r();
            this.hd_1 = 1;
            var tmp_0 = EditChildProfileViewModel$slambda$slambda_0(null);
            var tmp_1 = EditChildProfileViewModel$slambda$slambda_2(this.rzb_1, null);
            suspendResult = this.rzb_1.hqo(this.tzb_1, VOID, VOID, tmp_0, tmp_1, EditChildProfileViewModel$slambda$lambda(this.rzb_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(EditChildProfileViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new EditChildProfileViewModel$slambda(this.rzb_1, completion);
    i.szb_1 = $this$launch;
    return i;
  };
  function EditChildProfileViewModel$slambda_0(this$0, resultContinuation) {
    var i = new EditChildProfileViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EditChildProfileViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.czc_1 = $commitDelay;
    this.dzc_1 = $entity;
    this.ezc_1 = $this;
    this.fzc_1 = $key;
    this.gzc_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EditChildProfileViewModel$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(EditChildProfileViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EditChildProfileViewModel$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.czc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.dzc_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ezc_1.dqo(this.ezc_1.xqm_1, this.fzc_1, this.gzc_1, this.dzc_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(EditChildProfileViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new EditChildProfileViewModel$onEntityChanged$slambda(this.czc_1, this.dzc_1, this.ezc_1, this.fzc_1, this.gzc_1, completion);
    i.hzc_1 = $this$launch;
    return i;
  };
  function EditChildProfileViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new EditChildProfileViewModel$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 EditChildProfileViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EditChildProfile');
    this.yza_1 = MutableStateFlow(new EditChildProfileUiState());
    this.zza_1 = asStateFlow(this.yza_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.azb_1 = Instance(this, tmp$ret$0, null).a5d(this, genderConfig$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.yza_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var nextValue = prevValue.hzb(VOID, VOID, _get_genderConfig__kyr0zc(this).iq7_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp0_title = this.xqn().joj(strings_getInstance().anq_1);
        var nextValue_0 = prevValue_0.jq6(VOID, VOID, tmp0_title, false, true, VOID, false, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.bqn_1;
      while (true) {
        var prevValue_1 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.<anonymous>' call
        var tmp_1 = this.xqn().joj(strings_getInstance().tmr_1);
        var nextValue_1 = prevValue_1.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_1, VOID, EditChildProfileViewModel$onClickDone$ref(this)));
        if (this_2.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, EditChildProfileViewModel$slambda_0(this, null));
  }
  protoOf(EditChildProfileViewModel).izc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.yza_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.bzb_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l96_1;
        var tmp_0 = this.iqu(tmp, entity == null ? null : entity.l96_1, prevValue.ezb_1);
        var tmp2_safe_receiver = prevValue.bzb_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.h96_1;
        var tmp_2 = this.iqu(tmp_1, entity == null ? null : entity.h96_1, prevValue.fzb_1);
        var tmp4_safe_receiver = prevValue.bzb_1;
        var tmp_3 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.i96_1;
        var nextValue = prevValue.hzb(entity, VOID, VOID, tmp_0, tmp_2, this.iqu(tmp_3, entity == null ? null : entity.i96_1, prevValue.gzb_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_4 = this;
    var tmp_5 = this.oqn();
    tmp_4.eqt_1 = launch(tmp_5, VOID, VOID, EditChildProfileViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(EditChildProfileViewModel).kwv = function () {
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp0_elvis_lhs = this.yza_1.t2().bzb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var savePerson = tmp;
    var requiredFieldMessage = this.xqn().joj(strings_getInstance().vmn_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.yza_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.child.EditChildProfileViewModel.onClickDone.<anonymous>' call
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = savePerson.h96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = requiredFieldMessage;
        } else {
          tmp_0 = null;
        }
        var tmp0_firstNameError = tmp_0;
        var tmp_1;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = savePerson.i96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_1 = requiredFieldMessage;
        } else {
          tmp_1 = null;
        }
        var tmp1_lastNameError = tmp_1;
        var tmp_2;
        if (savePerson.o96_1.equals(new Long(0, 0))) {
          tmp_2 = requiredFieldMessage;
        } else {
          tmp_2 = null;
        }
        var tmp2_dateOfBirthError = tmp_2;
        var tmp_3;
        var tmp_4 = savePerson.l96_1;
        if (tmp_4 === 0) {
          tmp_3 = requiredFieldMessage;
        } else {
          tmp_3 = null;
        }
        var tmp3_genderError = tmp_3;
        var nextValue = prevValue.hzb(VOID, tmp2_dateOfBirthError, VOID, tmp3_genderError, tmp0_firstNameError, tmp1_lastNameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_3(this.yza_1.t2(), this)) {
      this.zqn(Companion_getInstance_97().rq6_1);
      return Unit_instance;
    }
    this.iqt(this.yza_1.t2().bzb_1);
  };
  function EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) {
    person = person === VOID ? null : person;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().kq7_1 : genderOptions;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    this.bzb_1 = person;
    this.czb_1 = dateOfBirthError;
    this.dzb_1 = genderOptions;
    this.ezb_1 = genderError;
    this.fzb_1 = firstNameError;
    this.gzb_1 = lastNameError;
  }
  protoOf(EditChildProfileUiState).jzc = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) {
    return new EditChildProfileUiState(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError);
  };
  protoOf(EditChildProfileUiState).hzb = function (person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError, $super) {
    person = person === VOID ? this.bzb_1 : person;
    dateOfBirthError = dateOfBirthError === VOID ? this.czb_1 : dateOfBirthError;
    genderOptions = genderOptions === VOID ? this.dzb_1 : genderOptions;
    genderError = genderError === VOID ? this.ezb_1 : genderError;
    firstNameError = firstNameError === VOID ? this.fzb_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.gzb_1 : lastNameError;
    return $super === VOID ? this.jzc(person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError) : $super.jzc.call(this, person, dateOfBirthError, genderOptions, genderError, firstNameError, lastNameError);
  };
  protoOf(EditChildProfileUiState).toString = function () {
    return 'EditChildProfileUiState(person=' + this.bzb_1 + ', dateOfBirthError=' + this.czb_1 + ', genderOptions=' + this.dzb_1 + ', genderError=' + this.ezb_1 + ', firstNameError=' + this.fzb_1 + ', lastNameError=' + this.gzb_1 + ')';
  };
  protoOf(EditChildProfileUiState).hashCode = function () {
    var result = this.bzb_1 == null ? 0 : this.bzb_1.hashCode();
    result = imul(result, 31) + (this.czb_1 == null ? 0 : getStringHashCode(this.czb_1)) | 0;
    result = imul(result, 31) + hashCode(this.dzb_1) | 0;
    result = imul(result, 31) + (this.ezb_1 == null ? 0 : getStringHashCode(this.ezb_1)) | 0;
    result = imul(result, 31) + (this.fzb_1 == null ? 0 : getStringHashCode(this.fzb_1)) | 0;
    result = imul(result, 31) + (this.gzb_1 == null ? 0 : getStringHashCode(this.gzb_1)) | 0;
    return result;
  };
  protoOf(EditChildProfileUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EditChildProfileUiState))
      return false;
    var tmp0_other_with_cast = other instanceof EditChildProfileUiState ? other : THROW_CCE();
    if (!equals(this.bzb_1, tmp0_other_with_cast.bzb_1))
      return false;
    if (!(this.czb_1 == tmp0_other_with_cast.czb_1))
      return false;
    if (!equals(this.dzb_1, tmp0_other_with_cast.dzb_1))
      return false;
    if (!(this.ezb_1 == tmp0_other_with_cast.ezb_1))
      return false;
    if (!(this.fzb_1 == tmp0_other_with_cast.fzb_1))
      return false;
    if (!(this.gzb_1 == tmp0_other_with_cast.gzb_1))
      return false;
    return true;
  };
  function genderConfig$factory() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function genderConfig$factory_0() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).uzc = function (entity, permissions, $completion) {
    var tmp = this.vzc(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.uzc(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.szc_1;
          var tmp_0;
          if (this.tzc_1.bi3_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).vzc = function (entity, permissions, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.szc_1 = entity;
    i.tzc_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.uzc(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ezd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).gzd = function (person, $completion) {
    var tmp = this.hzd(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.gzd((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.ezd_1.eze_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.fzd_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
              var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k96_1;
              var tmp_0;
              if (tmp2_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = _get_phoneNumberUtil__i6ank8(this.ezd_1);
                tmp_0 = tmp0_safe_receiver_0 == null ? null : formatInternationalOrNull(tmp0_safe_receiver_0, tmp2_safe_receiver);
              }
              var nextValue = prevValue.sze(this.fzd_1, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.ezd_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_1 = this.fzd_1;
              var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.vg7_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.fzd_1 == null)) {
                tmp_1 = Companion_getInstance_97().rq6_1;
              } else {
                tmp_1 = Companion_getInstance_97().qq6_1;
              }
              var tmp4_loadingState = tmp_1;
              var nextValue_0 = prevValue_0.jq6(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).hzd = function (person, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this.ezd_1, completion);
    i.fzd_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.gzd(person, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.bzf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).iqf = function (it, $completion) {
    var tmp = this.jqf(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.iqf((!(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.bzf_1.eze_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sze(VOID, VOID, VOID, VOID, VOID, this.czf_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).jqf = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this.bzf_1, completion);
    i.czf_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.iqf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.xx5();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.lzf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).nzf = function (it, $completion) {
    var tmp = this.ozf(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.nzf(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.lzf_1.eze_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sze(VOID, VOID, VOID, VOID, this.mzf_1.ci3_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.lzf_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp_0;
              if (this.mzf_1.ci3_1) {
                var tmp_1 = this.lzf_1.xqn().joj(strings_getInstance().tmv_1);
                var tmp_2 = FabIcon_EDIT_getInstance();
                tmp_0 = new FabUiState(true, tmp_1, tmp_2, PersonDetailViewModel$onClickEdit$ref(this.lzf_1));
              } else {
                tmp_0 = new FabUiState();
              }
              var nextValue_0 = prevValue_0.jq6(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).ozf = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this.lzf_1, completion);
    i.mzf_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.nzf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.xzf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).zzf = function (it, $completion) {
    var tmp = this.azg(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.zzf((!(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.xzf_1.eze_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.sze(VOID, VOID, VOID, this.yzf_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).azg = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this.xzf_1, completion);
    i.yzf_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.zzf(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.jzg_1 = $entityFlow;
    this.kzg_1 = $viewAndEditPermissionFlow;
    this.lzg_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.jzg_1, this.kzg_1, PersonDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this.lzg_1, null);
            suspendResult = tmp_0.a1c(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(PersonDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda(this.jzg_1, this.kzg_1, this.lzg_1, completion);
    i.mzg_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.vzg_1 = $hasManagePermissionsPermissionFlow;
    this.wzg_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.vzg_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this.wzg_1, null);
            suspendResult = tmp_0.a1c(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(PersonDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1(this.vzg_1, this.wzg_1, completion);
    i.xzg_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.gzh_1 = $viewAndEditPermissionFlow;
    this.hzh_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.hzh_1, null);
            suspendResult = this.gzh_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(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.gzh_1, this.hzh_1, completion);
    i.izh_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.rzh_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.rzh_1.rqn().t7d().h93(this.rzh_1.pqn(), this.rzh_1.rqm_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this.rzh_1, null);
            suspendResult = tmp_0.a1c(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(PersonDetailViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this.rzh_1, completion);
    i.szh_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.bzi_1 = $this_launch;
    this.czi_1 = $entityFlow;
    this.dzi_1 = $viewAndEditPermissionFlow;
    this.ezi_1 = this$0;
    this.fzi_1 = $hasManagePermissionsPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.bzi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_0(this.czi_1, this.dzi_1, this.ezi_1, null));
          launch(this.bzi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_2(this.fzi_1, this.ezi_1, null));
          launch(this.bzi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_4(this.dzi_1, this.ezi_1, null));
          launch(this.bzi_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_6(this.ezi_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).l78 = function (completion) {
    return new PersonDetailViewModel$slambda$slambda(this.bzi_1, this.czi_1, this.dzi_1, this.ezi_1, this.fzi_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_phoneNumberUtil__i6ank8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hze_1;
    phoneNumberUtil$factory_0();
    return this_0.t2();
  }
  function _get_onClickPhoneNumUseCase__2tcaut($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ize_1;
    onClickPhoneNumUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickSendSmsUseCase__plj4zm($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jze_1;
    onClickSendSmsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickEmailUseCase__v8uzjh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kze_1;
    onClickEmailUseCase$factory_0();
    return this_0.t2();
  }
  function navigateToEditAccount($this) {
    Companion_getInstance_125();
    $this.zqm_1.kp6('AccountEdit', mapOf_0(to('entityUid', $this.gze_1.toString())));
  }
  function navigateToManageAccount($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.person.detail.PersonDetailViewModel.navigateToManageAccount.<anonymous>' call
    Companion_getInstance_125();
    this_0.s('entityUid', $this.gze_1.toString());
    var tmp0_safe_receiver = $this.eze_1.t2().lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    this_0.s('PersonUsername', toString_0(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1));
    var tmp2_safe_receiver = $this.eze_1.t2().lze_1;
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vg7_1;
    this_0.s('PersonFullName', toString_0(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.ckr()));
    var tmp$ret$2 = this_0.f3();
    $this.zqm_1.kp6('ManageAccount', tmp$ret$2);
  }
  function Companion_184() {
    this.gzi_1 = 'PersonDetailView';
  }
  var Companion_instance_233;
  function Companion_getInstance_201() {
    return Companion_instance_233;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_34(function_0) {
    this.hzi_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_34).t1d = function (value, $completion) {
    return this.hzi_1(value, $completion);
  };
  function PersonDetailViewModel$onClickEdit$ref_0($boundThis) {
    var l = function () {
      $boundThis.xx5();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda(this$0, resultContinuation) {
    this.qzi_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.szi_1 = this.qzi_1.tqn().n7d().pg4(this.qzi_1.rqm_1, this.qzi_1.pqn());
            this.tzi_1 = shareIn(this.qzi_1.tqn().p7f().xi0(this.qzi_1.pqn(), this.qzi_1.rqm_1), this.qzi_1.oqn(), Companion_getInstance_12().v1h());
            var tmp_0 = this;
            var tmp_1 = this.qzi_1.rqn().p7f();
            var tmp_2 = this.qzi_1.pqn();
            PermissionFlags_getInstance();
            tmp_0.uzi_1 = tmp_1.ui0(tmp_2, new Long(4096, 0));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qzi_1.eze_1, PersonDetailViewModel$slambda$slambda_0(this.rzi_1, this.szi_1, this.tzi_1, this.qzi_1, this.uzi_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.qzi_1, completion);
    i.rzi_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.eze_1 = MutableStateFlow(new PersonDetailUiState());
    this.fze_1 = asStateFlow(this.eze_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.gze_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.hze_1 = InstanceOrNull(this, tmp$ret$0, null).a5d(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.ize_1 = Instance(this, tmp$ret$2, null).a5d(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.jze_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(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.kze_1 = Instance(this, tmp$ret$6, null).a5d(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).a5d(null, getLocalDelegateReference('accountManager', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_97().qq6_1;
        var tmp_9 = this.xqn().joj(strings_getInstance().tmv_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.jq6(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.eze_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_isActiveUser = this.rqm_1.equals(this.pqn());
        var tmp1_canSendSms = !(_get_onClickSendSmsUseCase__plj4zm(this) == null);
        var nextValue_0 = prevValue_0.sze(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.oqn();
    launch(tmp_11, VOID, VOID, PersonDetailViewModel$slambda_0(this, null));
  }
  protoOf(PersonDetailViewModel).xx5 = function () {
    Companion_getInstance_202();
    Companion_getInstance_125();
    this.zqm_1.kp6('PersonEditView', mapOf_0(to('entityUid', this.gze_1.toString())));
  };
  protoOf(PersonDetailViewModel).vzi = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).wzi = function () {
    return navigateToManageAccount(this);
  };
  protoOf(PersonDetailViewModel).xzi = function () {
    Companion_getInstance_116();
    this.zqm_1.kp6('MessageList', mapOf_0(to('personUid', this.gze_1.toString())));
  };
  protoOf(PersonDetailViewModel).yzi = function () {
    var tmp0_safe_receiver = this.eze_1.t2().lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k96_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).pp1(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).zzi = function () {
    var tmp0_safe_receiver = this.eze_1.t2().lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j96_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).pp1(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).nrx = function () {
    Companion_getInstance_125();
    this.zqm_1.kp6('SystemPermission', mapOf_0(to('personUid', this.rqm_1.toString())));
  };
  protoOf(PersonDetailViewModel).azj = function () {
    var tmp0_safe_receiver = this.eze_1.t2().lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wg7_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zg7_1;
    var ppjUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
    if (!ppjUid.equals(new Long(0, 0))) {
      Companion_getInstance_125();
      var tmp = to('entityUid', ppjUid.toString());
      Companion_getInstance_125();
      Companion_getInstance_116();
      this.zqm_1.kp6('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.lze_1 = person;
    this.mze_1 = displayPhoneNum;
    this.nze_1 = canSendSms;
    this.oze_1 = clazzes;
    this.pze_1 = hasChangePasswordPermission;
    this.qze_1 = showPermissionButton;
    this.rze_1 = isActiveUser;
  }
  protoOf(PersonDetailUiState).bzj = function () {
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    return isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o96_1);
  };
  protoOf(PersonDetailUiState).czj = function () {
    var tmp;
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l96_1) == null)) {
      var tmp2_safe_receiver = this.lze_1.vg7_1;
      tmp = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l96_1) === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).dzj = function () {
    var tmp;
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1) == null)) {
      tmp = this.pze_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).ezj = function () {
    var tmp;
    var tmp_0;
    if (!(this.lze_1 == null)) {
      var tmp0_safe_receiver = this.lze_1.vg7_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g96_1) == null;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.pze_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).fzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.p96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).gzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).hzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).izj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).jzj = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).kzj = function () {
    var tmp0_safe_receiver = this.lze_1;
    return !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wg7_1) == null);
  };
  protoOf(PersonDetailUiState).lzj = function () {
    var tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.lze_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vg7_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_1;
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_0 == null ? true : isBlank(this_0))) {
      tmp = !this.rze_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).mzj = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    return new PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).sze = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser, $super) {
    person = person === VOID ? this.lze_1 : person;
    displayPhoneNum = displayPhoneNum === VOID ? this.mze_1 : displayPhoneNum;
    canSendSms = canSendSms === VOID ? this.nze_1 : canSendSms;
    clazzes = clazzes === VOID ? this.oze_1 : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? this.pze_1 : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? this.qze_1 : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? this.rze_1 : isActiveUser;
    return $super === VOID ? this.mzj(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) : $super.mzj.call(this, person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).toString = function () {
    return 'PersonDetailUiState(person=' + this.lze_1 + ', displayPhoneNum=' + this.mze_1 + ', canSendSms=' + this.nze_1 + ', clazzes=' + this.oze_1 + ', hasChangePasswordPermission=' + this.pze_1 + ', showPermissionButton=' + this.qze_1 + ', isActiveUser=' + this.rze_1 + ')';
  };
  protoOf(PersonDetailUiState).hashCode = function () {
    var result = this.lze_1 == null ? 0 : this.lze_1.hashCode();
    result = imul(result, 31) + (this.mze_1 == null ? 0 : getStringHashCode(this.mze_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nze_1) | 0;
    result = imul(result, 31) + hashCode(this.oze_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pze_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qze_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rze_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.lze_1, tmp0_other_with_cast.lze_1))
      return false;
    if (!(this.mze_1 == tmp0_other_with_cast.mze_1))
      return false;
    if (!(this.nze_1 === tmp0_other_with_cast.nze_1))
      return false;
    if (!equals(this.oze_1, tmp0_other_with_cast.oze_1))
      return false;
    if (!(this.pze_1 === tmp0_other_with_cast.pze_1))
      return false;
    if (!(this.qze_1 === tmp0_other_with_cast.qze_1))
      return false;
    if (!(this.rze_1 === tmp0_other_with_cast.rze_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.vzj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda).qz9 = function (it, $completion) {
    var tmp = this.vny(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.qz9(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.wzj_1.n7d();
            var tmp_1;
            if (!_get_entityUid__ovkepw(this.vzj_1).equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.xzj_1 = tmp_1;
            if (this.xzj_1 == null) {
              this.yzj_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.xzj_1.mg4(_get_entityUid__ovkepw(this.vzj_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.yzj_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.yzj_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).vny = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this.vzj_1, completion);
    i.wzj_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.qz9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation) {
    this.hzk_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).aza = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).m78 = function ($completion) {
    return this.aza($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.hzk_1.ba('DateOfBirth');
          var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
          tmp_0.o96_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).l78 = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_1(this.hzk_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.aza($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.fzl_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.mzm(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.vzm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).xzm = function (it, $completion) {
    var tmp = this.vny(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.xzm(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.wzm_1.f7e().yh3(_get_entityUid__ovkepw(this.vzm_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).vny = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this.vzm_1, completion);
    i.wzm_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.xzm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).gzn = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).m78 = function ($completion) {
    return this.gzn($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).l78 = 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.gzn($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.fzl_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.mzm(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.pzn_1 = this$0;
    this.qzn_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda).szn = 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.szn((!(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.n4r();
            var tmp_1 = PersonEditViewModel$slambda$slambda$slambda_0(this.pzn_1, null);
            var tmp_2 = PersonEditViewModel$slambda$slambda$slambda_2(this.qzn_1, null);
            suspendResult = this.pzn_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonEditViewModel$slambda$slambda$lambda(this.pzn_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.pzn_1, this.qzn_1, completion);
    i.rzn_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.szn($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.bzo_1 = this$0;
    this.czo_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda_1).ezo = 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.ezo((!(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.n4r();
            var tmp_1 = listOf_0('picState');
            var tmp_2;
            if (!_get_entityUid__ovkepw(this.bzo_1).equals(new Long(0, 0))) {
              tmp_2 = PersonEditViewModel$slambda$slambda$slambda_4(this.bzo_1, null);
            } else {
              tmp_2 = null;
            }

            var tmp_3 = tmp_2;
            var tmp_4 = PersonEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.bzo_1.hqo(tmp_0, tmp_1, VOID, tmp_3, tmp_4, PersonEditViewModel$slambda$slambda$lambda_0(this.bzo_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_123();
            var tmp1_elvis_lhs = this_0 == null ? null : this_0.g97_1;
            setIfNoValueSetYet(this.czo_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.bzo_1, this.czo_1, completion);
    i.dzo_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.ezo($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    this.nzo_1 = this$0;
    this.ozo_1 = $savePerson;
    this.pzo_1 = $consentToUpsert;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).wzo = function (it, $completion) {
    var tmp = this.vny(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.wzo(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.nzo_1.fqt_1.equals(new Long(0, 0))) {
              this.hd_1 = 4;
              suspendResult = _get_addNewPersonUseCase__raa2qa(this.nzo_1).bpl(this.ozo_1, this.nzo_1.pqn(), true, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.nzo_1.tqn().n7d().ng4(this.ozo_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.szo_1 = this.pzo_1;
            if (this.szo_1 == null) {
              this.tzo_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.uzo_1 = this.szo_1;
              var tmp_1 = this;
              tmp_1.vzo_1 = this.uzo_1;
              this.hd_1 = 2;
              suspendResult = this.nzo_1.tqn().x7e().ugs(this.vzo_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.tzo_1 = this.uzo_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.rzo_1 = this.tzo_1;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.rzo_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.rzo_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).vny = function (it, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this.nzo_1, this.ozo_1, this.pzo_1, completion);
    i.qzo_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.wzo(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.izl_1;
    apiUrlConfig$factory_10();
    return this_0.t2();
  }
  function _get_entityUid__ovkepw($this) {
    Companion_getInstance_116();
    var tmp0_safe_receiver = $this.xqm_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.lzl_1;
    phoneNumValidatorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pzl_1;
    genderConfig$factory_2();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qzl_1;
    enqueueSavePictureUseCase$factory_0();
    return this_0.t2();
  }
  function _get_addNewPersonUseCase__raa2qa($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rzl_1;
    addNewPersonUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_4(_this__u8e3s4, $this) {
    return ((((((((!(_this__u8e3s4.azm_1 == null) ? true : !(_this__u8e3s4.czm_1 == null)) ? true : !(_this__u8e3s4.ezm_1 == null)) ? true : !(_this__u8e3s4.fzm_1 == null)) ? true : !(_this__u8e3s4.izm_1 == null)) ? true : !(_this__u8e3s4.jzm_1 == null)) ? true : !(_this__u8e3s4.hzm_1 == null)) ? true : !(_this__u8e3s4.dzm_1 == null)) ? true : !(_this__u8e3s4.gzm_1 == null)) ? true : !(_this__u8e3s4.kzm_1 == null);
  }
  function Companion_185() {
    Companion_instance_234 = this;
    this.xzo_1 = 'picState';
    this.yzo_1 = 'PersonEditView';
    this.zzo_1 = 'Register';
    this.azp_1 = listOf(['PersonEditView', 'Register']);
    this.bzp_1 = 'RegMode';
    this.czp_1 = 'DateOfBirth';
    this.dzp_1 = 'RegViaLink';
    this.ezp_1 = 0;
    this.fzp_1 = 1;
    this.gzp_1 = 2;
    var tmp = this;
    Companion_getInstance_116();
    Companion_getInstance_116();
    Companion_getInstance_125();
    Companion_getInstance_125();
    tmp.hzp_1 = listOf(['learningSpaceUrl', 'showAccept', 'popUpToOnFinish', 'next', 'RegViaLink', 'DateOfBirth', 'RegMode', 'noSessionChange']);
    this.izp_1 = 'initDob';
  }
  var Companion_instance_234;
  function Companion_getInstance_202() {
    if (Companion_instance_234 == null)
      new Companion_185();
    return Companion_instance_234;
  }
  function PersonEditViewModel$slambda(this$0, resultContinuation) {
    this.rzp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.rzp_1.hzl_1 === 0) ? this.rzp_1.fqt_1.equals(new Long(0, 0)) : false) {
              this.tzp_1 = true;
              this.hd_1 = 4;
              continue $sm;
            } else {
              if (!this.rzp_1.fqt_1.equals(new Long(0, 0)) ? this.rzp_1.pqn().equals(this.rzp_1.fqt_1) : false) {
                this.tzp_1 = true;
                this.hd_1 = 4;
                continue $sm;
              } else {
                if (this.rzp_1.fqt_1.equals(new Long(0, 0))) {
                  this.hd_1 = 2;
                  var tmp_0 = this.szp_1.p7f();
                  var tmp_1 = this.rzp_1.pqn();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_0.ti0(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.szp_1.p7f();
                  var tmp_3 = this.rzp_1.pqn();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_2.ti0(tmp_3, new Long(32768, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 1:
            this.tzp_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.tzp_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            throw this.kd_1;
          case 4:
            return this.tzp_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).vny = function (db, completion) {
    var i = new PersonEditViewModel$slambda(this.rzp_1, completion);
    i.szp_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.jsc(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.fzl_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.mzm(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.czq_1 = this$0;
    this.dzq_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.ezq_1, VOID, VOID, PersonEditViewModel$slambda$slambda_0(this.czq_1, this.dzq_1, null));
            suspendResult = awaitAll([tmp_0, async(this.ezq_1, VOID, VOID, PersonEditViewModel$slambda$slambda_2(this.czq_1, this.dzq_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.czq_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (hasFlag(this.czq_1.hzl_1, 1)) {
                  tmp_1 = this.czq_1.xqn().joj(strings_getInstance().nmk_1);
                } else {
                  tmp_1 = this.czq_1.xqn().joj(strings_getInstance().hn3_1);
                }
                var tmp_2 = tmp_1;
                var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_2, VOID, PersonEditViewModel$onClickSave$ref(this.czq_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_3;
            if (hasFlag(this.czq_1.hzl_1, 2)) {
              tmp_3 = new PersonParentJoin();
            } else {
              tmp_3 = null;
            }

            var personParentJoin = tmp_3;
            l$ret$3: do {
              var this_1 = this.czq_1.fzl_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.mzm(VOID, VOID, VOID, VOID, true, personParentJoin);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.czq_1.zqn(Companion_getInstance_97().rq6_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.czq_1, this.dzq_1, completion);
    i.ezq_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.g96_1;
      tmp.g96_1 = this$0.ozl_1.mpe(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '');
      return Unit_instance;
    };
  }
  function PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.nzq_1 = $commitDelay;
    this.ozq_1 = $entity;
    this.pzq_1 = $this;
    this.qzq_1 = $key;
    this.rzq_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.nzq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ozq_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.pzq_1.dqo(this.pzq_1.xqm_1, this.qzq_1, this.rzq_1, this.ozq_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.nzq_1, this.ozq_1, this.pzq_1, this.qzq_1, this.rzq_1, completion);
    i.szq_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.bzr_1 = this$0;
    this.czr_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.bzr_1.dqo(this.bzr_1.xqm_1, 'picState', Companion_instance_7.n4r(), this.czr_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.bzr_1, this.czr_1, completion);
    i.dzr_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.k96_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.k96_1 = tmp1_safe_receiver == null ? null : replace(tmp1_safe_receiver, ' ', '');
    var tmp_1 = $this$shallowCopy;
    var tmp2_safe_receiver = $this$shallowCopy.j96_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.j96_1 = tmp_2;
    return Unit_instance;
  }
  function PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    this.mzr_1 = $isRegistrationMode;
    this.nzr_1 = this$0;
    this.ozr_1 = $savePerson;
    this.pzr_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.mzr_1) {
              this.rzr_1 = this.nzr_1.fzl_1.t2().yzl_1;
              this.szr_1 = this.nzr_1.fzl_1.t2().uzl_1;
              var tmp_0 = this;
              var tmp$ret$0;
              l$ret$1: do {
                var this_0 = this.nzr_1.fzl_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_1;
                  var this_1 = this.ozr_1.g96_1;
                  if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
                    tmp_1 = this.pzr_1;
                  } else {
                    tmp_1 = null;
                  }
                  var tmp3_usernameError = tmp_1;
                  var tmp_2;
                  var this_2 = this.szr_1;
                  if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
                    tmp_2 = this.pzr_1;
                  } else {
                    tmp_2 = null;
                  }
                  var tmp4_passwordError = tmp_2;
                  var tmp_3;
                  if (!hasFlag(this.nzr_1.hzl_1, 2)) {
                    tmp_3 = null;
                  } else {
                    var tmp0_safe_receiver = this.rzr_1;
                    var this_3 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hg8_1;
                    if (this_3 == null ? true : charSequenceLength(this_3) === 0) {
                      tmp_3 = this.pzr_1;
                    } else {
                      var tmp1_safe_receiver = this.rzr_1;
                      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hg8_1;
                      var tmp_4;
                      if (tmp2_safe_receiver == null) {
                        tmp_4 = null;
                      } else {
                        tmp_4 = this.nzr_1.mzl_1.np9(tmp2_safe_receiver);
                      }
                      if (tmp_4 == null) {
                        tmp_3 = this.nzr_1.xqn().joj(strings_getInstance().sna_1);
                      } else {
                        tmp_3 = null;
                      }
                    }
                  }
                  var tmp5_parentContactError = tmp_3;
                  var tmp_5;
                  if (this.ozr_1.o96_1.equals(new Long(0, 0))) {
                    tmp_5 = this.pzr_1;
                  } else {
                    tmp_5 = null;
                  }
                  var tmp6_dateOfBirthError = tmp_5;
                  var nextValue = prevValue.mzm(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.tzr_1 = tmp$ret$0;
              if (hasErrors_4(this.tzr_1, this.nzr_1) ? true : this.szr_1 == null) {
                this.nzr_1.zqn(Companion_getInstance_97().rq6_1);
                l$ret$3: do {
                  var this_4 = this.nzr_1.fzl_1;
                  while (true) {
                    var prevValue_0 = this_4.t2();
                    var nextValue_0 = prevValue_0.mzm(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.nzr_1.fqt_1.equals(new Long(0, 0)) ? isDateOfBirthAMinor(Companion_getInstance_6().fmh(this.ozr_1.o96_1)) : false) {
                var tmp_7 = Companion_getInstance_6();
                var tmp0_safe_receiver_0 = this.nzr_1.xqm_1.ba('initDob');
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
                tmp_6 = !isDateOfBirthAMinor(tmp_7.fmh(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
              } else {
                tmp_6 = false;
              }
              if (tmp_6) {
                this.hd_1 = 1;
                suspendResult = this.nzr_1.tqn().x7e().xgs(this.ozr_1.f96_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.wzr_1 = false;
                this.hd_1 = 2;
                continue $sm;
              }
            }

          case 1:
            this.xzr_1 = suspendResult;
            this.wzr_1 = !this.xzr_1;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.wzr_1) {
              var tmp_8 = this;
              var this_5 = new PersonParentJoin();
              this_5.fg8_1 = this.ozr_1.f96_1;
              this_5.eg8_1 = this.nzr_1.nqn().goa().vky_1;
              var tmp_9 = this_5;
              tmp_9.kg8_1 = 1;
              this_5.lg8_1 = systemTimeInMillis();
              tmp_8.vzr_1 = this_5;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.vzr_1 = null;
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.yzr_1 = this.vzr_1;
            this.hd_1 = 4;
            var tmp_11 = this.nzr_1.tqn();
            suspendResult = withDoorTransactionAsync(tmp_11, VOID, PersonEditViewModel$onClickSave$slambda$slambda_0(this.nzr_1, this.ozr_1, this.yzr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.zzr_1 = this.nzr_1.fzl_1.t2().wzl_1;
            if (!(this.zzr_1 == null)) {
              this.zzr_1.e97_1 = this.ozr_1.f96_1;
              this.zzr_1.f97_1 = systemTimeInMillis();
              var tmp_12 = this;
              Companion_getInstance_123();
              var tmp2_elvis_lhs = this.nzr_1.xqm_1.ba('initPicUri');
              tmp_12.azs_1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              this.bzs_1 = this.zzr_1.g97_1;
              if (!(this.azs_1 === this.bzs_1)) {
                this.hd_1 = 5;
                suspendResult = this.nzr_1.rqn().f7e().xh3(this.zzr_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.nzr_1);
            var tmp_14 = this.ozr_1.f96_1;
            suspendResult = tmp_13.uor(tmp_14, 50, this.bzs_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.czs_1 = this.nzr_1.xqm_1.ba('goToOnPersonSelected');
            if (!(this.czs_1 == null)) {
              var tmp_16 = UMFileUtil_getInstance().parseURLQueryString(this.czs_1);
              Companion_getInstance_116();
              var args = plus_0(tmp_16, mapOf_0(to('personUid', this.ozr_1.f96_1.toString())));
              this.nzr_1.zqm_1.kp6(substringBefore_0(this.czs_1, '?'), args);
            } else {
              this.nzr_1.hqt('PersonDetailView', this.ozr_1.f96_1, this.ozr_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.nzr_1.nqn().moa(this.ozr_1, this.szr_1, this.nzr_1.jzl_1, new AccountRegisterOptions(!hasFlag(this.nzr_1.hzl_1, 2) ? !this.nzr_1.szl_1 : false, this.rzr_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.nzr_1.hzl_1, 2)) {
              var goOptions = new UstadGoOptions('RegisterAgeRedirect', true);
              var this_6 = LinkedHashMap_init_$Create$();
              var key = 'username';
              var tmp0_elvis_lhs = this.ozr_1.g96_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.rzr_1;
              var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.hg8_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.nzr_1.fzl_1.t2().uzl_1;
              var value_1 = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
              this_6.s(key_1, value_1);
              Companion_getInstance_116();
              putFromSavedStateIfPresent(this_6, this.nzr_1.xqm_1, 'popUpToOnFinish');
              var args_0 = this_6;
              this.nzr_1.zqm_1.iq9('WaitForParent', args_0, goOptions);
              tmp_18 = Unit_instance;
            } else {
              this.nzr_1.jqu(this.nzr_1.zqm_1, appendSelectedAccount(this.nzr_1.kzl_1, registeredPerson.f96_1, new LearningSpace(this.nzr_1.jzl_1)), new UstadGoOptions(VOID, VOID, true));
              tmp_18 = Unit_instance;
            }

            tmp_17.uzr_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.nzr_1.fzl_1;
                  while (true) {
                    var prevValue_1 = this_7.t2();
                    var nextValue_1 = prevValue_1.mzm(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.nzr_1.xqn().joj(strings_getInstance().yn7_1));
                    if (this_7.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$7;
                    }
                  }
                }
                 while (false);
              } else {
                this.nzr_1.vqn().yq6(new Snack(this.nzr_1.xqn().joj(strings_getInstance().amj_1)));
              }
              this.dzs_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.nzr_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$11: do {
              var this_8 = this.nzr_1.fzl_1;
              while (true) {
                var prevValue_2 = this_8.t2();
                var nextValue_2 = prevValue_2.mzm(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.nzr_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$13: do {
              var this_9 = this.nzr_1.fzl_1;
              while (true) {
                var prevValue_3 = this_9.t2();
                var nextValue_3 = prevValue_3.mzm(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.nzr_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$15: do {
              var this_10 = this.nzr_1.fzl_1;
              while (true) {
                var prevValue_4 = this_10.t2();
                var nextValue_4 = prevValue_4.mzm(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.mzr_1, this.nzr_1, this.ozr_1, this.pzr_1, completion);
    i.qzr_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_202();
    destName = destName === VOID ? 'PersonEditView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.fzl_1 = MutableStateFlow(new PersonEditUiState());
    this.gzl_1 = asStateFlow(this.fzl_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.hzl_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(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.izl_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_9());
    var tmp_2 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs_0 = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg_4(this).vo5_1 : tmp0_elvis_lhs;
    tmp_2.jzl_1 = tmp1_elvis_lhs_0 == null ? 'http://localhost' : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('next');
    tmp_3.kzl_1 = tmp0_elvis_lhs_0 == null ? this.xqn().dq5() : 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.lzl_1 = Instance(this, tmp$ret$2, null).a5d(this, phoneNumValidatorUseCase$factory());
    this.mzl_1 = new ValidateEmailUseCase();
    this.nzl_1 = new ValidateUsernameUseCase_0();
    this.ozl_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.pzl_1 = Instance(this, tmp$ret$4, null).a5d(this, genderConfig$factory_1());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.nqn().ioa();
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.h57(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.qzl_1 = Instance(this_0, tmp$ret$9, null).a5d(this, enqueueSavePictureUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveLearningSpace(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.rzl_1 = Instance(this_1, tmp$ret$11, null).a5d(this, addNewPersonUseCase$factory());
    var tmp_14 = this;
    Companion_getInstance_125();
    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.szl_1 = tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1;
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp_15;
    if (hasFlag(this.hzl_1, 1)) {
      tmp_15 = this.xqn().joj(strings_getInstance().nnl_1);
    } else {
      tmp_15 = _get_entityUid__ovkepw(this).equals(new Long(0, 0)) ? this.xqn().joj(strings_getInstance().tn1_1) : this.xqn().joj(strings_getInstance().un1_1);
    }
    var title = tmp_15;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.bqn_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var tmp0_navigationVisible = !hasFlag(this.hzl_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.fzl_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.mzm(VOID, VOID, _get_genderConfig__kyr0zc_0(this).iq7_1, VOID, VOID, VOID, this.hzl_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.iqo(tmp_16, true, tmp_17, PersonEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(PersonEditViewModel).izc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzl_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.g96_1;
        var tmp1_safe_receiver = this.fzl_1.t2().tzl_1;
        if (!(tmp_0 == (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g96_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.tzl_1;
        var tmp_2 = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.l96_1;
        var tmp16_genderError = this.iqu(tmp_2, entity == null ? null : entity.l96_1, prevValue.hzm_1);
        var tmp9_safe_receiver = prevValue.tzl_1;
        var tmp_3 = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.h96_1;
        var tmp17_firstNameError = this.iqu(tmp_3, entity == null ? null : entity.h96_1, prevValue.izm_1);
        var tmp11_safe_receiver = prevValue.tzl_1;
        var tmp_4 = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.i96_1;
        var tmp18_lastNameError = this.iqu(tmp_4, entity == null ? null : entity.i96_1, prevValue.jzm_1);
        var tmp13_safe_receiver = prevValue.tzl_1;
        var tmp_5 = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.k96_1;
        var tmp19_phoneNumError = this.iqu(tmp_5, entity == null ? null : entity.k96_1, prevValue.kzm_1);
        var tmp5_safe_receiver = prevValue.tzl_1;
        var tmp_6 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.j96_1;
        var tmp20_emailError = this.iqu(tmp_6, entity == null ? null : entity.j96_1, prevValue.dzm_1);
        var tmp3_safe_receiver = prevValue.tzl_1;
        var tmp_7 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.g96_1;
        var tmp21_usernameError = this.iqu(tmp_7, entity == null ? null : entity.g96_1, prevValue.azm_1);
        var nextValue = prevValue.mzm(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.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_8 = this;
    var tmp_9 = this.oqn();
    tmp_8.eqt_1 = launch(tmp_9, VOID, VOID, PersonEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonEditViewModel).ezs = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.mzm(VOID, password, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).fzs = 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.fzl_1.t2().wzl_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e97_1;
    tmp.e97_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this_0.g97_1 = pictureUri;
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fzl_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.mzm(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, PersonEditViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(PersonEditViewModel).gzs = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onApprovalPersonParentJoinChanged.<anonymous>' call
        var nextValue = prevValue.mzm(VOID, VOID, VOID, VOID, VOID, personParentJoin);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).hzs = function (phoneNumSet) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.fzl_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().lzm_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.mzm(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).xs9 = function () {
    if (!this.fzl_1.t2().xzl_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.fzl_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.mzm(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.zqn(Companion_getInstance_97().qq6_1);
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.fzl_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.mzm(VOID, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.fzl_1.t2().tzl_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.xqn().joj(strings_getInstance().vmn_1);
    var currentTime = systemTimeInMillis();
    var isRegistrationMode = hasFlag(this.hzl_1, 1);
    var tmp2_safe_receiver = savePerson.j96_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.mzl_1.np9(tmp2_safe_receiver);
    }
    var validatedEmailAddr = tmp_1;
    var tmp_2;
    if (isRegistrationMode) {
      var tmp3_elvis_lhs = savePerson.g96_1;
      tmp_2 = this.nzl_1.np9(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.fzl_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.rpo_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.xqn().joj(strings_getInstance().kmq_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.g96_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.xqn().joj(strings_getInstance().vmn_1);
        } else {
          tmp_5 = null;
        }
        var tmp4_passwordError = tmp_5;
        var tmp_7;
        if (savePerson.o96_1.c7(currentTime) > 0) {
          tmp_7 = this.xqn().joj(strings_getInstance().kmq_1);
        } else if (isRegistrationMode ? !isDateSet(savePerson.o96_1) : false) {
          tmp_7 = this.xqn().joj(strings_getInstance().vmn_1);
        } else {
          tmp_7 = null;
        }
        var tmp5_dateOfBirthError = tmp_7;
        var tmp_8;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_4 = savePerson.h96_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.i96_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.l96_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.fzl_1.t2().lzm_1) {
          var tmp2_safe_receiver_0 = savePerson.k96_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).bph(tmp2_safe_receiver_0);
          }
          tmp_13 = !(tmp_14 === true);
        } else {
          tmp_13 = false;
        }
        if (tmp_13) {
          tmp_12 = this.xqn().joj(strings_getInstance().kmq_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.j96_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.xqn().joj(strings_getInstance().kmq_1);
        } else {
          tmp_15 = null;
        }
        var tmp10_emailError = tmp_15;
        var nextValue_1 = prevValue_1.mzm(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_4(this.fzl_1.t2(), this)) {
      this.zqn(Companion_getInstance_97().rq6_1);
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_7 = this.fzl_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.mzm(VOID, VOID, VOID, VOID, true);
          if (this_7.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_17 = this.oqn();
    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().kq7_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.tzl_1 = person;
    this.uzl_1 = password;
    this.vzl_1 = genderOptions;
    this.wzl_1 = personPicture;
    this.xzl_1 = fieldsEnabled;
    this.yzl_1 = approvalPersonParentJoin;
    this.zzl_1 = registrationMode;
    this.azm_1 = usernameError;
    this.bzm_1 = passwordConfirmedError;
    this.czm_1 = passwordError;
    this.dzm_1 = emailError;
    this.ezm_1 = confirmError;
    this.fzm_1 = dateOfBirthError;
    this.gzm_1 = parentContactError;
    this.hzm_1 = genderError;
    this.izm_1 = firstNameError;
    this.jzm_1 = lastNameError;
    this.kzm_1 = phoneNumError;
    this.lzm_1 = nationalPhoneNumSet;
  }
  protoOf(PersonEditUiState).izs = function () {
    return !(this.yzl_1 == null);
  };
  protoOf(PersonEditUiState).bzj = function () {
    return !hasFlag(this.zzl_1, 1);
  };
  protoOf(PersonEditUiState).qyy = function () {
    return hasFlag(this.zzl_1, 1);
  };
  protoOf(PersonEditUiState).jzs = function () {
    return hasFlag(this.zzl_1, 1);
  };
  protoOf(PersonEditUiState).hzj = function () {
    return !hasFlag(this.zzl_1, 2);
  };
  protoOf(PersonEditUiState).gzj = function () {
    return !hasFlag(this.zzl_1, 2);
  };
  protoOf(PersonEditUiState).fzj = function () {
    return !hasFlag(this.zzl_1, 2);
  };
  protoOf(PersonEditUiState).kzs = 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).mzm = 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.tzl_1 : person;
    password = password === VOID ? this.uzl_1 : password;
    genderOptions = genderOptions === VOID ? this.vzl_1 : genderOptions;
    personPicture = personPicture === VOID ? this.wzl_1 : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? this.xzl_1 : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? this.yzl_1 : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? this.zzl_1 : registrationMode;
    usernameError = usernameError === VOID ? this.azm_1 : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? this.bzm_1 : passwordConfirmedError;
    passwordError = passwordError === VOID ? this.czm_1 : passwordError;
    emailError = emailError === VOID ? this.dzm_1 : emailError;
    confirmError = confirmError === VOID ? this.ezm_1 : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? this.fzm_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.gzm_1 : parentContactError;
    genderError = genderError === VOID ? this.hzm_1 : genderError;
    firstNameError = firstNameError === VOID ? this.izm_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.jzm_1 : lastNameError;
    phoneNumError = phoneNumError === VOID ? this.kzm_1 : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? this.lzm_1 : nationalPhoneNumSet;
    return $super === VOID ? this.kzs(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) : $super.kzs.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.tzl_1 + ', password=' + this.uzl_1 + ', genderOptions=' + this.vzl_1 + ', personPicture=' + this.wzl_1 + ', fieldsEnabled=' + this.xzl_1 + ', approvalPersonParentJoin=' + this.yzl_1 + ', registrationMode=' + this.zzl_1 + ', usernameError=' + this.azm_1 + ', passwordConfirmedError=' + this.bzm_1 + ', passwordError=' + this.czm_1 + ', emailError=' + this.dzm_1 + ', confirmError=' + this.ezm_1 + ', dateOfBirthError=' + this.fzm_1 + ', parentContactError=' + this.gzm_1 + ', genderError=' + this.hzm_1 + ', firstNameError=' + this.izm_1 + ', lastNameError=' + this.jzm_1 + ', phoneNumError=' + this.kzm_1 + ', nationalPhoneNumSet=' + this.lzm_1 + ')';
  };
  protoOf(PersonEditUiState).hashCode = function () {
    var result = this.tzl_1 == null ? 0 : this.tzl_1.hashCode();
    result = imul(result, 31) + (this.uzl_1 == null ? 0 : getStringHashCode(this.uzl_1)) | 0;
    result = imul(result, 31) + hashCode(this.vzl_1) | 0;
    result = imul(result, 31) + (this.wzl_1 == null ? 0 : this.wzl_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xzl_1) | 0;
    result = imul(result, 31) + (this.yzl_1 == null ? 0 : this.yzl_1.hashCode()) | 0;
    result = imul(result, 31) + this.zzl_1 | 0;
    result = imul(result, 31) + (this.azm_1 == null ? 0 : getStringHashCode(this.azm_1)) | 0;
    result = imul(result, 31) + (this.bzm_1 == null ? 0 : getStringHashCode(this.bzm_1)) | 0;
    result = imul(result, 31) + (this.czm_1 == null ? 0 : getStringHashCode(this.czm_1)) | 0;
    result = imul(result, 31) + (this.dzm_1 == null ? 0 : getStringHashCode(this.dzm_1)) | 0;
    result = imul(result, 31) + (this.ezm_1 == null ? 0 : getStringHashCode(this.ezm_1)) | 0;
    result = imul(result, 31) + (this.fzm_1 == null ? 0 : getStringHashCode(this.fzm_1)) | 0;
    result = imul(result, 31) + (this.gzm_1 == null ? 0 : getStringHashCode(this.gzm_1)) | 0;
    result = imul(result, 31) + (this.hzm_1 == null ? 0 : getStringHashCode(this.hzm_1)) | 0;
    result = imul(result, 31) + (this.izm_1 == null ? 0 : getStringHashCode(this.izm_1)) | 0;
    result = imul(result, 31) + (this.jzm_1 == null ? 0 : getStringHashCode(this.jzm_1)) | 0;
    result = imul(result, 31) + (this.kzm_1 == null ? 0 : getStringHashCode(this.kzm_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lzm_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.tzl_1, tmp0_other_with_cast.tzl_1))
      return false;
    if (!(this.uzl_1 == tmp0_other_with_cast.uzl_1))
      return false;
    if (!equals(this.vzl_1, tmp0_other_with_cast.vzl_1))
      return false;
    if (!equals(this.wzl_1, tmp0_other_with_cast.wzl_1))
      return false;
    if (!(this.xzl_1 === tmp0_other_with_cast.xzl_1))
      return false;
    if (!equals(this.yzl_1, tmp0_other_with_cast.yzl_1))
      return false;
    if (!(this.zzl_1 === tmp0_other_with_cast.zzl_1))
      return false;
    if (!(this.azm_1 == tmp0_other_with_cast.azm_1))
      return false;
    if (!(this.bzm_1 == tmp0_other_with_cast.bzm_1))
      return false;
    if (!(this.czm_1 == tmp0_other_with_cast.czm_1))
      return false;
    if (!(this.dzm_1 == tmp0_other_with_cast.dzm_1))
      return false;
    if (!(this.ezm_1 == tmp0_other_with_cast.ezm_1))
      return false;
    if (!(this.fzm_1 == tmp0_other_with_cast.fzm_1))
      return false;
    if (!(this.gzm_1 == tmp0_other_with_cast.gzm_1))
      return false;
    if (!(this.hzm_1 == tmp0_other_with_cast.hzm_1))
      return false;
    if (!(this.izm_1 == tmp0_other_with_cast.izm_1))
      return false;
    if (!(this.jzm_1 == tmp0_other_with_cast.jzm_1))
      return false;
    if (!(this.kzm_1 == tmp0_other_with_cast.kzm_1))
      return false;
    if (!(this.lzm_1 === tmp0_other_with_cast.lzm_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_9() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_4(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory_1() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_0(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_10() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_4(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory_0() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory_2() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_0(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 LearningSpaceListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.tzs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).vzs = function (learningSpaceList, $completion) {
    var tmp = this.wzs(learningSpaceList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.vzs((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceListViewModel$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.tzs_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zzs(VOID, this.uzs_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(LearningSpaceListViewModel$slambda$slambda$slambda).wzs = function (learningSpaceList, completion) {
    var i = new LearningSpaceListViewModel$slambda$slambda$slambda(this.tzs_1, completion);
    i.uzs_1 = learningSpaceList;
    return i;
  };
  function LearningSpaceListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (learningSpaceList, $completion) {
      return i.vzs(learningSpaceList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.izt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LearningSpaceListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($completion);
  };
  protoOf(LearningSpaceListViewModel$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.izt_1.lzu_1.yl3();
            var tmp_1 = LearningSpaceListViewModel$slambda$slambda$slambda_0(this.izt_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_35(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(LearningSpaceListViewModel$slambda$slambda).l78 = function (completion) {
    return new LearningSpaceListViewModel$slambda$slambda(this.izt_1, completion);
  };
  function LearningSpaceListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_impl__d88w17_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jzu_1;
    impl$factory_4();
    return this_0.t2();
  }
  function _get_goToLearningSpaceUseCase__yq7hh5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kzu_1;
    goToLearningSpaceUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_186() {
    this.mzu_1 = 'LearningSpaceList';
    this.nzu_1 = 'stateUrl';
  }
  var Companion_instance_235;
  function Companion_getInstance_203() {
    return Companion_instance_235;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_35(function_0) {
    this.ozu_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_35).t1d = function (value, $completion) {
    return this.ozu_1(value, $completion);
  };
  function LearningSpaceListViewModel$slambda(this$0, resultContinuation) {
    this.xzu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceListViewModel$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(LearningSpaceListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceListViewModel$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.xzu_1.sqv_1, LearningSpaceListViewModel$slambda$slambda_0(this.xzu_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(LearningSpaceListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LearningSpaceListViewModel$slambda(this.xzu_1, completion);
    i.yzu_1 = $this$launch;
    return i;
  };
  function LearningSpaceListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new LearningSpaceListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new LearningSpaceListUiState(), 'LearningSpaceList');
    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.jzu_1 = Instance(this, tmp$ret$0, null).a5d(this, impl$factory_3());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GoToLearningSpaceUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.kzu_1 = Instance(this, tmp$ret$2, null).a5d(this, goToLearningSpaceUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var tmp_4 = get_direct(di).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(CentralAppConfigDbDataSource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_3.lzu_1 = tmp_4.d58(tmp$ret$4, null).vl2();
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_1(this).joj(strings_getInstance().jnq_1);
        var nextValue = prevValue.jq6(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.sqv_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.learningspacelist.LearningSpaceListViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba(Companion_instance_235.nzu_1);
        var nextValue_0 = prevValue_0.zzs(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.oqn();
    launch(tmp_6, VOID, VOID, LearningSpaceListViewModel$slambda_0(this, null));
  }
  protoOf(LearningSpaceListViewModel).lwk = function () {
    Companion_getInstance_218();
    // 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.person.learningspacelist.LearningSpaceListViewModel.onClickNext.<anonymous>' call
    Companion_getInstance_125();
    this.kqo(this_0, 'next');
    this.lqo(this_0, Companion_getInstance_213().hr7_1);
    var tmp$ret$2 = this_0.f3();
    this.zqm_1.kp6('LearningSpaceEnterLink', tmp$ret$2);
  };
  protoOf(LearningSpaceListViewModel).zzu = function (learningSpace) {
    var tmp;
    Companion_getInstance_213();
    var tmp_0 = this.xqm_1.ba('newOrExisting');
    Companion_getInstance_213();
    if (tmp_0 === 'new') {
      tmp = 'RegisterAgeRedirect';
    } else {
      tmp = 'Login';
    }
    var viewName = tmp;
    // 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.person.learningspacelist.LearningSpaceListViewModel.onSelectLearningSpace.<anonymous>' call
    Companion_getInstance_125();
    this.kqo(this_0, 'next');
    this.lqo(this_0, Companion_getInstance_213().hr7_1);
    Companion_getInstance_116();
    this_0.s('learningSpaceUrl', learningSpace);
    var args = this_0.f3();
    _get_goToLearningSpaceUseCase__yq7hh5(this).hpi(learningSpace, this.zqm_1, args, viewName);
  };
  protoOf(LearningSpaceListViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(LearningSpaceListViewModel).nqw = function () {
  };
  function LearningSpaceListUiState(siteLink, learningSpaces) {
    siteLink = siteLink === VOID ? '' : siteLink;
    learningSpaces = learningSpaces === VOID ? emptyList() : learningSpaces;
    this.xzs_1 = siteLink;
    this.yzs_1 = learningSpaces;
  }
  protoOf(LearningSpaceListUiState).azv = function (siteLink, learningSpaces) {
    return new LearningSpaceListUiState(siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).zzs = function (siteLink, learningSpaces, $super) {
    siteLink = siteLink === VOID ? this.xzs_1 : siteLink;
    learningSpaces = learningSpaces === VOID ? this.yzs_1 : learningSpaces;
    return $super === VOID ? this.azv(siteLink, learningSpaces) : $super.azv.call(this, siteLink, learningSpaces);
  };
  protoOf(LearningSpaceListUiState).toString = function () {
    return 'LearningSpaceListUiState(siteLink=' + this.xzs_1 + ', learningSpaces=' + this.yzs_1 + ')';
  };
  protoOf(LearningSpaceListUiState).hashCode = function () {
    var result = getStringHashCode(this.xzs_1);
    result = imul(result, 31) + hashCode(this.yzs_1) | 0;
    return result;
  };
  protoOf(LearningSpaceListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpaceListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpaceListUiState ? other : THROW_CCE();
    if (!(this.xzs_1 === tmp0_other_with_cast.xzs_1))
      return false;
    if (!equals(this.yzs_1, tmp0_other_with_cast.yzs_1))
      return false;
    return true;
  };
  function impl$factory_3() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_1(receiver);
    }, null);
  }
  function goToLearningSpaceUseCase$factory() {
    return getPropertyCallableRef('goToLearningSpaceUseCase', 1, KProperty1, function (receiver) {
      return _get_goToLearningSpaceUseCase__yq7hh5(receiver);
    }, null);
  }
  function impl$factory_4() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_1(receiver);
    }, null);
  }
  function goToLearningSpaceUseCase$factory_0() {
    return getPropertyCallableRef('goToLearningSpaceUseCase', 1, KProperty1, function (receiver) {
      return _get_goToLearningSpaceUseCase__yq7hh5(receiver);
    }, null);
  }
  function EmptyPagingSource() {
    PagingSource.call(this);
  }
  protoOf(EmptyPagingSource).p54 = 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.kzv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda$slambda).iqf = function (hasPermissionToList, $completion) {
    var tmp = this.jqf(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.iqf((!(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.kzv_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (this.lzv_1) {
                tmp_0 = this.kzv_1.qzw_1;
              } else {
                tmp_0 = PersonListViewModel$slambda$slambda$slambda$lambda;
              }
              var tmp0_personList = tmp_0;
              var tmp1_showInviteViaLink = !(this.kzv_1.rzw_1 == null);
              var tmp2_inviteCode = this.kzv_1.rzw_1;
              var tmp3_showInviteViaContact = this.kzv_1.szw_1;
              var nextValue = prevValue.ezx(tmp0_personList, VOID, VOID, VOID, tmp1_showInviteViaLink, tmp3_showInviteViaContact, tmp2_inviteCode, this.lzv_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.kzv_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.bq6_1.tq5(this.lzv_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).jqf = function (hasPermissionToList, completion) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this.kzv_1, completion);
    i.lzv_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.iqf(hasPermissionToList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation) {
    this.nzx_1 = $hasPermissionToListFlow;
    this.ozx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.nzx_1);
            var tmp_1 = PersonListViewModel$slambda$slambda$slambda_0(this.ozx_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(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).l78 = function (completion) {
    return new PersonListViewModel$slambda$slambda(this.nzx_1, this.ozx_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.xzx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda_1).jt7 = function (it, $completion) {
    var tmp = this.kt7(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.jt7(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.yzx_1;
          var hasAddPermission = tmp0_container.y6();
          var hasViewAllPermission = tmp0_container.z6();
          var hasBulkAddPermission = hasAddPermission ? hasViewAllPermission : false;
          l$ret$1: do {
            var this_0 = this.xzx_1.sqv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ezx(VOID, VOID, VOID, this.xzx_1.xqv().equals(ListViewMode_PICKER_getInstance()) ? hasAddPermission : false, VOID, 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.xzx_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.jq6(prevValue_0.uq5_1.pq6(this.xzx_1.xqv().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).kt7 = function (it, completion) {
    var i = new PersonListViewModel$slambda$slambda_1(this.xzx_1, completion);
    i.yzx_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.jt7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tzw_1;
    setClipboardStringUseCase$factory_4();
    return this_0.t2();
  }
  function onClickFab($this) {
    if ($this.sqv_1.t2().dzx_1) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = $this.sqv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickFab.<anonymous>' call
          var nextValue = prevValue.ezx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      $this.nqw();
    }
  }
  function Companion_187() {
    Companion_instance_236 = this;
    this.zzx_1 = 'People';
    this.azy_1 = 'PersonListHome';
    this.bzy_1 = listOf(['People', 'PersonListHome']);
    this.czy_1 = 'exlcudeFromClazz';
    this.dzy_1 = 'excludeAlreadySelectedList';
    this.ezy_1 = 'showAddViaInviteLink';
    this.fzy_1 = 'showAddViaContact';
    this.gzy_1 = 'role';
    this.hzy_1 = 'rptsl';
  }
  var Companion_instance_236;
  function Companion_getInstance_204() {
    if (Companion_instance_236 == null)
      new Companion_187();
    return Companion_instance_236;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_36(function_0) {
    this.izy_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_36).t1d = function (value, $completion) {
    return this.izy_1(value, $completion);
  };
  function PersonListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.tqn().n7d().og4(getSystemTimeInMillis(), this$0.mzw_1, this$0.ozw_1, this$0.pqn(), this$0.sqv_1.t2().wzw_1.qqc_1, toQueryLikeParam(this$0.bqn_1.t2().bq6_1.qq5_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.rzy_1 = this$0;
    this.szy_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.rzy_1.sqv_1, PersonListViewModel$slambda$slambda_0(this.szy_1, this.rzy_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.rzy_1, this.szy_1, completion);
    i.tzy_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.czz_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.czz_1.tqn().p7f();
            var tmp_1 = this.czz_1.pqn();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            var tmp_3 = tmp_0.vi0(tmp_1, tmp_2, new Long(8192, 0));
            var tmp_4 = PersonListViewModel$slambda$slambda_2(this.czz_1, null);
            suspendResult = tmp_3.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(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.czz_1, completion);
    i.dzz_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_204();
    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.mzw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('role');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.nzw_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.ba('excludeAlreadySelectedList');
    var tmp1_safe_receiver = tmp0_safe_receiver_1 == null ? null : split(tmp0_safe_receiver_1, [',']);
    var tmp_2;
    if (tmp1_safe_receiver == null) {
      tmp_2 = 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_2 = destination;
    }
    var tmp2_safe_receiver = tmp_2;
    var tmp_3;
    if (tmp2_safe_receiver == null) {
      tmp_3 = 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_3 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_3;
    var tmp_4;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_4 = emptyList();
    } else {
      tmp_4 = tmp3_elvis_lhs;
    }
    tmp_1.ozw_1 = tmp_4;
    var tmp_5 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.ba('rptsl');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_5.pzw_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_6 = this;
    tmp_6.qzw_1 = PersonListViewModel$pagingSourceFactory$lambda(this);
    this.rzw_1 = savedStateHandle.ba('showAddViaInviteLink');
    this.szw_1 = savedStateHandle.ba('showAddViaContact') === 'true';
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.tzw_1 = Instance(this, tmp$ret$9, null).a5d(this, setClipboardStringUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.<anonymous>' call
        var tmp1_searchState = this.aqx(false);
        Companion_getInstance_125();
        var tmp0_elvis_lhs = savedStateHandle.ba('t');
        var tmp2_title = tmp0_elvis_lhs == null ? this.jqx(strings_getInstance().vmu_1, strings_getInstance().qnl_1) : tmp0_elvis_lhs;
        var tmp_9 = this.xqn().joj(strings_getInstance().sn1_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var tmp3_fabState = new FabUiState(VOID, tmp_9, tmp_10, PersonListViewModel$onClickFab$ref(this));
        var nextValue = prevValue.jq6(tmp3_fabState, VOID, tmp2_title, true, VOID, VOID, VOID, tmp1_searchState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_11;
    if (this.pzw_1.equals(new Long(0, 0))) {
      tmp_11 = flowOf(true);
    } else {
      tmp_11 = this.tqn().p7f().ui0(this.pqn(), this.pzw_1);
    }
    var hasPermissionToListFlow = tmp_11;
    var tmp_12 = this.oqn();
    launch(tmp_12, VOID, VOID, PersonListViewModel$slambda_0(this, hasPermissionToListFlow, null));
    var tmp_13 = this.oqn();
    launch(tmp_13, VOID, VOID, PersonListViewModel$slambda_2(this, null));
  }
  protoOf(PersonListViewModel).mqw = function (searchText) {
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).ksz = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.ezx(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.uqv_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).ezz = function () {
    if (this.rzw_1 == null)
      return Unit_instance;
    Companion_getInstance_125();
    this.zqm_1.kp6('InviteWithLink', mapOf_0(to('inviteCode', this.rzw_1)));
  };
  protoOf(PersonListViewModel).fzz = function () {
    var tmp0_safe_receiver = this.sqv_1.t2().azx_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).pp1(tmp0_safe_receiver);
      this.vqn().yq6(new Snack(this.xqn().joj(strings_getInstance().vn8_1)));
    }
  };
  protoOf(PersonListViewModel).gzz = 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.person.list.PersonListViewModel.onClickInviteViaContact.<anonymous>' call
    this_0.s('person_role', this.nzw_1.toString());
    this_0.s('clazz_uid', this.mzw_1.toString());
    var args = this_0.f3();
    this.zqm_1.kp6('invite_via_contact', args);
  };
  protoOf(PersonListViewModel).hzz = function () {
    this.zqm_1.kp6('BulkAddPersonSelectFile', emptyMap());
  };
  protoOf(PersonListViewModel).nqw = function () {
    Companion_getInstance_202();
    var tmp0_safe_receiver = this.xqm_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.fqx('PersonEditView', tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs);
  };
  protoOf(PersonListViewModel).izz = function (entry) {
    var goToOnPersonSelected = this.xqm_1.ba('goToOnPersonSelected');
    if (!(goToOnPersonSelected == null)) {
      var tmp = UMFileUtil_getInstance().parseURLQueryString(goToOnPersonSelected);
      Companion_getInstance_116();
      var args = plus_0(tmp, mapOf_0(to('personUid', entry.f96_1.toString())));
      var goToDestName = substringBefore_0(goToOnPersonSelected, '?');
      var popUpTo = this.xqm_1.ba('popUpToOnPersonSelected');
      this.zqm_1.iq9(goToDestName, args, new UstadGoOptions(popUpTo, true));
    } else {
      this.iqx('PersonDetailView', entry.f96_1, entry);
    }
  };
  protoOf(PersonListViewModel).jzz = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.sqv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onDismissAddSheetOrDialog.<anonymous>' call
        var nextValue = prevValue.ezx(VOID, 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, showInviteViaContact, 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().cmk_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().cmk_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().bmk_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().bmk_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;
    showInviteViaContact = showInviteViaContact === VOID ? false : showInviteViaContact;
    inviteCode = inviteCode === VOID ? null : inviteCode;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? false : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? false : hasBulkImportPermission;
    this.uzw_1 = personList;
    this.vzw_1 = sortOptions;
    this.wzw_1 = sortOption;
    this.xzw_1 = showAddItem;
    this.yzw_1 = showInviteViaLink;
    this.zzw_1 = showInviteViaContact;
    this.azx_1 = inviteCode;
    this.bzx_1 = showSortOptions;
    this.czx_1 = addSheetOrDialogVisible;
    this.dzx_1 = hasBulkImportPermission;
  }
  protoOf(PersonListUiState).kzz = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    return new PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).ezx = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission, $super) {
    personList = personList === VOID ? this.uzw_1 : personList;
    sortOptions = sortOptions === VOID ? this.vzw_1 : sortOptions;
    sortOption = sortOption === VOID ? this.wzw_1 : sortOption;
    showAddItem = showAddItem === VOID ? this.xzw_1 : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? this.yzw_1 : showInviteViaLink;
    showInviteViaContact = showInviteViaContact === VOID ? this.zzw_1 : showInviteViaContact;
    inviteCode = inviteCode === VOID ? this.azx_1 : inviteCode;
    showSortOptions = showSortOptions === VOID ? this.bzx_1 : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? this.czx_1 : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? this.dzx_1 : hasBulkImportPermission;
    return $super === VOID ? this.kzz(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) : $super.kzz.call(this, personList, sortOptions, sortOption, showAddItem, showInviteViaLink, showInviteViaContact, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).toString = function () {
    return 'PersonListUiState(personList=' + this.uzw_1 + ', sortOptions=' + this.vzw_1 + ', sortOption=' + this.wzw_1 + ', showAddItem=' + this.xzw_1 + ', showInviteViaLink=' + this.yzw_1 + ', showInviteViaContact=' + this.zzw_1 + ', inviteCode=' + this.azx_1 + ', showSortOptions=' + this.bzx_1 + ', addSheetOrDialogVisible=' + this.czx_1 + ', hasBulkImportPermission=' + this.dzx_1 + ')';
  };
  protoOf(PersonListUiState).hashCode = function () {
    var result = hashCode(this.uzw_1);
    result = imul(result, 31) + hashCode(this.vzw_1) | 0;
    result = imul(result, 31) + this.wzw_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xzw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yzw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zzw_1) | 0;
    result = imul(result, 31) + (this.azx_1 == null ? 0 : getStringHashCode(this.azx_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bzx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.czx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dzx_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.uzw_1, tmp0_other_with_cast.uzw_1))
      return false;
    if (!equals(this.vzw_1, tmp0_other_with_cast.vzw_1))
      return false;
    if (!this.wzw_1.equals(tmp0_other_with_cast.wzw_1))
      return false;
    if (!(this.xzw_1 === tmp0_other_with_cast.xzw_1))
      return false;
    if (!(this.yzw_1 === tmp0_other_with_cast.yzw_1))
      return false;
    if (!(this.zzw_1 === tmp0_other_with_cast.zzw_1))
      return false;
    if (!(this.azx_1 == tmp0_other_with_cast.azx_1))
      return false;
    if (!(this.bzx_1 === tmp0_other_with_cast.bzx_1))
      return false;
    if (!(this.czx_1 === tmp0_other_with_cast.czx_1))
      return false;
    if (!(this.dzx_1 === tmp0_other_with_cast.dzx_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 ManageAccountViewModel$slambda$slambda(this$0, resultContinuation) {
    this.tzz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda).vzz = function (it, $completion) {
    var tmp = this.wzz(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ManageAccountViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.vzz((p1 == null ? true : p1 instanceof PersonAuth2) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$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.tzz_1.w100_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.g101(VOID, VOID, VOID, VOID, VOID, this.uzz_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(ManageAccountViewModel$slambda$slambda).wzz = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda(this.tzz_1, completion);
    i.uzz_1 = it;
    return i;
  };
  function ManageAccountViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.vzz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.p101_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$slambda$slambda_1).r101 = function (it, $completion) {
    var tmp = this.s101(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ManageAccountViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.r101((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$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.p101_1.w100_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_showCreatePasskey = this.q101_1.c1();
              var tmp1_passkeyCount = this.q101_1.u();
              var nextValue = prevValue.g101(tmp1_passkeyCount, tmp0_showCreatePasskey);
              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(ManageAccountViewModel$slambda$slambda_1).s101 = function (it, completion) {
    var i = new ManageAccountViewModel$slambda$slambda_1(this.p101_1, completion);
    i.q101_1 = it;
    return i;
  };
  function ManageAccountViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.r101(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.v100_1;
    apiUrlConfig$factory_12();
    return this_0.t2();
  }
  function _get_createPasskeyUseCase__ryoxza($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.x100_1;
    createPasskeyUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_188() {
    this.t101_1 = 'ManageAccount';
    this.u101_1 = 'PersonFullName';
    this.v101_1 = 'PersonUsername';
  }
  var Companion_instance_237;
  function Companion_getInstance_205() {
    return Companion_instance_237;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_37(function_0) {
    this.w101_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_37).t1d = function (value, $completion) {
    return this.w101_1(value, $completion);
  };
  function ManageAccountViewModel$slambda(this$0, resultContinuation) {
    this.f102_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$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(ManageAccountViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$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.f102_1.qqn().wk2().a7f().zfz(this.f102_1.s100_1);
            var tmp_1 = ManageAccountViewModel$slambda$slambda_0(this.f102_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_37(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(ManageAccountViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ManageAccountViewModel$slambda(this.f102_1, completion);
    i.g102_1 = $this$launch;
    return i;
  };
  function ManageAccountViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel$slambda_1($di, this$0, resultContinuation) {
    this.p102_1 = $di;
    this.q102_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ManageAccountViewModel$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(ManageAccountViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ManageAccountViewModel$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.p102_1;
            var context = new LearningSpace(_get_apiUrlConfig__mldllg_5(this.q102_1).uo5_1);
            var trigger = this_0.d57();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.h57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).f58();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
            tmp_0.s102_1 = tmp_3.d58(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).vk2();
            this.t102_1 = this.s102_1.b7g().ugz(this.q102_1.nqn().goa().vky_1);
            this.hd_1 = 1;
            var tmp_5 = ManageAccountViewModel$slambda$slambda_2(this.q102_1, null);
            suspendResult = this.t102_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_37(tmp_5), 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(ManageAccountViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ManageAccountViewModel$slambda_1(this.p102_1, this.q102_1, completion);
    i.r102_1 = $this$launch;
    return i;
  };
  function ManageAccountViewModel$slambda_2($di, this$0, resultContinuation) {
    var i = new ManageAccountViewModel$slambda_1($di, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ManageAccountViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'ManageAccount');
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.s100_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('PersonFullName');
    tmp_0.t100_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp_1 = this;
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('PersonUsername');
    tmp_1.u100_1 = tmp0_elvis_lhs_0 == null ? '' : tmp0_elvis_lhs_0;
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.v100_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_11());
    this.w100_1 = MutableStateFlow(new ManageAccountUiState());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(CreatePasskeyUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.x100_1 = InstanceOrNull(this, tmp$ret$2, null).a5d(this, createPasskeyUseCase$factory());
    this.y100_1 = asStateFlow(this.w100_1);
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(_get_apiUrlConfig__mldllg_5(this).uo5_1);
    var trigger = di.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$5 = tmp_7.h57(tmp$ret$4, context);
    var tmp$ret$6 = On(di, tmp$ret$5, trigger);
    var tmp_9 = get_direct(tmp$ret$6).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(SavePersonPasskeyUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_6.z100_1 = tmp_9.e58(tmp$ret$7, null);
    var tmp_11 = this.oqn();
    launch(tmp_11, VOID, VOID, ManageAccountViewModel$slambda_0(this, null));
    var tmp_12;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().wqj_1) {
      tmp_12 = this.xqn().joj(strings_getInstance().tna_1);
    } else {
      tmp_12 = this.xqn().joj(strings_getInstance().xml_1);
    }
    var tmp0_title = tmp_12;
    this.bqn_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.w100_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.manageaccount.ManageAccountViewModel.<anonymous>' call
        var tmp0_personUsername = this.u100_1;
        var tmp1_personName = this.t100_1;
        var tmp2_passkeySupported = !(_get_createPasskeyUseCase__ryoxza(this) == null) ? this.nqn().goa().vky_1.equals(this.s100_1) : false;
        var nextValue = prevValue.g101(VOID, VOID, tmp2_passkeySupported, tmp1_personName, tmp0_personUsername);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_13 = this.oqn();
    launch(tmp_13, VOID, VOID, ManageAccountViewModel$slambda_2(di, this, null));
  }
  protoOf(ManageAccountViewModel).u102 = function () {
    Companion_getInstance_125();
    this.zqm_1.kp6('AccountEdit', mapOf_0(to('entityUid', this.s100_1.toString())));
  };
  function ManageAccountUiState(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth) {
    passkeyCount = passkeyCount === VOID ? 0 : passkeyCount;
    showCreatePasskey = showCreatePasskey === VOID ? false : showCreatePasskey;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    personName = personName === VOID ? '' : personName;
    personUsername = personUsername === VOID ? '' : personUsername;
    personAuth = personAuth === VOID ? null : personAuth;
    this.a101_1 = passkeyCount;
    this.b101_1 = showCreatePasskey;
    this.c101_1 = passkeySupported;
    this.d101_1 = personName;
    this.e101_1 = personUsername;
    this.f101_1 = personAuth;
  }
  protoOf(ManageAccountUiState).v102 = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth) {
    return new ManageAccountUiState(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth);
  };
  protoOf(ManageAccountUiState).g101 = function (passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth, $super) {
    passkeyCount = passkeyCount === VOID ? this.a101_1 : passkeyCount;
    showCreatePasskey = showCreatePasskey === VOID ? this.b101_1 : showCreatePasskey;
    passkeySupported = passkeySupported === VOID ? this.c101_1 : passkeySupported;
    personName = personName === VOID ? this.d101_1 : personName;
    personUsername = personUsername === VOID ? this.e101_1 : personUsername;
    personAuth = personAuth === VOID ? this.f101_1 : personAuth;
    return $super === VOID ? this.v102(passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth) : $super.v102.call(this, passkeyCount, showCreatePasskey, passkeySupported, personName, personUsername, personAuth);
  };
  protoOf(ManageAccountUiState).toString = function () {
    return 'ManageAccountUiState(passkeyCount=' + this.a101_1 + ', showCreatePasskey=' + this.b101_1 + ', passkeySupported=' + this.c101_1 + ', personName=' + this.d101_1 + ', personUsername=' + this.e101_1 + ', personAuth=' + this.f101_1 + ')';
  };
  protoOf(ManageAccountUiState).hashCode = function () {
    var result = this.a101_1;
    result = imul(result, 31) + getBooleanHashCode(this.b101_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.c101_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.d101_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.e101_1) | 0;
    result = imul(result, 31) + (this.f101_1 == null ? 0 : hashCode(this.f101_1)) | 0;
    return result;
  };
  protoOf(ManageAccountUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ManageAccountUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ManageAccountUiState ? other : THROW_CCE();
    if (!(this.a101_1 === tmp0_other_with_cast.a101_1))
      return false;
    if (!(this.b101_1 === tmp0_other_with_cast.b101_1))
      return false;
    if (!(this.c101_1 === tmp0_other_with_cast.c101_1))
      return false;
    if (!(this.d101_1 === tmp0_other_with_cast.d101_1))
      return false;
    if (!(this.e101_1 === tmp0_other_with_cast.e101_1))
      return false;
    if (!equals(this.f101_1, tmp0_other_with_cast.f101_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_11() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_5(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza(receiver);
    }, null);
  }
  function apiUrlConfig$factory_12() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_5(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_0() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza(receiver);
    }, null);
  }
  function Companion_189() {
    this.w102_1 = 'RegisterAgeRedirect';
  }
  var Companion_instance_238;
  function Companion_getInstance_206() {
    return Companion_instance_238;
  }
  function RegisterAgeRedirectViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.lwk();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function RegisterAgeRedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'RegisterAgeRedirect');
    this.s103_1 = MutableStateFlow(new RegisterAgeRedirectUiState(VOID, systemTimeInMillis()));
    this.t103_1 = asStateFlow(this.s103_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.<anonymous>' call
        var tmp0_title = this.xqn().joj(strings_getInstance().ynp_1);
        var tmp = this.xqn().joj(strings_getInstance().vmj_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, RegisterAgeRedirectViewModel$onClickNext$ref(this));
        var nextValue = prevValue.jq6(VOID, VOID, tmp0_title, false, VOID, VOID, false, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(RegisterAgeRedirectViewModel).u103 = function (date) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.s103_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onSetDate.<anonymous>' call
        var nextValue = prevValue.y103(date, VOID, !prevValue.v103_1.equals(date) ? null : prevValue.x103_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(RegisterAgeRedirectViewModel).lwk = function () {
    var date = this.s103_1.t2().v103_1;
    if (date.equals(new Long(0, 0))) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.s103_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.y103(VOID, VOID, this.xqn().joj(strings_getInstance().vmn_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.s103_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.y103(VOID, VOID, this.xqn().joj(strings_getInstance().kmq_1));
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var dateOfBirthInstant = Companion_getInstance_6().fmh(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.lqo(this_3, Companion_getInstance_213().hr7_1);
    Companion_getInstance_125();
    this.kqo(this_3, 'next');
    this_3.s('showAccept', 'true');
    Companion_getInstance_202();
    this_3.s('DateOfBirth', date.toString());
    var args = this_3.f3();
    if (!isMinor) {
      this.zqm_1.kp6('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.v103_1 = dateOfBirth;
    this.w103_1 = maxDate;
    this.x103_1 = dateOfBirthError;
  }
  protoOf(RegisterAgeRedirectUiState).z103 = function (dateOfBirth, maxDate, dateOfBirthError) {
    return new RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).y103 = function (dateOfBirth, maxDate, dateOfBirthError, $super) {
    dateOfBirth = dateOfBirth === VOID ? this.v103_1 : dateOfBirth;
    maxDate = maxDate === VOID ? this.w103_1 : maxDate;
    dateOfBirthError = dateOfBirthError === VOID ? this.x103_1 : dateOfBirthError;
    return $super === VOID ? this.z103(dateOfBirth, maxDate, dateOfBirthError) : $super.z103.call(this, dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).toString = function () {
    return 'RegisterAgeRedirectUiState(dateOfBirth=' + this.v103_1.toString() + ', maxDate=' + this.w103_1.toString() + ', dateOfBirthError=' + this.x103_1 + ')';
  };
  protoOf(RegisterAgeRedirectUiState).hashCode = function () {
    var result = this.v103_1.hashCode();
    result = imul(result, 31) + this.w103_1.hashCode() | 0;
    result = imul(result, 31) + (this.x103_1 == null ? 0 : getStringHashCode(this.x103_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.v103_1.equals(tmp0_other_with_cast.v103_1))
      return false;
    if (!this.w103_1.equals(tmp0_other_with_cast.w103_1))
      return false;
    if (!(this.x103_1 == tmp0_other_with_cast.x103_1))
      return false;
    return true;
  };
  function Companion_190() {
    this.a104_1 = 'WaitForParent';
    this.b104_1 = 'username';
    this.c104_1 = 'password';
    this.d104_1 = 'parentContact';
  }
  var Companion_instance_239;
  function Companion_getInstance_207() {
    return Companion_instance_239;
  }
  function RegisterMinorWaitForParentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'WaitForParent');
    this.z104_1 = MutableStateFlow(new RegisterMinorWaitForParentUiState());
    this.a105_1 = asStateFlow(this.z104_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().nmk_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.z104_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.e105(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(RegisterMinorWaitForParentViewModel).f105 = function () {
    this.zqm_1.jq9('WaitForParent', true);
  };
  function RegisterMinorWaitForParentUiState(username, password, parentContact) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    parentContact = parentContact === VOID ? '' : parentContact;
    this.b105_1 = username;
    this.c105_1 = password;
    this.d105_1 = parentContact;
  }
  protoOf(RegisterMinorWaitForParentUiState).e105 = function (username, password, parentContact) {
    return new RegisterMinorWaitForParentUiState(username, password, parentContact);
  };
  protoOf(RegisterMinorWaitForParentUiState).toString = function () {
    return 'RegisterMinorWaitForParentUiState(username=' + this.b105_1 + ', password=' + this.c105_1 + ', parentContact=' + this.d105_1 + ')';
  };
  protoOf(RegisterMinorWaitForParentUiState).hashCode = function () {
    var result = getStringHashCode(this.b105_1);
    result = imul(result, 31) + getStringHashCode(this.c105_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.d105_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.b105_1 === tmp0_other_with_cast.b105_1))
      return false;
    if (!(this.c105_1 === tmp0_other_with_cast.c105_1))
      return false;
    if (!(this.d105_1 === tmp0_other_with_cast.d105_1))
      return false;
    return true;
  };
  function RedirectViewModel$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function RedirectViewModel$slambda$lambda_0($di) {
    return function (it) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var this_0 = $di;
      var trigger = this_0.d57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
      var tmp$ret$1 = tmp.h57(tmp$ret$0, it);
      var tmp$ret$2 = On(this_0, tmp$ret$1, trigger);
      var tmp_1 = get_direct(tmp$ret$2).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_2 = typeToken(createKType(getKClass(CheckRegistrationAllowedUseCase), arrayOf([]), false));
      var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
      return tmp_1.d58(tmp$ret$3, null);
    };
  }
  function _get_apiUrlConfig__mldllg_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.d106_1;
    apiUrlConfig$factory_14();
    return this_0.t2();
  }
  function Companion_191() {
    this.e106_1 = '';
  }
  var Companion_instance_240;
  function Companion_getInstance_208() {
    return Companion_instance_240;
  }
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(function_0) {
    this.f106_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1).spi = function (url, target) {
    return this.f106_1(url, target);
  };
  function RedirectViewModel$slambda(this$0, $destinationArg, $destination, $di, resultContinuation) {
    this.o106_1 = this$0;
    this.p106_1 = $destinationArg;
    this.q106_1 = $destination;
    this.r106_1 = $di;
    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.o106_1.zqm_1;
          var tmp1_accountManager = this.o106_1.nqn();
          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_6(this.o106_1).xo5_1;
          var tmp4_goOptions = new UstadGoOptions(VOID, VOID, true);
          var tmp5_forceAccountSelection = !(this.p106_1 == null);
          var tmp6_presetLearningSpaceUrl = _get_apiUrlConfig__mldllg_6(this.o106_1).vo5_1;
          navigateToLink(tmp0_$receiver, this.q106_1, tmp1_accountManager, tmp2_openExternalLinkUseCase, tmp4_goOptions, tmp5_forceAccountSelection, tmp3_userCanSelectServer, VOID, VOID, VOID, VOID, tmp6_presetLearningSpaceUrl, RedirectViewModel$slambda$lambda_0(this.r106_1));
          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.o106_1, this.p106_1, this.q106_1, this.r106_1, completion);
    i.s106_1 = $this$launch;
    return i;
  };
  function RedirectViewModel$slambda_0(this$0, $destinationArg, $destination, $di, resultContinuation) {
    var i = new RedirectViewModel$slambda(this$0, $destinationArg, $destination, $di, 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_116();
    tmp.b106_1 = savedStateHandle.ba('next');
    var tmp_0 = this;
    Companion_getInstance_116();
    tmp_0.c106_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(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.d106_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_13());
    this.bqn_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, VOID, VOID, VOID, VOID, true));
    var tmp0_elvis_lhs = this.c106_1;
    var destinationArg = tmp0_elvis_lhs == null ? this.b106_1 : tmp0_elvis_lhs;
    var activeLearningSpace = this.nqn().ioa();
    if (!contains(activeLearningSpace.tnt_1, 'localhost')) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var tmp_3 = get_direct(di).f58();
      // 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(LearningSpace), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
      var tmp$ret$3 = tmp_4.h57(tmp$ret$2, activeLearningSpace);
      var tmp_6 = tmp_3.c58(tmp$ret$3).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$5 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var db = tmp_6.d58(tmp$ret$5, 1);
      println(db);
    }
    var tmp_8;
    if (destinationArg == null) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var context = this.nqn().ro9().mnu_1;
      var trigger = di.d57();
      // 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(LearningSpace), arrayOf([]), false));
      var tmp$ret$7 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      var tmp$ret$8 = tmp_9.h57(tmp$ret$7, context);
      var tmp$ret$9 = On(di, tmp$ret$8, trigger);
      var tmp_11 = get_direct(tmp$ret$9).f58();
      // Inline function 'org.kodein.type.generic' call
      var tmp_12 = typeToken(createKType(getKClass(GetDefaultDestinationUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
      tmp_8 = tmp_11.d58(tmp$ret$10, null).qpe();
    } else {
      tmp_8 = destinationArg;
    }
    var destination = tmp_8;
    var tmp_13 = this.oqn();
    launch(tmp_13, VOID, VOID, RedirectViewModel$slambda_0(this, destinationArg, destination, di, null));
  }
  function apiUrlConfig$factory_13() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_6(receiver);
    }, null);
  }
  function apiUrlConfig$factory_14() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_6(receiver);
    }, null);
  }
  function ScheduleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda).c107 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.c107(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).vny = function (it, completion) {
    var i = new ScheduleEditViewModel$slambda$slambda(completion);
    i.b107_1 = it;
    return i;
  };
  function ScheduleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.c107(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.l107_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda_1).o107 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.o107($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.m107_1 = new Schedule();
            var tmp_1 = this;
            tmp_1.n107_1 = this.m107_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.l107_1.rqn());
            suspendResult = tmp_2.o62(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.n107_1.uhe_1 = ARGUMENT;
            this.n107_1.ghf_1 = true;
            this.n107_1.zhe_1 = Companion_instance_29.xkv_1;
            return this.m107_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).l78 = function (completion) {
    return new ScheduleEditViewModel$slambda$slambda_1(this.l107_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.o107($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.m108_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.s108(schedule);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_192() {
    this.t108_1 = 'ScheduleEdit';
  }
  var Companion_instance_241;
  function Companion_getInstance_209() {
    return Companion_instance_241;
  }
  function ScheduleEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ScheduleEditViewModel$slambda(this$0, resultContinuation) {
    this.c109_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.e109_1 = Companion_instance_29.n4r();
            this.hd_1 = 1;
            var tmp_0 = ScheduleEditViewModel$slambda$slambda_0(null);
            var tmp_1 = ScheduleEditViewModel$slambda$slambda_2(this.c109_1, null);
            suspendResult = this.c109_1.hqo(this.e109_1, VOID, VOID, tmp_0, tmp_1, ScheduleEditViewModel$slambda$lambda(this.c109_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.c109_1.m108_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.s108(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.c109_1, completion);
    i.d109_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.n109_1 = $commitDelay;
    this.o109_1 = $entity;
    this.p109_1 = $this;
    this.q109_1 = $key;
    this.r109_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.n109_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.o109_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.p109_1.dqo(this.p109_1.xqm_1, this.q109_1, this.r109_1, this.o109_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.n109_1, this.o109_1, this.p109_1, this.q109_1, this.r109_1, completion);
    i.s109_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.m108_1 = MutableStateFlow(new ScheduleEditUiState(VOID, VOID, VOID, false));
    this.n108_1 = asStateFlow(this.m108_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>' call
        var tmp0_title = this.hqu(strings_getInstance().bmv_1, strings_getInstance().cmv_1);
        var tmp = this.xqn().joj(strings_getInstance().tmr_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, ScheduleEditViewModel$onClickSave$ref(this));
        var nextValue = prevValue.jq6(VOID, VOID, tmp0_title, VOID, true, VOID, VOID, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, ScheduleEditViewModel$slambda_0(this, null));
  }
  protoOf(ScheduleEditViewModel).t109 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.m108_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.o108_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vhe_1;
        var tmp4_toTimeError = this.iqu(tmp, entity == null ? null : entity.vhe_1, prevValue.q108_1);
        var tmp0_safe_receiver = prevValue.o108_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.whe_1;
        var tmp5_fromTimeError = this.iqu(tmp_0, entity == null ? null : entity.whe_1, prevValue.p108_1);
        var nextValue = prevValue.s108(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_29.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.oqn();
    tmp_1.eqt_1 = launch(tmp_2, VOID, VOID, ScheduleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ScheduleEditViewModel).xs9 = function () {
    var tmp0_elvis_lhs = this.m108_1.t2().o108_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.m108_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.vhe_1.equals(new Long(0, 0))) {
          tmp_0 = this.xqn().joj(strings_getInstance().vmn_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        if (schedule.whe_1.equals(new Long(0, 0))) {
          tmp_2 = this.xqn().joj(strings_getInstance().vmn_1);
        } else if (schedule.whe_1.c7(schedule.vhe_1) <= 0) {
          tmp_2 = this.xqn().joj(strings_getInstance().sn9_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.s108(VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (this.m108_1.t2().p108_1 == null ? this.m108_1.t2().q108_1 == null : false) {
      this.iqt(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.o108_1 = entity;
    this.p108_1 = fromTimeError;
    this.q108_1 = toTimeError;
    this.r108_1 = fieldsEnabled;
  }
  protoOf(ScheduleEditUiState).u109 = function (entity, fromTimeError, toTimeError, fieldsEnabled) {
    return new ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).s108 = function (entity, fromTimeError, toTimeError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.o108_1 : entity;
    fromTimeError = fromTimeError === VOID ? this.p108_1 : fromTimeError;
    toTimeError = toTimeError === VOID ? this.q108_1 : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? this.r108_1 : fieldsEnabled;
    return $super === VOID ? this.u109(entity, fromTimeError, toTimeError, fieldsEnabled) : $super.u109.call(this, entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).toString = function () {
    return 'ScheduleEditUiState(entity=' + this.o108_1 + ', fromTimeError=' + this.p108_1 + ', toTimeError=' + this.q108_1 + ', fieldsEnabled=' + this.r108_1 + ')';
  };
  protoOf(ScheduleEditUiState).hashCode = function () {
    var result = this.o108_1 == null ? 0 : this.o108_1.hashCode();
    result = imul(result, 31) + (this.p108_1 == null ? 0 : getStringHashCode(this.p108_1)) | 0;
    result = imul(result, 31) + (this.q108_1 == null ? 0 : getStringHashCode(this.q108_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.r108_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.o108_1, tmp0_other_with_cast.o108_1))
      return false;
    if (!(this.p108_1 == tmp0_other_with_cast.p108_1))
      return false;
    if (!(this.q108_1 == tmp0_other_with_cast.q108_1))
      return false;
    if (!(this.r108_1 === tmp0_other_with_cast.r108_1))
      return false;
    return true;
  };
  function Companion_193() {
    this.v109_1 = 'DevSettings';
    this.w109_1 = 'showDevSettings';
  }
  var Companion_instance_242;
  function Companion_getInstance_210() {
    return Companion_instance_242;
  }
  function SettingsViewModel$slambda$slambda(this$0, resultContinuation) {
    this.f10a_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda$slambda).iqf = function (siteAdminSettingsVisible, $completion) {
    var tmp = this.jqf(siteAdminSettingsVisible, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.iqf((!(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.f10a_1.c10b_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.n10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.g10a_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).jqf = function (siteAdminSettingsVisible, completion) {
    var i = new SettingsViewModel$slambda$slambda(this.f10a_1, completion);
    i.g10a_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.iqf(siteAdminSettingsVisible, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_supportedLangConfig__llzj1v($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.e10b_1;
    supportedLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.f10b_1;
    setLanguageUseCase$factory_4();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplayOptsUseCase__lppxoi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.h10b_1;
    getHtmlContentDisplayOptsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplaySettingUseCase__usawf4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.i10b_1;
    getHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setHtmlContentDisplaySettingUseCase__8cgzqk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.j10b_1;
    setHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.k10b_1;
    getVersionUseCase$factory_4();
    return this_0.t2();
  }
  function _get_getStorageOptionsUseCase__v5dedp($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.l10b_1;
    getStorageOptionsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageSettingUseCase__5c8mhw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.m10b_1;
    getOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setOfflineStorageSettingUseCase__lx9or4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.n10b_1;
    setOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageAvailableSpace__om40zq($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.o10b_1;
    getOfflineStorageAvailableSpace$factory_0();
    return this_0.t2();
  }
  function _get_settings__lbkut4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.q10b_1;
    settings$factory_0();
    return this_0.t2();
  }
  function _get_zipFileUseCase__jhxb01($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.r10b_1;
    zipFileUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_194() {
    this.o10c_1 = 'Settings';
  }
  var Companion_instance_243;
  function Companion_getInstance_211() {
    return Companion_instance_243;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_38(function_0) {
    this.p10c_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_38).t1d = function (value, $completion) {
    return this.p10c_1(value, $completion);
  };
  function SettingsViewModel$slambda(this$0, resultContinuation) {
    this.y10c_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.y10c_1);
            tmp_0.a10d_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qpe();
            var tmp_1 = this;
            var tmp1_safe_receiver = _get_getOfflineStorageSettingUseCase__5c8mhw(this.y10c_1);
            tmp_1.b10d_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.qpe();
            if (!(this.a10d_1 == null)) {
              var tmp_2 = this;
              tmp_2.c10d_1 = this.a10d_1;
              var tmp_3 = this;
              tmp_3.d10d_1 = this.c10d_1;
              var tmp_4 = this;
              tmp_4.e10d_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.c10d_1, 10));
              this.f10d_1 = this.d10d_1.w();
              this.hd_1 = 1;
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

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

            this.g10d_1 = this.f10d_1.e();
            var tmp_5 = this;
            tmp_5.h10d_1 = this.g10d_1;
            this.i10d_1 = _get_getOfflineStorageAvailableSpace__om40zq(this.y10c_1);
            if (this.i10d_1 == null) {
              this.j10d_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.i10d_1.ppm(this.h10d_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.j10d_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            var tmp1_elvis_lhs = this.j10d_1;
            var ARGUMENT = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var ARGUMENT_0 = new SettingsOfflineStorageOption(this.h10d_1, ARGUMENT);
            this.e10d_1.i1(ARGUMENT_0);
            this.hd_1 = 1;
            continue $sm;
          case 4:
            var optionsWithSpace = this.e10d_1;
            l$ret$1: do {
              var this_0 = this.y10c_1.c10b_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_elvis_lhs = this.b10d_1;
                var nextValue = prevValue.n10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, optionsWithSpace, tmp0_elvis_lhs == null ? first_0(this.a10d_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.y10c_1, completion);
    i.z10c_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.s10d_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.s10d_1.tqn().p7f();
            var tmp_1 = this.s10d_1.pqn();
            PermissionFlags_getInstance();
            var tmp_2 = tmp_0.ui0(tmp_1, new Long(16384, 0));
            var tmp_3 = SettingsViewModel$slambda$slambda_0(this.s10d_1, null);
            suspendResult = tmp_2.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_38(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.s10d_1, completion);
    i.t10d_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.c10b_1 = MutableStateFlow(new SettingsUiState());
    this.d10b_1 = asStateFlow(this.c10b_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.e10b_1 = Instance(this, tmp$ret$0, null).a5d(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.f10b_1 = Instance(this, tmp$ret$2, null).a5d(this, setLanguageUseCase$factory_3());
    this.g10b_1 = _get_supportedLangConfig__llzj1v(this).xq7(this.xqn());
    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.h10b_1 = InstanceOrNull(this, tmp$ret$4, null).a5d(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.i10b_1 = InstanceOrNull(this, tmp$ret$6, null).a5d(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.j10b_1 = InstanceOrNull(this, tmp$ret$8, null).a5d(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.k10b_1 = Instance(this, tmp$ret$10, null).a5d(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.l10b_1 = InstanceOrNull(this, tmp$ret$12, null).a5d(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.m10b_1 = InstanceOrNull(this, tmp$ret$14, null).a5d(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.n10b_1 = InstanceOrNull(this, tmp$ret$16, null).a5d(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.o10b_1 = InstanceOrNull(this, tmp$ret$18, null).a5d(this, getOfflineStorageAvailableSpace$factory());
    this.p10b_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.q10b_1 = Instance(this, tmp$ret$20, null).a5d(this, settings$factory());
    var tmp_21 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_22 = typeToken(createKType(getKClass(ZipFileUseCase), arrayOf([]), false));
    var tmp$ret$22 = isInterface(tmp_22, TypeToken) ? tmp_22 : THROW_CCE();
    tmp_21.r10b_1 = Instance(this, tmp$ret$22, null).a5d(this, zipFileUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().vmk_1), VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = _get_supportedLangConfig__llzj1v(this).pq7();
    var tmp_23;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_96();
      tmp_23 = '';
    } else {
      tmp_23 = tmp0_elvis_lhs;
    }
    var langSetting = tmp_23;
    var tmp$ret$27;
    $l$block_0: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.g10b_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        if (element.eq4_1 === langSetting) {
          tmp$ret$27 = element;
          break $l$block_0;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    var currentLang = tmp$ret$27;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.c10b_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var tmp3_currentLanguage = currentLang.fq4_1;
        var tmp4_availableLanguages = this.g10b_1;
        var tmp0_safe_receiver = _get_getHtmlContentDisplayOptsUseCase__lppxoi(this);
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qpe();
        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.qpe();
        var tmp7_version = _get_getVersionUseCase__n7x57g_1(this).qpe().ope_1;
        var tmp_24 = _get_settings__lbkut4(this);
        var tmp8_showDeveloperOptions = tmp_24.am8('showDevSettings', false);
        var nextValue_0 = prevValue_0.n10c(VOID, VOID, VOID, VOID, VOID, VOID, tmp5_htmlContentDisplayOptions, tmp6_currentHtmlContentDisplayOption, 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_25 = this.oqn();
    launch(tmp_25, VOID, VOID, SettingsViewModel$slambda_0(this, null));
    var tmp_26 = this.oqn();
    launch(tmp_26, VOID, VOID, SettingsViewModel$slambda_2(this, null));
  }
  protoOf(SettingsViewModel).u10d = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.c10b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLanguage.<anonymous>' call
        var nextValue = prevValue.n10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).v10d = function (lang) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.c10b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
        var nextValue = prevValue.n10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var result = _get_setLanguageUseCase__st7nci_1(this).gpi(lang, 'Settings', this.zqm_1);
    if (result.epi_1) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.c10b_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.n10c(VOID, VOID, VOID, VOID, VOID, 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.c10b_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.n10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, lang.fq4_1);
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(SettingsViewModel).ez9 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.c10b_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.n10c(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).w10d = function () {
    this.zqm_1.kp6('Community', emptyMap());
  };
  protoOf(SettingsViewModel).x10d = function () {
    this.zqm_1.kp6('DeletedItems', emptyMap());
  };
  function SettingsUiState(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) {
    sendAppOptionVisible = sendAppOptionVisible === VOID ? false : sendAppOptionVisible;
    selectedBackupFolderUri = selectedBackupFolderUri === VOID ? null : selectedBackupFolderUri;
    selectedBackupFolderName = selectedBackupFolderName === VOID ? null : selectedBackupFolderName;
    isCreatingBackup = isCreatingBackup === VOID ? false : isCreatingBackup;
    backupProgress = backupProgress === VOID ? 0.0 : backupProgress;
    selectedBackupPath = selectedBackupPath === VOID ? null : selectedBackupPath;
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? emptyList() : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? null : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? false : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? false : workspaceSettingsVisible;
    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.s10b_1 = sendAppOptionVisible;
    this.t10b_1 = selectedBackupFolderUri;
    this.u10b_1 = selectedBackupFolderName;
    this.v10b_1 = isCreatingBackup;
    this.w10b_1 = backupProgress;
    this.x10b_1 = selectedBackupPath;
    this.y10b_1 = htmlContentDisplayOptions;
    this.z10b_1 = currentHtmlContentDisplayOption;
    this.a10c_1 = holidayCalendarVisible;
    this.b10c_1 = workspaceSettingsVisible;
    this.c10c_1 = reasonLeavingVisible;
    this.d10c_1 = langDialogVisible;
    this.e10c_1 = htmlContentDisplayDialogVisible;
    this.f10c_1 = currentLanguage;
    this.g10c_1 = availableLanguages;
    this.h10c_1 = waitForRestartDialogVisible;
    this.i10c_1 = showDeveloperOptions;
    this.j10c_1 = version;
    this.k10c_1 = storageOptions;
    this.l10c_1 = selectedOfflineStorageOption;
    this.m10c_1 = storageOptionsDialogVisible;
  }
  protoOf(SettingsUiState).y10d = function (sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) {
    return new SettingsUiState(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).n10c = function (sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, $super) {
    sendAppOptionVisible = sendAppOptionVisible === VOID ? this.s10b_1 : sendAppOptionVisible;
    selectedBackupFolderUri = selectedBackupFolderUri === VOID ? this.t10b_1 : selectedBackupFolderUri;
    selectedBackupFolderName = selectedBackupFolderName === VOID ? this.u10b_1 : selectedBackupFolderName;
    isCreatingBackup = isCreatingBackup === VOID ? this.v10b_1 : isCreatingBackup;
    backupProgress = backupProgress === VOID ? this.w10b_1 : backupProgress;
    selectedBackupPath = selectedBackupPath === VOID ? this.x10b_1 : selectedBackupPath;
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? this.y10b_1 : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? this.z10b_1 : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? this.a10c_1 : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? this.b10c_1 : workspaceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? this.c10c_1 : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? this.d10c_1 : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? this.e10c_1 : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? this.f10c_1 : currentLanguage;
    availableLanguages = availableLanguages === VOID ? this.g10c_1 : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? this.h10c_1 : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? this.i10c_1 : showDeveloperOptions;
    version = version === VOID ? this.j10c_1 : version;
    storageOptions = storageOptions === VOID ? this.k10c_1 : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? this.l10c_1 : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? this.m10c_1 : storageOptionsDialogVisible;
    return $super === VOID ? this.y10d(sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) : $super.y10d.call(this, sendAppOptionVisible, selectedBackupFolderUri, selectedBackupFolderName, isCreatingBackup, backupProgress, selectedBackupPath, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).toString = function () {
    return 'SettingsUiState(sendAppOptionVisible=' + this.s10b_1 + ', selectedBackupFolderUri=' + this.t10b_1 + ', selectedBackupFolderName=' + this.u10b_1 + ', isCreatingBackup=' + this.v10b_1 + ', backupProgress=' + this.w10b_1 + ', selectedBackupPath=' + this.x10b_1 + ', htmlContentDisplayOptions=' + this.y10b_1 + ', currentHtmlContentDisplayOption=' + this.z10b_1 + ', holidayCalendarVisible=' + this.a10c_1 + ', workspaceSettingsVisible=' + this.b10c_1 + ', reasonLeavingVisible=' + this.c10c_1 + ', langDialogVisible=' + this.d10c_1 + ', htmlContentDisplayDialogVisible=' + this.e10c_1 + ', currentLanguage=' + this.f10c_1 + ', availableLanguages=' + this.g10c_1 + ', waitForRestartDialogVisible=' + this.h10c_1 + ', showDeveloperOptions=' + this.i10c_1 + ', version=' + this.j10c_1 + ', storageOptions=' + this.k10c_1 + ', selectedOfflineStorageOption=' + this.l10c_1 + ', storageOptionsDialogVisible=' + this.m10c_1 + ')';
  };
  protoOf(SettingsUiState).hashCode = function () {
    var result = getBooleanHashCode(this.s10b_1);
    result = imul(result, 31) + (this.t10b_1 == null ? 0 : getStringHashCode(this.t10b_1)) | 0;
    result = imul(result, 31) + (this.u10b_1 == null ? 0 : getStringHashCode(this.u10b_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.v10b_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.w10b_1) | 0;
    result = imul(result, 31) + (this.x10b_1 == null ? 0 : getStringHashCode(this.x10b_1)) | 0;
    result = imul(result, 31) + hashCode(this.y10b_1) | 0;
    result = imul(result, 31) + (this.z10b_1 == null ? 0 : this.z10b_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.a10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.b10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.c10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.d10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.e10c_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.f10c_1) | 0;
    result = imul(result, 31) + hashCode(this.g10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.h10c_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.i10c_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.j10c_1) | 0;
    result = imul(result, 31) + hashCode(this.k10c_1) | 0;
    result = imul(result, 31) + (this.l10c_1 == null ? 0 : this.l10c_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.m10c_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 (!(this.s10b_1 === tmp0_other_with_cast.s10b_1))
      return false;
    if (!(this.t10b_1 == tmp0_other_with_cast.t10b_1))
      return false;
    if (!(this.u10b_1 == tmp0_other_with_cast.u10b_1))
      return false;
    if (!(this.v10b_1 === tmp0_other_with_cast.v10b_1))
      return false;
    if (!equals(this.w10b_1, tmp0_other_with_cast.w10b_1))
      return false;
    if (!(this.x10b_1 == tmp0_other_with_cast.x10b_1))
      return false;
    if (!equals(this.y10b_1, tmp0_other_with_cast.y10b_1))
      return false;
    if (!equals(this.z10b_1, tmp0_other_with_cast.z10b_1))
      return false;
    if (!(this.a10c_1 === tmp0_other_with_cast.a10c_1))
      return false;
    if (!(this.b10c_1 === tmp0_other_with_cast.b10c_1))
      return false;
    if (!(this.c10c_1 === tmp0_other_with_cast.c10c_1))
      return false;
    if (!(this.d10c_1 === tmp0_other_with_cast.d10c_1))
      return false;
    if (!(this.e10c_1 === tmp0_other_with_cast.e10c_1))
      return false;
    if (!(this.f10c_1 === tmp0_other_with_cast.f10c_1))
      return false;
    if (!equals(this.g10c_1, tmp0_other_with_cast.g10c_1))
      return false;
    if (!(this.h10c_1 === tmp0_other_with_cast.h10c_1))
      return false;
    if (!(this.i10c_1 === tmp0_other_with_cast.i10c_1))
      return false;
    if (!(this.j10c_1 === tmp0_other_with_cast.j10c_1))
      return false;
    if (!equals(this.k10c_1, tmp0_other_with_cast.k10c_1))
      return false;
    if (!equals(this.l10c_1, tmp0_other_with_cast.l10c_1))
      return false;
    if (!(this.m10c_1 === tmp0_other_with_cast.m10c_1))
      return false;
    return true;
  };
  function SettingsOfflineStorageOption(option, availableSpace) {
    this.z10d_1 = option;
    this.a10e_1 = availableSpace;
  }
  protoOf(SettingsOfflineStorageOption).toString = function () {
    return 'SettingsOfflineStorageOption(option=' + this.z10d_1 + ', availableSpace=' + this.a10e_1.toString() + ')';
  };
  protoOf(SettingsOfflineStorageOption).hashCode = function () {
    var result = this.z10d_1.hashCode();
    result = imul(result, 31) + this.a10e_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.z10d_1.equals(tmp0_other_with_cast.z10d_1))
      return false;
    if (!this.a10e_1.equals(tmp0_other_with_cast.a10e_1))
      return false;
    return true;
  };
  function supportedLangConfig$factory() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_3() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_1(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() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function zipFileUseCase$factory() {
    return getPropertyCallableRef('zipFileUseCase', 1, KProperty1, function (receiver) {
      return _get_zipFileUseCase__jhxb01(receiver);
    }, null);
  }
  function supportedLangConfig$factory_0() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_4() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_1(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_0() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function zipFileUseCase$factory_0() {
    return getPropertyCallableRef('zipFileUseCase', 1, KProperty1, function (receiver) {
      return _get_zipFileUseCase__jhxb01(receiver);
    }, null);
  }
  function Companion_195() {
    this.b10e_1 = 'otheroption';
    this.c10e_1 = 'otheroptionperson';
    this.d10e_1 = 'otheroptionpersonprofilepic';
    this.e10e_1 = 'isparent';
  }
  var Companion_instance_244;
  function Companion_getInstance_212() {
    return Companion_instance_244;
  }
  function SignUpViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda).qz9 = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qz9(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$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(SignUpViewModel$slambda$slambda).vny = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda(completion);
    i.n10e_1 = it;
    return i;
  };
  function SignUpViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.qz9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_1).aza = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.aza($completion);
  };
  protoOf(SignUpViewModel$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 Person();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_1).l78 = function (completion) {
    return new SignUpViewModel$slambda$slambda_1(completion);
  };
  function SignUpViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.aza($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SignUpViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.t10f_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp1_safe_receiver = it == null ? null : it.ckr();
          var tmp;
          if (tmp1_safe_receiver == null) {
            tmp = null;
          } else {
            // Inline function 'kotlin.text.trim' call
            tmp = toString(trim(isCharSequence(tmp1_safe_receiver) ? tmp1_safe_receiver : THROW_CCE()));
          }
          var tmp2_elvis_lhs = tmp;
          var nextValue = prevValue.a10h(it, VOID, VOID, VOID, VOID, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SignUpViewModel$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_3).xzm = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.xzm(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$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 null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_3).vny = function (it, completion) {
    var i = new SignUpViewModel$slambda$slambda_3(completion);
    i.j10h_1 = it;
    return i;
  };
  function SignUpViewModel$slambda$slambda_4(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_3(resultContinuation);
    var l = function (it, $completion) {
      return i.xzm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$slambda$slambda_5).gzn = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SignUpViewModel$slambda$slambda_5).m78 = function ($completion) {
    return this.gzn($completion);
  };
  protoOf(SignUpViewModel$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 new PersonPicture();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SignUpViewModel$slambda$slambda_5).l78 = function (completion) {
    return new SignUpViewModel$slambda$slambda_5(completion);
  };
  function SignUpViewModel$slambda$slambda_6(resultContinuation) {
    var i = new SignUpViewModel$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.gzn($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SignUpViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.t10f_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.a10h(VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SignUpViewModel$onFullNameFocusedChanged$slambda$lambda($suggestedUsername) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.g96_1 = $suggestedUsername;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onClickSignup$slambda$lambda($e) {
    return function () {
      return 'exception ' + $e.message;
    };
  }
  function _get_apiUrlConfig__mldllg_7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.x10f_1;
    apiUrlConfig$factory_16();
    return this_0.t2();
  }
  function _get_getLocalAccountsSupportedUseCase__hoi7c7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.y10f_1;
    getLocalAccountsSupportedUseCase$factory_0();
    return this_0.t2();
  }
  function _get_createPasskeyUseCase__ryoxza_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.a10g_1;
    createPasskeyUseCase$factory_2();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.c10g_1;
    genderConfig$factory_4();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.g10g_1;
    enqueueSavePictureUseCase$factory_2();
    return this_0.t2();
  }
  function hasErrors_5(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.q10g_1 == null) ? true : !(_this__u8e3s4.p10g_1 == null)) ? true : !(_this__u8e3s4.x10g_1 == null);
  }
  function navigateToAppropriateScreen($this, savePerson) {
    if ($this.t10f_1.t2().r10g_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_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.navigateToAppropriateScreen.<anonymous>' call
      Companion_getInstance_125();
      this_0.s('next', $this.v10f_1);
      $this.lqo(this_0, Companion_getInstance_213().hr7_1);
      Companion_getInstance_125();
      $this.kqo(this_0, 'next');
      var tmp$ret$2 = this_0.f3();
      $this.zqm_1.kp6('AddChildProfile', tmp$ret$2);
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp = Napier_getInstance();
      tmp.k5e(VOID, VOID, SignUpViewModel$navigateToAppropriateScreen$lambda($this));
      $this.jqu($this.zqm_1, appendSelectedAccount($this.v10f_1, savePerson.f96_1, new LearningSpace($this.nqn().ioa().tnt_1)), goOptions);
    }
  }
  function enrollToCourseFromInviteUid($this, personUid, $completion) {
    var tmp = new $enrollToCourseFromInviteUidCOROUTINE$78($this, personUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_196() {
    Companion_instance_245 = this;
    this.ar7_1 = 'picState';
    this.br7_1 = 'SignUp';
    this.cr7_1 = 'DateOfBirth';
    this.dr7_1 = 'personalAccount';
    this.er7_1 = 'newOrExisting';
    this.fr7_1 = 'new';
    this.gr7_1 = 'existing';
    var tmp = this;
    Companion_getInstance_116();
    Companion_getInstance_116();
    Companion_getInstance_202();
    tmp.hr7_1 = listOf(['learningSpaceUrl', 'showAccept', 'popUpToOnFinish', 'DateOfBirth', 'RegMode', 'newOrExisting', 'personalAccount']);
    this.ir7_1 = 'SignupWithUsernameAndPassword';
  }
  var Companion_instance_245;
  function Companion_getInstance_213() {
    if (Companion_instance_245 == null)
      new Companion_196();
    return Companion_instance_245;
  }
  function SignUpViewModel$slambda(this$0, resultContinuation) {
    this.l10i_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$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(SignUpViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$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;
            var tmp_0 = Companion_instance_3.n4r();
            var tmp_1 = SignUpViewModel$slambda$slambda_0(null);
            var tmp_2 = SignUpViewModel$slambda$slambda_2(null);
            suspendResult = this.l10i_1.hqo(tmp_0, VOID, 'otheroptionperson', tmp_1, tmp_2, SignUpViewModel$slambda$lambda(this.l10i_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = Companion_instance_7.n4r();
            var tmp_4 = SignUpViewModel$slambda$slambda_4(null);
            var tmp_5 = SignUpViewModel$slambda$slambda_6(null);
            suspendResult = this.l10i_1.hqo(tmp_3, VOID, 'otheroptionpersonprofilepic', tmp_4, tmp_5, SignUpViewModel$slambda$lambda_0(this.l10i_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(SignUpViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$slambda(this.l10i_1, completion);
    i.m10i_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SignUpViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.v10i_1 = $commitDelay;
    this.w10i_1 = $entity;
    this.x10i_1 = $this;
    this.y10i_1 = $key;
    this.z10i_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$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(SignUpViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$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.v10i_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.w10i_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.x10i_1.dqo(this.x10i_1.xqm_1, this.y10i_1, this.z10i_1, this.w10i_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(SignUpViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onEntityChanged$slambda(this.v10i_1, this.w10i_1, this.x10i_1, this.y10i_1, this.z10i_1, completion);
    i.a10j_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SignUpViewModel$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 SignUpViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.j10j_1 = this$0;
    this.k10j_1 = $personPicture;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$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(SignUpViewModel$onPersonPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$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.j10j_1.dqo(this.j10j_1.xqm_1, 'picState', Companion_instance_7.n4r(), this.k10j_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(SignUpViewModel$onPersonPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onPersonPictureChanged$slambda(this.j10j_1, this.k10j_1, completion);
    i.l10j_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onPersonPictureChanged$slambda_0(this$0, $personPicture, resultContinuation) {
    var i = new SignUpViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onUsernameChanged$lambda($filteredValue) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.g96_1 = $filteredValue;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onFullNameFocusedChanged$slambda(this$0, resultContinuation) {
    this.u10j_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onFullNameFocusedChanged$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(SignUpViewModel$onFullNameFocusedChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$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 tmp0_elvis_lhs = this.u10j_1.t10f_1.t2().n10g_1;
            tmp_0.w10j_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            if (isBlank(this.w10j_1))
              return Unit_instance;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.u10j_1.d10g_1.hpo(this.w10j_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var suggestedUsername = suspendResult;
            var tmp0_safe_receiver = this.u10j_1.t10f_1.t2().i10g_1;
            var tmp_1;
            if (tmp0_safe_receiver == null) {
              tmp_1 = null;
            } else {
              tmp_1 = shallowCopy(tmp0_safe_receiver, SignUpViewModel$onFullNameFocusedChanged$slambda$lambda(suggestedUsername));
            }

            var updatedPerson = tmp_1;
            l$ret$1: do {
              var this_0 = this.u10j_1.t10f_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_safe_receiver_0 = this.u10j_1.t10f_1.t2().i10g_1;
                var tmp_2 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g96_1;
                var nextValue = prevValue.a10h(updatedPerson, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.u10j_1.iqu(tmp_2, updatedPerson == null ? null : updatedPerson.g96_1, this.u10j_1.t10f_1.t2().x10g_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_3 = this.kd_1;
            if (tmp_3 instanceof UsernameErrorException) {
              var e = this.kd_1;
              l$ret$3: do {
                var this_1 = this.u10j_1.t10f_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.a10h(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.u10j_1.xqn()));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_4 = this.kd_1;
              if (tmp_4 instanceof Exception) {
                var e_0 = this.kd_1;
                l$ret$5: do {
                  var this_2 = this.u10j_1.t10f_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.a10h(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e_0, this.u10j_1.xqn()));
                    if (this_2.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$5;
                    }
                  }
                }
                 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_1 = $p;
        if (this.id_1 === 3) {
          throw e_1;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onFullNameFocusedChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onFullNameFocusedChanged$slambda(this.u10j_1, completion);
    i.v10j_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onFullNameFocusedChanged$slambda_0(this$0, resultContinuation) {
    var i = new SignUpViewModel$onFullNameFocusedChanged$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$onClickSignup$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h96_1 = $firstName;
      $this$shallowCopy.i96_1 = $lastName;
      return Unit_instance;
    };
  }
  function SignUpViewModel$onClickSignup$slambda(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation) {
    this.f10k_1 = this$0;
    this.g10k_1 = $savePerson;
    this.h10k_1 = $createPasskeyUseCaseVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignUpViewModel$onClickSignup$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(SignUpViewModel$onClickSignup$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 16;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 15;
            this.id_1 = 12;
            this.hd_1 = 3;
            var tmp_0 = get_doorPrimaryKeyManager(this.f10k_1.rqn());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.l10k_1 = suspendResult;
            this.g10k_1.f96_1 = this.l10k_1;
            if (!(this.h10k_1 == null)) {
              this.id_1 = 9;
              var tmp_1 = this;
              var tmp0_elvis_lhs = this.g10k_1.g96_1;
              var tmp_2;
              if (tmp0_elvis_lhs == null) {
                throw IllegalStateException_init_$Create$('username can not be null');
              } else {
                tmp_2 = tmp0_elvis_lhs;
              }
              tmp_1.m10k_1 = tmp_2;
              this.hd_1 = 4;
              suspendResult = this.h10k_1.ipb(this.m10k_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var this_0 = LinkedHashMap_init_$Create$();
              this.f10k_1.lqo(this_0, Companion_getInstance_213().hr7_1);
              Companion_getInstance_125();
              this.f10k_1.kqo(this_0, 'next');
              this_0.s('otheroptionperson', this.f10k_1.m4r().r45(Companion_instance_3.n4r(), this.g10k_1));
              var tmp_3 = this.f10k_1.m4r();
              var tmp_4 = Companion_instance_7.n4r();
              var tmp0_elvis_lhs_0 = this.f10k_1.t10f_1.t2().l10g_1;
              this_0.s('otheroptionpersonprofilepic', tmp_3.r45(tmp_4, tmp0_elvis_lhs_0 == null ? new PersonPicture() : tmp0_elvis_lhs_0));
              this_0.s('isparent', this.f10k_1.t10f_1.t2().r10g_1.toString());
              this.f10k_1.zqm_1.kp6('SignupEnterUsernamePassword', this_0.f3());
              this.hd_1 = 11;
              continue $sm;
            }

          case 4:
            this.n10k_1 = suspendResult;
            this.hd_1 = 5;
            suspendResult = this.f10k_1.nqn().loa(this.f10k_1.z10f_1, this.n10k_1, this.g10k_1, this.f10k_1.t10f_1.t2().l10g_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.o10k_1 = this.f10k_1.t10f_1.t2().l10g_1;
            if (!(this.o10k_1 == null)) {
              this.o10k_1.e97_1 = this.g10k_1.f96_1;
              this.o10k_1.f97_1 = systemTimeInMillis();
              this.p10k_1 = this.o10k_1.g97_1;
              this.hd_1 = 6;
              var tmp_5 = _get_enqueueSavePictureUseCase__rl1s31_0(this.f10k_1);
              var tmp_6 = this.g10k_1.f96_1;
              suspendResult = tmp_5.uor(tmp_6, 50, this.p10k_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 = 8;
            suspendResult = enrollToCourseFromInviteUid(this.f10k_1, this.g10k_1.f96_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            navigateToAppropriateScreen(this.f10k_1, this.g10k_1);
            this.id_1 = 12;
            this.hd_1 = 10;
            continue $sm;
          case 9:
            this.id_1 = 12;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Exception) {
              var e = this.kd_1;
              l$ret$1: do {
                var this_1 = this.f10k_1.t10f_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.a10h(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, stringResourceOrMessage(e, this.f10k_1.xqn()));
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 10;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 10:
            this.id_1 = 12;
            this.hd_1 = 11;
            continue $sm;
          case 11:
            this.j10k_1 = Unit_instance;
            this.id_1 = 16;
            this.hd_1 = 14;
            continue $sm;
          case 12:
            this.id_1 = 15;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Exception) {
              var e_0 = this.kd_1;
              var tmp_9 = Napier_getInstance();
              tmp_9.k5e(VOID, VOID, SignUpViewModel$onClickSignup$slambda$lambda(e_0));
              this.f10k_1.vqn().yq6(new Snack(this.f10k_1.xqn().joj(strings_getInstance().qmi_1) + ':' + e_0.message));
              this.k10k_1 = Unit_instance;
              this.id_1 = 16;
              this.hd_1 = 13;
              var tmp_10 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 16;
            this.f10k_1.zqn(Companion_getInstance_97().rq6_1);
            return Unit_instance;
          case 14:
            this.id_1 = 16;
            this.f10k_1.zqn(Companion_getInstance_97().rq6_1);
            return Unit_instance;
          case 15:
            this.id_1 = 16;
            var t = this.kd_1;
            this.f10k_1.zqn(Companion_getInstance_97().rq6_1);
            throw t;
          case 16:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.id_1 === 16) {
          throw e_1;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(SignUpViewModel$onClickSignup$slambda).v1m = function ($this$launch, completion) {
    var i = new SignUpViewModel$onClickSignup$slambda(this.f10k_1, this.g10k_1, this.h10k_1, completion);
    i.i10k_1 = $this$launch;
    return i;
  };
  function SignUpViewModel$onClickSignup$slambda_0(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation) {
    var i = new SignUpViewModel$onClickSignup$slambda(this$0, $savePerson, $createPasskeyUseCaseVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignUpViewModel$navigateToAppropriateScreen$lambda(this$0) {
    return function () {
      return 'AddSignUpPresenter: go to next destination: ' + this$0.v10f_1;
    };
  }
  function $enrollToCourseFromInviteUidCOROUTINE$78(_this__u8e3s4, personUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.a10i_1 = _this__u8e3s4;
    this.b10i_1 = personUid;
  }
  protoOf($enrollToCourseFromInviteUidCOROUTINE$78).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;
            Companion_getInstance_116();
            tmp_0.c10i_1 = this.a10i_1.xqm_1.ba('next');
            var tmp_1;
            if (!(this.c10i_1 == null)) {
              tmp_1 = contains(this.c10i_1, 'ClazzInviteRedeem');
            } else {
              tmp_1 = false;
            }

            if (tmp_1) {
              var tmp_2 = this.a10i_1;
              Companion_getInstance_140();
              tmp_2.v10f_1 = 'CourseListHome';
              this.hd_1 = 1;
              suspendResult = this.a10i_1.h10g_1.ypg(this.c10i_1, this.b10i_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 SignUpViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_213();
    destName = destName === VOID ? 'SignUp' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.t10f_1 = MutableStateFlow(new SignUpUiState());
    this.u10f_1 = new ValidateUsernameUseCase();
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.v10f_1 = tmp_0;
    this.w10f_1 = asStateFlow(this.t10f_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(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.x10f_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_15());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(GetLocalAccountsSupportedUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.y10f_1 = Instance(this, tmp$ret$2, null).a5d(this, getLocalAccountsSupportedUseCase$factory());
    var tmp_5 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_7(this).wo5_1 : tmp0_elvis_lhs_0;
    tmp_5.z10f_1 = tmp1_elvis_lhs == null ? 'http://localhost' : tmp1_elvis_lhs;
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.z10f_1);
    var trigger = di.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$5 = tmp_7.h57(tmp$ret$4, context);
    var this_0 = On(di, tmp$ret$5, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(CreatePasskeyUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_6.a10g_1 = InstanceOrNull(this_0, tmp$ret$7, null).a5d(this, createPasskeyUseCase$factory_1());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.z10f_1);
    var trigger_0 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_11 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    var tmp$ret$10 = tmp_11.h57(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_13 = get_direct(tmp$ret$11).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_10.b10g_1 = tmp_13.d58(tmp$ret$12, null);
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.c10g_1 = Instance(this, tmp$ret$14, null).a5d(this, genderConfig$factory_3());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.z10f_1);
    var trigger_1 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_18 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    var tmp$ret$17 = tmp_18.h57(tmp$ret$16, context_1);
    var tmp$ret$18 = On(di, tmp$ret$17, trigger_1);
    var tmp_20 = get_direct(tmp$ret$18).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_21 = typeToken(createKType(getKClass(GetUsernameSuggestionUseCase), arrayOf([]), false));
    var tmp$ret$19 = isInterface(tmp_21, TypeToken) ? tmp_21 : THROW_CCE();
    tmp_17.d10g_1 = tmp_20.d58(tmp$ret$19, null);
    this.e10g_1 = new FilterUsernameUseCase();
    this.f10g_1 = null;
    var tmp_22 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_2 = new LearningSpace(this.z10f_1);
    var trigger_2 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_23 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_24 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$21 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
    var tmp$ret$22 = tmp_23.h57(tmp$ret$21, context_2);
    var this_1 = On(this, tmp$ret$22, trigger_2);
    // Inline function 'org.kodein.type.generic' call
    var tmp_25 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$24 = isInterface(tmp_25, TypeToken) ? tmp_25 : THROW_CCE();
    tmp_22.g10g_1 = Instance(this_1, tmp$ret$24, null).a5d(this, enqueueSavePictureUseCase$factory_1());
    var tmp_26 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_3 = new LearningSpace(this.z10f_1);
    var trigger_3 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_27 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_28 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$26 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
    var tmp$ret$27 = tmp_27.h57(tmp$ret$26, context_3);
    var tmp$ret$28 = On(di, tmp$ret$27, trigger_3);
    var tmp_29 = get_direct(tmp$ret$28).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_30 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$29 = isInterface(tmp_30, TypeToken) ? tmp_30 : THROW_CCE();
    tmp_26.h10g_1 = tmp_29.d58(tmp$ret$29, null);
    this.zqn(Companion_getInstance_97().qq6_1);
    var title = this.xqn().joj(strings_getInstance().un7_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.bqn_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, false, VOID, VOID, false, VOID, VOID, VOID, false);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.t10f_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.a10h(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      var tmp_31 = this;
      Companion_getInstance_169();
      tmp_31.v10f_1 = 'ContentEntryListHome';
    }
    var tmp_32 = this.oqn();
    launch(tmp_32, VOID, VOID, SignUpViewModel$slambda_0(this, null));
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.t10f_1;
      while (true) {
        var prevValue_1 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.<anonymous>' call
        var tmp4_genderOptions = _get_genderConfig__kyr0zc_1(this).iq7_1;
        Companion_getInstance_202();
        var tmp0_safe_receiver = savedStateHandle.ba('DateOfBirth');
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        var tmp2_dateOfBirth = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        var tmp3_isPersonalAccount = this.t10f_1.t2().w10g_1;
        var tmp5_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_isPersonalAccount, tmp2_dateOfBirth);
        var tmp6_serverUrl_ = this.z10f_1;
        var tmp7_passkeySupported = !(_get_createPasskeyUseCase__ryoxza_0(this) == null);
        var tmp8_showOtherOption = _get_createPasskeyUseCase__ryoxza_0(this) == null ? _get_getLocalAccountsSupportedUseCase__hoi7c7(this).qpe() : false;
        var nextValue_1 = prevValue_1.a10h(tmp5_person, VOID, tmp4_genderOptions, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp7_passkeySupported, tmp6_serverUrl_, tmp8_showOtherOption);
        if (this_4.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
  }
  protoOf(SignUpViewModel).izc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.i10g_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.l96_1;
        var tmp_0 = this.iqu(tmp, entity == null ? null : entity.l96_1, prevValue.p10g_1);
        var tmp2_safe_receiver = prevValue.i10g_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g96_1;
        var nextValue = prevValue.a10h(entity, VOID, VOID, VOID, VOID, VOID, VOID, tmp_0, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.iqu(tmp_1, entity == null ? null : entity.g96_1, prevValue.x10g_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.oqn();
    tmp_2.eqt_1 = launch(tmp_3, VOID, VOID, SignUpViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SignUpViewModel).q10k = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onParentCheckChanged.<anonymous>' call
        var nextValue = prevValue.a10h(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).r10k = function (checked) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onTeacherCheckChanged.<anonymous>' call
        var nextValue = prevValue.a10h(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, checked);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).fzs = function (pictureUri) {
    // Inline function 'kotlin.apply' call
    var this_0 = new PersonPicture();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onPersonPictureChanged.<anonymous>' call
    var tmp = this_0;
    var tmp0_safe_receiver = this.t10f_1.t2().l10g_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e97_1;
    tmp.e97_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this_0.g97_1 = pictureUri;
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.t10f_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.a10h(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, SignUpViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(SignUpViewModel).s10k = function (fullName) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onFullNameValueChange.<anonymous>' call
        var nextValue = prevValue.a10h(VOID, VOID, VOID, VOID, VOID, fullName, VOID, VOID, this.iqu(prevValue.n10g_1, fullName, prevValue.q10g_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).cyi = function (newValue) {
    var filteredValue = this.e10g_1.mpe(newValue, '');
    var tmp0_safe_receiver = this.t10f_1.t2().i10g_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy(tmp0_safe_receiver, SignUpViewModel$onUsernameChanged$lambda(filteredValue));
    }
    var updatedPerson = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onUsernameChanged.<anonymous>' call
        var tmp2_safe_receiver = this.t10f_1.t2().i10g_1;
        var tmp3_usernameSetByUser = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g96_1) === filteredValue);
        var tmp0_safe_receiver_0 = this.t10f_1.t2().i10g_1;
        var tmp_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g96_1;
        var tmp4_usernameError = this.iqu(tmp_0, updatedPerson == null ? null : updatedPerson.g96_1, this.t10f_1.t2().x10g_1);
        var nextValue = prevValue.a10h(updatedPerson, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_usernameError, tmp3_usernameSetByUser);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignUpViewModel).t10k = function (hasFocused) {
    if (hasFocused)
      return Unit_instance;
    var tmp;
    if (this.t10f_1.t2().y10g_1) {
      // Inline function 'kotlin.text.isNullOrEmpty' call
      var tmp0_safe_receiver = this.t10f_1.t2().i10g_1;
      var this_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ckr();
      // Inline function 'kotlin.contracts.contract' call
      tmp = !(this_0 == null ? true : charSequenceLength(this_0) === 0);
    } else {
      tmp = false;
    }
    if (tmp)
      return Unit_instance;
    var tmp1_safe_receiver = this.f10g_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.oqn();
    tmp_0.f10g_1 = launch(tmp_1, VOID, VOID, SignUpViewModel$onFullNameFocusedChanged$slambda_0(this, null));
  };
  protoOf(SignUpViewModel).u10k = function () {
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp0_safe_receiver = this.t10f_1.t2().n10g_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp;
    var tmp_0;
    if (fullName == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(fullName) ? fullName : THROW_CCE()));
    }
    var tmp2_safe_receiver = tmp_0;
    var parts = tmp2_safe_receiver == null ? null : split(tmp2_safe_receiver, [' '], VOID, 2);
    var firstName = parts == null ? null : parts.v(0);
    var tmp_1;
    if (parts == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.getOrElse' call
      var tmp_2;
      if (1 >= 0 ? 1 <= get_lastIndex(parts) : false) {
        tmp_2 = parts.v(1);
      } else {
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickSignup.<anonymous>' call
        tmp_2 = '';
      }
      tmp_1 = tmp_2;
    }
    var lastName = tmp_1;
    var tmp5_safe_receiver = this.t10f_1.t2().i10g_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      tmp_3 = shallowCopy(tmp5_safe_receiver, SignUpViewModel$onClickSignup$lambda(firstName, lastName));
    }
    this.izc(tmp_3);
    var tmp6_elvis_lhs = this.t10f_1.t2().i10g_1;
    var tmp_4;
    if (tmp6_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_4 = tmp6_elvis_lhs;
    }
    var savePerson = tmp_4;
    var requiredFieldMessage = this.xqn().joj(strings_getInstance().vmn_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10f_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignUpViewModel.onClickSignup.<anonymous>' call
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = savePerson.h96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = requiredFieldMessage;
        } else {
          tmp_5 = null;
        }
        var tmp0_fullNameError = tmp_5;
        var tmp_6;
        var tmp_7 = savePerson.l96_1;
        if (tmp_7 === 0) {
          tmp_6 = requiredFieldMessage;
        } else {
          tmp_6 = null;
        }
        var tmp1_genderError = tmp_6;
        var tmp_8;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = savePerson.g96_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_8 = requiredFieldMessage;
        } else {
          tmp_8 = null;
        }
        var tmp2_usernameError = tmp_8;
        var nextValue = prevValue.a10h(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_genderError, tmp0_fullNameError, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_usernameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_5(this.t10f_1.t2(), this)) {
      this.zqn(Companion_getInstance_97().rq6_1);
      return Unit_instance;
    }
    var createPasskeyUseCaseVal = _get_createPasskeyUseCase__ryoxza_0(this);
    var tmp_9 = this.oqn();
    launch(tmp_9, VOID, VOID, SignUpViewModel$onClickSignup$slambda_0(this, savePerson, createPasskeyUseCaseVal, null));
  };
  function SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().kq7_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    fullName = fullName === VOID ? null : fullName;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    genderError = genderError === VOID ? null : genderError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    isParent = isParent === VOID ? false : isParent;
    isTeacher = isTeacher === VOID ? false : isTeacher;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    serverUrl_ = serverUrl_ === VOID ? null : serverUrl_;
    showOtherOption = showOtherOption === VOID ? true : showOtherOption;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    usernameError = usernameError === VOID ? null : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? false : usernameSetByUser;
    errorText = errorText === VOID ? null : errorText;
    this.i10g_1 = person;
    this.j10g_1 = password;
    this.k10g_1 = genderOptions;
    this.l10g_1 = personPicture;
    this.m10g_1 = registrationMode;
    this.n10g_1 = fullName;
    this.o10g_1 = dateOfBirthError;
    this.p10g_1 = genderError;
    this.q10g_1 = fullNameError;
    this.r10g_1 = isParent;
    this.s10g_1 = isTeacher;
    this.t10g_1 = passkeySupported;
    this.u10g_1 = serverUrl_;
    this.v10g_1 = showOtherOption;
    this.w10g_1 = isPersonalAccount;
    this.x10g_1 = usernameError;
    this.y10g_1 = usernameSetByUser;
    this.z10g_1 = errorText;
  }
  protoOf(SignUpUiState).v10k = function (person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) {
    return new SignUpUiState(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).a10h = function (person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText, $super) {
    person = person === VOID ? this.i10g_1 : person;
    password = password === VOID ? this.j10g_1 : password;
    genderOptions = genderOptions === VOID ? this.k10g_1 : genderOptions;
    personPicture = personPicture === VOID ? this.l10g_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.m10g_1 : registrationMode;
    fullName = fullName === VOID ? this.n10g_1 : fullName;
    dateOfBirthError = dateOfBirthError === VOID ? this.o10g_1 : dateOfBirthError;
    genderError = genderError === VOID ? this.p10g_1 : genderError;
    fullNameError = fullNameError === VOID ? this.q10g_1 : fullNameError;
    isParent = isParent === VOID ? this.r10g_1 : isParent;
    isTeacher = isTeacher === VOID ? this.s10g_1 : isTeacher;
    passkeySupported = passkeySupported === VOID ? this.t10g_1 : passkeySupported;
    serverUrl_ = serverUrl_ === VOID ? this.u10g_1 : serverUrl_;
    showOtherOption = showOtherOption === VOID ? this.v10g_1 : showOtherOption;
    isPersonalAccount = isPersonalAccount === VOID ? this.w10g_1 : isPersonalAccount;
    usernameError = usernameError === VOID ? this.x10g_1 : usernameError;
    usernameSetByUser = usernameSetByUser === VOID ? this.y10g_1 : usernameSetByUser;
    errorText = errorText === VOID ? this.z10g_1 : errorText;
    return $super === VOID ? this.v10k(person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText) : $super.v10k.call(this, person, password, genderOptions, personPicture, registrationMode, fullName, dateOfBirthError, genderError, fullNameError, isParent, isTeacher, passkeySupported, serverUrl_, showOtherOption, isPersonalAccount, usernameError, usernameSetByUser, errorText);
  };
  protoOf(SignUpUiState).toString = function () {
    return 'SignUpUiState(person=' + this.i10g_1 + ', password=' + this.j10g_1 + ', genderOptions=' + this.k10g_1 + ', personPicture=' + this.l10g_1 + ', registrationMode=' + this.m10g_1 + ', fullName=' + this.n10g_1 + ', dateOfBirthError=' + this.o10g_1 + ', genderError=' + this.p10g_1 + ', fullNameError=' + this.q10g_1 + ', isParent=' + this.r10g_1 + ', isTeacher=' + this.s10g_1 + ', passkeySupported=' + this.t10g_1 + ', serverUrl_=' + this.u10g_1 + ', showOtherOption=' + this.v10g_1 + ', isPersonalAccount=' + this.w10g_1 + ', usernameError=' + this.x10g_1 + ', usernameSetByUser=' + this.y10g_1 + ', errorText=' + this.z10g_1 + ')';
  };
  protoOf(SignUpUiState).hashCode = function () {
    var result = this.i10g_1 == null ? 0 : this.i10g_1.hashCode();
    result = imul(result, 31) + (this.j10g_1 == null ? 0 : getStringHashCode(this.j10g_1)) | 0;
    result = imul(result, 31) + hashCode(this.k10g_1) | 0;
    result = imul(result, 31) + (this.l10g_1 == null ? 0 : this.l10g_1.hashCode()) | 0;
    result = imul(result, 31) + this.m10g_1 | 0;
    result = imul(result, 31) + (this.n10g_1 == null ? 0 : getStringHashCode(this.n10g_1)) | 0;
    result = imul(result, 31) + (this.o10g_1 == null ? 0 : getStringHashCode(this.o10g_1)) | 0;
    result = imul(result, 31) + (this.p10g_1 == null ? 0 : getStringHashCode(this.p10g_1)) | 0;
    result = imul(result, 31) + (this.q10g_1 == null ? 0 : getStringHashCode(this.q10g_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.r10g_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.s10g_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.t10g_1) | 0;
    result = imul(result, 31) + (this.u10g_1 == null ? 0 : getStringHashCode(this.u10g_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.v10g_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.w10g_1) | 0;
    result = imul(result, 31) + (this.x10g_1 == null ? 0 : getStringHashCode(this.x10g_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.y10g_1) | 0;
    result = imul(result, 31) + (this.z10g_1 == null ? 0 : getStringHashCode(this.z10g_1)) | 0;
    return result;
  };
  protoOf(SignUpUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SignUpUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SignUpUiState ? other : THROW_CCE();
    if (!equals(this.i10g_1, tmp0_other_with_cast.i10g_1))
      return false;
    if (!(this.j10g_1 == tmp0_other_with_cast.j10g_1))
      return false;
    if (!equals(this.k10g_1, tmp0_other_with_cast.k10g_1))
      return false;
    if (!equals(this.l10g_1, tmp0_other_with_cast.l10g_1))
      return false;
    if (!(this.m10g_1 === tmp0_other_with_cast.m10g_1))
      return false;
    if (!(this.n10g_1 == tmp0_other_with_cast.n10g_1))
      return false;
    if (!(this.o10g_1 == tmp0_other_with_cast.o10g_1))
      return false;
    if (!(this.p10g_1 == tmp0_other_with_cast.p10g_1))
      return false;
    if (!(this.q10g_1 == tmp0_other_with_cast.q10g_1))
      return false;
    if (!(this.r10g_1 === tmp0_other_with_cast.r10g_1))
      return false;
    if (!(this.s10g_1 === tmp0_other_with_cast.s10g_1))
      return false;
    if (!(this.t10g_1 === tmp0_other_with_cast.t10g_1))
      return false;
    if (!(this.u10g_1 == tmp0_other_with_cast.u10g_1))
      return false;
    if (!(this.v10g_1 === tmp0_other_with_cast.v10g_1))
      return false;
    if (!(this.w10g_1 === tmp0_other_with_cast.w10g_1))
      return false;
    if (!(this.x10g_1 == tmp0_other_with_cast.x10g_1))
      return false;
    if (!(this.y10g_1 === tmp0_other_with_cast.y10g_1))
      return false;
    if (!(this.z10g_1 == tmp0_other_with_cast.z10g_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_15() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_7(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_1() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_0(receiver);
    }, null);
  }
  function genderConfig$factory_3() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_1(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_1() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_0(receiver);
    }, null);
  }
  function apiUrlConfig$factory_16() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_7(receiver);
    }, null);
  }
  function getLocalAccountsSupportedUseCase$factory_0() {
    return getPropertyCallableRef('getLocalAccountsSupportedUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocalAccountsSupportedUseCase__hoi7c7(receiver);
    }, null);
  }
  function createPasskeyUseCase$factory_2() {
    return getPropertyCallableRef('createPasskeyUseCase', 1, KProperty1, function (receiver) {
      return _get_createPasskeyUseCase__ryoxza_0(receiver);
    }, null);
  }
  function genderConfig$factory_4() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_1(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_2() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_0(receiver);
    }, null);
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda$lambda($e) {
    return function () {
      return 'enrollToCourseFromInviteCodeUseCase :' + $e.message;
    };
  }
  function _get_apiUrlConfig__mldllg_8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.x10l_1;
    apiUrlConfig$factory_18();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.b10m_1;
    genderConfig$factory_6();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.d10m_1;
    enqueueSavePictureUseCase$factory_4();
    return this_0.t2();
  }
  function hasErrors_6(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.k10m_1 == null);
  }
  function navigateToAppropriateScreen_0($this, savePerson) {
    if ($this.y10l_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_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.navigateToAppropriateScreen.<anonymous>' call
      Companion_getInstance_125();
      this_0.s('next', $this.v10l_1);
      $this.lqo(this_0, Companion_getInstance_213().hr7_1);
      Companion_getInstance_125();
      $this.kqo(this_0, 'next');
      var tmp$ret$2 = this_0.f3();
      $this.zqm_1.kp6('AddChildProfile', tmp$ret$2);
    } else {
      var goOptions = new UstadGoOptions(VOID, VOID, true);
      var tmp = Napier_getInstance();
      tmp.k5e(VOID, VOID, SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$lambda($this));
      $this.jqu($this.zqm_1, appendSelectedAccount($this.v10l_1, savePerson.f96_1, new LearningSpace($this.nqn().ioa().tnt_1)), goOptions);
    }
  }
  function Companion_197() {
    this.r10m_1 = 'SignupEnterUsernamePassword';
  }
  var Companion_instance_246;
  function Companion_getInstance_214() {
    return Companion_instance_246;
  }
  function SignupEnterUsernamePasswordViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.a10n_1 = this$0;
    this.b10n_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$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(SignupEnterUsernamePasswordViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$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.a10n_1.cqo(this.b10n_1, 'otheroptionperson', Companion_instance_3.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.d10n_1 = suspendResult;
            this.e10n_1 = this.d10n_1 == null ? new Person() : this.d10n_1;
            this.hd_1 = 2;
            suspendResult = this.a10n_1.cqo(this.b10n_1, 'otheroptionpersonprofilepic', Companion_instance_7.n4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var personPicture = suspendResult;
            l$ret$1: do {
              var this_0 = this.a10n_1.t10l_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (this.e10n_1.h96_1 === '') {
                  tmp_0 = null;
                } else {
                  tmp_0 = this.e10n_1.ckr();
                }
                var nextValue = prevValue.f10n(this.e10n_1, VOID, VOID, personPicture, VOID, tmp_0);
                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(SignupEnterUsernamePasswordViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$slambda(this.a10n_1, this.b10n_1, completion);
    i.c10n_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.o10n_1 = $commitDelay;
    this.p10n_1 = $entity;
    this.q10n_1 = $this;
    this.r10n_1 = $key;
    this.s10n_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$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(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$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.o10n_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.p10n_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.q10n_1.dqo(this.q10n_1.xqm_1, this.r10n_1, this.s10n_1, this.p10n_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(SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda(this.o10n_1, this.p10n_1, this.q10n_1, this.r10n_1, this.s10n_1, completion);
    i.t10n_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$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 SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$lambda($firstName, $lastName) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h96_1 = $firstName;
      $this$shallowCopy.i96_1 = $lastName;
      return Unit_instance;
    };
  }
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this$0, $savePerson, resultContinuation) {
    this.c10o_1 = this$0;
    this.d10o_1 = $savePerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$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(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 16;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 15;
            this.id_1 = 14;
            this.hd_1 = 3;
            var tmp_0 = get_doorPrimaryKeyManager(this.c10o_1.rqn());
            suspendResult = tmp_0.o62(9, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.h10o_1 = suspendResult;
            this.d10o_1.f96_1 = this.h10o_1;
            this.i10o_1 = this.c10o_1.t10l_1.t2().f10m_1;
            if (this.i10o_1 == null) {
              this.g10o_1 = Unit_instance;
              this.id_1 = 16;
              this.hd_1 = 17;
              var tmp_1 = this;
              continue $sm;
            } else {
              this.j10o_1 = this.i10o_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            this.k10o_1 = this.j10o_1;
            this.hd_1 = 5;
            suspendResult = this.c10o_1.nqn().noa(this.d10o_1, this.k10o_1, this.c10o_1.z10l_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.l10o_1 = this.c10o_1.t10l_1.t2().h10m_1;
            if (!(this.l10o_1 == null)) {
              this.l10o_1.e97_1 = this.d10o_1.f96_1;
              this.l10o_1.f97_1 = systemTimeInMillis();
              this.m10o_1 = this.l10o_1.g97_1;
              this.hd_1 = 6;
              var tmp_2 = _get_enqueueSavePictureUseCase__rl1s31_1(this.c10o_1);
              var tmp_3 = this.d10o_1.f96_1;
              suspendResult = tmp_2.uor(tmp_3, 50, this.m10o_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:
            var tmp_4 = this;
            var this_0 = this.c10o_1.a57();
            var context = new LearningSpace(this.c10o_1.z10l_1);
            var trigger = this_0.d57();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_0, tmp_5.h57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).f58();
            var tmp_8 = typeToken(createKType(getKClass(SavePasswordUseCase), arrayOf([]), false));
            tmp_4.n10o_1 = tmp_7.e58(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), null);
            this.o10o_1 = this.n10o_1;
            if (this.o10o_1 == null) {
              this.p10o_1 = null;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.hd_1 = 8;
              suspendResult = this.o10o_1.opc(toString_0(this.d10o_1.g96_1), this.k10o_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 8:
            var tmp_9 = this;
            tmp_9.p10o_1 = Unit_instance;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 12;
            var tmp_10 = this;
            Companion_getInstance_116();
            tmp_10.q10o_1 = this.c10o_1.xqm_1.ba('next');
            if (!(this.q10o_1 == null) ? contains(this.q10o_1, 'ClazzInviteRedeem') : false) {
              var tmp_11 = this.c10o_1;
              Companion_getInstance_140();
              tmp_11.v10l_1 = 'CourseListHome';
              this.hd_1 = 10;
              suspendResult = this.c10o_1.c10m_1.ypg(this.q10o_1, this.d10o_1.f96_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.id_1 = 14;
            this.hd_1 = 13;
            continue $sm;
          case 12:
            this.id_1 = 14;
            var tmp_12 = this.kd_1;
            if (tmp_12 instanceof Exception) {
              var e = this.kd_1;
              var tmp_13 = Napier_getInstance();
              tmp_13.k5e(VOID, VOID, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda$lambda(e));
              this.hd_1 = 13;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 14;
            var tmp_14 = this;
            navigateToAppropriateScreen_0(this.c10o_1, this.d10o_1);
            tmp_14.f10o_1 = Unit_instance;
            this.id_1 = 16;
            this.hd_1 = 18;
            continue $sm;
          case 14:
            this.id_1 = 15;
            var tmp_15 = this.kd_1;
            if (tmp_15 instanceof Exception) {
              var e_0 = this.kd_1;
              if (e_0 instanceof IllegalStateException) {
                l$ret$5: do {
                  var this_1 = this.c10o_1.t10l_1;
                  while (true) {
                    var prevValue = this_1.t2();
                    var nextValue = prevValue.f10n(VOID, VOID, VOID, VOID, VOID, VOID, this.c10o_1.xqn().joj(strings_getInstance().yn7_1));
                    if (this_1.y1k(prevValue, nextValue)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
              } else {
                this.c10o_1.vqn().yq6(new Snack(this.c10o_1.xqn().joj(strings_getInstance().amj_1)));
              }
              this.g10o_1 = Unit_instance;
              this.id_1 = 16;
              this.hd_1 = 17;
              var tmp_16 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 15:
            this.id_1 = 16;
            var t = this.kd_1;
            this.c10o_1.zqn(Companion_getInstance_97().rq6_1);
            throw t;
          case 16:
            throw this.kd_1;
          case 17:
            this.id_1 = 16;
            this.c10o_1.zqn(Companion_getInstance_97().rq6_1);
            return Unit_instance;
          case 18:
            this.id_1 = 16;
            this.c10o_1.zqn(Companion_getInstance_97().rq6_1);
            return Unit_instance;
        }
      } catch ($p) {
        var e_1 = $p;
        if (this.id_1 === 16) {
          throw e_1;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_1;
        }
      }
     while (true);
  };
  protoOf(SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda).v1m = function ($this$launch, completion) {
    var i = new SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this.c10o_1, this.d10o_1, completion);
    i.e10o_1 = $this$launch;
    return i;
  };
  function SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda_0(this$0, $savePerson, resultContinuation) {
    var i = new SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda(this$0, $savePerson, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SignupEnterUsernamePasswordViewModel$navigateToAppropriateScreen$lambda(this$0) {
    return function () {
      return 'AddSignupEnterUsernamePasswordPresenter: go to next destination: ' + this$0.v10l_1;
    };
  }
  function SignupEnterUsernamePasswordViewModel(di, savedStateHandle, destName) {
    destName = destName === VOID ? 'SignupEnterUsernamePassword' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.t10l_1 = MutableStateFlow(new SignupEnterUsernamePasswordUiState());
    this.u10l_1 = new ValidateUsernameUseCase();
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_140();
      tmp_0 = 'CourseListHome';
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.v10l_1 = tmp_0;
    this.w10l_1 = asStateFlow(this.t10l_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(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.x10l_1 = Instance(this, tmp$ret$0, null).a5d(this, apiUrlConfig$factory_17());
    var tmp_3 = this;
    tmp_3.y10l_1 = toBoolean(savedStateHandle.ba('isparent'));
    var tmp_4 = this;
    Companion_getInstance_116();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('learningSpaceUrl');
    var tmp1_elvis_lhs = tmp0_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_8(this).wo5_1 : tmp0_elvis_lhs_0;
    tmp_4.z10l_1 = tmp1_elvis_lhs == null ? 'http://localhost' : tmp1_elvis_lhs;
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = new LearningSpace(this.z10l_1);
    var trigger = di.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$3 = tmp_6.h57(tmp$ret$2, context);
    var tmp$ret$4 = On(di, tmp$ret$3, trigger);
    var tmp_8 = get_direct(tmp$ret$4).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_5.a10m_1 = tmp_8.d58(tmp$ret$5, null);
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.b10m_1 = Instance(this, tmp$ret$7, null).a5d(this, genderConfig$factory_5());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = new LearningSpace(this.z10l_1);
    var trigger_0 = di.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_13 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    var tmp$ret$10 = tmp_13.h57(tmp$ret$9, context_0);
    var tmp$ret$11 = On(di, tmp$ret$10, trigger_0);
    var tmp_15 = get_direct(tmp$ret$11).f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(EnrollToCourseFromInviteCodeUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_12.c10m_1 = tmp_15.d58(tmp$ret$12, null);
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_1 = new LearningSpace(this.z10l_1);
    var trigger_1 = this.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_18 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_19 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
    var tmp$ret$15 = tmp_18.h57(tmp$ret$14, context_1);
    var this_0 = On(this, tmp$ret$15, trigger_1);
    // Inline function 'org.kodein.type.generic' call
    var tmp_20 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$17 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
    tmp_17.d10m_1 = Instance(this_0, tmp$ret$17, null).a5d(this, enqueueSavePictureUseCase$factory_3());
    this.zqn(Companion_getInstance_97().qq6_1);
    var title = this.xqn().joj(strings_getInstance().un7_1);
    var tmp_21 = this.oqn();
    launch(tmp_21, VOID, VOID, SignupEnterUsernamePasswordViewModel$slambda_0(this, savedStateHandle, null));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, false, true, VOID, false, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    Companion_getInstance_213();
    if (savedStateHandle.ba('personalAccount') === 'true') {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.t10l_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.f10n(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      var tmp_22 = this;
      Companion_getInstance_169();
      tmp_22.v10l_1 = 'ContentEntryListHome';
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.t10l_1;
      while (true) {
        var prevValue_1 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.<anonymous>' call
        var tmp4_genderOptions = _get_genderConfig__kyr0zc_2(this).iq7_1;
        Companion_getInstance_202();
        var tmp0_safe_receiver = savedStateHandle.ba('DateOfBirth');
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        var tmp2_dateOfBirth = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        var tmp3_isPersonalAccount = this.t10l_1.t2().q10m_1;
        var tmp5_person = new Person(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_isPersonalAccount, tmp2_dateOfBirth);
        var nextValue_1 = prevValue_1.f10n(tmp5_person, VOID, tmp4_genderOptions);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
  }
  protoOf(SignupEnterUsernamePasswordViewModel).izc = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.f10n(entity);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver = this.eqt_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.eqt_1 = launch(tmp_0, VOID, VOID, SignupEnterUsernamePasswordViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SignupEnterUsernamePasswordViewModel).ezs = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.f10n(VOID, password, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SignupEnterUsernamePasswordViewModel).r10o = function () {
    this.zqn(Companion_getInstance_97().qq6_1);
    var tmp0_safe_receiver = this.t10l_1.t2().j10m_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var fullName = tmp;
    var tmp_0;
    if (fullName == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(fullName) ? fullName : THROW_CCE()));
    }
    var tmp2_safe_receiver = tmp_0;
    var parts = tmp2_safe_receiver == null ? null : split(tmp2_safe_receiver, [' '], VOID, 2);
    var firstName = parts == null ? null : parts.v(0);
    var tmp_1;
    if (parts == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.getOrElse' call
      var tmp_2;
      if (1 >= 0 ? 1 <= get_lastIndex(parts) : false) {
        tmp_2 = parts.v(1);
      } else {
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onClickedSignupEnterUsernamePassword.<anonymous>' call
        tmp_2 = '';
      }
      tmp_1 = tmp_2;
    }
    var lastName = tmp_1;
    var tmp5_safe_receiver = this.t10l_1.t2().e10m_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      tmp_3 = shallowCopy(tmp5_safe_receiver, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$lambda(firstName, lastName));
    }
    this.izc(tmp_3);
    var tmp6_elvis_lhs = this.t10l_1.t2().e10m_1;
    var tmp_4;
    if (tmp6_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_4 = tmp6_elvis_lhs;
    }
    var savePerson = tmp_4;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.t10l_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.signup.SignupEnterUsernamePasswordViewModel.onClickedSignupEnterUsernamePassword.<anonymous>' call
        var tmp_5;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = prevValue.f10m_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_5 = this.xqn().joj(strings_getInstance().vmn_1);
        } else {
          tmp_5 = null;
        }
        var nextValue = prevValue.f10n(VOID, VOID, VOID, VOID, VOID, VOID, tmp_5);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_6(this.t10l_1.t2(), this)) {
      this.zqn(Companion_getInstance_97().rq6_1);
      return Unit_instance;
    }
    var tmp_6 = this.oqn();
    launch(tmp_6, VOID, VOID, SignupEnterUsernamePasswordViewModel$onClickedSignupEnterUsernamePassword$slambda_0(this, savePerson, null));
  };
  function SignupEnterUsernamePasswordUiState(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().kq7_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    firstName = firstName === VOID ? null : firstName;
    passwordError = passwordError === VOID ? null : passwordError;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    parentContactError = parentContactError === VOID ? null : parentContactError;
    genderError = genderError === VOID ? null : genderError;
    fullNameError = fullNameError === VOID ? null : fullNameError;
    passkeySupported = passkeySupported === VOID ? true : passkeySupported;
    isPersonalAccount = isPersonalAccount === VOID ? false : isPersonalAccount;
    this.e10m_1 = person;
    this.f10m_1 = password;
    this.g10m_1 = genderOptions;
    this.h10m_1 = personPicture;
    this.i10m_1 = registrationMode;
    this.j10m_1 = firstName;
    this.k10m_1 = passwordError;
    this.l10m_1 = dateOfBirthError;
    this.m10m_1 = parentContactError;
    this.n10m_1 = genderError;
    this.o10m_1 = fullNameError;
    this.p10m_1 = passkeySupported;
    this.q10m_1 = isPersonalAccount;
  }
  protoOf(SignupEnterUsernamePasswordUiState).s10o = function (person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) {
    return new SignupEnterUsernamePasswordUiState(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount);
  };
  protoOf(SignupEnterUsernamePasswordUiState).f10n = function (person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount, $super) {
    person = person === VOID ? this.e10m_1 : person;
    password = password === VOID ? this.f10m_1 : password;
    genderOptions = genderOptions === VOID ? this.g10m_1 : genderOptions;
    personPicture = personPicture === VOID ? this.h10m_1 : personPicture;
    registrationMode = registrationMode === VOID ? this.i10m_1 : registrationMode;
    firstName = firstName === VOID ? this.j10m_1 : firstName;
    passwordError = passwordError === VOID ? this.k10m_1 : passwordError;
    dateOfBirthError = dateOfBirthError === VOID ? this.l10m_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.m10m_1 : parentContactError;
    genderError = genderError === VOID ? this.n10m_1 : genderError;
    fullNameError = fullNameError === VOID ? this.o10m_1 : fullNameError;
    passkeySupported = passkeySupported === VOID ? this.p10m_1 : passkeySupported;
    isPersonalAccount = isPersonalAccount === VOID ? this.q10m_1 : isPersonalAccount;
    return $super === VOID ? this.s10o(person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount) : $super.s10o.call(this, person, password, genderOptions, personPicture, registrationMode, firstName, passwordError, dateOfBirthError, parentContactError, genderError, fullNameError, passkeySupported, isPersonalAccount);
  };
  protoOf(SignupEnterUsernamePasswordUiState).toString = function () {
    return 'SignupEnterUsernamePasswordUiState(person=' + this.e10m_1 + ', password=' + this.f10m_1 + ', genderOptions=' + this.g10m_1 + ', personPicture=' + this.h10m_1 + ', registrationMode=' + this.i10m_1 + ', firstName=' + this.j10m_1 + ', passwordError=' + this.k10m_1 + ', dateOfBirthError=' + this.l10m_1 + ', parentContactError=' + this.m10m_1 + ', genderError=' + this.n10m_1 + ', fullNameError=' + this.o10m_1 + ', passkeySupported=' + this.p10m_1 + ', isPersonalAccount=' + this.q10m_1 + ')';
  };
  protoOf(SignupEnterUsernamePasswordUiState).hashCode = function () {
    var result = this.e10m_1 == null ? 0 : this.e10m_1.hashCode();
    result = imul(result, 31) + (this.f10m_1 == null ? 0 : getStringHashCode(this.f10m_1)) | 0;
    result = imul(result, 31) + hashCode(this.g10m_1) | 0;
    result = imul(result, 31) + (this.h10m_1 == null ? 0 : this.h10m_1.hashCode()) | 0;
    result = imul(result, 31) + this.i10m_1 | 0;
    result = imul(result, 31) + (this.j10m_1 == null ? 0 : getStringHashCode(this.j10m_1)) | 0;
    result = imul(result, 31) + (this.k10m_1 == null ? 0 : getStringHashCode(this.k10m_1)) | 0;
    result = imul(result, 31) + (this.l10m_1 == null ? 0 : getStringHashCode(this.l10m_1)) | 0;
    result = imul(result, 31) + (this.m10m_1 == null ? 0 : getStringHashCode(this.m10m_1)) | 0;
    result = imul(result, 31) + (this.n10m_1 == null ? 0 : getStringHashCode(this.n10m_1)) | 0;
    result = imul(result, 31) + (this.o10m_1 == null ? 0 : getStringHashCode(this.o10m_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.p10m_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.q10m_1) | 0;
    return result;
  };
  protoOf(SignupEnterUsernamePasswordUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SignupEnterUsernamePasswordUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SignupEnterUsernamePasswordUiState ? other : THROW_CCE();
    if (!equals(this.e10m_1, tmp0_other_with_cast.e10m_1))
      return false;
    if (!(this.f10m_1 == tmp0_other_with_cast.f10m_1))
      return false;
    if (!equals(this.g10m_1, tmp0_other_with_cast.g10m_1))
      return false;
    if (!equals(this.h10m_1, tmp0_other_with_cast.h10m_1))
      return false;
    if (!(this.i10m_1 === tmp0_other_with_cast.i10m_1))
      return false;
    if (!(this.j10m_1 == tmp0_other_with_cast.j10m_1))
      return false;
    if (!(this.k10m_1 == tmp0_other_with_cast.k10m_1))
      return false;
    if (!(this.l10m_1 == tmp0_other_with_cast.l10m_1))
      return false;
    if (!(this.m10m_1 == tmp0_other_with_cast.m10m_1))
      return false;
    if (!(this.n10m_1 == tmp0_other_with_cast.n10m_1))
      return false;
    if (!(this.o10m_1 == tmp0_other_with_cast.o10m_1))
      return false;
    if (!(this.p10m_1 === tmp0_other_with_cast.p10m_1))
      return false;
    if (!(this.q10m_1 === tmp0_other_with_cast.q10m_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_17() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_8(receiver);
    }, null);
  }
  function genderConfig$factory_5() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_2(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_3() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_1(receiver);
    }, null);
  }
  function apiUrlConfig$factory_18() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_8(receiver);
    }, null);
  }
  function genderConfig$factory_6() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc_2(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_4() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31_1(receiver);
    }, null);
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).d10p = function (site, hasAdminPermission, $completion) {
    var tmp = this.e10p(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.d10p(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.b10p_1, this.c10p_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).e10p = function (site, hasAdminPermission, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.b10p_1 = site;
    i.c10p_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.d10p(site, hasAdminPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.n10p_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).p10p = function (it, $completion) {
    var tmp = this.q10p(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.p10p(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.o10p_1;
          var entity = tmp0_container.y6();
          var hasEditSitePermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.n10p_1.n10q_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.r10q(entity);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.n10p_1.bqn_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.jq6(prevValue_0.uq5_1.pq6(!(this.o10p_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).q10p = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this.n10p_1, completion);
    i.o10p_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.p10p(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation) {
    this.a10r_1 = this$0;
    this.b10r_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).d10r = function (it, $completion) {
    var tmp = this.e10r(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.d10r((!(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.a10r_1.n10q_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.c10r_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.b10r_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element_0 = tmp0_iterator_0.e();
                    if (element_0.eq4_1 === element.fht_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.fq4_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.r10q(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).e10r = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this.a10r_1, this.b10r_1, completion);
    i.c10r_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.d10r(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation) {
    this.n10r_1 = $siteFlow;
    this.o10r_1 = $permissionFlow;
    this.p10r_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.n10r_1, this.o10r_1, SiteDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this.p10r_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_39(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.n10r_1, this.o10r_1, this.p10r_1, completion);
    i.q10r_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.z10r_1 = this$0;
    this.a10s_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.z10r_1.tqn().w7e().fhs(1);
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this.z10r_1, this.a10s_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_39(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.z10r_1, this.a10s_1, completion);
    i.b10s_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.k10s_1 = this$0;
    this.l10s_1 = $this_launch;
    this.m10s_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.k10s_1.tqn().v7e().mhn();
          var tmp_0 = this.k10s_1.tqn().p7f();
          var tmp_1 = this.k10s_1.pqn();
          PermissionFlags_getInstance();
          var permissionFlow = tmp_0.ui0(tmp_1, new Long(16384, 0));
          launch(this.l10s_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_0(siteFlow, permissionFlow, this.k10s_1, null));
          launch(this.l10s_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_2(this.k10s_1, this.m10s_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).l78 = function (completion) {
    return new SiteDetailViewModel$slambda$slambda(this.k10s_1, this.l10s_1, this.m10s_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_198() {
    this.n10s_1 = 'Community';
  }
  var Companion_instance_247;
  function Companion_getInstance_215() {
    return Companion_instance_247;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_39(function_0) {
    this.o10s_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_39).t1d = function (value, $completion) {
    return this.o10s_1(value, $completion);
  };
  function SiteDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.xx5();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation) {
    this.x10s_1 = this$0;
    this.y10s_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.x10s_1.n10q_1, SiteDetailViewModel$slambda$slambda_0(this.x10s_1, this.z10s_1, this.y10s_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.x10s_1, this.y10s_1, completion);
    i.z10s_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.n10q_1 = MutableStateFlow(new SiteDetailUiState());
    this.o10q_1 = asStateFlow(this.n10q_1);
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this).f58();
    // 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.d58(tmp$ret$0, null);
    var uiLangList = supportLangConfig.epm_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.detail.SiteDetailViewModel.<anonymous>' call
        var tmp0_text = this.xqn().joj(strings_getInstance().tmv_1);
        var tmp1_onClick = SiteDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.jq6(new FabUiState(false, tmp0_text, tmp2_icon, tmp1_onClick), VOID, this.xqn().joj(strings_getInstance().dna_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.oqn();
    launch(tmp_1, VOID, VOID, SiteDetailViewModel$slambda_0(this, uiLangList, null));
  }
  protoOf(SiteDetailViewModel).xx5 = function () {
    Companion_getInstance_125();
    var tmp0_safe_receiver = this.n10q_1.t2().p10q_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qhn_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this.zqm_1.kp6('SiteEdit', mapOf_0(to('entityUid', tmp2_elvis_lhs == null ? '-1' : tmp2_elvis_lhs)));
  };
  protoOf(SiteDetailViewModel).a10t = function (termsAndLang) {
    var tmp0_elvis_lhs = termsAndLang.uka_1.fht_1;
    this.zqm_1.kp6('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.p10q_1 = site;
    this.q10q_1 = siteTerms;
  }
  protoOf(SiteDetailUiState).b10t = function (site, siteTerms) {
    return new SiteDetailUiState(site, siteTerms);
  };
  protoOf(SiteDetailUiState).r10q = function (site, siteTerms, $super) {
    site = site === VOID ? this.p10q_1 : site;
    siteTerms = siteTerms === VOID ? this.q10q_1 : siteTerms;
    return $super === VOID ? this.b10t(site, siteTerms) : $super.b10t.call(this, site, siteTerms);
  };
  protoOf(SiteDetailUiState).toString = function () {
    return 'SiteDetailUiState(site=' + this.p10q_1 + ', siteTerms=' + this.q10q_1 + ')';
  };
  protoOf(SiteDetailUiState).hashCode = function () {
    var result = this.p10q_1 == null ? 0 : hashCode(this.p10q_1);
    result = imul(result, 31) + hashCode(this.q10q_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.p10q_1, tmp0_other_with_cast.p10q_1))
      return false;
    if (!equals(this.q10q_1, tmp0_other_with_cast.q10q_1))
      return false;
    return true;
  };
  function SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.k10t_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda$slambda).nqa = function (it, $completion) {
    var tmp = this.oqa(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.nqa(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.l10t_1.uq9_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.k10t_1.n10u(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).oqa = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this.k10t_1, completion);
    i.l10t_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.nqa(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda).x10u = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.x10u(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.w10u_1.v7e().lhn(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).vny = function (db, completion) {
    var i = new SiteEditViewModel$slambda$slambda(completion);
    i.w10u_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.x10u(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_1).thp = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.thp($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).l78 = 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.thp($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.j10u_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.o10v(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation) {
    this.x10v_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_3).z10v = function (it, $completion) {
    var tmp = this.vny(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.z10v(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.y10v_1.w7e().ghs(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.x10v_1, element.fht_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.fht_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.x10v_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.fht_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).vny = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda_3(this.x10v_1, completion);
    i.y10v_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.z10v(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_5).i10w = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).m78 = function ($completion) {
    return this.i10w($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).l78 = 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.i10w($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.j10u_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.o10v(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.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.r10w_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.r10w_1.bqo(this.r10w_1.uqn(), 'siteTermsHtml');
            var tmp_1 = SiteEditViewModel$slambda$slambda$slambda_0(this.r10w_1, null);
            suspendResult = tmp_0.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_40(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.r10w_1, completion);
    i.s10w_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.eht_1;
      var this_0 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      // Inline function 'kotlin.contracts.contract' call
      tmp.hht_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.l10u_1;
    languagesConfig$factory_2();
    return this_0.t2();
  }
  function Companion_199() {
    this.t10w_1 = 'SiteEdit';
    this.u10w_1 = 'siteTermsLang';
    this.v10w_1 = 'termsList';
    this.w10w_1 = 'siteTermsHtml';
  }
  var Companion_instance_248;
  function Companion_getInstance_216() {
    return Companion_instance_248;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_40(function_0) {
    this.x10w_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_40).t1d = function (value, $completion) {
    return this.x10w_1(value, $completion);
  };
  function SiteEditViewModel$slambda(this$0, resultContinuation) {
    this.g10x_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda).jsc = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.h10x_1.p7f();
            var tmp_1 = this.g10x_1.pqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ti0(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).vny = function (db, completion) {
    var i = new SiteEditViewModel$slambda(this.g10x_1, completion);
    i.h10x_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.jsc(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.j10u_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.o10v(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.q10x_1 = this$0;
    this.r10x_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_31.n4r();
            var tmp_1 = SiteEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SiteEditViewModel$slambda$slambda_2(null);
            suspendResult = this.q10x_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, SiteEditViewModel$slambda$lambda(this.q10x_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = ListSerializer(Companion_instance_47.n4r());
            var tmp_4 = listOf_0('termsList');
            var tmp_5 = SiteEditViewModel$slambda$slambda_4(this.r10x_1, null);
            var tmp_6 = SiteEditViewModel$slambda$slambda_6(null);
            suspendResult = this.q10x_1.gqo(tmp_3, tmp_4, 'termsList', tmp_5, tmp_6, SiteEditViewModel$slambda$lambda_0(this.q10x_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            l$ret$1: do {
              var this_0 = this.q10x_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_7 = this.q10x_1.xqn().joj(strings_getInstance().hn3_1);
                var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, SiteEditViewModel$onClickSave$ref(this.q10x_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.s10x_1, VOID, VOID, SiteEditViewModel$slambda$slambda_8(this.q10x_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.q10x_1, this.r10x_1, completion);
    i.s10x_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.eht_1 = $html;
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda_0($prev) {
    return function (it) {
      return it.fht_1 === $prev.m10v_1.eq4_1;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation) {
    this.b10y_1 = this$0;
    this.c10y_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.b10y_1.dqo(this.b10y_1.xqm_1, 'termsList', ListSerializer(Companion_instance_47.n4r()), this.c10y_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.b10y_1, this.c10y_1, completion);
    i.d10y_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.m10y_1 = $commitDelay;
    this.n10y_1 = $entity;
    this.o10y_1 = $this;
    this.p10y_1 = $key;
    this.q10y_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.m10y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.n10y_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.o10y_1.dqo(this.o10y_1.xqm_1, this.p10y_1, this.q10y_1, this.n10y_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.m10y_1, this.n10y_1, this.o10y_1, this.p10y_1, this.q10y_1, completion);
    i.r10y_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.a10z_1 = this$0;
    this.b10z_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.a10z_1.tqn().v7e().nhn(this.b10z_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.a10z_1.tqn().w7e();
            var this_0 = this.a10z_1.j10u_1.t2().h10v_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.eht_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.dht_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.hhs(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.a10z_1.hqt('Community', this.b10z_1.qhn_1, this.b10z_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.a10z_1, this.b10z_1, completion);
    i.c10z_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.j10u_1 = MutableStateFlow(new SiteEditUiState());
    this.k10u_1 = asStateFlow(this.j10u_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.l10u_1 = Instance(this, tmp$ret$0, null).a5d(this, languagesConfig$factory_1());
    this.m10u_1 = null;
    var supportedLangs = _get_languagesConfig__hebcss_0(this).epm_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.eq4_1;
      destination.i1(tmp$ret$2);
    }
    var supportedLangCodes = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp0_title = this.xqn().joj(strings_getInstance().cna_1);
        var nextValue = prevValue.jq6(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.j10u_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.eq4_1 === (tmp0_elvis_lhs == null ? _get_languagesConfig__hebcss_0(this).gpm_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.o10v(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.iqo(tmp_1, true, tmp_2, SiteEditViewModel$slambda_2(this, supportedLangCodes, null));
  }
  protoOf(SiteEditViewModel).d10z = function (uiLang) {
    this.xqm_1.aqj('siteTermsLang', uiLang.eq4_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.j10u_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsLanguage.<anonymous>' call
        var nextValue = prevValue.o10v(VOID, VOID, VOID, VOID, VOID, VOID, uiLang);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SiteEditViewModel).n10u = function (html) {
    var tmp0_elvis_lhs = this.j10u_1.t2().e10z();
    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.j10u_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.o10v(VOID, replace_0(prevValue.h10v_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.h10v_1;
    var tmp1_safe_receiver = this.m10u_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.oqn();
    tmp_1.m10u_1 = launch(tmp_2, VOID, VOID, SiteEditViewModel$onChangeTermsHtml$slambda_0(this, newTerms, null));
  };
  protoOf(SiteEditViewModel).f10z = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.j10u_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.g10v_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vhn_1;
        var nextValue = prevValue.o10v(entity, VOID, VOID, VOID, this.iqu(tmp, entity == null ? null : entity.vhn_1, prevValue.k10v_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_31.n4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_125();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.eqt_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.oqn();
    tmp_0.eqt_1 = launch(tmp_1, VOID, VOID, SiteEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SiteEditViewModel).xs9 = function () {
    var tmp0_elvis_lhs = this.j10u_1.t2().g10v_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.vhn_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.j10u_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.o10v(VOID, VOID, VOID, VOID, this.xqn().joj(strings_getInstance().znl_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    // Inline function 'kotlin.collections.map' call
    var this_2 = this.j10u_1.t2().h10v_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.fht_1;
      var tmp_0 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
      var tmp0_safe_receiver = item.eht_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.xhn_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.j10u_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.o10v(VOID, VOID, VOID, VOID, VOID, this.xqn().joj(strings_getInstance().knm_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if (this.j10u_1.t2().n10v_1)
      return Unit_instance;
    var tmp_2 = this.oqn();
    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.g10v_1 = site;
    this.h10v_1 = siteTerms;
    this.i10v_1 = uiLangs;
    this.j10v_1 = fieldsEnabled;
    this.k10v_1 = siteNameError;
    this.l10v_1 = registrationEnabledError;
    this.m10v_1 = currentSiteTermsLang;
    this.n10v_1 = !(this.k10v_1 == null) ? true : !(this.l10v_1 == null);
  }
  protoOf(SiteEditUiState).e10z = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.h10v_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.fht_1 === this.m10v_1.eq4_1) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  };
  protoOf(SiteEditUiState).g10z = function () {
    var tmp0_safe_receiver = this.e10z();
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eht_1;
  };
  protoOf(SiteEditUiState).h10z = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    return new SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).o10v = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang, $super) {
    site = site === VOID ? this.g10v_1 : site;
    siteTerms = siteTerms === VOID ? this.h10v_1 : siteTerms;
    uiLangs = uiLangs === VOID ? this.i10v_1 : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? this.j10v_1 : fieldsEnabled;
    siteNameError = siteNameError === VOID ? this.k10v_1 : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? this.l10v_1 : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? this.m10v_1 : currentSiteTermsLang;
    return $super === VOID ? this.h10z(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) : $super.h10z.call(this, site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).toString = function () {
    return 'SiteEditUiState(site=' + this.g10v_1 + ', siteTerms=' + this.h10v_1 + ', uiLangs=' + this.i10v_1 + ', fieldsEnabled=' + this.j10v_1 + ', siteNameError=' + this.k10v_1 + ', registrationEnabledError=' + this.l10v_1 + ', currentSiteTermsLang=' + this.m10v_1 + ')';
  };
  protoOf(SiteEditUiState).hashCode = function () {
    var result = this.g10v_1 == null ? 0 : hashCode(this.g10v_1);
    result = imul(result, 31) + hashCode(this.h10v_1) | 0;
    result = imul(result, 31) + hashCode(this.i10v_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.j10v_1) | 0;
    result = imul(result, 31) + (this.k10v_1 == null ? 0 : getStringHashCode(this.k10v_1)) | 0;
    result = imul(result, 31) + (this.l10v_1 == null ? 0 : getStringHashCode(this.l10v_1)) | 0;
    result = imul(result, 31) + this.m10v_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.g10v_1, tmp0_other_with_cast.g10v_1))
      return false;
    if (!equals(this.h10v_1, tmp0_other_with_cast.h10v_1))
      return false;
    if (!equals(this.i10v_1, tmp0_other_with_cast.i10v_1))
      return false;
    if (!(this.j10v_1 === tmp0_other_with_cast.j10v_1))
      return false;
    if (!(this.k10v_1 == tmp0_other_with_cast.k10v_1))
      return false;
    if (!(this.l10v_1 == tmp0_other_with_cast.l10v_1))
      return false;
    if (!this.m10v_1.equals(tmp0_other_with_cast.m10v_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 Companion_200() {
    this.i10z_1 = 'locale';
    this.j10z_1 = 'Terms';
  }
  var Companion_instance_249;
  function Companion_getInstance_217() {
    return Companion_instance_249;
  }
  function _init_$lambda($getLocaleForSiteTermsUseCase$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('getLocaleForSiteTermsUseCase', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $getLocaleForSiteTermsUseCase$delegate.t2();
  }
  function SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation) {
    this.s10z_1 = $acceptButtonMode;
    this.t10z_1 = $apiUrl;
    this.u10z_1 = $di;
    this.v10z_1 = $learningSpace;
    this.w10z_1 = this$0;
    this.x10z_1 = $savedStateHandle;
    this.y10z_1 = $getLocaleForSiteTermsUseCase$delegate;
    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.s10z_1 ? !(this.t10z_1 == null) : false) {
              var this_0 = get_direct(this.u10z_1);
              var context = this.v10z_1;
              var tmp_2 = this_0.f58();
              var tmp_3 = Companion_instance_0;
              var tmp_4 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
              var tmp_5 = tmp_2.c58(tmp_3.h57(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), context)).f58();
              var tmp_6 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
              tmp_1 = tmp_5.d58(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), null).wk2();
            } else {
              tmp_1 = this.w10z_1.tqn();
            }

            tmp_0.a110_1 = tmp_1;
            this.b110_1 = this.x10z_1.ba('locale');
            this.c110_1 = this.b110_1;
            if (this.c110_1 == null) {
              this.hd_1 = 1;
              suspendResult = _init_$lambda(this.y10z_1).jpm(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.d110_1 = this.c110_1;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.d110_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.e110_1 = this.d110_1;
            this.hd_1 = 3;
            suspendResult = this.a110_1.w7e().jhs(this.e110_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.w10z_1.b111_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.g111(displayTerms, this.s10z_1);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            } else {
              l$ret$3: do {
                var this_2 = this.w10z_1.b111_1;
                while (true) {
                  var prevValue_0 = this_2.t2();
                  var nextValue_0 = prevValue_0.g111(VOID, VOID, this.w10z_1.xqn().joj(strings_getInstance().amj_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.s10z_1, this.t10z_1, this.u10z_1, this.v10z_1, this.w10z_1, this.x10z_1, this.y10z_1, completion);
    i.z10z_1 = $this$launch;
    return i;
  };
  function SiteTermsDetailViewModel$slambda_0($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, resultContinuation) {
    var i = new SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, $learningSpace, this$0, $savedStateHandle, $getLocaleForSiteTermsUseCase$delegate, 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.b111_1 = MutableStateFlow(new SiteTermsDetailUiState());
    this.c111_1 = asStateFlow(this.b111_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_116();
    var apiUrl = savedStateHandle.ba('learningSpaceUrl');
    var tmp;
    if (acceptButtonMode ? !(apiUrl == null) : false) {
      tmp = new LearningSpace(apiUrl);
    } else {
      tmp = this.nqn().ioa();
    }
    var learningSpace = tmp;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var trigger = this.d57();
    // 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(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.h57(tmp$ret$0, learningSpace);
    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();
    var getLocaleForSiteTermsUseCase$delegate = Instance(this_0, tmp$ret$3, null).a5d(null, getLocalDelegateReference('getLocaleForSiteTermsUseCase', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.bqn_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_title = this.xqn().joj(strings_getInstance().wn9_1);
        var nextValue = prevValue.jq6(VOID, VOID, tmp1_title, tmp0_navigationVisible, true, VOID, false);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.oqn();
    launch(tmp_3, VOID, VOID, SiteTermsDetailViewModel$slambda_0(acceptButtonMode, apiUrl, di, learningSpace, this, savedStateHandle, getLocaleForSiteTermsUseCase$delegate, null));
  }
  protoOf(SiteTermsDetailViewModel).h111 = function () {
    Companion_getInstance_213();
    // 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.lqo(this_0, Companion_getInstance_213().hr7_1);
    Companion_getInstance_125();
    this.kqo(this_0, 'next');
    var tmp$ret$2 = this_0.f3();
    this.zqm_1.kp6('SignUp', tmp$ret$2);
  };
  function SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error) {
    siteTerms = siteTerms === VOID ? null : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? false : acceptButtonVisible;
    error = error === VOID ? null : error;
    this.d111_1 = siteTerms;
    this.e111_1 = acceptButtonVisible;
    this.f111_1 = error;
  }
  protoOf(SiteTermsDetailUiState).i111 = function (siteTerms, acceptButtonVisible, error) {
    return new SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).g111 = function (siteTerms, acceptButtonVisible, error, $super) {
    siteTerms = siteTerms === VOID ? this.d111_1 : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? this.e111_1 : acceptButtonVisible;
    error = error === VOID ? this.f111_1 : error;
    return $super === VOID ? this.i111(siteTerms, acceptButtonVisible, error) : $super.i111.call(this, siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).toString = function () {
    return 'SiteTermsDetailUiState(siteTerms=' + this.d111_1 + ', acceptButtonVisible=' + this.e111_1 + ', error=' + this.f111_1 + ')';
  };
  protoOf(SiteTermsDetailUiState).hashCode = function () {
    var result = this.d111_1 == null ? 0 : hashCode(this.d111_1);
    result = imul(result, 31) + getBooleanHashCode(this.e111_1) | 0;
    result = imul(result, 31) + (this.f111_1 == null ? 0 : getStringHashCode(this.f111_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.d111_1, tmp0_other_with_cast.d111_1))
      return false;
    if (!(this.e111_1 === tmp0_other_with_cast.e111_1))
      return false;
    if (!(this.f111_1 == tmp0_other_with_cast.f111_1))
      return false;
    return true;
  };
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda$lambda($endpointUrl) {
    return function () {
      return 'LearningSpaceEnterLink: not working: ' + $endpointUrl;
    };
  }
  function _get_httpClient__2ty1zc_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.g112_1;
    httpClient$factory_12();
    return this_0.t2();
  }
  function _get_impl__d88w17_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.h112_1;
    impl$factory_6();
    return this_0.t2();
  }
  function Companion_201() {
    Companion_instance_250 = this;
    this.i112_1 = 'LearningSpaceEnterLink';
    var tmp = this;
    Companion_getInstance_125();
    Companion_getInstance_116();
    Companion_getInstance_125();
    tmp.j112_1 = listOf(['next', 'intMsg', 'noSessionChange']);
    this.k112_1 = 'stateUrl';
  }
  var Companion_instance_250;
  function Companion_getInstance_218() {
    if (Companion_instance_250 == null)
      new Companion_201();
    return Companion_instance_250;
  }
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, $viewName, resultContinuation) {
    this.t112_1 = this$0;
    this.u112_1 = $endpointUrl;
    this.v112_1 = $viewName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LearningSpaceEnterLinkViewModel$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(LearningSpaceEnterLinkViewModel$onClickNext$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LearningSpaceEnterLinkViewModel$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_5(this.t112_1), this.u112_1, VOID, this.t112_1.m4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var site = suspendResult;
            Companion_getInstance_116();
            var tmp_0 = to('learningSpaceUrl', this.u112_1);
            Companion_getInstance_116();
            var this_0 = this.t112_1.m4r();
            var this_1 = this_0.t45();
            var this_2 = serializer(this_1, createKType(getKClass(Site), arrayOf([]), false));
            var args = mutableMapOf([tmp_0, to('site', this_0.r45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), site))]);
            var tmp0_iterator = Companion_getInstance_218().j112_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              this.t112_1.kqo(args, element);
            }

            this.t112_1.zqn(Companion_getInstance_97().rq6_1);
            l$ret$1: do {
              var this_3 = this.t112_1.e112_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.c113(VOID, true, VOID, null, true);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_1;
            if (equals(this.v112_1, 'RegisterAgeRedirect')) {
              tmp_1 = !site.xhn_1;
            } else {
              tmp_1 = false;
            }

            if (tmp_1) {
              this.t112_1.zqn(Companion_getInstance_97().rq6_1);
              l$ret$3: do {
                var this_4 = this.t112_1.e112_1;
                while (true) {
                  var prevValue_0 = this_4.t2();
                  this.t112_1.zqn(Companion_getInstance_97().rq6_1);
                  var tmp0_linkError = _get_impl__d88w17_2(this.t112_1).joj(strings_getInstance().tnq_1);
                  var nextValue_0 = prevValue_0.c113(VOID, true, VOID, tmp0_linkError, true);
                  if (this_4.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              return Unit_instance;
            }

            this.t112_1.zqm_1.kp6(this.v112_1, args);
            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;
              var tmp_3 = Napier_getInstance();
              tmp_3.k5e(e, VOID, LearningSpaceEnterLinkViewModel$onClickNext$slambda$lambda(this.u112_1));
              l$ret$5: do {
                var this_5 = this.t112_1.e112_1;
                while (true) {
                  var prevValue_1 = this_5.t2();
                  this.t112_1.zqn(Companion_getInstance_97().rq6_1);
                  var tmp0_linkError_0 = _get_impl__d88w17_2(this.t112_1).joj(strings_getInstance().xmt_1);
                  var nextValue_1 = prevValue_1.c113(VOID, false, VOID, tmp0_linkError_0, true);
                  if (this_5.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               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(LearningSpaceEnterLinkViewModel$onClickNext$slambda).v1m = function ($this$launch, completion) {
    var i = new LearningSpaceEnterLinkViewModel$onClickNext$slambda(this.t112_1, this.u112_1, this.v112_1, completion);
    i.w112_1 = $this$launch;
    return i;
  };
  function LearningSpaceEnterLinkViewModel$onClickNext$slambda_0(this$0, $endpointUrl, $viewName, resultContinuation) {
    var i = new LearningSpaceEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, $viewName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LearningSpaceEnterLinkViewModel(di, savedStateHandle) {
    Companion_getInstance_218();
    UstadViewModel.call(this, di, savedStateHandle, 'LearningSpaceEnterLink');
    this.e112_1 = MutableStateFlow(new LearningSpaceEnterLinkUiState());
    this.f112_1 = asStateFlow(this.e112_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.g112_1 = Instance(this, tmp$ret$0, null).a5d(this, httpClient$factory_11());
    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.h112_1 = Instance(this, tmp$ret$2, null).a5d(this, impl$factory_5());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_2(this).joj(strings_getInstance().unc_1);
        var nextValue = prevValue.jq6(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.e112_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba(Companion_getInstance_218().k112_1);
        var nextValue_0 = prevValue_0.c113(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(LearningSpaceEnterLinkViewModel).lwk = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.e112_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onClickNext.<anonymous>' call
        var nextValue = prevValue.c113(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp;
    Companion_getInstance_213();
    if (this.xqm_1.ba('newOrExisting') === 'new') {
      tmp = 'RegisterAgeRedirect';
    } else {
      tmp = 'Login';
    }
    var viewName = tmp;
    this.zqn(Companion_getInstance_97().qq6_1);
    var endpointUrl = requirePostfix(requireHttpPrefix(this.e112_1.t2().x112_1), '/');
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, LearningSpaceEnterLinkViewModel$onClickNext$slambda_0(this, endpointUrl, viewName, null));
  };
  protoOf(LearningSpaceEnterLinkViewModel).d113 = function (siteLink) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.e112_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.LearningSpaceEnterLinkViewModel.onSiteLinkUpdated.<anonymous>' call
        var nextValue = prevValue.c113(siteLink);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.xqm_1.aqj(Companion_getInstance_218().k112_1, siteLink);
  };
  function LearningSpaceEnterLinkUiState(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.x112_1 = siteLink;
    this.y112_1 = validLink;
    this.z112_1 = progressVisible;
    this.a113_1 = linkError;
    this.b113_1 = fieldsEnabled;
  }
  protoOf(LearningSpaceEnterLinkUiState).e113 = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    return new LearningSpaceEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).c113 = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled, $super) {
    siteLink = siteLink === VOID ? this.x112_1 : siteLink;
    validLink = validLink === VOID ? this.y112_1 : validLink;
    progressVisible = progressVisible === VOID ? this.z112_1 : progressVisible;
    linkError = linkError === VOID ? this.a113_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.b113_1 : fieldsEnabled;
    return $super === VOID ? this.e113(siteLink, validLink, progressVisible, linkError, fieldsEnabled) : $super.e113.call(this, siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(LearningSpaceEnterLinkUiState).toString = function () {
    return 'LearningSpaceEnterLinkUiState(siteLink=' + this.x112_1 + ', validLink=' + this.y112_1 + ', progressVisible=' + this.z112_1 + ', linkError=' + this.a113_1 + ', fieldsEnabled=' + this.b113_1 + ')';
  };
  protoOf(LearningSpaceEnterLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.x112_1);
    result = imul(result, 31) + getBooleanHashCode(this.y112_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.z112_1) | 0;
    result = imul(result, 31) + (this.a113_1 == null ? 0 : getStringHashCode(this.a113_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.b113_1) | 0;
    return result;
  };
  protoOf(LearningSpaceEnterLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LearningSpaceEnterLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LearningSpaceEnterLinkUiState ? other : THROW_CCE();
    if (!(this.x112_1 === tmp0_other_with_cast.x112_1))
      return false;
    if (!(this.y112_1 === tmp0_other_with_cast.y112_1))
      return false;
    if (!(this.z112_1 === tmp0_other_with_cast.z112_1))
      return false;
    if (!(this.a113_1 == tmp0_other_with_cast.a113_1))
      return false;
    if (!(this.b113_1 === tmp0_other_with_cast.b113_1))
      return false;
    return true;
  };
  function httpClient$factory_11() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function impl$factory_5() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_2(receiver);
    }, null);
  }
  function httpClient$factory_12() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function impl$factory_6() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_2(receiver);
    }, null);
  }
  function SystemPermissionConstants() {
    SystemPermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().gno_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1024, 0));
    var tmp_2 = strings_getInstance().hno_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().ino_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(32768, 0));
    var tmp_6 = strings_getInstance().nno_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(131072, 0));
    var tmp_8 = strings_getInstance().mno_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(4096, 0));
    var tmp_10 = strings_getInstance().lno_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(512, 0));
    var tmp_12 = strings_getInstance().znn_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(1, 0));
    var tmp_14 = strings_getInstance().ano_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(2, 0));
    var tmp_16 = strings_getInstance().bno_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(4, 0));
    var tmp_18 = strings_getInstance().wnn_1;
    PermissionFlags_getInstance();
    var tmp_19 = to(tmp_18, new Long(2048, 0));
    var tmp_20 = strings_getInstance().cno_1;
    PermissionFlags_getInstance();
    var tmp_21 = to(tmp_20, new Long(8, 0));
    var tmp_22 = strings_getInstance().dno_1;
    PermissionFlags_getInstance();
    var tmp_23 = to(tmp_22, new Long(16, 0));
    var tmp_24 = strings_getInstance().eno_1;
    PermissionFlags_getInstance();
    var tmp_25 = to(tmp_24, new Long(32, 0));
    var tmp_26 = strings_getInstance().fno_1;
    PermissionFlags_getInstance();
    var tmp_27 = to(tmp_26, new Long(64, 0));
    var tmp_28 = strings_getInstance().jno_1;
    PermissionFlags_getInstance();
    var tmp_29 = to(tmp_28, new Long(128, 0));
    var tmp_30 = strings_getInstance().kno_1;
    PermissionFlags_getInstance();
    tmp.f113_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.ui0(accountPersonUid, new Long(-1, 2147483647));
    }
    return tmp;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).q113 = function (entity, hasViewPermission, $completion) {
    var tmp = this.r113(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.q113(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.o113_1;
          var tmp_0;
          if (this.p113_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).r113 = function (entity, hasViewPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.o113_1 = entity;
    i.p113_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.q113(entity, hasViewPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.a114_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).c114 = function (it, $completion) {
    var tmp = this.d114(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.c114((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.a114_1.b115_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.b114_1 == null)) {
                  tmp_0 = SystemPermissionConstants_getInstance().f113_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.f115(this.b114_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (!(this.b114_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.a114_1.tqn().n7d().rg4(this.a114_1.a115_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.a114_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.jq6(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).d114 = function (it, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.a114_1, completion);
    i.b114_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.c114(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.o115_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).iqf = function (hasEditPermission, $completion) {
    var tmp = this.jqf(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.iqf((!(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.o115_1.bqn_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.jq6(prevValue.uq5_1.pq6(this.p115_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).jqf = function (hasEditPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this.o115_1, completion);
    i.p115_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.iqf(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    this.y115_1 = $entityFlow;
    this.z115_1 = $viewPermissionFlow;
    this.a116_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.y115_1, this.z115_1, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            suspendResult = collectLatest(tmp_0, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.a116_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.y115_1, this.z115_1, this.a116_1, completion);
    i.b116_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.k116_1 = $editPermissionFlow;
    this.l116_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.l116_1, null);
            suspendResult = this.k116_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_41(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.k116_1, this.l116_1, completion);
    i.m116_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.v116_1 = $this_launch;
    this.w116_1 = $entityFlow;
    this.x116_1 = $viewPermissionFlow;
    this.y116_1 = this$0;
    this.z116_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).m78 = function ($completion) {
    return this.j87($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.v116_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_0(this.w116_1, this.x116_1, this.y116_1, null));
          launch(this.v116_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_2(this.z116_1, this.y116_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).l78 = function (completion) {
    return new SystemPermissionDetailViewModel$slambda$slambda(this.v116_1, this.w116_1, this.x116_1, this.y116_1, this.z116_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.j87($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_125();
    $this.kqo(this_0, 'personUid');
    var tmp$ret$2 = this_0.f3();
    $this.zqm_1.kp6('SystemPermissionEdit', tmp$ret$2);
  }
  function Companion_202() {
    this.a117_1 = 'SystemPermission';
  }
  var Companion_instance_251;
  function Companion_getInstance_219() {
    return Companion_instance_251;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_41(function_0) {
    this.b117_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_41).t1d = function (value, $completion) {
    return this.b117_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.k117_1 = this$0;
    this.l117_1 = $entityFlow;
    this.m117_1 = $viewPermissionFlow;
    this.n117_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.k117_1.b115_1, SystemPermissionDetailViewModel$slambda$slambda_0(this.o117_1, this.l117_1, this.m117_1, this.k117_1, this.n117_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.k117_1, this.l117_1, this.m117_1, this.n117_1, completion);
    i.o117_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_125();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.a115_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.b115_1 = MutableStateFlow(new SystemPermissionDetailUiState());
    this.c115_1 = asStateFlow(this.b115_1);
    var entityFlow = this.tqn().p7f().ri0(this.a115_1);
    var viewPermissionFlow = personHasSystemPermissionAsFlowForUser(this.tqn().p7f(), this.pqn(), this.a115_1);
    var tmp_0 = this.tqn().p7f();
    var tmp_1 = this.pqn();
    PermissionFlags_getInstance();
    var editPermissionFlow = tmp_0.ui0(tmp_1, new Long(4096, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.<anonymous>' call
        var tmp0_text = this.xqn().joj(strings_getInstance().tmv_1);
        var tmp1_onClick = SystemPermissionDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.jq6(new FabUiState(VOID, tmp0_text, tmp2_icon, tmp1_onClick));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.oqn();
    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.d115_1 = systemPermission;
    this.e115_1 = permissionLabels;
  }
  protoOf(SystemPermissionDetailUiState).f115 = function (systemPermission, permissionLabels) {
    return new SystemPermissionDetailUiState(systemPermission, permissionLabels);
  };
  protoOf(SystemPermissionDetailUiState).toString = function () {
    return 'SystemPermissionDetailUiState(systemPermission=' + this.d115_1 + ', permissionLabels=' + this.e115_1 + ')';
  };
  protoOf(SystemPermissionDetailUiState).hashCode = function () {
    var result = this.d115_1 == null ? 0 : this.d115_1.hashCode();
    result = imul(result, 31) + hashCode(this.e115_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.d115_1, tmp0_other_with_cast.d115_1))
      return false;
    if (!equals(this.e115_1, tmp0_other_with_cast.e115_1))
      return false;
    return true;
  };
  function SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.x117_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda).z117 = function (db, $completion) {
    var tmp = this.vny(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.z117(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.y117_1.p7f().si0(this.x117_1.z118_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).vny = function (db, completion) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this.x117_1, completion);
    i.y117_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.z117(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).ei4 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).m78 = function ($completion) {
    return this.ei4($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).l78 = 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.ei4($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.x118_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().f113_1;
          } else {
            tmp = emptyList();
          }
          var nextValue = prevValue.l119(it, VOID, tmp);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.xs9();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.u119_1 = this$0;
    this.v119_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.u119_1.tqn().p7f().yi0(this.v119_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).vny = function (it, completion) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this.u119_1, this.v119_1, completion);
    i.w119_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_203() {
    this.x119_1 = 'SystemPermissionEdit';
  }
  var Companion_instance_252;
  function Companion_getInstance_220() {
    return Companion_instance_252;
  }
  function SystemPermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.g11a_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda).jsc = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.jsc(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.g11a_1.tqn().p7f();
            var tmp_1 = this.g11a_1.pqn();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.ti0(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).vny = function (it, completion) {
    var i = new SystemPermissionEditViewModel$slambda(this.g11a_1, completion);
    i.h11a_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.jsc(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.x118_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.l119(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation) {
    this.q11a_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().n4r();
            var tmp_1 = SystemPermissionEditViewModel$slambda$slambda_0(this.q11a_1, null);
            var tmp_2 = SystemPermissionEditViewModel$slambda$slambda_2(null);
            suspendResult = this.q11a_1.hqo(tmp_0, VOID, VOID, tmp_1, tmp_2, SystemPermissionEditViewModel$slambda$lambda(this.q11a_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.q11a_1.bqn_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.q11a_1.xqn().joj(strings_getInstance().hn3_1);
                var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, SystemPermissionEditViewModel$onClickSave$ref(this.q11a_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.q11a_1.tqn().n7d().rg4(this.q11a_1.z118_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.q11a_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.jq6(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.q11a_1, completion);
    i.r11a_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.x118_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.l119(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.a11b_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).m78 = function ($completion) {
    return this.j87($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.a11b_1.x118_1.t2().i119_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.b11b_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.a11b_1.tqn();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this.a11b_1, this.b11b_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_116();
            this.a11b_1.zqm_1.jq9('', 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).l78 = function (completion) {
    return new SystemPermissionEditViewModel$onClickSave$slambda(this.a11b_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.j87($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SystemPermissionEdit');
    this.x118_1 = MutableStateFlow(new SystemPermissionEditUiState());
    this.y118_1 = asStateFlow(this.x118_1);
    var tmp = this;
    Companion_getInstance_125();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.z118_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.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(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.jqo(tmp_0, VOID, tmp_1, SystemPermissionEditViewModel$slambda_2(this, null));
  }
  protoOf(SystemPermissionEditViewModel).xt6 = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.x118_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.i119_1;
        var nextValue = prevValue.l119(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bky(VOID, VOID, VOID, toggleFlag(prevValue.i119_1.qi1_1, flag)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SystemPermissionEditViewModel).xs9 = function () {
    var tmp = SystemPermissionEditViewModel$onClickSave$lambda(this);
    this.kqu(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.i119_1 = entity;
    this.j119_1 = fieldsEnabled;
    this.k119_1 = permissionLabels;
  }
  protoOf(SystemPermissionEditUiState).c11b = function (entity, fieldsEnabled, permissionLabels) {
    return new SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).l119 = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.i119_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.j119_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.k119_1 : permissionLabels;
    return $super === VOID ? this.c11b(entity, fieldsEnabled, permissionLabels) : $super.c11b.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).toString = function () {
    return 'SystemPermissionEditUiState(entity=' + this.i119_1 + ', fieldsEnabled=' + this.j119_1 + ', permissionLabels=' + this.k119_1 + ')';
  };
  protoOf(SystemPermissionEditUiState).hashCode = function () {
    var result = this.i119_1 == null ? 0 : this.i119_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.j119_1) | 0;
    result = imul(result, 31) + hashCode(this.k119_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.i119_1, tmp0_other_with_cast.i119_1))
      return false;
    if (!(this.j119_1 === tmp0_other_with_cast.j119_1))
      return false;
    if (!equals(this.k119_1, tmp0_other_with_cast.k119_1))
      return false;
    return true;
  };
  function TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.l11b_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda$slambda).n11b = 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.n11b((!(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.l11b_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.l11b_1, completion);
    i.m11b_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.n11b($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation) {
    this.w11b_1 = $searchText;
    this.x11b_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).n11b = 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.n11b((!(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.w11b_1;
          var searchWords = Regex_init_$Create$('\\s+').y9(this_0, 0);
          var this_1 = _get_allTimeZones__4t4mtu(this.x11b_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.ymg(), 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.w11b_1, this.x11b_1, completion);
    i.y11b_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.n11b($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_allTimeZones__4t4mtu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.z11c_1;
    allTimeZones$factory();
    return this_0.t2();
  }
  function Companion_204() {
    this.b11d_1 = 'TimeZoneList';
  }
  var Companion_instance_253;
  function Companion_getInstance_221() {
    return Companion_instance_253;
  }
  function sam$kotlin_Comparator$0_3(function_0) {
    this.c11d_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_3).pa = function (a, b) {
    return this.c11d_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.ymd();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = Companion_getInstance_9().ymh();
    // 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().vmg(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).cmi();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$1 = offsetAt(b, $now).cmi();
      return compareValues(tmp, tmp$ret$1);
    };
  }
  function TimeZoneListViewModel$slambda(this$0, resultContinuation) {
    this.l11d_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.l11d_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.l11d_1.sqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.o11d(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.l11d_1, completion);
    i.m11d_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.x11d_1 = this$0;
    this.y11d_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.y11d_1, this.x11d_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.x11d_1.sqv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.o11d(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.x11d_1, this.y11d_1, completion);
    i.z11d_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.z11c_1 = lazy_0(TimeZoneListViewModel$allTimeZones$delegate$lambda);
    this.a11d_1 = null;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, this.xqn().joj(strings_getInstance().ln3_1), VOID, VOID, VOID, VOID, this.bqx());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.oqn();
    launch(tmp_0, VOID, VOID, TimeZoneListViewModel$slambda_0(this, null));
  }
  protoOf(TimeZoneListViewModel).mqw = function (searchText) {
    var tmp0_safe_receiver = this.a11d_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.oqn();
    tmp.a11d_1 = launch(tmp_0, VOID, VOID, TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this, searchText, null));
  };
  protoOf(TimeZoneListViewModel).a11e = function (entry) {
    this.iqt(entry.ymg());
  };
  protoOf(TimeZoneListViewModel).nqw = function () {
  };
  function TimezoneListUiState(timeZoneList) {
    timeZoneList = timeZoneList === VOID ? emptyList() : timeZoneList;
    this.n11d_1 = timeZoneList;
  }
  protoOf(TimezoneListUiState).o11d = function (timeZoneList) {
    return new TimezoneListUiState(timeZoneList);
  };
  protoOf(TimezoneListUiState).toString = function () {
    return 'TimezoneListUiState(timeZoneList=' + this.n11d_1 + ')';
  };
  protoOf(TimezoneListUiState).hashCode = function () {
    return hashCode(this.n11d_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.n11d_1, tmp0_other_with_cast.n11d_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.j11e_1 = this$0;
    this.k11e_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.m11e_1 = this.j11e_1.m4r();
            var tmp_1 = this;
            tmp_1.n11e_1 = _get_httpClient__2ty1zc_6(this.j11e_1);
            var tmp_2 = this;
            tmp_2.o11e_1 = ensureNotNull(this.k11e_1.pax_1);
            var tmp_3 = this;
            tmp_3.p11e_1 = this.n11e_1;
            var tmp_4 = this;
            tmp_4.q11e_1 = this.p11e_1;
            var tmp_5 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.o11e_1);
            tmp_5.r11e_1 = this_0;
            this.r11e_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_6 = this;
            tmp_6.s11e_1 = this.q11e_1;
            var tmp_7 = this;
            tmp_7.t11e_1 = this.r11e_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.t11e_1, this.s11e_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.v11e_1 = suspendResult;
            var tmp_8 = this;
            var this_1 = this.m11e_1.t45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_8.w11e_1 = this.m11e_1.s45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.v11e_1);
            this.x11e_1 = requireBodyUrlForUri(this.w11e_1, ensureNotNull(this.k11e_1.nax_1));
            var tmp_9 = this;
            tmp_9.y11e_1 = this.j11e_1.m4r();
            var tmp_10 = this;
            tmp_10.z11e_1 = _get_httpClient__2ty1zc_6(this.j11e_1);
            var tmp_11 = this;
            tmp_11.a11f_1 = this.x11e_1;
            var tmp_12 = this;
            tmp_12.b11f_1 = this.z11e_1;
            var tmp_13 = this;
            tmp_13.c11f_1 = this.b11f_1;
            var tmp_14 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.a11f_1);
            tmp_14.d11f_1 = this_3;
            this.d11f_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_15 = this;
            tmp_15.e11f_1 = this.c11f_1;
            var tmp_16 = this;
            tmp_16.f11f_1 = this.d11f_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.f11f_1, this.e11f_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 4:
            var string = suspendResult;
            var this_4 = this.y11e_1.t45();
            var this_5 = serializer(this_4, createKType(getKClass(MediaContentInfo), arrayOf([]), false));
            var mediaInfo = this.y11e_1.s45(isInterface(this_5, KSerializer) ? this_5 : THROW_CCE(), string);
            l$ret$1: do {
              var this_6 = this.j11e_1.i11g_1;
              while (true) {
                var prevValue = this_6.t2();
                var tmp0_contentEntryVersionUid = this.j11e_1.h11g_1;
                var tmp1_learningSpace = this.j11e_1.nqn().ioa();
                var tmp2_manifestUrl = ensureNotNull(this.k11e_1.pax_1);
                var tmp3_contentManifestMap = new ContentManifestMap(this.w11e_1);
                var nextValue = prevValue.t11g(mediaInfo, tmp0_contentEntryVersionUid, tmp1_learningSpace, VOID, tmp2_manifestUrl, tmp3_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.j11e_1, this.k11e_1, completion);
    i.l11e_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.c11h_1 = this$0;
    this.d11h_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.c11h_1.tqn().v7d().rau(this.d11h_1.max_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var contentEntry = suspendResult;
            l$ret$1: do {
              var this_0 = this.c11h_1.i11g_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.t11g(VOID, VOID, 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.c11h_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = contentEntry == null ? null : contentEntry.oav_1;
                var nextValue_0 = prevValue_0.jq6(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.c11h_1, this.d11h_1, completion);
    i.e11h_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.f11h_1 = timestamp;
    this.g11h_1 = timeInMillis;
    this.h11h_1 = totalDuration;
    this.i11h_1 = resumed;
  }
  protoOf(MediaPlayState).j11h = function () {
    var tmp;
    if (this.h11h_1.c7(new Long(0, 0)) > 0) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.g11h_1.cb(toLong(100)).bb(this.h11h_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(MediaPlayState).toString = function () {
    return 'MediaPlayState(timestamp=' + this.f11h_1.toString() + ', timeInMillis=' + this.g11h_1.toString() + ', totalDuration=' + this.h11h_1.toString() + ', resumed=' + this.i11h_1 + ')';
  };
  protoOf(MediaPlayState).hashCode = function () {
    var result = this.f11h_1.hashCode();
    result = imul(result, 31) + this.g11h_1.hashCode() | 0;
    result = imul(result, 31) + this.h11h_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.i11h_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.f11h_1.equals(tmp0_other_with_cast.f11h_1))
      return false;
    if (!this.g11h_1.equals(tmp0_other_with_cast.g11h_1))
      return false;
    if (!this.h11h_1.equals(tmp0_other_with_cast.h11h_1))
      return false;
    if (!(this.i11h_1 === tmp0_other_with_cast.i11h_1))
      return false;
    return true;
  };
  function _get_httpClient__2ty1zc_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.k11g_1;
    httpClient$factory_14();
    return this_0.t2();
  }
  function Companion_205() {
    this.k11h_1 = 'Video';
  }
  var Companion_instance_254;
  function Companion_getInstance_222() {
    return Companion_instance_254;
  }
  function VideoContentViewModel$slambda(this$0, resultContinuation) {
    this.t11h_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.t11h_1.tqn().i7f().fbq(this.t11h_1.h11g_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.u11h_1, VOID, VOID, VideoContentViewModel$slambda$slambda_0(this.t11h_1, contentEntryVersion, null));
            launch(this.u11h_1, VOID, VOID, VideoContentViewModel$slambda$slambda_2(this.t11h_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.t11h_1, completion);
    i.u11h_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.g11g_1 = MutableStateFlow(new MediaPlayState());
    var tmp = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.h11g_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.i11g_1 = MutableStateFlow(new VideoContentUiState());
    this.j11g_1 = asStateFlow(this.i11g_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.k11g_1 = Instance(this, tmp$ret$0, null).a5d(this, httpClient$factory_13());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bqn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<anonymous>' call
        var nextValue = prevValue.jq6(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.oqn();
    launch(tmp_2, VOID, VOID, VideoContentViewModel$slambda_0(this, null));
  }
  protoOf(VideoContentViewModel).nyc = function () {
    var tmp0_safe_receiver = this.i11g_1.t2().r11g_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.oav_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).v11h = function (playState) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.g11g_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.i11h_1 === playState.i11h_1)) {
      this.pq2(playState.i11h_1);
    }
    this.cq3(playState.j11h());
  };
  function VideoContentUiState(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    mediaContentInfo = mediaContentInfo === VOID ? null : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    learningSpace = learningSpace === VOID ? null : learningSpace;
    mediaSrc = mediaSrc === VOID ? null : mediaSrc;
    manifestUrl = manifestUrl === VOID ? null : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? null : contentManifestMap;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    this.l11g_1 = mediaContentInfo;
    this.m11g_1 = contentEntryVersionUid;
    this.n11g_1 = learningSpace;
    this.o11g_1 = mediaSrc;
    this.p11g_1 = manifestUrl;
    this.q11g_1 = contentManifestMap;
    this.r11g_1 = contentEntry;
    this.s11g_1 = isFullScreen;
  }
  protoOf(VideoContentUiState).w11h = function (mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    return new VideoContentUiState(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).t11g = function (mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen, $super) {
    mediaContentInfo = mediaContentInfo === VOID ? this.l11g_1 : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.m11g_1 : contentEntryVersionUid;
    learningSpace = learningSpace === VOID ? this.n11g_1 : learningSpace;
    mediaSrc = mediaSrc === VOID ? this.o11g_1 : mediaSrc;
    manifestUrl = manifestUrl === VOID ? this.p11g_1 : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? this.q11g_1 : contentManifestMap;
    contentEntry = contentEntry === VOID ? this.r11g_1 : contentEntry;
    isFullScreen = isFullScreen === VOID ? this.s11g_1 : isFullScreen;
    return $super === VOID ? this.w11h(mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen) : $super.w11h.call(this, mediaContentInfo, contentEntryVersionUid, learningSpace, mediaSrc, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).toString = function () {
    return 'VideoContentUiState(mediaContentInfo=' + this.l11g_1 + ', contentEntryVersionUid=' + this.m11g_1.toString() + ', learningSpace=' + this.n11g_1 + ', mediaSrc=' + this.o11g_1 + ', manifestUrl=' + this.p11g_1 + ', contentManifestMap=' + this.q11g_1 + ', contentEntry=' + this.r11g_1 + ', isFullScreen=' + this.s11g_1 + ')';
  };
  protoOf(VideoContentUiState).hashCode = function () {
    var result = this.l11g_1 == null ? 0 : hashCode(this.l11g_1);
    result = imul(result, 31) + this.m11g_1.hashCode() | 0;
    result = imul(result, 31) + (this.n11g_1 == null ? 0 : this.n11g_1.hashCode()) | 0;
    result = imul(result, 31) + (this.o11g_1 == null ? 0 : getStringHashCode(this.o11g_1)) | 0;
    result = imul(result, 31) + (this.p11g_1 == null ? 0 : getStringHashCode(this.p11g_1)) | 0;
    result = imul(result, 31) + (this.q11g_1 == null ? 0 : this.q11g_1.hashCode()) | 0;
    result = imul(result, 31) + (this.r11g_1 == null ? 0 : this.r11g_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.s11g_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.l11g_1, tmp0_other_with_cast.l11g_1))
      return false;
    if (!this.m11g_1.equals(tmp0_other_with_cast.m11g_1))
      return false;
    if (!equals(this.n11g_1, tmp0_other_with_cast.n11g_1))
      return false;
    if (!(this.o11g_1 == tmp0_other_with_cast.o11g_1))
      return false;
    if (!(this.p11g_1 == tmp0_other_with_cast.p11g_1))
      return false;
    if (!equals(this.q11g_1, tmp0_other_with_cast.q11g_1))
      return false;
    if (!equals(this.r11g_1, tmp0_other_with_cast.r11g_1))
      return false;
    if (!(this.s11g_1 === tmp0_other_with_cast.s11g_1))
      return false;
    return true;
  };
  function httpClient$factory_13() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function httpClient$factory_14() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function _get_resolveXapiLaunchHrefUseCase__8u4pj4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.s11i_1;
    resolveXapiLaunchHrefUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_206() {
    this.w11i_1 = 'XapiContent';
  }
  var Companion_instance_255;
  function Companion_getInstance_223() {
    return Companion_instance_255;
  }
  function XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.f11j_1 = this$0;
    this.g11j_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.f11j_1);
            Companion_getInstance_125();
            var tmp0_safe_receiver = this.g11j_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_125();
            var tmp2_safe_receiver = this.g11j_1.ba('courseBlockUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            suspendResult = tmp_0.up9(this.f11j_1.t11i_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.f11j_1.u11i_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.k11j(launchHrefResult.np6_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.f11j_1.bqn_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jq6(VOID, VOID, launchHrefResult.pp6_1.ip9_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().q5e('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.f11j_1, this.g11j_1, completion);
    i.h11j_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 = onActiveLearningSpace(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.s11i_1 = Instance(this_0, tmp$ret$0, null).a5d(this, resolveXapiLaunchHrefUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_116();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_1.t11i_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.u11i_1 = MutableStateFlow(new XapiContentUiState(VOID, this.t11i_1));
    this.v11i_1 = asStateFlow(this.u11i_1);
    var tmp_2 = this.oqn();
    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.i11j_1 = url;
    this.j11j_1 = contentEntryVersionUid;
  }
  protoOf(XapiContentUiState).l11j = function (url, contentEntryVersionUid) {
    return new XapiContentUiState(url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).k11j = function (url, contentEntryVersionUid, $super) {
    url = url === VOID ? this.i11j_1 : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.j11j_1 : contentEntryVersionUid;
    return $super === VOID ? this.l11j(url, contentEntryVersionUid) : $super.l11j.call(this, url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).toString = function () {
    return 'XapiContentUiState(url=' + this.i11j_1 + ', contentEntryVersionUid=' + this.j11j_1.toString() + ')';
  };
  protoOf(XapiContentUiState).hashCode = function () {
    var result = this.i11j_1 == null ? 0 : getStringHashCode(this.i11j_1);
    result = imul(result, 31) + this.j11j_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.i11j_1 == tmp0_other_with_cast.i11j_1))
      return false;
    if (!this.j11j_1.equals(tmp0_other_with_cast.j11j_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$79(_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$81(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $encryptPbkdf2COROUTINE$79(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.u11j_1 = _this__u8e3s4;
    this.v11j_1 = password;
  }
  protoOf($encryptPbkdf2COROUTINE$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;
            var tmp_1 = get_direct(this.u11j_1.cnt_1).f58();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.w11j_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.x11j_1 = this.w11j_1;
            var tmp_4 = this;
            tmp_4.y11j_1 = this.u11j_1.bnt_1.tnt_1 + 'api/pbkdf2/encryptPbkdf2';
            var tmp_5 = this;
            tmp_5.z11j_1 = this.x11j_1;
            var tmp_6 = this;
            tmp_6.a11k_1 = this.z11j_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.y11j_1);
            parameter(this_0, 'secret', this.v11j_1);
            tmp_7.b11k_1 = this_0;
            this.b11k_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.c11k_1 = this.a11k_1;
            var tmp_9 = this;
            tmp_9.d11k_1 = this.b11k_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.d11k_1, this.c11k_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.e11k_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.e11k_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$81(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.n11k_1 = _this__u8e3s4;
    this.o11k_1 = password;
  }
  protoOf($doublePbkdf2HashAsBase64COROUTINE$81).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.n11k_1.cnt_1).f58();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.p11k_1 = tmp_1.d58(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.q11k_1 = this.p11k_1;
            var tmp_4 = this;
            tmp_4.r11k_1 = this.n11k_1.bnt_1.tnt_1 + 'api/pbkdf2/doubleEncryptPbkdf2';
            var tmp_5 = this;
            tmp_5.s11k_1 = this.q11k_1;
            var tmp_6 = this;
            tmp_6.t11k_1 = this.s11k_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.r11k_1);
            parameter(this_0, 'secret', this.o11k_1);
            tmp_7.u11k_1 = this_0;
            this.u11k_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_8 = this;
            tmp_8.v11k_1 = this.t11k_1;
            var tmp_9 = this;
            tmp_9.w11k_1 = this.u11k_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.w11k_1, this.v11k_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.x11k_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.x11k_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_116();
    if (_this__u8e3s4 === '') {
      tmp = get_ustadViewName(this$0.z11k_1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function NavHostFunction(navigateFn, location, onHideChildren) {
    this.y11k_1 = navigateFn;
    this.z11k_1 = location;
    this.a11l_1 = onHideChildren;
  }
  protoOf(NavHostFunction).b11l = function (cmd) {
    if (cmd instanceof NavigateNavCommand) {
      var tmp1_safe_receiver = cmd.oq9_1.aq4_1;
      var popUpToView = tmp1_safe_receiver == null ? null : invoke$effectivePopUpTo(tmp1_safe_receiver, this);
      if ((popUpToView == null ? true : popUpToView === get_ustadViewName(this.z11k_1)) ? !cmd.oq9_1.cq4_1 ? true : this.z11k_1.key === get_firstLocationKey() : false) {
        Napier_getInstance().i5e('NavHostFunction: go to /' + cmd.mq9_1 + '?' + toUrlQueryString(cmd.nq9_1));
        var replaceNav = (popUpToView === get_ustadViewName(this.z11k_1) ? cmd.oq9_1.bq4_1 : false) ? true : cmd.oq9_1.cq4_1;
        var tmp = '/' + cmd.mq9_1 + '?' + toUrlQueryString(cmd.nq9_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.z11k_1);
        this.y11k_1(tmp, this_0);
      } else {
        Napier_getInstance().i5e('NavHostFunction: pop, then go /' + cmd.mq9_1 + '?' + toUrlQueryString(cmd.nq9_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.oq9_1.cq4_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerPopUpToInc'] = cmd.oq9_1.bq4_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerGoToAfterPop'] = '/' + cmd.mq9_1 + '?' + toUrlQueryString(cmd.nq9_1);
        this.a11l_1();
        this.y11k_1(-1);
      }
    } else {
      if (cmd instanceof PopNavCommand) {
        var popUpTo = invoke$effectivePopUpTo(cmd.qq9_1, this);
        if (popUpTo === get_ustadViewName(this.z11k_1) ? cmd.rq9_1 : false) {
          Napier_getInstance().i5e('NavHostFunction: pop to current viewname ' + popUpTo + ' (inclusive) ' + 'e.g. go back one');
          this.y11k_1(-1);
        } else if (!(popUpTo === get_ustadViewName(this.z11k_1))) {
          Napier_getInstance().i5e('NavHostFunction: pop to ' + popUpTo + ' inclusive = ' + cmd.rq9_1);
          sessionStorage.removeItem('navHostHitPopupto');
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = cmd.qq9_1;
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpToInc'] = cmd.rq9_1.toString();
          this.a11l_1();
          this.y11k_1(-1);
        } else {
          Napier_getInstance().i5e('NavHostFunction: pop up to current viewname, inclusive = false?? Nothing to do.');
        }
      } else {
        Napier_getInstance().i5e('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($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_0($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_0($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_1($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_2($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_1($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().c5e('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().c5e('NavHost: action: no pop or other operation pending, show children');
        invoke$lambda_0($showChildren$delegate, true);
        tmp_1 = Unit_instance;
      } else if (popupToTarget === get_ustadViewName($location) ? popUpToInclusive : false) {
        Napier_getInstance().c5e('NavHost: action: reached popUpTo destination, popUpToInclusive is set, pop once more');
        invoke$lambda_0($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_2($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
          tmp_2 = Unit_instance;
        }
        tmp_1 = tmp_2;
      } else if (popupToTarget === get_ustadViewName($location) ? true : popUpToHitDestination) {
        Napier_getInstance().c5e('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_0($showChildren$delegate, true);
          tmp_3 = Unit_instance;
        }
        tmp_1 = tmp_3;
      } else if ((clearStack ? $location.key === get_firstLocationKey() : false) ? !clearStackHitPlaceholder : false) {
        Napier_getInstance().c5e('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().c5e('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().c5e('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().c5e('NavHost: action: need to continue history popping');
        invoke$lambda_0($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_2($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
        tmp_1 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation) {
    this.k11l_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().c5e('NavHost: action: clearStackTimeout: apparently at the end of history. go to clearstack');
            sessionStorage['navControllerClearStack'] = 'true';
            this.k11l_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.k11l_1, completion);
    i.l11l_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($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$82(_this__u8e3s4, activeUserPersonUid, personUid, username, newPassword, currentPassword, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.u11l_1 = _this__u8e3s4;
    this.v11l_1 = activeUserPersonUid;
    this.w11l_1 = personUid;
    this.x11l_1 = username;
    this.y11l_1 = newPassword;
    this.z11l_1 = currentPassword;
  }
  protoOf($invokeCOROUTINE$82).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.u11l_1.j11m_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.a11m_1 = tmp_2;
            this.id_1 = 2;
            var tmp_3 = this;
            tmp_3.b11m_1 = this.u11l_1.k11m_1;
            var tmp_4 = this;
            tmp_4.c11m_1 = this.u11l_1.i11m_1.tnt_1 + 'api/account/setpassword';
            var tmp_5 = this;
            tmp_5.d11m_1 = this.b11m_1;
            var tmp_6 = this;
            tmp_6.e11m_1 = this.d11m_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.c11m_1);
            doorNodeIdHeader(this_0, this.a11m_1);
            parameter(this_0, 'nodeActiveUserUid', this.v11l_1);
            parameter(this_0, 'personUid', this.w11l_1.toString());
            parameter(this_0, 'username', this.x11l_1);
            parameter(this_0, 'newPassword', this.y11l_1);
            var tmp0_safe_receiver = this.z11l_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              parameter(this_0, 'currentPassword', tmp0_safe_receiver);
            }

            set_expectSuccess(this_0, false);
            tmp_7.f11m_1 = this_0;
            this.f11m_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_8 = this;
            tmp_8.g11m_1 = this.e11m_1;
            var tmp_9 = this;
            tmp_9.h11m_1 = this.f11m_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.h11m_1, this.g11m_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            if (result.j3b().equals(Companion_getInstance_0().x2y_1)) {
              throw new UnauthorizedException();
            } else if (!isSuccess(result.j3b())) {
              throw IllegalStateException_init_$Create$('Bad response to set password request: ' + result.j3b());
            }

            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.s5e(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(learningSpace, repo, httpClient) {
    this.i11m_1 = learningSpace;
    this.j11m_1 = repo;
    this.k11m_1 = httpClient;
  }
  protoOf(SetPasswordUseCaseJs).ioi = function (activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion) {
    var tmp = new $invokeCOROUTINE$82(this, activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OpenBlobUseCaseJs() {
  }
  protoOf(OpenBlobUseCaseJs).kop = function (item, onProgress, intent, $completion) {
    var element = document.createElement('a');
    element.setAttribute('href', item.soo_1);
    element.setAttribute('download', item.uoo_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.t11m_1 = $transferJobItemStatusUpdater;
    this.u11m_1 = this$0;
    this.v11m_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).uny = function (it, $completion) {
    var tmp = this.vny(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.uny(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.t11m_1.qow(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.u11m_1.a11n_1.k7f();
            var tmp0_safe_receiver = firstOrNull(this.v11m_1);
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d11n_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zcb_1;
            suspendResult = tmp_0.yie(tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs, TransferJobItemStatus_FAILED_getInstance().qkb_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).vny = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda(this.t11m_1, this.u11m_1, this.v11m_1, completion);
    i.w11m_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.uny(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda($transferJobItemStatusUpdater, $uploadItem) {
    return function (it) {
      $transferJobItemStatusUpdater.now(new BlobTransferProgressUpdate($uploadItem, it.hpn_1));
      return Unit_instance;
    };
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    this.m11n_1 = this$0;
    this.n11n_1 = $transferJobItemStatusUpdater;
    this.o11n_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.m11n_1.a11n_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0(this.n11n_1, this.m11n_1, this.o11n_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.m11n_1, this.n11n_1, this.o11n_1, completion);
    i.p11n_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.c11n_1 = uriToSaveItem;
    this.d11n_1 = transferJobItem;
  }
  protoOf(UriToSaveQueueItem).toString = function () {
    return 'UriToSaveQueueItem(uriToSaveItem=' + this.c11n_1 + ', transferJobItem=' + this.d11n_1 + ')';
  };
  protoOf(UriToSaveQueueItem).hashCode = function () {
    var result = this.c11n_1.hashCode();
    result = imul(result, 31) + this.d11n_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.c11n_1.equals(tmp0_other_with_cast.c11n_1))
      return false;
    if (!this.d11n_1.equals(tmp0_other_with_cast.d11n_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    this.y11n_1 = this$0;
    this.z11n_1 = $localUrisToSave;
    this.a11o_1 = $onTransferJobItemCreated;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).t11o = function (it, $completion) {
    var tmp = this.vny(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.t11o(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.y11n_1.a11n_1.j7f().kic(new TransferJob(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.c11o_1 = suspendResult;
            this.d11o_1 = this.c11o_1.mb();
            var tmp_0 = this;
            tmp_0.e11o_1 = this.z11n_1;
            var tmp_1 = this;
            tmp_1.f11o_1 = this.e11o_1;
            var tmp_2 = this;
            tmp_2.g11o_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.e11o_1, 10));
            this.h11o_1 = this.f11o_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.h11o_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.i11o_1 = this.h11o_1.e();
            var tmp_3 = this;
            tmp_3.j11o_1 = this.i11o_1;
            var tmp_4 = this;
            tmp_4.k11o_1 = fetch(this.j11o_1.kor_1);
            this.hd_1 = 3;
            var this_0 = this.k11o_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.l11o_1 = suspendResult;
            this.m11o_1 = this.l11o_1.blob();
            this.hd_1 = 4;
            var this_1 = this.m11o_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.n11o_1 = suspendResult;
            this.o11o_1 = this.n11o_1.size;
            this.p11o_1 = numberToLong(this.o11o_1);
            var tmp_5 = this;
            var tmp0_tjiSrc = this.j11o_1.kor_1;
            var tmp1_tjiTableId = this.j11o_1.mor_1;
            var tmp2_tjiEntityUid = this.j11o_1.lor_1;
            tmp_5.q11o_1 = new TransferJobItem(VOID, this.d11o_1, this.p11o_1, VOID, VOID, tmp0_tjiSrc, VOID, VOID, VOID, tmp1_tjiTableId, tmp2_tjiEntityUid);
            this.hd_1 = 5;
            suspendResult = this.y11n_1.a11n_1.k7f().uie(this.q11o_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.r11o_1 = suspendResult;
            this.s11o_1 = this.r11o_1.mb();
            this.a11o_1(this.j11o_1, this.q11o_1.oky(this.s11o_1));
            this.hd_1 = 6;
            suspendResult = this.y11n_1.b11n_1.fox(this.y11n_1.a11n_1, this.j11o_1.mor_1, this.j11o_1.lor_1, this.s11o_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var ARGUMENT = new UriToSaveQueueItem(this.j11o_1, this.q11o_1.oky(this.s11o_1));
            this.g11o_1.i1(ARGUMENT);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            return this.g11o_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).vny = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this.y11n_1, this.z11n_1, this.a11o_1, completion);
    i.b11o_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.t11o(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation) {
    this.c11p_1 = this$0;
    this.d11p_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).z11p = 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.z11p((!(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.f11p_1 = new TransferJobItemStatusUpdater(this.c11p_1.a11n_1, null, this.e11p_1);
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.h11p_1 = this.d11p_1;
            var tmp_1 = this;
            tmp_1.i11p_1 = this.h11p_1;
            var tmp_2 = this;
            tmp_2.j11p_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.h11p_1, 10));
            this.k11p_1 = this.i11p_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.k11p_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.l11p_1 = this.k11p_1.e();
            var tmp_3 = this;
            tmp_3.m11p_1 = this.l11p_1;
            this.n11p_1 = new BlobTransferJobItem('', this.m11p_1.d11n_1.ycb_1);
            this.f11p_1.oow(new BlobTransferStatusUpdate(this.n11p_1, TransferJobItemStatus_IN_PROGRESS_getInstance().qkb_1));
            this.o11p_1 = this.c11p_1.x11m_1;
            this.p11p_1 = randomUuidAsString();
            this.q11p_1 = Companion_getInstance_3().o2r(this.m11p_1.c11n_1.kor_1);
            this.r11p_1 = this.c11p_1.y11m_1.tnt_1 + 'api/blob/upload-item';
            var tmp_4 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            var tmp0_safe_receiver = this.m11p_1.c11n_1.nor_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              this_0.s('X-Blob-Response-' + 'Content-Type', listOf_0(tmp0_safe_receiver));
            }

            tmp_4.s11p_1 = asIStringValues(this_0.f3());
            this.hd_1 = 2;
            suspendResult = this.o11p_1.npn(this.p11p_1, this.q11p_1, this.r11p_1, VOID, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda(this.f11p_1, this.n11p_1), VOID, this.s11p_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.t11p_1 = suspendResult;
            var tmp_5 = this;
            var tmp5_elvis_lhs = this.t11p_1.jpn_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.u11p_1 = tmp_6;
            this.f11p_1.oow(new BlobTransferStatusUpdate(this.n11p_1, TransferJobItemStatus_COMPLETE_getInstance().qkb_1));
            this.v11p_1 = this.c11p_1.z11m_1.s45(Companion_instance_82.n4r(), this.u11p_1);
            Napier_getInstance().i5e('SaveLocalUrisAsBlobUseCaseJs: upload complete: ' + (this.m11p_1.c11n_1.kor_1 + ' stored as ' + this.v11p_1.koq_1));
            this.w11p_1 = this.v11p_1.sor(this.m11p_1.c11n_1.lor_1, this.m11p_1.c11n_1.mor_1, this.m11p_1.c11n_1.kor_1);
            this.j11p_1.i1(this.w11p_1);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.x11p_1 = this.j11p_1;
            this.hd_1 = 4;
            suspendResult = this.f11p_1.qow(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.g11p_1 = this.x11p_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.y11p_1 = this.kd_1;
              Napier_getInstance().q5e('SaveLocalUriAsBlobUseCaseJs: exception uploading', this.y11p_1);
              this.hd_1 = 6;
              var tmp_8 = NonCancellable_getInstance();
              suspendResult = withContext(tmp_8, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this.c11p_1, this.f11p_1, this.d11p_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.y11p_1;
          case 7:
            this.id_1 = 8;
            return this.g11p_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.c11p_1, this.d11p_1, completion);
    i.e11p_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.z11p($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$83(_this__u8e3s4, localUrisToSave, onTransferJobItemCreated, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.i11q_1 = _this__u8e3s4;
    this.j11q_1 = localUrisToSave;
    this.k11q_1 = onTransferJobItemCreated;
  }
  protoOf($invokeCOROUTINE$83).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.i11q_1.a11n_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this.i11q_1, this.j11q_1, this.k11q_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.l11q_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = coroutineScope(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this.i11q_1, this.l11q_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, learningSpace, json, db, updateTransferJobItemEtagUseCase) {
    updateTransferJobItemEtagUseCase = updateTransferJobItemEtagUseCase === VOID ? new UpdateTransferJobItemEtagUseCase() : updateTransferJobItemEtagUseCase;
    this.x11m_1 = chunkedUploadClientLocalUriUseCase;
    this.y11m_1 = learningSpace;
    this.z11m_1 = json;
    this.a11n_1 = db;
    this.b11n_1 = updateTransferJobItemEtagUseCase;
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs).tor = function (localUrisToSave, onTransferJobItemCreated, $completion) {
    var tmp = new $invokeCOROUTINE$83(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.u11q_1 = this$0;
    this.v11q_1 = $entityUid;
    this.w11q_1 = $tableId;
    this.x11q_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.u11q_1.z11q_1.uor(this.v11q_1, this.w11q_1, this.x11q_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.u11q_1, this.v11q_1, this.w11q_1, this.x11q_1, completion);
    i.y11q_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.z11q_1 = savePictureUseCase;
    this.a11r_1 = CoroutineScope_0(Dispatchers_getInstance().p12_1.lj(Job()));
  }
  protoOf(EnqueueSavePictureUseCaseJs).uor = function (entityUid, tableId, pictureUri, $completion) {
    launch(this.a11r_1, VOID, VOID, EnqueueSavePictureUseCaseJs$invoke$slambda_0(this, entityUid, tableId, pictureUri, null));
    return Unit_instance;
  };
  function SetClipboardStringUseCaseJs() {
  }
  protoOf(SetClipboardStringUseCaseJs).pp1 = 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().i5e('CompressImageUseCaseJs: compressing ' + $fromUri + ' : success');
      $completeable.gy(it);
      return Unit_instance;
    };
  }
  function CompressImageUseCaseJs$invoke$lambda_0($fromUri, $completeable) {
    return function (it) {
      Napier_getInstance().q5e('CompressImageUseCaseJs: compressing ' + $fromUri + ' : error', it);
      $completeable.iy(it);
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$84(_this__u8e3s4, fromUri, toUri, params, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.j11r_1 = _this__u8e3s4;
    this.k11r_1 = fromUri;
    this.l11r_1 = toUri;
    this.m11r_1 = params;
    this.n11r_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$84).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.o11r_1 = CompletableDeferred();
            Napier_getInstance().i5e('CompressImageUseCaseJs: compressing ' + this.k11r_1);
            this.id_1 = 4;
            var tmp_0 = this;
            tmp_0.p11r_1 = fetch(this.k11r_1);
            this.hd_1 = 1;
            var this_0 = this.p11r_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.q11r_1 = suspendResult;
            this.r11r_1 = this.q11r_1.blob();
            this.hd_1 = 2;
            var this_1 = this.r11r_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.s11r_1 = suspendResult;
            var this_2 = {};
            this_2.maxWidth = this.m11r_1.sp1_1;
            this_2.maxHeight = this.m11r_1.tp1_1;
            this_2.convertSize = 50000;
            this_2.convertTypes = ['image/png'];
            this_2.success = CompressImageUseCaseJs$invoke$lambda(this.k11r_1, this.o11r_1);
            this_2.error = CompressImageUseCaseJs$invoke$lambda_0(this.k11r_1, this.o11r_1);
            new com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk(this.s11r_1, this_2);
            this.hd_1 = 3;
            suspendResult = this.o11r_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.s11r_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().q5e('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).t11r = function (fromUri, toUri, params, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$84(this, fromUri, toUri, params, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CompressImageUseCaseJs).vp1 = function (fromUri, toUri, params, onProgress, $completion) {
    return this.t11r(fromUri, toUri, params, onProgress, $completion);
  };
  function Companion_207() {
    this.u11r_1 = 3;
  }
  var Companion_instance_256;
  function Companion_getInstance_224() {
    return Companion_instance_256;
  }
  function ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda($onProgress) {
    return function (it) {
      $onProgress(new ContentEntryGetMetadataStatus(false, VOID, it.hpn_1, it.ipn_1));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$85(_this__u8e3s4, contentUri, fileName, learningSpace, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.d11s_1 = _this__u8e3s4;
    this.e11s_1 = contentUri;
    this.f11s_1 = fileName;
    this.g11s_1 = learningSpace;
    this.h11s_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$85).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.i11s_1 = randomUuid().toString();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.k11s_1 = until(0, 3).w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.k11s_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.l11s_1 = this.k11s_1.e();
            this.m11s_1 = this.d11s_1.q11s_1;
            this.n11s_1 = this.g11s_1.tnt_1 + 'api/contentupload/upload';
            var tmp_0 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            if (!(this.f11s_1 == null)) {
              this_0.s('upload-original-filename', listOf_0(encodeURIComponent(this.f11s_1)));
            }

            tmp_0.o11s_1 = asIStringValues(this_0.f3());
            this.hd_1 = 4;
            var tmp_1 = new Long(0, 0);
            suspendResult = this.m11s_1.npn(this.i11s_1, this.e11s_1, this.n11s_1, tmp_1, VOID, ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda(this.h11s_1), VOID, this.o11s_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var finalResponse = suspendResult;
            var tmp4_subject = finalResponse.kpn_1;
            if (tmp4_subject === 400) {
              var tmp5_elvis_lhs = finalResponse.jpn_1;
              throw new InvalidContentException(tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs);
            } else if (tmp4_subject === 406) {
              var tmp6_elvis_lhs = finalResponse.jpn_1;
              throw new UnsupportedContentException(tmp6_elvis_lhs == null ? '' : tmp6_elvis_lhs);
            }

            var tmp_2 = this;
            var tmp7_safe_receiver = finalResponse.jpn_1;
            var tmp_3;
            if (tmp7_safe_receiver == null) {
              tmp_3 = null;
            } else {
              tmp_3 = this.d11s_1.p11s_1.s45(Companion_instance_81.n4r(), 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.j11s_1 = tmp_4;
            this.id_1 = 9;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            var tmp_5 = this.j11s_1;
            this.id_1 = 9;
            URL.revokeObjectURL(this.e11s_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.e11s_1.toString());
            return Unit_instance;
          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            URL.revokeObjectURL(this.e11s_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.p11s_1 = json;
    this.q11s_1 = chunkedUploadClientLocalUriUseCase;
  }
  protoOf(ContentEntryGetMetaDataFromUriUseCaseJs).ep3 = function (contentUri, fileName, learningSpace, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$85(this, contentUri, fileName, learningSpace, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$86(_this__u8e3s4, subtitleTrackUri, filename, locale, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.z11s_1 = _this__u8e3s4;
    this.a11t_1 = subtitleTrackUri;
    this.b11t_1 = filename;
    this.c11t_1 = locale;
  }
  protoOf($invokeCOROUTINE$86).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.a11t_1.q72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.e11t_1 = suspendResult;
            this.f11t_1 = this.e11t_1.blob();
            this.hd_1 = 2;
            var this_0 = this.f11t_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.g11t_1 = suspendResult;
            this.h11t_1 = this.g11t_1.text();
            this.hd_1 = 3;
            var this_1 = this.h11t_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.d11t_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.i11t_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().q5e('GetSubtitleTrackFromUriUseCaseJs: exception fetching local uri ' + this.a11t_1, this.i11t_1);
              throw IllegalStateException_init_$Create$_1('Failed to fetch blob for local uri ' + this.a11t_1, this.i11t_1);
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 8;
            this.j11t_1 = this.d11t_1;
            var tmp_2 = this;
            tmp_2.k11t_1 = this.z11s_1.t11t_1;
            var tmp_3 = this;
            tmp_3.l11t_1 = this.z11s_1.s11t_1.tnt_1 + 'api/contentupload/getsubtitletrack';
            var tmp_4 = this;
            tmp_4.m11t_1 = this.k11t_1;
            var tmp_5 = this;
            tmp_5.n11t_1 = this.m11t_1;
            var tmp_6 = this;
            var this_2 = new HttpRequestBuilder();
            url(this_2, this.l11t_1);
            parameter(this_2, 'filename', this.b11t_1);
            var tmp0_elvis_lhs = this.c11t_1;
            parameter(this_2, 'locale', tmp0_elvis_lhs == null ? this.z11s_1.v11t_1.gpm_1 : tmp0_elvis_lhs);
            var body = new TextContent(this.j11t_1, Companion_getInstance_15().o2r('text/vtt; charset=utf-8'));
            if (body == null) {
              this_2.y38_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.v3e(typeInfoImpl(tmp_7, tmp_8, tmp_9));
            } else {
              if (body instanceof OutgoingContent) {
                this_2.y38_1 = body;
                this_2.v3e(null);
              } else {
                this_2.y38_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.v3e(typeInfoImpl(tmp_11, tmp_12, tmp_13));
              }
            }

            tmp_6.o11t_1 = this_2;
            this.o11t_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_15 = this;
            tmp_15.p11t_1 = this.n11t_1;
            var tmp_16 = this;
            tmp_16.q11t_1 = this.o11t_1;
            this.hd_1 = 6;
            suspendResult = (new HttpStatement(this.q11t_1, this.p11t_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.r11t_1 = suspendResult;
            this.hd_1 = 7;
            suspendResult = bodyAsText(this.r11t_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var subtitleJsonStr = suspendResult;
            return this.z11s_1.u11t_1.s45(Companion_instance_80.n4r(), 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.s11t_1 = endpoint;
    this.t11t_1 = httpClient;
    this.u11t_1 = json;
    this.v11t_1 = supportedLanguagesConfig;
  }
  protoOf(GetSubtitleTrackFromUriUseCaseJs).qp3 = function (subtitleTrackUri, filename, locale, $completion) {
    var tmp = new $invokeCOROUTINE$86(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.np6_1;
    };
  }
  function LaunchXapiUseCaseJs$invoke$lambda_0($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: navigating to: ' + $resolveResult.np6_1;
    };
  }
  function $invokeCOROUTINE$87(_this__u8e3s4, contentEntryVersion, navController, clazzUid, cbUid, target, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.e11u_1 = _this__u8e3s4;
    this.f11u_1 = contentEntryVersion;
    this.g11u_1 = navController;
    this.h11u_1 = clazzUid;
    this.i11u_1 = cbUid;
    this.j11u_1 = target;
  }
  protoOf($invokeCOROUTINE$87).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.e11u_1.k11u_1.up9(this.f11u_1.lax_1, this.h11u_1, this.i11u_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var resolveResult = suspendResult;
            if (!this.j11u_1.equals(LinkTarget_TOP_getInstance())) {
              var tmp_0 = Napier_getInstance();
              tmp_0.k5e(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda(resolveResult));
              window.open(resolveResult.np6_1, asWindowTarget(this.j11u_1), 'popup=true,noopener,noreferrer');
            } else {
              var tmp_1 = Napier_getInstance();
              tmp_1.k5e(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda_0(resolveResult));
              location.href = resolveResult.np6_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.k11u_1 = resolveXapiLaunchHrefUseCase;
  }
  protoOf(LaunchXapiUseCaseJs).jp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp = new $invokeCOROUTINE$87(this, contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LaunchXapiUseCaseJs).lp6 = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.jp6(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function SetLanguageUseCaseJs(languagesConfig) {
    this.l11u_1 = languagesConfig;
  }
  protoOf(SetLanguageUseCaseJs).fpi = function (uiLang, currentDestination, navController, navArgs) {
    var currentDisplayLang = this.l11u_1.gpm_1;
    this.l11u_1.oq7(uiLang.eq4_1);
    var newDisplayLang = this.l11u_1.gpm_1;
    if (!(currentDisplayLang === newDisplayLang)) {
      location.reload();
    }
    return new SetLangResult(false);
  };
  function invoke$lambda_3($makeLinkUseCase$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('makeLinkUseCase', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $makeLinkUseCase$delegate.t2();
  }
  function GoToLearningSpaceUseCaseJs(di) {
    this.m11u_1 = di;
  }
  protoOf(GoToLearningSpaceUseCaseJs).hpi = function (url, navController, args, viewName) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_0 = this.m11u_1;
    var context = new LearningSpace(url);
    var trigger = this_0.d57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.h57(tmp$ret$0, context);
    var this_1 = On(this_0, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var makeLinkUseCase$delegate = Instance(this_1, tmp$ret$3, null).a5d(null, getLocalDelegateReference('makeLinkUseCase', KProperty0, false, function () {
      return THROW_ISE();
    }));
    var finalUrl = invoke$lambda_3(makeLinkUseCase$delegate).kpi(viewName, args);
    location.href = finalUrl;
  };
  function OpenExternalLinkUseCaseJs() {
  }
  protoOf(OpenExternalLinkUseCaseJs).spi = function (url, target) {
    window.open(url, asWindowTarget(target));
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    this.v11u_1 = this$0;
    this.w11u_1 = $text;
    this.x11u_1 = $accountPersonUid;
    this.y11u_1 = $onProgress;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).w11v = 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.w11v((!(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.a11v_1 = this.v11u_1.x11v_1;
            var tmp_1 = this;
            tmp_1.b11v_1 = this.v11u_1.y11v_1.tnt_1 + 'api/person/bulkadd/enqueue';
            var tmp_2 = this;
            tmp_2.c11v_1 = this.a11v_1;
            var tmp_3 = this;
            tmp_3.d11v_1 = this.c11v_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.b11v_1);
            var body = new TextContent(this.w11u_1, Text_getInstance().q2s_1);
            if (body == null) {
              this_0.y38_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.v3e(typeInfoImpl(tmp_5, tmp_6, tmp_7));
            } else {
              if (body instanceof OutgoingContent) {
                this_0.y38_1 = body;
                this_0.v3e(null);
              } else {
                this_0.y38_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.v3e(typeInfoImpl(tmp_9, tmp_10, tmp_11));
              }
            }

            parameter(this_0, 'accountPersonUid', this.x11u_1.toString());
            var tmp_13 = this.v11u_1.a11w_1;
            doorNodeAndVersionHeaders(this_0, isInterface(tmp_13, DoorDatabaseRepository) ? tmp_13 : THROW_CCE());
            tmp_4.e11v_1 = this_0;
            this.e11v_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_14 = this;
            tmp_14.f11v_1 = this.d11v_1;
            var tmp_15 = this;
            tmp_15.g11v_1 = this.e11v_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.g11v_1, this.f11v_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

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

            continue $sm;
          case 2:
            this.i11v_1 = suspendResult;
            this.j11v_1 = toLong_0(this.i11v_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!get_isActive(this.z11u_1)) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.id_1 = 7;
            var tmp_16 = this;
            tmp_16.k11v_1 = this.v11u_1.x11v_1;
            var tmp_17 = this;
            tmp_17.l11v_1 = this.v11u_1.y11v_1.tnt_1 + 'api/person/bulkadd/status';
            var tmp_18 = this;
            tmp_18.m11v_1 = this.k11v_1;
            var tmp_19 = this;
            tmp_19.n11v_1 = this.m11v_1;
            var tmp_20 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, this.l11v_1);
            parameter(this_1, 'timestamp', this.j11v_1.toString());
            tmp_20.o11v_1 = this_1;
            this.o11v_1.w38_1 = Companion_getInstance().l2x_1;
            var tmp_21 = this;
            tmp_21.p11v_1 = this.n11v_1;
            var tmp_22 = this;
            tmp_22.q11v_1 = this.o11v_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.q11v_1, this.p11v_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.r11v_1 = suspendResult;
            if (this.r11v_1.j3b().f30_1 === 200) {
              var tmp_23 = this;
              tmp_23.s11v_1 = this.v11u_1.z11v_1;
              this.hd_1 = 5;
              suspendResult = bodyAsText(this.r11v_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 5:
            this.t11v_1 = suspendResult;
            var tmp_24 = this;
            var this_2 = this.s11v_1.t45();
            var this_3 = serializer(this_2, createKType(getKClass(BulkAddPersonRunImportUiState), arrayOf([]), false));
            tmp_24.u11v_1 = this.s11v_1.s45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.t11v_1);
            if (this.u11v_1.vyz_1) {
              this.y11u_1.ez0(this.u11v_1.xyz_1, this.u11v_1.wyz_1);
            } else {
              if (this.u11v_1.ou4()) {
                throw new BulkAddPersonException(this.u11v_1.zyz_1, this.u11v_1.yyz_1);
              }
              return new BulkAddUsersResult(this.u11v_1.xyz_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.v11v_1 = this.kd_1;
              Napier_getInstance().m5e('BulkAddPersonFromLocalUriUseCaseJs exception', this.v11v_1);
              var tmp_26 = this.v11v_1;
              if (tmp_26 instanceof BulkAddPersonException)
                throw this.v11v_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.v11u_1, this.w11u_1, this.x11u_1, this.y11u_1, completion);
    i.z11u_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.w11v($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$88(_this__u8e3s4, uri, accountPersonUid, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.j11w_1 = _this__u8e3s4;
    this.k11w_1 = uri;
    this.l11w_1 = accountPersonUid;
    this.m11w_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$88).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.k11w_1.toString(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.n11w_1 = suspendResult;
            this.o11w_1 = this.n11w_1.text();
            this.hd_1 = 2;
            var this_0 = this.o11w_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.p11w_1 = suspendResult;
            console.log('csv text = ' + this.p11w_1);
            this.hd_1 = 3;
            suspendResult = coroutineScope(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this.j11w_1, this.p11w_1, this.l11w_1, this.m11w_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, learningSpace, json, repo) {
    this.x11v_1 = httpClient;
    this.y11v_1 = learningSpace;
    this.z11v_1 = json;
    this.a11w_1 = repo;
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs).ipl = function (uri, accountPersonUid, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$88(this, uri, accountPersonUid, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickPhoneNumUseCaseJs() {
  }
  protoOf(OnClickPhoneNumUseCaseJs).pp1 = 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).bph = 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.q11w_1 = phoneNumber;
  }
  function PhoneNumberUtilJs() {
  }
  protoOf(PhoneNumberUtilJs).mpl = function (numberToParse, defaultRegion) {
    return new PhoneNumberJs(parsePhoneNumber(numberToParse, defaultRegion, null));
  };
  protoOf(PhoneNumberUtilJs).npl = function (number) {
    return (number instanceof PhoneNumberJs ? number : THROW_CCE()).q11w_1.formatInternational();
  };
  function OnClickSendEmailUseCaseJs() {
  }
  protoOf(OnClickSendEmailUseCaseJs).pp1 = 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.r11w_1 = isTempFileCheckerUseCase;
  }
  protoOf(DeleteUrisUseCaseJs).wot = 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.r11w_1.np9(element)) {
        var tmp = Napier_getInstance();
        tmp.k5e(VOID, VOID, DeleteUrisUseCaseJs$invoke$lambda(element));
        URL.revokeObjectURL(element);
      }
    }
    return Unit_instance;
  };
  function IsTempFileCheckerUseCaseJs() {
  }
  protoOf(IsTempFileCheckerUseCaseJs).np9 = function (uri) {
    return startsWith(uri, 'blob:');
  };
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.cpn_1;
    };
  }
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.cpn_1 + ' complete ';
    };
  }
  function $invokeCOROUTINE$89(_this__u8e3s4, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.a11x_1 = _this__u8e3s4;
    this.b11x_1 = uploadUuid;
    this.c11x_1 = localUri;
    this.d11x_1 = remoteUrl;
    this.e11x_1 = fromByte;
    this.f11x_1 = chunkSize;
    this.g11x_1 = onProgress;
    this.h11x_1 = onStatusChange;
    this.i11x_1 = lastChunkHeaders;
  }
  protoOf($invokeCOROUTINE$89).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            this.j11x_1 = 'ChunkedUploadClientLocalUriUseCaseJs (' + this.b11x_1 + ') : ' + this.c11x_1 + ' -> ' + this.d11x_1 + ':';
            this.id_1 = 13;
            Napier_getInstance().i5e(this.j11x_1 + ' : starting');
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.c11x_1.q72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.l11x_1 = suspendResult;
            this.m11x_1 = this.l11x_1.blob();
            this.hd_1 = 2;
            var this_0 = this.m11x_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.k11x_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.n11x_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().q5e(this.j11x_1 + ' exception fetching local uri ' + this.c11x_1, this.n11x_1);
              throw IllegalStateException_init_$Create$_1(this.j11x_1 + ': failed to fetch blob for local uri ' + this.c11x_1.q72_1, this.n11x_1);
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 13;
            this.o11x_1 = this.k11x_1;
            this.p11x_1 = this.o11x_1.size;
            if (this.p11x_1 <= 0.0)
              throw IllegalArgumentException_init_$Create$('Upload size <= 0');
            this.q11x_1 = new ChunkInfo(numberToLong(this.p11x_1), this.f11x_1, this.e11x_1);
            if (this.p11x_1 >= IntCompanionObject_instance.MAX_VALUE)
              throw IllegalArgumentException_init_$Create$('JS: upload size(' + numberToLong(this.p11x_1).toString() + ') > ' + IntCompanionObject_instance.MAX_VALUE + ' not supported');
            this.h11x_1(TransferJobItemStatus_IN_PROGRESS_getInstance());
            var tmp_2 = this;
            tmp_2.r11x_1 = this.q11x_1;
            this.s11x_1 = 0;
            this.t11x_1 = this.r11x_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.t11x_1.f()) {
              this.hd_1 = 12;
              continue $sm;
            }

            this.u11x_1 = this.t11x_1.e();
            var tmp_3 = this;
            var tmp1 = this.s11x_1;
            this.s11x_1 = tmp1 + 1 | 0;
            tmp_3.v11x_1 = checkIndexOverflow(tmp1);
            var tmp_4 = this;
            tmp_4.w11x_1 = this.u11x_1;
            var tmp_5 = Napier_getInstance();
            tmp_5.e5e(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda(this.j11x_1, this.v11x_1, this.q11x_1));
            this.x11x_1 = this.o11x_1.slice(this.w11x_1.dpn_1.a7(), this.w11x_1.epn_1.a7());
            this.id_1 = 7;
            var tmp_6 = this;
            var this_1 = {};
            this_1.body = this.x11x_1;
            this_1.method = 'POST';
            var this_2 = new Headers();
            this_2.set(get_HEADER_UPLOAD_UUID(), this.b11x_1);
            this_2.set(get_HEADER_IS_FINAL_CHUNK(), this.w11x_1.fpn_1.toString());
            this_2.set(get_HEADER_UPLOAD_START_BYTE(), this.w11x_1.dpn_1.toString());
            if (this.w11x_1.fpn_1 ? !(this.i11x_1 == null) : false) {
              var tmp0_iterator = this.i11x_1.o2n().w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_iterator_0 = this.i11x_1.n2n(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.z11x_1 = fetch(this.d11x_1, this_1);
            this.hd_1 = 6;
            var this_3 = this.z11x_1;
            suspendResult = await_0(this_3, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.y11x_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.a11y_1 = this.kd_1;
              var tmp_8 = this;
              Napier_getInstance().q5e(this.j11x_1 + ' exception fetching response for blob upload ' + ('fromByte=' + this.q11x_1.apn_1.toString()), this.a11y_1);
              throw IllegalStateException_init_$Create$_1(this.j11x_1 + ' exception fetching response for blob upload ', this.a11y_1);
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 13;
            this.b11y_1 = this.y11x_1;
            var tmp_9 = Napier_getInstance();
            tmp_9.e5e(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0(this.j11x_1, this.v11x_1, this.q11x_1));
            this.g11x_1(new UploadProgress(this.w11x_1.epn_1, numberToLong(this.p11x_1)));
            if (this.w11x_1.fpn_1) {
              this.h11x_1(TransferJobItemStatus_COMPLETE_getInstance());
              Napier_getInstance().i5e(this.j11x_1 + ': Complete!');
              if (!(this.b11y_1.status === 204)) {
                var tmp_10 = this;
                tmp_10.d11y_1 = this.b11y_1.text();
                this.hd_1 = 10;
                var this_4 = this.d11y_1;
                suspendResult = await_0(this_4, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_11 = this;
                tmp_11.c11y_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.c11y_1 = suspendResult;
            this.hd_1 = 11;
            continue $sm;
          case 11:
            var ARGUMENT = this.c11y_1;
            return new LastChunkResponse(ARGUMENT, this.b11y_1.status, asIStringValues_0(this.b11y_1.headers));
          case 12:
            throw IllegalStateException_init_$Create$(this.j11x_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().q5e(this.j11x_1 + ', ChunkedUploadClientLocalUriUseCaseJs: Exception', e);
              this.h11x_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).mpn = function (uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) {
    var tmp = new $invokeCOROUTINE$89(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.m11y_1 = this$0;
    this.n11y_1 = $statements;
    this.o11y_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.m11y_1.q11y_1.tok(this.n11y_1, this.o11y_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.m11y_1, this.n11y_1, this.o11y_1, completion);
    i.p11y_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.q11y_1 = xapiStatementResource;
  }
  protoOf(SaveStatementOnClearUseCaseJs).eq3 = function (statements, xapiSession) {
    var tmp = GlobalScope_instance;
    launch(tmp, VOID, VOID, SaveStatementOnClearUseCaseJs$invoke$slambda_0(this, statements, xapiSession, null));
  };
  function SaveStatementOnUnloadUseCaseJs(learningSpace, json) {
    this.r11y_1 = learningSpace;
    this.s11y_1 = json;
  }
  protoOf(SaveStatementOnUnloadUseCaseJs).eq3 = function (statements, xapiSession) {
    var tmp = navigator;
    var tmp_0 = this.r11y_1.tnt_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.s11y_1.r45(Companion_getInstance_94().n4r(), new XapiStatementsAndSession(statements, xapiSession));
    tmp.sendBeacon(tmp_0, tmp$ret$2);
  };
  function $invokeCOROUTINE$90(_this__u8e3s4, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.b11z_1 = _this__u8e3s4;
    this.c11z_1 = accountPersonUid;
    this.d11z_1 = actor;
    this.e11z_1 = activityId;
    this.f11z_1 = clazzUid;
    this.g11z_1 = cbUid;
    this.h11z_1 = contentEntryUid;
    this.i11z_1 = contentEntryVersionUid;
  }
  protoOf($invokeCOROUTINE$90).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.j11z_1 = this.b11z_1.s11z_1;
            var tmp_1 = this;
            tmp_1.k11z_1 = this.b11z_1.r11z_1.tnt_1 + 'api/xapi-ext/resumeOrStartSession';
            var tmp_2 = this;
            tmp_2.l11z_1 = this.j11z_1;
            var tmp_3 = this;
            tmp_3.m11z_1 = this.l11z_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.k11z_1);
            var tmp_5 = this.b11z_1.t11z_1;
            doorNodeIdHeader(this_0, isInterface(tmp_5, DoorDatabaseRepository) ? tmp_5 : THROW_CCE());
            parameter(this_0, 'accountPersonUid', this.c11z_1.toString());
            parameter(this_0, 'actor', this.b11z_1.u11z_1.r45(Companion_instance_112.n4r(), this.d11z_1));
            parameter(this_0, 'activityId', this.e11z_1);
            parameter(this_0, 'clazzUid', this.f11z_1.toString());
            parameter(this_0, 'cbUid', this.g11z_1.toString());
            parameter(this_0, 'contentEntryUid', this.h11z_1.toString());
            parameter(this_0, 'contentEntryVersionUid', this.i11z_1.toString());
            tmp_4.n11z_1 = this_0;
            this.n11z_1.w38_1 = Companion_getInstance().m2x_1;
            var tmp_6 = this;
            tmp_6.o11z_1 = this.m11z_1;
            var tmp_7 = this;
            tmp_7.p11z_1 = this.n11z_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.p11z_1, this.o11z_1)).h3z(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.q11z_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_8 = this.q11z_1.e3c();
            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.h3b(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(learningSpace, httpClient, repo, xapiJson) {
    this.r11z_1 = learningSpace;
    this.s11z_1 = httpClient;
    this.t11z_1 = repo;
    this.u11z_1 = xapiJson.epr_1;
  }
  protoOf(ResumeOrStartXapiSessionUseCaseJs).mp9 = function (accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion) {
    var tmp = new $invokeCOROUTINE$90(this, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  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_42(function_0) {
    this.v11z_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_42).t1d = function (value, $completion) {
    return this.v11z_1(value, $completion);
  };
  function collectAsState$lambda$slambda$slambda($state, resultContinuation) {
    this.e120_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.e120_1[1](this.f120_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.e120_1, completion);
    i.f120_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.o120_1 = $this_collectAsState;
    this.p120_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.p120_1, null);
            suspendResult = this.o120_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_42(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.o120_1, this.p120_1, completion);
    i.q120_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.z120_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.z120_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.z120_1, completion);
    i.a121_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_43(function_0) {
    this.b121_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_43).t1d = function (value, $completion) {
    return this.b121_1(value, $completion);
  };
  function useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation) {
    this.k121_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda$slambda).m121 = function (it, $completion) {
    var tmp = this.n121(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda$slambda).he = function (p1, $completion) {
    return this.m121(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().i5e('useNavControllerEffect: collect command: ' + this.l121_1);
          this.k121_1.b11l(this.l121_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).n121 = function (it, completion) {
    var i = new useNavControllerEffect$slambda$slambda(this.k121_1, completion);
    i.l121_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.m121(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation) {
    this.w121_1 = $commandFlow;
    this.x121_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda).j87 = function ($completion) {
    var tmp = this.l78($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda).m78 = function ($completion) {
    return this.j87($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.y121_1 = this.w121_1;
            if (this.y121_1 == null) {
              this.z121_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = useNavControllerEffect$slambda$slambda_0(this.x121_1, null);
              suspendResult = this.y121_1.a1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_43(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.z121_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).l78 = function (completion) {
    return new useNavControllerEffect$slambda(this.w121_1, this.x121_1, completion);
  };
  function useNavControllerEffect$slambda_0($commandFlow, $navHostFn, resultContinuation) {
    var i = new useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation);
    var l = function ($completion) {
      return i.j87($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).f58();
    // 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.d58(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).a122_1;
  }
  function ViewModelAndKey(viewModel, locationKey) {
    this.a122_1 = viewModel;
    this.b122_1 = locationKey;
  }
  protoOf(ViewModelAndKey).toString = function () {
    return 'ViewModelAndKey(viewModel=' + this.a122_1 + ', locationKey=' + this.b122_1 + ')';
  };
  protoOf(ViewModelAndKey).hashCode = function () {
    var result = hashCode(this.a122_1);
    result = imul(result, 31) + getStringHashCode(this.b122_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.a122_1, tmp0_other_with_cast.a122_1))
      return false;
    if (!(this.b122_1 === tmp0_other_with_cast.b122_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().i5e('Creating ViewModel: ' + getKClassFromExpression(this_0.a122_1).f7());
      return this_0;
    };
  }
  function useViewModel$lambda$lambda($viewModelAndKey$delegate) {
    return function () {
      Napier_getInstance().i5e('Close ViewModel: ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).a122_1).f7());
      useViewModel$lambda($viewModelAndKey$delegate).a122_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).b122_1 === $locationKey)) {
        useViewModel$lambda_0($viewModelAndKey$delegate, new ViewModelAndKey($viewModelFactory(new SavedStateHandle2(window.history, $searchParams)), $locationKey));
        Napier_getInstance().i5e('Recreating ViewModel ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).a122_1).f7());
        tmp = Unit_instance;
      }
      $this$useEffect.push(useViewModel$lambda$lambda($viewModelAndKey$delegate));
      return Unit_instance;
    };
  }
  function Companion_208() {
  }
  var Companion_instance_257;
  function Companion_getInstance_225() {
    return Companion_instance_257;
  }
  function UstadMobileSystemImpl(settings, langConfig, jsStringProvider) {
    UstadMobileSystemCommon.call(this, settings, langConfig);
    this.ioj_1 = jsStringProvider;
  }
  protoOf(UstadMobileSystemImpl).joj = function (stringResource) {
    return stringResource.hm8(this.ioj_1, this.bq5_1.gpm_1);
  };
  protoOf(UstadMobileSystemImpl).koj = function (stringResource, args) {
    return stringResource.im8(this.ioj_1, this.bq5_1.gpm_1, args.slice());
  };
  protoOf(UstadMobileSystemImpl).cwq = function (pluralsResource, number) {
    return format(pluralsResource, number, [number]).mm8(this.ioj_1);
  };
  protoOf(UstadMobileSystemImpl).c122 = 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.c122(context, zip, $completion);
  };
  protoOf(UstadMobileSystemImpl).d122 = 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.d122(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.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // 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.d58(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.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // 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.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // 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.d58(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_8 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(SystemUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$7 = tmp_8.d58(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 ValidateEmailUseCase();
  }
  function DomainDiModuleJs$lambda$lambda_5($this$provider) {
    return new OnClickPhoneNumUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_6($this$provider) {
    return new OnClickSendEmailUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_7($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // 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.d58(tmp$ret$0, null);
    return new SetLanguageUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_8($this$singleton) {
    return new ChunkedUploadClientLocalUriUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_9($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    return new EnqueueSavePictureUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_10($this$singleton) {
    return new IsTempFileCheckerUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_11($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    return new DeleteUrisUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_12($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // 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.d58(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.d58(tmp$ret$4, null).tk2_1;
    var tmp_8 = new CompressImageUseCaseJs();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.f58();
    // 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.d58(tmp$ret$6, null);
    return new SavePictureUseCase(tmp_1, null, tmp_4, tmp_7, tmp_8, tmp$ret$7);
  }
  function DomainDiModuleJs$lambda$lambda_13($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    var tmp_2 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // 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.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.f58();
    // 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.d58(tmp$ret$4, 1);
    return new SaveLocalUrisAsBlobUseCaseJs(tmp_1, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_14($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    return new ContentEntryGetMetaDataFromUriUseCaseJs(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_15($this$provider) {
    var tmp = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.d58(tmp$ret$0, null).vk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    return new SetPasswordUseCaseJs(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_16($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_activeRepoOrDb = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.f58();
    // 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.d58(tmp$ret$4, null).epr_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.f58();
    // 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.d58(tmp$ret$6, 1);
    var tmp4_learningSpace = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_7 = $this$provider.f58();
    // 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.d58(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.f58();
    // 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.d58(tmp$ret$10, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_11 = $this$provider.f58();
    // 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.d58(tmp$ret$12, null);
    return new ResolveXapiLaunchHrefUseCase(tmp0_activeRepoOrDb, tmp1_httpClient, tmp2_json, tmp3_xppFactory, tmp5_resumeOrStartXapiSessionUseCase, tmp7_getApiUrlUseCase, tmp6_accountManager, tmp4_learningSpace);
  }
  function DomainDiModuleJs$lambda$lambda_17($this$singleton) {
    return new XapiJson();
  }
  function DomainDiModuleJs$lambda$lambda_18($this$singleton) {
    return new GetApiUrlUseCaseDirect($this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_19($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.d58(tmp$ret$2, null).vk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.f58();
    // 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.d58(tmp$ret$4, null);
    return new ResumeOrStartXapiSessionUseCaseJs(tmp, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_20($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // 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.d58(tmp$ret$0, null);
    return new LaunchXapiUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_21($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.d58(tmp$ret$0, null).wk2();
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.f58();
    // 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.d58(tmp$ret$2, null);
    return new MoveContentEntriesUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_22($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new DeleteContentEntryParentChildJoinUseCase(tmp$ret$1.wk2());
  }
  function DomainDiModuleJs$lambda$lambda_23($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new RestoreDeletedItemUseCase(tmp$ret$1.wk2());
  }
  function DomainDiModuleJs$lambda$lambda_24($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.d58(tmp$ret$0, null);
    return new DeletePermanentlyUseCase(tmp$ret$1.wk2());
  }
  function DomainDiModuleJs$lambda$lambda_25($this$singleton) {
    return new SetClipboardStringUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_26($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // 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.d58(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.d58(tmp$ret$4, null);
    return new SaveAndUploadLocalUrisUseCase(tmp_1, null, tmp_4, tmp$ret$5.tk2_1);
  }
  function DomainDiModuleJs$lambda$lambda_27($this$provider) {
    return new OpenBlobUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_28($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // 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.d58(tmp$ret$2, null);
    return new OpenBlobUiUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_29($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.d58(tmp$ret$2, null);
    return new CancelRemoteContentEntryImportUseCase(tmp, tmp_2, tmp$ret$3.vk2());
  }
  function DomainDiModuleJs$lambda$lambda_30($this$singleton) {
    var tmp0_learningSpace = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp2_repo = tmp_1.d58(tmp$ret$2, null).vk2();
    return new DismissRemoteContentEntryImportErrorUseCase(tmp1_httpClient, tmp0_learningSpace, tmp2_repo);
  }
  function DomainDiModuleJs$lambda$lambda_31($this$singleton) {
    return new XXStringHasherJs();
  }
  function DomainDiModuleJs$lambda$lambda_32($this$singleton) {
    return new XXHasher64FactoryJs();
  }
  function DomainDiModuleJs$lambda$lambda_33($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new StoreActivitiesUseCase(tmp_1, tmp$ret$3.tk2_1);
  }
  function DomainDiModuleJs$lambda$lambda_34($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.d58(tmp$ret$2, null).tk2_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // 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.d58(tmp$ret$4, null);
    var tmp_8 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.f58();
    // 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.d58(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$singleton.f58();
    // 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.d58(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_15 = $this$singleton.f58();
    // 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.d58(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_35($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    return new SaveStatementOnClearUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_36($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    return new SaveStatementOnUnloadUseCaseJs(tmp, tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_37($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // 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.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.f58();
    // 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.d58(tmp$ret$4, null);
    return new NonInteractiveContentXapiStatementRecorderFactory(tmp_1, tmp_4, tmp$ret$5, $this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_38($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.f58();
    // 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.d58(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.f58();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDataLayer), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.d58(tmp$ret$2, null);
    return new AddNewPersonUseCase(tmp_1, tmp$ret$3.tk2_1);
  }
  function DomainDiModuleJs$lambda$lambda_39($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.f58();
    // 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.d58(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.f58();
    // 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.d58(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.f58();
    // 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.d58(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.o56(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(LearningSpace), 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.b56();
      // 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.c5b(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.o56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_0 = DomainDiModuleJs$lambda$lambda_0;
      var tmp_6 = $this$$receiver.b56();
      // 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.c5b(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.o56(tmp$ret$10, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_1 = DomainDiModuleJs$lambda$lambda_1;
      var tmp_10 = $this$$receiver.c56();
      var tmp_11 = $this$$receiver.b56();
      var tmp_12 = $this$$receiver.d56();
      // 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.c5b(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.o56(tmp$ret$14, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_2 = DomainDiModuleJs$lambda$lambda_2;
      var tmp_16 = $this$$receiver.c56();
      var tmp_17 = $this$$receiver.b56();
      var tmp_18 = $this$$receiver.d56();
      // 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.c5b(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.o56(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_3 = DomainDiModuleJs$lambda$lambda_3;
      var tmp_22 = $this$$receiver.b56();
      // 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.c5b(tmp$ret$21);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_24 = typeToken(createKType(getKClass(ValidateEmailUseCase), arrayOf([]), false));
      var tmp$ret$22 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
      var tmp_25 = $this$$receiver.o56(tmp$ret$22, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_4 = DomainDiModuleJs$lambda$lambda_4;
      var tmp_26 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_27 = typeToken(createKType(getKClass(ValidateEmailUseCase), 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.c5b(tmp$ret$25);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_28 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
      var tmp$ret$26 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
      var tmp_29 = $this$$receiver.o56(tmp$ret$26, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_5 = DomainDiModuleJs$lambda$lambda_5;
      var tmp_30 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(OnClickPhoneNumUseCaseJs), 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.c5b(tmp$ret$29);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_32 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
      var tmp$ret$30 = isInterface(tmp_32, TypeToken) ? tmp_32 : THROW_CCE();
      var tmp_33 = $this$$receiver.o56(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_6 = DomainDiModuleJs$lambda$lambda_6;
      var tmp_34 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_35 = typeToken(createKType(getKClass(OnClickSendEmailUseCaseJs), 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.c5b(tmp$ret$33);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
      var tmp$ret$34 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
      var tmp_37 = $this$$receiver.o56(tmp$ret$34, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_7 = DomainDiModuleJs$lambda$lambda_7;
      var tmp_38 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_39 = typeToken(createKType(getKClass(SetLanguageUseCaseJs), arrayOf([]), false));
      var tmp$ret$36 = isInterface(tmp_39, TypeToken) ? tmp_39 : THROW_CCE();
      var tmp$ret$37 = new Provider(tmp_38, tmp$ret$36, creator_7);
      tmp_37.c5b(tmp$ret$37);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_40 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
      var tmp$ret$38 = isInterface(tmp_40, TypeToken) ? tmp_40 : THROW_CCE();
      var tmp_41 = $this$$receiver.o56(tmp$ret$38, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_8 = DomainDiModuleJs$lambda$lambda_8;
      var tmp_42 = $this$$receiver.c56();
      var tmp_43 = $this$$receiver.b56();
      var tmp_44 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_45 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$40 = isInterface(tmp_45, TypeToken) ? tmp_45 : THROW_CCE();
      var tmp$ret$41 = new Singleton(tmp_42, tmp_43, tmp_44, tmp$ret$40, null, true, creator_8);
      tmp_41.c5b(tmp$ret$41);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_46 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$42 = isInterface(tmp_46, TypeToken) ? tmp_46 : THROW_CCE();
      var tmp_47 = $this$$receiver.o56(tmp$ret$42, 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_48 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$44 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$44, scope_0);
      var creator_9 = DomainDiModuleJs$lambda$lambda_9;
      var tmp_49 = this_1.c56();
      var tmp_50 = this_1.b56();
      var tmp_51 = this_1.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_52 = typeToken(createKType(getKClass(EnqueueSavePictureUseCaseJs), arrayOf([]), false));
      var tmp$ret$46 = isInterface(tmp_52, TypeToken) ? tmp_52 : THROW_CCE();
      var tmp$ret$47 = new Singleton(tmp_49, tmp_50, tmp_51, tmp$ret$46, null, true, creator_9);
      tmp_47.c5b(tmp$ret$47);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_53 = typeToken(createKType(getKClass(IsTempFileCheckerUseCase), arrayOf([]), false));
      var tmp$ret$48 = isInterface(tmp_53, TypeToken) ? tmp_53 : THROW_CCE();
      var tmp_54 = $this$$receiver.o56(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_10 = DomainDiModuleJs$lambda$lambda_10;
      var tmp_55 = $this$$receiver.c56();
      var tmp_56 = $this$$receiver.b56();
      var tmp_57 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_58 = typeToken(createKType(getKClass(IsTempFileCheckerUseCaseJs), arrayOf([]), false));
      var tmp$ret$50 = isInterface(tmp_58, TypeToken) ? tmp_58 : THROW_CCE();
      var tmp$ret$51 = new Singleton(tmp_55, tmp_56, tmp_57, tmp$ret$50, null, true, creator_10);
      tmp_54.c5b(tmp$ret$51);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_59 = typeToken(createKType(getKClass(DeleteUrisUseCase), arrayOf([]), false));
      var tmp$ret$52 = isInterface(tmp_59, TypeToken) ? tmp_59 : THROW_CCE();
      var tmp_60 = $this$$receiver.o56(tmp$ret$52, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_11 = DomainDiModuleJs$lambda$lambda_11;
      var tmp_61 = $this$$receiver.c56();
      var tmp_62 = $this$$receiver.b56();
      var tmp_63 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_64 = typeToken(createKType(getKClass(DeleteUrisUseCaseJs), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_64, TypeToken) ? tmp_64 : THROW_CCE();
      var tmp$ret$55 = new Singleton(tmp_61, tmp_62, tmp_63, tmp$ret$54, null, true, creator_11);
      tmp_60.c5b(tmp$ret$55);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_65 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$56 = isInterface(tmp_65, TypeToken) ? tmp_65 : THROW_CCE();
      var tmp_66 = $this$$receiver.o56(tmp$ret$56, 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_67 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_67, TypeToken) ? tmp_67 : THROW_CCE();
      var this_2 = new ImplWithScope(tmp$ret$58, scope_1);
      var creator_12 = DomainDiModuleJs$lambda$lambda_12;
      var tmp_68 = this_2.c56();
      var tmp_69 = this_2.b56();
      var tmp_70 = this_2.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_71 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_71, TypeToken) ? tmp_71 : THROW_CCE();
      var tmp$ret$61 = new Singleton(tmp_68, tmp_69, tmp_70, tmp$ret$60, null, true, creator_12);
      tmp_66.c5b(tmp$ret$61);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_72 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_72, TypeToken) ? tmp_72 : THROW_CCE();
      var tmp_73 = $this$$receiver.o56(tmp$ret$62, 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_74 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_74, TypeToken) ? tmp_74 : THROW_CCE();
      var this_3 = new ImplWithScope(tmp$ret$64, scope_2);
      var creator_13 = DomainDiModuleJs$lambda$lambda_13;
      var tmp_75 = this_3.c56();
      var tmp_76 = this_3.b56();
      var tmp_77 = this_3.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_78 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_78, TypeToken) ? tmp_78 : THROW_CCE();
      var tmp$ret$67 = new Singleton(tmp_75, tmp_76, tmp_77, tmp$ret$66, null, true, creator_13);
      tmp_73.c5b(tmp$ret$67);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_79 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_79, TypeToken) ? tmp_79 : THROW_CCE();
      var tmp_80 = $this$$receiver.o56(tmp$ret$68, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_14 = DomainDiModuleJs$lambda$lambda_14;
      var tmp_81 = $this$$receiver.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_82 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_82, TypeToken) ? tmp_82 : THROW_CCE();
      var tmp$ret$71 = new Provider(tmp_81, tmp$ret$70, creator_14);
      tmp_80.c5b(tmp$ret$71);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_83 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
      var tmp$ret$72 = isInterface(tmp_83, TypeToken) ? tmp_83 : THROW_CCE();
      var tmp_84 = $this$$receiver.o56(tmp$ret$72, 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_85 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$74 = isInterface(tmp_85, TypeToken) ? tmp_85 : THROW_CCE();
      var this_4 = new ImplWithScope(tmp$ret$74, scope_3);
      var creator_15 = DomainDiModuleJs$lambda$lambda_15;
      var tmp_86 = this_4.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_87 = typeToken(createKType(getKClass(SetPasswordUseCaseJs), arrayOf([]), false));
      var tmp$ret$76 = isInterface(tmp_87, TypeToken) ? tmp_87 : THROW_CCE();
      var tmp$ret$77 = new Provider(tmp_86, tmp$ret$76, creator_15);
      tmp_84.c5b(tmp$ret$77);
      // Inline function 'org.kodein.di.bind' call
      // 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_89 = $this$$receiver.o56(tmp$ret$78, 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_90 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$80 = isInterface(tmp_90, TypeToken) ? tmp_90 : THROW_CCE();
      var this_5 = new ImplWithScope(tmp$ret$80, scope_4);
      var creator_16 = DomainDiModuleJs$lambda$lambda_16;
      var tmp_91 = this_5.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_92 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
      var tmp$ret$82 = isInterface(tmp_92, TypeToken) ? tmp_92 : THROW_CCE();
      var tmp$ret$83 = new Provider(tmp_91, tmp$ret$82, creator_16);
      tmp_89.c5b(tmp$ret$83);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_93 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$84 = isInterface(tmp_93, TypeToken) ? tmp_93 : THROW_CCE();
      var tmp_94 = $this$$receiver.o56(tmp$ret$84, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_17 = DomainDiModuleJs$lambda$lambda_17;
      var tmp_95 = $this$$receiver.c56();
      var tmp_96 = $this$$receiver.b56();
      var tmp_97 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_98 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$86 = isInterface(tmp_98, TypeToken) ? tmp_98 : THROW_CCE();
      var tmp$ret$87 = new Singleton(tmp_95, tmp_96, tmp_97, tmp$ret$86, null, true, creator_17);
      tmp_94.c5b(tmp$ret$87);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_99 = typeToken(createKType(getKClass(GetApiUrlUseCase), arrayOf([]), false));
      var tmp$ret$88 = isInterface(tmp_99, TypeToken) ? tmp_99 : THROW_CCE();
      var tmp_100 = $this$$receiver.o56(tmp$ret$88, 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_101 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$90 = isInterface(tmp_101, TypeToken) ? tmp_101 : THROW_CCE();
      var this_6 = new ImplWithScope(tmp$ret$90, scope_5);
      var creator_18 = DomainDiModuleJs$lambda$lambda_18;
      var tmp_102 = this_6.c56();
      var tmp_103 = this_6.b56();
      var tmp_104 = this_6.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_105 = typeToken(createKType(getKClass(GetApiUrlUseCaseDirect), arrayOf([]), false));
      var tmp$ret$92 = isInterface(tmp_105, TypeToken) ? tmp_105 : THROW_CCE();
      var tmp$ret$93 = new Singleton(tmp_102, tmp_103, tmp_104, tmp$ret$92, null, true, creator_18);
      tmp_100.c5b(tmp$ret$93);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_106 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCase), arrayOf([]), false));
      var tmp$ret$94 = isInterface(tmp_106, TypeToken) ? tmp_106 : THROW_CCE();
      var tmp_107 = $this$$receiver.o56(tmp$ret$94, 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_108 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$96 = isInterface(tmp_108, TypeToken) ? tmp_108 : THROW_CCE();
      var this_7 = new ImplWithScope(tmp$ret$96, scope_6);
      var creator_19 = DomainDiModuleJs$lambda$lambda_19;
      var tmp_109 = this_7.c56();
      var tmp_110 = this_7.b56();
      var tmp_111 = this_7.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_112 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCaseJs), arrayOf([]), false));
      var tmp$ret$98 = isInterface(tmp_112, TypeToken) ? tmp_112 : THROW_CCE();
      var tmp$ret$99 = new Singleton(tmp_109, tmp_110, tmp_111, tmp$ret$98, null, true, creator_19);
      tmp_107.c5b(tmp$ret$99);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_113 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
      var tmp$ret$100 = isInterface(tmp_113, TypeToken) ? tmp_113 : THROW_CCE();
      var tmp_114 = $this$$receiver.o56(tmp$ret$100, 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_115 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$102 = isInterface(tmp_115, TypeToken) ? tmp_115 : THROW_CCE();
      var this_8 = new ImplWithScope(tmp$ret$102, scope_7);
      var creator_20 = DomainDiModuleJs$lambda$lambda_20;
      var tmp_116 = this_8.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_117 = typeToken(createKType(getKClass(LaunchXapiUseCaseJs), arrayOf([]), false));
      var tmp$ret$104 = isInterface(tmp_117, TypeToken) ? tmp_117 : THROW_CCE();
      var tmp$ret$105 = new Provider(tmp_116, tmp$ret$104, creator_20);
      tmp_114.c5b(tmp$ret$105);
      // Inline function 'org.kodein.di.bind' call
      // 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_119 = $this$$receiver.o56(tmp$ret$106, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_120 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$108 = isInterface(tmp_120, TypeToken) ? tmp_120 : THROW_CCE();
      var this_9 = new ImplWithScope(tmp$ret$108, scope_8);
      var creator_21 = DomainDiModuleJs$lambda$lambda_21;
      var tmp_121 = this_9.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_122 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
      var tmp$ret$110 = isInterface(tmp_122, TypeToken) ? tmp_122 : THROW_CCE();
      var tmp$ret$111 = new Provider(tmp_121, tmp$ret$110, creator_21);
      tmp_119.c5b(tmp$ret$111);
      // Inline function 'org.kodein.di.bind' call
      // 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_124 = $this$$receiver.o56(tmp$ret$112, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_125 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$114 = isInterface(tmp_125, TypeToken) ? tmp_125 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$114, scope_9);
      var creator_22 = DomainDiModuleJs$lambda$lambda_22;
      var tmp_126 = this_10.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_127 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
      var tmp$ret$116 = isInterface(tmp_127, TypeToken) ? tmp_127 : THROW_CCE();
      var tmp$ret$117 = new Provider(tmp_126, tmp$ret$116, creator_22);
      tmp_124.c5b(tmp$ret$117);
      // Inline function 'org.kodein.di.bind' call
      // 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_129 = $this$$receiver.o56(tmp$ret$118, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_130 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$120 = isInterface(tmp_130, TypeToken) ? tmp_130 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$120, scope_10);
      var creator_23 = DomainDiModuleJs$lambda$lambda_23;
      var tmp_131 = this_11.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_132 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
      var tmp$ret$122 = isInterface(tmp_132, TypeToken) ? tmp_132 : THROW_CCE();
      var tmp$ret$123 = new Provider(tmp_131, tmp$ret$122, creator_23);
      tmp_129.c5b(tmp$ret$123);
      // Inline function 'org.kodein.di.bind' call
      // 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_134 = $this$$receiver.o56(tmp$ret$124, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_11 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_135 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$126 = isInterface(tmp_135, TypeToken) ? tmp_135 : THROW_CCE();
      var this_12 = new ImplWithScope(tmp$ret$126, scope_11);
      var creator_24 = DomainDiModuleJs$lambda$lambda_24;
      var tmp_136 = this_12.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_137 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
      var tmp$ret$128 = isInterface(tmp_137, TypeToken) ? tmp_137 : THROW_CCE();
      var tmp$ret$129 = new Provider(tmp_136, tmp$ret$128, creator_24);
      tmp_134.c5b(tmp$ret$129);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_138 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
      var tmp$ret$130 = isInterface(tmp_138, TypeToken) ? tmp_138 : THROW_CCE();
      var tmp_139 = $this$$receiver.o56(tmp$ret$130, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_25 = DomainDiModuleJs$lambda$lambda_25;
      var tmp_140 = $this$$receiver.c56();
      var tmp_141 = $this$$receiver.b56();
      var tmp_142 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_143 = typeToken(createKType(getKClass(SetClipboardStringUseCaseJs), arrayOf([]), false));
      var tmp$ret$132 = isInterface(tmp_143, TypeToken) ? tmp_143 : THROW_CCE();
      var tmp$ret$133 = new Singleton(tmp_140, tmp_141, tmp_142, tmp$ret$132, null, true, creator_25);
      tmp_139.c5b(tmp$ret$133);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_144 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$134 = isInterface(tmp_144, TypeToken) ? tmp_144 : THROW_CCE();
      var tmp_145 = $this$$receiver.o56(tmp$ret$134, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_12 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_146 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$136 = isInterface(tmp_146, TypeToken) ? tmp_146 : THROW_CCE();
      var this_13 = new ImplWithScope(tmp$ret$136, scope_12);
      var creator_26 = DomainDiModuleJs$lambda$lambda_26;
      var tmp_147 = this_13.c56();
      var tmp_148 = this_13.b56();
      var tmp_149 = this_13.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_150 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$138 = isInterface(tmp_150, TypeToken) ? tmp_150 : THROW_CCE();
      var tmp$ret$139 = new Singleton(tmp_147, tmp_148, tmp_149, tmp$ret$138, null, true, creator_26);
      tmp_145.c5b(tmp$ret$139);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_151 = typeToken(createKType(getKClass(OpenBlobUseCase), arrayOf([]), false));
      var tmp$ret$140 = isInterface(tmp_151, TypeToken) ? tmp_151 : THROW_CCE();
      var tmp_152 = $this$$receiver.o56(tmp$ret$140, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_13 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_153 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$142 = isInterface(tmp_153, TypeToken) ? tmp_153 : THROW_CCE();
      var this_14 = new ImplWithScope(tmp$ret$142, scope_13);
      var creator_27 = DomainDiModuleJs$lambda$lambda_27;
      var tmp_154 = this_14.b56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_155 = typeToken(createKType(getKClass(OpenBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$144 = isInterface(tmp_155, TypeToken) ? tmp_155 : THROW_CCE();
      var tmp$ret$145 = new Provider(tmp_154, tmp$ret$144, creator_27);
      tmp_152.c5b(tmp$ret$145);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_156 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$146 = isInterface(tmp_156, TypeToken) ? tmp_156 : THROW_CCE();
      var tmp_157 = $this$$receiver.o56(tmp$ret$146, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_14 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_158 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$148 = isInterface(tmp_158, TypeToken) ? tmp_158 : THROW_CCE();
      var this_15 = new ImplWithScope(tmp$ret$148, scope_14);
      var creator_28 = DomainDiModuleJs$lambda$lambda_28;
      var tmp_159 = this_15.c56();
      var tmp_160 = this_15.b56();
      var tmp_161 = this_15.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_162 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$150 = isInterface(tmp_162, TypeToken) ? tmp_162 : THROW_CCE();
      var tmp$ret$151 = new Singleton(tmp_159, tmp_160, tmp_161, tmp$ret$150, null, true, creator_28);
      tmp_157.c5b(tmp$ret$151);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_163 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$152 = isInterface(tmp_163, TypeToken) ? tmp_163 : THROW_CCE();
      var tmp_164 = $this$$receiver.o56(tmp$ret$152, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_15 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_165 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$154 = isInterface(tmp_165, TypeToken) ? tmp_165 : THROW_CCE();
      var this_16 = new ImplWithScope(tmp$ret$154, scope_15);
      var creator_29 = DomainDiModuleJs$lambda$lambda_29;
      var tmp_166 = this_16.c56();
      var tmp_167 = this_16.b56();
      var tmp_168 = this_16.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_169 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$156 = isInterface(tmp_169, TypeToken) ? tmp_169 : THROW_CCE();
      var tmp$ret$157 = new Singleton(tmp_166, tmp_167, tmp_168, tmp$ret$156, null, true, creator_29);
      tmp_164.c5b(tmp$ret$157);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_170 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$158 = isInterface(tmp_170, TypeToken) ? tmp_170 : THROW_CCE();
      var tmp_171 = $this$$receiver.o56(tmp$ret$158, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_16 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_172 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$160 = isInterface(tmp_172, TypeToken) ? tmp_172 : THROW_CCE();
      var this_17 = new ImplWithScope(tmp$ret$160, scope_16);
      var creator_30 = DomainDiModuleJs$lambda$lambda_30;
      var tmp_173 = this_17.c56();
      var tmp_174 = this_17.b56();
      var tmp_175 = this_17.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_176 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$162 = isInterface(tmp_176, TypeToken) ? tmp_176 : THROW_CCE();
      var tmp$ret$163 = new Singleton(tmp_173, tmp_174, tmp_175, tmp$ret$162, null, true, creator_30);
      tmp_171.c5b(tmp$ret$163);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_177 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
      var tmp$ret$164 = isInterface(tmp_177, TypeToken) ? tmp_177 : THROW_CCE();
      var tmp_178 = $this$$receiver.o56(tmp$ret$164, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_31 = DomainDiModuleJs$lambda$lambda_31;
      var tmp_179 = $this$$receiver.c56();
      var tmp_180 = $this$$receiver.b56();
      var tmp_181 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_182 = typeToken(createKType(getKClass(XXStringHasherJs), arrayOf([]), false));
      var tmp$ret$166 = isInterface(tmp_182, TypeToken) ? tmp_182 : THROW_CCE();
      var tmp$ret$167 = new Singleton(tmp_179, tmp_180, tmp_181, tmp$ret$166, null, true, creator_31);
      tmp_178.c5b(tmp$ret$167);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_183 = typeToken(createKType(getKClass(XXHasher64Factory), arrayOf([]), false));
      var tmp$ret$168 = isInterface(tmp_183, TypeToken) ? tmp_183 : THROW_CCE();
      var tmp_184 = $this$$receiver.o56(tmp$ret$168, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_32 = DomainDiModuleJs$lambda$lambda_32;
      var tmp_185 = $this$$receiver.c56();
      var tmp_186 = $this$$receiver.b56();
      var tmp_187 = $this$$receiver.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_188 = typeToken(createKType(getKClass(XXHasher64FactoryJs), arrayOf([]), false));
      var tmp$ret$170 = isInterface(tmp_188, TypeToken) ? tmp_188 : THROW_CCE();
      var tmp$ret$171 = new Singleton(tmp_185, tmp_186, tmp_187, tmp$ret$170, null, true, creator_32);
      tmp_184.c5b(tmp$ret$171);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_189 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$172 = isInterface(tmp_189, TypeToken) ? tmp_189 : THROW_CCE();
      var tmp_190 = $this$$receiver.o56(tmp$ret$172, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_17 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_191 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$174 = isInterface(tmp_191, TypeToken) ? tmp_191 : THROW_CCE();
      var this_18 = new ImplWithScope(tmp$ret$174, scope_17);
      var creator_33 = DomainDiModuleJs$lambda$lambda_33;
      var tmp_192 = this_18.c56();
      var tmp_193 = this_18.b56();
      var tmp_194 = this_18.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_195 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$176 = isInterface(tmp_195, TypeToken) ? tmp_195 : THROW_CCE();
      var tmp$ret$177 = new Singleton(tmp_192, tmp_193, tmp_194, tmp$ret$176, null, true, creator_33);
      tmp_190.c5b(tmp$ret$177);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_196 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$178 = isInterface(tmp_196, TypeToken) ? tmp_196 : THROW_CCE();
      var tmp_197 = $this$$receiver.o56(tmp$ret$178, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_18 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_198 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$180 = isInterface(tmp_198, TypeToken) ? tmp_198 : THROW_CCE();
      var this_19 = new ImplWithScope(tmp$ret$180, scope_18);
      var creator_34 = DomainDiModuleJs$lambda$lambda_34;
      var tmp_199 = this_19.c56();
      var tmp_200 = this_19.b56();
      var tmp_201 = this_19.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_202 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$182 = isInterface(tmp_202, TypeToken) ? tmp_202 : THROW_CCE();
      var tmp$ret$183 = new Singleton(tmp_199, tmp_200, tmp_201, tmp$ret$182, null, true, creator_34);
      tmp_197.c5b(tmp$ret$183);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_203 = typeToken(createKType(getKClass(SaveStatementOnClearUseCase), arrayOf([]), false));
      var tmp$ret$184 = isInterface(tmp_203, TypeToken) ? tmp_203 : THROW_CCE();
      var tmp_204 = $this$$receiver.o56(tmp$ret$184, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_19 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_205 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$186 = isInterface(tmp_205, TypeToken) ? tmp_205 : THROW_CCE();
      var this_20 = new ImplWithScope(tmp$ret$186, scope_19);
      var creator_35 = DomainDiModuleJs$lambda$lambda_35;
      var tmp_206 = this_20.c56();
      var tmp_207 = this_20.b56();
      var tmp_208 = this_20.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_209 = typeToken(createKType(getKClass(SaveStatementOnClearUseCaseJs), arrayOf([]), false));
      var tmp$ret$188 = isInterface(tmp_209, TypeToken) ? tmp_209 : THROW_CCE();
      var tmp$ret$189 = new Singleton(tmp_206, tmp_207, tmp_208, tmp$ret$188, null, true, creator_35);
      tmp_204.c5b(tmp$ret$189);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_210 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCase), arrayOf([]), false));
      var tmp$ret$190 = isInterface(tmp_210, TypeToken) ? tmp_210 : THROW_CCE();
      var tmp_211 = $this$$receiver.o56(tmp$ret$190, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_20 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_212 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$192 = isInterface(tmp_212, TypeToken) ? tmp_212 : THROW_CCE();
      var this_21 = new ImplWithScope(tmp$ret$192, scope_20);
      var creator_36 = DomainDiModuleJs$lambda$lambda_36;
      var tmp_213 = this_21.c56();
      var tmp_214 = this_21.b56();
      var tmp_215 = this_21.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_216 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCaseJs), arrayOf([]), false));
      var tmp$ret$194 = isInterface(tmp_216, TypeToken) ? tmp_216 : THROW_CCE();
      var tmp$ret$195 = new Singleton(tmp_213, tmp_214, tmp_215, tmp$ret$194, null, true, creator_36);
      tmp_211.c5b(tmp$ret$195);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_217 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$196 = isInterface(tmp_217, TypeToken) ? tmp_217 : THROW_CCE();
      var tmp_218 = $this$$receiver.o56(tmp$ret$196, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_21 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_219 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$198 = isInterface(tmp_219, TypeToken) ? tmp_219 : THROW_CCE();
      var this_22 = new ImplWithScope(tmp$ret$198, scope_21);
      var creator_37 = DomainDiModuleJs$lambda$lambda_37;
      var tmp_220 = this_22.c56();
      var tmp_221 = this_22.b56();
      var tmp_222 = this_22.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_223 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$200 = isInterface(tmp_223, TypeToken) ? tmp_223 : THROW_CCE();
      var tmp$ret$201 = new Singleton(tmp_220, tmp_221, tmp_222, tmp$ret$200, null, true, creator_37);
      tmp_218.c5b(tmp$ret$201);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_224 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$202 = isInterface(tmp_224, TypeToken) ? tmp_224 : THROW_CCE();
      var tmp_225 = $this$$receiver.o56(tmp$ret$202, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_22 = Companion_getInstance_17().wnt_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_226 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$204 = isInterface(tmp_226, TypeToken) ? tmp_226 : THROW_CCE();
      var this_23 = new ImplWithScope(tmp$ret$204, scope_22);
      var creator_38 = DomainDiModuleJs$lambda$lambda_38;
      var tmp_227 = this_23.c56();
      var tmp_228 = this_23.b56();
      var tmp_229 = this_23.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_230 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$206 = isInterface(tmp_230, TypeToken) ? tmp_230 : THROW_CCE();
      var tmp$ret$207 = new Singleton(tmp_227, tmp_228, tmp_229, tmp$ret$206, null, true, creator_38);
      tmp_225.c5b(tmp$ret$207);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_231 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
      var tmp$ret$208 = isInterface(tmp_231, TypeToken) ? tmp_231 : THROW_CCE();
      var tmp_232 = $this$$receiver.o56(tmp$ret$208, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_23 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_233 = typeToken(createKType(getKClass(LearningSpace), arrayOf([]), false));
      var tmp$ret$210 = isInterface(tmp_233, TypeToken) ? tmp_233 : THROW_CCE();
      var this_24 = new ImplWithScope(tmp$ret$210, scope_23);
      var creator_39 = DomainDiModuleJs$lambda$lambda_39;
      var tmp_234 = this_24.c56();
      var tmp_235 = this_24.b56();
      var tmp_236 = this_24.d56();
      // Inline function 'org.kodein.type.generic' call
      var tmp_237 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$212 = isInterface(tmp_237, TypeToken) ? tmp_237 : THROW_CCE();
      var tmp$ret$213 = new Singleton(tmp_234, tmp_235, tmp_236, tmp$ret$212, null, true, creator_39);
      tmp_232.c5b(tmp$ret$213);
      return Unit_instance;
    };
  }
  function StringProviderJs(locale, jsStringProvider) {
    this.e122_1 = locale;
    this.f122_1 = jsStringProvider;
  }
  protoOf(StringProviderJs).lq8 = function (stringResource) {
    return stringResource.hm8(this.f122_1, this.e122_1);
  };
  protoOf(StringProviderJs).g122 = function (stringResource, args) {
    return stringResource.im8(this.f122_1, this.e122_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.q72_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_209() {
    this.h122_1 = '_handleId';
  }
  var Companion_instance_258;
  function Companion_getInstance_226() {
    return Companion_instance_258;
  }
  function SavedStateHandle2(history, searchParams) {
    this.i122_1 = history;
    this.j122_1 = searchParams;
    var storedHandleId = this.ba('_handleId');
    if (storedHandleId == null) {
      this.k122_1 = Default_getInstance_0().fg().toString();
      setStateKey(this.i122_1, this, '_handleId', this.k122_1);
    } else {
      this.k122_1 = storedHandleId;
    }
  }
  protoOf(SavedStateHandle2).aqj = function (key, value) {
    var tmp0_safe_receiver = this.i122_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.k122_1) {
      throw IllegalStateException_init_$Create$('SavedState cannot save values after the user has changed page');
    }
    if (!(value == null)) {
      setStateKey(this.i122_1, this, key, value);
    }
  };
  protoOf(SavedStateHandle2).ba = function (key) {
    var tmp0_safe_receiver = this.i122_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.j122_1.get(key) : tmp3_elvis_lhs;
  };
  function UrlKmp(url) {
    return new UrlKmpJs(new URL(url));
  }
  function UrlKmpJs(url) {
    this.l122_1 = url;
  }
  protoOf(UrlKmpJs).toString = function () {
    return toString(this.l122_1);
  };
  protoOf(UrlKmpJs).gp2 = function (path) {
    return new UrlKmpJs(new URL(path, toString(this.l122_1)));
  };
  function Companion_210() {
  }
  protoOf(Companion_210).uqc = function (text) {
    return encodeURIComponent(text);
  };
  protoOf(Companion_210).tqc = function (text) {
    return decodeURIComponent(text);
  };
  var Companion_instance_259;
  function Companion_getInstance_227() {
    return Companion_instance_259;
  }
  function UstadAntilog(defaultTag) {
    defaultTag = defaultTag === VOID ? 'NoTag' : defaultTag;
    Antilog.call(this);
    this.m122_1 = defaultTag;
  }
  protoOf(UstadAntilog).t5d = 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).v5d = function (priority, tag, throwable, message) {
    var logTag = tag == null ? this.m122_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.n122_1 = headers;
  }
  protoOf(JsHeaderStringValuesAdapter).n2n = function (key) {
    var tmp0_safe_receiver = this.n122_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).o2n = function () {
    return toSet_0(this.n122_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).c57 = get_diContext;
  protoOf(AuthManager).d57 = get_diTrigger;
  protoOf($serializer).l4g = typeParametersSerializers;
  protoOf($serializer_0).l4g = typeParametersSerializers;
  protoOf($serializer_1).l4g = typeParametersSerializers;
  protoOf($serializer_2).l4g = typeParametersSerializers;
  protoOf($serializer_3).l4g = typeParametersSerializers;
  protoOf($serializer_4).l4g = typeParametersSerializers;
  protoOf($serializer_5).l4g = typeParametersSerializers;
  protoOf($serializer_6).l4g = typeParametersSerializers;
  protoOf($serializer_7).l4g = typeParametersSerializers;
  protoOf($serializer_8).l4g = typeParametersSerializers;
  protoOf($serializer_9).l4g = typeParametersSerializers;
  protoOf($serializer_10).l4g = typeParametersSerializers;
  protoOf($serializer_11).l4g = typeParametersSerializers;
  protoOf($serializer_12).l4g = typeParametersSerializers;
  protoOf($serializer_13).l4g = typeParametersSerializers;
  protoOf($serializer_14).l4g = typeParametersSerializers;
  protoOf($serializer_15).l4g = typeParametersSerializers;
  protoOf($serializer_16).l4g = typeParametersSerializers;
  protoOf($serializer_17).l4g = typeParametersSerializers;
  protoOf($serializer_18).l4g = typeParametersSerializers;
  protoOf($serializer_19).l4g = typeParametersSerializers;
  protoOf($serializer_20).l4g = typeParametersSerializers;
  protoOf($serializer_21).l4g = typeParametersSerializers;
  protoOf($serializer_22).l4g = typeParametersSerializers;
  protoOf($serializer_23).l4g = typeParametersSerializers;
  protoOf($serializer_24).l4g = typeParametersSerializers;
  protoOf($serializer_25).l4g = typeParametersSerializers;
  protoOf($serializer_26).l4g = typeParametersSerializers;
  protoOf($serializer_27).l4g = typeParametersSerializers;
  protoOf($serializer_28).l4g = typeParametersSerializers;
  protoOf($serializer_29).l4g = typeParametersSerializers;
  protoOf($serializer_30).l4g = typeParametersSerializers;
  protoOf($serializer_31).l4g = typeParametersSerializers;
  protoOf($serializer_32).l4g = typeParametersSerializers;
  protoOf($serializer_33).l4g = typeParametersSerializers;
  protoOf($serializer_34).l4g = typeParametersSerializers;
  protoOf($serializer_35).l4g = typeParametersSerializers;
  protoOf($serializer_36).l4g = typeParametersSerializers;
  protoOf($serializer_37).l4g = typeParametersSerializers;
  protoOf($serializer_38).l4g = typeParametersSerializers;
  protoOf($serializer_39).l4g = typeParametersSerializers;
  protoOf($serializer_40).l4g = typeParametersSerializers;
  protoOf($serializer_41).l4g = typeParametersSerializers;
  protoOf($serializer_42).l4g = typeParametersSerializers;
  protoOf($serializer_43).l4g = typeParametersSerializers;
  protoOf($serializer_44).l4g = typeParametersSerializers;
  protoOf($serializer_45).l4g = typeParametersSerializers;
  protoOf($serializer_46).l4g = typeParametersSerializers;
  protoOf($serializer_47).l4g = typeParametersSerializers;
  protoOf($serializer_48).l4g = typeParametersSerializers;
  protoOf($serializer_49).l4g = typeParametersSerializers;
  protoOf($serializer_50).l4g = typeParametersSerializers;
  protoOf($serializer_51).l4g = typeParametersSerializers;
  protoOf($serializer_52).l4g = typeParametersSerializers;
  protoOf($serializer_53).l4g = typeParametersSerializers;
  protoOf($serializer_54).l4g = typeParametersSerializers;
  protoOf($serializer_55).l4g = typeParametersSerializers;
  protoOf($serializer_56).l4g = typeParametersSerializers;
  protoOf($serializer_57).l4g = typeParametersSerializers;
  protoOf($serializer_58).l4g = typeParametersSerializers;
  protoOf(CommandFlowUstadNavController).kp6 = navigate$default;
  protoOf(UstadViewModel).c57 = get_diContext;
  protoOf(UstadViewModel).d57 = get_diTrigger;
  protoOf($serializer_59).l4g = typeParametersSerializers;
  protoOf($serializer_60).l4g = typeParametersSerializers;
  protoOf($serializer_61).l4g = typeParametersSerializers;
  protoOf($serializer_62).l4g = typeParametersSerializers;
  protoOf($serializer_63).l4g = typeParametersSerializers;
  protoOf($serializer_64).l4g = typeParametersSerializers;
  protoOf($serializer_65).l4g = typeParametersSerializers;
  protoOf(SaveLocalUrisAsBlobUseCaseJs).for = invoke$default;
  protoOf(CompressImageUseCaseJs).rot = invoke$default_2;
  protoOf(GetSubtitleTrackFromUriUseCaseJs).rp3 = invoke$default_3;
  protoOf(SetLanguageUseCaseJs).gpi = invoke$default_4;
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).npn = invoke$default_5;
  //endregion
  //region block: init
  Companion_instance_48 = new Companion();
  Companion_instance_50 = new Companion_1();
  Companion_instance_51 = new Companion_2();
  Companion_instance_53 = new Companion_4();
  Companion_instance_54 = new Companion_5();
  Companion_instance_55 = new Companion_6();
  BodySerializer_instance = new BodySerializer();
  Companion_instance_56 = new Companion_7();
  Companion_instance_57 = new Companion_8();
  Companion_instance_58 = new Companion_9();
  Companion_instance_60 = new Companion_11();
  Companion_instance_65 = new Companion_16();
  Companion_instance_66 = new Companion_17();
  Companion_instance_67 = new Companion_18();
  Companion_instance_68 = new Companion_19();
  Companion_instance_69 = new Companion_20();
  Companion_instance_70 = new Companion_21();
  Companion_instance_71 = new Companion_22();
  Companion_instance_73 = new Companion_24();
  Companion_instance_75 = new Companion_26();
  Companion_instance_80 = new Companion_31();
  Companion_instance_81 = new Companion_32();
  Companion_instance_82 = new Companion_33();
  Companion_instance_83 = new Companion_34();
  Companion_instance_84 = new Companion_35();
  Companion_instance_85 = new Companion_36();
  Companion_instance_87 = new Companion_38();
  Companion_instance_88 = new Companion_39();
  Companion_instance_89 = new Companion_40();
  Companion_instance_90 = new Companion_41();
  Companion_instance_91 = new Companion_42();
  Companion_instance_92 = new Companion_43();
  Companion_instance_93 = new Companion_44();
  Companion_instance_94 = new Companion_45();
  Companion_instance_96 = new Companion_47();
  Companion_instance_98 = new Companion_49();
  Companion_instance_99 = new Companion_50();
  Companion_instance_100 = new Companion_51();
  Companion_instance_101 = new Companion_52();
  Companion_instance_102 = new Companion_53();
  Companion_instance_103 = new Companion_54();
  Companion_instance_104 = new Companion_55();
  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_109 = new Companion_60();
  Companion_instance_112 = new Companion_63();
  Companion_instance_113 = new Companion_64();
  Companion_instance_115 = new Companion_66();
  XapiInteractionTypeSerializer_instance = new XapiInteractionTypeSerializer();
  XapiObjectTypeSerializer_instance = new XapiObjectTypeSerializer();
  Companion_instance_120 = new Companion_71();
  XAPI_RESULT_EXTENSION_PROGRESS = 'https://w3id.org/xapi/cmi5/result/extensions/progress';
  Companion_instance_123 = new Companion_74();
  Companion_instance_124 = new Companion_75();
  VERB_COMPLETED = 'http://adlnet.gov/expapi/verbs/completed';
  VERB_PROGRESSED = 'http://adlnet.gov/expapi/verbs/progressed';
  Companion_instance_130 = new Companion_81();
  Companion_instance_131 = new Companion_82();
  Companion_instance_132 = new Companion_83();
  Companion_instance_133 = new Companion_84();
  Companion_instance_135 = new Companion_86();
  Companion_instance_136 = new Companion_87();
  DiTag_instance = new DiTag();
  MS_PER_HOUR = 3600000;
  MS_PER_MIN = 60000;
  Companion_instance_138 = new Companion_89();
  UNSET_DISTANT_FUTURE = new Long(-289930240, 1689);
  Companion_instance_139 = new Companion_90();
  Companion_instance_140 = new Companion_91();
  Companion_instance_141 = new Companion_92();
  Companion_instance_142 = new Companion_93();
  Companion_instance_143 = new Companion_94();
  Companion_instance_144 = new Companion_95();
  Companion_instance_145 = new Companion_96();
  Companion_instance_146 = new Companion_97();
  Companion_instance_149 = new Companion_100();
  Companion_instance_150 = new Companion_101();
  Companion_instance_151 = new Companion_102();
  Companion_instance_152 = new Companion_103();
  Companion_instance_153 = new Companion_104();
  Companion_instance_154 = new Companion_105();
  Companion_instance_156 = new Companion_107();
  Companion_instance_158 = new Companion_109();
  Companion_instance_159 = new Companion_110();
  Companion_instance_160 = new Companion_111();
  Companion_instance_161 = new Companion_112();
  Companion_instance_162 = new Companion_113();
  Companion_instance_163 = new Companion_114();
  Companion_instance_165 = new Companion_116();
  Companion_instance_167 = new Companion_118();
  Companion_instance_168 = new Companion_119();
  Companion_instance_169 = new Companion_120();
  Companion_instance_170 = new Companion_121();
  Companion_instance_171 = new Companion_122();
  Companion_instance_174 = new Companion_125();
  Companion_instance_175 = new Companion_126();
  Companion_instance_176 = new Companion_127();
  Companion_instance_177 = new Companion_128();
  Companion_instance_178 = new Companion_129();
  Companion_instance_179 = new Companion_130();
  Companion_instance_181 = new Companion_132();
  Companion_instance_182 = new Companion_133();
  Companion_instance_184 = new Companion_135();
  Companion_instance_185 = new Companion_136();
  Companion_instance_186 = new Companion_137();
  Companion_instance_187 = new Companion_138();
  Companion_instance_188 = new Companion_139();
  Companion_instance_189 = new Companion_140();
  Companion_instance_190 = new Companion_141();
  Companion_instance_191 = new Companion_142();
  Companion_instance_193 = new Companion_144();
  Companion_instance_194 = new Companion_145();
  Companion_instance_195 = new Companion_146();
  Companion_instance_196 = new Companion_147();
  Companion_instance_197 = new Companion_148();
  Companion_instance_198 = new Companion_149();
  Companion_instance_199 = new Companion_150();
  Companion_instance_200 = new Companion_151();
  Companion_instance_203 = new Companion_154();
  Companion_instance_204 = new Companion_155();
  Companion_instance_208 = new Companion_159();
  Companion_instance_209 = new Companion_160();
  Companion_instance_210 = new Companion_161();
  Companion_instance_211 = new Companion_162();
  Companion_instance_213 = new Companion_164();
  Companion_instance_214 = new Companion_165();
  Companion_instance_215 = new Companion_166();
  Companion_instance_216 = new Companion_167();
  Companion_instance_217 = new Companion_168();
  Companion_instance_218 = new Companion_169();
  Companion_instance_219 = new Companion_170();
  Companion_instance_220 = new Companion_171();
  Companion_instance_221 = new Companion_172();
  Companion_instance_223 = new Companion_174();
  Companion_instance_224 = new Companion_175();
  Companion_instance_225 = new Companion_176();
  PersonViewModelConstants_instance = new PersonViewModelConstants();
  Companion_instance_226 = new Companion_177();
  Companion_instance_227 = new Companion_178();
  Companion_instance_228 = new Companion_179();
  Companion_instance_230 = new Companion_181();
  Companion_instance_231 = new Companion_182();
  Companion_instance_232 = new Companion_183();
  Companion_instance_233 = new Companion_184();
  Companion_instance_235 = new Companion_186();
  Companion_instance_237 = new Companion_188();
  Companion_instance_238 = new Companion_189();
  Companion_instance_239 = new Companion_190();
  Companion_instance_240 = new Companion_191();
  Companion_instance_241 = new Companion_192();
  Companion_instance_242 = new Companion_193();
  Companion_instance_243 = new Companion_194();
  Companion_instance_244 = new Companion_195();
  Companion_instance_246 = new Companion_197();
  Companion_instance_247 = new Companion_198();
  Companion_instance_248 = new Companion_199();
  Companion_instance_249 = new Companion_200();
  Companion_instance_251 = new Companion_202();
  Companion_instance_252 = new Companion_203();
  Companion_instance_253 = new Companion_204();
  Companion_instance_254 = new Companion_205();
  Companion_instance_255 = new Companion_206();
  NAVHOST_CLEARSTACK_VIEWNAME = 'ClearStack';
  Companion_instance_256 = new Companion_207();
  Companion_instance_257 = new Companion_208();
  Companion_instance_258 = new Companion_209();
  Companion_instance_259 = new Companion_210();
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = AuthManager;
  _.$_$.b = LearningSpace;
  _.$_$.c = Pbkdf2Params;
  _.$_$.d = UserSessionWithPersonAndLearningSpace;
  _.$_$.e = UstadAccountManager;
  _.$_$.f = get_DIContext;
  _.$_$.g = get_DIModule;
  _.$_$.h = get_NAVHOST_CLEARSTACK_VIEWNAME;
  _.$_$.i = get_NavHost;
  _.$_$.j = get_NavHostClearStackPlaceholder;
  _.$_$.k = EnrolIntoCourseUseCase;
  _.$_$.l = get_entries;
  _.$_$.m = ContentEntryGetMetadataStatus;
  _.$_$.n = FilterUsernameUseCase;
  _.$_$.o = VersionInfo;
  _.$_$.p = GetVersionUseCase;
  _.$_$.q = ClazzInviteRedeemUseCase;
  _.$_$.r = EnrollToCourseFromInviteCodeUseCase;
  _.$_$.s = GoToLearningSpaceUseCaseJs;
  _.$_$.t = GoToLearningSpaceUseCase;
  _.$_$.u = GetLocalAccountsSupportedUseCase;
  _.$_$.v = OnClickLinkUseCase;
  _.$_$.w = OpenExternalLinkUseCase;
  _.$_$.x = BulkAddPersonsFromLocalUriUseCaseJs;
  _.$_$.y = BulkAddPersonsFromLocalUriUseCase;
  _.$_$.z = GetShowPoweredByUseCase;
  _.$_$.a1 = DismissSocialWarningUseCase;
  _.$_$.b1 = ShowSocialWarningUseCase;
  _.$_$.c1 = ValidateUsernameUseCase_0;
  _.$_$.d1 = FormattedStatementResponse;
  _.$_$.e1 = collectAsState;
  _.$_$.f1 = useCoroutineScope;
  _.$_$.g1 = useLaunchedEffect;
  _.$_$.h1 = useNavControllerEffect;
  _.$_$.i1 = useOnUnloadEffect;
  _.$_$.j1 = useStringProvider;
  _.$_$.k1 = useViewModel;
  _.$_$.l1 = get_ustadViewName;
  _.$_$.m1 = AppUiState;
  _.$_$.n1 = SnackBarDispatcher;
  _.$_$.o1 = TabItem;
  _.$_$.p1 = BuildConfigMap;
  _.$_$.q1 = GenderConfig;
  _.$_$.r1 = SupportedLanguagesConfig;
  _.$_$.s1 = SystemUrlConfig;
  _.$_$.t1 = UstadBuildConfig;
  _.$_$.u1 = DomainDiModuleJs;
  _.$_$.v1 = commonClientDomainDiModule;
  _.$_$.w1 = commonDomainDiModule;
  _.$_$.x1 = StringProviderJs;
  _.$_$.y1 = mapLookup;
  _.$_$.z1 = CommandFlowUstadNavController;
  _.$_$.a2 = NavResultReturnerImpl;
  _.$_$.b2 = NavResultReturner;
  _.$_$.c2 = UstadMobileSystemImpl;
  _.$_$.d2 = BitmaskFlag;
  _.$_$.e2 = ListPagingSource;
  _.$_$.f2 = RefreshCommand;
  _.$_$.g2 = get_totalAttendeeStatusRecorded;
  _.$_$.h2 = capitalizeFirstLetter;
  _.$_$.i2 = chopOffSeconds_0;
  _.$_$.j2 = chopOffSeconds;
  _.$_$.k2 = displayName;
  _.$_$.l2 = filterByFlags;
  _.$_$.m2 = forEach;
  _.$_$.n2 = formattedString;
  _.$_$.o2 = getOrPut;
  _.$_$.p2 = hasFlag_0;
  _.$_$.q2 = htmlToPlainText;
  _.$_$.r2 = initial;
  _.$_$.s2 = maxScoreSummedIfModule;
  _.$_$.t2 = penaltyPercentage;
  _.$_$.u2 = personFullName;
  _.$_$.v2 = get_progressAsFloat;
  _.$_$.w2 = requirePostfix;
  _.$_$.x2 = rgbColorProperty;
  _.$_$.y2 = textLength;
  _.$_$.z2 = toDisplayString;
  _.$_$.a3 = toNullIfBlank;
  _.$_$.b3 = toTerminologyEntries;
  _.$_$.c3 = get_MS_PER_HOUR;
  _.$_$.d3 = get_MS_PER_MIN;
  _.$_$.e3 = MessageIdOption2;
  _.$_$.f3 = SortOrderOption;
  _.$_$.g3 = UstadAntilog;
  _.$_$.h3 = avatarColorForName;
  _.$_$.i3 = OpenLicensesViewModel;
  _.$_$.j3 = AddAccountSelectNewOrExistingUiState;
  _.$_$.k3 = AddAccountSelectNewOrExistingViewModel;
  _.$_$.l3 = AddAccountSelectNewOrExistingUserTypeUiState;
  _.$_$.m3 = AddAccountSelectNewOrExistingUserTypeViewModel;
  _.$_$.n3 = AccountListUiState;
  _.$_$.o3 = AccountListViewModel;
  _.$_$.p3 = ClazzDetailUiState;
  _.$_$.q3 = ClazzDetailViewModel;
  _.$_$.r3 = ClazzDetailOverviewUiState;
  _.$_$.s3 = ClazzDetailOverviewViewModel;
  _.$_$.t3 = ClazzEditUiState;
  _.$_$.u3 = ClazzEditViewModel;
  _.$_$.v3 = ClazzGradebookUiState;
  _.$_$.w3 = ClazzGradebookViewModel;
  _.$_$.x3 = aggregateIfModule;
  _.$_$.y3 = displayMarkFor;
  _.$_$.z3 = maxScoreForBlock;
  _.$_$.a4 = get_thumbnailUri;
  _.$_$.b4 = ClazzInviteRedeemUiState;
  _.$_$.c4 = ClazzInviteRedeemViewModel;
  _.$_$.d4 = ClazzInviteViaContactUiState;
  _.$_$.e4 = ClazzInviteViaContactViewModel;
  _.$_$.f4 = ClazzInviteViaLinkUiState;
  _.$_$.g4 = ClazzInviteViaLinkViewModel;
  _.$_$.h4 = JoinWithCodeUiState;
  _.$_$.i4 = JoinWithCodeViewModel;
  _.$_$.j4 = ClazzListUiState;
  _.$_$.k4 = ClazzListViewModel;
  _.$_$.l4 = CoursePermissionDetailUiState;
  _.$_$.m4 = CoursePermissionDetailViewModel;
  _.$_$.n4 = CoursePermissionEditUiState;
  _.$_$.o4 = CoursePermissionEditViewModel;
  _.$_$.p4 = CoursePermissionListUiState;
  _.$_$.q4 = CoursePermissionListViewModel;
  _.$_$.r4 = get_blockTypeStringResource;
  _.$_$.s4 = defaultCourseBannerImageIndex;
  _.$_$.t4 = AssignmentSubmitterSummaryUiState;
  _.$_$.u4 = ClazzAssignmentDetailSubmissionsTabUiState;
  _.$_$.v4 = ClazzAssignmentDetailSubmissionsTabViewModel;
  _.$_$.w4 = get_listItemUiState;
  _.$_$.x4 = ClazzAssignmentDetailUiState;
  _.$_$.y4 = ClazzAssignmentDetailViewModel;
  _.$_$.z4 = ClazzAssignmentDetailOverviewUiState;
  _.$_$.a5 = ClazzAssignmentDetailOverviewViewModel;
  _.$_$.b5 = ClazzAssignmentDetailoverviewSubmissionUiState;
  _.$_$.c5 = ClazzAssignmentEditUiState;
  _.$_$.d5 = ClazzAssignmentEditViewModel;
  _.$_$.e5 = PeerReviewerAllocationEditUIState;
  _.$_$.f5 = PeerReviewerAllocationEditViewModel;
  _.$_$.g5 = ClazzAssignmentSubmitterDetailUiState;
  _.$_$.h5 = ClazzAssignmentSubmitterDetailViewModel;
  _.$_$.i5 = get_entries_1;
  _.$_$.j5 = values_2;
  _.$_$.k5 = UstadCourseAssignmentMarkListItemUiState;
  _.$_$.l5 = avatarColorName;
  _.$_$.m5 = avatarName;
  _.$_$.n5 = get_isFromSubmitterGroup;
  _.$_$.o5 = ClazzMemberListUiState;
  _.$_$.p5 = ClazzMemberListViewModel;
  _.$_$.q5 = ClazzEnrolmentEditUiState;
  _.$_$.r5 = ClazzEnrolmentEditViewModel;
  _.$_$.s5 = ClazzEnrolmentListUiState;
  _.$_$.t5 = ClazzEnrolmentListViewModel;
  _.$_$.u5 = ClazzLogListAttendanceUiState;
  _.$_$.v5 = ClazzLogListAttendanceViewModel;
  _.$_$.w5 = ClazzLogEditUiState;
  _.$_$.x5 = ClazzLogEditViewModel;
  _.$_$.y5 = ClazzLogEditAttendanceUiState;
  _.$_$.z5 = ClazzLogEditAttendanceViewModel;
  _.$_$.a6 = ContentEntryDetailUiState;
  _.$_$.b6 = ContentEntryDetailViewModel;
  _.$_$.c6 = ContentEntryDetailAttemptsPersonListUiState;
  _.$_$.d6 = ContentEntryDetailAttemptsPersonListViewModel;
  _.$_$.e6 = ContentEntryDetailAttemptsSessionListUiState;
  _.$_$.f6 = ContentEntryDetailAttemptsSessionListViewModel;
  _.$_$.g6 = ContentEntryDetailAttemptsStatementListUiState;
  _.$_$.h6 = ContentEntryDetailAttemptsStatementListViewModel;
  _.$_$.i6 = get_descriptionStringRes;
  _.$_$.j6 = get_statementSummary;
  _.$_$.k6 = get_statementSummary_0;
  _.$_$.l6 = get_verbDisplayName;
  _.$_$.m6 = ContentEntryDetailOverviewUiState;
  _.$_$.n6 = ContentEntryDetailOverviewViewModel;
  _.$_$.o6 = get_progress;
  _.$_$.p6 = ContentEntryEditUiState;
  _.$_$.q6 = ContentEntryEditViewModel;
  _.$_$.r6 = ContentEntryGetMetadataUiState;
  _.$_$.s6 = ContentEntryGetMetadataViewModel;
  _.$_$.t6 = GetSubtitleUiState;
  _.$_$.u6 = GetSubtitleViewModel;
  _.$_$.v6 = ContentEntryImportLinkUiState;
  _.$_$.w6 = ContentEntryImportLinkViewModel;
  _.$_$.x6 = ContentEntryListItemUiState;
  _.$_$.y6 = ContentEntryListUiState;
  _.$_$.z6 = ContentEntryListViewModel;
  _.$_$.a7 = get_listItemUiState_0;
  _.$_$.b7 = SubtitleEditUiState;
  _.$_$.c7 = SubtitleEditViewModel;
  _.$_$.d7 = get_contentTypeStringResource;
  _.$_$.e7 = get_stringResource;
  _.$_$.f7 = CourseBlockEditUiState;
  _.$_$.g7 = CourseBlockEditViewModel;
  _.$_$.h7 = TextBlockDetailUiState;
  _.$_$.i7 = TextBlockDetailViewModel;
  _.$_$.j7 = CourseGroupSetDetailUiState;
  _.$_$.k7 = CourseGroupSetDetailViewModel;
  _.$_$.l7 = CourseGroupSetEditUiState;
  _.$_$.m7 = CourseGroupSetEditViewModel;
  _.$_$.n7 = appendGroupNumIfNotInList;
  _.$_$.o7 = CourseGroupSetListUiState;
  _.$_$.p7 = CourseGroupSetListViewModel;
  _.$_$.q7 = CourseTerminologyEditUiState;
  _.$_$.r7 = CourseTerminologyEditViewModel;
  _.$_$.s7 = CourseTerminologyListUiState;
  _.$_$.t7 = CourseTerminologyListViewModel;
  _.$_$.u7 = DeletedItemListUiState;
  _.$_$.v7 = DeletedItemListViewModel;
  _.$_$.w7 = get_delItemContentTypeStringResource;
  _.$_$.x7 = CourseDiscussionDetailUiState;
  _.$_$.y7 = CourseDiscussionDetailViewModel;
  _.$_$.z7 = DiscussionPostDetailUiState2;
  _.$_$.a8 = DiscussionPostDetailViewModel;
  _.$_$.b8 = DiscussionPostEditUiState;
  _.$_$.c8 = DiscussionPostEditViewModel;
  _.$_$.d8 = EpubContentUiState;
  _.$_$.e8 = EpubContentViewModel;
  _.$_$.f8 = EpubScrollCommand;
  _.$_$.g8 = LoginUiState;
  _.$_$.h8 = LoginViewModel;
  _.$_$.i8 = ConversationListUiState;
  _.$_$.j8 = ConversationListViewModel;
  _.$_$.k8 = MessageListUiState;
  _.$_$.l8 = MessageListViewModel;
  _.$_$.m8 = daysUntil_0;
  _.$_$.n8 = ParentalConsentManagementUiState;
  _.$_$.o8 = ParentalConsentManagementViewModel;
  _.$_$.p8 = PdfContentUiState;
  _.$_$.q8 = PdfContentViewModel;
  _.$_$.r8 = PersonAccountEditUiState;
  _.$_$.s8 = PersonAccountEditViewModel;
  _.$_$.t8 = PersonUsernameAndPasswordModel;
  _.$_$.u8 = BulkAddPersonRunImportUiState;
  _.$_$.v8 = BulkAddPersonRunImportViewModel;
  _.$_$.w8 = BulkAddPersonSelectFileUiState;
  _.$_$.x8 = BulkAddPersonSelectFileViewModel;
  _.$_$.y8 = AddChildProfilesUiState;
  _.$_$.z8 = AddChildProfilesViewModel;
  _.$_$.a9 = EditChildProfileUiState;
  _.$_$.b9 = EditChildProfileViewModel;
  _.$_$.c9 = PersonDetailUiState;
  _.$_$.d9 = PersonDetailViewModel;
  _.$_$.e9 = PersonEditUiState;
  _.$_$.f9 = PersonEditViewModel;
  _.$_$.g9 = LearningSpaceListUiState;
  _.$_$.h9 = LearningSpaceListViewModel;
  _.$_$.i9 = PersonListUiState;
  _.$_$.j9 = PersonListViewModel;
  _.$_$.k9 = ManageAccountUiState;
  _.$_$.l9 = ManageAccountViewModel;
  _.$_$.m9 = RegisterAgeRedirectUiState;
  _.$_$.n9 = RegisterAgeRedirectViewModel;
  _.$_$.o9 = RegisterMinorWaitForParentUiState;
  _.$_$.p9 = RegisterMinorWaitForParentViewModel;
  _.$_$.q9 = RedirectViewModel;
  _.$_$.r9 = ScheduleEditUiState;
  _.$_$.s9 = ScheduleEditViewModel;
  _.$_$.t9 = SettingsUiState;
  _.$_$.u9 = SettingsViewModel;
  _.$_$.v9 = SignUpUiState;
  _.$_$.w9 = SignUpViewModel;
  _.$_$.x9 = SignupEnterUsernamePasswordUiState;
  _.$_$.y9 = SignupEnterUsernamePasswordViewModel;
  _.$_$.z9 = SiteDetailUiState;
  _.$_$.aa = SiteDetailViewModel;
  _.$_$.ba = SiteEditUiState;
  _.$_$.ca = SiteEditViewModel;
  _.$_$.da = SiteTermsDetailUiState;
  _.$_$.ea = SiteTermsDetailViewModel;
  _.$_$.fa = LearningSpaceEnterLinkUiState;
  _.$_$.ga = LearningSpaceEnterLinkViewModel;
  _.$_$.ha = SystemPermissionDetailUiState;
  _.$_$.ia = SystemPermissionDetailViewModel;
  _.$_$.ja = SystemPermissionEditUiState;
  _.$_$.ka = SystemPermissionEditViewModel;
  _.$_$.la = TimeZoneListViewModel;
  _.$_$.ma = TimezoneListUiState;
  _.$_$.na = VideoContentUiState;
  _.$_$.oa = MediaPlayState;
  _.$_$.pa = VideoContentViewModel;
  _.$_$.qa = XapiContentUiState;
  _.$_$.ra = XapiContentViewModel;
  _.$_$.sa = ErrorReportUiState;
  _.$_$.ta = HolidayCalendarDetailUIState;
  _.$_$.ua = HolidayCalendarEditUiState;
  _.$_$.va = HolidayCalendarListUiState;
  _.$_$.wa = LanguageDetailUiState;
  _.$_$.xa = LanguageEditUiState;
  _.$_$.ya = LanguageListUiState;
  _.$_$.za = LeavingReasonEditUiState;
  _.$_$.ab = LeavingReasonEditViewModel;
  _.$_$.bb = ReportFilterEditUiState;
  _.$_$.cb = ScopedGrantDetailUiState;
  _.$_$.db = ScopedGrantEditUiState;
  _.$_$.eb = CompressionLevel_MEDIUM_getInstance;
  _.$_$.fb = LinkTarget_DEFAULT_getInstance;
  _.$_$.gb = AppBarColors_SELECTION_MODE_getInstance;
  _.$_$.hb = AppBarColors_STANDARD_getInstance;
  _.$_$.ib = FabIcon_ADD_getInstance;
  _.$_$.jb = FabIcon_EDIT_getInstance;
  _.$_$.kb = State_INDETERMINATE_getInstance;
  _.$_$.lb = MarkingType_PEERS_getInstance;
  _.$_$.mb = TextLimitType_LIMIT_WORDS_getInstance;
  _.$_$.nb = SupportedLanguagesConfig_init_$Create$;
  _.$_$.ob = _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0;
  _.$_$.pb = _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0;
  _.$_$.qb = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2;
  _.$_$.rb = _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083;
  _.$_$.sb = _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7;
  _.$_$.tb = Companion_getInstance_17;
  _.$_$.ub = PersonConstants_getInstance;
  _.$_$.vb = SubmissionConstants_getInstance;
  _.$_$.wb = Companion_getInstance_54;
  _.$_$.xb = Companion_instance_98;
  _.$_$.yb = Companion_instance_102;
  _.$_$.zb = Companion_getInstance_73;
  _.$_$.ac = Companion_instance_130;
  _.$_$.bc = Companion_instance_131;
  _.$_$.cc = Companion_instance_132;
  _.$_$.dc = Companion_instance_133;
  _.$_$.ec = ClazzEnrolmentListConstants_getInstance;
  _.$_$.fc = ConditionConstants_getInstance;
  _.$_$.gc = ContentCompletionStatusConstants_getInstance;
  _.$_$.hc = EnrolmentPolicyConstants_getInstance;
  _.$_$.ic = FieldConstants_getInstance;
  _.$_$.jc = LicenceConstants_getInstance;
  _.$_$.kc = OutcomeConstants_getInstance;
  _.$_$.lc = PersonParentJoinConstants_getInstance;
  _.$_$.mc = RoleConstants_getInstance;
  _.$_$.nc = ScheduleConstants_getInstance;
  _.$_$.oc = SubmissionPolicyConstants_getInstance;
  _.$_$.pc = UstadMobileConstants_getInstance;
  _.$_$.qc = Companion_getInstance_96;
  _.$_$.rc = DiTag_instance;
  _.$_$.sc = Companion_getInstance_105;
  _.$_$.tc = UMFileUtil_getInstance;
  _.$_$.uc = Companion_instance_138;
  _.$_$.vc = Companion_instance_140;
  _.$_$.wc = Companion_instance_141;
  _.$_$.xc = Companion_instance_142;
  _.$_$.yc = Companion_instance_143;
  _.$_$.zc = Companion_instance_144;
  _.$_$.ad = Companion_instance_145;
  _.$_$.bd = Companion_instance_146;
  _.$_$.cd = Companion_instance_158;
  _.$_$.dd = Companion_instance_159;
  _.$_$.ed = Companion_instance_160;
  _.$_$.fd = Companion_instance_161;
  _.$_$.gd = Companion_instance_162;
  _.$_$.hd = Companion_instance_163;
  _.$_$.id = Companion_instance_165;
  _.$_$.jd = Companion_instance_167;
  _.$_$.kd = Companion_instance_168;
  _.$_$.ld = Companion_instance_169;
  _.$_$.md = Companion_instance_170;
  _.$_$.nd = Companion_instance_171;
  _.$_$.od = Companion_getInstance_141;
  _.$_$.pd = Companion_getInstance_140;
  _.$_$.qd = Companion_instance_174;
  _.$_$.rd = Companion_instance_175;
  _.$_$.sd = Companion_instance_176;
  _.$_$.td = Companion_instance_179;
  _.$_$.ud = Companion_instance_178;
  _.$_$.vd = Companion_instance_181;
  _.$_$.wd = Companion_instance_182;
  _.$_$.xd = Companion_instance_184;
  _.$_$.yd = Companion_instance_185;
  _.$_$.zd = Companion_instance_177;
  _.$_$.ae = ClazzAssignmentViewModelConstants_getInstance;
  _.$_$.be = Companion_instance_186;
  _.$_$.ce = Companion_instance_187;
  _.$_$.de = Companion_instance_188;
  _.$_$.ee = Companion_instance_189;
  _.$_$.fe = Companion_instance_190;
  _.$_$.ge = Companion_instance_191;
  _.$_$.he = Companion_getInstance_160;
  _.$_$.ie = Companion_instance_193;
  _.$_$.je = Companion_instance_194;
  _.$_$.ke = Companion_instance_195;
  _.$_$.le = Companion_instance_196;
  _.$_$.me = Companion_instance_197;
  _.$_$.ne = Companion_instance_198;
  _.$_$.oe = Companion_instance_199;
  _.$_$.pe = Companion_instance_200;
  _.$_$.qe = Companion_getInstance_169;
  _.$_$.re = Companion_instance_204;
  _.$_$.se = Companion_getInstance_174;
  _.$_$.te = Companion_instance_208;
  _.$_$.ue = Companion_getInstance_173;
  _.$_$.ve = Companion_instance_209;
  _.$_$.we = Companion_instance_210;
  _.$_$.xe = Companion_instance_211;
  _.$_$.ye = Companion_instance_213;
  _.$_$.ze = Companion_instance_214;
  _.$_$.af = Companion_instance_215;
  _.$_$.bf = Companion_instance_216;
  _.$_$.cf = Companion_instance_217;
  _.$_$.df = Companion_instance_218;
  _.$_$.ef = Companion_instance_219;
  _.$_$.ff = Companion_instance_221;
  _.$_$.gf = Companion_getInstance_190;
  _.$_$.hf = Companion_instance_223;
  _.$_$.if = Companion_instance_224;
  _.$_$.jf = Companion_instance_225;
  _.$_$.kf = Companion_instance_226;
  _.$_$.lf = Companion_instance_228;
  _.$_$.mf = Companion_instance_230;
  _.$_$.nf = Companion_instance_231;
  _.$_$.of = Companion_instance_232;
  _.$_$.pf = Companion_instance_233;
  _.$_$.qf = Companion_getInstance_202;
  _.$_$.rf = Companion_instance_235;
  _.$_$.sf = Companion_getInstance_204;
  _.$_$.tf = Companion_instance_237;
  _.$_$.uf = Companion_instance_238;
  _.$_$.vf = Companion_instance_239;
  _.$_$.wf = Companion_instance_241;
  _.$_$.xf = Companion_instance_243;
  _.$_$.yf = Companion_getInstance_213;
  _.$_$.zf = Companion_instance_246;
  _.$_$.ag = Companion_instance_247;
  _.$_$.bg = Companion_instance_248;
  _.$_$.cg = Companion_instance_249;
  _.$_$.dg = Companion_getInstance_218;
  _.$_$.eg = Companion_instance_251;
  _.$_$.fg = Companion_instance_252;
  _.$_$.gg = Companion_instance_253;
  _.$_$.hg = Companion_instance_254;
  _.$_$.ig = Companion_instance_255;
  _.$_$.jg = Companion_instance_149;
  _.$_$.kg = Companion_instance_150;
  _.$_$.lg = Companion_instance_151;
  _.$_$.mg = Companion_instance_152;
  _.$_$.ng = Companion_instance_153;
  _.$_$.og = Companion_instance_154;
  _.$_$.pg = Companion_getInstance_125;
  _.$_$.qg = strings_getInstance;
  _.$_$.rg = MR_getInstance;
  //endregion
  return _;
}(module.exports, require('react'), require('react-router'), require('compressorjs'), require('libphonenumber-js'), 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('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./ktor-ktor-http.js'), require('./kotlinx-coroutines-core.js'), require('./door-door-runtime.js'), require('./ktor-ktor-client-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./Napier-napier-js-ir.js'), require('./kotlinx-atomicfu.js'), require('./xmlutil-serialization.js'), require('./xmlutil-core.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('./ktor-ktor-utils.js'), require('./UstadMobile-lib-xxhashkmp-core.js'), require('./multiplatform-paging-root-paging-common.js'), require('./precompose-precompose-viewmodel.js'), require('./UstadMobile-lib-centralappconfigdb-common.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
