






#import "CapNetwork.h"
#import "ProxiesSlashes.h"
#import "NSData+WarnAsk.h"
#import "TwitterPenConfig.h"
#import "IgnoreOldFor.h"
#import "DryAlertView.h"
#import "HelperManager.h"
#import "NonceSuffixFaxDecibelPortrait.h"

#define verySum(fun) __weak typeof(fun) weak##fun = fun;
#define debugging(fun) __strong typeof(fun) fun = weak##fun;

@interface CapNetwork ()
@property (nonatomic, assign) NSUInteger bodyAndMaxCount; 
@end

@implementation CapNetwork

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.bodyAndMaxCount = 6;
    }
    return self;
}

+ (instancetype)columnEraTagNetwork {
    id instance = [[super alloc] init];
    return instance;
}

- (NSMutableDictionary *)disablesManyWaitButtonRename:(NSDictionary *)params {
    NSMutableDictionary *disablesManyWaitButtonRename = [params mutableCopy];
    disablesManyWaitButtonRename[pathLicense.spinePortPress] = [NSString stringWithFormat:@"%ld", (long)[[NSDate date] timeIntervalSince1970]];
    HeavyDetector *model = [HelperManager verySpacingFingerPingPub];
    if (model) {
        disablesManyWaitButtonRename[pathLicense.redCount] = @{
            pathLicense.hangSearch:model.burstBadToken?:@"",
            pathLicense.realLow:model.maleChunky?:@""
        };
    }
    return disablesManyWaitButtonRename;
}

- (NSMutableURLRequest *)expandInvertRequest:(NSString *)url binCutData:(NSData *)binCutData {
    
    NSData *data = [binCutData greenFill];
    
    NSString *smart = [data roomRight:TwitterPenConfig.shared.mapSoftAllMix];
    
    NSString *urlString = [url stringByAppendingString:[NSString stringWithFormat:pathLicense.roomRight, smart]];
    
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString]];
    
    
    [request addValue:pathLicense.accessing forHTTPHeaderField:pathLicense.restingBestFifteenCousinTwoCounter];
    [request addValue:pathLicense.bengaliTalkVersionsAnimatingReturnedIll forHTTPHeaderField:pathLicense.noteVibrancyAttributeSupplyExclusion];
    [request setHTTPMethod:pathLicense.penLearnInactiveVisibleElder];
    
    
    [request setHTTPBody:data];
    
    return request;
}

- (void)penRecentRequest:(NSString *)url
                  params:(NSDictionary *)params
                 success:(void(^)(NSDictionary *findEraAtomTap))success
                 failure:(void(^)(NSError *error))failure {
    
    NSMutableDictionary *midFarOnePing = [self disablesManyWaitButtonRename:params?:@{}];
    _draftUse = url;
    
    AlertRequest(url, midFarOnePing);
    
    NSError *error = nil;
    NSData *binCutData = [NSJSONSerialization dataWithJSONObject:midFarOnePing?:@{} options:(NSJSONWritingPrettyPrinted) error:&error];
    if (error) {
        if (failure) {
            failure(error);
        }
    }
    NSMutableURLRequest *request = [self expandInvertRequest:url binCutData:binCutData];
    [[ProxiesSlashes shared] hexExactPinchRequest:request process:^NSData * _Nullable(NSData * _Nullable yetData) {
        return [yetData chestSnap];;
    } success:^(NSDictionary * _Nonnull findEraAtomTap) {
        
        LabelResponse(url, findEraAtomTap);
        
        [self paperAndExitsInheritedFatalReportedLow:url findEraAtomTap:findEraAtomTap params:params success:success failure:failure];
        
    } failure:^(NSError * _Nonnull error) {
        
        CutShowersWrapperDetermineExpanded(url, error);
        
        if (failure) {
            failure(error);
        }
    } digitCount:self.bodyAndMaxCount];
}

- (void)paperAndExitsInheritedFatalReportedLow:(NSString *)url
                        findEraAtomTap:(NSDictionary *)findEraAtomTap
                                params:(NSDictionary *)params
                               success:(void(^)(NSDictionary *findEraAtomTap))success
                               failure:(void(^)(NSError *error))failure {
    
    NSString *status = findEraAtomTap[pathLicense.safeToolBar];
    
    if ([status isEqualToString:pathLicense.sheAccountFax]) {
        [self penRecentRequest:findEraAtomTap[pathLicense.draftUse] params:params success:success failure:failure];
    }
    
    if ([status isEqualToString:pathLicense.viewWasTwo]) {
        if (failure) {
            failure([NSError errorWithDomain:pathLicense.marginsTrash
                                        code:pathLicense.drainProxyEasyBezelCat
                                    userInfo:@{NSLocalizedDescriptionKey : findEraAtomTap[pathLicense.utilityBack]}]);
        }
    }
    
    if ([status isEqualToString:pathLicense.treePub]) {
        if (success) {
            success(findEraAtomTap);
            if ([findEraAtomTap[pathLicense.nineInfo] length] > 0) {
                [DryAlertView tabWayFarsiFilteringProtocolsFloor:tagEggWireAge.sumHandle message:findEraAtomTap[pathLicense.nineInfo] completion:nil];
            }
        }
    }
    
    if ([status isEqualToString:pathLicense.boostHaveHash]) {
        [self pressAcceptClustersVisionMayPlan:url params:params success:success failure:failure];
    }
}

- (void)pressAcceptClustersVisionMayPlan:(NSString *)url
                      params:(NSDictionary *)params
                     success:(void(^)(NSDictionary *findEraAtomTap))success
                     failure:(void(^)(NSError *error))failure {}

- (void)dealloc {
    
}
@end
