








#import <AppLovinSDK/AppLovinSDK.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>

@interface BatchBandwidthDownloadTailVariableDisabling : NSObject<MARewardedAdDelegate,MAAdViewAdDelegate,MAAdDelegate,MAAdRevenueDelegate>

@property (nonatomic, strong) MARewardedAd *liftCatalystSobAlphabetRemotely;
@property (nonatomic, strong) MAInterstitialAd *messageHueBatteryAssemblyProximity;
@property (nonatomic, assign) NSInteger renewOurStarCompileTrailing;

@property (nonatomic, copy) NSString *tabAirFrameData;

@property (nonatomic, copy) void (^gaspSlantStay)(BOOL result);

@property (nonatomic, copy) void (^darwinSubSpineStepperConnectedJson)(BOOL result, NSDictionary *tooJson);

@property (nonatomic, copy) void (^callbacksCapSubscribeThickProblemHandler)(BOOL result);

@property (nonatomic, copy) void (^capAppearVisionDarkenCityNotifyingJson)(BOOL result, NSDictionary *tooJson);

@property (nonatomic, copy) void (^wirelessBufferWinBinUpdatingDomain)(NSDictionary *bagInfo);

@end

@implementation BatchBandwidthDownloadTailVariableDisabling

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

+ (NSString *)helperPutOut {
    return ALSdk.version;
}

- (void)showMediationDebugger {
    [[ALSdk shared] showMediationDebugger];
}

- (void)unifiedQualityEntitledAboveLowDisabled:(void(^)(NSDictionary *bagInfo))callback {
    self.wirelessBufferWinBinUpdatingDomain = callback;
}


- (void)silenceOriginDisappearArgumentBedTenKey:(NSString *)xxpk_maxkey formatLocalizesEncodingsCityAdobe:(NSString *)formatLocalizesEncodingsCityAdobe latvianIntersectFutureArabicKoreanGather:(NSString *)latvianIntersectFutureArabicKoreanGather unsignedAcceptedNegotiateTitleClick:(NSArray *)unsignedAcceptedNegotiateTitleClick {
    
    
    
    Class her = NSClassFromString(@"FBAdSettings");
    if (her) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [her performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [her performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *keysMultipleLogTrimmingCurrency = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (unsignedAcceptedNegotiateTitleClick) {
            builder.testDeviceAdvertisingIdentifiers = unsignedAcceptedNegotiateTitleClick;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:keysMultipleLogTrimmingCurrency completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self safetyReversePermuteInsertingGuestProvidersLazy:formatLocalizesEncodingsCityAdobe];
        if (latvianIntersectFutureArabicKoreanGather.length > 0) {
            [self partAndPopSuggestedPredicateDocumentsStreamsPresented:latvianIntersectFutureArabicKoreanGather];
        }
    }];
}

- (void)safetyReversePermuteInsertingGuestProvidersLazy:(NSString *)formatLocalizesEncodingsCityAdobe
{
    self.liftCatalystSobAlphabetRemotely = [MARewardedAd sharedWithAdUnitIdentifier:formatLocalizesEncodingsCityAdobe];
    self.liftCatalystSobAlphabetRemotely.delegate = self;
    self.liftCatalystSobAlphabetRemotely.revenueDelegate = self;

    
    [self.liftCatalystSobAlphabetRemotely loadAd];
}

- (void)partAndPopSuggestedPredicateDocumentsStreamsPresented:(NSString *)latvianIntersectFutureArabicKoreanGather
{
    self.messageHueBatteryAssemblyProximity = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:latvianIntersectFutureArabicKoreanGather];
    self.messageHueBatteryAssemblyProximity.delegate = self;
    self.messageHueBatteryAssemblyProximity.revenueDelegate = self;

    
    [self.messageHueBatteryAssemblyProximity loadAd];
}


- (void)arrangerSwitchRepliesRangeBarsClustersData:(nullable NSString *)tabAirFrameData addRefinedJson:(void(^)(BOOL result, NSDictionary *tooJson))addRefinedJson {
    self.darwinSubSpineStepperConnectedJson = addRefinedJson;
    self.tabAirFrameData = tabAirFrameData;
    if ( [self.liftCatalystSobAlphabetRemotely isReady]) {
        [self.liftCatalystSobAlphabetRemotely showAdForPlacement:nil customData:tabAirFrameData];
    }else {
        addRefinedJson(NO,nil);
    }
}

- (void)arrangerSwitchRepliesRangeBarsClustersData:(nullable NSString *)tabAirFrameData toolSeed:(void(^)(BOOL result))toolSeed {
    self.gaspSlantStay = toolSeed;
    self.tabAirFrameData = tabAirFrameData;
    if ( [self.liftCatalystSobAlphabetRemotely isReady]) {
        [self.liftCatalystSobAlphabetRemotely showAdForPlacement:nil customData:tabAirFrameData];
    }else {
        toolSeed(NO);
    }
}

- (void)barMostlyChromaNoteMakerSaltEffectData:(nullable NSString *)tabAirFrameData toolSeed:(void(^)(BOOL result))toolSeed {
    self.callbacksCapSubscribeThickProblemHandler = toolSeed;
    self.tabAirFrameData = tabAirFrameData;
    if ([self.messageHueBatteryAssemblyProximity isReady]) {
        [self.messageHueBatteryAssemblyProximity showAd];
    } else {
        [self.messageHueBatteryAssemblyProximity loadAd];
        if (toolSeed) {
            toolSeed(NO);
        }
    }
}

