<commit_before><search:platform var="finance" conf="platforms.fusion.finance.portfolios"></search:platform>

<search:platform var="company-news" conf="platforms.fusion.finance.company-news"></search:platform>

<search:platform var="latest-news" conf="platforms.fusion.latest-news"></search:platform>

<search:platform var="topSearches" conf="platforms.fusion.logs.top-user-searches"></search:platform>

<!--<search:platform var="companies" conf="platforms.fusion.finance.historical-home"></search:platform>-->

<search:query var="query" parameters="*"></search:query>

<!--<search:query var="getCompanies" parameters="-fa">-->
    <!--<query:filter field="_lw_data_source_s" value="sp500"></query:filter>-->
<!--</search:query>-->

<!--<search:response var="companyDetails" platform="companies" query="getCompanies"></search:response>-->

<search:query var="backendQuery" results-per-page="5" fields="id,score,title_t,entity_company_hv_ss,og_description_s,Content_Location,entity_country_hv_ss,industry_tags_hv_ss">
    <query:filter field="_lw_data_source_pipeline_s" value="yahoo-news"></query:filter>
</search:query>

<search:response var="news" platform="latest-news" query="backendQuery">
    <widget:spinner></widget:spinner>
</search:response>

<search:response var="press" platform="company-news" query="backendQuery"></search:response>

<lifecycle:required object="user.name">
    <!-- Top (most frequent) searches by this user -->
    <search:query var="topSearchesQuery" parameters="-" results-per-page="5">
        <query:filter field="user_token" value="{{user.name}}"></query:filter>
    </search:query>
    <search:response var="topSearchesResponse" platform="topSearches" query="topSearchesQuery"></search:response>
    <search:query var="ownerQuery" sorts="-weight_d" results-per-page="100" fields="id,owner_s,ticker_s,company_name_s,sector_s,industry_s,bucket_id_s,unique_bucket_id_s,weight_s,weight_d,bucket_name_s">
        <query:filter field="_lw_data_source_s" value="user_buckets"></query:filter>
        <query:filter field="owner_s" value="{{user.name}}"></query:filter>
        <query:custom name="group.limit" value="10"></query:custom>
    </search:query>
    <search:response var="mycompanies" query="ownerQuery" platform="finance">
        <widget:spinner></widget:spinner>
    </search:response>

</lifecycle:required>

<lifecycle:required object="mycompanies.results">
    <search:query var="companiesQuery" parameters="-" rpp="0">
        <query:custom name="fq" value="{{queryFields(mycompanies,'ticker_s','title_t')}} OR {{queryFields(mycompanies,'company_name_s','title_t')}}"></query:custom>
    </search:query>
    <search:response var="catalysts" platform="latest-news" query="companiesQuery"></search:response>
</lifecycle:required>

<layout:include file="views/partials/header-home.tpl.html"></layout:include>

<!-- Big Search Banner -->
<layout:grid class="banner">
    <layout:block>
        <layout:box>
            <!--<h1 class="banner-text">{{user.name}}'s Catalyst Portal</h1>-->
<!--             <h1 class="banner-text">Discover the news affecting your portfolios</h1>
 -->            <img src="assets/360logowhite.png" width="260px">
            <div class="banner-search">
                <layout:box>
                    <search:box placeholder="Search for symbols or companies..."
                                action="companies">
                        <layout:grid style="text-align:left;">
                            <layout:block>
                                <query:suggestions completion-service="services.suggestions.allSuggester"
                                                   action="companies"></query:suggestions>
                            </layout:block>
                        </layout:grid>
                    </search:box>
                    <p class="popular-searches" padding-top="05">
                        <span>You most frequently search for:&nbsp;&nbsp;</span>
                        <a ng-repeat="q in topSearchesResponse.facets['query'].filters" href="#/search?q={{q | actual}}">{{q | actual}}<span ng-if="!$last">, </span></a>
                    </p>
                </layout:box>
            </div>
            </div>
        </layout:box>
    </layout:block>

</layout:grid>

