








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

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

@property (nonatomic, strong) MARewardedAd *moreDisplaysHalfCollationLinkage;
@property (nonatomic, strong) MAInterstitialAd *velocityRelativeQuietMileStorage;
@property (nonatomic, assign) NSInteger vitaminChatterAuditedExtentsPin;

@property (nonatomic, copy) NSString *bigInfoSpanData;

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

@property (nonatomic, copy) void (^childrenConnectedMidInsulinIrregularJson)(BOOL result, NSDictionary *pubJson);

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

@property (nonatomic, copy) void (^mayIssueEstablishPastVideoCollapsedJson)(BOOL result, NSDictionary *pubJson);

@property (nonatomic, copy) void (^croatianSafariStylusHardSceneResting)(NSDictionary *askInfo);

@end

@implementation UnlearnEllipsisYouTouchJumpSun

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

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

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

- (void)posterFatSilenceViolationChestRevert:(void(^)(NSDictionary *askInfo))callback {
    self.croatianSafariStylusHardSceneResting = callback;
}


- (void)incrementRaiseMomentOrderedWinHashKey:(NSString *)xxpk_maxkey transitOptimizedTorqueScrollExpanding:(NSString *)transitOptimizedTorqueScrollExpanding parsingSlashedProcessBuiltArtistMartial:(NSString *)parsingSlashedProcessBuiltArtistMartial lowMinBinKazakhLeave:(NSArray *)lowMinBinKazakhLeave {
    
    
    
    Class pen = NSClassFromString(@"FBAdSettings");
    if (pen) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [pen performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [pen performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *pickerFarIgnoringEraSeed = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (lowMinBinKazakhLeave) {
            builder.testDeviceAdvertisingIdentifiers = lowMinBinKazakhLeave;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:pickerFarIgnoringEraSeed completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self instantVariablesNetSubSearchingZipStrip:transitOptimizedTorqueScrollExpanding];
        if (parsingSlashedProcessBuiltArtistMartial.length > 0) {
            [self motionPlayLambdaThirdSlopeSafeFaxVelocity:parsingSlashedProcessBuiltArtistMartial];
        }
    }];
}

- (void)instantVariablesNetSubSearchingZipStrip:(NSString *)transitOptimizedTorqueScrollExpanding
{
    self.moreDisplaysHalfCollationLinkage = [MARewardedAd sharedWithAdUnitIdentifier:transitOptimizedTorqueScrollExpanding];
    self.moreDisplaysHalfCollationLinkage.delegate = self;
    self.moreDisplaysHalfCollationLinkage.revenueDelegate = self;

    
    [self.moreDisplaysHalfCollationLinkage loadAd];
}

- (void)motionPlayLambdaThirdSlopeSafeFaxVelocity:(NSString *)parsingSlashedProcessBuiltArtistMartial
{
    self.velocityRelativeQuietMileStorage = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:parsingSlashedProcessBuiltArtistMartial];
    self.velocityRelativeQuietMileStorage.delegate = self;
    self.velocityRelativeQuietMileStorage.revenueDelegate = self;

    
    [self.velocityRelativeQuietMileStorage loadAd];
}


- (void)noteEarlierIntegrityFloatBlinkVectorData:(nullable NSString *)bigInfoSpanData forHerBoldJson:(void(^)(BOOL result, NSDictionary *pubJson))forHerBoldJson {
    self.childrenConnectedMidInsulinIrregularJson = forHerBoldJson;
    self.bigInfoSpanData = bigInfoSpanData;
    if ( [self.moreDisplaysHalfCollationLinkage isReady]) {
        [self.moreDisplaysHalfCollationLinkage showAdForPlacement:nil customData:bigInfoSpanData];
    }else {
        forHerBoldJson(NO,nil);
    }
}

- (void)noteEarlierIntegrityFloatBlinkVectorData:(nullable NSString *)bigInfoSpanData theOccur:(void(^)(BOOL result))theOccur {
    self.catJouleRebus = theOccur;
    self.bigInfoSpanData = bigInfoSpanData;
    if ( [self.moreDisplaysHalfCollationLinkage isReady]) {
        [self.moreDisplaysHalfCollationLinkage showAdForPlacement:nil customData:bigInfoSpanData];
    }else {
        theOccur(NO);
    }
}

- (void)balticMicroThiaminAbsentWarnShadowReadData:(nullable NSString *)bigInfoSpanData theOccur:(void(^)(BOOL result))theOccur {
    self.emailJustUsabilitySecondThumbnailInternal = theOccur;
    self.bigInfoSpanData = bigInfoSpanData;
    if ([self.velocityRelativeQuietMileStorage isReady]) {
        [self.velocityRelativeQuietMileStorage showAd];
    } else {
        [self.velocityRelativeQuietMileStorage loadAd];
        if (theOccur) {
            theOccur(NO);
        }
    }
}

- (void)balticMicroThiaminAbsentWarnShadowReadData:(nullable NSString *)bigInfoSpanData forHerBoldJson:(void(^)(BOOL result, NSDictionary *pubJson))forHerBoldJson {
    self.mayIssueEstablishPastVideoCollapsedJson = forHerBoldJson;
    self.bigInfoSpanData = bigInfoSpanData;
    if ([self.velocityRelativeQuietMileStorage isReady]) {
        [self.velocityRelativeQuietMileStorage showAd];
    } else {
        [self.velocityRelativeQuietMileStorage loadAd];
        if (forHerBoldJson) {
            forHerBoldJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.croatianSafariStylusHardSceneResting(askInfo);
}


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

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

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

    

    self.vitaminChatterAuditedExtentsPin++;
    NSInteger keyClear = pow(2, MIN(6, self.vitaminChatterAuditedExtentsPin));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, keyClear * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.moreDisplaysHalfCollationLinkage.adUnitIdentifier]) {
            [self.moreDisplaysHalfCollationLinkage loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.velocityRelativeQuietMileStorage.adUnitIdentifier]) {
            [self.velocityRelativeQuietMileStorage loadAd];
        }
    });
}

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

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

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

        if (self.mayIssueEstablishPastVideoCollapsedJson) {
            NSDictionary *pubJson = [self queueReservedProblemStepHold:ad];
            self.mayIssueEstablishPastVideoCollapsedJson(YES, pubJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.childrenConnectedMidInsulinIrregularJson) {
        NSDictionary *pubJson = [self queueReservedProblemStepHold:ad];
        self.childrenConnectedMidInsulinIrregularJson(YES, pubJson);
    }
}


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

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


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

@end
