






#import "BigTallManager.h"
#import "MQTTSessionManager.h"
#import "LawLookIcyMoveInfo.h"
#import "FaxSayMildList.h"
#import "NSObject+WaxModel.h"
#import "ChatterMidConfig.h"
#import "OutBeatFoundInfo.h"
#import "PointerWetView.h"
#import "BigCustomManager.h"
#import "PanAreaDragOld.h"
#import "DryAlertView.h"
#import "GroupHexView.h"
#import "EnableDashAttributeTargetCombine.h"

@import StoreKit;

@interface BigTallManager()<MQTTSessionManagerDelegate,StakePurchasedDelegate>

@property (nonatomic, strong) LawLookIcyMoveInfo *indicesSpouseDescenderRejectCancelingInfo;

@property (strong, nonatomic) MQTTSessionManager *askDigitBold;

@property (nonatomic, strong) NSMutableArray <PointerWetView *>*purpleRowsRecordedTextUpsideArray;

@end

@implementation BigTallManager

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
    
}

+ (void)load {
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(redirectAreSmartCriticalMalayalamDuplex:) name:UIApplicationWillResignActiveNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(extendsParseSendEraDecigramsDegrees:) name:UIApplicationDidBecomeActiveNotification object:nil];
}


+ (void)redirectAreSmartCriticalMalayalamDuplex:(NSNotification *)notification  {
    [BigTallManager.shared maskPatientStackCycleWatchWasType:veryCapHang.sentinelDegree];
    [BigTallManager.shared volumeLossOrnamentFlipFileAlive];
}


+ (void)extendsParseSendEraDecigramsDegrees:(NSNotification *)notification  {
    [BigTallManager.shared bloodEulerGramSubStickyDiastolic];
}

+ (instancetype)shared {
    static id shared = nil;
    static dispatch_once_t moveToken;
    dispatch_once(&moveToken, ^{
        shared = [[super allocWithZone:NULL] init];
    });
    return shared;
}

- (void)ambienceSnap {
    [[FaxSayMildList dustPanelSubNetwork] provisionPlainSexualComputerProduct:^(NSDictionary * _Nonnull mostAwayLookup) {
        LawLookIcyMoveInfo *info = [LawLookIcyMoveInfo downPinArmWrapDict:mostAwayLookup[veryCapHang.jobEitherKit]];
        self.indicesSpouseDescenderRejectCancelingInfo = info;
        [self barriersRestoreFrequencyWrappersOther:info];
    }];
}

- (void)mostlyWhiteRowFeedbackBundle {
    [self.askDigitBold disconnectWithDisconnectHandler:nil];
}

- (void)maskPatientStackCycleWatchWasType:(NSString *)type {
    
    if (self.askDigitBold.state != MQTTSessionManagerStateConnected) {
        return;
    }
    NSMutableDictionary *saveHard = [NSMutableDictionary new];
    for (NSDictionary *topic in self.indicesSpouseDescenderRejectCancelingInfo.maxButAlone) {
        if (![topic[veryCapHang.cardContextSlabStrokeSleetPatch] isEqualToString:type]) {
            saveHard[topic[veryCapHang.resizeCapBothBuilderClusters]] = topic[veryCapHang.costSevenLive];
        }
    }
    self.askDigitBold.subscriptions = saveHard;
}

- (void)bloodEulerGramSubStickyDiastolic {
    if (self.askDigitBold.state != MQTTSessionManagerStateConnected) {
        return;
    }
    NSMutableDictionary *saveHard = [NSMutableDictionary new];
    for (NSDictionary *topic in self.indicesSpouseDescenderRejectCancelingInfo.maxButAlone) {
        saveHard[topic[veryCapHang.resizeCapBothBuilderClusters]] = topic[veryCapHang.costSevenLive];
    }
    self.askDigitBold.subscriptions = saveHard;
}

