








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

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

@property (nonatomic, strong) MARewardedAd *anyBurstExclusionFoldFlatten;
@property (nonatomic, strong) MAInterstitialAd *memberPatientWeekManyBit;
@property (nonatomic, assign) NSInteger chunkIntegrateHallSiblingsOld;

@property (nonatomic, copy) NSString *wasFurlongsData;

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

@property (nonatomic, copy) void (^receivedKilogramsSerialFavoritesDirectoryJson)(BOOL result, NSDictionary *yetJson);

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

@property (nonatomic, copy) void (^parseTrademarkGetTextureStreetManyJson)(BOOL result, NSDictionary *yetJson);

@property (nonatomic, copy) void (^millExposeLittleTrainerRunningSlant)(NSDictionary *adInfo);

@end

@implementation DrySecureHiddenBoldInteriorLoad

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

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

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

- (void)mainBandRecentDialogRuleBehave:(void(^)(NSDictionary *adInfo))callback {
    self.millExposeLittleTrainerRunningSlant = callback;
}


- (void)fastGeometryEncryptedPanMotionStringKey:(NSString *)xxpk_maxkey elevationLowSpouseFeaturedLost:(NSString *)elevationLowSpouseFeaturedLost popMarkupElementModalSoloistWindow:(NSString *)popMarkupElementModalSoloistWindow latvianLastLooseBlackDietary:(NSArray *)latvianLastLooseBlackDietary {
    
    
    
    Class cls = NSClassFromString(@"FBAdSettings");
    if (cls) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [cls performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [cls performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *downhillTooEngineerOnlyRollback = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (latvianLastLooseBlackDietary) {
            builder.testDeviceAdvertisingIdentifiers = latvianLastLooseBlackDietary;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:downhillTooEngineerOnlyRollback completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self justContextsLoudTokenObserverEasyFocus:elevationLowSpouseFeaturedLost];
        if (popMarkupElementModalSoloistWindow.length > 0) {
            [self thresholdTokenLinearlyLegalRatioBeaconMalformedFunk:popMarkupElementModalSoloistWindow];
        }
    }];
}

- (void)justContextsLoudTokenObserverEasyFocus:(NSString *)elevationLowSpouseFeaturedLost
{
    self.anyBurstExclusionFoldFlatten = [MARewardedAd sharedWithAdUnitIdentifier:elevationLowSpouseFeaturedLost];
    self.anyBurstExclusionFoldFlatten.delegate = self;
    self.anyBurstExclusionFoldFlatten.revenueDelegate = self;

    
    [self.anyBurstExclusionFoldFlatten loadAd];
}

- (void)thresholdTokenLinearlyLegalRatioBeaconMalformedFunk:(NSString *)popMarkupElementModalSoloistWindow
{
    self.memberPatientWeekManyBit = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:popMarkupElementModalSoloistWindow];
    self.memberPatientWeekManyBit.delegate = self;
    self.memberPatientWeekManyBit.revenueDelegate = self;

    
    [self.memberPatientWeekManyBit loadAd];
}


- (void)liveUnfocusedExecutorProvidedDeveloperBadData:(nullable NSString *)wasFurlongsData manAreMealJson:(void(^)(BOOL result, NSDictionary *yetJson))manAreMealJson {
    self.receivedKilogramsSerialFavoritesDirectoryJson = manAreMealJson;
    self.wasFurlongsData = wasFurlongsData;
    if ( [self.anyBurstExclusionFoldFlatten isReady]) {
        [self.anyBurstExclusionFoldFlatten showAdForPlacement:nil customData:wasFurlongsData];
    }else {
        manAreMealJson(NO,nil);
    }
}

- (void)liveUnfocusedExecutorProvidedDeveloperBadData:(nullable NSString *)wasFurlongsData equality:(void(^)(BOOL result))equality {
    self.sigmaHertzAsk = equality;
    self.wasFurlongsData = wasFurlongsData;
    if ( [self.anyBurstExclusionFoldFlatten isReady]) {
        [self.anyBurstExclusionFoldFlatten showAdForPlacement:nil customData:wasFurlongsData];
    }else {
        equality(NO);
    }
}

- (void)jumpWateryDirtyBookYouNetPostcardData:(nullable NSString *)wasFurlongsData equality:(void(^)(BOOL result))equality {
    self.incorrectEditorialWhiteSolveBatteryRelations = equality;
    self.wasFurlongsData = wasFurlongsData;
    if ([self.memberPatientWeekManyBit isReady]) {
        [self.memberPatientWeekManyBit showAd];
    } else {
        [self.memberPatientWeekManyBit loadAd];
        if (equality) {
            equality(NO);
        }
    }
}

- (void)jumpWateryDirtyBookYouNetPostcardData:(nullable NSString *)wasFurlongsData manAreMealJson:(void(^)(BOOL result, NSDictionary *yetJson))manAreMealJson {
    self.parseTrademarkGetTextureStreetManyJson = manAreMealJson;
    self.wasFurlongsData = wasFurlongsData;
    if ([self.memberPatientWeekManyBit isReady]) {
        [self.memberPatientWeekManyBit showAd];
    } else {
        [self.memberPatientWeekManyBit loadAd];
        if (manAreMealJson) {
            manAreMealJson(NO, nil);
        }
    }
}

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

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

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

    
    NSString *adType = ad.format.label ?: @"UNKNOWN";

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

    self.millExposeLittleTrainerRunningSlant(adInfo);
}


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

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

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

    

    self.chunkIntegrateHallSiblingsOld++;
    NSInteger fontView = pow(2, MIN(6, self.chunkIntegrateHallSiblingsOld));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, fontView * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.anyBurstExclusionFoldFlatten.adUnitIdentifier]) {
            [self.anyBurstExclusionFoldFlatten loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.memberPatientWeekManyBit.adUnitIdentifier]) {
            [self.memberPatientWeekManyBit loadAd];
        }
    });
}

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

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

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

        if (self.parseTrademarkGetTextureStreetManyJson) {
            NSDictionary *yetJson = [self pulsePeriodicGenerateFatalFriends:ad];
            self.parseTrademarkGetTextureStreetManyJson(YES, yetJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.receivedKilogramsSerialFavoritesDirectoryJson) {
        NSDictionary *yetJson = [self pulsePeriodicGenerateFatalFriends:ad];
        self.receivedKilogramsSerialFavoritesDirectoryJson(YES, yetJson);
    }
}


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

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


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

@end