<!-- CONTENT -->
<layout:grid styling="row-offcanvas centercontent">
    <layout:animate animation="animate-fadeInUp" on="news" layout-grid>

        <!-- Container -->
        <layout:grid>

            <!-- BREADCRUMBS -->
            <layout:grid>
                <layout:block>
                    <layout:box padding-bottom="0">
                        <search:breadcrumbs query="query" exclude="_lw_data_source_pipeline_s"></search:breadcrumbs>
                    </layout:box>
                </layout:block>
            </layout:grid>

            <!-- ANSWER CARD -->
            <div ng-repeat="message in response.messages "
                 ng-if="message.type == 'co_answer_card_content'"
                 ng-bind-html="message.value"
                 class="answer-card"
            >
            </div>

            <!-- NEWS -->
            <layout:block md="2-3">
                    <div styling="width-1 stretch-content">

                        <!-- 0 -->
                        <layout:grid>
                            <layout:block>
                                <div class="page-header">
                                    <h2>Latest Stories</h2>
                                </div>
                                <track:clicks query=query type="click">
                                    <search:result-list response="news">
                                        <search:result>
                                            <layout:grid ng-if="result | field:'og_image_s'">
                                                <layout:block md="1-4">
                                                    <layout:box padding-top="0" padding-bottom="0" padding-left="0">
                                                        <media:image field-name="og_image_s" height="100"
                                                                     fallback-image-url="assets/noimage.svg"></media:image>
                                                    </layout:box>
                                                </layout:block>
                                                <layout:block md="3-4">
                                                    <div class="small-title">
                                                        <search:field name="entity_company_hv_ss" styling="capsules"
                                                                  query="query" label="Companies"></search:field>
                                                    </div>
                                                    <search:field name="title_t" styling="title"
                                                                  urlfield="id"></search:field>
                                                    <search:field name="og_description_s"
                                                                  styling="description"></search:field>

                                                    <search:field name="entity_country_hv_ss" styling="capsules"
                                                                  query="query" label="Countries"></search:field>
                                                    <search:field name="entity_person_hv_ss" styling="capsules"
                                                                  query="query" label="People"></search:field>
                                                    <search:field name="industry_tags_hv_ss" styling="capsules"
                                                                  query="query" label="Industry"></search:field>
                                                </layout:block>
                                            </layout:grid>
                                            <layout:grid ng-if="!(result | field:'og_image_s')">
                                                <layout:block>
                                                    <div class="small-title">
                                                        <search:field name="entity_company_hv_ss" styling="capsules"
                                                                      query="query" label="Companies"></search:field>
                                                    </div>
                                                    <search:field name="title_t" styling="title"
                                                                  urlfield="id"></search:field>
                                                    <search:field name="og_description_s"
                                                                  styling="description"></search:field>

                                                    <search:field name="entity_country_hv_ss" styling="capsules"
                                                                  query="query" label="Countries"></search:field>
                                                    <search:field name="entity_person_hv_ss" styling="capsules"
                                                                  query="query" label="People"></search:field>
                                                    <search:field name="industry_tags_hv_ss" styling="capsules"
                                                                  query="query" label="Industry"></search:field>

                                                </layout:block>
                                            </layout:grid>
                                        </search:result>
                                    </search:result-list>
                                    <!--<search:result-list response="news"></search:result-list>-->
                                </track:clicks>
                            </layout:block>
                            <layout:block>
                                <a styling="panel panel-block-link" href="#/news">
                                    <h2><span class="flaticon-search"></span> Find More Stories </h2>
                                </a>
                            </layout:block>
                        </layout:grid>
                    </div>
            </layout:block>

            <!-- PORTFOLIOS -->
            <layout:block md="1-3">

                    <div class="home-sidebar" styling="width-1" styling="stretch-content">

                        <layout:grid>
                            <layout:block>
                                <h2>Your Portfolios</h2>
                                <search:result-list response="mycompanies" styling="cards-xl-1" class="side-results">
                                    <search:result>
                                        <h3>{{result.fields.bucket_name_s.val[0]}}</h3>
                                        <search:field name="ticker_s" label="Holdings" value-element="h4" styling="label-left" class="inline-h4 portfolio-holdings"></search:field>
                                        <hr class="simple">
                                        <div ng-repeat="sector in result.fields.sectors.val | limitTo:1 track by $index" class="field tk-rgrid-g tk-stl-label-above">
                                            <p class="tk-stl-label">Sector concentration: {{sector}}</p>
                                            <layout:grid>
                                                <layout:block xs="1-2">
                                                    <progress:bar percentage="(result | field:sector | actual | numberFormat:'#.##')*100"></progress:bar>
                                                </layout:block>
                                                <layout:block xs="1-2">
                                                    <search:field name="{{sector}}" show="1" label="" styling="label-inline pull-right" number-format="#%"></search:field>
                                                </layout:block>
                                            </layout:grid>
                                        </div>
                                        <layout:block styling="center-content">
                                            <a href="#/portfolios/{{result | field:'unique_bucket_id_s' | actual}}">
                                                <h5> View Portfolio </h5>
                                            </a>
                                        </layout:block>
<commit_msg>add portfolio rate of return, AUM, and total clients<commit_after><search:platform var="finance" conf="platforms.fusion.finance.portfolios"></search:platform>

<search:platform var="company-news" conf="platforms.fusion.finance.company-news"></search:platform>

<search:platform var="latest-news" conf="platforms.fusion.latest-news"></search:platform>

<search:platform var="topSearches" conf="platforms.fusion.logs.top-user-searches"></search:platform>

