'Root and entry point for client-side web app.
:type       tool_id: str or None
:param      tool_id: load center panel with given tool if not None
:type   workflow_id: encoded id or None
:param  workflow_id: load center panel with given workflow if not None
:type    history_id: encoded id or None
:param   history_id: switch current history to given history if not None
:type           m_c: str or None
:param          m_c: controller name (e.g. \'user\')
:type           m_a: str or None
:param          m_a: controller method/action (e.g. \'dbkeys\')
If m_c and m_a are present, the center panel will be loaded using the
controller and action as a url: (e.g. \'user/dbkeys\').'

@web.expose
def index(self, trans, tool_id=None, workflow_id=None, history_id=None, m_c=None, m_a=None, **kwd):

    if (trans.app.config.require_login and self.user_manager.is_anonymous(trans.user)):
        login_url = web.url_for(controller='root', action='login')
        trans.response.send_redirect(login_url)
    history = trans.history
    if history_id:
        unencoded_id = trans.security.decode_id(history_id)
        history = self.history_manager.get_owned(unencoded_id, trans.user)
        trans.set_history(history)
    js_options = self._get_js_options(trans)
    config = js_options['config']
    config.update(self._get_extended_config(trans))
    return self.template(trans, 'analysis', options=js_options)
