






#import "AppearInfo.h"
#import "LoveFitKinConfig.h"
#import "PersistCascadeValueLoopsHyphens.h"

@import AdSupport;
@import AppTrackingTransparency;
@import UIKit;

#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
#import <SystemConfiguration/SystemConfiguration.h>

#import "sys/utsname.h" //utsname


#import <AdServices/AdServices.h>

@implementation AppearInfo

+ (UIImage *)beginningHertzResizePhraseDisablesImage {
    NSDictionary *evictEdit = [[NSBundle mainBundle] infoDictionary];
    NSString *icon = [[evictEdit valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"] lastObject];
    return [UIImage imageNamed:icon];
}

+ (NSString *)themeSpaCanWonIdentifier {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
}

+ (NSString *)baseballShutdownInsideVelocityNine {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
}

+ (NSString *)cardBitsName {
    NSString *displayName = [[NSBundle mainBundle] localizedInfoDictionary][@"CFBundleDisplayName"];

    if (!displayName) {
        displayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
    }

    if (!displayName) {
        displayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"];
    }

    return displayName;
}

+ (NSString *)homepageKeyName {
    return [UIDevice currentDevice].name;
}

+ (NSString *)directorSlashPeerSixPlug {
    return [ASIdentifierManager sharedManager].advertisingIdentifier.UUIDString;
}

+ (NSString *)winIdleFocalEightWeekly {
    return [UIDevice currentDevice].identifierForVendor.UUIDString;
}

+ (NSString *)threadedBarModel {
    struct utsname systemInfo;
    uname(&systemInfo);
    NSString *deviceModel = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
    return deviceModel;
}

+ (NSString *)leapYearsLingerPresentedParsecs {
    return [UIDevice currentDevice].systemVersion;
}

+ (NSString *)roleSignalingFarsiOldBrownPath {
    return NSHomeDirectory().lastPathComponent;
}

+ (BOOL)midCommitMathSegmentsSubset {
    CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
    NSDictionary<NSString *, CTCarrier *> *bitStone = info.serviceSubscriberCellularProviders;
    if (bitStone.count == 0) {
        return NO;
    }
    NSDictionary<NSString *, NSString *> *trialMapMood = info.serviceCurrentRadioAccessTechnology; 
    for (NSString *randomOpt in bitStone.allKeys) {
        CTCarrier *carrier = bitStone[randomOpt];
        if (!carrier) { continue; }
        NSString *tap = carrier.mobileCountryCode ?: @"";
        NSString *fit = carrier.mobileNetworkCode ?: @"";
        NSInteger dayPop = tap.integerValue;
        NSInteger chunky = fit.integerValue;
        BOOL gainSign = (tap.length > 0) && (dayPop > 0);
        BOOL golfHint = (fit.length > 0) && (chunky > 0);
        NSString *car = trialMapMood[randomOpt];
        BOOL expect = (car.length > 0);
        if (gainSign && golfHint && expect) {
            return YES;
        }
    }
    return NO;
}

+ (NSString *)artEuropeanToken {
    
    if (@available(iOS 14.3, *)) {
        NSError *error = nil;
        NSString *token = [AAAttribution attributionTokenWithError:&error];
        
        if (token) {
            
            
            return token;
        } else {
            
            return @"";
        }
    } else {
        
        return @"";
    }
}


+ (void)modifierKilometerOrdinalsUnableResolvedFiltered:(void (^)(void))softTree {
    static dispatch_once_t caseToken;
    static BOOL requireAlbum = NO;

    
    if (requireAlbum) {
        ClockInfo(peakShuffle.ownSlashedUnwindingNotCountingPartInfo);
        return;
    }	

    dispatch_once(&caseToken, ^{
        requireAlbum = YES;
        ClockInfo(peakShuffle.checkedReversesSpaSpecialWireManagers);

        if (@available(iOS 14, *)) {
            ATTrackingManagerAuthorizationStatus status = [ATTrackingManager trackingAuthorizationStatus];

            NSString *andBoxLoss = [self fetchedChangedStatus:status];

            ClockInfo(peakShuffle.petiteAdverbLateProcessedBackwardsPrior, andBoxLoss, (long)status);

            switch (status) {
                case ATTrackingManagerAuthorizationStatusAuthorized:
                    ClockInfo(peakShuffle.causeLoopsWorkThirdExtrasCheckBus);
                    requireAlbum = NO;
                    if (softTree) {
                        softTree();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusDenied:
                    ClockInfo(peakShuffle.handlingManualForAlbumLocal);
                    requireAlbum = NO;
                    if (softTree) {
                        softTree();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusRestricted:
                    ClockInfo(peakShuffle.exportApertureYetWasBoostLater);
                    requireAlbum = NO;
                    if (softTree) {
                        softTree();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusNotDetermined:
                    ClockInfo(peakShuffle.waistModernDarkenBigFiberMinor);
                    [self siteActivatedProducedAuditedIndentAfterMain:^{
                        requireAlbum = NO;
                        if (softTree) {
                            softTree();
                        }
                    }];
                    break;
            }
        } else {
            ClockInfo(peakShuffle.copyrightEarIndoorDaysAccurateDelivery);
            requireAlbum = NO;
            if (softTree) {
                softTree();
            }
        }
    });
}

+ (void)siteActivatedProducedAuditedIndentAfterMain:(void (^)(void))completion {
    ClockInfo(peakShuffle.mountPascalBelowVignetteBracketedBrush);

    
    static int busPortApple = 6;

    __block id mixAlpha = [[NSNotificationCenter defaultCenter]
        addObserverForName:UIApplicationDidBecomeActiveNotification
                    object:nil
                     queue:[NSOperationQueue mainQueue]
                usingBlock:^(NSNotification *notification) {

        ClockInfo(peakShuffle.stayAmbiguousRightSpineCompileWho, busPortApple);

        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(busPortApple * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{


            UIApplicationState currentState = [UIApplication sharedApplication].applicationState;

            NSString *peerPause = [self howCupPrintKinState:currentState];

            ClockInfo(peakShuffle.deepPrepMinPaperMastersInput, peerPause);

            if (currentState == UIApplicationStateActive) {
                ClockInfo(peakShuffle.daughtersSaturatedDidMegahertzComposeSiteDecibel);
                [self kitWonAuthorRequest:completion];
            } else {

                ClockInfo(peakShuffle.chromiumGregorianRectangleCollectorReferentAnimate, peerPause);
                ClockInfo(peakShuffle.gigabytesSexSplitIntervalsTheFiltered);
                mixAlpha = [[NSNotificationCenter defaultCenter]
                    addObserverForName:UIApplicationDidBecomeActiveNotification
                                object:nil
                                 queue:[NSOperationQueue mainQueue]
                            usingBlock:^(NSNotification *notification) {
                    
                    ClockInfo(peakShuffle.controlsContentsBusyMusicalOneDust);
                    [[NSNotificationCenter defaultCenter] removeObserver:mixAlpha];
                    ClockInfo(peakShuffle.textureEncodingResignSupplyTagalogRetRestart);
                    [self kitWonAuthorRequest:completion];
                }];
            }

        });

        ClockInfo(peakShuffle.intensityProvisionFocusesFlowMongolianVertical);
        
        [[NSNotificationCenter defaultCenter] removeObserver:mixAlpha];
    }];
}

+ (void)kitWonAuthorRequest:(void (^)(void))completion {
    if (@available(iOS 14, *)) {
        ClockInfo(peakShuffle.alwaysViabilityBuildBuildTeamMutations);

        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
            ATTrackingManagerAuthorizationStatus wasGolfStatus = [ATTrackingManager trackingAuthorizationStatus];

            NSString *forbidLibraryPastNowRefreshed = [self fetchedChangedStatus:status];
            NSString *liveTorqueAffectedArabicBankers = [self fetchedChangedStatus:wasGolfStatus];

            ClockInfo(peakShuffle.introCoalesceTodayTaggingGatewaysProblem);
            ClockInfo(peakShuffle.dublinPrintedHourRangingCupComments, forbidLibraryPastNowRefreshed, (long)status);
            ClockInfo(peakShuffle.chamberTildeAnswerUnwrapBasalCleanupTop, liveTorqueAffectedArabicBankers, (long)wasGolfStatus);

            
            
            
            
            BOOL ironModelMan = (wasGolfStatus == ATTrackingManagerAuthorizationStatusAuthorized) ||
                               (status == ATTrackingManagerAuthorizationStatusAuthorized);

            if (ironModelMan) {
                ClockInfo(peakShuffle.simulatesEngineModernSetupBinVerbosePivot);
                if (completion) {
                    completion();
                }
            } else if (wasGolfStatus == ATTrackingManagerAuthorizationStatusNotDetermined) {
                ClockInfo(peakShuffle.childrenContainOutputsKeyboardFlightsBounceFreezing);
                [self warpPortalAllowableEnteredGatewaysBevelBeginning:completion pickNetZoneBed:0];
            } else {
                ClockInfo(peakShuffle.lawAllActivateAltitudeCircularTremorDecay);
                if (completion) {
                    completion();
                }
            }
        }];
    }
}


+ (NSString *)fetchedChangedStatus:(ATTrackingManagerAuthorizationStatus)status  API_AVAILABLE(ios(14)){
    if (@available(iOS 14, *)) {
        switch (status) {
            case ATTrackingManagerAuthorizationStatusNotDetermined:
                return peakShuffle.sheDestroyCervicalOpenRequireQueueMissing;
            case ATTrackingManagerAuthorizationStatusRestricted:
                return peakShuffle.exposureUnderExhaustedDesignSubMath;
            case ATTrackingManagerAuthorizationStatusDenied:
                return peakShuffle.butSixAbnormalRunOverflowRecorded;
            case ATTrackingManagerAuthorizationStatusAuthorized:
                return peakShuffle.acceptedAccessedStringStrokeAfterTelugu;
            default:
                return [NSString stringWithFormat:peakShuffle.bundlePasswordLongSequencerExemplarVideo, (long)status];
        }
    }
    return peakShuffle.scriptGujaratiStrongestRawAmericanMainSharpen;
}

+ (NSString *)howCupPrintKinState:(UIApplicationState)state {
    switch (state) {
        case UIApplicationStateActive:
            return peakShuffle.gaelicTransferNineteenMinimumInteractCellphone;
        case UIApplicationStateInactive:
            return peakShuffle.inactiveDeclinedPresenceAlbumLossyNautical;
        case UIApplicationStateBackground:
            return peakShuffle.jumpLinearJustSentencePromiseRotating;
        default:
            return [NSString stringWithFormat:peakShuffle.impliedCornersAtomBirthRestingIll, (long)state];
    }
}


+ (void)warpPortalAllowableEnteredGatewaysBevelBeginning:(void (^)(void))softTree pickNetZoneBed:(NSInteger)pickNetZoneBed {
    NSInteger shearCount = 10;

    if (@available(iOS 14, *)) {
        ATTrackingManagerAuthorizationStatus wasGolfStatus = [ATTrackingManager trackingAuthorizationStatus];

        NSString *andBoxLoss = [self fetchedChangedStatus:wasGolfStatus];

        ClockInfo(peakShuffle.apertureThiaminLooperInferChannelsNever,
              (long)(pickNetZoneBed + 1), (long)shearCount, andBoxLoss);

        
        if (wasGolfStatus == ATTrackingManagerAuthorizationStatusNotDetermined && pickNetZoneBed < shearCount) {
            ClockInfo(peakShuffle.cropFootVerticalSpaUploadReference, (long)(pickNetZoneBed + 2));

            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)),
                          dispatch_get_main_queue(), ^{
                [self warpPortalAllowableEnteredGatewaysBevelBeginning:softTree pickNetZoneBed:pickNetZoneBed + 1];
            });
            return;
        } else {
            
            
            if (pickNetZoneBed >= shearCount) {
                ClockInfo(peakShuffle.nearbyRopeBackElevationDogGreen, (long)shearCount);
                ClockInfo(peakShuffle.promisedNameHashBrotherBaseballSwashes, andBoxLoss);
            } else {
                ClockInfo(peakShuffle.middleStayStartedLockLabelLeaky, andBoxLoss);

                if (wasGolfStatus == ATTrackingManagerAuthorizationStatusAuthorized) {
                    ClockInfo(peakShuffle.eyeEstablishSomaliTypeReasonPasswords);
                } else if (wasGolfStatus == ATTrackingManagerAuthorizationStatusDenied) {
                    ClockInfo(peakShuffle.restoredNetAllocatorHashOptPortrait);
                } else if (wasGolfStatus == ATTrackingManagerAuthorizationStatusRestricted) {
                    ClockInfo(peakShuffle.distortedMeterEraserDeepFixtureConnect);
                }
            }

            ClockInfo(peakShuffle.climbedAnimationTwoSkippedForAnchoring);
            if (softTree) {
                softTree();
            }
        }
    } else {
        ClockInfo(peakShuffle.ruleStateTooOperationLookupIdleKit);
        if (softTree) {
            softTree();
        }
    }
}
@end
