








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

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

@property (nonatomic, strong) MARewardedAd *chromeConjugateRevealItsAbsent;
@property (nonatomic, strong) MAInterstitialAd *maxInsetPrimaryForGet;
@property (nonatomic, assign) NSInteger negotiateLeaseWinAboveScale;

@property (nonatomic, copy) NSString *removalMailData;

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

@property (nonatomic, copy) void (^drivenLiterAddTheParentalJson)(BOOL result, NSDictionary *dayJson);

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

@property (nonatomic, copy) void (^chargeEggRangeFoldClampingShrinkJson)(BOOL result, NSDictionary *dayJson);

@property (nonatomic, copy) void (^sinSunSafariFlashOneResources)(NSDictionary *hisInfo);

@end

@implementation ReplaceDetailPetabytesNotifiedSamplingProcedure

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

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

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

- (void)bridgingOrderPartIntrinsicPullReceived:(void(^)(NSDictionary *hisInfo))callback {
    self.sinSunSafariFlashOneResources = callback;
}


- (void)tailMagneticOurConvergedRestoreBurmeseKey:(NSString *)xxpk_maxkey penKitNotDiscoverBed:(NSString *)penKitNotDiscoverBed ligaturesOddSwedishRectifiedHisCluster:(NSString *)ligaturesOddSwedishRectifiedHisCluster binReadableHyphenImmediateDiscovery:(NSArray *)binReadableHyphenImmediateDiscovery {
    
    
    
    Class car = NSClassFromString(@"FBAdSettings");
    if (car) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [car performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [car performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *controlCompletedMajorPinThumb = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (binReadableHyphenImmediateDiscovery) {
            builder.testDeviceAdvertisingIdentifiers = binReadableHyphenImmediateDiscovery;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:controlCompletedMajorPinThumb completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self catalanBadgeGeneralYahooAuthorsBitBand:penKitNotDiscoverBed];
        if (ligaturesOddSwedishRectifiedHisCluster.length > 0) {
            [self glucoseCommonDisappearScanningEmbeddingSphereFuturePremature:ligaturesOddSwedishRectifiedHisCluster];
        }
    }];
}

- (void)catalanBadgeGeneralYahooAuthorsBitBand:(NSString *)penKitNotDiscoverBed
{
    self.chromeConjugateRevealItsAbsent = [MARewardedAd sharedWithAdUnitIdentifier:penKitNotDiscoverBed];
    self.chromeConjugateRevealItsAbsent.delegate = self;
    self.chromeConjugateRevealItsAbsent.revenueDelegate = self;

    
    [self.chromeConjugateRevealItsAbsent loadAd];
}

- (void)glucoseCommonDisappearScanningEmbeddingSphereFuturePremature:(NSString *)ligaturesOddSwedishRectifiedHisCluster
{
    self.maxInsetPrimaryForGet = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:ligaturesOddSwedishRectifiedHisCluster];
    self.maxInsetPrimaryForGet.delegate = self;
    self.maxInsetPrimaryForGet.revenueDelegate = self;

    
    [self.maxInsetPrimaryForGet loadAd];
}


- (void)zipArrowCiphersStepchildSuggestedAndData:(nullable NSString *)removalMailData draftGreekJson:(void(^)(BOOL result, NSDictionary *dayJson))draftGreekJson {
    self.drivenLiterAddTheParentalJson = draftGreekJson;
    self.removalMailData = removalMailData;
    if ( [self.chromeConjugateRevealItsAbsent isReady]) {
        [self.chromeConjugateRevealItsAbsent showAdForPlacement:nil customData:removalMailData];
    }else {
        draftGreekJson(NO,nil);
    }
}

- (void)zipArrowCiphersStepchildSuggestedAndData:(nullable NSString *)removalMailData grayReal:(void(^)(BOOL result))grayReal {
    self.cupEndBengali = grayReal;
    self.removalMailData = removalMailData;
    if ( [self.chromeConjugateRevealItsAbsent isReady]) {
        [self.chromeConjugateRevealItsAbsent showAdForPlacement:nil customData:removalMailData];
    }else {
        grayReal(NO);
    }
}

- (void)fusionPredicateLatitudeGlobalRingSubsetPortraitsData:(nullable NSString *)removalMailData grayReal:(void(^)(BOOL result))grayReal {
    self.yellowBitmapDarkenResultSideEnds = grayReal;
    self.removalMailData = removalMailData;
    if ([self.maxInsetPrimaryForGet isReady]) {
        [self.maxInsetPrimaryForGet showAd];
    } else {
        [self.maxInsetPrimaryForGet loadAd];
        if (grayReal) {
            grayReal(NO);
        }
    }
}

- (void)fusionPredicateLatitudeGlobalRingSubsetPortraitsData:(nullable NSString *)removalMailData draftGreekJson:(void(^)(BOOL result, NSDictionary *dayJson))draftGreekJson {
    self.chargeEggRangeFoldClampingShrinkJson = draftGreekJson;
    self.removalMailData = removalMailData;
    if ([self.maxInsetPrimaryForGet isReady]) {
        [self.maxInsetPrimaryForGet showAd];
    } else {
        [self.maxInsetPrimaryForGet loadAd];
        if (draftGreekJson) {
            draftGreekJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.sinSunSafariFlashOneResources(hisInfo);
}


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

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

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

    

    self.negotiateLeaseWinAboveScale++;
    NSInteger mightFax = pow(2, MIN(6, self.negotiateLeaseWinAboveScale));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, mightFax * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.chromeConjugateRevealItsAbsent.adUnitIdentifier]) {
            [self.chromeConjugateRevealItsAbsent loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.maxInsetPrimaryForGet.adUnitIdentifier]) {
            [self.maxInsetPrimaryForGet loadAd];
        }
    });
}

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

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

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

        if (self.chargeEggRangeFoldClampingShrinkJson) {
            NSDictionary *dayJson = [self laotianSnapSearchingBeaconRow:ad];
            self.chargeEggRangeFoldClampingShrinkJson(YES, dayJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.drivenLiterAddTheParentalJson) {
        NSDictionary *dayJson = [self laotianSnapSearchingBeaconRow:ad];
        self.drivenLiterAddTheParentalJson(YES, dayJson);
    }
}


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

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


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

@end
