<commit_before><?php include("src/Header.php"); ?>
<html>
    <head>
        <title>Campaign</title>
        <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9, user-scalable=no">
        <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" type="text/css" rel="stylesheet">
        <link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.css" type="text/css" rel="stylesheet">
        <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet">
        <link href="css/icomoon.css" type="text/css" rel="stylesheet">
        <link href="min/?g=css" type="text/css" rel="stylesheet">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.1/knockout-min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/knockout-validation/2.0.3/knockout.validation.min.js"></script>
        <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
        <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
        <script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async></script>
        <script src="min/?g=app"></script>
        <script src="min/?g=lib"></script>
        <?php Translation::loadTranslationFiles(Server::getFullPath() . "/lang"); ?>
        <script type="text/javascript">
            (function() {var existing = ko.bindingProvider.instance;ko.bindingProvider.instance = {nodeHasBindings: existing.nodeHasBindings,getBindings: function(node, bindingContext) {var bindings;try {bindings = existing.getBindings(node, bindingContext);}catch (ex) {if (window.console && console.log) {console.log("binding error", ex.message, node, bindingContext);}}return bindings;}};})();
            $(document).ready(function() {
                CampaignType.setCampaignTypes(<?php echo json_encode(CampaignType::getAllCampaignTypes()); ?>);
                ExceptionCodes.setCodes(<?php echo json_encode(ExceptionCodes::getAllCodes()); ?>);
                Translation.setTranslations(<?php echo Translation::getJson(); ?>);
                var user = new User(),
                    navigation = new Navigation(user);
                <?php 
                if(User::isLoggedIn()) {
                    UserMapper::updateLastLoginDate(User::getCurrentUser()->getId());
                    ?>
                    user.setFromJson(<?php echo json_encode(User::getCurrentUser()); ?>);
                    user.isLoggedIn(true);
                <?php } ?>
                ko.validation.registerExtenders();
                
                <?php
                if(Settings::getOneSignalAppId() && Settings::getOneSignalRestApiKey()) {
                    ?>
                    var OneSignal = window.OneSignal || [];
                    OneSignal.push(["init", {
                        appId: '<?php echo Settings::getOneSignalAppId(); ?>',
                        autoRegister: false,
                        welcomeNotification: {
                            disable: true
                        },
                        notifyButton: {
                            enable: true,
                            colors: {
                                'circle.background': 'rgb(84,110,123)',
                                'circle.foreground': 'white',
                                'badge.background': 'rgb(84,110,123)',
                                'badge.foreground': 'white',
                                'badge.bordercolor': 'white',
                                'pulse.color': 'white',
                                'dialog.button.background.hovering': 'rgb(77, 101, 113)',
                                'dialog.button.background.active': 'rgb(70, 92, 103)',
                                'dialog.button.background': 'rgb(84,110,123)',
                                'dialog.button.foreground': 'white'
                            },
                            text: {
                                'tip.state.unsubscribed': Translation.getString('subscribeToCampaignChanges'),
                                'tip.state.subscribed': Translation.getString('youAreSubscribed'),
                                'message.prenotify': Translation.getString('clickToSubscribe'),
                                'message.action.resubscribed': Translation.getString('youAreSubscribed'),
                                'message.action.subscribed': Translation.getString('youAreSubscribed'),
                                'dialog.main.title': Translation.getString('manageSubscriptions'),
                            }
                        },
                        allowLocalhostAsSecureOrigin: true,
                        notificationClickHandlerMatch: 'origin',<commit_msg>Fixing occasional race condition with loading OneSignal.<commit_after><?php include("src/Header.php"); ?>
<html>
    <head>
        <title>Campaign</title>
        <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9, user-scalable=no">
        <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" type="text/css" rel="stylesheet">
        <link href="https://code.jquery.com/ui/1.12.1/themes/cupertino/jquery-ui.css" type="text/css" rel="stylesheet">
        <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet">
        <link href="css/icomoon.css" type="text/css" rel="stylesheet">
        <link href="min/?g=css" type="text/css" rel="stylesheet">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.1/knockout-min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/knockout-validation/2.0.3/knockout.validation.min.js"></script>
        <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
        <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js" async></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
        <script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" async></script>
        <script src="min/?g=app"></script>
        <script src="min/?g=lib"></script>
        <?php Translation::loadTranslationFiles(Server::getFullPath() . "/lang"); ?>
        <script type="text/javascript">
            (function() {var existing = ko.bindingProvider.instance;ko.bindingProvider.instance = {nodeHasBindings: existing.nodeHasBindings,getBindings: function(node, bindingContext) {var bindings;try {bindings = existing.getBindings(node, bindingContext);}catch (ex) {if (window.console && console.log) {console.log("binding error", ex.message, node, bindingContext);}}return bindings;}};})();
            $(document).ready(function() {
                CampaignType.setCampaignTypes(<?php echo json_encode(CampaignType::getAllCampaignTypes()); ?>);
                ExceptionCodes.setCodes(<?php echo json_encode(ExceptionCodes::getAllCodes()); ?>);
                Translation.setTranslations(<?php echo Translation::getJson(); ?>);
                var user = new User(),
                    navigation = new Navigation(user);
                <?php 
                if(User::isLoggedIn()) {
                    UserMapper::updateLastLoginDate(User::getCurrentUser()->getId());
                    ?>
                    user.setFromJson(<?php echo json_encode(User::getCurrentUser()); ?>);
                    user.isLoggedIn(true);
                <?php } ?>
                ko.validation.registerExtenders();
                
                <?php
                if(Settings::getOneSignalAppId() && Settings::getOneSignalRestApiKey()) {
                    ?>
                    window.OneSignal = window.OneSignal || [];
                    OneSignal.push(["init", {
                        appId: '<?php echo Settings::getOneSignalAppId(); ?>',
                        autoRegister: false,
                        welcomeNotification: {
                            disable: true
                        },
                        notifyButton: {
                            enable: true,
                            colors: {
                                'circle.background': 'rgb(84,110,123)',
                                'circle.foreground': 'white',
                                'badge.background': 'rgb(84,110,123)',
                                'badge.foreground': 'white',
                                'badge.bordercolor': 'white',
                                'pulse.color': 'white',
                                'dialog.button.background.hovering': 'rgb(77, 101, 113)',
                                'dialog.button.background.active': 'rgb(70, 92, 103)',
                                'dialog.button.background': 'rgb(84,110,123)',
                                'dialog.button.foreground': 'white'
                            },
                            text: {
                                'tip.state.unsubscribed': Translation.getString('subscribeToCampaignChanges'),
                                'tip.state.subscribed': Translation.getString('youAreSubscribed'),
                                'message.prenotify': Translation.getString('clickToSubscribe'),
                                'message.action.resubscribed': Translation.getString('youAreSubscribed'),
                                'message.action.subscribed': Translation.getString('youAreSubscribed'),
                                'dialog.main.title': Translation.getString('manageSubscriptions'),
                            }
                        },
                        allowLocalhostAsSecureOrigin: true,
                        notificationClickHandlerMatch: 'origin',
{'fraction_non_alphanumeric': 0.14725143877753522, 'fraction_numerical': 0.013296288946219488, 'mean_word_length': 1.8145769338173694, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 83, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2907676', 'n_tokens_mistral': 2808, 'n_tokens_neox': 2601, 'n_words': 333}