<commit_before>﻿@using Umbraco.Core
@using ClientDependency.Core
@using ClientDependency.Core.Mvc
@using Umbraco.Core.Composing
@using Umbraco.Core.IO
@using Umbraco.Web
@using Umbraco.Core.Configuration

@inherits WebViewPage<Umbraco.Web.Editors.BackOfficeModel>

@{
    var isDebug = false;
    if (Request.RawUrl.IndexOf('?') >= 0)
    {
        var parsed = HttpUtility.ParseQueryString(Request.RawUrl.Split('?')[1]);
        var attempt = parsed["umbDebug"].TryConvertTo<bool>();
        if (attempt && attempt.Result)
        {
            isDebug = true;
        }
    }

    Html
        .RequiresCss("assets/css/umbraco.css", "Umbraco")
        .RequiresCss("lib/bootstrap-social/bootstrap-social.css", "Umbraco")
        .RequiresCss("lib/font-awesome/css/font-awesome.min.css", "Umbraco");
}

<!DOCTYPE html>

<html lang="en">
<head>
    <base href="@Model.GlobalSettings.Path.EnsureEndsWith('/')" />
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="robots" content="noindex, nofollow">
    <meta name="pinterest" content="nopin" />

    <title ng-bind="$root.locationTitle">Umbraco</title>

    @Html.RenderCssHere(
        new BasicPath("Umbraco", IOHelper.ResolveUrl(SystemDirectories.Umbraco)))
</head>
<body ng-class="{'touch':touchDevice, 'emptySection':emptySection, 'umb-drawer-is-visible':drawer.show, 'umb-tour-is-visible': tour.show, 'tabbing-active':tabbingActive}" ng-controller="Umbraco.MainController" id="umbracoMainPageBody">

    <noscript>
        <div style="margin: 10px;">
            <h3><img src="assets/img/application/logo.png" alt="Umbraco logo" style="vertical-align: text-bottom;" /> Umbraco</h3>
            <p>For full functionality of Umbraco CMS it is necessary to enable JavaScript.</p>
            <p>Here are the <a href="https://www.enable-javascript.com/" target="_blank" style="text-decoration: underline;">instructions how to enable JavaScript in your web browser</a>.</p>
        </div>
    </noscript>

    <div ng-hide="!authenticated" ng-cloak>

        <div style="display: none;" id="mainwrapper" class="clearfix">

            <umb-app-header></umb-app-header>

            <div class="umb-app-content">

                <umb-navigation></umb-navigation>

                <section id="contentwrapper">

                    <div id="contentcolumn">
                        <div class="umb-editor" ng-view></div>
                    </div>

                </section>

            </div>
            
            <umb-notifications></umb-notifications>

        </div>
        
        <umb-tour
            ng-if="tour.show"
            model="tour">
        </umb-tour>
        
        <!-- help dialog controller by the help button - this also forces the backoffice UI to shift 400px  -->
        <umb-drawer data-element="drawer" ng-if="drawer.show" model="drawer.model" view="drawer.view"></umb-drawer>

        <umb-search ng-if="search.show" on-close="closeSearch()"></umb-search>

    </div>

    <umb-backdrop ng-if="backdrop.show || infiniteMode"
                  backdrop-opacity="backdrop.opacity"
                  highlight-element="backdrop.element"
                  highlight-prevent-click="backdrop.elementPreventClick"
                  disable-events-on-click="backdrop.disableEventsOnClick">
    </umb-backdrop>

    <umb-overlay ng-if="overlay.show"
                 model="overlay"
                 position="{{overlay.position}}"
                 size="overlay.size"
                 view="overlay.view"
                 name="overlay.name"
                 parent-scope="overlay.parentScope">
    </umb-overlay>

    <umb-editors ng-show="infiniteMode"></umb-editors>

    <umb-login
        ng-if="login.show"
        on-login="hideLoginScreen()">
    </umb-login>

    @Html.BareMinimumServerVariablesScript(Url, Url.Action("ExternalLogin", "BackOffice", new { area = ViewData.GetUmbracoPath() }), Model.Features, Current.Configs.Global())

    <script>

        document.angularReady = function(app) {
            @Html.AngularValueExternalLoginInfoScript(ViewData.GetExternalSignInError())
            @Html.AngularValueResetPasswordCodeInfoScript(ViewData["PasswordResetCode"])
            @Html.AngularValueTinyMceAssets()

            //required for the noscript trick
            document.getElementById("mainwrapper").style.display = "inherit";
        }
    </script>

    <script src="lib/lazyload-js/lazyload.min.js"></script>
    <script src="@Url.GetUrlWithCacheBust("Application", "BackOffice")"></script>

    @if (isDebug)
    {
        @Html.RenderProfiler()
    }

</body>
</html><commit_msg>inject icons to iconHelper to avoid making requests to the icon controller<commit_after>﻿@using Umbraco.Core
@using ClientDependency.Core
@using ClientDependency.Core.Mvc
@using Umbraco.Core.Composing
@using Umbraco.Core.IO
@using Umbraco.Web
@using Umbraco.Core.Configuration

@inherits WebViewPage<Umbraco.Web.Editors.BackOfficeModel>

