def constant_7(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'\n        <div class="fill green" style="width:100%;"></div>\n        <div class="fill gray" style="width:'
        constant_6 = u'\n        '
        constant_8 = u'%;"></div>\n        <div class="fill blue just-earned" style="width:100%;"></div>\n    '

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        result.append(constant_7)
        value = helpers.get('multiply')
        if value is None:
            value = resolve(context, 'multiply')
        if callable(value):
            this = Scope(context, context)
            value = value(this, resolve(context, "start"), 100)
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'multiply', resolve(context, "start"), 100)
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        return result
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'">'
            constant_6 = u'\n<a href="'
            constant_8 = u'</a>\n<span class="breadcrumb-separator">&#187;</span>\n'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "","","url")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = resolve(context, "","","title")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            return result
    def constant_6(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'/v/'
        constant_6 = u'\n<link itemprop="url" href="'
        constant_8 = u'">\n'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = resolve(context, "topic","","extended_slug")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = resolve(context, "video","","readable_id")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        return result
    def constant_14(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'</span></span></a></li>\n    '
        constant_7 = u'" data-tag="Topic Page Subtopic Library"><span class="indent"><span class=\'vid-progress v'
        constant_6 = u'\n      <li class="video-link"><a href="'
        constant_8 = u"'>"

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('url')
        if value is None:
            value = resolve(context, 'url')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'url', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = helpers.get('key_id')
        if value is None:
            value = resolve(context, 'key_id')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'key_id', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        value = helpers.get('title')
        if value is None:
            value = resolve(context, 'title')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'title', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_9)
        return result
    def constant_14(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'%</span>\n            '
        constant_7 = u'/'
        constant_6 = u'\n            <span class="objectives-complete">'
        constant_8 = u'</span>\n            &middot;\n            <span class="percent-complete">'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('objectiveProgress')
        if value is None:
            value = resolve(context, 'objectiveProgress')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'objectiveProgress', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = helpers.get('arrayLength')
        if value is None:
            value = resolve(context, 'arrayLength')
        if callable(value):
            this = Scope(context, context)
            value = value(this, resolve(context, "objectives"))
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'arrayLength', resolve(context, "objectives"))
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        value = helpers.get('progressStr')
        if value is None:
            value = resolve(context, 'progressStr')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'progressStr', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_9)
        return result
    def constant_10(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u"'>"
        constant_7 = u'/v/'
        constant_6 = u'\n    <label id="next_video">\n      <a rel=next class="next-video" href="/'
        constant_8 = u'"><b>Next Video:</b>  <span class=\'vid-progress v'
        constant_10 = u'</span> </a>\n    </label>\n    '

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = resolve(context, "topic","","extended_slug")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = resolve(context, "video","","next_video","","readable_id")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        value = resolve(context, "video","","next_video","","key_id")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_9)
        value = resolve(context, "video","","next_video","","title")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_10)
        return result
Exemple #7
0
def _filter_by(this, options, *args):
    # If there are three arguments, the first is the set of things to be
    # filtered.
    if len(args) == 3:
        iterable, attr_name, filter_val = args

    # If there are only two, `this` is assumed to be the set of things to
    # filter.
    elif len(args) == 2:
        attr_name, filter_val = args
        iterable = this

    # Any other number of args is an error.
    else:
        raise ValueError('filter takes either two or three arguments.')

    # Check the options for a function that generates a filter criteria. The
    # function should take three parameters (an element, the name of an
    # attribute, and a value to filter on) and generate a filter criteria. By
    # default, filter_condition returns a function that checks equality.
    filter_condition = options.get(
        'filter_condition',
        lambda elem, attr, val: resolve(elem, *attr.split('.')) == val)

    filtered_context = filter(
        lambda elem: filter_condition(elem, attr_name, filter_val), iterable)

    if len(filtered_context) == 0:
        return options['inverse'](this)

    return options['fn'](filtered_context)
Exemple #8
0
def _group_by_date(this, options, *args):
    # The group key should only take in to accound the first 10 characters of
    # the given attribute, as the first 10 characters in an ISO8601 formatted
    # date/time string represent the date portion.
    options['group_key_maker'] = lambda elem, attr: resolve(
        elem, *attr.split('.'))[:10]
    return _group_by(this, options, *args)
