








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

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

@property (nonatomic, strong) MARewardedAd *familyBedUsabilitySindhiReplaced;
@property (nonatomic, strong) MAInterstitialAd *iconUrgentMaxRemembersFraction;
@property (nonatomic, assign) NSInteger goldenSonBandEastVolume;

@property (nonatomic, copy) NSString *oldMalaySpaData;

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

@property (nonatomic, copy) void (^fetchAssistiveRangingSeeIodineJson)(BOOL result, NSDictionary *badJson);

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

@property (nonatomic, copy) void (^binaryTriangleLikeDomainEscapeWrapJson)(BOOL result, NSDictionary *badJson);

@property (nonatomic, copy) void (^vowelChromeRecentlyShuffleTwitterMind)(NSDictionary *netInfo);

@end

@implementation PassGracefulQueryIronExistingThin

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

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

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

- (void)playbackDraftBitsTakeAdverbChat:(void(^)(NSDictionary *netInfo))callback {
    self.vowelChromeRecentlyShuffleTwitterMind = callback;
}


- (void)extendFlightEditReloadOneWidgetKey:(NSString *)xxpk_maxkey lookLongerTopFrequencyBegin:(NSString *)lookLongerTopFrequencyBegin strokingDownloadsReduceMalformedLegacyRemoval:(NSString *)strokingDownloadsReduceMalformedLegacyRemoval touchDetectorEnablingDomainsDone:(NSArray *)touchDetectorEnablingDomainsDone {
    
    
    
    Class air = NSClassFromString(@"FBAdSettings");
    if (air) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [air performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [air performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *fitSquaresYouDriveExcluded = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (touchDetectorEnablingDomainsDone) {
            builder.testDeviceAdvertisingIdentifiers = touchDetectorEnablingDomainsDone;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:fitSquaresYouDriveExcluded completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self outUploadingBehaveBookQueueFlatnessInterrupt:lookLongerTopFrequencyBegin];
        if (strokingDownloadsReduceMalformedLegacyRemoval.length > 0) {
            [self collectPopLogReceivingCardioidSobFormatRouter:strokingDownloadsReduceMalformedLegacyRemoval];
        }
    }];
}

- (void)outUploadingBehaveBookQueueFlatnessInterrupt:(NSString *)lookLongerTopFrequencyBegin
{
    self.familyBedUsabilitySindhiReplaced = [MARewardedAd sharedWithAdUnitIdentifier:lookLongerTopFrequencyBegin];
    self.familyBedUsabilitySindhiReplaced.delegate = self;
    self.familyBedUsabilitySindhiReplaced.revenueDelegate = self;

    
    [self.familyBedUsabilitySindhiReplaced loadAd];
}

- (void)collectPopLogReceivingCardioidSobFormatRouter:(NSString *)strokingDownloadsReduceMalformedLegacyRemoval
{
    self.iconUrgentMaxRemembersFraction = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:strokingDownloadsReduceMalformedLegacyRemoval];
    self.iconUrgentMaxRemembersFraction.delegate = self;
    self.iconUrgentMaxRemembersFraction.revenueDelegate = self;

    
    [self.iconUrgentMaxRemembersFraction loadAd];
}


- (void)gujaratiHandReachedAcceptedUnfocusedPressedData:(nullable NSString *)oldMalaySpaData packMethodJson:(void(^)(BOOL result, NSDictionary *badJson))packMethodJson {
    self.fetchAssistiveRangingSeeIodineJson = packMethodJson;
    self.oldMalaySpaData = oldMalaySpaData;
    if ( [self.familyBedUsabilitySindhiReplaced isReady]) {
        [self.familyBedUsabilitySindhiReplaced showAdForPlacement:nil customData:oldMalaySpaData];
    }else {
        packMethodJson(NO,nil);
    }
}

- (void)gujaratiHandReachedAcceptedUnfocusedPressedData:(nullable NSString *)oldMalaySpaData lowLocal:(void(^)(BOOL result))lowLocal {
    self.grandsonCheck = lowLocal;
    self.oldMalaySpaData = oldMalaySpaData;
    if ( [self.familyBedUsabilitySindhiReplaced isReady]) {
        [self.familyBedUsabilitySindhiReplaced showAdForPlacement:nil customData:oldMalaySpaData];
    }else {
        lowLocal(NO);
    }
}

- (void)allAscenderBusAuthorsRollForeverPrincipalData:(nullable NSString *)oldMalaySpaData lowLocal:(void(^)(BOOL result))lowLocal {
    self.sigmoidDrizzleAbortPutItalicVision = lowLocal;
    self.oldMalaySpaData = oldMalaySpaData;
    if ([self.iconUrgentMaxRemembersFraction isReady]) {
        [self.iconUrgentMaxRemembersFraction showAd];
    } else {
        [self.iconUrgentMaxRemembersFraction loadAd];
        if (lowLocal) {
            lowLocal(NO);
        }
    }
}

- (void)allAscenderBusAuthorsRollForeverPrincipalData:(nullable NSString *)oldMalaySpaData packMethodJson:(void(^)(BOOL result, NSDictionary *badJson))packMethodJson {
    self.binaryTriangleLikeDomainEscapeWrapJson = packMethodJson;
    self.oldMalaySpaData = oldMalaySpaData;
    if ([self.iconUrgentMaxRemembersFraction isReady]) {
        [self.iconUrgentMaxRemembersFraction showAd];
    } else {
        [self.iconUrgentMaxRemembersFraction loadAd];
        if (packMethodJson) {
            packMethodJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.vowelChromeRecentlyShuffleTwitterMind(netInfo);
}


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

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

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

    

    self.goldenSonBandEastVolume++;
    NSInteger outerEar = pow(2, MIN(6, self.goldenSonBandEastVolume));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, outerEar * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.familyBedUsabilitySindhiReplaced.adUnitIdentifier]) {
            [self.familyBedUsabilitySindhiReplaced loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.iconUrgentMaxRemembersFraction.adUnitIdentifier]) {
            [self.iconUrgentMaxRemembersFraction loadAd];
        }
    });
}

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

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

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

        if (self.binaryTriangleLikeDomainEscapeWrapJson) {
            NSDictionary *badJson = [self toolTomorrowEjectQuantityReporting:ad];
            self.binaryTriangleLikeDomainEscapeWrapJson(YES, badJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.fetchAssistiveRangingSeeIodineJson) {
        NSDictionary *badJson = [self toolTomorrowEjectQuantityReporting:ad];
        self.fetchAssistiveRangingSeeIodineJson(YES, badJson);
    }
}


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

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


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

@end
