# Path: djedi/templatetags/template.py
# def lazy_tag(self, func=None, takes_context=None, name=None, node_class=None):
#     def dec(func):
#             def __init__(self, takes_context, args, kwargs):
#             def get_resolved_arguments(self, context):
#             def render(self, context):
#         class SimpleNode(Node):
# 
# Path: djedi/compat.py
# def parse_bits(parser, bits, params, varargs, varkw, defaults,
#                takes_context, name):
#     from django.template import library
#     return library.parse_bits(
#         parser=parser, bits=bits, params=params, varargs=varargs,
#         varkw=varkw, defaults=defaults, kwonly=(), kwonly_defaults=(),
#         takes_context=takes_context, name=name)


import cio
import six
import textwrap
from django import template
from django.template import TemplateSyntaxError
from .template import register
from ..compat import parse_bits
    """
    output = node.render(**context or {}) or u''
    if edit:
        return u'<span data-i18n="{0}">{1}</span>'.format(node.uri.clone(scheme=None, ext=None, version=None), output)
    else:
        return output


@register.lazy_tag
def node(key, default=None, edit=True):
    """
    Simple node tag:
    {% node 'page/title' default='Lorem ipsum' edit=True %}
    """
    node = cio.get(key, default=default or u'')
    return lambda _: render_node(node, edit=edit)


class BlockNode(template.Node):
    """
    Block node tag using body content as default:
    {% blocknode 'page/title' edit=True %}
        Lorem ipsum
    {% endblocknode %}
    """
    @classmethod
    def tag(cls, parser, token):
        # Parse tag args and kwargs
        bits = token.split_contents()[1:]
        params = ('uri', 'edit')

# Path: djedi/templatetags/template.py
# def lazy_tag(self, func=None, takes_context=None, name=None, node_class=None):
#     def dec(func):
#             def __init__(self, takes_context, args, kwargs):
#             def get_resolved_arguments(self, context):
#             def render(self, context):
#         class SimpleNode(Node):
# 
# Path: djedi/compat.py
# def parse_bits(parser, bits, params, varargs, varkw, defaults,
#                takes_context, name):
#     from django.template import library
#     return library.parse_bits(
#         parser=parser, bits=bits, params=params, varargs=varargs,
#         varkw=varkw, defaults=defaults, kwonly=(), kwonly_defaults=(),
#         takes_context=takes_context, name=name)


# Path: djedi/templatetags/djedi_tags.py
import cio
import six
import textwrap
from django import template
from django.template import TemplateSyntaxError
from .template import register
from ..compat import parse_bits

    """
    output = node.render(**context or {}) or u''
    if edit:
        return u'<span data-i18n="{0}">{1}</span>'.format(node.uri.clone(scheme=None, ext=None, version=None), output)
    else:
        return output


@register.lazy_tag
def node(key, default=None, edit=True):
    """
    Simple node tag:
    {% node 'page/title' default='Lorem ipsum' edit=True %}
    """
    node = cio.get(key, default=default or u'')
    return lambda _: render_node(node, edit=edit)


class BlockNode(template.Node):
    """
    Block node tag using body content as default:
    {% blocknode 'page/title' edit=True %}
        Lorem ipsum
    {% endblocknode %}
    """
    @classmethod
    def tag(cls, parser, token):
        # Parse tag args and kwargs
        bits = token.split_contents()[1:]
        params = ('uri', 'edit')

        args, kwargs = parse_bits(parser, bits, params, None, True, (True,), None, 'blocknode')