






#import "FilenamesViewController.h"
#import "BetweenDownhillPreparedBridgeProminentHandler.h"

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

@end

@implementation FilenamesViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    

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

    
    self.view.layer.cornerRadius = 0;

    self.reportsHasButton.hidden = YES;
    self.peopleRedButton.hidden = YES;
    [self veryYetSobDayView];
}

- (void)veryYetSobDayView
{
    WKUserContentController *axialPassBrown = [[WKUserContentController alloc] init];
    WKUserScript *retWebpage = [[WKUserScript alloc] initWithSource:CupDenyLeap.rarePutOther.aliveFetchedCloseBulgarianEra injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
    [axialPassBrown addUserScript:retWebpage];
    
    WKWebViewConfiguration * config = [[WKWebViewConfiguration alloc] init];
    WKPreferences *forbidKeep = [[WKPreferences alloc]init];
    forbidKeep.javaScriptCanOpenWindowsAutomatically = YES;
    forbidKeep.minimumFontSize = 40.0;
    forbidKeep.javaScriptEnabled = YES;
    config.preferences = forbidKeep;
    config.selectionGranularity = WKSelectionGranularityDynamic;
    config.preferences.minimumFontSize = 18;
    config.preferences.javaScriptEnabled = YES;
    config.userContentController = axialPassBrown;
    
    self.withTagItem = [[WKWebView alloc] initWithFrame:CGRectZero];
    self.withTagItem.backgroundColor = UIColor.clearColor;
    self.withTagItem.scrollView.backgroundColor = UIColor.clearColor;
    self.withTagItem.navigationDelegate = self;
    self.withTagItem.opaque = YES;
    self.withTagItem.scrollView.bounces = NO;
    self.withTagItem.scrollView.showsVerticalScrollIndicator = NO;
    self.withTagItem.scrollView.showsHorizontalScrollIndicator = NO;
    self.withTagItem.UIDelegate = self;
    [self.view addSubview:self.withTagItem];
    self.withTagItem.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    
    
    BetweenDownhillPreparedBridgeProminentHandler *hashFont = [[BetweenDownhillPreparedBridgeProminentHandler alloc] initWithDelegate:self];
    BetweenDownhillPreparedBridgeProminentHandler *funRoman = [[BetweenDownhillPreparedBridgeProminentHandler alloc] initWithDelegate:self];
    
    [self.withTagItem.configuration.userContentController addScriptMessageHandler:hashFont name:CupDenyLeap.rarePutOther.logicalNothingAddInteriorGrow];
    [self.withTagItem.configuration.userContentController addScriptMessageHandler:funRoman name:CupDenyLeap.rarePutOther.finnishCanAwakeLappishMindPhoneticTheme];
}

- (void)setWithinAlien:(NSString *)withinAlien {
    _withinAlien = withinAlien;
    NSURL *url = [NSURL URLWithString:withinAlien];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:15.0];
    [request addValue:[CupDenyLeap thermalEpsilonSeekPotassiumHerToken] forHTTPHeaderField:CupDenyLeap.rarePutOther.seedRevealMergeInitiatedVelocity];
    [self.withTagItem loadRequest:request];
}

- (void)genderCropForkStoreChlorideRedoneArgument:(NSURL *)URL {
    if ([self.mixCatVisible respondsToSelector:@selector(drumTenView:theOutdoorAction:far:)]) {
        [self.mixCatVisible drumTenView:self.withTagItem theOutdoorAction:URL.host far: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:CupDenyLeap.rarePutOther.axesChat]) {
        [self genderCropForkStoreChlorideRedoneArgument: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:CupDenyLeap.rarePutOther.proximityAddIndexedSimulatesJapaneseCoalesced completionHandler:nil];
    
    [webView evaluateJavaScript:CupDenyLeap.rarePutOther.focalFloorTintAcrossFunFunctions completionHandler:nil];
    [webView evaluateJavaScript:CupDenyLeap.rarePutOther.zipAssignPostalReturnMinor completionHandler:nil];
    
    [RedScriptsView homeRareRunBinOldView:self.view];
    while (self.withTagItem.isLoading) {
        return;
    }
}


- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
    
    
    if ([self.mixCatVisible respondsToSelector:@selector(drumTenView:theOutdoorAction:far:)]) {
        [self.mixCatVisible drumTenView:self.withTagItem theOutdoorAction:message.name far:message.body];
    }
}

-(void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler{
    
    [DogAlertView issuerIdenticalClangPeriodicPartiallySegue:@"" message:message completion:^(NSInteger oddMapIndex) {
        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(CupDenyLeap.rarePutOther.fitTopSupply);
}


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

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

@end