<!--<search:platform var="companies" conf="platforms.fusion.finance.historical-home"></search:platform>-->

<search:query var="query" parameters="*"></search:query>

<!--<search:query var="getCompanies" parameters="-fa">-->
    <!--<query:filter field="_lw_data_source_s" value="sp500"></query:filter>-->
<!--</search:query>-->

<!--<search:response var="companyDetails" platform="companies" query="getCompanies"></search:response>-->

<search:query var="backendQuery" results-per-page="5" fields="id,score,title_t,entity_company_hv_ss,og_description_s,Content_Location,entity_country_hv_ss,industry_tags_hv_ss">
    <query:filter field="_lw_data_source_pipeline_s" value="yahoo-news"></query:filter>
</search:query>

<search:response var="news" platform="latest-news" query="backendQuery">
    <widget:spinner></widget:spinner>
</search:response>

<search:response var="press" platform="company-news" query="backendQuery"></search:response>

<lifecycle:required object="user.name">
    <!-- Top (most frequent) searches by this user -->
    <search:query var="topSearchesQuery" parameters="-" results-per-page="5">
        <query:filter field="user_token" value="{{user.name}}"></query:filter>
    </search:query>
    <search:response var="topSearchesResponse" platform="topSearches" query="topSearchesQuery"></search:response>
    <search:query var="ownerQuery" sorts="-weight_d" results-per-page="100" fields="id,owner_s,ticker_s,company_name_s,sector_s,industry_s,bucket_id_s,unique_bucket_id_s,weight_s,weight_d,bucket_name_s,bucket_ytd_ror_f,bucket_value_f,bucket_value_total_f,bucket_total_clients_i">
        <query:filter field="_lw_data_source_s" value="user_buckets"></query:filter>
        <query:filter field="owner_s" value="{{user.name}}"></query:filter>
        <query:custom name="group.limit" value="10"></query:custom>
    </search:query>
    <search:response var="mycompanies" query="ownerQuery" platform="finance">
        <widget:spinner></widget:spinner>
    </search:response>

</lifecycle:required>

<lifecycle:required object="mycompanies.results">
    <search:query var="companiesQuery" parameters="-" rpp="0">
        <query:custom name="fq" value="{{queryFields(mycompanies,'ticker_s','title_t')}} OR {{queryFields(mycompanies,'company_name_s','title_t')}}"></query:custom>
    </search:query>
    <search:response var="catalysts" platform="latest-news" query="companiesQuery"></search:response>
</lifecycle:required>

<layout:include file="views/partials/header-home.tpl.html"></layout:include>

<!-- Big Search Banner -->
<layout:grid class="banner">
    <layout:block>
        <layout:box>
            <!--<h1 class="banner-text">{{user.name}}'s Catalyst Portal</h1>-->
<!--             <h1 class="banner-text">Discover the news affecting your portfolios</h1>
 -->            <img src="assets/360logowhite.png" width="260px">
            <div class="banner-search">
                <layout:box>
                    <search:box placeholder="Search for symbols or companies..."
                                action="companies">
                        <layout:grid style="text-align:left;">
                            <layout:block>
                                <query:suggestions completion-service="services.suggestions.allSuggester"
                                                   action="companies"></query:suggestions>
                            </layout:block>
                        </layout:grid>
                    </search:box>
                    <p class="popular-searches" padding-top="05">
                        <span>You most frequently search for:&nbsp;&nbsp;</span>
                        <a ng-repeat="q in topSearchesResponse.facets['query'].filters" href="#/search?q={{q | actual}}">{{q | actual}}<span ng-if="!$last">, </span></a>
                    </p>
                </layout:box>
            </div>
            </div>
        </layout:box>
    </layout:block>

</layout:grid>

