<!DOCTYPE html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="../static/css/bootstrap.min.css">
    <link rel="stylesheet" href="../static/css/style.css">
    <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
    <link rel="stylesheet" href="../static/bower_components/jqcloud2/dist/jqcloud.min.css">

    <link rel="stylesheet" href="../static/bower_components/choices.js/assets/styles/css/choices.min.css">
    <link rel="stylesheet" href="../static/bower_components/bootstrap-multiselect/dist/css/bootstrap-multiselect.css"
          type="text/css"/>
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
          integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>


    <title>Search ...</title>
</head>
<body>
<div class="container-fluid">

    <div class="row head-area">
        <div class="col-sm-2">
            <div class="row logo-section">
                <a href="/"><img src="/static/img/logo.png" class="logo"></a>
            </div>
        </div>
        <div class="col-sm-10">
            <div class="input-group mb-3 search-section">
                <input type="text" class="form-control" placeholder=""
                       value="{{ keyword }}"
                       aria-describedby="basic-addon2" id="search-input">
                <div class="input-group-append">
                    <button class="btn btn-success btn-search" type="button">Search</button>
                </div>
            </div>

        </div>
    </div>
    <div class="row search-content">
        <div class="col-sm-4 col-md-2 col-lg-2 config-area">
            <input type="hidden" value="{{ category_filter }}" id="search-filter">
            <div class="row agg-ele">
                <div class="col-auto my-1 cluster_selection_area">
                    <label class="mr-sm-2 config-label" for="clusterSize"><a data-toggle="tooltip" data-placement="top" title="Group the documents to a specific number of clusters">Clusters</a></label>
                    <select class="custom-select mr-sm-2" id="clusterSize">
                        <option selected>Choose the number of clusters...</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9" selected>9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                        <option value="13">13</option>
                        <option value="14">14</option>
                        <option value="15">15</option>
                    </select>
                </div>
            </div>
            <div class="row agg-ele">
                <div class="col-auto my-1 cluster_selection_area">
                    <label class="mr-sm-2 config-label" for="keywordDiff"><a data-toggle="tooltip" data-placement="top" title="Show keywords that appears in only one cluster">Mode</a>
                     <a id="clean_ukey" class="clearBtn" href="#">clear</a></label>
                    <select class="custom-select mr-sm-2" id="keywordDiff">
                        <option value="1">Show all keywords</option>
                        <option value="2">Show only unique keywords</option>
                    </select>
                </div>
            </div>
            <div class="row agg-ele">
                <div class="col-auto my-1 cluster_selection_area">
                    <label class="mr-sm-2 config-label" for="publication_period"><a data-toggle="tooltip" data-placement="top" title="Date of publication of a the document">Publication period</a></label>
                    <input type="text" class="custom-select mr-sm-2" id="publication_period"/>
                </div>
            </div>

            <div class="row agg-ele">
                <div class="col-auto my-1 cluster_selection_area">
                    <label class="mr-sm-2 config-label" for="grp_agg_content"><a data-toggle="tooltip" data-placement="top" title="The group name of document's publisher">Group name</a>

                      <a id="clean_grp" class="clearBtn" href="#">clear</a>
                    </label>
                    <select class="custom-select mr-sm-2" id="grp_agg_content">

                    </select>
                </div>
            </div>

            <div class="row agg-ele">
                <div class="col-auto my-1 cluster_selection_area">
                    <label class="mr-sm-2 config-label" for="grp_agg_content"><a data-toggle="tooltip" data-placement="top" title="The discipline of document">Discipline</a>
                     <a id="clean_disc" class="clearBtn" href="#">clear</a>
                    </label>
                    <select class="custom-select mr-sm-2" id="disp_agg_content">

                    </select>
                </div>
            </div>

            <div class="row agg-ele">
                <div class="col-auto my-1 cluster_selection_area">
                    <label class="mr-sm-2 config-label" for="author_agg_content"><a data-toggle="tooltip" data-placement="top" title="The author name of document's publisher">Author</a>
                        <a id="clean_authr" class="clearBtn" href="#">clear</a>
                    </label>
                    <select class="custom-select mr-sm-2" id="author_agg_content">

                    </select>
                </div>
            </div>

        </div>
        <div class="col-sm-6 col-md-8">
            <div class="loading" id="loader">
                <img alt="self-Logo" src="../static/img/loading.svg" width="50px">
            </div>
            <div id="result_area" style="display: none"></div>
            <div class="loader">
                <div id="clusters_content"></div>
            </div>

        </div>
        <div class="col-sm-2 col-md-2">
            <label class="mr-sm-2 top_p_title" for="topProducts">Top Documents</label>
            <div id="top_products_section" class="top_products" style="    height: 100%;">

            </div>
        </div>
    </div>
</div>

<form type="GET" id="search-controller">
    <input type="hidden" name="delta_cloud" id="delta_cloud" value="{{ delta_cloud }}">
    <input type="hidden" id="freq_keys"/>
    <input type="hidden" value="{{ keyword }}" name="query" id="query_values"
           data-depth={{ depth }} data-filter={{ cluster }} />
    <input type="hidden" value="{{ depth }}" name="depth"/>
    <input type="hidden" value="{{ cluster }}" name="cluster"/>
</form>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
        integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
        crossorigin="anonymous"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script src="../static/bower_components/jqcloud2/dist/jqcloud.min.js"></script>
<script src="../static/bower_components/choices.js/assets/scripts/dist/choices.min.js"></script>
<script type="text/javascript"
        src="../static/bower_components/bootstrap-multiselect/dist/js/bootstrap-multiselect.js"></script>
<script src="../static/js/plugins/plotly/plotly-latest.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
<script src="../static/js/appv3.js"></script>
<script>
    jQuery(document).ready(function () {
        app.run();
    });
</script>
</body>
</html>