








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

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

@property (nonatomic, strong) MARewardedAd *degreeWrappedWonPageHeader;
@property (nonatomic, strong) MAInterstitialAd *funOriginDustAdditionsType;
@property (nonatomic, assign) NSInteger discountPasteCompactSunAgent;

@property (nonatomic, copy) NSString *anyAreClockData;

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

@property (nonatomic, copy) void (^circleOutletEvaluatedTagalogMovieJson)(BOOL result, NSDictionary *sayJson);

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

@property (nonatomic, copy) void (^blobDestroyZoneProxiesWillClusterJson)(BOOL result, NSDictionary *sayJson);

@property (nonatomic, copy) void (^funnelNonceInitiatedTransportUnsafeRespond)(NSDictionary *eggInfo);

@end

@implementation CarPlanToggleToolInitiatedLabel

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

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

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

- (void)googleInsetWaxSemanticImplicitNominal:(void(^)(NSDictionary *eggInfo))callback {
    self.funnelNonceInitiatedTransportUnsafeRespond = callback;
}


- (void)hexSunKirghizWristOneStartKey:(NSString *)xxpk_maxkey majorVersionPenDebuggerContained:(NSString *)majorVersionPenDebuggerContained annotatedWalkSubsetUnfocusedReportingAlign:(NSString *)annotatedWalkSubsetUnfocusedReportingAlign lazyPasswordsHundredFoggyConstants:(NSArray *)lazyPasswordsHundredFoggyConstants {
    
    
    
    Class way = NSClassFromString(@"FBAdSettings");
    if (way) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [way performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [way performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *parentalFirmwareSemanticsChatterAdd = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (lazyPasswordsHundredFoggyConstants) {
            builder.testDeviceAdvertisingIdentifiers = lazyPasswordsHundredFoggyConstants;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:parentalFirmwareSemanticsChatterAdd completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self batchKirghizRevertingMartialTwoPinkLaunched:majorVersionPenDebuggerContained];
        if (annotatedWalkSubsetUnfocusedReportingAlign.length > 0) {
            [self depthSpouseNauticalOxygenPermanentProcessesDetectsPartially:annotatedWalkSubsetUnfocusedReportingAlign];
        }
    }];
}

- (void)batchKirghizRevertingMartialTwoPinkLaunched:(NSString *)majorVersionPenDebuggerContained
{
    self.degreeWrappedWonPageHeader = [MARewardedAd sharedWithAdUnitIdentifier:majorVersionPenDebuggerContained];
    self.degreeWrappedWonPageHeader.delegate = self;
    self.degreeWrappedWonPageHeader.revenueDelegate = self;

    
    [self.degreeWrappedWonPageHeader loadAd];
}

- (void)depthSpouseNauticalOxygenPermanentProcessesDetectsPartially:(NSString *)annotatedWalkSubsetUnfocusedReportingAlign
{
    self.funOriginDustAdditionsType = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:annotatedWalkSubsetUnfocusedReportingAlign];
    self.funOriginDustAdditionsType.delegate = self;
    self.funOriginDustAdditionsType.revenueDelegate = self;

    
    [self.funOriginDustAdditionsType loadAd];
}


- (void)sectionSendOddVisitSkipColleagueData:(nullable NSString *)anyAreClockData cocoaCheckJson:(void(^)(BOOL result, NSDictionary *sayJson))cocoaCheckJson {
    self.circleOutletEvaluatedTagalogMovieJson = cocoaCheckJson;
    self.anyAreClockData = anyAreClockData;
    if ( [self.degreeWrappedWonPageHeader isReady]) {
        [self.degreeWrappedWonPageHeader showAdForPlacement:nil customData:anyAreClockData];
    }else {
        cocoaCheckJson(NO,nil);
    }
}

- (void)sectionSendOddVisitSkipColleagueData:(nullable NSString *)anyAreClockData teethOdd:(void(^)(BOOL result))teethOdd {
    self.floatingShare = teethOdd;
    self.anyAreClockData = anyAreClockData;
    if ( [self.degreeWrappedWonPageHeader isReady]) {
        [self.degreeWrappedWonPageHeader showAdForPlacement:nil customData:anyAreClockData];
    }else {
        teethOdd(NO);
    }
}

- (void)clampKelvinMaskRevisionsDrawingAlienSecondaryData:(nullable NSString *)anyAreClockData teethOdd:(void(^)(BOOL result))teethOdd {
    self.thinAreThiaminDidTenGrade = teethOdd;
    self.anyAreClockData = anyAreClockData;
    if ([self.funOriginDustAdditionsType isReady]) {
        [self.funOriginDustAdditionsType showAd];
    } else {
        [self.funOriginDustAdditionsType loadAd];
        if (teethOdd) {
            teethOdd(NO);
        }
    }
}

- (void)clampKelvinMaskRevisionsDrawingAlienSecondaryData:(nullable NSString *)anyAreClockData cocoaCheckJson:(void(^)(BOOL result, NSDictionary *sayJson))cocoaCheckJson {
    self.blobDestroyZoneProxiesWillClusterJson = cocoaCheckJson;
    self.anyAreClockData = anyAreClockData;
    if ([self.funOriginDustAdditionsType isReady]) {
        [self.funOriginDustAdditionsType showAd];
    } else {
        [self.funOriginDustAdditionsType loadAd];
        if (cocoaCheckJson) {
            cocoaCheckJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.funnelNonceInitiatedTransportUnsafeRespond(eggInfo);
}


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

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

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

    

    self.discountPasteCompactSunAgent++;
    NSInteger shareDog = pow(2, MIN(6, self.discountPasteCompactSunAgent));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, shareDog * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.degreeWrappedWonPageHeader.adUnitIdentifier]) {
            [self.degreeWrappedWonPageHeader loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.funOriginDustAdditionsType.adUnitIdentifier]) {
            [self.funOriginDustAdditionsType loadAd];
        }
    });
}

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

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

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

        if (self.blobDestroyZoneProxiesWillClusterJson) {
            NSDictionary *sayJson = [self alignGurationMasterWasAlpha:ad];
            self.blobDestroyZoneProxiesWillClusterJson(YES, sayJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.circleOutletEvaluatedTagalogMovieJson) {
        NSDictionary *sayJson = [self alignGurationMasterWasAlpha:ad];
        self.circleOutletEvaluatedTagalogMovieJson(YES, sayJson);
    }
}


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

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


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

@end