- (void)barriersRestoreFrequencyWrappersOther:(LawLookIcyMoveInfo *)info {
    
    NSMutableDictionary *saveHard = [NSMutableDictionary new];
    for (NSDictionary *topic in info.maxButAlone) {
        saveHard[topic[veryCapHang.resizeCapBothBuilderClusters]] = topic[veryCapHang.costSevenLive];
    }
    if (!self.askDigitBold) {
        self.askDigitBold = [[MQTTSessionManager alloc] initWithPersistence:MQTT_PERSISTENT
                                                         maxWindowSize:MQTT_MAX_WINDOW_SIZE
                                                           maxMessages:MQTT_MAX_MESSAGES
                                                               maxSize:MQTT_MAX_SIZE
                                            maxConnectionRetryInterval:64
                                                   connectInForeground:NO
                                                        streamSSLLevel:(NSString *)kCFStreamSocketSecurityLevelNegotiatedSSL
                                                                 queue:dispatch_get_main_queue()];
        self.askDigitBold.delegate = self;
        self.askDigitBold.subscriptions = saveHard;
        [self.askDigitBold connectTo:info.maltese
                               port:[info.routerWet intValue]
                                tls:NO
                          keepalive:info.streamedDogJobEvaluateDecay
                              clean:YES
                               auth:YES
                               user:info.eightSubChest
                               pass:info.counterParent
                               will:NO
                          willTopic:nil
                            willMsg:nil
                            willQos:MQTTQosLevelExactlyOnce
                     willRetainFlag:NO
                       withClientId:info.easyBounceFast
                     securityPolicy:nil
                       certificates:nil
                      protocolLevel:MQTTProtocolVersion311
                     connectHandler:nil];
    } else {
        self.askDigitBold.subscriptions = saveHard;
        [self.askDigitBold updateSessionConfig:info.maltese
                                          port:[info.routerWet intValue]
                                          user:info.eightSubChest
                                          pass:info.counterParent
                                      clientId:info.easyBounceFast
                                     keepalive:info.streamedDogJobEvaluateDecay];
    }
}


- (void)sessionManagerReconnect:(MQTTSessionManager *)sessionManager {
    [self ambienceSnap];
}
-  (void)handleMessage:(NSData *)data onTopic:(NSString *)topic retained:(BOOL)retained {
    NSDictionary *herSuch = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
    OutBeatFoundInfo *twistInfo = [OutBeatFoundInfo downPinArmWrapDict:herSuch];
    NSString *type = herSuch[veryCapHang.tipBinStandAre];
    ShakeInfo(veryCapHang.trailingShakeBeaconEnergyHeadphoneTransform,topic,type,herSuch);
    
    if ([type isEqualToString:veryCapHang.connectedDecrementWaterDanishGujaratiEasy]) {
        [GroupHexView shared].haveMapCatJson = herSuch;
    }
    else if ([type isEqualToString:veryCapHang.promisePingSobItsPrivilegeMultiple]) {
        [self seekMapTooNeverCookieHisModel:twistInfo];
    }
    else if ([type isEqualToString:veryCapHang.clockUtteranceSeparatedIdentifyDisplaysNonce]) {
        NSMutableArray *quoteEndBad = [NSMutableArray new];
        for (NSDictionary *button in twistInfo.emergencyMenCleanReductionTextual) {
            [quoteEndBad addObject:button[veryCapHang.tightPutKilohertzFitRhythm]];
        }
        [DryAlertView tightRelayPromptFixingSetupTruncated:twistInfo.herGoalArt message:twistInfo.authorMostly boxFlatLossy:quoteEndBad completion:^(NSInteger retainIndex) {
            NSDictionary *button = twistInfo.emergencyMenCleanReductionTextual[retainIndex];
            NSString *action = button[veryCapHang.fastPlayJouleAscendedMisplaced][veryCapHang.injectionBasqueExchangeModernDance];
            if ([action isEqualToString:veryCapHang.sentinelDegree]) {
                exit(0);
            }if ([action isEqualToString:veryCapHang.itsSpanOutCurl]) {
                [PanAreaDragOld.shared originalCertGatheringLikeSeleniumExport:button[veryCapHang.fastPlayJouleAscendedMisplaced][veryCapHang.cupYouOperand]];
            }
        }];
    }
    else if ([type isEqualToString:veryCapHang.restorePhotoIronDepartureRowMutations]) {
        [[PanAreaDragOld shared] peopleOpticalExistentFlatAlbum:herSuch];
    }
    else if ([type isEqualToString:veryCapHang.cornersReceivedSeekExecAreObserving]) {
        if ([twistInfo.prefixedYet isEqualToString:veryCapHang.forGrowEndCert]) {
            [[PanAreaDragOld shared] boundingDrivenCenter:twistInfo.eggTouch];
        }else {
            [[PanAreaDragOld shared] returnShowersTopRectangleWorkingEsperanto];
        }
    }
    else if ([type isEqualToString:veryCapHang.ellipsisPlainWayTallVoiceSeconds]) {
        [self mostlyWhiteRowFeedbackBundle];
        if (twistInfo.pastCreamy > 0) {
            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(twistInfo.pastCreamy * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                [self ambienceSnap];
            });
        }
    }else if ([type isEqualToString:veryCapHang.cellphoneExpensiveBleedCircularSortFlip]) {
        [SKStoreReviewController requestReview];
    }
}


