{
"request_id":null,
"payload":"function f(){let inputs=arguments,LS=inputs[inputs.length-1],n=LS.n,m=[],output=[],U;return LS.seq([_=>(0,LS.seq([_=>LS.sp(\"executeFirstBlockForSyncTransaction\",[0,1],[1612906737,767440624],\"HCwAABbo5LQDFrjOmeYDEwQA\",\"HCwAABbq5LQDFrjOmeYDEwQA\",[0,2],false,[0,0],false,[0,1],U).then(r=>([m[0]]=r)),_=>((m[0])?(LS.seq([_=>LS.seq([_=>LS.sp(\"checkAuthoritativeMessageExists\",[23286,3841183533],\"6927387501686938352\").then(r=>([m[1]]=r)),_=>((!(m[1]))?(LS.seq([_=>LS.sp(\"verifyThreadExists\",[23286,3841183533],[0,1],\"inbox\",[0,0],[0,60]),_=>LS.sp(\"bumpThread\",[384,2350445349],[0,2],[23286,3841183533]),_=>LS.sp(\"moveThreadToInboxAndUpdateParent\",[23286,3841183533],[0,0]),_=>(m[2]=[230687821,2208225279],m[3]=[1108714688,2185323521],LS.sp(\"writeThreadCapabilities\",[23286,3841183533],m[2],m[3])),_=>LS.sp(\"updateThreadSnippet\",[23286,3841183533],\"Lhdhs\",false,[23286,3841183533],false,U,U,false),_=>LS.sp(\"insertMessage\",\"Lhdhs\",U,[0,80],[23286,3841183533],[0,0],[384,2350445349],[384,2350445349],U,\"mid.$cAAAAAhRxGqWGvV47JWAjBjrbh9rw\",\"6927387501686938352\",[23286,3841183533],U,false,[0,0],[0,2],[0,2],false,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,U,false,U,U,U,[0,3],false,[0,0],[0,1],U,U,[0,0],U,U,U,U,U),_=>LS.sp(\"updateReadReceipt\",[384,2350445349],[23286,3841183533],[23286,3841183533],[0,0]),_=>LS.sp(\"setForwardScore\",[23286,3841183533],\"mid.$cAAAAAhRxGqWGvV47JWAjBjrbh9rw\",[384,2350445349],U),_=>LS.sp(\"setMessageDisplayedContentTypes\",[23286,3841183533],\"mid.$cAAAAAhRxGqWGvV47JWAjBjrbh9rw\",[384,2350445349],\"Lhdhs\",false,false),_=>(0,LS.sp(\"updateTypingIndicator\",[23286,3841183533],[23286,3841183533],false)),_=>LS.db.table(9).fetch([[[[23286,3841183533]]]]).next().then(({done,value},$i0)=>done?0:(($i0=value.item),(m[4]=$i0[\"lastReadWatermarkTimestampMs\"],m[3]=$i0[\"threadKey\"],m[2]=$i0[\"lastNonMissedCallXmaMessageTimestampMs\"],((false)?(((LS.i64.neq(m[2],U))?(((LS.i64.le(m[2],m[4]))?(LS.fe(LS.ftr(LS.db.table(9).fetch(),i=>LS.i64.eq(i[\"threadKey\"],m[3])),({update:u, item:i})=>u({\"isAllUnreadMessageMissedCallXma\":true}))):(LS.fe(LS.ftr(LS.db.table(9).fetch(),i=>LS.i64.eq(i[\"threadKey\"],m[3])),({update:u, item:i})=>u({\"isAllUnreadMessageMissedCallXma\":false}))))):(((LS.i64.le($i0[\"lastActivityTimestampMs\"],m[4]))?(LS.fe(LS.ftr(LS.db.table(9).fetch(),i=>LS.i64.eq(i[\"threadKey\"],m[3])),({update:u, item:i})=>u({\"isAllUnreadMessageMissedCallXma\":true,\"lastNonMissedCallXmaMessageTimestampMs\":LS.i64.sub(m[4],[0,1])}))):(LS.seq([_=>LS.ct(LS.db.table(12).fetch([[[m[3],{gt:m[4]}]]])).then(r=>m[5]=r),_=>((LS.i64.eq(m[5],[0,1]))?(LS.fe(LS.ftr(LS.db.table(9).fetch(),i=>LS.i64.eq(i[\"threadKey\"],m[3])),({update:u, item:i})=>u({\"isAllUnreadMessageMissedCallXma\":true,\"lastNonMissedCallXmaMessageTimestampMs\":LS.i64.sub(m[4],[0,1])}))):(LS.fe(LS.ftr(LS.db.table(9).fetch(),i=>LS.i64.eq(i[\"threadKey\"],m[3])),({update:u, item:i})=>u({\"isAllUnreadMessageMissedCallXma\":false,\"lastNonMissedCallXmaMessageTimestampMs\":LS.i64.sub(m[4],[0,1])}))))])))))):(LS.fe(LS.ftr(LS.db.table(9).fetch(),i=>LS.i64.eq(i[\"threadKey\"],m[3])),({update:u, item:i})=>u({\"isAllUnreadMessageMissedCallXma\":false,\"lastNonMissedCallXmaMessageTimestampMs\":[384,2350445349]})))))))])):LS.resolve())]),_=>LS.sp(\"upsertSequenceId\",[0,3578165])])):LS.resolve())])),_=>LS.sp(\"executeFinallyBlockForSyncTransaction\",false,[0,1],[1612906737,767440624]),_=>LS.resolve(output)])}",
"sp":[
"executeFirstBlockForSyncTransaction",
"checkAuthoritativeMessageExists",
"verifyThreadExists",
"bumpThread",
"moveThreadToInboxAndUpdateParent",
"writeThreadCapabilities",
"updateThreadSnippet",
"insertMessage",
"updateReadReceipt",
"setForwardScore",
"setMessageDisplayedContentTypes",
"updateTypingIndicator",
"upsertSequenceId",
"executeFinallyBlockForSyncTransaction"
]
}
ewogICAicmVxdWVzdF9pZCI6bnVsbCwKICAgInBheWxvYWQiOiJmdW5jdGlvbiBmKCl7bGV0IGlucHV0cz1hcmd1bWVudHMsTFM9aW5wdXRzW2lucHV0cy5sZW5ndGgtMV0sbj1MUy5uLG09W10sb3V0cHV0PVtdLFU7cmV0dXJuIExTLnNlcShbXz0+KDAsTFMuc2VxKFtfPT5MUy5zcChcImV4ZWN1dGVGaXJzdEJsb2NrRm9yU3luY1RyYW5zYWN0aW9uXCIsWzAsMV0sWzE2MTI5MDY3MzcsNzY3NDQwNjI0XSxcIkhDd0FBQmJvNUxRREZyak9tZVlERXdRQVwiLFwiSEN3QUFCYnE1TFFERnJqT21lWURFd1FBXCIsWzAsMl0sZmFsc2UsWzAsMF0sZmFsc2UsWzAsMV0sVSkudGhlbihyPT4oW21bMF1dPXIpKSxfPT4oKG1bMF0pPyhMUy5zZXEoW189PkxTLnNlcShbXz0+TFMuc3AoXCJjaGVja0F1dGhvcml0YXRpdmVNZXNzYWdlRXhpc3RzXCIsWzIzMjg2LDM4NDExODM1MzNdLFwiNjkyNzM4NzUwMTY4NjkzODM1MlwiKS50aGVuKHI9PihbbVsxXV09cikpLF89PigoIShtWzFdKSk/KEx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