2026-07-23 10:11:24 +00:00
// Module ID: 6901
// Function ID: 54959
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 15, 17, 18, 3767, 653, 3754, 566, 686, 2]
// Module 6901 (_isNativeReflectConstruct)
import ME from "ME" ;
import sortedInsert from "sortedInsert" ;
import _possibleConstructorReturn from "_possibleConstructorReturn" ;
import _getPrototypeOf from "_getPrototypeOf" ;
import _inherits from "_inherits" ;
import _isNativeReflectConstruct from "_isNativeReflectConstruct" ;
import { RelationshipTypes } from "ME" ;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
2026-07-23 10:11:24 +00:00
let ME = ! valueOf . call ( Reflect . construct ( Boolean , [ ] , ( ) = > {
2026-07-20 16:05:17 +00:00
} ) ) ;
function _isNativeReflectConstruct() {
2026-07-23 10:11:24 +00:00
return ME ;
2026-07-20 16:05:17 +00:00
}
const result = _isNativeReflectConstruct ( ) ;
}
2026-07-23 10:11:24 +00:00
function _createForOfIteratorHelperLoose ( iterable ) {
let ME = 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
ME = 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 ( sortedInsert >= length . length ) {
2026-07-20 16:05:17 +00:00
let obj = { done : true } ;
} else {
obj = { done : false } ;
2026-07-23 10:11:24 +00:00
sortedInsert = tmp3 + 1 ;
obj . value = length [ + sortedInsert ] ;
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 recountRelationshipTypes() {
2026-07-23 10:11:24 +00:00
let c0 = 0 ;
let c1 = 0 ;
let c2 = 0 ;
2026-07-20 16:05:17 +00:00
const values = secondaryIndexMap . values ( ) ;
const item = values . forEach ( ( arg0 ) = > {
let id ;
let type ;
( { type , id } = arg0 ) ;
2026-07-23 10:11:24 +00:00
if ( type === outer1_6 . FRIEND ) {
_possibleConstructorReturn = _possibleConstructorReturn + 1 ;
} else if ( type === outer1_6 . PENDING_OUTGOING ) {
sortedInsert = sortedInsert + 1 ;
} else if ( type === outer1_6 . PENDING_INCOMING ) {
if ( ! outer1_5 . isSpam ( id ) ) {
if ( ! outer1_5 . isIgnored ( id ) ) {
ME = ME + 1 ;
2026-07-20 16:05:17 +00:00
}
}
}
} ) ;
2026-07-23 10:11:24 +00:00
let closure_12 = c0 ;
let closure_13 = c1 ;
let closure_14 = c2 ;
2026-07-20 16:05:17 +00:00
}
function upsert ( id ) {
const result = secondaryIndexMap . set ( GAME_RELATIONSHIP_KEY ( id . id , id . applicationId ) , id ) ;
}
function remove ( id , applicationId ) {
secondaryIndexMap . delete ( GAME_RELATIONSHIP_KEY ( id , applicationId ) ) ;
}
function GAME_RELATIONSHIP_KEY ( id , applicationId ) {
return "" + applicationId + "-" + id ;
}
function GameRelationshipIndexes_BY_APPLICATION_ID ( applicationId ) {
return "application-id-" + applicationId ;
}
function GameRelationshipIndexes_BY_USER_ID ( id ) {
return "user-id-" + id ;
}
function GameRelationshipIndexes_BY_RELATIONSHIP_TYPE ( type ) {
return "relationship-type-" + type ;
}
2026-07-23 10:11:24 +00:00
const secondaryIndexMap = new require ( "sortedInsert" ) . SecondaryIndexMap ( function gameRelationshipsIndex ( applicationId ) {
2026-07-20 16:05:17 +00:00
const items = [ ] ;
items . push ( GameRelationshipIndexes_BY_APPLICATION_ID ( applicationId . applicationId ) ) ;
items . push ( GameRelationshipIndexes_BY_USER_ID ( applicationId . id ) ) ;
items . push ( GameRelationshipIndexes_BY_RELATIONSHIP_TYPE ( applicationId . type ) ) ;
return items ;
} , ( since ) = > "" + since . since ) ;
2026-07-23 10:11:24 +00:00
let c12 = 0 ;
let c13 = 0 ;
let c14 = 0 ;
let tmp3 = ( ( Store ) = > {
2026-07-20 16:05:17 +00:00
class GameRelationshipStore {
constructor ( ) {
self = this ;
tmp = GameRelationshipStore ( this , GameRelationshipStore ) ;
2026-07-23 10:11:24 +00:00
obj = outer1_3 ( GameRelationshipStore ) ;
tmp2 = outer1_2 ;
if ( outer1_15 ( ) ) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis ;
_Reflect = Reflect ;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_3 ;
2026-07-20 16:05:17 +00:00
tmp8 = arguments ;
2026-07-23 10:11:24 +00:00
constructResult = Reflect . construct ( obj , arguments , outer1_3 ( self ) . constructor ) ;
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments ;
tmp4 = arguments ;
constructResult = obj ( . . . arguments ) ;
}
return tmp2 ( self , constructResult ) ;
}
}
callback2 ( GameRelationshipStore , Store ) ;
let obj = {
key : "initialize" ,
value() {
2026-07-23 10:11:24 +00:00
this . waitFor ( outer1_5 ) ;
2026-07-20 16:05:17 +00:00
}
} ;
const items = [ obj , , , , , , , , , , , ] ;
obj = {
key : "getPendingIncomingCount" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_12 ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 1 ] = obj ;
obj = {
key : "getPendingOutgoingCount" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_13 ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 2 ] = obj ;
items [ 3 ] = {
key : "getGameFriendCount" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_14 ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 4 ] = {
key : "getGameFriendsForApplication" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
const values = outer1_11 . values ( outer1_8 ( arg0 ) , true ) ;
return values . filter ( ( type ) = > type . type === outer2_6 . FRIEND ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 5 ] = {
key : "getGameRelationshipsForUser" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return outer1_11 . values ( outer1_9 ( arg0 ) , true ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 6 ] = {
key : "getGameRelationshipsForUserByType" ,
value ( arg0 , arg1 ) {
2026-07-23 10:11:24 +00:00
let ME = arg1 ;
2026-07-20 16:05:17 +00:00
const gameRelationshipsForUser = this . getGameRelationshipsForUser ( arg0 ) ;
2026-07-23 10:11:24 +00:00
return gameRelationshipsForUser . filter ( ( type ) = > type . type === ME ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 7 ] = {
key : "getGameFriendsForUser" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return this . getGameRelationshipsForUserByType ( arg0 , outer1_6 . FRIEND ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 8 ] = {
key : "getGameRelationshipCount" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_11 . size ( ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 9 ] = {
key : "getGameRelationships" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_11 ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 10 ] = {
key : "getGameRelationshipsByType" ,
value ( arg0 ) {
2026-07-23 10:11:24 +00:00
return outer1_11 . values ( outer1_10 ( arg0 ) , true ) ;
2026-07-20 16:05:17 +00:00
}
} ;
items [ 11 ] = {
key : "getGameRelationshipsVersion" ,
value() {
2026-07-23 10:11:24 +00:00
return outer1_11 . version ;
2026-07-20 16:05:17 +00:00
}
} ;
return callback ( GameRelationshipStore , items ) ;
2026-07-23 10:11:24 +00:00
} ) ( require ( "initialize" ) . Store ) ;
2026-07-20 16:05:17 +00:00
tmp3 . displayName = "GameRelationshipStore" ;
2026-07-23 10:11:24 +00:00
tmp3 = new tmp3 ( require ( "dispatcher" ) , {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN : function handleConnectionOpen ( gameRelationships ) {
secondaryIndexMap . clear ( ) ;
gameRelationships = gameRelationships . gameRelationships ;
const item = gameRelationships . forEach ( ( id ) = > {
2026-07-23 10:11:24 +00:00
outer1_19 ( { id : id.id , applicationId : id.application_id , type : id . type , since : id.since , dmAccessType : id.dm_access_type } ) ;
2026-07-20 16:05:17 +00:00
} ) ;
recountRelationshipTypes ( ) ;
} ,
GAME_RELATIONSHIP_ADD : function handleGameRelationshipAdd ( gameRelationship ) {
upsert ( gameRelationship . gameRelationship ) ;
recountRelationshipTypes ( ) ;
} ,
GAME_RELATIONSHIP_REMOVE : function handleGameRelationshipRemove ( userId ) {
remove ( userId . userId , userId . applicationId ) ;
recountRelationshipTypes ( ) ;
} ,
APPLICATIONS_FETCH_SUCCESS : function handleApplicationsFetchSuccess ( unknownApplicationIds ) {
let iter3 ;
unknownApplicationIds = unknownApplicationIds . unknownApplicationIds ;
if ( null != unknownApplicationIds ) {
const tmp14 = _createForOfIteratorHelperLoose ( unknownApplicationIds ) ;
const iter5 = tmp14 ( ) ;
let iter4 = iter5 ;
if ( ! iter5 . done ) {
do {
let value = iter4 . value ;
2026-07-23 10:11:24 +00:00
let tmp = _createForOfIteratorHelperLoose ;
let tmp2 = secondaryIndexMap ;
let tmp3 = GameRelationshipIndexes_BY_APPLICATION_ID ;
let tmp4 = _createForOfIteratorHelperLoose ( secondaryIndexMap . values ( GameRelationshipIndexes_BY_APPLICATION_ID ( value ) ) ) ;
2026-07-20 16:05:17 +00:00
let iter = tmp4 ( ) ;
if ( ! iter . done ) {
do {
value = iter . value ;
2026-07-23 10:11:24 +00:00
let tmp5 = RelationshipTypes ;
let tmp6 = value . type !== RelationshipTypes . PENDING_INCOMING ;
2026-07-20 16:05:17 +00:00
if ( tmp6 ) {
2026-07-23 10:11:24 +00:00
let tmp7 = RelationshipTypes ;
tmp6 = value . type !== RelationshipTypes . PENDING_OUTGOING ;
2026-07-20 16:05:17 +00:00
}
if ( ! tmp6 ) {
2026-07-23 10:11:24 +00:00
let tmp8 = remove ;
let tmp9 = remove ( value . id , value ) ;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
iter2 = tmp4 ( ) ;
2026-07-20 16:05:17 +00:00
iter = iter2 ;
let tmp10 = value ;
} while ( ! iter2 . done ) ;
}
iter3 = tmp14 ( ) ;
iter4 = iter3 ;
} while ( ! iter3 . done ) ;
}
recountRelationshipTypes ( ) ;
}
}
} ) ;
2026-07-23 10:11:24 +00:00
let result = require ( "_possibleConstructorReturn" ) . fileFinishedImporting ( "modules/game_relationships/GameRelationshipStore.tsx" ) ;
2026-07-20 16:05:17 +00:00
export default tmp3 ;