- (void)seekMapTooNeverCookieHisModel:(OutBeatFoundInfo *)model {
    
    if (UIApplication.sharedApplication.applicationState != UIApplicationStateActive) {
        return;
    }
    for (PointerWetView *usesSpaView in self.purpleRowsRecordedTextUpsideArray) {
        if (model.spaSeedIllCat == usesSpaView.frame.origin.y) {
            [usesSpaView showStaleTakeLazyHostLoudModel:model];
            [usesSpaView start];
            return;
        }
    }
    CGRect filmRect = [model.authorMostly boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:model.factoryNineStateQuarterVortexFlight] forKey:NSFontAttributeName] context:nil];
    PointerWetView *usesSpaView = [[PointerWetView alloc] init];
    CGFloat y = BigCustomManager.shared.oceanMonthWindow.safeAreaInsets.top + model.spaSeedIllCat;
    usesSpaView.frame = CGRectMake(0, y, [UIScreen mainScreen].bounds.size.width, filmRect.size.height+4);
    usesSpaView.delegate = self;
    [BigCustomManager.shared.oceanMonthWindow addSubview:usesSpaView];
    [usesSpaView start];
    [usesSpaView showStaleTakeLazyHostLoudModel:model];
    [self.purpleRowsRecordedTextUpsideArray addObject:usesSpaView];
}



- (void)affiliateNotView:(LoopSortBiotin *)teacherView suchPushHitCell:(PongLinearPlugCell *)fair
{
    OutBeatFoundInfo *dueMakeModel = (OutBeatFoundInfo *)fair.model;
    if (dueMakeModel.nowKitModeRoot) {
        [PanAreaDragOld.shared originalCertGatheringLikeSeleniumExport:dueMakeModel.nowKitModeRoot];
    }
}

- (void)shadowMirroringBuiltUndoDailyReachedAutoBrief:(PointerWetView *)teacherView
{
    [teacherView removeFromSuperview];
    [self.purpleRowsRecordedTextUpsideArray removeObject:teacherView];
    teacherView = nil;
}


- (void)volumeLossOrnamentFlipFileAlive {
    if (self.purpleRowsRecordedTextUpsideArray.count == 0) {
        return;
    }
    NSArray<PointerWetView *> *inferWax = [self.purpleRowsRecordedTextUpsideArray copy];
    for (PointerWetView *usesSpaView in inferWax) {
        [usesSpaView stop];
        [usesSpaView removeFromSuperview];
    }
    [self.purpleRowsRecordedTextUpsideArray removeAllObjects];
}

- (NSMutableArray<PointerWetView *> *)purpleRowsRecordedTextUpsideArray {
    if (!_purpleRowsRecordedTextUpsideArray) {
        _purpleRowsRecordedTextUpsideArray = [[NSMutableArray alloc] init];
    }
    return _purpleRowsRecordedTextUpsideArray;
}

@end
