2026-07-27 11:26:19 +00:00
// Module ID: 12741
// Function ID: 99204
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-25 08:10:48 +00:00
// Dependencies: [6, 7, 15, 17, 18, 1352, 1348, 4143, 1907, 5601, 1917, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 12741 (_isNativeReflectConstruct)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import closure_3 from "_isNativeReflectConstruct" ;
import _possibleConstructorReturn from "_possibleConstructorReturn" ;
import _getPrototypeOf from "_getPrototypeOf" ;
import _inherits from "_inherits" ;
import { isPrivate } from "_callSuper" ;
import closure_8 from "_isNativeReflectConstruct" ;
import closure_9 from "_isNativeReflectConstruct" ;
import closure_10 from "_isNativeReflectConstruct" ;
import closure_11 from "_isNativeReflectConstruct" ;
import set from "_possibleConstructorReturn" ;
const require = arg1 ;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
} ) ) ;
function _isNativeReflectConstruct() {
return closure_0 ;
}
const result = _isNativeReflectConstruct ( ) ;
}
2026-07-23 10:11:24 +00:00
function _createForOfIteratorHelperLoose ( iterable ) {
let closure_0 = iterable ;
iterable = "undefined" !== typeof Symbol ;
if ( iterable ) {
2026-07-20 16:05:17 +00:00
const _Symbol = Symbol ;
2026-07-23 10:11:24 +00:00
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( ! iterable ) {
iterable = iterable [ Symbol . iterator ] ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
if ( iterable ) {
const iter = iterable . call ( iterable ) ;
2026-07-20 16:05:17 +00:00
const next = iter . next ;
return next . bind ( iter ) ;
} else {
const _Array = Array ;
2026-07-23 10:11:24 +00:00
let tmp = iterable ;
if ( ! Array . isArray ( iterable ) ) {
2026-07-20 16:05:17 +00:00
let tmp2 ;
2026-07-23 10:11:24 +00:00
if ( iterable ) {
if ( "string" === typeof iterable ) {
tmp2 = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
const toString = { } . toString ;
2026-07-23 10:11:24 +00:00
const substr = toString . call ( iterable ) . slice ( 8 , - 1 ) ;
2026-07-20 16:05:17 +00:00
let name = substr ;
if ( tmp3 ) {
2026-07-23 10:11:24 +00:00
name = iterable . constructor . name ;
2026-07-20 16:05:17 +00:00
}
if ( "Map" !== name ) {
if ( "Set" !== name ) {
if ( "Arguments" === name ) {
2026-07-23 10:11:24 +00:00
let arr = _arrayLikeToArray ( iterable , undefined ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ ;
2026-07-20 16:05:17 +00:00
}
}
tmp2 = arr ;
}
const _Array2 = Array ;
2026-07-23 10:11:24 +00:00
arr = Array . from ( iterable ) ;
const callResult = toString . call ( iterable ) ;
tmp3 = "Object" === substr && iterable . constructor ;
2026-07-20 16:05:17 +00:00
}
}
tmp = tmp2 ;
if ( ! tmp2 ) {
const _TypeError = TypeError ;
const typeError = new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
throw typeError ;
}
}
if ( tmp ) {
2026-07-23 10:11:24 +00:00
closure_0 = tmp ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let c1 = 0 ;
2026-07-20 16:05:17 +00:00
return ( ) = > {
2026-07-23 10:11:24 +00:00
if ( closure_1 >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
closure_1 = tmp3 + 1 ;
2026-07-23 10:11:24 +00:00
obj . value = length [ + closure_1 ] ;
2026-07-20 16:05:17 +00:00
}
return obj ;
} ;
}
}
function _arrayLikeToArray ( arg0 , arg1 ) {
let length ;
if ( tmp ) {
length = arg0 . length ;
}
const ArrayResult = Array ( length ) ;
for ( let num = 0 ; num < length ; num = num + 1 ) {
ArrayResult [ num ] = arg0 [ num ] ;
}
return ArrayResult ;
}
function rebuildUnreads() {
2026-07-23 10:11:24 +00:00
privateChannelIds = privateChannelIds . getPrivateChannelIds ( ) ;
const found = privateChannelIds . filter ( ( arg0 ) = > outer1_9 . getMentionCount ( arg0 ) > 0 ) ;
2026-07-20 16:05:17 +00:00
if ( found . length > 20 ) {
found . length = 20 ;
}
2026-07-25 08:10:48 +00:00
let flag = ! require ( 1917 ) /* areArraysShallowlyEqual */ . areArraysShallowlyEqual ( found , found ) ;
2026-07-20 16:05:17 +00:00
if ( flag ) {
const _Set = Set ;
const set = new Set ( found ) ;
flag = true ;
}
return flag ;
}
function handleConnectionOpen() {
return rebuildUnreads ( ) ;
}
function handleGenericUpdate ( channelId ) {
const channel = store . getChannel ( channelId . channelId ) ;
let tmp2 = null == channel ;
if ( ! tmp2 ) {
tmp2 = ! isPrivate ( channel . type ) ;
}
let tmp4 = ! tmp2 ;
if ( ! tmp2 ) {
tmp4 = rebuildUnreads ( ) ;
}
return tmp4 ;
}
let closure_12 = [ ] ;
2026-07-23 10:11:24 +00:00
let set = new Set ( ) ;
let tmp3 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class PrivateChannelReadStateStore {
constructor ( ) {
self = this ;
2026-07-23 10:11:24 +00:00
tmp = outer1_2 ( this , PrivateChannelReadStateStore ) ;
obj = outer1_5 ( PrivateChannelReadStateStore ) ;
tmp2 = outer1_4 ;
if ( outer1_14 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_5 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_5 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( PrivateChannelReadStateStore , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_11 , outer1_8 , outer1_10 , outer1_9 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
const items = [ obj , ] ;
obj = {
key : "getUnreadPrivateChannelIds" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_12 ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 1 ] = obj ;
return callback ( PrivateChannelReadStateStore , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp3 . displayName = "PrivateChannelReadStateStore" ;
2026-07-23 10:11:24 +00:00
tmp3 = new tmp3 ( require ( "dispatcher" ) , {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN : handleConnectionOpen ,
OVERLAY_INITIALIZE : handleConnectionOpen ,
MESSAGE_CREATE : handleGenericUpdate ,
MESSAGE_ACK : handleGenericUpdate ,
CHANNEL_SELECT : function handleChannelSelect ( channelId ) {
const channel = store . getChannel ( channelId . channelId ) ;
let tmp2 = null == channel ;
if ( ! tmp2 ) {
tmp2 = ! isPrivate ( channel . type ) ;
}
let tmp4 = ! tmp2 ;
if ( ! tmp2 ) {
tmp4 = rebuildUnreads ( ) ;
}
return tmp4 ;
} ,
CHANNEL_DELETE : function handleChannelDelete ( channel ) {
const tmp = ! set . has ( channel . channel . id ) ;
let tmp2 = ! tmp ;
if ( ! tmp ) {
tmp2 = rebuildUnreads ( ) ;
}
return tmp2 ;
} ,
WINDOW_FOCUS : function handleWindowFocus() {
const channel = store . getChannel ( channelId . getChannelId ( ) ) ;
let tmp2 = null == channel ;
if ( ! tmp2 ) {
tmp2 = ! isPrivate ( channel . type ) ;
}
let tmp4 = ! tmp2 ;
if ( ! tmp2 ) {
tmp4 = rebuildUnreads ( ) ;
}
return tmp4 ;
} ,
CHANNEL_CREATE : function handleChannelCreate ( channel ) {
channel = store . getChannel ( channel . channel . id ) ;
let tmp2 = null == channel ;
if ( ! tmp2 ) {
tmp2 = ! isPrivate ( channel . type ) ;
}
let tmp4 = ! tmp2 ;
if ( ! tmp2 ) {
tmp4 = rebuildUnreads ( ) ;
}
return tmp4 ;
} ,
CHANNEL_UPDATES : function handleChannelUpdates ( channels ) {
let iter3 ;
const tmp = _createForOfIteratorHelperLoose ( channels . channels ) ;
const iter = tmp ( ) ;
let iter2 = iter ;
let flag = false ;
let flag2 = false ;
if ( ! iter . done ) {
do {
2026-07-23 10:11:24 +00:00
let tmp2 = store ;
let channel = store . getChannel ( iter2 . value . id ) ;
2026-07-20 16:05:17 +00:00
let tmp4 = null != channel ;
if ( tmp4 ) {
2026-07-23 10:11:24 +00:00
let tmp5 = isPrivate ;
tmp4 = isPrivate ( channel . type ) ;
2026-07-20 16:05:17 +00:00
}
if ( tmp4 ) {
flag = true ;
}
iter3 = tmp ( ) ;
iter2 = iter3 ;
flag2 = flag ;
} while ( ! iter3 . done ) ;
}
let tmp6 = flag2 ;
if ( flag2 ) {
tmp6 = rebuildUnreads ( ) ;
}
return tmp6 ;
}
} ) ;
2026-07-23 10:11:24 +00:00
let result = set . fileFinishedImporting ( "stores/PrivateChannelReadStateStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp3 ;