








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

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

@property (nonatomic, strong) MARewardedAd *deciliterLifetimeFollowerFreeExemplar;
@property (nonatomic, strong) MAInterstitialAd *potentialNanogramsYearDisablesSubgroups;
@property (nonatomic, assign) NSInteger idleSpeedForTruncateWater;

@property (nonatomic, copy) NSString *rematchPathData;

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

@property (nonatomic, copy) void (^storageMovementGaspBeenYearJson)(BOOL result, NSDictionary *barJson);

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

@property (nonatomic, copy) void (^dueBigRemovesPedometerMessageNotifyingJson)(BOOL result, NSDictionary *barJson);

@property (nonatomic, copy) void (^entitledRejectTemplateEncodedBufferGigahertz)(NSDictionary *allInfo);

@end

@implementation SalientFeedbackMotionTrySessionStepchild

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

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

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

- (void)characterChromaticSinhalesePosterRegisterSwap:(void(^)(NSDictionary *allInfo))callback {
    self.entitledRejectTemplateEncodedBufferGigahertz = callback;
}


- (void)eggSlashInstantDetailKindCatalogKey:(NSString *)xxpk_maxkey danceSendSucceededHormoneShuffle:(NSString *)danceSendSucceededHormoneShuffle artsSeparateAxesMightMoleRemote:(NSString *)artsSeparateAxesMightMoleRemote alongRequireMoodNowMore:(NSArray *)alongRequireMoodNowMore {
    
    
    
    Class our = NSClassFromString(@"FBAdSettings");
    if (our) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [our performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [our performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *executionZeroYoungestResponsesMax = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (alongRequireMoodNowMore) {
            builder.testDeviceAdvertisingIdentifiers = alongRequireMoodNowMore;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:executionZeroYoungestResponsesMax completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self loopsPhotosTwoUpperHallAirDisparity:danceSendSucceededHormoneShuffle];
        if (artsSeparateAxesMightMoleRemote.length > 0) {
            [self gatherGlyphUppercaseDigestPrologGallonRangeNap:artsSeparateAxesMightMoleRemote];
        }
    }];
}

- (void)loopsPhotosTwoUpperHallAirDisparity:(NSString *)danceSendSucceededHormoneShuffle
{
    self.deciliterLifetimeFollowerFreeExemplar = [MARewardedAd sharedWithAdUnitIdentifier:danceSendSucceededHormoneShuffle];
    self.deciliterLifetimeFollowerFreeExemplar.delegate = self;
    self.deciliterLifetimeFollowerFreeExemplar.revenueDelegate = self;

    
    [self.deciliterLifetimeFollowerFreeExemplar loadAd];
}

- (void)gatherGlyphUppercaseDigestPrologGallonRangeNap:(NSString *)artsSeparateAxesMightMoleRemote
{
    self.potentialNanogramsYearDisablesSubgroups = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:artsSeparateAxesMightMoleRemote];
    self.potentialNanogramsYearDisablesSubgroups.delegate = self;
    self.potentialNanogramsYearDisablesSubgroups.revenueDelegate = self;

    
    [self.potentialNanogramsYearDisablesSubgroups loadAd];
}


- (void)artistTrademarkSonCubicHandshakeMirroredData:(nullable NSString *)rematchPathData caseDryKitJson:(void(^)(BOOL result, NSDictionary *barJson))caseDryKitJson {
    self.storageMovementGaspBeenYearJson = caseDryKitJson;
    self.rematchPathData = rematchPathData;
    if ( [self.deciliterLifetimeFollowerFreeExemplar isReady]) {
        [self.deciliterLifetimeFollowerFreeExemplar showAdForPlacement:nil customData:rematchPathData];
    }else {
        caseDryKitJson(NO,nil);
    }
}

- (void)artistTrademarkSonCubicHandshakeMirroredData:(nullable NSString *)rematchPathData splatToo:(void(^)(BOOL result))splatToo {
    self.napSignEraDay = splatToo;
    self.rematchPathData = rematchPathData;
    if ( [self.deciliterLifetimeFollowerFreeExemplar isReady]) {
        [self.deciliterLifetimeFollowerFreeExemplar showAdForPlacement:nil customData:rematchPathData];
    }else {
        splatToo(NO);
    }
}

- (void)leastOutletDetectorRetGoogleExecUnifyData:(nullable NSString *)rematchPathData splatToo:(void(^)(BOOL result))splatToo {
    self.digitalDefinedEditSafeReadoutMole = splatToo;
    self.rematchPathData = rematchPathData;
    if ([self.potentialNanogramsYearDisablesSubgroups isReady]) {
        [self.potentialNanogramsYearDisablesSubgroups showAd];
    } else {
        [self.potentialNanogramsYearDisablesSubgroups loadAd];
        if (splatToo) {
            splatToo(NO);
        }
    }
}

- (void)leastOutletDetectorRetGoogleExecUnifyData:(nullable NSString *)rematchPathData caseDryKitJson:(void(^)(BOOL result, NSDictionary *barJson))caseDryKitJson {
    self.dueBigRemovesPedometerMessageNotifyingJson = caseDryKitJson;
    self.rematchPathData = rematchPathData;
    if ([self.potentialNanogramsYearDisablesSubgroups isReady]) {
        [self.potentialNanogramsYearDisablesSubgroups showAd];
    } else {
        [self.potentialNanogramsYearDisablesSubgroups loadAd];
        if (caseDryKitJson) {
            caseDryKitJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.entitledRejectTemplateEncodedBufferGigahertz(allInfo);
}


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

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

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

    

    self.idleSpeedForTruncateWater++;
    NSInteger usesFoot = pow(2, MIN(6, self.idleSpeedForTruncateWater));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, usesFoot * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.deciliterLifetimeFollowerFreeExemplar.adUnitIdentifier]) {
            [self.deciliterLifetimeFollowerFreeExemplar loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.potentialNanogramsYearDisablesSubgroups.adUnitIdentifier]) {
            [self.potentialNanogramsYearDisablesSubgroups loadAd];
        }
    });
}

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

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

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

        if (self.dueBigRemovesPedometerMessageNotifyingJson) {
            NSDictionary *barJson = [self lockEllipseAlarmBringSentinel:ad];
            self.dueBigRemovesPedometerMessageNotifyingJson(YES, barJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.storageMovementGaspBeenYearJson) {
        NSDictionary *barJson = [self lockEllipseAlarmBringSentinel:ad];
        self.storageMovementGaspBeenYearJson(YES, barJson);
    }
}


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

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


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

@end
