






#import "AmountMenViewController.h"
#import "IndoorSphereLostCancelledEvaluatedHandler.h"

@interface AmountMenViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler>

@end

@implementation AmountMenViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

    
    if (self.orderEqualityButterflyNodeMouseImageView) {
        [self.orderEqualityButterflyNodeMouseImageView removeFromSuperview];
        self.orderEqualityButterflyNodeMouseImageView = nil;
    }

    
    self.view.layer.cornerRadius = 0;

    self.feetHowAndButton.hidden = YES;
    self.notIndianButton.hidden = YES;
    [self ageYetLookFarView];
}

- (void)ageYetLookFarView
{
    WKUserContentController *modalArmTagSee = [[WKUserContentController alloc] init];
    WKUserScript *menBeatSum = [[WKUserScript alloc] initWithSource:ZipCoulombs.locatorCanon.setupNowGrowThreadsPressure injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
    [modalArmTagSee addUserScript:menBeatSum];
    
    WKWebViewConfiguration * config = [[WKWebViewConfiguration alloc] init];
    WKPreferences *capEyeWarp = [[WKPreferences alloc]init];
    capEyeWarp.javaScriptCanOpenWindowsAutomatically = YES;
    capEyeWarp.minimumFontSize = 40.0;
    capEyeWarp.javaScriptEnabled = YES;
    config.preferences = capEyeWarp;
    config.selectionGranularity = WKSelectionGranularityDynamic;
    config.preferences.minimumFontSize = 18;
    config.preferences.javaScriptEnabled = YES;
    config.userContentController = modalArmTagSee;
    
    self.tenYearSkip = [[WKWebView alloc] initWithFrame:CGRectZero];
    self.tenYearSkip.backgroundColor = UIColor.clearColor;
    self.tenYearSkip.scrollView.backgroundColor = UIColor.clearColor;
    self.tenYearSkip.navigationDelegate = self;
    self.tenYearSkip.opaque = YES;
    self.tenYearSkip.scrollView.bounces = NO;
    self.tenYearSkip.scrollView.showsVerticalScrollIndicator = NO;
    self.tenYearSkip.scrollView.showsHorizontalScrollIndicator = NO;
    self.tenYearSkip.UIDelegate = self;
    [self.view addSubview:self.tenYearSkip];
    self.tenYearSkip.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    
    
    IndoorSphereLostCancelledEvaluatedHandler *romanian = [[IndoorSphereLostCancelledEvaluatedHandler alloc] initWithDelegate:self];
    IndoorSphereLostCancelledEvaluatedHandler *alignGet = [[IndoorSphereLostCancelledEvaluatedHandler alloc] initWithDelegate:self];
    
    [self.tenYearSkip.configuration.userContentController addScriptMessageHandler:romanian name:ZipCoulombs.locatorCanon.transmitEndsResourceAmbiguityProvided];
    [self.tenYearSkip.configuration.userContentController addScriptMessageHandler:alignGet name:ZipCoulombs.locatorCanon.preventLocatorExchangesCreditCatCarBadge];
}

- (void)setLogFeetWith:(NSString *)logFeetWith {
    _logFeetWith = logFeetWith;
    NSURL *url = [NSURL URLWithString:logFeetWith];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:15.0];
    [request addValue:[ZipCoulombs downloadsRowNearestInfiniteInstantToken] forHTTPHeaderField:ZipCoulombs.locatorCanon.deciliterLatitudeLoveReclaimBit];
    [self.tenYearSkip loadRequest:request];
}

- (void)postalScoreStackTeacherMildClientsLeave:(NSURL *)URL {
    if ([self.foldHerLowEgg respondsToSelector:@selector(integerView:takeBoxFitAction:job:)]) {
        [self.foldHerLowEgg integerView:self.tenYearSkip takeBoxFitAction:URL.host job:URL];
    }
}



- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler {
    decisionHandler(WKNavigationResponsePolicyAllow);
}


- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
    NSURL *URL = navigationAction.request.URL;
    
    if ([URL.scheme hasPrefix:ZipCoulombs.locatorCanon.usedTask]) {
        [self postalScoreStackTeacherMildClientsLeave:URL];
        decisionHandler(WKNavigationActionPolicyCancel);
        return;
    }
    decisionHandler(WKNavigationActionPolicyAllow);
}


-(void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{

}


- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation{
    

}


-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
    
    [webView evaluateJavaScript:ZipCoulombs.locatorCanon.bounceArtsMetricsLowDogDue completionHandler:nil];
    
    [webView evaluateJavaScript:ZipCoulombs.locatorCanon.chargingStartingEldestUnboundedPresenceTotal completionHandler:nil];
    [webView evaluateJavaScript:ZipCoulombs.locatorCanon.compoundCoachedSpokenBlendMethod completionHandler:nil];
    
    [OddPlayingView supportFilterRowSpokenDecreaseView:self.view];
    while (self.tenYearSkip.isLoading) {
        return;
    }
}


- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
    
    
    if ([self.foldHerLowEgg respondsToSelector:@selector(integerView:takeBoxFitAction:job:)]) {
        [self.foldHerLowEgg integerView:self.tenYearSkip takeBoxFitAction:message.name job:message.body];
    }
}

-(void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler{
    
    [BadAlertView resultingClaimRareAtomPashtoReview:@"" message:message completion:^(NSInteger winTabIndex) {
        completionHandler();
    }];
}



- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures{
    WKFrameInfo *frameInfo = navigationAction.targetFrame;
    if (![frameInfo isMainFrame]) {
        [webView loadRequest:navigationAction.request];
    }
    return nil;
}


- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * __nullable result))completionHandler{
    completionHandler(ZipCoulombs.locatorCanon.inlandKitTip);
}


- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler{
    completionHandler(YES);
}

- (void)dealloc {
    self.tenYearSkip.UIDelegate = nil;
    self.view = nil;
    [self.tenYearSkip.configuration.userContentController removeAllUserScripts];
}

@end