- (void)barMostlyChromaNoteMakerSaltEffectData:(nullable NSString *)tabAirFrameData addRefinedJson:(void(^)(BOOL result, NSDictionary *tooJson))addRefinedJson {
    self.capAppearVisionDarkenCityNotifyingJson = addRefinedJson;
    self.tabAirFrameData = tabAirFrameData;
    if ([self.messageHueBatteryAssemblyProximity isReady]) {
        [self.messageHueBatteryAssemblyProximity showAd];
    } else {
        [self.messageHueBatteryAssemblyProximity loadAd];
        if (addRefinedJson) {
            addRefinedJson(NO, nil);
        }
    }
}

- (void)cutBusyFocusedDarwinExits:(const char *)name error:(NSString *)error {
    
}

- (NSDictionary *)bottomBridgingLyricistGradientRenewal:(MAAd *)ad {
    NSMutableDictionary *tooJson = [NSMutableDictionary dictionary];
    
    tooJson[@"currency"] = @"USD";
    tooJson[@"revenue"] = @(ad.revenue);
    
    if (ad.format.label.length > 0) {
        tooJson[@"format"] = ad.format.label;
    }
    
    return [tooJson copy];
}

- (void)filterPredictedQueueDomainLooperGroup:(MAAd *)ad eventType:(NSString *)eventType {
    if (!self.wirelessBufferWinBinUpdatingDomain) {
        return;
    }

    NSString *adType = @"UNKNOWN";
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        adType = @"REWARD";
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        adType = @"INTERSTITIAL";
    }

    NSDictionary *bagInfo = @{
        @"ads_platform": @"APPLOVIN",
        @"ad_unit_id": ad.adUnitIdentifier ?: @"",
        @"event_type": eventType,  
        @"ad_type": adType,
        @"revenue": @(ad.revenue).stringValue ?: @"0"
    };

    self.wirelessBufferWinBinUpdatingDomain(bagInfo);
}


- (void)didLoadAd:(nonnull MAAd *)ad {
    
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];
    
    
    self.renewOurStarCompileTrailing = 0;
}

- (void)didFailToLoadAdForAdUnitIdentifier:(nonnull NSString *)adUnitIdentifier withError:(nonnull MAError *)error {

    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:error.message];

    

    self.renewOurStarCompileTrailing++;
    NSInteger portDisk = pow(2, MIN(6, self.renewOurStarCompileTrailing));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, portDisk * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.liftCatalystSobAlphabetRemotely.adUnitIdentifier]) {
            [self.liftCatalystSobAlphabetRemotely loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.messageHueBatteryAssemblyProximity.adUnitIdentifier]) {
            [self.messageHueBatteryAssemblyProximity loadAd];
        }
    });
}

- (void)didHideAd:(MAAd *)ad {
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];

    
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        [self.liftCatalystSobAlphabetRemotely loadAd];
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        [self.messageHueBatteryAssemblyProximity loadAd];

        
        if (self.callbacksCapSubscribeThickProblemHandler) {
            self.callbacksCapSubscribeThickProblemHandler(YES);
        }

        if (self.capAppearVisionDarkenCityNotifyingJson) {
            NSDictionary *tooJson = [self bottomBridgingLyricistGradientRenewal:ad];
            self.capAppearVisionDarkenCityNotifyingJson(YES, tooJson);
        }
    }
}

- (void)didFailToDisplayAd:(MAAd *)ad withError:(MAError *)error
{
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:error.message];

    
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        [self.liftCatalystSobAlphabetRemotely loadAd];

        if (self.gaspSlantStay) {
            self.gaspSlantStay(NO);
        }

        if (self.darwinSubSpineStepperConnectedJson) {
            self.darwinSubSpineStepperConnectedJson(NO, nil);
        }
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        [self.messageHueBatteryAssemblyProximity loadAd];

        if (self.callbacksCapSubscribeThickProblemHandler) {
            self.callbacksCapSubscribeThickProblemHandler(NO);
        }

        if (self.capAppearVisionDarkenCityNotifyingJson) {
            self.capAppearVisionDarkenCityNotifyingJson(NO, nil);
        }
    }
}

- (void)didClickAd:(nonnull MAAd *)ad {
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];
    [self filterPredictedQueueDomainLooperGroup:ad eventType:@"1"];
}

- (void)didDisplayAd:(nonnull MAAd *)ad {
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];
    [self filterPredictedQueueDomainLooperGroup:ad eventType:@"2"];
}

- (void)didRewardUserForAd:(nonnull MAAd *)ad withReward:(nonnull MAReward *)reward {
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];

    if (self.gaspSlantStay) {
        self.gaspSlantStay(YES);
    }

    if (self.darwinSubSpineStepperConnectedJson) {
        NSDictionary *tooJson = [self bottomBridgingLyricistGradientRenewal:ad];
        self.darwinSubSpineStepperConnectedJson(YES, tooJson);
    }
}


- (void)didCollapseAd:(nonnull MAAd *)ad {
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];
}

- (void)didExpandAd:(nonnull MAAd *)ad {
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];
}


- (void)didPayRevenueForAd:(MAAd *)ad {
    [self cutBusyFocusedDarwinExits: __PRETTY_FUNCTION__ error:nil];
    [self filterPredictedQueueDomainLooperGroup:ad eventType:@"3"];
}

@end
