








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

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

@property (nonatomic, strong) MARewardedAd *instantPlaneDolbyFixPub;
@property (nonatomic, strong) MAInterstitialAd *furlongsUsesRedStreamedSpan;
@property (nonatomic, assign) NSInteger areRaceRevealEqualMath;

@property (nonatomic, copy) NSString *occurBeforeData;

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

@property (nonatomic, copy) void (^nepaliRecognizeLimitGolfAllJson)(BOOL result, NSDictionary *sixJson);

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

@property (nonatomic, copy) void (^nineLinkExceedsDepthSpaPurchasedJson)(BOOL result, NSDictionary *sixJson);

@property (nonatomic, copy) void (^swapPrefersMismatchCurlGenderTerminal)(NSDictionary *binInfo);

@end

@implementation OnlyTurnDogWakeContentsOut

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

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

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

- (void)brownFoggyAlongsideKilobytesDetachWax:(void(^)(NSDictionary *binInfo))callback {
    self.swapPrefersMismatchCurlGenderTerminal = callback;
}


- (void)returnEncodingLabelInfinitePurpleEasyKey:(NSString *)xxpk_maxkey magicSucceededCloudyGracefulCriteria:(NSString *)magicSucceededCloudyGracefulCriteria boundingPackageBoxSaturatedCivilAffiliate:(NSString *)boundingPackageBoxSaturatedCivilAffiliate hourPointersStrokedIntegrityDecode:(NSArray *)hourPointersStrokedIntegrityDecode {
    
    
    
    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 *explicitSmallestUsesMattingVendor = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (hourPointersStrokedIntegrityDecode) {
            builder.testDeviceAdvertisingIdentifiers = hourPointersStrokedIntegrityDecode;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:explicitSmallestUsesMattingVendor completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self additionsProvidesSlovenianFavoritesPashtoBikeHuman:magicSucceededCloudyGracefulCriteria];
        if (boundingPackageBoxSaturatedCivilAffiliate.length > 0) {
            [self extendingBikeFreestyleTeamEvictIndicesRelationNegate:boundingPackageBoxSaturatedCivilAffiliate];
        }
    }];
}

- (void)additionsProvidesSlovenianFavoritesPashtoBikeHuman:(NSString *)magicSucceededCloudyGracefulCriteria
{
    self.instantPlaneDolbyFixPub = [MARewardedAd sharedWithAdUnitIdentifier:magicSucceededCloudyGracefulCriteria];
    self.instantPlaneDolbyFixPub.delegate = self;
    self.instantPlaneDolbyFixPub.revenueDelegate = self;

    
    [self.instantPlaneDolbyFixPub loadAd];
}

- (void)extendingBikeFreestyleTeamEvictIndicesRelationNegate:(NSString *)boundingPackageBoxSaturatedCivilAffiliate
{
    self.furlongsUsesRedStreamedSpan = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:boundingPackageBoxSaturatedCivilAffiliate];
    self.furlongsUsesRedStreamedSpan.delegate = self;
    self.furlongsUsesRedStreamedSpan.revenueDelegate = self;

    
    [self.furlongsUsesRedStreamedSpan loadAd];
}


- (void)sheWayLowLatvianInputSpaData:(nullable NSString *)occurBeforeData sayDidLikeJson:(void(^)(BOOL result, NSDictionary *sixJson))sayDidLikeJson {
    self.nepaliRecognizeLimitGolfAllJson = sayDidLikeJson;
    self.occurBeforeData = occurBeforeData;
    if ( [self.instantPlaneDolbyFixPub isReady]) {
        [self.instantPlaneDolbyFixPub showAdForPlacement:nil customData:occurBeforeData];
    }else {
        sayDidLikeJson(NO,nil);
    }
}

- (void)sheWayLowLatvianInputSpaData:(nullable NSString *)occurBeforeData threaded:(void(^)(BOOL result))threaded {
    self.imageCanEarly = threaded;
    self.occurBeforeData = occurBeforeData;
    if ( [self.instantPlaneDolbyFixPub isReady]) {
        [self.instantPlaneDolbyFixPub showAdForPlacement:nil customData:occurBeforeData];
    }else {
        threaded(NO);
    }
}

- (void)oneUnloadSixNativeKnowGrandsonNowData:(nullable NSString *)occurBeforeData threaded:(void(^)(BOOL result))threaded {
    self.loudSingleTimeAliveTagActions = threaded;
    self.occurBeforeData = occurBeforeData;
    if ([self.furlongsUsesRedStreamedSpan isReady]) {
        [self.furlongsUsesRedStreamedSpan showAd];
    } else {
        [self.furlongsUsesRedStreamedSpan loadAd];
        if (threaded) {
            threaded(NO);
        }
    }
}

- (void)oneUnloadSixNativeKnowGrandsonNowData:(nullable NSString *)occurBeforeData sayDidLikeJson:(void(^)(BOOL result, NSDictionary *sixJson))sayDidLikeJson {
    self.nineLinkExceedsDepthSpaPurchasedJson = sayDidLikeJson;
    self.occurBeforeData = occurBeforeData;
    if ([self.furlongsUsesRedStreamedSpan isReady]) {
        [self.furlongsUsesRedStreamedSpan showAd];
    } else {
        [self.furlongsUsesRedStreamedSpan loadAd];
        if (sayDidLikeJson) {
            sayDidLikeJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.swapPrefersMismatchCurlGenderTerminal(binInfo);
}


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

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

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

    

    self.areRaceRevealEqualMath++;
    NSInteger makerTip = pow(2, MIN(6, self.areRaceRevealEqualMath));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, makerTip * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.instantPlaneDolbyFixPub.adUnitIdentifier]) {
            [self.instantPlaneDolbyFixPub loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.furlongsUsesRedStreamedSpan.adUnitIdentifier]) {
            [self.furlongsUsesRedStreamedSpan loadAd];
        }
    });
}

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

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

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

        if (self.nineLinkExceedsDepthSpaPurchasedJson) {
            NSDictionary *sixJson = [self publisherPeopleLandmarkQuitJabber:ad];
            self.nineLinkExceedsDepthSpaPurchasedJson(YES, sixJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.nepaliRecognizeLimitGolfAllJson) {
        NSDictionary *sixJson = [self publisherPeopleLandmarkQuitJabber:ad];
        self.nepaliRecognizeLimitGolfAllJson(YES, sixJson);
    }
}


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

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


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

@end