@{
    var isDebug = false;
    if (Request.RawUrl.IndexOf('?') >= 0)
    {
        var parsed = HttpUtility.ParseQueryString(Request.RawUrl.Split('?')[1]);
        var attempt = parsed["umbDebug"].TryConvertTo<bool>();
        if (attempt && attempt.Result)
        {
            isDebug = true;
        }
    }

    Html
        .RequiresCss("assets/css/umbraco.css", "Umbraco")
        .RequiresCss("lib/bootstrap-social/bootstrap-social.css", "Umbraco")
        .RequiresCss("lib/font-awesome/css/font-awesome.min.css", "Umbraco");
}

<!DOCTYPE html>

<html lang="en">
<head>
    <base href="@Model.GlobalSettings.Path.EnsureEndsWith('/')" />
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="robots" content="noindex, nofollow">
    <meta name="pinterest" content="nopin" />

    <title ng-bind="$root.locationTitle">Umbraco</title>

    @Html.RenderCssHere(
        new BasicPath("Umbraco", IOHelper.ResolveUrl(SystemDirectories.Umbraco)))
</head>
<body ng-class="{'touch':touchDevice, 'emptySection':emptySection, 'umb-drawer-is-visible':drawer.show, 'umb-tour-is-visible': tour.show, 'tabbing-active':tabbingActive}" ng-controller="Umbraco.MainController" id="umbracoMainPageBody">

    <noscript>
        <div style="margin: 10px;">
            <h3><img src="assets/img/application/logo.png" alt="Umbraco logo" style="vertical-align: text-bottom;" /> Umbraco</h3>
            <p>For full functionality of Umbraco CMS it is necessary to enable JavaScript.</p>
            <p>Here are the <a href="https://www.enable-javascript.com/" target="_blank" style="text-decoration: underline;">instructions how to enable JavaScript in your web browser</a>.</p>
        </div>
    </noscript>

    <div ng-hide="!authenticated" ng-cloak>

        <div style="display: none;" id="mainwrapper" class="clearfix">

            <umb-app-header></umb-app-header>

            <div class="umb-app-content">

                <umb-navigation></umb-navigation>

                <section id="contentwrapper">

                    <div id="contentcolumn">
                        <div class="umb-editor" ng-view></div>
                    </div>

                </section>

            </div>

            <umb-notifications></umb-notifications>

        </div>

        <umb-tour
            ng-if="tour.show"
            model="tour">
        </umb-tour>

        <!-- help dialog controller by the help button - this also forces the backoffice UI to shift 400px  -->
        <umb-drawer data-element="drawer" ng-if="drawer.show" model="drawer.model" view="drawer.view"></umb-drawer>

        <umb-search ng-if="search.show" on-close="closeSearch()"></umb-search>

    </div>

    <umb-backdrop ng-if="backdrop.show || infiniteMode"
                  backdrop-opacity="backdrop.opacity"
                  highlight-element="backdrop.element"
                  highlight-prevent-click="backdrop.elementPreventClick"
                  disable-events-on-click="backdrop.disableEventsOnClick">
    </umb-backdrop>

    <umb-overlay ng-if="overlay.show"
                 model="overlay"
                 position="{{overlay.position}}"
                 size="overlay.size"
                 view="overlay.view"
                 name="overlay.name"
                 parent-scope="overlay.parentScope">
    </umb-overlay>

    <umb-editors ng-show="infiniteMode"></umb-editors>

    <umb-login
        ng-if="login.show"
        on-login="hideLoginScreen()">
    </umb-login>

    @Html.BareMinimumServerVariablesScript(Url, Url.Action("ExternalLogin", "BackOffice", new { area = ViewData.GetUmbracoPath() }), Model.Features, Current.Configs.Global())

    <script>

        document.angularReady = function(app) {
            @Html.AngularValueExternalLoginInfoScript(ViewData.GetExternalSignInError())
            @Html.AngularValueResetPasswordCodeInfoScript(ViewData["PasswordResetCode"])
            @Html.AngularValueTinyMceAssets()

            app.run(["iconHelper", function (iconHelper) {

                @* We inject icons to the icon helper(service), since icons can only be loaded if user is authorized. By injecting these to the service they will not be requested as they will become cached. *@

                iconHelper.defineIcon("icon-check", '<svg viewBox="0 0 512 512"><path d="M461.884 68.14c-132.601 81.297-228.817 183.87-272.048 235.345l-105.874-82.95-46.751 37.691 182.941 186.049c31.485-80.646 131.198-238.264 252.956-350.252L461.884 68.14z"></path></svg>');
                iconHelper.defineIcon("icon-delete", '<svg viewBox="0 0 512 512"><path d="M401.431 167.814l-58.757-58.76-88.029 88.026-88.028-88.026-58.76 58.76 88.026 88.027-88.026 88.024 58.76 58.768 88.028-88.031 88.029 88.031 58.757-58.768-88.027-88.024z"></path></svg>');

            }]);

            //required for the noscript trick
            document.getElementById("mainwrapper").style.display = "inherit";

        }
    </script>

    <script src="lib/lazyload-js/lazyload.min.js"></script>
    <script src="@Url.GetUrlWithCacheBust("Application", "BackOffice")"></script>

    @if (isDebug)
    {
        @Html.RenderProfiler()
    }

</body>
</html>
{'fraction_non_alphanumeric': 0.15262351589429338, 'fraction_numerical': 0.026618153963998466, 'mean_word_length': 2.675228712174525, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 0, '>': 153, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5036895', 'n_tokens_mistral': 3500, 'n_tokens_neox': 3169, 'n_words': 544}