<!-- CONTENT -->
<layout:grid styling="row-offcanvas centercontent">
    <layout:animate animation="animate-fadeInUp" on="news" layout-grid>

        <!-- Container -->
        <layout:grid>

            <!-- BREADCRUMBS -->
            <layout:grid>
                <layout:block>
                    <layout:box padding-bottom="0">
                        <search:breadcrumbs query="query" exclude="_lw_data_source_pipeline_s"></search:breadcrumbs>
                    </layout:box>
                </layout:block>
            </layout:grid>

            <!-- ANSWER CARD -->
            <div ng-repeat="message in response.messages "
                 ng-if="message.type == 'co_answer_card_content'"
                 ng-bind-html="message.value"
                 class="answer-card"
            >
            </div>

            <!-- NEWS -->
            <layout:block md="2-3">
                    <div styling="width-1 stretch-content">

                        <!-- 0 -->
                        <layout:grid>
                            <layout:block>
                                <div class="page-header">
                                    <h2>Latest Stories</h2>
                                </div>
                                <track:clicks query=query type="click">
                                    <search:result-list response="news">
                                        <search:result>
                                            <layout:grid ng-if="result | field:'og_image_s'">
                                                <layout:block md="1-4">
                                                    <layout:box padding-top="0" padding-bottom="0" padding-left="0">
                                                        <media:image field-name="og_image_s" height="100"
                                                                     fallback-image-url="assets/noimage.svg"></media:image>
                                                    </layout:box>
                                                </layout:block>
                                                <layout:block md="3-4">
                                                    <div class="small-title">
                                                        <search:field name="entity_company_hv_ss" styling="capsules"
                                                                  query="query" label="Companies"></search:field>
                                                    </div>
                                                    <search:field name="title_t" styling="title"
                                                                  urlfield="id"></search:field>
                                                    <search:field name="og_description_s"
                                                                  styling="description"></search:field>

                                                    <search:field name="entity_country_hv_ss" styling="capsules"
                                                                  query="query" label="Countries"></search:field>
                                                    <search:field name="entity_person_hv_ss" styling="capsules"
                                                                  query="query" label="People"></search:field>
                                                    <search:field name="industry_tags_hv_ss" styling="capsules"
                                                                  query="query" label="Industry"></search:field>
                                                </layout:block>
                                            </layout:grid>
                                            <layout:grid ng-if="!(result | field:'og_image_s')">
                                                <layout:block>
                                                    <div class="small-title">
                                                        <search:field name="entity_company_hv_ss" styling="capsules"
                                                                      query="query" label="Companies"></search:field>
                                                    </div>
                                                    <search:field name="title_t" styling="title"
                                                                  urlfield="id"></search:field>
                                                    <search:field name="og_description_s"
                                                                  styling="description"></search:field>

                                                    <search:field name="entity_country_hv_ss" styling="capsules"
                                                                  query="query" label="Countries"></search:field>
                                                    <search:field name="entity_person_hv_ss" styling="capsules"
                                                                  query="query" label="People"></search:field>
                                                    <search:field name="industry_tags_hv_ss" styling="capsules"
                                                                  query="query" label="Industry"></search:field>

                                                </layout:block>
                                            </layout:grid>
                                        </search:result>
                                    </search:result-list>
                                    <!--<search:result-list response="news"></search:result-list>-->
                                </track:clicks>
                            </layout:block>
                            <layout:block>
                                <a styling="panel panel-block-link" href="#/news">
                                    <h2><span class="flaticon-search"></span> Find More Stories </h2>
                                </a>
                            </layout:block>
                        </layout:grid>
                    </div>
            </layout:block>

            <!-- PORTFOLIOS -->
            <layout:block md="1-3">

                    <div class="home-sidebar" styling="width-1" styling="stretch-content">

                        <layout:grid>
                            <layout:block>
                                <h2>Your Portfolios</h2>
                                <search:result-list response="mycompanies" styling="cards-xl-1" class="side-results">
                                    <search:result>
                                        <h3>{{result.fields.bucket_name_s.val[0]}}</h3>
                                        <search:field name="ticker_s" label="Holdings" value-element="h4" styling="label-left" class="inline-h4 portfolio-holdings"></search:field>
                                        <search:field name="bucket_ytd_ror_f" show="1" label="YTD return" styling="label-left" number-format="##.0# %"></search:field>
                                        <search:field name="bucket_value_total_f" show="1" label="Total AUM" styling="label-left" number-format="$###,###,###"></search:field>
                                        <search:field name="bucket_total_clients_i" show="1" label="Total Clients" styling="label-left"></search:field>
                                        <hr class="simple">
                                        <div ng-repeat="sector in result.fields.sectors.val | limitTo:1 track by $index" class="field tk-rgrid-g tk-stl-label-above">
                                            <p class="tk-stl-label">Sector concentration: {{sector}}</p>
                                            <layout:grid>
                                                <layout:block xs="1-2">
                                                    <progress:bar percentage="(result | field:sector | actual | numberFormat:'#.##')*100"></progress:bar>
                                                </layout:block>
                                                <layout:block xs="1-2">
                                                    <search:field name="{{sector}}" show="1" label="" styling="label-inline pull-right" number-format="#%"></search:field>
                                                </layout:block>
                                            </layout:grid>
                                        </div>
                                        <layout:block styling="center-content">
                                            <a href="#/portfolios/{{result | field:'unique_bucket_id_s' | actual}}">
                                                <h5> View Portfolio </h5>
                                            </a>
                                        </layout:block>

{'fraction_non_alphanumeric': 0.12764721824306013, 'fraction_numerical': 0.005110534670331798, 'mean_word_length': 1.2416037490236917, 'pattern_counts': {'":': 0, '<': 455, '<?xml version=': 0, '>': 455, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 263, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1539311', 'n_tokens_mistral': 5894, 'n_tokens_neox': 5624, 'n_words': 841}