Exemple #9
0
def _group_by(this, options, *args):
    # If there's one argument, it's the grouping attribute name, and this will
    # be used as the context (iterable).
    if len(args) == 1:
        attr_name = args[0]
        iterable = this

    # If there are two arguments, the first is the context, the second if the
    # grouping argument.
    else:
        iterable, attr_name = args

    # Check the options for the function that generates an group key. The
    # function should take two parameters (an element and the name of an
    # attribute) and generate a group key.
    group_key_maker = options.get(
        'group_key_maker', lambda elem, attr: resolve(elem, *attr.split('.')))

    reverse = False
    if attr_name[0] == '-':
        reverse = True
        attr_name = attr_name[1:]

    grouped_context = defaultdict(list)
    for elem in iterable:
        group_key = group_key_maker(elem, attr_name)
        grouped_context[group_key].append(elem)

    return _each_sorted(this, options, grouped_context, reverse)
Exemple #10
0
def _sort_by(this, options, *args):
    # If there's one argument, it's the sorting attribute name, and this will
    # be used as the context (iterable).
    if len(args) == 1:
        attr_name = args[0]
        iterable = this

    # If there are two arguments, the first is the context, the second if the
    # sorting argument.
    else:
        iterable, attr_name = args

    # Check the options for the function that generates an sort key. The
    # function should take two parameters (an element and the name of an
    # attribute) and generate a sort key.
    sort_key_maker = options.get(
        'sort_key_maker', lambda elem, attr: resolve(elem, *attr.split('.')))

    reverse = False
    if attr_name[0] == '-':
        reverse = True
        attr_name = attr_name[1:]

    sorted_context = sorted(iterable,
                            key=lambda elem: sort_key_maker(elem, attr_name))
    if reverse:
        sorted_context = reversed(sorted_context)
    return options['fn'](sorted_context)
    def constant_21(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'">Log in</a> to add a coach!</h2>\n            </div>\n            <div class="no-discussion">\n                <h2><a href=\'/#browse\'>Watch a video</a> and join the discussion!</h2>\n                <p>Once you do, your questions will show up here.</p>\n            </div>\n        '
        constant_6 = u'\n            <div class="empty-graph">\n                <h2><a href=\'/#browse\'>Watch a video</a> or <a href=\'/exercisedashboard\'>try a skill</a>!</h2>\n                <p>Once you do, real data will show up here.</p>\n            </div>\n            <div class="error-graph">\n                <h2>It\'s our fault.</h2>\n                <p>Try again later, and please <a href=\'/reportissue?type=Defect\'>let us know</a> if it continues.</p>\n            </div>\n            <div class="no-coaches-for-phantoms">\n                <h2><a href="'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('toLoginRedirectHref')
        if value is None:
            value = resolve(context, 'toLoginRedirectHref')
        if callable(value):
            this = Scope(context, context)
            value = value(this, "/profile")
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'toLoginRedirectHref', "/profile")
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        return result
    def constant_10(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'" class="simple-button action-gradient green">Log in to claim your profile</a>\n          '
        constant_6 = u'\n             <a href="'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('toLoginRedirectHref')
        if value is None:
            value = resolve(context, 'toLoginRedirectHref')
        if callable(value):
            this = Scope(context, context)
            value = value(this, "/profile")
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'toLoginRedirectHref', "/profile")
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        return result
    def constant_19(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'coaches" class="tab-link has-icon no-recolor" rel="community coaches">Coaches</a></li>\n                '
        constant_6 = u'\n                <li><a href="'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('profileRoot')
        if value is None:
            value = resolve(context, 'profileRoot')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'profileRoot', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        return result
    def constant_11(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'</span>\n          </div>\n          '
        constant_6 = u'\n          <div>\n              <span class="nickname">'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('nickname')
        if value is None:
            value = resolve(context, 'nickname')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'nickname', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        return result
            def constant_8(context, helpers=None, partials=None):
                pybars = _pybars_

                # Begin constants
                constant_9 = u'\n'
                constant_6 = u'\n\n'

                def constant_7(context, helpers=None, partials=None):
                    pybars = _pybars_

                    # Begin constants
                    constant_6 = u'\n\n<span class="small-exercise-icon node-suggested" data-desc="You\'ve completed all the pre-requisites for this skill, so we think you\'re ready for it"></span>\n\n'

                    # End constants
                    result = strlist()
                    if helpers is None: helpers = {}
                    helpers.update(pybars['helpers'])
                    if partials is None: partials = {}
                    result.append(constant_6)
                    return result
                
                def constant_8(context, helpers=None, partials=None):
                    pybars = _pybars_

                    # Begin constants
                    constant_6 = u'\n\n<span class="small-exercise-icon node-not-started" data-desc="This is a skill you can practice"></span>\n\n'

                    # End constants
                    result = strlist()
                    if helpers is None: helpers = {}
                    helpers.update(pybars['helpers'])
                    if partials is None: partials = {}
                    result.append(constant_6)
                    return result
                
                # End constants
                result = strlist()
                if helpers is None: helpers = {}
                helpers.update(pybars['helpers'])
                if partials is None: partials = {}
                result.append(constant_6)
                options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
                options['helpers'] = helpers
                options['partials'] = partials
                options['inverse'] = partial(constant_8, helpers=helpers, partials=partials)
                value = helper = helpers.get('if')
                if value is None:
                    value = context.get('if')
                if helper and callable(helper):
                    this = Scope(context, context)
                    value = value(this, options, resolve(context, "suggested"))
                else:
                    helper = helpers['blockHelperMissing']
                    value = helper(context, options, value)
                if value is None: value = ''
                result.grow(value)
                result.append(constant_9)
                return result
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_9 = u'</a>\n        </label>\n      '
            constant_7 = u'/v/'
            constant_6 = u'\n        <label id="next_video">\n          <a rel=next class="next-video" href="/'
            constant_8 = u'"><b>Next Topic:</b> '

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "topic","","next_topic_subtopic_slug")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = resolve(context, "topic","","next_topic_video")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            value = resolve(context, "topic","","next_topic_title")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_9)
            return result
    def constant_10(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u'\n'
        constant_8 = u'\n'

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'" class="practice simple-button action-gradient green desktop-only" title="Extend your understanding with an exploration">Explore this concept</a>\n'
            constant_6 = u'\n<a href="'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "video","","extra_properties","","explore_url")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = lambda this: None
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "video","","extra_properties","","explore_url"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_8)
        return result
