<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* tool/service/ltiServiceClient.html.twig */
class __TwigTemplate_1d840582076debcf67098469a6e3e4b85fdfd2c41f1d427ac34af34fe349f0bc extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->blocks = [
            'nav_title' => [$this, 'block_nav_title'],
            'body' => [$this, 'block_body'],
            'scripts' => [$this, 'block_scripts'],
        ];
    }

    protected function doGetParent(array $context)
    {
        // line 1
        return "base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "tool/service/ltiServiceClient.html.twig"));

        $this->parent = $this->loadTemplate("base.html.twig", "tool/service/ltiServiceClient.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 3
    public function block_nav_title($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "nav_title"));

        echo "<i class=\"fas fa-sign-in-alt\"></i>&nbsp;&nbsp;<span class=\"text-danger\">Tool</span> - Call LTI service";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 5
    public function block_body($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));

        // line 6
        echo "    <div class=\"accordion md-accordion\" id=\"accordionForm\" role=\"tablist\" aria-multiselectable=\"true\">
        <div class=\"card bg-light\">
            <div class=\"card-header dropdown-toggle clickable ";
        // line 8
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 8, $this->source); })()), "vars", [], "any", false, false, false, 8), "submitted", [], "any", false, false, false, 8)) ? ("collapsed") : (""));
        echo "\" role=\"tab\" id=\"headingForm\" data-toggle=\"collapse\" data-parent=\"#accordionForm\" href=\"#collapseForm\"
                 aria-expanded=\"";
        // line 9
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 9, $this->source); })()), "vars", [], "any", false, false, false, 9), "submitted", [], "any", false, false, false, 9)) ? ("false") : ("true"));
        echo "\" aria-controls=\"collapseForm\">
                <i class=\"fas fa-sign-in-alt\"></i>&nbsp;LTI service client
            </div>
            <div id=\"collapseForm\" class=\"collapse card-body  ";
        // line 12
        echo ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 12, $this->source); })()), "vars", [], "any", false, false, false, 12), "submitted", [], "any", false, false, false, 12)) ? ("") : ("show"));
        echo "\" role=\"tabpanel\" aria-labelledby=\"headingForm\" data-parent=\"#accordionForm\">
                ";
        // line 13
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 13, $this->source); })()), 'form_start');
        echo "
                ";
        // line 14
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 14, $this->source); })()), 'errors');
        echo "
                <div class=\"form-row\">
                    <div class=\"col-md-3\">
                        ";
        // line 17
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 17, $this->source); })()), "registration", [], "any", false, false, false, 17), 'row');
        echo "
                    </div>
                    <div class=\"col-md-9\">
                        ";
        // line 20
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 20, $this->source); })()), "scope", [], "any", false, false, false, 20), 'row');
        echo "
                    </div>
                </div>
                <div class=\"form-row\">
                    <div class=\"col-md-3\">
                        ";
        // line 25
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 25, $this->source); })()), "method", [], "any", false, false, false, 25), 'row');
        echo "
                    </div>
                    <div class=\"col-md-9\">
                        ";
        // line 28
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 28, $this->source); })()), "service_url", [], "any", false, false, false, 28), 'row');
        echo "
                    </div>
                </div>
                <div class=\"form-row\">
                    <div class=\"col-md-12\">
                        ";
        // line 33
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 33, $this->source); })()), "media", [], "any", false, false, false, 33), 'row');
        echo "
                    </div>
                </div>
                <div class=\"form-row\">
                    <div class=\"col-md-12\">
                        <div class=\"form-group\">
                            <div class=\"input-group\">
                                <div class=\"input-group-prepend\" role=\"group\" aria-label=\"Format request body (XML or JSON)\">
                                    <div class=\"btn-group-vertical dropright\" role=\"group\">
                                        <button id=\"bodyFormat\" type=\"button\" class=\"btn btn-secondary btn-block\" title=\"Format request body (XML or JSON)\">
                                            <i class=\"fas fa-align-left\"></i>
                                        </button>
                                    </div>
                                </div>
                                ";
        // line 47
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 47, $this->source); })()), "body", [], "any", false, false, false, 47), 'widget');
        echo "
                            </div>
                            ";
        // line 49
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 49, $this->source); })()), "body", [], "any", false, false, false, 49), 'help');
        echo "
                            ";
        // line 50
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 50, $this->source); })()), "body", [], "any", false, false, false, 50), 'errors');
        echo "
                        </div>
                    </div>
                </div>
            </div>
            <div class=\"card-footer\">
                <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                    ";
        // line 57
        echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 57, $this->source); })()), "submit", [], "any", false, false, false, 57), 'widget');
        echo "
                    <a href=\"";
        // line 58
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_service_client");
        echo "\" class=\"btn btn-secondary\"><i class=\"fas fa-undo-alt\"></i>&nbsp;Reset</a>
                    ";
        // line 59
        if ((isset($context["formSubmitted"]) || array_key_exists("formSubmitted", $context) ? $context["formSubmitted"] : (function () { throw new RuntimeError('Variable "formSubmitted" does not exist.', 59, $this->source); })())) {
            // line 60
            echo "                        <a class=\"btn btn-info text-white\" data-toggle=\"modal\" data-target=\"#formShareModal\"><i class=\"fas fa-external-link-square-alt\"></i>&nbsp;Share</a>
                    ";
        }
        // line 62
        echo "                </div>
            </div>
            ";
        // line 64
        echo         $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 64, $this->source); })()), 'form_end');
        echo "
        </div>
    </div>
    ";
        // line 67
        $this->loadTemplate("launch/modal/generatorShareModal.html.twig", "tool/service/ltiServiceClient.html.twig", 67)->display(twig_array_merge($context, ["url" => (isset($context["formShareUrl"]) || array_key_exists("formShareUrl", $context) ? $context["formShareUrl"] : (function () { throw new RuntimeError('Variable "formShareUrl" does not exist.', 67, $this->source); })()), "title" => "LTI service client share url"]));
        // line 68
        echo "    ";
        if ((isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 68, $this->source); })())) {
            // line 69
            echo "        <br/>
        <div class=\"card bg-light\">
            <div class=\"card-header\">
                <ul class=\"nav nav-tabs nav-fill card-header-tabs\" id=\"pills-tab\" role=\"tablist\">
                    <li class=\"nav-item\">
                        <a class=\"nav-link active\" id=\"pills-item-tab\" data-toggle=\"pill\" href=\"#pills-item\" role=\"tab\" aria-controls=\"pills-item\" aria-selected=\"true\">
                            <i class=\"fas fa-code\"></i>&nbsp;Response body
                        </a>
                    </li>
                    ";
            // line 78
            if ((((twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 78, $this->source); })()), "format", [], "any", false, false, false, 78) != "json") && (twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 78, $this->source); })()), "format", [], "any", false, false, false, 78) != "xml")) &&  !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 78, $this->source); })()), "body", [], "any", false, false, false, 78)))) {
                // line 79
                echo "                    <li class=\"nav-item\">
                        <a class=\"nav-link\" id=\"pills-preview-tab\" data-toggle=\"pill\" href=\"#pills-preview\" role=\"tab\" aria-controls=\"pills-preview\" aria-selected=\"false\">
                            <i class=\"fas fa-eye\"></i>&nbsp;Response preview
                        </a>
                    </li>
                    ";
            }
            // line 85
            echo "                    <li class=\"nav-item\">
                        <a class=\"nav-link\" id=\"pills-message-tab\" data-toggle=\"pill\" href=\"#pills-message\" role=\"tab\" aria-controls=\"pills-message\" aria-selected=\"false\">
                            <i class=\"fas fa-info-circle\"></i>&nbsp;Response details
                        </a>
                    </li>
                </ul>
            </div>
            <div class=\"card-body\">
                <div class=\"tab-content\" id=\"pills-tabContent\">
                    <div class=\"tab-pane fade show active\" id=\"pills-item\" role=\"tabpanel\" aria-labelledby=\"pills-item-tab\">
                        ";
            // line 95
            if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 95, $this->source); })()), "body", [], "any", false, false, false, 95))) {
                // line 96
                echo "                            <div class=\"input-group mb-3\">
                                <input type=\"text\" id=\"responseSearch\" class=\"form-control\" placeholder=\"Search\">
                                <div class=\"input-group-append\">
                                    <button id=\"responseSearchReset\" class=\"btn-secondary btn\"><i class=\"fas fa-undo-alt\"></i>&nbsp;Reset</button>
                                </div>
                            </div>
                            ";
                // line 102
                if ((twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 102, $this->source); })()), "format", [], "any", false, false, false, 102) == "json")) {
                    // line 103
                    echo "                                <pre>
                                    <code id=\"responseZone\" class=\"language-json\">";
                    // line 104
                    echo twig_escape_filter($this->env, json_encode(twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 104, $this->source); })()), "body", [], "any", false, false, false, 104), (twig_constant("JSON_PRETTY_PRINT") + twig_constant("JSON_UNESCAPED_SLASHES"))), "html", null, true);
                    echo "</code>
                                </pre>
                            ";
                } elseif ((twig_get_attribute($this->env, $this->source,                 // line 106
(isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 106, $this->source); })()), "format", [], "any", false, false, false, 106) == "xml")) {
                    // line 107
                    echo "                                <pre>
                                    <code id=\"responseZone\" class=\"language-xml\">";
                    // line 108
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 108, $this->source); })()), "body", [], "any", false, false, false, 108), "html", null, true);
                    echo "</code>
                                </pre>
                            ";
                } else {
                    // line 111
                    echo "                                <pre>
                                    <code id=\"responseZone\" class=\"language-html\">";
                    // line 112
                    echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 112, $this->source); })()), "body", [], "any", false, false, false, 112), "html", null, true);
                    echo "</code>
                                </pre>
                            ";
                }
                // line 115
                echo "                        ";
            } else {
                // line 116
                echo "                            <div class=\"alert alert-dark alert-no-margin-bottom\" role=\"alert\">
                                <i class=\"fas fa-ban\"></i>&nbsp;Empty response body
                            </div>
                        ";
            }
            // line 120
            echo "                    </div>

                    ";
            // line 122
            if ((((twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 122, $this->source); })()), "format", [], "any", false, false, false, 122) != "json") && (twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 122, $this->source); })()), "format", [], "any", false, false, false, 122) != "xml")) &&  !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 122, $this->source); })()), "body", [], "any", false, false, false, 122)))) {
                // line 123
                echo "                    <div class=\"tab-pane fade\" id=\"pills-preview\" role=\"tabpanel\" aria-labelledby=\"pills-preview-tab\">
                        <div class=\"container-fluid\">
                            ";
                // line 125
                echo $this->extensions['App\Twig\AppExtension']->scrapAppDom(twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 125, $this->source); })()), "body", [], "any", false, false, false, 125));
                echo "
                        </div>
                    </div>
                    ";
            }
            // line 129
            echo "
                    <div class=\"tab-pane fade\" id=\"pills-message\" role=\"tabpanel\" aria-labelledby=\"pills-message-tab\">
                        <div class=\"row\">
                            <div class=\"col-md-6\">
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-info-circle\"></i>&nbsp;Status
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            <dt>Call status code</dt>
                                            <dd>
                                                ";
            // line 141
            if (((twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 141, $this->source); })()), "code", [], "any", false, false, false, 141) >= 200) && (twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 141, $this->source); })()), "code", [], "any", false, false, false, 141) < 300))) {
                // line 142
                echo "                                                    <span class=\"badge badge-pill badge-success\">
                                                    ";
                // line 143
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 143, $this->source); })()), "code", [], "any", false, false, false, 143), "html", null, true);
                echo "
                                                </span>
                                                ";
            } elseif ((twig_get_attribute($this->env, $this->source,             // line 145
(isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 145, $this->source); })()), "code", [], "any", false, false, false, 145) >= 500)) {
                // line 146
                echo "                                                    <span class=\"badge badge-pill badge-danger\">
                                                    ";
                // line 147
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 147, $this->source); })()), "code", [], "any", false, false, false, 147), "html", null, true);
                echo "
                                                </span>
                                                ";
            } else {
                // line 150
                echo "                                                    <span class=\"badge badge-pill badge-warning\">
                                                    ";
                // line 151
                echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 151, $this->source); })()), "code", [], "any", false, false, false, 151), "html", null, true);
                echo "
                                                </span>
                                                ";
            }
            // line 154
            echo "                                            </dd>
                                        </dl>
                                    </div>
                                </div>
                                <br/>
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-stopwatch\"></i>&nbsp;Duration
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            <dt>Call duration</dt>
                                            <dd> ";
            // line 166
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 166, $this->source); })()), "duration", [], "any", false, false, false, 166), "html", null, true);
            echo " ms</dd>
                                        </dl>
                                    </div>
                                </div>
                                <br/>
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-microchip\"></i>&nbsp;Memory
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            <dt>Call memory usage</dt>
                                            <dd> ";
            // line 178
            echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 178, $this->source); })()), "memory", [], "any", false, false, false, 178), "html", null, true);
            echo " bytes</dd>
                                        </dl>
                                    </div>
                                </div>
                                <br/>
                            </div>
                            <div class=\"col-md-6\">
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-file-code\"></i>&nbsp;Headers
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            ";
            // line 191
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["serviceData"]) || array_key_exists("serviceData", $context) ? $context["serviceData"] : (function () { throw new RuntimeError('Variable "serviceData" does not exist.', 191, $this->source); })()), "headers", [], "any", false, false, false, 191));
            $context['_iterated'] = false;
            foreach ($context['_seq'] as $context["headerName"] => $context["headerValue"]) {
                // line 192
                echo "                                                <dt>";
                echo twig_escape_filter($this->env, $context["headerName"], "html", null, true);
                echo "</dt>
                                                <dd>";
                // line 193
                echo twig_escape_filter($this->env, twig_join_filter($context["headerValue"], " "), "html", null, true);
                echo "</dd>
                                            ";
                $context['_iterated'] = true;
            }
            if (!$context['_iterated']) {
                // line 195
                echo "                                                <dt>n/a</dt>
                                            ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['headerName'], $context['headerValue'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 197
            echo "                                        </dl>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class=\"card-footer text-muted\">
                <small>LTI service client response</small>
            </div>
        </div>
    ";
        }
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    // line 212
    public function block_scripts($context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "scripts"));

        // line 213
        echo "    <script>
        \$(\"#responseSearch\").on(\"input\", function(){
            \$(\"#responseZone\").unmark({
                done: function() {
                    \$(\"#responseZone\").mark(\$(\"#responseSearch\").val());
                }
            });
        });

        \$(\"#responseSearchReset\").click(function(){
            \$(\"#responseSearch\").val(\"\");
            \$(\"#responseZone\").unmark();
        });

        hljs.initHighlightingOnLoad();

        \$('#lti_service_client_scope').autoComplete({
            minLength: 0,
            preventEnter: true,
            resolverSettings: {
                url: '";
        // line 233
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_client_autocomplete", ["type" => "scope"]);
        echo "',
                requestThrottling: 100
            }
        });
        \$('#lti_service_client_media').autoComplete({
            minLength: 0,
            preventEnter: true,
            resolverSettings: {
                url: '";
        // line 241
        echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("tool_ajax_service_client_autocomplete", ["type" => "media"]);
        echo "',
                requestThrottling: 100
            }
        });

        function formatBodyJson() {
            try {
                if (\$(\"#lti_service_client_body\").val() != '') {
                    \$(\"#lti_service_client_body\").val(
                        JSON.stringify(JSON.parse(\$(\"#lti_service_client_body\").val()), undefined, 4)
                    );
                }
            } catch(e) {}
        }

        function formatBodyXml() {
            try {
                if (\$(\"#lti_service_client_body\").val() != '') {

                    \$(\"#lti_service_client_body\").val(
                        html_beautify(
                            \$(\"#lti_service_client_body\").val(),
                            {
                                \"indent_size\": \"4\",
                                \"indent_char\": \" \",
                                \"max_preserve_newlines\": \"5\",
                                \"preserve_newlines\": true,
                                \"keep_array_indentation\": false,
                                \"break_chained_methods\": false,
                                \"indent_scripts\": \"normal\",
                                \"brace_style\": \"collapse\",
                                \"space_before_conditional\": true,
                                \"unescape_strings\": false,
                                \"jslint_happy\": false,
                                \"end_with_newline\": false,
                                \"wrap_line_length\": \"0\",
                                \"indent_inner_html\": false,
                                \"comma_first\": false,
                                \"e4x\": false,
                                \"indent_empty_lines\": false
                            }
                        )
                    );
                }
            } catch(e) {}
        }

        \$(\"#bodyFormat\").click(function(){
            formatBodyXml();
            formatBodyJson();
        });

        \$('form[name=lti_service_client]').submit(function (evt) {
            formatBodyXml();
            formatBodyJson();
        });

        \$( document ).ready(function() {
            formatBodyXml();
            formatBodyJson();
        });

        hljs.initHighlightingOnLoad();
    </script>
";
        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

    }

    public function getTemplateName()
    {
        return "tool/service/ltiServiceClient.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  467 => 241,  456 => 233,  434 => 213,  427 => 212,  407 => 197,  400 => 195,  393 => 193,  388 => 192,  383 => 191,  367 => 178,  352 => 166,  338 => 154,  332 => 151,  329 => 150,  323 => 147,  320 => 146,  318 => 145,  313 => 143,  310 => 142,  308 => 141,  294 => 129,  287 => 125,  283 => 123,  281 => 122,  277 => 120,  271 => 116,  268 => 115,  262 => 112,  259 => 111,  253 => 108,  250 => 107,  248 => 106,  243 => 104,  240 => 103,  238 => 102,  230 => 96,  228 => 95,  216 => 85,  208 => 79,  206 => 78,  195 => 69,  192 => 68,  190 => 67,  184 => 64,  180 => 62,  176 => 60,  174 => 59,  170 => 58,  166 => 57,  156 => 50,  152 => 49,  147 => 47,  130 => 33,  122 => 28,  116 => 25,  108 => 20,  102 => 17,  96 => 14,  92 => 13,  88 => 12,  82 => 9,  78 => 8,  74 => 6,  67 => 5,  54 => 3,  37 => 1,);
    }

    public function getSourceContext()
    {
        return new Source("{% extends 'base.html.twig' %}

{% block nav_title %}<i class=\"fas fa-sign-in-alt\"></i>&nbsp;&nbsp;<span class=\"text-danger\">Tool</span> - Call LTI service{% endblock %}

{% block body %}
    <div class=\"accordion md-accordion\" id=\"accordionForm\" role=\"tablist\" aria-multiselectable=\"true\">
        <div class=\"card bg-light\">
            <div class=\"card-header dropdown-toggle clickable {{ form.vars.submitted ? 'collapsed' : '' }}\" role=\"tab\" id=\"headingForm\" data-toggle=\"collapse\" data-parent=\"#accordionForm\" href=\"#collapseForm\"
                 aria-expanded=\"{{ form.vars.submitted ? 'false' : 'true' }}\" aria-controls=\"collapseForm\">
                <i class=\"fas fa-sign-in-alt\"></i>&nbsp;LTI service client
            </div>
            <div id=\"collapseForm\" class=\"collapse card-body  {{ form.vars.submitted ? '' : 'show' }}\" role=\"tabpanel\" aria-labelledby=\"headingForm\" data-parent=\"#accordionForm\">
                {{ form_start(form) }}
                {{ form_errors(form) }}
                <div class=\"form-row\">
                    <div class=\"col-md-3\">
                        {{ form_row(form.registration) }}
                    </div>
                    <div class=\"col-md-9\">
                        {{ form_row(form.scope) }}
                    </div>
                </div>
                <div class=\"form-row\">
                    <div class=\"col-md-3\">
                        {{ form_row(form.method) }}
                    </div>
                    <div class=\"col-md-9\">
                        {{ form_row(form.service_url) }}
                    </div>
                </div>
                <div class=\"form-row\">
                    <div class=\"col-md-12\">
                        {{ form_row(form.media) }}
                    </div>
                </div>
                <div class=\"form-row\">
                    <div class=\"col-md-12\">
                        <div class=\"form-group\">
                            <div class=\"input-group\">
                                <div class=\"input-group-prepend\" role=\"group\" aria-label=\"Format request body (XML or JSON)\">
                                    <div class=\"btn-group-vertical dropright\" role=\"group\">
                                        <button id=\"bodyFormat\" type=\"button\" class=\"btn btn-secondary btn-block\" title=\"Format request body (XML or JSON)\">
                                            <i class=\"fas fa-align-left\"></i>
                                        </button>
                                    </div>
                                </div>
                                {{ form_widget(form.body) }}
                            </div>
                            {{ form_help(form.body) }}
                            {{ form_errors(form.body) }}
                        </div>
                    </div>
                </div>
            </div>
            <div class=\"card-footer\">
                <div class=\"btn-group float-right\" role=\"group\" aria-label=\"Basic example\">
                    {{ form_widget(form.submit) }}
                    <a href=\"{{ path('tool_service_client') }}\" class=\"btn btn-secondary\"><i class=\"fas fa-undo-alt\"></i>&nbsp;Reset</a>
                    {% if formSubmitted %}
                        <a class=\"btn btn-info text-white\" data-toggle=\"modal\" data-target=\"#formShareModal\"><i class=\"fas fa-external-link-square-alt\"></i>&nbsp;Share</a>
                    {% endif %}
                </div>
            </div>
            {{ form_end(form) }}
        </div>
    </div>
    {% include 'launch/modal/generatorShareModal.html.twig' with {'url': formShareUrl, 'title': 'LTI service client share url'} %}
    {% if serviceData %}
        <br/>
        <div class=\"card bg-light\">
            <div class=\"card-header\">
                <ul class=\"nav nav-tabs nav-fill card-header-tabs\" id=\"pills-tab\" role=\"tablist\">
                    <li class=\"nav-item\">
                        <a class=\"nav-link active\" id=\"pills-item-tab\" data-toggle=\"pill\" href=\"#pills-item\" role=\"tab\" aria-controls=\"pills-item\" aria-selected=\"true\">
                            <i class=\"fas fa-code\"></i>&nbsp;Response body
                        </a>
                    </li>
                    {% if serviceData.format != 'json' and serviceData.format != 'xml' and serviceData.body is not empty %}
                    <li class=\"nav-item\">
                        <a class=\"nav-link\" id=\"pills-preview-tab\" data-toggle=\"pill\" href=\"#pills-preview\" role=\"tab\" aria-controls=\"pills-preview\" aria-selected=\"false\">
                            <i class=\"fas fa-eye\"></i>&nbsp;Response preview
                        </a>
                    </li>
                    {% endif %}
                    <li class=\"nav-item\">
                        <a class=\"nav-link\" id=\"pills-message-tab\" data-toggle=\"pill\" href=\"#pills-message\" role=\"tab\" aria-controls=\"pills-message\" aria-selected=\"false\">
                            <i class=\"fas fa-info-circle\"></i>&nbsp;Response details
                        </a>
                    </li>
                </ul>
            </div>
            <div class=\"card-body\">
                <div class=\"tab-content\" id=\"pills-tabContent\">
                    <div class=\"tab-pane fade show active\" id=\"pills-item\" role=\"tabpanel\" aria-labelledby=\"pills-item-tab\">
                        {% if serviceData.body is not empty %}
                            <div class=\"input-group mb-3\">
                                <input type=\"text\" id=\"responseSearch\" class=\"form-control\" placeholder=\"Search\">
                                <div class=\"input-group-append\">
                                    <button id=\"responseSearchReset\" class=\"btn-secondary btn\"><i class=\"fas fa-undo-alt\"></i>&nbsp;Reset</button>
                                </div>
                            </div>
                            {% if serviceData.format == 'json' %}
                                <pre>
                                    <code id=\"responseZone\" class=\"language-json\">{{ serviceData.body|json_encode(constant('JSON_PRETTY_PRINT') + constant('JSON_UNESCAPED_SLASHES')) }}</code>
                                </pre>
                            {% elseif serviceData.format == 'xml' %}
                                <pre>
                                    <code id=\"responseZone\" class=\"language-xml\">{{ serviceData.body }}</code>
                                </pre>
                            {% else %}
                                <pre>
                                    <code id=\"responseZone\" class=\"language-html\">{{ serviceData.body }}</code>
                                </pre>
                            {% endif %}
                        {% else %}
                            <div class=\"alert alert-dark alert-no-margin-bottom\" role=\"alert\">
                                <i class=\"fas fa-ban\"></i>&nbsp;Empty response body
                            </div>
                        {% endif %}
                    </div>

                    {% if serviceData.format != 'json' and serviceData.format != 'xml' and serviceData.body is not empty %}
                    <div class=\"tab-pane fade\" id=\"pills-preview\" role=\"tabpanel\" aria-labelledby=\"pills-preview-tab\">
                        <div class=\"container-fluid\">
                            {{ serviceData.body|scrap_app_dom|raw }}
                        </div>
                    </div>
                    {% endif %}

                    <div class=\"tab-pane fade\" id=\"pills-message\" role=\"tabpanel\" aria-labelledby=\"pills-message-tab\">
                        <div class=\"row\">
                            <div class=\"col-md-6\">
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-info-circle\"></i>&nbsp;Status
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            <dt>Call status code</dt>
                                            <dd>
                                                {% if serviceData.code >= 200 and serviceData.code < 300 %}
                                                    <span class=\"badge badge-pill badge-success\">
                                                    {{ serviceData.code}}
                                                </span>
                                                {% elseif serviceData.code >= 500 %}
                                                    <span class=\"badge badge-pill badge-danger\">
                                                    {{ serviceData.code}}
                                                </span>
                                                {% else %}
                                                    <span class=\"badge badge-pill badge-warning\">
                                                    {{ serviceData.code}}
                                                </span>
                                                {% endif %}
                                            </dd>
                                        </dl>
                                    </div>
                                </div>
                                <br/>
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-stopwatch\"></i>&nbsp;Duration
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            <dt>Call duration</dt>
                                            <dd> {{ serviceData.duration }} ms</dd>
                                        </dl>
                                    </div>
                                </div>
                                <br/>
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-microchip\"></i>&nbsp;Memory
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            <dt>Call memory usage</dt>
                                            <dd> {{ serviceData.memory }} bytes</dd>
                                        </dl>
                                    </div>
                                </div>
                                <br/>
                            </div>
                            <div class=\"col-md-6\">
                                <div class=\"card bg-light\">
                                    <div class=\"card-header\">
                                        <i class=\"fas fa-file-code\"></i>&nbsp;Headers
                                    </div>
                                    <div class=\"card-body\">
                                        <dl class=\"list-unstyled\">
                                            {% for headerName, headerValue in serviceData.headers %}
                                                <dt>{{ headerName }}</dt>
                                                <dd>{{ headerValue|join(\" \") }}</dd>
                                            {% else %}
                                                <dt>n/a</dt>
                                            {% endfor %}
                                        </dl>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class=\"card-footer text-muted\">
                <small>LTI service client response</small>
            </div>
        </div>
    {% endif %}
{% endblock body %}

{% block scripts %}
    <script>
        \$(\"#responseSearch\").on(\"input\", function(){
            \$(\"#responseZone\").unmark({
                done: function() {
                    \$(\"#responseZone\").mark(\$(\"#responseSearch\").val());
                }
            });
        });

        \$(\"#responseSearchReset\").click(function(){
            \$(\"#responseSearch\").val(\"\");
            \$(\"#responseZone\").unmark();
        });

        hljs.initHighlightingOnLoad();

        \$('#lti_service_client_scope').autoComplete({
            minLength: 0,
            preventEnter: true,
            resolverSettings: {
                url: '{{ path('tool_ajax_service_client_autocomplete', {'type': 'scope'}) }}',
                requestThrottling: 100
            }
        });
        \$('#lti_service_client_media').autoComplete({
            minLength: 0,
            preventEnter: true,
            resolverSettings: {
                url: '{{ path('tool_ajax_service_client_autocomplete', {'type': 'media'}) }}',
                requestThrottling: 100
            }
        });

        function formatBodyJson() {
            try {
                if (\$(\"#lti_service_client_body\").val() != '') {
                    \$(\"#lti_service_client_body\").val(
                        JSON.stringify(JSON.parse(\$(\"#lti_service_client_body\").val()), undefined, 4)
                    );
                }
            } catch(e) {}
        }

        function formatBodyXml() {
            try {
                if (\$(\"#lti_service_client_body\").val() != '') {

                    \$(\"#lti_service_client_body\").val(
                        html_beautify(
                            \$(\"#lti_service_client_body\").val(),
                            {
                                \"indent_size\": \"4\",
                                \"indent_char\": \" \",
                                \"max_preserve_newlines\": \"5\",
                                \"preserve_newlines\": true,
                                \"keep_array_indentation\": false,
                                \"break_chained_methods\": false,
                                \"indent_scripts\": \"normal\",
                                \"brace_style\": \"collapse\",
                                \"space_before_conditional\": true,
                                \"unescape_strings\": false,
                                \"jslint_happy\": false,
                                \"end_with_newline\": false,
                                \"wrap_line_length\": \"0\",
                                \"indent_inner_html\": false,
                                \"comma_first\": false,
                                \"e4x\": false,
                                \"indent_empty_lines\": false
                            }
                        )
                    );
                }
            } catch(e) {}
        }

        \$(\"#bodyFormat\").click(function(){
            formatBodyXml();
            formatBodyJson();
        });

        \$('form[name=lti_service_client]').submit(function (evt) {
            formatBodyXml();
            formatBodyJson();
        });

        \$( document ).ready(function() {
            formatBodyXml();
            formatBodyJson();
        });

        hljs.initHighlightingOnLoad();
    </script>
{% endblock %}
", "tool/service/ltiServiceClient.html.twig", "C:\\wamp64\\www\\devkit-lti1p3-master-tool\\templates\\tool\\service\\ltiServiceClient.html.twig");
    }
}