Exemple #18
0
def _if_changed(this, options, var, val=None):
    if not hasattr(this.context, '_memo'):
        this.context._memo = {}

    val = val or resolve(this, *var.split('.'))
    if var not in this.context._memo:
        this.context._memo[var] = val
        changed = True
    else:
        changed = (this.context._memo[var] == val)
        this._memo[var] = val

    if changed:
        return options['fn'](this)
    else:
        return options['inverse'](this)
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'<a href="javascript:void(0)" class="add-remove-coach simple-button action-gradient" style="'
            constant_8 = u'">Add as a coach</a>'

            def constant_7(context, helpers=None, partials=None):
                pybars = _pybars_

                # Begin constants
                constant_6 = u' display: none;'

                # End constants
                result = strlist()
                if helpers is None: helpers = {}
                helpers.update(pybars['helpers'])
                if partials is None: partials = {}
                result.append(constant_6)
                return result
            
            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
            options['helpers'] = helpers
            options['partials'] = partials
            options['inverse'] = lambda this: None
            value = helper = helpers.get('if')
            if value is None:
                value = context.get('if')
            if helper and callable(helper):
                this = Scope(context, context)
                value = value(this, options, resolve(context, "isCoachingLoggedInUser"))
            else:
                helper = helpers['blockHelperMissing']
                value = helper(context, options, value)
            if value is None: value = ''
            result.grow(value)
            result.append(constant_8)
            return result
        def constant_10(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'\n            '
            constant_8 = u'\n        '

            def constant_7(context, helpers=None, partials=None):
                pybars = _pybars_

                # Begin constants
                constant_6 = u'\n                <div class="fill blue" style="width:100%;"></div>\n            '

                # End constants
                result = strlist()
                if helpers is None: helpers = {}
                helpers.update(pybars['helpers'])
                if partials is None: partials = {}
                result.append(constant_6)
                return result
            
            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
            options['helpers'] = helpers
            options['partials'] = partials
            options['inverse'] = lambda this: None
            value = helper = helpers.get('if')
            if value is None:
                value = context.get('if')
            if helper and callable(helper):
                this = Scope(context, context)
                value = value(this, options, resolve(context, "proficient"))
            else:
                helper = helpers['blockHelperMissing']
                value = helper(context, options, value)
            if value is None: value = ''
            result.grow(value)
            result.append(constant_8)
            return result
    def constant_9(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        value = resolve(context, "profileData","","nickname")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        return result
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'\n            '
            constant_8 = u'\n            '

            def constant_7(context, helpers=None, partials=None):
                pybars = _pybars_

                # Begin constants

                # End constants
                result = strlist()
                if helpers is None: helpers = {}
                helpers.update(pybars['helpers'])
                if partials is None: partials = {}
                return result
            
            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
            options['helpers'] = helpers
            options['partials'] = partials
            options['inverse'] = lambda this: None
            value = helper = helpers.get('renderActivity')
            if value is None:
                value = context.get('renderActivity')
            if helper and callable(helper):
                this = Scope(context, context)
                value = value(this, options, resolve(context, ""))
            else:
                helper = helpers['blockHelperMissing']
                value = helper(context, options, value)
            if value is None: value = ''
            result.grow(value)
            result.append(constant_8)
            return result
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'" class="practice simple-button action-gradient green desktop-only" title="Extend your understanding with an exploration">Explore this concept</a>\n'
            constant_6 = u'\n<a href="'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "video","","extra_properties","","explore_url")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            return result
    def constant_15(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'</span></span>\n'
        constant_6 = u'\n    <span class="long-description"><span class="desktop-only">: </span><span itemprop="description">'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = resolve(context, "video","","description")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        return result
    def constant_21(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u'\n            <span class="dropdown">\n              <span class="dropdown-toggle simple-button">\n                Edit profile\n                <span class="caret"></span>\n              </span>\n              <ul class="dropdown-menu vertical-shadow-strong">\n                  '
        constant_8 = u'\n                  <li><a class="edit-display-case" href="javascript:void(0)">Edit display case</a></li>\n                  <li><a class="edit-avatar" href="javascript:void(0)">Edit avatar</a></li>\n                  '
        constant_10 = u'\n              </ul>\n            </span>\n          '

        def constant_9(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'\n                  <li><a class="edit-visibility" href="javascript:void(0)">Toggle privacy setting</a></li>\n                  '

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            return result
        
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'\n                  <li><a class="edit-basic-info" href="javascript:void(0)">Edit basic info</a></li>\n                  '

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = lambda this: None
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "isFullyEditable"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_8)
        options = {'fn': partial(constant_9, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = lambda this: None
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "isFullyEditable"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_10)
        return result
Exemple #26
0
def _if_datetime_changed(this, options, var, format):
    val = resolve(this, *var.split('.'))
    dt_formatted = _format(this, val, format)
    return _if_changed(this, options, var + '_formatted_' + format,
                       dt_formatted)
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_9 = u'" data-id="'
            constant_7 = u'">\n      <a class="subtopic-link" data-tag="Topic Page Nav Subtopic" href="/'
            constant_6 = u'\n    <li data-id="'
            constant_11 = u'\n        <div class="right-arrow"></div>\n      </a>\n    </li>\n  '
            constant_8 = u'/'
            constant_10 = u'">\n        '

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = helpers.get('id')
            if value is None:
                value = resolve(context, 'id')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'id', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = resolve(context, "__parent","__parent","topic_info","","extended_slug")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            value = helpers.get('id')
            if value is None:
                value = resolve(context, 'id')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'id', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_9)
            value = helpers.get('id')
            if value is None:
                value = resolve(context, 'id')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'id', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_10)
            value = helpers.get('title')
            if value is None:
                value = resolve(context, 'title')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'title', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_11)
            return result
def video_description(context, helpers=None, partials=None):
    pybars = _pybars_

    # Begin constants
    constant_9 = u'\n'
    constant_7 = u'\n'
    constant_16 = u'\n</h1>\n\n'
    constant_18 = u'\n\n'
    constant_13 = u'\n    <span itemprop="name" class="title desktop-only">'
    constant_11 = u'\n<h1 class="title-header">\n    '
    constant_14 = u'</span>\n'

    def constant_8(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'" class="practice simple-button action-gradient green desktop-only" title="Test your understanding with an exercise">Practice this concept</a>\n'
        constant_6 = u'\n<a href="'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = resolve(context, "video","","button_top_exercise","","url")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        return result
    
    def constant_6(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'/v/'
        constant_6 = u'\n<link itemprop="url" href="'
        constant_8 = u'">\n'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = resolve(context, "topic","","extended_slug")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = resolve(context, "video","","readable_id")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        return result
    
    def constant_12(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u"<img src='/images/throbber.gif' />"

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        return result
    
    def constant_10(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u'\n'
        constant_8 = u'\n'

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'" class="practice simple-button action-gradient green desktop-only" title="Extend your understanding with an exploration">Explore this concept</a>\n'
            constant_6 = u'\n<a href="'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "video","","extra_properties","","explore_url")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = lambda this: None
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "video","","extra_properties","","explore_url"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_8)
        return result
    
    def constant_17(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u'\n<div class="related-content visited-no-recolor">\n  <span class="related-content-title">Related exercises:</span>\n  <ul class="related-exercise-list">\n    '
        constant_8 = u'\n  </ul>\n</div>\n'

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_9 = u'</a>\n      '
            constant_7 = u'" title="'
            constant_6 = u'\n    <li>\n      <a href="'
            constant_11 = u'\n    </li>\n    '
            constant_8 = u'">'

            def constant_10(context, helpers=None, partials=None):
                pybars = _pybars_

                # Begin constants
                constant_6 = u'\n      <span class="separator">, </span>\n      '

                # End constants
                result = strlist()
                if helpers is None: helpers = {}
                helpers.update(pybars['helpers'])
                if partials is None: partials = {}
                result.append(constant_6)
                return result
            
            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = helpers.get('url')
            if value is None:
                value = resolve(context, 'url')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'url', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = helpers.get('name')
            if value is None:
                value = resolve(context, 'name')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'name', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            value = helpers.get('name')
            if value is None:
                value = resolve(context, 'name')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'name', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_9)
            options = {'fn': partial(constant_10, helpers=helpers, partials=partials)}
            options['helpers'] = helpers
            options['partials'] = partials
            options['inverse'] = lambda this: None
            value = helper = helpers.get('unless')
            if value is None:
                value = context.get('unless')
            if helper and callable(helper):
                this = Scope(context, context)
                value = value(this, options, resolve(context, "last"))
            else:
                helper = helpers['blockHelperMissing']
                value = helper(context, options, value)
            if value is None: value = ''
            result.grow(value)
            result.append(constant_11)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = lambda this: None
        value = helper = helpers.get('each')
        if value is None:
            value = context.get('each')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "video","","related_exercises"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_8)
        return result
    
    def constant_15(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_7 = u'</span></span>\n'
        constant_6 = u'\n    <span class="long-description"><span class="desktop-only">: </span><span itemprop="description">'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = resolve(context, "video","","description")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        return result
    
    # End constants
    result = strlist()
    if helpers is None: helpers = {}
    helpers.update(pybars['helpers'])
    if partials is None: partials = {}
    options = {'fn': partial(constant_6, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "topic"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_7)
    options = {'fn': partial(constant_8, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "video","","button_top_exercise"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_9)
    options = {'fn': partial(constant_10, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "video","","extra_properties"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_11)
    options = {'fn': partial(constant_12, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "loading"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_13)
    value = resolve(context, "video","","title")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_14)
    options = {'fn': partial(constant_15, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "video","","description"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_16)
    options = {'fn': partial(constant_17, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "video","","related_exercises"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_18)
    return result
Exemple #29
0
def _filter_by_any(this, options, iterable, attr_name, *filter_vals):
    options['filter_condition'] = lambda elem, attr, val: resolve(
        elem, *attr.split('.')) in val
    return _filter_by(this, options, iterable, attr_name, set(filter_vals))
        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_9 = u'</a>\n      '
            constant_7 = u'" title="'
            constant_6 = u'\n    <li>\n      <a href="'
            constant_11 = u'\n    </li>\n    '
            constant_8 = u'">'

            def constant_10(context, helpers=None, partials=None):
                pybars = _pybars_

                # Begin constants
                constant_6 = u'\n      <span class="separator">, </span>\n      '

                # End constants
                result = strlist()
                if helpers is None: helpers = {}
                helpers.update(pybars['helpers'])
                if partials is None: partials = {}
                result.append(constant_6)
                return result
            
            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = helpers.get('url')
            if value is None:
                value = resolve(context, 'url')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'url', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = helpers.get('name')
            if value is None:
                value = resolve(context, 'name')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'name', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            value = helpers.get('name')
            if value is None:
                value = resolve(context, 'name')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'name', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_9)
            options = {'fn': partial(constant_10, helpers=helpers, partials=partials)}
            options['helpers'] = helpers
            options['partials'] = partials
            options['inverse'] = lambda this: None
            value = helper = helpers.get('unless')
            if value is None:
                value = context.get('unless')
            if helper and callable(helper):
                this = Scope(context, context)
                value = value(this, options, resolve(context, "last"))
            else:
                helper = helpers['blockHelperMissing']
                value = helper(context, options, value)
            if value is None: value = ''
            result.grow(value)
            result.append(constant_11)
            return result
def content_topic_videos(context, helpers=None, partials=None):
    pybars = _pybars_

    # Begin constants
    constant_9 = u'\')"></div>\n        <div class="thumbnail_label"><div class="thumbnail_desc">'
    constant_8 = u'" class="thumbnail_link modal-video">\n        <div class="thumb" style="background-image:url(\''
    constant_7 = u'" data-tag="Topic Page Subtopic Featured" data-youtube-id="'
    constant_6 = u'<div>\n  <div data-role="header" class="main-header">\n    <div class="topic-video thumbnail_td">\n      <a href="'
    constant_13 = u'</div>\n    </div>\n  </div>\n  <div class="videos-list">\n    <div class="videos-header">Videos</div>\n    <ol class="first">\n    '
    constant_12 = u"</div>\n      <div class='topic-desc'>"
    constant_11 = u'</div></div>\n      </a>\n    </div>\n    <div class="topic-info">\n      <div class=\'topic-title\'>'
    constant_10 = u'</div><div class="thumbnail_teaser">'
    constant_17 = u'\n    </ol>\n  </div>\n</div>\n'
    constant_15 = u'\n    </ol>\n    <ol>\n    '

    def constant_16(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'</span></span></a></li>\n    '
        constant_7 = u'" data-tag="Topic Page Subtopic Library"><span class="indent"><span class=\'vid-progress v'
        constant_6 = u'\n      <li class="video-link"><a href="'
        constant_8 = u"'>"

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('url')
        if value is None:
            value = resolve(context, 'url')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'url', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = helpers.get('key_id')
        if value is None:
            value = resolve(context, 'key_id')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'key_id', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        value = helpers.get('title')
        if value is None:
            value = resolve(context, 'title')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'title', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_9)
        return result
    
    def constant_14(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'</span></span></a></li>\n    '
        constant_7 = u'" data-tag="Topic Page Subtopic Library"><span class="indent"><span class=\'vid-progress v'
        constant_6 = u'\n      <li class="video-link"><a href="'
        constant_8 = u"'>"

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('url')
        if value is None:
            value = resolve(context, 'url')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'url', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = helpers.get('key_id')
        if value is None:
            value = resolve(context, 'key_id')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'key_id', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        value = helpers.get('title')
        if value is None:
            value = resolve(context, 'title')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'title', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_9)
        return result
    
    # End constants
    result = strlist()
    if helpers is None: helpers = {}
    helpers.update(pybars['helpers'])
    if partials is None: partials = {}
    result.append(constant_6)
    value = resolve(context, "topic","","thumbnail_link","","href")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_7)
    value = resolve(context, "topic","","thumbnail_link","","youtube_id")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_8)
    value = resolve(context, "topic","","thumbnail_link","","thumb_urls","","hq")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_9)
    value = resolve(context, "topic","","thumbnail_link","","desc_html")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = unicode(value)
    result.grow(value)
    result.append(constant_10)
    value = resolve(context, "topic","","thumbnail_link","","teaser_html")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = unicode(value)
    result.grow(value)
    result.append(constant_11)
    value = resolve(context, "topic","","title")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_12)
    value = resolve(context, "topic","","description")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = unicode(value)
    result.grow(value)
    result.append(constant_13)
    options = {'fn': partial(constant_14, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('each')
    if value is None:
        value = context.get('each')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "childrenCol1"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_15)
    options = {'fn': partial(constant_16, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('each')
    if value is None:
        value = context.get('each')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "childrenCol2"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_17)
    return result
def recent_activity_list(context, helpers=None, partials=None):
    pybars = _pybars_

    # Begin constants
    constant_8 = u'\n\n'

    def constant_7(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u'\n    Recent <a href="/#browse">video</a>, <a href="/exercisedashboard">exercise</a>, and <a href="#achievements">badge</a> activity will show up here.\n'

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        return result
    
    def constant_6(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u'\n    <div class="activity-list">\n        <ul>\n            '
        constant_8 = u'\n        </ul>\n    </div>\n'

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'\n            '
            constant_8 = u'\n            '

            def constant_7(context, helpers=None, partials=None):
                pybars = _pybars_

                # Begin constants

                # End constants
                result = strlist()
                if helpers is None: helpers = {}
                helpers.update(pybars['helpers'])
                if partials is None: partials = {}
                return result
            
            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
            options['helpers'] = helpers
            options['partials'] = partials
            options['inverse'] = lambda this: None
            value = helper = helpers.get('renderActivity')
            if value is None:
                value = context.get('renderActivity')
            if helper and callable(helper):
                this = Scope(context, context)
                value = value(this, options, resolve(context, ""))
            else:
                helper = helpers['blockHelperMissing']
                value = helper(context, options, value)
            if value is None: value = ''
            result.grow(value)
            result.append(constant_8)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = lambda this: None
        value = helper = helpers.get('each')
        if value is None:
            value = context.get('each')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, ""))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_8)
        return result
    
    # End constants
    result = strlist()
    if helpers is None: helpers = {}
    helpers.update(pybars['helpers'])
    if partials is None: partials = {}
    options = {'fn': partial(constant_6, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = partial(constant_7, helpers=helpers, partials=partials)
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, ""))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_8)
    return result
def video_nav(context, helpers=None, partials=None):
    pybars = _pybars_

    # Begin constants
    constant_9 = u'</a>\n<span class="breadcrumb-separator">&#187;</span>\n<span id="video_dropdown" style="display:none;" class="selected">\n  <a href="/'
    constant_8 = u'">'
    constant_7 = u'\n<a href="'
    constant_12 = u'</a>\n  <div id="video_menu">\n    <ol>\n      '
    constant_11 = u'">'
    constant_10 = u'/v/'
    constant_14 = u'\n    </ol>\n  </div>\n</span>\n\n'

    def constant_6(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'\n'
        constant_6 = u'\n'

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'">'
            constant_6 = u'\n<a href="'
            constant_8 = u'</a>\n<span class="breadcrumb-separator">&#187;</span>\n'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "","","url")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = resolve(context, "","","title")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            return result
        
        def constant_8(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'</span>\n<span class="breadcrumb-separator">&#187;</span>\n'
            constant_6 = u'\n<span>'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "","","title")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = partial(constant_8, helpers=helpers, partials=partials)
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "","","url"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_9)
        return result
    
    def constant_13(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'"><span class=\'vid-progress v'
        constant_7 = u'\'><a href="/'
        constant_6 = u"\n      <li data-selected='"
        constant_11 = u'</span></a></li>\n      '
        constant_8 = u'/v/'
        constant_10 = u"'>"

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('selected')
        if value is None:
            value = resolve(context, 'selected')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'selected', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = resolve(context, "__parent","topic","","extended_slug")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        value = helpers.get('readable_id')
        if value is None:
            value = resolve(context, 'readable_id')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'readable_id', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_9)
        value = helpers.get('key_id')
        if value is None:
            value = resolve(context, 'key_id')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'key_id', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_10)
        value = helpers.get('title')
        if value is None:
            value = resolve(context, 'title')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'title', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_11)
        return result
    
    # End constants
    result = strlist()
    if helpers is None: helpers = {}
    helpers.update(pybars['helpers'])
    if partials is None: partials = {}
    options = {'fn': partial(constant_6, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('each')
    if value is None:
        value = context.get('each')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "topic","","ancestor_topics"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_7)
    value = resolve(context, "topic","","url")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_8)
    value = resolve(context, "topic","","title")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_9)
    value = resolve(context, "topic","","extended_slug")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_10)
    value = resolve(context, "video","","readable_id")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_11)
    value = resolve(context, "video","","title")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_12)
    options = {'fn': partial(constant_13, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('each')
    if value is None:
        value = context.get('each')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "topic","","videos"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_14)
    return result
    def constant_6(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'\n'
        constant_6 = u'\n'

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'">'
            constant_6 = u'\n<a href="'
            constant_8 = u'</a>\n<span class="breadcrumb-separator">&#187;</span>\n'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "","","url")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = resolve(context, "","","title")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            return result
        
        def constant_8(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_7 = u'</span>\n<span class="breadcrumb-separator">&#187;</span>\n'
            constant_6 = u'\n<span>'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = resolve(context, "","","title")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = partial(constant_8, helpers=helpers, partials=partials)
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "","","url"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_9)
        return result
    def constant_13(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'"><span class=\'vid-progress v'
        constant_7 = u'\'><a href="/'
        constant_6 = u"\n      <li data-selected='"
        constant_11 = u'</span></a></li>\n      '
        constant_8 = u'/v/'
        constant_10 = u"'>"

        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        value = helpers.get('selected')
        if value is None:
            value = resolve(context, 'selected')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'selected', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_7)
        value = resolve(context, "__parent","topic","","extended_slug")
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_8)
        value = helpers.get('readable_id')
        if value is None:
            value = resolve(context, 'readable_id')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'readable_id', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_9)
        value = helpers.get('key_id')
        if value is None:
            value = resolve(context, 'key_id')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'key_id', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_10)
        value = helpers.get('title')
        if value is None:
            value = resolve(context, 'title')
        if callable(value):
            this = Scope(context, context)
            value = value(this, )
        elif value is None:
            this = Scope(context, context)
            value = helpers.get('helperMissing')(this, 'title', )
        if value is None: value = ''
        if type(value) is not strlist:
            value = escape(unicode(value))
        result.grow(value)
        result.append(constant_11)
        return result
def subtopic_nav(context, helpers=None, partials=None):
    pybars = _pybars_

    # Begin constants
    constant_7 = u'" data-id="">\n      <h2 class=\'topic-heading\'>'
    constant_6 = u'<ul>\n  <li data-id="">\n    <a class="subtopic-link" data-tag="Topic Page Nav Root Topic" href="/'
    constant_8 = u'</h2>\n      <div class="right-arrow"></div>\n    </a>\n  </li>\n  '
    constant_10 = u'\n</ul>\n\n'

    def constant_9(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_6 = u'\n  <li class="subheading"><span>Topics</span></li>\n  '
        constant_8 = u'\n  '

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_9 = u'" data-id="'
            constant_7 = u'">\n      <a class="subtopic-link" data-tag="Topic Page Nav Subtopic" href="/'
            constant_6 = u'\n    <li data-id="'
            constant_11 = u'\n        <div class="right-arrow"></div>\n      </a>\n    </li>\n  '
            constant_8 = u'/'
            constant_10 = u'">\n        '

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            value = helpers.get('id')
            if value is None:
                value = resolve(context, 'id')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'id', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_7)
            value = resolve(context, "__parent","__parent","topic_info","","extended_slug")
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_8)
            value = helpers.get('id')
            if value is None:
                value = resolve(context, 'id')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'id', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_9)
            value = helpers.get('id')
            if value is None:
                value = resolve(context, 'id')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'id', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_10)
            value = helpers.get('title')
            if value is None:
                value = resolve(context, 'title')
            if callable(value):
                this = Scope(context, context)
                value = value(this, )
            elif value is None:
                this = Scope(context, context)
                value = helpers.get('helperMissing')(this, 'title', )
            if value is None: value = ''
            if type(value) is not strlist:
                value = escape(unicode(value))
            result.grow(value)
            result.append(constant_11)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = lambda this: None
        value = helper = helpers.get('each')
        if value is None:
            value = context.get('each')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "topic_info","","subtopics"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_8)
        return result
    
    # End constants
    result = strlist()
    if helpers is None: helpers = {}
    helpers.update(pybars['helpers'])
    if partials is None: partials = {}
    result.append(constant_6)
    value = resolve(context, "topic_info","","extended_slug")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_7)
    value = resolve(context, "topic_info","","topic","","standalone_title")
    if callable(value):
        this = Scope(context, context)
        value = value(this, )
    if value is None: value = ''
    if type(value) is not strlist:
        value = escape(unicode(value))
    result.grow(value)
    result.append(constant_8)
    options = {'fn': partial(constant_9, helpers=helpers, partials=partials)}
    options['helpers'] = helpers
    options['partials'] = partials
    options['inverse'] = lambda this: None
    value = helper = helpers.get('if')
    if value is None:
        value = context.get('if')
    if helper and callable(helper):
        this = Scope(context, context)
        value = value(this, options, resolve(context, "topic_info","","subtopics"))
    else:
        helper = helpers['blockHelperMissing']
        value = helper(context, options, value)
    if value is None: value = ''
    result.grow(value)
    result.append(constant_10)
    return result
    def constant_24(context, helpers=None, partials=None):
        pybars = _pybars_

        # Begin constants
        constant_9 = u'">Profile is '
        constant_6 = u'\n<a href="javascript:void(0)"\n    class="edit-visibility visibility-toggler '
        constant_12 = u'</a>\n<div id="username-picker-container" class="modal fade hide" style="display: none;">\n</div>\n'

        def constant_7(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'public'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            return result
        
        def constant_11(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'private'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            return result
        
        def constant_8(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'private'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            return result
        
        def constant_10(context, helpers=None, partials=None):
            pybars = _pybars_

            # Begin constants
            constant_6 = u'public'

            # End constants
            result = strlist()
            if helpers is None: helpers = {}
            helpers.update(pybars['helpers'])
            if partials is None: partials = {}
            result.append(constant_6)
            return result
        
        # End constants
        result = strlist()
        if helpers is None: helpers = {}
        helpers.update(pybars['helpers'])
        if partials is None: partials = {}
        result.append(constant_6)
        options = {'fn': partial(constant_7, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = partial(constant_8, helpers=helpers, partials=partials)
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "isPublic"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_9)
        options = {'fn': partial(constant_10, helpers=helpers, partials=partials)}
        options['helpers'] = helpers
        options['partials'] = partials
        options['inverse'] = partial(constant_11, helpers=helpers, partials=partials)
        value = helper = helpers.get('if')
        if value is None:
            value = context.get('if')
        if helper and callable(helper):
            this = Scope(context, context)
            value = value(this, options, resolve(context, "isPublic"))
        else:
            helper = helpers['blockHelperMissing']
            value = helper(context, options, value)
        if value is None: value = ''
        result.grow(value)
        result.append(constant_12)
        return result