From 5915bef158a10c4097cd422325d42af2af5881bf Mon Sep 17 00:00:00 2001
From: Vinnie Falco <vinnie.falco@gmail.com>
Date: Sat, 10 Jun 2023 20:27:09 -0700
Subject: [PATCH 1/8] chore: executor group

---
 include/mrdox/Support/Thread.hpp | 232 ++++++++++++++++++++++++++++---
 source/Support/Thread.cpp        |  32 +++--
 2 files changed, 231 insertions(+), 33 deletions(-)

diff --git a/include/mrdox/Support/Thread.hpp b/include/mrdox/Support/Thread.hpp
index 4a5eebe60..9db3dd96c 100644
--- a/include/mrdox/Support/Thread.hpp
+++ b/include/mrdox/Support/Thread.hpp
@@ -14,10 +14,15 @@
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/Support/Error.hpp>
-#include <functional>
+#include <atomic>
+#include <condition_variable>
+#include <deque>
 #include <iterator>
+#include <memory>
 #include <mutex>
 #include <thread>
+#include <tuple>
+#include <type_traits>
 #include <utility>
 #include <vector>
 
@@ -33,6 +38,74 @@ class TaskGroup;
 
 //------------------------------------------------
 
+class unlock_guard
+{
+    std::mutex& m_;
+
+public:
+    explicit
+    unlock_guard(std::mutex& m)
+        : m_(m)
+    {
+        m_.unlock();
+    }
+
+    ~unlock_guard()
+    {
+        m_.lock();
+    }
+};
+
+//------------------------------------------------
+
+template<class>
+class any_callable;
+
+template<class R, class... Args>
+class any_callable<R(Args...)>
+{
+    struct base
+    {
+        virtual ~base() = default;
+        virtual R invoke(Args&&...args) = 0;
+    };
+
+    std::unique_ptr<base> p_;
+
+public:
+    any_callable() = delete;
+
+    template<class Callable>
+    requires std::is_invocable_r_v<R, Callable, Args...>
+    any_callable(Callable&& f)
+    {
+        class impl : public base
+        {
+            Callable f_;
+
+        public:
+            explicit impl(Callable&& f)
+                : f_(std::forward<Callable>(f))
+            {
+            }
+
+            R invoke(Args&&... args) override
+            {
+                return f_(std::forward<Args>(args)...);
+            }
+        };
+
+        p_ = std::make_unique<impl>(std::forward<Callable>(f));
+    }
+
+    R operator()(Args&&...args) const
+    {
+        return p_->invoke(std::forward<Args>(args)...);
+    }
+};
+
+//------------------------------------------------
+
 /** A pool of threads for executing work concurrently.
 */
 class MRDOX_VISIBLE
@@ -43,6 +116,11 @@ class MRDOX_VISIBLE
     friend class TaskGroup;
 
 public:
+    template<class Agent> struct arg_ty { using type = Agent; };
+    template<class Agent> struct arg_ty<Agent&> { using type =
+        std::conditional_t< std::is_const_v<Agent>, Agent, Agent&>; };
+    template<class Agent> using arg_t = typename arg_ty<Agent>::type;
+
     /** Destructor.
     */
     MRDOX_DECL
@@ -82,8 +160,12 @@ class MRDOX_VISIBLE
         The signature of the submitted function
         object should be `void(void)`.
     */
+    template<class F>
     void
-    async(std::function<void(void)> f);
+    async(F&& f)
+    {
+        post(std::forward<F>(f));
+    }
 
     /** Invoke a function object for each element of a range.
     */
@@ -95,6 +177,9 @@ class MRDOX_VISIBLE
     MRDOX_DECL
     void
     wait();
+
+private:
+    MRDOX_DECL void post(any_callable<void(void)>);
 };
 
 //------------------------------------------------
@@ -120,14 +205,21 @@ class MRDOX_VISIBLE
         The signature of the submitted function
         object should be `void(void)`.
     */
+    template<class F>
     void
-    async(std::function<void(void)> f);
+    async(F&& f)
+    {
+        post(std::forward<F>(f));
+    }
 
     /** Block until all work has completed.
     */
     MRDOX_DECL
     void
     wait();
+
+private:
+    MRDOX_DECL void post(any_callable<void(void)>);
 };
 
 //------------------------------------------------
@@ -153,48 +245,142 @@ forEach(
 
 //------------------------------------------------
 
-#if 0
 /** A set of execution agents for performing concurrent work.
 */
-template<class... Args>
-class ExecutionGroup
+template<class Agent>
+class ExecutorGroup
 {
-    std::vector<Agent*> agents_;
-    std::vector<std::function<void(Agent&)>> work_;
-    ThreadPool threadPool_;
-    TaskGroup taskGroup_;
+    struct Impl
+    {
+        std::mutex mutex_;
+        std::condition_variable cv_;
+    };
+
+    ThreadPool& threadPool_;
+    std::unique_ptr<Impl> impl_;
+    std::vector<std::unique_ptr<Agent>> agents_;
+    std::deque<any_callable<void(Agent&)>> work_;
+    std::size_t busy_ = 0;
 
 public:
-    template<class Agents>
+    template<class T>
+    using arg_t = ThreadPool::arg_t<T>;
+
+    ExecutorGroup(ExecutorGroup const&) = delete;
+    ExecutorGroup& operator=(ExecutorGroup&&) = delete;
+    ExecutorGroup& operator=(ExecutorGroup const&) = delete;
+    ExecutorGroup(ExecutorGroup&&) = default;
+
     explicit
-    Executors(
-        Agents&& agents,
-        ThreadPool &threadPool)
+    ExecutorGroup(
+        ThreadPool& threadPool) noexcept
         : threadPool_(threadPool)
+        , impl_(std::make_unique<Impl>())
+    {
+    }
+
+    /** Construct a new agent in the group.
+
+        The behavior is undefined if there is
+        any outstanding work or busy threads.
+    */
+    template<class... Args>
+    void
+    emplace(Args&&... args)
     {
-        agents_.reserve(std::distance(
-            std::begin(agents), std::end(agents)));
-        for(auto& agent : agents)
-            agents_.push_back(&agent);
+        agents_.emplace_back(std::make_unique<Agent>(
+            std::forward<Args>(args)...));
     }
 
     /** Submit work to be executed.
 
-        The signature of the submitted function
-        object should be `void(Agent&)`.
+        The function object must have this
+        equivalent signature:
+        @code
+        void( Agent&, Args... );
+        @endcode
     */
+    template<class F, class... Args>
     void
-    async(std::function<void(void)> f);
+    async(F&& f, Args&&... args)
+    {
+        static_assert(std::is_invocable_v<F, Agent&, arg_t<Args>...>);
+        std::unique_lock<std::mutex> lock(impl_->mutex_);
+        work_.emplace_back(
+            [
+                f = std::forward<F>(f),
+                args = std::tuple<arg_t<Args>...>(args...)
+            ](Agent& agent)
+            {
+                std::apply(f, std::tuple_cat(
+                    std::tuple<Agent&>(agent),
+                    std::move(args)));
+            });
+        if(agents_.empty())
+            return;
+        run(std::move(lock));
+    }
 
     /** Block until all work has completed.
     */
     void
     wait()
     {
-        taskGroup_.wait();
+        std::unique_lock<std::mutex> lock(impl_->mutex_);
+        impl_->cv_.wait(lock,
+            [&]
+            {
+                return work_.empty() && busy_ == 0;
+            });
+    }
+
+private:
+    class scoped_agent
+    {
+        ExecutorGroup& group_;
+        std::unique_ptr<Agent> agent_;
+
+    public:
+        scoped_agent(
+            ExecutorGroup& group,
+            std::unique_ptr<Agent> agent) noexcept
+            : group_(group)
+            , agent_(std::move(agent))
+        {
+        }
+
+        ~scoped_agent()
+        {
+            --group_.busy_;
+            group_.agents_.emplace_back(std::move(agent_));
+            group_.impl_->cv_.notify_all();
+        }
+    };
+
+    void
+    run(std::unique_lock<std::mutex> lock)
+    {
+        std::unique_ptr<Agent> agent(std::move(agents_.back()));
+        agents_.pop_back();
+        ++busy_;
+
+        threadPool_.async(
+            [this, agent = std::move(agent)]() mutable
+            {
+                scoped_agent scope(*this, std::move(agent));
+                std::unique_lock<std::mutex> lock(impl_->mutex_);
+                for(;;)
+                {
+                    if(work_.empty())
+                        break;
+                    any_callable<void(Agent&)> work(std::move(work_.front()));
+                    work_.pop_front();
+                    unlock_guard unlock(impl_->mutex_);
+                    work(*agent);
+                }
+            });
     }
 };
-#endif
 
 } // mrdox
 } // clang
diff --git a/source/Support/Thread.cpp b/source/Support/Thread.cpp
index 1c1566e7b..88efdc73d 100644
--- a/source/Support/Thread.cpp
+++ b/source/Support/Thread.cpp
@@ -57,17 +57,23 @@ getThreadCount() const noexcept
 
 void
 ThreadPool::
-async(
-    std::function<void(void)> f)
+wait()
 {
-    impl_->async(std::move(f));
+    impl_->wait();
 }
 
 void
 ThreadPool::
-wait()
+post(
+    any_callable<void(void)> f)
 {
-    impl_->wait();
+    auto sp = std::make_shared<
+        any_callable<void(void)>>(std::move(f));
+    impl_->async(
+        [sp]
+        {
+            (*sp)();
+        });
 }
 
 //------------------------------------------------
@@ -90,17 +96,23 @@ TaskGroup(
 
 void
 TaskGroup::
-async(
-    std::function<void(void)> f)
+wait()
 {
-    impl_->async(std::move(f));
+    impl_->wait();
 }
 
 void
 TaskGroup::
-wait()
+post(
+    any_callable<void(void)> f)
 {
-    impl_->wait();
+    auto sp = std::make_shared<
+        any_callable<void(void)>>(std::move(f));
+    impl_->async(
+        [sp]
+        {
+            (*sp)();
+        });
 }
 
 } // mrdox

From d1a37ee5ed212e24c01f52bf6a290bdc034b25d0 Mon Sep 17 00:00:00 2001
From: Vinnie Falco <vinnie.falco@gmail.com>
Date: Sun, 11 Jun 2023 09:42:42 -0700
Subject: [PATCH 2/8] chore: no source files in source/

---
 source/-XML/CXXTags.hpp                    | 4 ++--
 source/-XML/XMLGenerator.hpp               | 4 ++--
 source/-XML/XMLTags.hpp                    | 4 ++--
 source/-XML/XMLWriter.cpp                  | 2 +-
 source/-XML/XMLWriter.hpp                  | 4 ++--
 source/-adoc/AdocGenerator.hpp             | 4 ++--
 source/-adoc/AdocMultiPageWriter.hpp       | 4 ++--
 source/-adoc/AdocPagesBuilder.hpp          | 4 ++--
 source/-adoc/AdocSinglePageWriter.hpp      | 4 ++--
 source/-adoc/AdocWriter.cpp                | 2 +-
 source/-adoc/AdocWriter.hpp                | 4 ++--
 source/-adoc/Asciidoc.hpp                  | 4 ++--
 source/-bitcode/BitcodeGenerator.hpp       | 4 ++--
 source/AST/ASTVisitor.cpp                  | 2 +-
 source/AST/ASTVisitor.hpp                  | 6 +++---
 source/AST/ASTVisitorHelpers.hpp           | 4 ++--
 source/AST/AbsoluteCompilationDatabase.cpp | 2 +-
 source/AST/AbsoluteCompilationDatabase.hpp | 4 ++--
 source/AST/AnyBlock.hpp                    | 4 ++--
 source/AST/AnyNodeList.hpp                 | 4 ++--
 source/AST/Bitcode.hpp                     | 4 ++--
 source/AST/BitcodeIDs.hpp                  | 4 ++--
 source/AST/BitcodeReader.hpp               | 4 ++--
 source/AST/BitcodeWriter.hpp               | 4 ++--
 source/AST/DecodeRecord.hpp                | 4 ++--
 source/AST/Execution.hpp                   | 4 ++--
 source/AST/FrontendAction.hpp              | 4 ++--
 source/AST/ParseJavadoc.hpp                | 4 ++--
 source/Metadata/Reduce.hpp                 | 4 ++--
 source/Support/Debug.hpp                   | 4 ++--
 source/Support/Error.hpp                   | 4 ++--
 source/Support/GeneratorsImpl.hpp          | 4 ++--
 source/Support/Operator.hpp                | 4 ++--
 source/Support/Path.hpp                    | 4 ++--
 source/Support/Radix.hpp                   | 4 ++--
 source/Support/RawOstream.hpp              | 4 ++--
 source/Support/SafeNames.hpp               | 4 ++--
 source/Support/TypeTraits.hpp              | 4 ++--
 source/Support/Validate.hpp                | 4 ++--
 source/Support/YamlFwd.hpp                 | 4 ++--
 source/{ => Tool}/Config.cpp               | 2 +-
 source/{ => Tool}/ConfigImpl.cpp           | 2 +-
 source/{ => Tool}/ConfigImpl.hpp           | 4 ++--
 source/{ => Tool}/Corpus.cpp               | 2 +-
 source/{ => Tool}/CorpusImpl.cpp           | 0
 source/{ => Tool}/CorpusImpl.hpp           | 6 +++---
 source/{ => Tool}/GenerateAction.cpp       | 2 +-
 source/{ => Tool}/Options.cpp              | 0
 source/{ => Tool}/Options.hpp              | 4 ++--
 source/{ => Tool}/SingleFileDB.hpp         | 4 ++--
 source/{ => Tool}/TestAction.cpp           | 2 +-
 source/{ => Tool}/ToolMain.cpp             | 0
 52 files changed, 91 insertions(+), 91 deletions(-)
 rename source/{ => Tool}/Config.cpp (97%)
 rename source/{ => Tool}/ConfigImpl.cpp (99%)
 rename source/{ => Tool}/ConfigImpl.hpp (99%)
 rename source/{ => Tool}/Corpus.cpp (99%)
 rename source/{ => Tool}/CorpusImpl.cpp (100%)
 rename source/{ => Tool}/CorpusImpl.hpp (96%)
 rename source/{ => Tool}/GenerateAction.cpp (98%)
 rename source/{ => Tool}/Options.cpp (100%)
 rename source/{ => Tool}/Options.hpp (94%)
 rename source/{ => Tool}/SingleFileDB.hpp (95%)
 rename source/{ => Tool}/TestAction.cpp (99%)
 rename source/{ => Tool}/ToolMain.cpp (100%)

diff --git a/source/-XML/CXXTags.hpp b/source/-XML/CXXTags.hpp
index a821698e4..8c54bf299 100644
--- a/source/-XML/CXXTags.hpp
+++ b/source/-XML/CXXTags.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_XML_CXXTAGS_HPP
-#define MRDOX_LIB_XML_CXXTAGS_HPP
+#ifndef MRDOX_TOOL_XML_CXXTAGS_HPP
+#define MRDOX_TOOL_XML_CXXTAGS_HPP
 
 #include "XMLTags.hpp"
 #include "Support/Operator.hpp"
diff --git a/source/-XML/XMLGenerator.hpp b/source/-XML/XMLGenerator.hpp
index a901ff72b..61cb74bde 100644
--- a/source/-XML/XMLGenerator.hpp
+++ b/source/-XML/XMLGenerator.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_XML_XMLGENERATOR_HPP
-#define MRDOX_LIB_XML_XMLGENERATOR_HPP
+#ifndef MRDOX_TOOL_XML_XMLGENERATOR_HPP
+#define MRDOX_TOOL_XML_XMLGENERATOR_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/Generator.hpp>
diff --git a/source/-XML/XMLTags.hpp b/source/-XML/XMLTags.hpp
index f025c0cbf..7973ef7c6 100644
--- a/source/-XML/XMLTags.hpp
+++ b/source/-XML/XMLTags.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_XML_XMLTAGS_HPP
-#define MRDOX_LIB_XML_XMLTAGS_HPP
+#ifndef MRDOX_TOOL_XML_XMLTAGS_HPP
+#define MRDOX_TOOL_XML_XMLTAGS_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/Metadata/Javadoc.hpp>
diff --git a/source/-XML/XMLWriter.cpp b/source/-XML/XMLWriter.cpp
index af2eb06fe..b899dc9e8 100644
--- a/source/-XML/XMLWriter.cpp
+++ b/source/-XML/XMLWriter.cpp
@@ -10,7 +10,7 @@
 //
 
 #include "XMLWriter.hpp"
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "CXXTags.hpp"
 #include "Support/Radix.hpp"
 #include "Support/SafeNames.hpp"
diff --git a/source/-XML/XMLWriter.hpp b/source/-XML/XMLWriter.hpp
index e22273747..9f4191b25 100644
--- a/source/-XML/XMLWriter.hpp
+++ b/source/-XML/XMLWriter.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_XML_XMLWRITER_HPP
-#define MRDOX_LIB_XML_XMLWRITER_HPP
+#ifndef MRDOX_TOOL_XML_XMLWRITER_HPP
+#define MRDOX_TOOL_XML_XMLWRITER_HPP
 
 #include "XMLTags.hpp"
 #include "Support/YamlFwd.hpp"
diff --git a/source/-adoc/AdocGenerator.hpp b/source/-adoc/AdocGenerator.hpp
index 989e34167..0067e894d 100644
--- a/source/-adoc/AdocGenerator.hpp
+++ b/source/-adoc/AdocGenerator.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_ADOC_ADOCGENERATOR_HPP
-#define MRDOX_LIB_ADOC_ADOCGENERATOR_HPP
+#ifndef MRDOX_TOOL_ADOC_ADOCGENERATOR_HPP
+#define MRDOX_TOOL_ADOC_ADOCGENERATOR_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/MetadataFwd.hpp>
diff --git a/source/-adoc/AdocMultiPageWriter.hpp b/source/-adoc/AdocMultiPageWriter.hpp
index 9ae18e501..cb65ac96d 100644
--- a/source/-adoc/AdocMultiPageWriter.hpp
+++ b/source/-adoc/AdocMultiPageWriter.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_ADOC_ADOCMULTIPAGEWRITER_HPP
-#define MRDOX_LIB_ADOC_ADOCMULTIPAGEWRITER_HPP
+#ifndef MRDOX_TOOL_ADOC_ADOCMULTIPAGEWRITER_HPP
+#define MRDOX_TOOL_ADOC_ADOCMULTIPAGEWRITER_HPP
 
 #include "AdocWriter.hpp"
 #include "Support/SafeNames.hpp"
diff --git a/source/-adoc/AdocPagesBuilder.hpp b/source/-adoc/AdocPagesBuilder.hpp
index 1f0b5958f..2b41fad55 100644
--- a/source/-adoc/AdocPagesBuilder.hpp
+++ b/source/-adoc/AdocPagesBuilder.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_ADOC_ADOCPAGESBUILDER_HPP
-#define MRDOX_LIB_ADOC_ADOCPAGESBUILDER_HPP
+#ifndef MRDOX_TOOL_ADOC_ADOCPAGESBUILDER_HPP
+#define MRDOX_TOOL_ADOC_ADOCPAGESBUILDER_HPP
 
 #include "Support/SafeNames.hpp"
 #include <mrdox/Corpus.hpp>
diff --git a/source/-adoc/AdocSinglePageWriter.hpp b/source/-adoc/AdocSinglePageWriter.hpp
index 3b3668f66..a1946ca97 100644
--- a/source/-adoc/AdocSinglePageWriter.hpp
+++ b/source/-adoc/AdocSinglePageWriter.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_ADOC_ADOCSINGLEPAGEWRITER_HPP
-#define MRDOX_LIB_ADOC_ADOCSINGLEPAGEWRITER_HPP
+#ifndef MRDOX_TOOL_ADOC_ADOCSINGLEPAGEWRITER_HPP
+#define MRDOX_TOOL_ADOC_ADOCSINGLEPAGEWRITER_HPP
 
 #include "AdocWriter.hpp"
 #include "Support/SafeNames.hpp"
diff --git a/source/-adoc/AdocWriter.cpp b/source/-adoc/AdocWriter.cpp
index d0c336357..509060495 100644
--- a/source/-adoc/AdocWriter.cpp
+++ b/source/-adoc/AdocWriter.cpp
@@ -10,7 +10,7 @@
 //
 
 #include "AdocWriter.hpp"
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "Support/Validate.hpp"
 #include <mrdox/Metadata.hpp>
 #include <mrdox/Platform.hpp>
diff --git a/source/-adoc/AdocWriter.hpp b/source/-adoc/AdocWriter.hpp
index e26e1fed5..de31f0b27 100644
--- a/source/-adoc/AdocWriter.hpp
+++ b/source/-adoc/AdocWriter.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_ADOC_ADOCWRITER_HPP
-#define MRDOX_LIB_ADOC_ADOCWRITER_HPP
+#ifndef MRDOX_TOOL_ADOC_ADOCWRITER_HPP
+#define MRDOX_TOOL_ADOC_ADOCWRITER_HPP
 
 #include "Support/SafeNames.hpp"
 #include "Support/YamlFwd.hpp"
diff --git a/source/-adoc/Asciidoc.hpp b/source/-adoc/Asciidoc.hpp
index f1fce7d55..a38f95e59 100644
--- a/source/-adoc/Asciidoc.hpp
+++ b/source/-adoc/Asciidoc.hpp
@@ -13,8 +13,8 @@
 #ifndef MRDOX_ADOC_ASCIIDOC_HPP
 #define MRDOX_ADOC_ASCIIDOC_HPP
 =======
-#ifndef MRDOX_LIB_ADOC_ASCIIDOC_HPP
-#define MRDOX_LIB_ADOC_ASCIIDOC_HPP
+#ifndef MRDOX_TOOL_ADOC_ASCIIDOC_HPP
+#define MRDOX_TOOL_ADOC_ASCIIDOC_HPP
 >>>>>>> 203c58d (chore: tidy include guards)
 
 #include <mrdox/Platform.hpp>
diff --git a/source/-bitcode/BitcodeGenerator.hpp b/source/-bitcode/BitcodeGenerator.hpp
index 6c6ddfcac..28b9eb10a 100644
--- a/source/-bitcode/BitcodeGenerator.hpp
+++ b/source/-bitcode/BitcodeGenerator.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_BITCODE_BITCODEGENERATOR_HPP
-#define MRDOX_LIB_BITCODE_BITCODEGENERATOR_HPP
+#ifndef MRDOX_TOOL_BITCODE_BITCODEGENERATOR_HPP
+#define MRDOX_TOOL_BITCODE_BITCODEGENERATOR_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/Generator.hpp>
diff --git a/source/AST/ASTVisitor.cpp b/source/AST/ASTVisitor.cpp
index f8b1004db..5bc012492 100644
--- a/source/AST/ASTVisitor.cpp
+++ b/source/AST/ASTVisitor.cpp
@@ -14,7 +14,7 @@
 #include "ASTVisitorHelpers.hpp"
 #include "Bitcode.hpp"
 #include "ParseJavadoc.hpp"
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "Support/Path.hpp"
 #include "Support/Debug.hpp"
 #include <mrdox/Metadata.hpp>
diff --git a/source/AST/ASTVisitor.hpp b/source/AST/ASTVisitor.hpp
index d1d3ee64d..20101d20d 100644
--- a/source/AST/ASTVisitor.hpp
+++ b/source/AST/ASTVisitor.hpp
@@ -10,10 +10,10 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_ASTVISITOR_HPP
-#define MRDOX_LIB_AST_ASTVISITOR_HPP
+#ifndef MRDOX_TOOL_AST_ASTVISITOR_HPP
+#define MRDOX_TOOL_AST_ASTVISITOR_HPP
 
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include <mrdox/MetadataFwd.hpp>
 #include <clang/Sema/SemaConsumer.h>
 #include <clang/Tooling/Execution.h>
diff --git a/source/AST/ASTVisitorHelpers.hpp b/source/AST/ASTVisitorHelpers.hpp
index 2076ed47b..665276683 100644
--- a/source/AST/ASTVisitorHelpers.hpp
+++ b/source/AST/ASTVisitorHelpers.hpp
@@ -7,8 +7,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_ASTVISITORHELPERS_HPP
-#define MRDOX_LIB_AST_ASTVISITORHELPERS_HPP
+#ifndef MRDOX_TOOL_AST_ASTVISITORHELPERS_HPP
+#define MRDOX_TOOL_AST_ASTVISITORHELPERS_HPP
 
 #include "Support/Debug.hpp"
 #include <mrdox/Platform.hpp>
diff --git a/source/AST/AbsoluteCompilationDatabase.cpp b/source/AST/AbsoluteCompilationDatabase.cpp
index 7473ba29a..8265aa253 100644
--- a/source/AST/AbsoluteCompilationDatabase.cpp
+++ b/source/AST/AbsoluteCompilationDatabase.cpp
@@ -9,7 +9,7 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "Support/Debug.hpp"
 #include "Support/Path.hpp"
 #include "AST/AbsoluteCompilationDatabase.hpp"
diff --git a/source/AST/AbsoluteCompilationDatabase.hpp b/source/AST/AbsoluteCompilationDatabase.hpp
index d5ac3901b..f7065ea75 100644
--- a/source/AST/AbsoluteCompilationDatabase.hpp
+++ b/source/AST/AbsoluteCompilationDatabase.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_ABSOLUTECOMPILATIONDATABASE_HPP
-#define MRDOX_LIB_AST_ABSOLUTECOMPILATIONDATABASE_HPP
+#ifndef MRDOX_TOOL_AST_ABSOLUTECOMPILATIONDATABASE_HPP
+#define MRDOX_TOOL_AST_ABSOLUTECOMPILATIONDATABASE_HPP
 
 #include <mrdox/Config.hpp>
 #include <clang/Tooling/JSONCompilationDatabase.h>
diff --git a/source/AST/AnyBlock.hpp b/source/AST/AnyBlock.hpp
index d5436a5cd..d5784cfd8 100644
--- a/source/AST/AnyBlock.hpp
+++ b/source/AST/AnyBlock.hpp
@@ -10,8 +10,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_ANYBLOCK_HPP
-#define MRDOX_LIB_AST_ANYBLOCK_HPP
+#ifndef MRDOX_TOOL_AST_ANYBLOCK_HPP
+#define MRDOX_TOOL_AST_ANYBLOCK_HPP
 
 #include "BitcodeReader.hpp"
 #include "AnyNodeList.hpp"
diff --git a/source/AST/AnyNodeList.hpp b/source/AST/AnyNodeList.hpp
index a0f33deda..e83ccf983 100644
--- a/source/AST/AnyNodeList.hpp
+++ b/source/AST/AnyNodeList.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_ANYNODELIST_HPP
-#define MRDOX_LIB_AST_ANYNODELIST_HPP
+#ifndef MRDOX_TOOL_AST_ANYNODELIST_HPP
+#define MRDOX_TOOL_AST_ANYNODELIST_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/Support/Error.hpp>
diff --git a/source/AST/Bitcode.hpp b/source/AST/Bitcode.hpp
index 21cf29d58..110c0a496 100644
--- a/source/AST/Bitcode.hpp
+++ b/source/AST/Bitcode.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_BITCODE_HPP
-#define MRDOX_LIB_AST_BITCODE_HPP
+#ifndef MRDOX_TOOL_AST_BITCODE_HPP
+#define MRDOX_TOOL_AST_BITCODE_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/MetadataFwd.hpp>
diff --git a/source/AST/BitcodeIDs.hpp b/source/AST/BitcodeIDs.hpp
index 44f541299..9c56f6c5f 100644
--- a/source/AST/BitcodeIDs.hpp
+++ b/source/AST/BitcodeIDs.hpp
@@ -10,8 +10,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_BITCODEIDS_HPP
-#define MRDOX_LIB_AST_BITCODEIDS_HPP
+#ifndef MRDOX_TOOL_AST_BITCODEIDS_HPP
+#define MRDOX_TOOL_AST_BITCODEIDS_HPP
 
 #include <mrdox/Platform.hpp>
 #include <llvm/Bitstream/BitCodeEnums.h>
diff --git a/source/AST/BitcodeReader.hpp b/source/AST/BitcodeReader.hpp
index de414a2f5..2e02b0ad1 100644
--- a/source/AST/BitcodeReader.hpp
+++ b/source/AST/BitcodeReader.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_BITCODEREADER_HPP
-#define MRDOX_LIB_AST_BITCODEREADER_HPP
+#ifndef MRDOX_TOOL_AST_BITCODEREADER_HPP
+#define MRDOX_TOOL_AST_BITCODEREADER_HPP
 
 //
 // This file implements a reader for parsing the
diff --git a/source/AST/BitcodeWriter.hpp b/source/AST/BitcodeWriter.hpp
index 586d5b4cf..b7aa550a4 100644
--- a/source/AST/BitcodeWriter.hpp
+++ b/source/AST/BitcodeWriter.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_BITCODEWRITER_HPP
-#define MRDOX_LIB_AST_BITCODEWRITER_HPP
+#ifndef MRDOX_TOOL_AST_BITCODEWRITER_HPP
+#define MRDOX_TOOL_AST_BITCODEWRITER_HPP
 
 //
 // This file implements a writer for serializing the
diff --git a/source/AST/DecodeRecord.hpp b/source/AST/DecodeRecord.hpp
index 6314021ed..3f159f9b1 100644
--- a/source/AST/DecodeRecord.hpp
+++ b/source/AST/DecodeRecord.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_DECODERECORD_HPP
-#define MRDOX_LIB_AST_DECODERECORD_HPP
+#ifndef MRDOX_TOOL_AST_DECODERECORD_HPP
+#define MRDOX_TOOL_AST_DECODERECORD_HPP
 
 #include "BitcodeReader.hpp"
 
diff --git a/source/AST/Execution.hpp b/source/AST/Execution.hpp
index f34110dc0..fff96a947 100644
--- a/source/AST/Execution.hpp
+++ b/source/AST/Execution.hpp
@@ -22,8 +22,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MRDOX_LIB_AST_EXECUTION_HPP
-#define MRDOX_LIB_AST_EXECUTION_HPP
+#ifndef MRDOX_TOOL_AST_EXECUTION_HPP
+#define MRDOX_TOOL_AST_EXECUTION_HPP
 
 #include <clang/Tooling/ArgumentsAdjusters.h>
 #include <clang/Tooling/Execution.h>
diff --git a/source/AST/FrontendAction.hpp b/source/AST/FrontendAction.hpp
index a26c30d32..ca7908baa 100644
--- a/source/AST/FrontendAction.hpp
+++ b/source/AST/FrontendAction.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_FRONTENDACTION_HPP
-#define MRDOX_LIB_AST_FRONTENDACTION_HPP
+#ifndef MRDOX_TOOL_AST_FRONTENDACTION_HPP
+#define MRDOX_TOOL_AST_FRONTENDACTION_HPP
 
 #include <mrdox/Platform.hpp>
 #include <clang/Tooling/Execution.h>
diff --git a/source/AST/ParseJavadoc.hpp b/source/AST/ParseJavadoc.hpp
index 33a987547..3d99fd5e9 100644
--- a/source/AST/ParseJavadoc.hpp
+++ b/source/AST/ParseJavadoc.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_AST_PARSEJAVADOC_HPP
-#define MRDOX_LIB_AST_PARSEJAVADOC_HPP
+#ifndef MRDOX_TOOL_AST_PARSEJAVADOC_HPP
+#define MRDOX_TOOL_AST_PARSEJAVADOC_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/Metadata/Javadoc.hpp>
diff --git a/source/Metadata/Reduce.hpp b/source/Metadata/Reduce.hpp
index 4343b82f2..6135b917f 100644
--- a/source/Metadata/Reduce.hpp
+++ b/source/Metadata/Reduce.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_METADATA_REDUCE_HPP
-#define MRDOX_LIB_METADATA_REDUCE_HPP
+#ifndef MRDOX_TOOL_METADATA_REDUCE_HPP
+#define MRDOX_TOOL_METADATA_REDUCE_HPP
 
 #include <mrdox/Metadata/Info.hpp>
 #include <mrdox/MetadataFwd.hpp>
diff --git a/source/Support/Debug.hpp b/source/Support/Debug.hpp
index ae14f82d0..0f4881a05 100644
--- a/source/Support/Debug.hpp
+++ b/source/Support/Debug.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_DEBUG_HPP
-#define MRDOX_LIB_SUPPORT_DEBUG_HPP
+#ifndef MRDOX_TOOL_SUPPORT_DEBUG_HPP
+#define MRDOX_TOOL_SUPPORT_DEBUG_HPP
 
 #include <mrdox/Platform.hpp>
 #if ! defined(NDEBUG)
diff --git a/source/Support/Error.hpp b/source/Support/Error.hpp
index 89e3aa408..f4dfe7d5a 100644
--- a/source/Support/Error.hpp
+++ b/source/Support/Error.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_ERROR_HPP
-#define MRDOX_LIB_SUPPORT_ERROR_HPP
+#ifndef MRDOX_TOOL_SUPPORT_ERROR_HPP
+#define MRDOX_TOOL_SUPPORT_ERROR_HPP
 
 #include <mrdox/Support/Error.hpp>
 #include <llvm/ADT/SmallString.h>
diff --git a/source/Support/GeneratorsImpl.hpp b/source/Support/GeneratorsImpl.hpp
index 5410ce98f..8d65ee9b4 100644
--- a/source/Support/GeneratorsImpl.hpp
+++ b/source/Support/GeneratorsImpl.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_GENERATORSIMPL_HPP
-#define MRDOX_LIB_SUPPORT_GENERATORSIMPL_HPP
+#ifndef MRDOX_TOOL_SUPPORT_GENERATORSIMPL_HPP
+#define MRDOX_TOOL_SUPPORT_GENERATORSIMPL_HPP
 
 #include <mrdox/Support/Error.hpp>
 #include <mrdox/Platform.hpp>
diff --git a/source/Support/Operator.hpp b/source/Support/Operator.hpp
index b4e8ce651..3c5df863f 100644
--- a/source/Support/Operator.hpp
+++ b/source/Support/Operator.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_OPERATOR_HPP
-#define MRDOX_LIB_SUPPORT_OPERATOR_HPP
+#ifndef MRDOX_TOOL_SUPPORT_OPERATOR_HPP
+#define MRDOX_TOOL_SUPPORT_OPERATOR_HPP
 
 #include <mrdox/Platform.hpp>
 #include <clang/Basic/OperatorKinds.h>
diff --git a/source/Support/Path.hpp b/source/Support/Path.hpp
index a3c08af0f..8ff17bf86 100644
--- a/source/Support/Path.hpp
+++ b/source/Support/Path.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_PATH_HPP
-#define MRDOX_LIB_SUPPORT_PATH_HPP
+#ifndef MRDOX_TOOL_SUPPORT_PATH_HPP
+#define MRDOX_TOOL_SUPPORT_PATH_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/Support/Path.hpp>
diff --git a/source/Support/Radix.hpp b/source/Support/Radix.hpp
index f2b0b3d0e..6f359643a 100644
--- a/source/Support/Radix.hpp
+++ b/source/Support/Radix.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_RADIX_HPP
-#define MRDOX_LIB_SUPPORT_RADIX_HPP
+#ifndef MRDOX_TOOL_SUPPORT_RADIX_HPP
+#define MRDOX_TOOL_SUPPORT_RADIX_HPP
 
 #include <mrdox/Platform.hpp>
 #include <llvm/ADT/ArrayRef.h>
diff --git a/source/Support/RawOstream.hpp b/source/Support/RawOstream.hpp
index 766c62e9b..c6dc7c1f0 100644
--- a/source/Support/RawOstream.hpp
+++ b/source/Support/RawOstream.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_RAWOSTREAM_HPP
-#define MRDOX_LIB_SUPPORT_RAWOSTREAM_HPP
+#ifndef MRDOX_TOOL_SUPPORT_RAWOSTREAM_HPP
+#define MRDOX_TOOL_SUPPORT_RAWOSTREAM_HPP
 
 #include <llvm/Support/raw_ostream.h>
 #include <ostream>
diff --git a/source/Support/SafeNames.hpp b/source/Support/SafeNames.hpp
index 6f8be8788..4f0d1629c 100644
--- a/source/Support/SafeNames.hpp
+++ b/source/Support/SafeNames.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_SAFENAMES_HPP
-#define MRDOX_LIB_SUPPORT_SAFENAMES_HPP
+#ifndef MRDOX_TOOL_SUPPORT_SAFENAMES_HPP
+#define MRDOX_TOOL_SUPPORT_SAFENAMES_HPP
 
 #include <mrdox/Platform.hpp>
 #include <mrdox/MetadataFwd.hpp>
diff --git a/source/Support/TypeTraits.hpp b/source/Support/TypeTraits.hpp
index b1b3ea863..4fd65f216 100644
--- a/source/Support/TypeTraits.hpp
+++ b/source/Support/TypeTraits.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_TYPE_TRAITS_HPP
-#define MRDOX_LIB_SUPPORT_TYPE_TRAITS_HPP
+#ifndef MRDOX_TOOL_SUPPORT_TYPE_TRAITS_HPP
+#define MRDOX_TOOL_SUPPORT_TYPE_TRAITS_HPP
 
 #include <type_traits>
 
diff --git a/source/Support/Validate.hpp b/source/Support/Validate.hpp
index f562dd050..d2b60fc09 100644
--- a/source/Support/Validate.hpp
+++ b/source/Support/Validate.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_VALIDATE_HPP
-#define MRDOX_LIB_SUPPORT_VALIDATE_HPP
+#ifndef MRDOX_TOOL_SUPPORT_VALIDATE_HPP
+#define MRDOX_TOOL_SUPPORT_VALIDATE_HPP
 
 #include <mrdox/Platform.hpp>
 #include <llvm/ADT/StringRef.h>
diff --git a/source/Support/YamlFwd.hpp b/source/Support/YamlFwd.hpp
index 73b9748cf..fe2537688 100644
--- a/source/Support/YamlFwd.hpp
+++ b/source/Support/YamlFwd.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SUPPORT_YAMLFWD_HPP
-#define MRDOX_LIB_SUPPORT_YAMLFWD_HPP
+#ifndef MRDOX_TOOL_SUPPORT_YAMLFWD_HPP
+#define MRDOX_TOOL_SUPPORT_YAMLFWD_HPP
 
 #include <mrdox/Platform.hpp>
 
diff --git a/source/Config.cpp b/source/Tool/Config.cpp
similarity index 97%
rename from source/Config.cpp
rename to source/Tool/Config.cpp
index e9cd88a22..dce42a373 100644
--- a/source/Config.cpp
+++ b/source/Tool/Config.cpp
@@ -9,7 +9,7 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "Support/Path.hpp"
 #include <mrdox/Support/Error.hpp>
 #include <llvm/Config/llvm-config.h>
diff --git a/source/ConfigImpl.cpp b/source/Tool/ConfigImpl.cpp
similarity index 99%
rename from source/ConfigImpl.cpp
rename to source/Tool/ConfigImpl.cpp
index 95c4f6c18..9cb932609 100644
--- a/source/ConfigImpl.cpp
+++ b/source/Tool/ConfigImpl.cpp
@@ -9,7 +9,7 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "Support/Debug.hpp"
 #include "Support/Error.hpp"
 #include "Support/Path.hpp"
diff --git a/source/ConfigImpl.hpp b/source/Tool/ConfigImpl.hpp
similarity index 99%
rename from source/ConfigImpl.hpp
rename to source/Tool/ConfigImpl.hpp
index 58c5f19bf..5274842c9 100644
--- a/source/ConfigImpl.hpp
+++ b/source/Tool/ConfigImpl.hpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_CONFIGIMPL_HPP
-#define MRDOX_LIB_CONFIGIMPL_HPP
+#ifndef MRDOX_TOOL_CONFIGIMPL_HPP
+#define MRDOX_TOOL_CONFIGIMPL_HPP
 
 #include "Support/YamlFwd.hpp"
 #include <mrdox/Config.hpp>
diff --git a/source/Corpus.cpp b/source/Tool/Corpus.cpp
similarity index 99%
rename from source/Corpus.cpp
rename to source/Tool/Corpus.cpp
index 95b691bac..2af99801f 100644
--- a/source/Corpus.cpp
+++ b/source/Tool/Corpus.cpp
@@ -9,7 +9,7 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include <mrdox/Corpus.hpp>
 #include <mrdox/Support/Report.hpp>
 #include <mrdox/Metadata.hpp>
diff --git a/source/CorpusImpl.cpp b/source/Tool/CorpusImpl.cpp
similarity index 100%
rename from source/CorpusImpl.cpp
rename to source/Tool/CorpusImpl.cpp
diff --git a/source/CorpusImpl.hpp b/source/Tool/CorpusImpl.hpp
similarity index 96%
rename from source/CorpusImpl.hpp
rename to source/Tool/CorpusImpl.hpp
index 0e312386f..b2cecf8bc 100644
--- a/source/CorpusImpl.hpp
+++ b/source/Tool/CorpusImpl.hpp
@@ -8,10 +8,10 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_CORPUSIMPL_HPP
-#define MRDOX_LIB_CORPUSIMPL_HPP
+#ifndef MRDOX_TOOL_CORPUSIMPL_HPP
+#define MRDOX_TOOL_CORPUSIMPL_HPP
 
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "Support/Debug.hpp"
 #include <mrdox/Corpus.hpp>
 #include <mrdox/Metadata.hpp>
diff --git a/source/GenerateAction.cpp b/source/Tool/GenerateAction.cpp
similarity index 98%
rename from source/GenerateAction.cpp
rename to source/Tool/GenerateAction.cpp
index 5485c34a9..6be6ed2e9 100644
--- a/source/GenerateAction.cpp
+++ b/source/Tool/GenerateAction.cpp
@@ -10,7 +10,7 @@
 //
 
 #include "Options.hpp"
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "CorpusImpl.hpp"
 #include "AST/AbsoluteCompilationDatabase.hpp"
 #include <mrdox/Generators.hpp>
diff --git a/source/Options.cpp b/source/Tool/Options.cpp
similarity index 100%
rename from source/Options.cpp
rename to source/Tool/Options.cpp
diff --git a/source/Options.hpp b/source/Tool/Options.hpp
similarity index 94%
rename from source/Options.hpp
rename to source/Tool/Options.hpp
index 93d8a5e9d..91b5d9e98 100644
--- a/source/Options.hpp
+++ b/source/Tool/Options.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_OPTIONS_HPP
-#define MRDOX_LIB_OPTIONS_HPP
+#ifndef MRDOX_TOOL_OPTIONS_HPP
+#define MRDOX_TOOL_OPTIONS_HPP
 
 #include <llvm/Support/CommandLine.h>
 #include <string>
diff --git a/source/SingleFileDB.hpp b/source/Tool/SingleFileDB.hpp
similarity index 95%
rename from source/SingleFileDB.hpp
rename to source/Tool/SingleFileDB.hpp
index e6338f1cd..89d5edfe6 100644
--- a/source/SingleFileDB.hpp
+++ b/source/Tool/SingleFileDB.hpp
@@ -8,8 +8,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#ifndef MRDOX_LIB_SINGLEFILEDB_HPP
-#define MRDOX_LIB_SINGLEFILEDB_HPP
+#ifndef MRDOX_TOOL_SINGLEFILEDB_HPP
+#define MRDOX_TOOL_SINGLEFILEDB_HPP
 
 #include <clang/Tooling/CompilationDatabase.h>
 #include <string>
diff --git a/source/TestAction.cpp b/source/Tool/TestAction.cpp
similarity index 99%
rename from source/TestAction.cpp
rename to source/Tool/TestAction.cpp
index bc5786030..757275c1b 100644
--- a/source/TestAction.cpp
+++ b/source/Tool/TestAction.cpp
@@ -10,7 +10,7 @@
 
 #include "Options.hpp"
 #include "SingleFileDB.hpp"
-#include "ConfigImpl.hpp"
+#include "Tool/ConfigImpl.hpp"
 #include "CorpusImpl.hpp"
 #include "Support/Error.hpp"
 #include <mrdox/Config.hpp>
diff --git a/source/ToolMain.cpp b/source/Tool/ToolMain.cpp
similarity index 100%
rename from source/ToolMain.cpp
rename to source/Tool/ToolMain.cpp

From f19a27af7bc849ae8e6b9247855bddfc04165310 Mon Sep 17 00:00:00 2001
From: Vinnie Falco <vinnie.falco@gmail.com>
Date: Sun, 11 Jun 2023 09:45:56 -0700
Subject: [PATCH 3/8] chore: refactor thread support sources

---
 include/mrdox/Support/ExecutorGroup.hpp | 165 +++++++++++++++++++
 include/mrdox/Support/Handlebars.hpp    | 135 ----------------
 include/mrdox/Support/ThreadPool.hpp    | 176 ++++++++++++++++++++
 include/mrdox/Support/any_callable.hpp  |  78 +++++++++
 include/mrdox/Support/unlock_guard.hpp  |  47 ++++++
 source/-adoc/AdocPagesBuilder.hpp       |   2 +-
 source/-bitcode/BitcodeGenerator.cpp    |   2 +-
 source/Support/Handlebars.cpp           | 207 ------------------------
 source/Support/Thread.cpp               |   2 +-
 source/Tool/ConfigImpl.hpp              |   2 +-
 source/Tool/TestAction.cpp              |   2 +-
 11 files changed, 471 insertions(+), 347 deletions(-)
 create mode 100644 include/mrdox/Support/ExecutorGroup.hpp
 delete mode 100644 include/mrdox/Support/Handlebars.hpp
 create mode 100644 include/mrdox/Support/ThreadPool.hpp
 create mode 100644 include/mrdox/Support/any_callable.hpp
 create mode 100644 include/mrdox/Support/unlock_guard.hpp
 delete mode 100644 source/Support/Handlebars.cpp

diff --git a/include/mrdox/Support/ExecutorGroup.hpp b/include/mrdox/Support/ExecutorGroup.hpp
new file mode 100644
index 000000000..489342a47
--- /dev/null
+++ b/include/mrdox/Support/ExecutorGroup.hpp
@@ -0,0 +1,165 @@
+//
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
+//
+// Official repository: https://github.com/cppalliance/mrdox
+//
+
+#ifndef MRDOX_SUPPORT_EXECUTORGROUP_HPP
+#define MRDOX_SUPPORT_EXECUTORGROUP_HPP
+
+#include <mrdox/Platform.hpp>
+#include <mrdox/Support/ThreadPool.hpp>
+#include <mrdox/Support/unlock_guard.hpp>
+#include <condition_variable>
+#include <deque>
+#include <mutex>
+#include <vector>
+
+namespace clang {
+namespace mrdox {
+
+/** A set of execution agents for performing concurrent work.
+*/
+template<class Agent>
+class ExecutorGroup
+{
+    struct Impl
+    {
+        std::mutex mutex_;
+        std::condition_variable cv_;
+    };
+
+    ThreadPool& threadPool_;
+    std::unique_ptr<Impl> impl_;
+    std::vector<std::unique_ptr<Agent>> agents_;
+    std::deque<any_callable<void(Agent&)>> work_;
+    std::size_t busy_ = 0;
+
+public:
+    template<class T>
+    using arg_t = ThreadPool::arg_t<T>;
+
+    ExecutorGroup(ExecutorGroup const&) = delete;
+    ExecutorGroup& operator=(ExecutorGroup&&) = delete;
+    ExecutorGroup& operator=(ExecutorGroup const&) = delete;
+    ExecutorGroup(ExecutorGroup&&) = default;
+
+    explicit
+    ExecutorGroup(
+        ThreadPool& threadPool) noexcept
+        : threadPool_(threadPool)
+        , impl_(std::make_unique<Impl>())
+    {
+    }
+
+    /** Construct a new agent in the group.
+
+        The behavior is undefined if there is
+        any outstanding work or busy threads.
+    */
+    template<class... Args>
+    void
+    emplace(Args&&... args)
+    {
+        agents_.emplace_back(std::make_unique<Agent>(
+            std::forward<Args>(args)...));
+    }
+
+    /** Submit work to be executed.
+
+        The function object must have this
+        equivalent signature:
+        @code
+        void( Agent&, Args... );
+        @endcode
+    */
+    template<class F, class... Args>
+    void
+    async(F&& f, Args&&... args)
+    {
+        static_assert(std::is_invocable_v<F, Agent&, arg_t<Args>...>);
+        std::unique_lock<std::mutex> lock(impl_->mutex_);
+        work_.emplace_back(
+            [
+                f = std::forward<F>(f),
+                args = std::tuple<arg_t<Args>...>(args...)
+            ](Agent& agent)
+            {
+                std::apply(f, std::tuple_cat(
+                    std::tuple<Agent&>(agent),
+                    std::move(args)));
+            });
+        if(agents_.empty())
+            return;
+        run(std::move(lock));
+    }
+
+    /** Block until all work has completed.
+    */
+    void
+    wait()
+    {
+        std::unique_lock<std::mutex> lock(impl_->mutex_);
+        impl_->cv_.wait(lock,
+            [&]
+            {
+                return work_.empty() && busy_ == 0;
+            });
+    }
+
+private:
+    class scoped_agent
+    {
+        ExecutorGroup& group_;
+        std::unique_ptr<Agent> agent_;
+
+    public:
+        scoped_agent(
+            ExecutorGroup& group,
+            std::unique_ptr<Agent> agent) noexcept
+            : group_(group)
+            , agent_(std::move(agent))
+        {
+        }
+
+        ~scoped_agent()
+        {
+            --group_.busy_;
+            group_.agents_.emplace_back(std::move(agent_));
+            group_.impl_->cv_.notify_all();
+        }
+    };
+
+    void
+    run(std::unique_lock<std::mutex> lock)
+    {
+        std::unique_ptr<Agent> agent(std::move(agents_.back()));
+        agents_.pop_back();
+        ++busy_;
+
+        threadPool_.async(
+            [this, agent = std::move(agent)]() mutable
+            {
+                scoped_agent scope(*this, std::move(agent));
+                std::unique_lock<std::mutex> lock(impl_->mutex_);
+                for(;;)
+                {
+                    if(work_.empty())
+                        break;
+                    any_callable<void(Agent&)> work(std::move(work_.front()));
+                    work_.pop_front();
+                    unlock_guard unlock(impl_->mutex_);
+                    work(*agent);
+                }
+            });
+    }
+};
+
+} // mrdox
+} // clang
+
+#endif
diff --git a/include/mrdox/Support/Handlebars.hpp b/include/mrdox/Support/Handlebars.hpp
deleted file mode 100644
index 80961c96a..000000000
--- a/include/mrdox/Support/Handlebars.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-//
-// This is a derivative work. originally part of the LLVM Project.
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
-//
-// Official repository: https://github.com/cppalliance/mrdox
-//
-
-#ifndef MRDOX_SUPPORT_HANDLEBARS_HPP
-#define MRDOX_SUPPORT_HANDLEBARS_HPP
-
-#include <mrdox/Platform.hpp>
-#include <cstddef>
-#include <string_view>
-#include <system_error>
-
-namespace clang {
-namespace mrdox {
-namespace hbs {
-
-struct Access;
-class Object;
-
-//------------------------------------------------
-
-/** A reference to an instance of the Javascript interpreter.
-*/
-class Context
-{
-    struct Impl;
-
-    Impl* impl_;
-
-    friend struct Access;
-
-public:
-    Context& operator=(Context const&) = delete;
-
-    MRDOX_DECL ~Context();
-    MRDOX_DECL Context();
-    MRDOX_DECL Context(Context const&) noexcept;
-
-    MRDOX_DECL std::error_code eval(std::string_view js);
-    MRDOX_DECL std::error_code eval_file(std::string_view path);
-};
-
-//------------------------------------------------
-
-/** An ECMAScript Array.
-*/
-class Array
-{
-    Context ctx_;
-    int idx_;
-
-    friend struct Access;
-
-public:
-    Array(Array const&) = delete;
-    Array& operator=(Array const&) = delete;
-
-    MRDOX_DECL ~Array();
-    MRDOX_DECL Array(Context const& ctx);
-    MRDOX_DECL void append(std::string_view value) const;
-    MRDOX_DECL void append(Array const& value) const;
-    MRDOX_DECL void append(Object const& value) const;
-};
-
-//------------------------------------------------
-
-/** An ECMAScript Object
-*/
-class Object
-{
-    Context ctx_;
-    int idx_;
-
-    friend struct Access;
-
-public:
-    Object(Object const&) = delete;
-    Object& operator=(Object const&) = delete;
-
-    MRDOX_DECL ~Object();
-    MRDOX_DECL Object(Context const& ctx);
-    MRDOX_DECL void insert(std::string_view key, std::string_view value) const;
-    MRDOX_DECL void insert(std::string_view key, Array const& value) const;
-    MRDOX_DECL void insert(std::string_view key, Object const& value) const;
-};
-
-//------------------------------------------------
-
-/** A compiled Handlebars template.
-*/
-class Template
-{
-public:
-};
-
-/** A compiled Handlebars partial.
-*/
-class Partial
-{
-public:
-};
-
-//------------------------------------------------
-
-/** An instance of the handlebars template engine.
-*/
-class Handlebars
-{
-    Context ctx_;
-
-public:
-    explicit
-    Handlebars(Context const& ctx) noexcept;
-
-    /** Return the loaded handlebars script.
-    */
-    friend
-    Handlebars
-    loadHandlebarsScript(
-        std::string_view path,
-        std::error_code& ec);
-};
-
-} // hbs
-} // mrdox
-} // clang
-
-#endif
diff --git a/include/mrdox/Support/ThreadPool.hpp b/include/mrdox/Support/ThreadPool.hpp
new file mode 100644
index 000000000..065fe9443
--- /dev/null
+++ b/include/mrdox/Support/ThreadPool.hpp
@@ -0,0 +1,176 @@
+//
+// This is a derivative work. originally part of the LLVM Project.
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
+//
+// Official repository: https://github.com/cppalliance/mrdox
+//
+
+#ifndef MRDOX_SUPPORT_THREAD_HPP
+#define MRDOX_SUPPORT_THREAD_HPP
+
+#include <mrdox/Platform.hpp>
+#include <mrdox/Support/Error.hpp>
+#include <mrdox/Support/any_callable.hpp>
+#include <memory>
+#include <type_traits>
+#include <utility>
+
+namespace llvm {
+class ThreadPool;
+class ThreadPoolTaskGroup;
+} // llvm
+
+namespace clang {
+namespace mrdox {
+
+class TaskGroup;
+
+//------------------------------------------------
+
+/** A pool of threads for executing work concurrently.
+*/
+class MRDOX_VISIBLE
+    ThreadPool
+{
+    std::unique_ptr<llvm::ThreadPool> impl_;
+
+    friend class TaskGroup;
+
+public:
+    template<class Agent> struct arg_ty { using type = Agent; };
+    template<class Agent> struct arg_ty<Agent&> { using type =
+        std::conditional_t< std::is_const_v<Agent>, Agent, Agent&>; };
+    template<class Agent> using arg_t = typename arg_ty<Agent>::type;
+
+    /** Destructor.
+    */
+    MRDOX_DECL
+    ~ThreadPool();
+
+    /** Constructor.
+
+        Default constructed thread pools may only
+        be reset or destroyed.
+    */
+    MRDOX_DECL
+    explicit
+    ThreadPool();
+
+    /** Constructor.
+    */
+    MRDOX_DECL
+    explicit
+    ThreadPool(
+        unsigned concurrency);
+
+    /** Reset the pool to the specified concurrency.
+    */
+    MRDOX_DECL
+    void
+    reset(
+        unsigned concurrency);
+
+    /** Return the number of threads in the pool.
+    */
+    MRDOX_DECL
+    unsigned
+    getThreadCount() const noexcept;
+
+    /** Submit work to be executed.
+
+        The signature of the submitted function
+        object should be `void(void)`.
+    */
+    template<class F>
+    void
+    async(F&& f)
+    {
+        post(std::forward<F>(f));
+    }
+
+    /** Invoke a function object for each element of a range.
+    */
+    template<class Range, class F>
+    void forEach(Range&& range, F const& f);
+
+    /** Block until all work has completed.
+    */
+    MRDOX_DECL
+    void
+    wait();
+
+private:
+    MRDOX_DECL void post(any_callable<void(void)>);
+};
+
+//------------------------------------------------
+
+/** A subset of possible work in a thread pool.
+*/
+class MRDOX_VISIBLE
+    TaskGroup
+{
+    std::unique_ptr<llvm::ThreadPoolTaskGroup> impl_;
+
+public:
+    /** Destructor.
+    */
+    MRDOX_DECL
+    ~TaskGroup();
+
+    /** Constructor.
+    */
+    MRDOX_DECL
+    explicit
+    TaskGroup(
+        ThreadPool& threadPool);
+
+    /** Submit work to be executed.
+
+        The signature of the submitted function
+        object should be `void(void)`.
+    */
+    template<class F>
+    void
+    async(F&& f)
+    {
+        post(std::forward<F>(f));
+    }
+
+    /** Block until all work has completed.
+    */
+    MRDOX_DECL
+    void
+    wait();
+
+private:
+    MRDOX_DECL void post(any_callable<void(void)>);
+};
+
+//------------------------------------------------
+
+template<class Range, class F>
+void
+ThreadPool::
+forEach(
+    Range&& range,
+    F const& f)
+{
+    TaskGroup taskGroup(*this);
+    for(auto&& value : range)
+        taskGroup.async(
+            [&f, &value]
+            {
+                f(value);
+            });
+    taskGroup.wait();
+}
+
+} // mrdox
+} // clang
+
+#endif
diff --git a/include/mrdox/Support/any_callable.hpp b/include/mrdox/Support/any_callable.hpp
new file mode 100644
index 000000000..a5372f15d
--- /dev/null
+++ b/include/mrdox/Support/any_callable.hpp
@@ -0,0 +1,78 @@
+//
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
+//
+// Official repository: https://github.com/cppalliance/mrdox
+//
+
+#ifndef MRDOX_SUPPORT_ANY_CALLABLE_HPP
+#define MRDOX_SUPPORT_ANY_CALLABLE_HPP
+
+#include <mrdox/Platform.hpp>
+#include <memory>
+#include <type_traits>
+#include <utility>
+
+namespace clang {
+namespace mrdox {
+
+/** A movable, type-erased function object.
+
+    Usage:
+    @code
+    any_callable<void(void)> f;
+    @endcode
+*/
+template<class>
+class any_callable;
+
+template<class R, class... Args>
+class any_callable<R(Args...)>
+{
+    struct base
+    {
+        virtual ~base() = default;
+        virtual R invoke(Args&&...args) = 0;
+    };
+
+    std::unique_ptr<base> p_;
+
+public:
+    any_callable() = delete;
+
+    template<class Callable>
+    requires std::is_invocable_r_v<R, Callable, Args...>
+    any_callable(Callable&& f)
+    {
+        class impl : public base
+        {
+            Callable f_;
+
+        public:
+            explicit impl(Callable&& f)
+                : f_(std::forward<Callable>(f))
+            {
+            }
+
+            R invoke(Args&&... args) override
+            {
+                return f_(std::forward<Args>(args)...);
+            }
+        };
+
+        p_ = std::make_unique<impl>(std::forward<Callable>(f));
+    }
+
+    R operator()(Args&&...args) const
+    {
+        return p_->invoke(std::forward<Args>(args)...);
+    }
+};
+
+} // mrdox
+} // clang
+
+#endif
diff --git a/include/mrdox/Support/unlock_guard.hpp b/include/mrdox/Support/unlock_guard.hpp
new file mode 100644
index 000000000..5cbf3cc69
--- /dev/null
+++ b/include/mrdox/Support/unlock_guard.hpp
@@ -0,0 +1,47 @@
+//
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
+//
+// Official repository: https://github.com/cppalliance/mrdox
+//
+
+#ifndef MRDOX_SUPPORT_UNLOCK_GUARD_HPP
+#define MRDOX_SUPPORT_UNLOCK_GUARD_HPP
+
+#include <mrdox/Platform.hpp>
+#include <mutex>
+
+namespace clang {
+namespace mrdox {
+
+/** A scoped guard which unlocks a mutex.
+*/
+class unlock_guard
+{
+    std::mutex& m_;
+
+public:
+    /** Destructor.
+    */
+    ~unlock_guard()
+    {
+        m_.lock();
+    }
+
+    /** Constructor.
+    */
+    explicit
+    unlock_guard(std::mutex& m)
+        : m_(m)
+    {
+        m_.unlock();
+    }
+};
+
+} // mrdox
+} // clang
+
+#endif
diff --git a/source/-adoc/AdocPagesBuilder.hpp b/source/-adoc/AdocPagesBuilder.hpp
index 2b41fad55..944fd909f 100644
--- a/source/-adoc/AdocPagesBuilder.hpp
+++ b/source/-adoc/AdocPagesBuilder.hpp
@@ -15,7 +15,7 @@
 #include <mrdox/Corpus.hpp>
 #include <mrdox/MetadataFwd.hpp>
 #include <mrdox/Support/Error.hpp>
-#include <mrdox/Support/Thread.hpp>
+#include <mrdox/Support/ThreadPool.hpp>
 #include <llvm/ADT/SmallString.h>
 
 namespace clang {
diff --git a/source/-bitcode/BitcodeGenerator.cpp b/source/-bitcode/BitcodeGenerator.cpp
index 2f89030fb..913197b69 100644
--- a/source/-bitcode/BitcodeGenerator.cpp
+++ b/source/-bitcode/BitcodeGenerator.cpp
@@ -14,7 +14,7 @@
 #include "Support/SafeNames.hpp"
 #include "AST/Bitcode.hpp"
 #include <mrdox/Support/Report.hpp>
-#include <mrdox/Support/Thread.hpp>
+#include <mrdox/Support/ThreadPool.hpp>
 #include <mrdox/Metadata.hpp>
 
 namespace clang {
diff --git a/source/Support/Handlebars.cpp b/source/Support/Handlebars.cpp
deleted file mode 100644
index 630805ad0..000000000
--- a/source/Support/Handlebars.cpp
+++ /dev/null
@@ -1,207 +0,0 @@
-//
-// This is a derivative work. originally part of the LLVM Project.
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
-//
-// Official repository: https://github.com/cppalliance/mrdox
-//
-
-#include <mrdox/Support/Handlebars.hpp>
-#include "duktape.h"
-#include <llvm/Support/MemoryBuffer.h>
-
-namespace clang {
-namespace mrdox {
-namespace hbs {
-
-//------------------------------------------------
-
-// The current duk_context
-thread_local static ::duk_context* ctx_ = nullptr;
-
-//------------------------------------------------
-
-struct Context::Impl
-{
-    std::size_t refs;
-    ::duk_context* ctx;
-
-    ~Impl()
-    {
-        ::duk_destroy_heap(ctx_);
-    }
-
-    Impl()
-        : refs(1)
-        , ctx(::duk_create_heap_default())
-    {
-    }
-};
-
-Context::
-~Context()
-{
-    if(--impl_->refs == 0)
-        delete impl_;
-}
-
-Context::
-Context()
-    : impl_(new Impl)
-{
-}
-
-Context::
-Context(
-    Context const& other) noexcept
-    : impl_(other.impl_)
-{
-    ++impl_->refs;
-}
-
-std::error_code
-Context::
-eval(
-    std::string_view js)
-{
-    // VFALCO How do we handle the error if any?
-    duk_eval_lstring_noresult(impl_->ctx, js.data(), js.size());
-    return {};
-}
-
-std::error_code
-Context::
-eval_file(
-    std::string_view path)
-{
-    auto js = llvm::MemoryBuffer::getFile(path);
-    if(! js)
-        return js.getError();
-    return eval(js->get()->getBuffer());
-}
-
-//------------------------------------------------
-
-struct Access
-{
-    static int idx(Array const& arr) noexcept
-    {
-        return arr.idx_;
-    }
-
-    static int idx(Object const& obj) noexcept
-    {
-        return obj.idx_;
-    }
-
-    static ::duk_context* ctx(Context const& ctx) noexcept
-    {
-        return ctx.impl_->ctx;
-    }
-};
-
-//------------------------------------------------
-
-Array::
-~Array()
-{
-    if(idx_ != DUK_INVALID_INDEX)
-    {
-        // remove idx_ from stack?
-    }
-}
-
-Array::
-Array(
-    Context const& ctx)
-    : ctx_(ctx)
-    , idx_(::duk_push_array(Access::ctx(ctx)))
-{
-}
-
-void
-Array::
-append(
-    std::string_view value) const
-{
-}
-
-void
-Array::
-append(
-    Array const& value) const
-{
-}
-
-void
-Array::
-append(
-    Object const& value) const
-{
-}
-
-//------------------------------------------------
-
-Object::
-~Object()
-{
-    if(idx_ != DUK_INVALID_INDEX)
-    {
-        // remove idx_ from stack?
-    }
-}
-
-Object::
-Object(
-    Context const& ctx)
-    : ctx_(ctx)
-    , idx_(::duk_push_object(Access::ctx(ctx)))
-{
-}
-
-void
-Object::
-insert(
-    std::string_view key,
-    std::string_view value) const
-{
-    ::duk_push_lstring(Access::ctx(ctx_), value.data(), value.size());
-    ::duk_put_prop_lstring(Access::ctx(ctx_), idx_, key.data(), key.size());
-}
-
-void
-Object::
-insert(
-    std::string_view key,
-    Array const& value) const
-{
-    ::duk_dup(Access::ctx(ctx_), Access::idx(value));
-    ::duk_put_prop_lstring(Access::ctx(ctx_), idx_, key.data(), key.size());
-}
-
-void
-Object::
-insert(
-    std::string_view key,
-    Object const& value) const
-{
-    ::duk_dup(Access::ctx(ctx_), Access::idx(value));
-    ::duk_put_prop_lstring(Access::ctx(ctx_), idx_, key.data(), key.size());
-}
-
-//------------------------------------------------
-
-Handlebars::
-Handlebars(
-    Context const& ctx) noexcept
-    : ctx_(ctx)
-{
-
-}
-
-} // hbs
-} // mrdox
-} // clang
diff --git a/source/Support/Thread.cpp b/source/Support/Thread.cpp
index 88efdc73d..9da12d082 100644
--- a/source/Support/Thread.cpp
+++ b/source/Support/Thread.cpp
@@ -9,7 +9,7 @@
 //
 
 #include "Support/Debug.hpp"
-#include <mrdox/Support/Thread.hpp>
+#include <mrdox/Support/ThreadPool.hpp>
 #include <llvm/Support/ThreadPool.h>
 #include <utility>
 
diff --git a/source/Tool/ConfigImpl.hpp b/source/Tool/ConfigImpl.hpp
index 5274842c9..fd2f5b2aa 100644
--- a/source/Tool/ConfigImpl.hpp
+++ b/source/Tool/ConfigImpl.hpp
@@ -15,7 +15,7 @@
 #include "Support/YamlFwd.hpp"
 #include <mrdox/Config.hpp>
 #include <mrdox/Support/Expected.hpp>
-#include <mrdox/Support/Thread.hpp>
+#include <mrdox/Support/ThreadPool.hpp>
 #include <llvm/ADT/SmallString.h>
 #include <llvm/Support/ThreadPool.h>
 #include <memory>
diff --git a/source/Tool/TestAction.cpp b/source/Tool/TestAction.cpp
index 757275c1b..97c739f84 100644
--- a/source/Tool/TestAction.cpp
+++ b/source/Tool/TestAction.cpp
@@ -17,7 +17,7 @@
 #include <mrdox/Generators.hpp>
 #include <mrdox/Platform.hpp>
 #include <mrdox/Support/Report.hpp>
-#include <mrdox/Support/Thread.hpp>
+#include <mrdox/Support/ThreadPool.hpp>
 #include <clang/Tooling/StandaloneExecution.h>
 #include <llvm/Support/CommandLine.h>
 #include <llvm/Support/FileSystem.h>

From 5c90ac2f2c1db5359ad3dd97185176d5e668328d Mon Sep 17 00:00:00 2001
From: Vinnie Falco <vinnie.falco@gmail.com>
Date: Sun, 11 Jun 2023 11:07:30 -0700
Subject: [PATCH 4/8] chore: Tidy up command line arguments

---
 source/Tool/GenerateAction.cpp            |  24 ++--
 source/Tool/Options.hpp                   |  47 --------
 source/Tool/TestAction.cpp                |  12 +-
 source/Tool/{Options.cpp => ToolArgs.cpp} | 129 ++++++++++++++--------
 source/Tool/ToolArgs.hpp                  |  69 ++++++++++++
 source/Tool/ToolMain.cpp                  |  18 +--
 6 files changed, 176 insertions(+), 123 deletions(-)
 delete mode 100644 source/Tool/Options.hpp
 rename source/Tool/{Options.cpp => ToolArgs.cpp} (52%)
 create mode 100644 source/Tool/ToolArgs.hpp

diff --git a/source/Tool/GenerateAction.cpp b/source/Tool/GenerateAction.cpp
index 6be6ed2e9..b6a5e95ae 100644
--- a/source/Tool/GenerateAction.cpp
+++ b/source/Tool/GenerateAction.cpp
@@ -9,8 +9,8 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#include "Options.hpp"
-#include "Tool/ConfigImpl.hpp"
+#include "ToolArgs.hpp"
+#include "ConfigImpl.hpp"
 #include "CorpusImpl.hpp"
 #include "AST/AbsoluteCompilationDatabase.hpp"
 #include <mrdox/Generators.hpp>
@@ -32,23 +32,23 @@ DoGenerateAction()
     std::string extraYaml;
     {
         llvm::raw_string_ostream os(extraYaml);
-        if(IgnoreMappingFailures.getValue())
+        if(toolArgs.ignoreMappingFailures.getValue())
             os << "ignore-failures: true\n";
     }
 
     // Load configuration file
-    if(! ConfigPath.hasArgStr())
+    if(! toolArgs.configPath.hasArgStr())
         return Error("the config path argument is missing");
-    auto config = loadConfigFile(ConfigPath, extraYaml);
+    auto config = loadConfigFile(toolArgs.configPath, extraYaml);
     if(! config)
         return config.getError();
 
     // Load the compilation database
-    if(InputPaths.empty())
+    if(toolArgs.inputPaths.empty())
         return Error("the compilation database path argument is missing");
-    if(InputPaths.size() > 1)
-        return Error("got {} input paths where 1 was expected", InputPaths.size());
-    auto compilationsPath = files::normalizePath(InputPaths.front());
+    if(toolArgs.inputPaths.size() > 1)
+        return Error("got {} input paths where 1 was expected", toolArgs.inputPaths.size());
+    auto compilationsPath = files::normalizePath(toolArgs.inputPaths.front());
     std::string errorMessage;
     auto jsonCompilations = tooling::JSONCompilationDatabase::loadFromFile(
         compilationsPath, errorMessage, tooling::JSONCommandLineSyntax::AutoDetect);
@@ -70,9 +70,9 @@ DoGenerateAction()
     auto ex = std::make_unique<tooling::AllTUsToolExecutor>(compilations, ThreadCount);
 
     // Create the generator
-    auto generator = generators.find(FormatType.getValue());
+    auto generator = generators.find(toolArgs.formatType.getValue());
     if(! generator)
-        return Error("the Generator \"{}\" was not found", FormatType.getValue());
+        return Error("the Generator \"{}\" was not found", toolArgs.formatType.getValue());
 
     // Run the tool, this can take a while
     auto corpus = CorpusImpl::build(*ex, *config);
@@ -82,7 +82,7 @@ DoGenerateAction()
     // Run the generator.
     if(config.get()->verboseOutput)
         reportInfo("Generating docs...\n");
-    return generator->build(OutputPath.getValue(), **corpus);
+    return generator->build(toolArgs.outputPath.getValue(), **corpus);
 }
 
 } // mrdox
diff --git a/source/Tool/Options.hpp b/source/Tool/Options.hpp
deleted file mode 100644
index 91b5d9e98..000000000
--- a/source/Tool/Options.hpp
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// Licensed under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
-//
-// Official repository: https://github.com/cppalliance/mrdox
-//
-
-#ifndef MRDOX_TOOL_OPTIONS_HPP
-#define MRDOX_TOOL_OPTIONS_HPP
-
-#include <llvm/Support/CommandLine.h>
-#include <string>
-
-namespace clang {
-namespace mrdox {
-
-enum Action : int
-{
-    test,
-    update,
-    generate
-};
-
-extern char const* Overview;
-extern llvm::cl::OptionCategory     Category;
-extern llvm::cl::extrahelp          ExtraHelp;
-extern llvm::cl::opt<Action>        ToolAction;
-
-// Test options
-extern llvm::cl::opt<bool> badOption;
-
-// Generate options
-extern llvm::cl::opt<std::string> FormatType;
-
-// Common options
-extern llvm::cl::opt<bool>          IgnoreMappingFailures;
-extern llvm::cl::opt<std::string>   ConfigPath;
-extern llvm::cl::opt<std::string>   OutputPath;
-extern llvm::cl::list<std::string>  InputPaths;
-
-} // mrdox
-} // clang
-
-#endif
diff --git a/source/Tool/TestAction.cpp b/source/Tool/TestAction.cpp
index 97c739f84..d1d9144af 100644
--- a/source/Tool/TestAction.cpp
+++ b/source/Tool/TestAction.cpp
@@ -8,9 +8,9 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#include "Options.hpp"
 #include "SingleFileDB.hpp"
-#include "Tool/ConfigImpl.hpp"
+#include "ToolArgs.hpp"
+#include "ConfigImpl.hpp"
 #include "CorpusImpl.hpp"
 #include "Support/Error.hpp"
 #include <mrdox/Config.hpp>
@@ -214,7 +214,7 @@ handleFile(
         return Error::success(); // keep going
     }
 
-    if(ToolAction == Action::test)
+    if(toolArgs.toolAction == Action::test)
     {
         // Open and load XML comparison file
         std::unique_ptr<llvm::MemoryBuffer> expectedXml;
@@ -252,7 +252,7 @@ handleFile(
             results_.numberOfFailures++;
             reportError("Test for \"{}\" failed", filePath);
 
-            if(badOption.getValue())
+            if(toolArgs.badOption.getValue())
             {
                 // Write the .bad.xml file
                 auto bad = outputPath;
@@ -287,7 +287,7 @@ handleFile(
             // success
         }
     }
-    else if(ToolAction == Action::update)
+    else if(toolArgs.toolAction == Action::update)
     {
         // Refresh the expected output file
         if(auto err = writeFile(outputPath, generatedXml))
@@ -402,7 +402,7 @@ DoTestAction()
     llvm::raw_string_ostream(extraYaml) <<
         "concurrency: 1\n";
     Results results;
-    for(auto const& inputPath : InputPaths)
+    for(auto const& inputPath : toolArgs.inputPaths)
     {
         TestRunner instance(results, extraYaml);
         if(auto err = instance.checkPath(inputPath))
diff --git a/source/Tool/Options.cpp b/source/Tool/ToolArgs.cpp
similarity index 52%
rename from source/Tool/Options.cpp
rename to source/Tool/ToolArgs.cpp
index 7ec320677..54c0e4fcc 100644
--- a/source/Tool/Options.cpp
+++ b/source/Tool/ToolArgs.cpp
@@ -8,82 +8,119 @@
 // Official repository: https://github.com/cppalliance/mrdox
 //
 
-#include "Options.hpp"
+#include "ToolArgs.hpp"
+#include <cstddef>
+#include <vector>
 
 namespace clang {
 namespace mrdox {
 
-char const* Overview =
-R"(Generate reference documentation, run tests against
-a set of input vectors, or update a set of reference tests.)";
-
-llvm::cl::OptionCategory Category("mrdox options");
-
-llvm::cl::extrahelp ExtraHelp(
-R"(Usage:
-
+//------------------------------------------------
+
+ToolArgs::
+ToolArgs()
+    : genCat("Generation Options")
+    , testCat("Test Options")
+    , usageText(
+R"( Generate C++ reference documentation
+)")
+    , extraHelp(
+R"(
+USAGE:
     mrdox .. ( compile-commands )
-
     mrdox .. --action ( "test" | "update" ) ( dir | file )...
 
-Examples
-
+EXAMPLES:
     mrdox --action test friend.cpp
-
     mrdox --format adoc compile_commands.json
-)");
+)")
+
+//
+// Common options
+//
 
-llvm::cl::opt<Action> ToolAction(
+, toolAction(
     "action",
     llvm::cl::desc(R"(Which action should be performed)"),
     llvm::cl::init(Action::generate),
     llvm::cl::values(
         clEnumVal(test, "Compare output against expected"),
         clEnumVal(update, "Update all expected xml files"),
-        clEnumVal(generate, "Generate reference documentation")),
-    llvm::cl::cat(Category));
+        clEnumVal(generate, "Generate reference documentation")))
 
-// Test options
+, configPath(
+    "config",
+    llvm::cl::desc(R"(The config filename relative to the repository root)"))
 
-llvm::cl::opt<bool> badOption(
-    "bad",
-    llvm::cl::desc("Write a .bad.xml file for each test failure"),
-    llvm::cl::init(true),
-    llvm::cl::cat(Category));
+, outputPath(
+    "output",
+    llvm::cl::desc("Directory or file for generating output."),
+    llvm::cl::init("."))
+
+, inputPaths(
+    "inputs",
+    llvm::cl::Sink,
+    llvm::cl::desc("The path to the compilation database, or one or more .cpp files to test."))
 
+//
 // Generate options
+//
 
-llvm::cl::opt<std::string> FormatType(
+, formatType(
     "format",
     llvm::cl::desc("Format for outputted docs (\"adoc\" or \"xml\")."),
     llvm::cl::init("adoc"),
-    llvm::cl::cat(Category));
+    llvm::cl::cat(genCat))
 
-// Common options
-
-llvm::cl::opt<bool> IgnoreMappingFailures(
+, ignoreMappingFailures(
     "ignore-map-errors",
     llvm::cl::desc("Continue if files are not mapped correctly."),
     llvm::cl::init(true),
-    llvm::cl::cat(Category));
-
-llvm::cl::opt<std::string> ConfigPath(
-    "config",
-    llvm::cl::desc(R"(The config filename relative to the repository root)"),
-    llvm::cl::init("mrdox.yml"),
-    llvm::cl::cat(Category));
+    llvm::cl::cat(genCat))
 
-llvm::cl::opt<std::string> OutputPath(
-    "output",
-    llvm::cl::desc("Directory or file for generating output."),
-    llvm::cl::init("."),
-    llvm::cl::cat(Category));
+//
+// Test options
+//
 
-llvm::cl::list<std::string> InputPaths(
-    "inputs",
-    llvm::cl::Sink,
-    llvm::cl::desc("The path to the compilation database, or one or more .cpp files to test."),
-    llvm::cl::cat(Category));
+, badOption(
+    "bad",
+    llvm::cl::desc("Write a .bad.xml file for each test failure"),
+    llvm::cl::init(true),
+    llvm::cl::cat(testCat))
+{
+}
+
+ToolArgs ToolArgs::instance_;
+
+void
+ToolArgs::
+hideForeignOptions()
+{
+    // VFALCO When adding an option, it must
+    // also be added to this list or else it
+    // will stay hidden.
+
+    std::vector<llvm::cl::Option const*> ours({
+        &toolAction,
+        &formatType,
+        &configPath,
+        &outputPath,
+        std::addressof(inputPaths),
+        &ignoreMappingFailures,
+        &badOption
+    });
+
+    // Really hide the clang/llvm default
+    // options which we didn't ask for.
+    auto optionMap = llvm::cl::getRegisteredOptions();
+    for(auto& opt : optionMap)
+    {
+        if(std::find(ours.begin(), ours.end(), opt.getValue()) != ours.end())
+            opt.getValue()->setHiddenFlag(llvm::cl::NotHidden);
+        else
+            opt.getValue()->setHiddenFlag(llvm::cl::ReallyHidden);
+    }
+}
 
 } // mrdox
 } // clang
diff --git a/source/Tool/ToolArgs.hpp b/source/Tool/ToolArgs.hpp
new file mode 100644
index 000000000..b3ac7b8f5
--- /dev/null
+++ b/source/Tool/ToolArgs.hpp
@@ -0,0 +1,69 @@
+//
+// Licensed under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+// Copyright (c) 2023 Vinnie Falco (vinnie.falco@gmail.com)
+//
+// Official repository: https://github.com/cppalliance/mrdox
+//
+
+#ifndef MRDOX_TOOL_TOOLARGS_HPP
+#define MRDOX_TOOL_TOOLARGS_HPP
+
+#include <llvm/Support/CommandLine.h>
+#include <string>
+
+namespace clang {
+namespace mrdox {
+
+enum Action : int
+{
+    test,
+    update,
+    generate
+};
+
+/** Command line options and tool settings.
+*/
+class ToolArgs
+{
+    ToolArgs();
+
+    llvm::cl::OptionCategory    genCat;
+    llvm::cl::OptionCategory    testCat;
+
+public:
+    static ToolArgs instance_;
+
+    char const*                 usageText;
+    llvm::cl::extrahelp         extraHelp;
+
+    // Common options
+    llvm::cl::opt<Action>       toolAction;
+    llvm::cl::opt<std::string>  configPath;
+    llvm::cl::opt<std::string>  outputPath;
+    llvm::cl::list<std::string> inputPaths;
+
+    // Generate options
+    llvm::cl::opt<std::string>  formatType;
+    llvm::cl::opt<bool>         ignoreMappingFailures;
+
+    // Test options
+    llvm::cl::opt<bool>         badOption;
+
+    // Hide all options which don't belong to us
+    void hideForeignOptions();
+};
+
+/** Command line arguments passed to the tool.
+
+    This is a global variable because of how the
+    LLVM command line interface is designed.
+*/
+constexpr ToolArgs& toolArgs = ToolArgs::instance_;
+
+} // mrdox
+} // clang
+
+#endif
diff --git a/source/Tool/ToolMain.cpp b/source/Tool/ToolMain.cpp
index 691fa5960..ab2af8e58 100644
--- a/source/Tool/ToolMain.cpp
+++ b/source/Tool/ToolMain.cpp
@@ -32,7 +32,7 @@
 
 //------------------------------------------------
 
-#include "Options.hpp"
+#include "ToolArgs.hpp"
 #include "Support/Debug.hpp"
 #include <mrdox/Support/Report.hpp>
 #include <mrdox/Version.hpp>
@@ -69,19 +69,13 @@ int main(int argc, char const** argv)
     llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
     llvm::cl::SetVersionPrinter(&print_version);
 
-    {
-        std::string errorString;
-        llvm::raw_string_ostream os(errorString);
-        if(! llvm::cl::ParseCommandLineOptions(
-            argc, argv, Overview, &os, nullptr))
-        {
-            llvm::errs() << errorString;
-            return EXIT_FAILURE;
-        }
-    }
+    toolArgs.hideForeignOptions();
+    if(! llvm::cl::ParseCommandLineOptions(
+            argc, argv, toolArgs.usageText))
+        return EXIT_FAILURE;
 
     // Generate
-    if(clang::mrdox::ToolAction == Action::generate)
+    if(clang::mrdox::toolArgs.toolAction == Action::generate)
     {
         auto err = DoGenerateAction();
         if(! err)

From 9582ac1adc545e34f44f56282e79e963770a6bca Mon Sep 17 00:00:00 2001
From: Vinnie Falco <vinnie.falco@gmail.com>
Date: Sun, 11 Jun 2023 14:58:56 -0700
Subject: [PATCH 5/8] feat: addons directory

---
 addons/generator/README.adoc                  |    3 +
 addons/generator/asciidoc/README.adoc         |    4 +
 .../asciidoc/layouts/default.adoc.hbs         |    4 +
 .../asciidoc/partials/class.adoc.hbs          |    4 +
 addons/js/README.adoc                         |    4 +
 addons/js/handlebars.js                       | 5210 +++++++++++++++++
 addons/js/helpers/README.adoc                 |    3 +
 addons/js/helpers/and.js                      |    9 +
 addons/js/helpers/detag.js                    |    5 +
 addons/js/helpers/eq.js                       |    3 +
 addons/js/helpers/increment.js                |    3 +
 addons/js/helpers/ne.js                       |    3 +
 addons/js/helpers/not.js                      |    3 +
 addons/js/helpers/or.js                       |    9 +
 addons/js/helpers/relativize.js               |   24 +
 addons/js/helpers/year.js                     |    3 +
 addons/plugins/README.adoc                    |    4 +
 include/mrdox/Config.hpp                      |    7 +
 include/mrdox/Support/Path.hpp                |   14 +
 source/Support/Path.cpp                       |   23 +
 source/Tool/ConfigImpl.cpp                    |   19 +-
 source/Tool/ConfigImpl.hpp                    |   36 +-
 source/Tool/GenerateAction.cpp                |    5 +-
 source/Tool/TestAction.cpp                    |    2 +-
 source/Tool/ToolArgs.cpp                      |   50 +-
 source/Tool/ToolArgs.hpp                      |    4 +-
 source/Tool/ToolMain.cpp                      |   87 +-
 27 files changed, 5501 insertions(+), 44 deletions(-)
 create mode 100644 addons/generator/README.adoc
 create mode 100644 addons/generator/asciidoc/README.adoc
 create mode 100644 addons/generator/asciidoc/layouts/default.adoc.hbs
 create mode 100644 addons/generator/asciidoc/partials/class.adoc.hbs
 create mode 100644 addons/js/README.adoc
 create mode 100644 addons/js/handlebars.js
 create mode 100644 addons/js/helpers/README.adoc
 create mode 100644 addons/js/helpers/and.js
 create mode 100644 addons/js/helpers/detag.js
 create mode 100644 addons/js/helpers/eq.js
 create mode 100644 addons/js/helpers/increment.js
 create mode 100644 addons/js/helpers/ne.js
 create mode 100644 addons/js/helpers/not.js
 create mode 100644 addons/js/helpers/or.js
 create mode 100644 addons/js/helpers/relativize.js
 create mode 100644 addons/js/helpers/year.js
 create mode 100644 addons/plugins/README.adoc

diff --git a/addons/generator/README.adoc b/addons/generator/README.adoc
new file mode 100644
index 000000000..03ed7184a
--- /dev/null
+++ b/addons/generator/README.adoc
@@ -0,0 +1,3 @@
+= Addons/Generator
+
+Each installed generator has a corresponding directory here.
diff --git a/addons/generator/asciidoc/README.adoc b/addons/generator/asciidoc/README.adoc
new file mode 100644
index 000000000..8f0a8f391
--- /dev/null
+++ b/addons/generator/asciidoc/README.adoc
@@ -0,0 +1,4 @@
+= Addons/Generator/Asciidoc
+
+These files are used by the Asciidoc generator.
+
diff --git a/addons/generator/asciidoc/layouts/default.adoc.hbs b/addons/generator/asciidoc/layouts/default.adoc.hbs
new file mode 100644
index 000000000..51adbf2b1
--- /dev/null
+++ b/addons/generator/asciidoc/layouts/default.adoc.hbs
@@ -0,0 +1,4 @@
+= Reference
+:role: mrdox
+
+This is a handlebars template
diff --git a/addons/generator/asciidoc/partials/class.adoc.hbs b/addons/generator/asciidoc/partials/class.adoc.hbs
new file mode 100644
index 000000000..51adbf2b1
--- /dev/null
+++ b/addons/generator/asciidoc/partials/class.adoc.hbs
@@ -0,0 +1,4 @@
+= Reference
+:role: mrdox
+
+This is a handlebars template
diff --git a/addons/js/README.adoc b/addons/js/README.adoc
new file mode 100644
index 000000000..3d28efc33
--- /dev/null
+++ b/addons/js/README.adoc
@@ -0,0 +1,4 @@
+= Addons/JS
+
+This directory holds shared JavaScript scripts and
+subdirectories.
diff --git a/addons/js/handlebars.js b/addons/js/handlebars.js
new file mode 100644
index 000000000..baad5d3d9
--- /dev/null
+++ b/addons/js/handlebars.js
@@ -0,0 +1,5210 @@
+/**!
+
+ @license
+ handlebars v4.7.7
+
+Copyright (C) 2011-2019 by Yehuda Katz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+*/
+(function webpackUniversalModuleDefinition(root, factory) {
+	if(typeof exports === 'object' && typeof module === 'object')
+		module.exports = factory();
+	else if(typeof define === 'function' && define.amd)
+		define([], factory);
+	else if(typeof exports === 'object')
+		exports["Handlebars"] = factory();
+	else
+		root["Handlebars"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ 	// The module cache
+/******/ 	var installedModules = {};
+
+/******/ 	// The require function
+/******/ 	function __webpack_require__(moduleId) {
+
+/******/ 		// Check if module is in cache
+/******/ 		if(installedModules[moduleId])
+/******/ 			return installedModules[moduleId].exports;
+
+/******/ 		// Create a new module (and put it into the cache)
+/******/ 		var module = installedModules[moduleId] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = true;
+
+/******/ 		// Return the exports of the module
+/******/ 		return module.exports;
+/******/ 	}
+
+
+/******/ 	// expose the modules object (__webpack_modules__)
+/******/ 	__webpack_require__.m = modules;
+
+/******/ 	// expose the module cache
+/******/ 	__webpack_require__.c = installedModules;
+
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _handlebarsRuntime = __webpack_require__(2);
+
+	var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
+
+	// Compiler imports
+
+	var _handlebarsCompilerAst = __webpack_require__(45);
+
+	var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
+
+	var _handlebarsCompilerBase = __webpack_require__(46);
+
+	var _handlebarsCompilerCompiler = __webpack_require__(51);
+
+	var _handlebarsCompilerJavascriptCompiler = __webpack_require__(52);
+
+	var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
+
+	var _handlebarsCompilerVisitor = __webpack_require__(49);
+
+	var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
+
+	var _handlebarsNoConflict = __webpack_require__(44);
+
+	var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
+
+	var _create = _handlebarsRuntime2['default'].create;
+	function create() {
+	  var hb = _create();
+
+	  hb.compile = function (input, options) {
+	    return _handlebarsCompilerCompiler.compile(input, options, hb);
+	  };
+	  hb.precompile = function (input, options) {
+	    return _handlebarsCompilerCompiler.precompile(input, options, hb);
+	  };
+
+	  hb.AST = _handlebarsCompilerAst2['default'];
+	  hb.Compiler = _handlebarsCompilerCompiler.Compiler;
+	  hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];
+	  hb.Parser = _handlebarsCompilerBase.parser;
+	  hb.parse = _handlebarsCompilerBase.parse;
+	  hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
+
+	  return hb;
+	}
+
+	var inst = create();
+	inst.create = create;
+
+	_handlebarsNoConflict2['default'](inst);
+
+	inst.Visitor = _handlebarsCompilerVisitor2['default'];
+
+	inst['default'] = inst;
+
+	exports['default'] = inst;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+	"use strict";
+
+	exports["default"] = function (obj) {
+	  return obj && obj.__esModule ? obj : {
+	    "default": obj
+	  };
+	};
+
+	exports.__esModule = true;
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireWildcard = __webpack_require__(3)['default'];
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _handlebarsBase = __webpack_require__(4);
+
+	var base = _interopRequireWildcard(_handlebarsBase);
+
+	// Each of these augment the Handlebars object. No need to setup here.
+	// (This is done to easily share code between commonjs and browse envs)
+
+	var _handlebarsSafeString = __webpack_require__(37);
+
+	var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
+
+	var _handlebarsException = __webpack_require__(6);
+
+	var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
+
+	var _handlebarsUtils = __webpack_require__(5);
+
+	var Utils = _interopRequireWildcard(_handlebarsUtils);
+
+	var _handlebarsRuntime = __webpack_require__(38);
+
+	var runtime = _interopRequireWildcard(_handlebarsRuntime);
+
+	var _handlebarsNoConflict = __webpack_require__(44);
+
+	var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
+
+	// For compatibility and usage outside of module systems, make the Handlebars object a namespace
+	function create() {
+	  var hb = new base.HandlebarsEnvironment();
+
+	  Utils.extend(hb, base);
+	  hb.SafeString = _handlebarsSafeString2['default'];
+	  hb.Exception = _handlebarsException2['default'];
+	  hb.Utils = Utils;
+	  hb.escapeExpression = Utils.escapeExpression;
+
+	  hb.VM = runtime;
+	  hb.template = function (spec) {
+	    return runtime.template(spec, hb);
+	  };
+
+	  return hb;
+	}
+
+	var inst = create();
+	inst.create = create;
+
+	_handlebarsNoConflict2['default'](inst);
+
+	inst['default'] = inst;
+
+	exports['default'] = inst;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+	"use strict";
+
+	exports["default"] = function (obj) {
+	  if (obj && obj.__esModule) {
+	    return obj;
+	  } else {
+	    var newObj = {};
+
+	    if (obj != null) {
+	      for (var key in obj) {
+	        if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
+	      }
+	    }
+
+	    newObj["default"] = obj;
+	    return newObj;
+	  }
+	};
+
+	exports.__esModule = true;
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+	exports.HandlebarsEnvironment = HandlebarsEnvironment;
+
+	var _utils = __webpack_require__(5);
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	var _helpers = __webpack_require__(10);
+
+	var _decorators = __webpack_require__(30);
+
+	var _logger = __webpack_require__(32);
+
+	var _logger2 = _interopRequireDefault(_logger);
+
+	var _internalProtoAccess = __webpack_require__(33);
+
+	var VERSION = '4.7.7';
+	exports.VERSION = VERSION;
+	var COMPILER_REVISION = 8;
+	exports.COMPILER_REVISION = COMPILER_REVISION;
+	var LAST_COMPATIBLE_COMPILER_REVISION = 7;
+
+	exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
+	var REVISION_CHANGES = {
+	  1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
+	  2: '== 1.0.0-rc.3',
+	  3: '== 1.0.0-rc.4',
+	  4: '== 1.x.x',
+	  5: '== 2.0.0-alpha.x',
+	  6: '>= 2.0.0-beta.1',
+	  7: '>= 4.0.0 <4.3.0',
+	  8: '>= 4.3.0'
+	};
+
+	exports.REVISION_CHANGES = REVISION_CHANGES;
+	var objectType = '[object Object]';
+
+	function HandlebarsEnvironment(helpers, partials, decorators) {
+	  this.helpers = helpers || {};
+	  this.partials = partials || {};
+	  this.decorators = decorators || {};
+
+	  _helpers.registerDefaultHelpers(this);
+	  _decorators.registerDefaultDecorators(this);
+	}
+
+	HandlebarsEnvironment.prototype = {
+	  constructor: HandlebarsEnvironment,
+
+	  logger: _logger2['default'],
+	  log: _logger2['default'].log,
+
+	  registerHelper: function registerHelper(name, fn) {
+	    if (_utils.toString.call(name) === objectType) {
+	      if (fn) {
+	        throw new _exception2['default']('Arg not supported with multiple helpers');
+	      }
+	      _utils.extend(this.helpers, name);
+	    } else {
+	      this.helpers[name] = fn;
+	    }
+	  },
+	  unregisterHelper: function unregisterHelper(name) {
+	    delete this.helpers[name];
+	  },
+
+	  registerPartial: function registerPartial(name, partial) {
+	    if (_utils.toString.call(name) === objectType) {
+	      _utils.extend(this.partials, name);
+	    } else {
+	      if (typeof partial === 'undefined') {
+	        throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined');
+	      }
+	      this.partials[name] = partial;
+	    }
+	  },
+	  unregisterPartial: function unregisterPartial(name) {
+	    delete this.partials[name];
+	  },
+
+	  registerDecorator: function registerDecorator(name, fn) {
+	    if (_utils.toString.call(name) === objectType) {
+	      if (fn) {
+	        throw new _exception2['default']('Arg not supported with multiple decorators');
+	      }
+	      _utils.extend(this.decorators, name);
+	    } else {
+	      this.decorators[name] = fn;
+	    }
+	  },
+	  unregisterDecorator: function unregisterDecorator(name) {
+	    delete this.decorators[name];
+	  },
+	  /**
+	   * Reset the memory of illegal property accesses that have already been logged.
+	   * @deprecated should only be used in handlebars test-cases
+	   */
+	  resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
+	    _internalProtoAccess.resetLoggedProperties();
+	  }
+	};
+
+	var log = _logger2['default'].log;
+
+	exports.log = log;
+	exports.createFrame = _utils.createFrame;
+	exports.logger = _logger2['default'];
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports) {
+
+	'use strict';
+
+	exports.__esModule = true;
+	exports.extend = extend;
+	exports.indexOf = indexOf;
+	exports.escapeExpression = escapeExpression;
+	exports.isEmpty = isEmpty;
+	exports.createFrame = createFrame;
+	exports.blockParams = blockParams;
+	exports.appendContextPath = appendContextPath;
+	var escape = {
+	  '&': '&amp;',
+	  '<': '&lt;',
+	  '>': '&gt;',
+	  '"': '&quot;',
+	  "'": '&#x27;',
+	  '`': '&#x60;',
+	  '=': '&#x3D;'
+	};
+
+	var badChars = /[&<>"'`=]/g,
+	    possible = /[&<>"'`=]/;
+
+	function escapeChar(chr) {
+	  return escape[chr];
+	}
+
+	function extend(obj /* , ...source */) {
+	  for (var i = 1; i < arguments.length; i++) {
+	    for (var key in arguments[i]) {
+	      if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
+	        obj[key] = arguments[i][key];
+	      }
+	    }
+	  }
+
+	  return obj;
+	}
+
+	var toString = Object.prototype.toString;
+
+	exports.toString = toString;
+	// Sourced from lodash
+	// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
+	/* eslint-disable func-style */
+	var isFunction = function isFunction(value) {
+	  return typeof value === 'function';
+	};
+	// fallback for older versions of Chrome and Safari
+	/* istanbul ignore next */
+	if (isFunction(/x/)) {
+	  exports.isFunction = isFunction = function (value) {
+	    return typeof value === 'function' && toString.call(value) === '[object Function]';
+	  };
+	}
+	exports.isFunction = isFunction;
+
+	/* eslint-enable func-style */
+
+	/* istanbul ignore next */
+	var isArray = Array.isArray || function (value) {
+	  return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
+	};
+
+	exports.isArray = isArray;
+	// Older IE versions do not directly support indexOf so we must implement our own, sadly.
+
+	function indexOf(array, value) {
+	  for (var i = 0, len = array.length; i < len; i++) {
+	    if (array[i] === value) {
+	      return i;
+	    }
+	  }
+	  return -1;
+	}
+
+	function escapeExpression(string) {
+	  if (typeof string !== 'string') {
+	    // don't escape SafeStrings, since they're already safe
+	    if (string && string.toHTML) {
+	      return string.toHTML();
+	    } else if (string == null) {
+	      return '';
+	    } else if (!string) {
+	      return string + '';
+	    }
+
+	    // Force a string conversion as this will be done by the append regardless and
+	    // the regex test will do this transparently behind the scenes, causing issues if
+	    // an object's to string has escaped characters in it.
+	    string = '' + string;
+	  }
+
+	  if (!possible.test(string)) {
+	    return string;
+	  }
+	  return string.replace(badChars, escapeChar);
+	}
+
+	function isEmpty(value) {
+	  if (!value && value !== 0) {
+	    return true;
+	  } else if (isArray(value) && value.length === 0) {
+	    return true;
+	  } else {
+	    return false;
+	  }
+	}
+
+	function createFrame(object) {
+	  var frame = extend({}, object);
+	  frame._parent = object;
+	  return frame;
+	}
+
+	function blockParams(params, ids) {
+	  params.path = ids;
+	  return params;
+	}
+
+	function appendContextPath(contextPath, id) {
+	  return (contextPath ? contextPath + '.' : '') + id;
+	}
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _Object$defineProperty = __webpack_require__(7)['default'];
+
+	exports.__esModule = true;
+	var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack'];
+
+	function Exception(message, node) {
+	  var loc = node && node.loc,
+	      line = undefined,
+	      endLineNumber = undefined,
+	      column = undefined,
+	      endColumn = undefined;
+
+	  if (loc) {
+	    line = loc.start.line;
+	    endLineNumber = loc.end.line;
+	    column = loc.start.column;
+	    endColumn = loc.end.column;
+
+	    message += ' - ' + line + ':' + column;
+	  }
+
+	  var tmp = Error.prototype.constructor.call(this, message);
+
+	  // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
+	  for (var idx = 0; idx < errorProps.length; idx++) {
+	    this[errorProps[idx]] = tmp[errorProps[idx]];
+	  }
+
+	  /* istanbul ignore else */
+	  if (Error.captureStackTrace) {
+	    Error.captureStackTrace(this, Exception);
+	  }
+
+	  try {
+	    if (loc) {
+	      this.lineNumber = line;
+	      this.endLineNumber = endLineNumber;
+
+	      // Work around issue under safari where we can't directly set the column value
+	      /* istanbul ignore next */
+	      if (_Object$defineProperty) {
+	        Object.defineProperty(this, 'column', {
+	          value: column,
+	          enumerable: true
+	        });
+	        Object.defineProperty(this, 'endColumn', {
+	          value: endColumn,
+	          enumerable: true
+	        });
+	      } else {
+	        this.column = column;
+	        this.endColumn = endColumn;
+	      }
+	    }
+	  } catch (nop) {
+	    /* Ignore if the browser is very particular */
+	  }
+	}
+
+	Exception.prototype = new Error();
+
+	exports['default'] = Exception;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	module.exports = { "default": __webpack_require__(8), __esModule: true };
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	var $ = __webpack_require__(9);
+	module.exports = function defineProperty(it, key, desc){
+	  return $.setDesc(it, key, desc);
+	};
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+	var $Object = Object;
+	module.exports = {
+	  create:     $Object.create,
+	  getProto:   $Object.getPrototypeOf,
+	  isEnum:     {}.propertyIsEnumerable,
+	  getDesc:    $Object.getOwnPropertyDescriptor,
+	  setDesc:    $Object.defineProperty,
+	  setDescs:   $Object.defineProperties,
+	  getKeys:    $Object.keys,
+	  getNames:   $Object.getOwnPropertyNames,
+	  getSymbols: $Object.getOwnPropertySymbols,
+	  each:       [].forEach
+	};
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+	exports.registerDefaultHelpers = registerDefaultHelpers;
+	exports.moveHelperToHooks = moveHelperToHooks;
+
+	var _helpersBlockHelperMissing = __webpack_require__(11);
+
+	var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
+
+	var _helpersEach = __webpack_require__(12);
+
+	var _helpersEach2 = _interopRequireDefault(_helpersEach);
+
+	var _helpersHelperMissing = __webpack_require__(25);
+
+	var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
+
+	var _helpersIf = __webpack_require__(26);
+
+	var _helpersIf2 = _interopRequireDefault(_helpersIf);
+
+	var _helpersLog = __webpack_require__(27);
+
+	var _helpersLog2 = _interopRequireDefault(_helpersLog);
+
+	var _helpersLookup = __webpack_require__(28);
+
+	var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
+
+	var _helpersWith = __webpack_require__(29);
+
+	var _helpersWith2 = _interopRequireDefault(_helpersWith);
+
+	function registerDefaultHelpers(instance) {
+	  _helpersBlockHelperMissing2['default'](instance);
+	  _helpersEach2['default'](instance);
+	  _helpersHelperMissing2['default'](instance);
+	  _helpersIf2['default'](instance);
+	  _helpersLog2['default'](instance);
+	  _helpersLookup2['default'](instance);
+	  _helpersWith2['default'](instance);
+	}
+
+	function moveHelperToHooks(instance, helperName, keepHelper) {
+	  if (instance.helpers[helperName]) {
+	    instance.hooks[helperName] = instance.helpers[helperName];
+	    if (!keepHelper) {
+	      delete instance.helpers[helperName];
+	    }
+	  }
+	}
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	exports.__esModule = true;
+
+	var _utils = __webpack_require__(5);
+
+	exports['default'] = function (instance) {
+	  instance.registerHelper('blockHelperMissing', function (context, options) {
+	    var inverse = options.inverse,
+	        fn = options.fn;
+
+	    if (context === true) {
+	      return fn(this);
+	    } else if (context === false || context == null) {
+	      return inverse(this);
+	    } else if (_utils.isArray(context)) {
+	      if (context.length > 0) {
+	        if (options.ids) {
+	          options.ids = [options.name];
+	        }
+
+	        return instance.helpers.each(context, options);
+	      } else {
+	        return inverse(this);
+	      }
+	    } else {
+	      if (options.data && options.ids) {
+	        var data = _utils.createFrame(options.data);
+	        data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
+	        options = { data: data };
+	      }
+
+	      return fn(context, options);
+	    }
+	  });
+	};
+
+	module.exports = exports['default'];
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	/* WEBPACK VAR INJECTION */(function(global) {'use strict';
+
+	var _Object$keys = __webpack_require__(13)['default'];
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _utils = __webpack_require__(5);
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	exports['default'] = function (instance) {
+	  instance.registerHelper('each', function (context, options) {
+	    if (!options) {
+	      throw new _exception2['default']('Must pass iterator to #each');
+	    }
+
+	    var fn = options.fn,
+	        inverse = options.inverse,
+	        i = 0,
+	        ret = '',
+	        data = undefined,
+	        contextPath = undefined;
+
+	    if (options.data && options.ids) {
+	      contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
+	    }
+
+	    if (_utils.isFunction(context)) {
+	      context = context.call(this);
+	    }
+
+	    if (options.data) {
+	      data = _utils.createFrame(options.data);
+	    }
+
+	    function execIteration(field, index, last) {
+	      if (data) {
+	        data.key = field;
+	        data.index = index;
+	        data.first = index === 0;
+	        data.last = !!last;
+
+	        if (contextPath) {
+	          data.contextPath = contextPath + field;
+	        }
+	      }
+
+	      ret = ret + fn(context[field], {
+	        data: data,
+	        blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
+	      });
+	    }
+
+	    if (context && typeof context === 'object') {
+	      if (_utils.isArray(context)) {
+	        for (var j = context.length; i < j; i++) {
+	          if (i in context) {
+	            execIteration(i, i, i === context.length - 1);
+	          }
+	        }
+	      } else if (global.Symbol && context[global.Symbol.iterator]) {
+	        var newContext = [];
+	        var iterator = context[global.Symbol.iterator]();
+	        for (var it = iterator.next(); !it.done; it = iterator.next()) {
+	          newContext.push(it.value);
+	        }
+	        context = newContext;
+	        for (var j = context.length; i < j; i++) {
+	          execIteration(i, i, i === context.length - 1);
+	        }
+	      } else {
+	        (function () {
+	          var priorKey = undefined;
+
+	          _Object$keys(context).forEach(function (key) {
+	            // We're running the iterations one step out of sync so we can detect
+	            // the last iteration without have to scan the object twice and create
+	            // an itermediate keys array.
+	            if (priorKey !== undefined) {
+	              execIteration(priorKey, i - 1);
+	            }
+	            priorKey = key;
+	            i++;
+	          });
+	          if (priorKey !== undefined) {
+	            execIteration(priorKey, i - 1, true);
+	          }
+	        })();
+	      }
+	    }
+
+	    if (i === 0) {
+	      ret = inverse(this);
+	    }
+
+	    return ret;
+	  });
+	};
+
+	module.exports = exports['default'];
+	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ }),
+/* 13 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	module.exports = { "default": __webpack_require__(14), __esModule: true };
+
+/***/ }),
+/* 14 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	__webpack_require__(15);
+	module.exports = __webpack_require__(21).Object.keys;
+
+/***/ }),
+/* 15 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	// 19.1.2.14 Object.keys(O)
+	var toObject = __webpack_require__(16);
+
+	__webpack_require__(18)('keys', function($keys){
+	  return function keys(it){
+	    return $keys(toObject(it));
+	  };
+	});
+
+/***/ }),
+/* 16 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	// 7.1.13 ToObject(argument)
+	var defined = __webpack_require__(17);
+	module.exports = function(it){
+	  return Object(defined(it));
+	};
+
+/***/ }),
+/* 17 */
+/***/ (function(module, exports) {
+
+	// 7.2.1 RequireObjectCoercible(argument)
+	module.exports = function(it){
+	  if(it == undefined)throw TypeError("Can't call method on  " + it);
+	  return it;
+	};
+
+/***/ }),
+/* 18 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	// most Object methods by ES6 should accept primitives
+	var $export = __webpack_require__(19)
+	  , core    = __webpack_require__(21)
+	  , fails   = __webpack_require__(24);
+	module.exports = function(KEY, exec){
+	  var fn  = (core.Object || {})[KEY] || Object[KEY]
+	    , exp = {};
+	  exp[KEY] = exec(fn);
+	  $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
+	};
+
+/***/ }),
+/* 19 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	var global    = __webpack_require__(20)
+	  , core      = __webpack_require__(21)
+	  , ctx       = __webpack_require__(22)
+	  , PROTOTYPE = 'prototype';
+
+	var $export = function(type, name, source){
+	  var IS_FORCED = type & $export.F
+	    , IS_GLOBAL = type & $export.G
+	    , IS_STATIC = type & $export.S
+	    , IS_PROTO  = type & $export.P
+	    , IS_BIND   = type & $export.B
+	    , IS_WRAP   = type & $export.W
+	    , exports   = IS_GLOBAL ? core : core[name] || (core[name] = {})
+	    , target    = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
+	    , key, own, out;
+	  if(IS_GLOBAL)source = name;
+	  for(key in source){
+	    // contains in native
+	    own = !IS_FORCED && target && key in target;
+	    if(own && key in exports)continue;
+	    // export native or passed
+	    out = own ? target[key] : source[key];
+	    // prevent global pollution for namespaces
+	    exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+	    // bind timers to global for call from export context
+	    : IS_BIND && own ? ctx(out, global)
+	    // wrap global constructors for prevent change them in library
+	    : IS_WRAP && target[key] == out ? (function(C){
+	      var F = function(param){
+	        return this instanceof C ? new C(param) : C(param);
+	      };
+	      F[PROTOTYPE] = C[PROTOTYPE];
+	      return F;
+	    // make static versions for prototype methods
+	    })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+	    if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
+	  }
+	};
+	// type bitmap
+	$export.F = 1;  // forced
+	$export.G = 2;  // global
+	$export.S = 4;  // static
+	$export.P = 8;  // proto
+	$export.B = 16; // bind
+	$export.W = 32; // wrap
+	module.exports = $export;
+
+/***/ }),
+/* 20 */
+/***/ (function(module, exports) {
+
+	// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+	var global = module.exports = typeof window != 'undefined' && window.Math == Math
+	  ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
+	if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
+
+/***/ }),
+/* 21 */
+/***/ (function(module, exports) {
+
+	var core = module.exports = {version: '1.2.6'};
+	if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
+
+/***/ }),
+/* 22 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	// optional / simple context binding
+	var aFunction = __webpack_require__(23);
+	module.exports = function(fn, that, length){
+	  aFunction(fn);
+	  if(that === undefined)return fn;
+	  switch(length){
+	    case 1: return function(a){
+	      return fn.call(that, a);
+	    };
+	    case 2: return function(a, b){
+	      return fn.call(that, a, b);
+	    };
+	    case 3: return function(a, b, c){
+	      return fn.call(that, a, b, c);
+	    };
+	  }
+	  return function(/* ...args */){
+	    return fn.apply(that, arguments);
+	  };
+	};
+
+/***/ }),
+/* 23 */
+/***/ (function(module, exports) {
+
+	module.exports = function(it){
+	  if(typeof it != 'function')throw TypeError(it + ' is not a function!');
+	  return it;
+	};
+
+/***/ }),
+/* 24 */
+/***/ (function(module, exports) {
+
+	module.exports = function(exec){
+	  try {
+	    return !!exec();
+	  } catch(e){
+	    return true;
+	  }
+	};
+
+/***/ }),
+/* 25 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	exports['default'] = function (instance) {
+	  instance.registerHelper('helperMissing', function () /* [args, ]options */{
+	    if (arguments.length === 1) {
+	      // A missing field in a {{foo}} construct.
+	      return undefined;
+	    } else {
+	      // Someone is actually trying to call something, blow up.
+	      throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
+	    }
+	  });
+	};
+
+	module.exports = exports['default'];
+
+/***/ }),
+/* 26 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _utils = __webpack_require__(5);
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	exports['default'] = function (instance) {
+	  instance.registerHelper('if', function (conditional, options) {
+	    if (arguments.length != 2) {
+	      throw new _exception2['default']('#if requires exactly one argument');
+	    }
+	    if (_utils.isFunction(conditional)) {
+	      conditional = conditional.call(this);
+	    }
+
+	    // Default behavior is to render the positive path if the value is truthy and not empty.
+	    // The `includeZero` option may be set to treat the condtional as purely not empty based on the
+	    // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
+	    if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
+	      return options.inverse(this);
+	    } else {
+	      return options.fn(this);
+	    }
+	  });
+
+	  instance.registerHelper('unless', function (conditional, options) {
+	    if (arguments.length != 2) {
+	      throw new _exception2['default']('#unless requires exactly one argument');
+	    }
+	    return instance.helpers['if'].call(this, conditional, {
+	      fn: options.inverse,
+	      inverse: options.fn,
+	      hash: options.hash
+	    });
+	  });
+	};
+
+	module.exports = exports['default'];
+
+/***/ }),
+/* 27 */
+/***/ (function(module, exports) {
+
+	'use strict';
+
+	exports.__esModule = true;
+
+	exports['default'] = function (instance) {
+	  instance.registerHelper('log', function () /* message, options */{
+	    var args = [undefined],
+	        options = arguments[arguments.length - 1];
+	    for (var i = 0; i < arguments.length - 1; i++) {
+	      args.push(arguments[i]);
+	    }
+
+	    var level = 1;
+	    if (options.hash.level != null) {
+	      level = options.hash.level;
+	    } else if (options.data && options.data.level != null) {
+	      level = options.data.level;
+	    }
+	    args[0] = level;
+
+	    instance.log.apply(instance, args);
+	  });
+	};
+
+	module.exports = exports['default'];
+
+/***/ }),
+/* 28 */
+/***/ (function(module, exports) {
+
+	'use strict';
+
+	exports.__esModule = true;
+
+	exports['default'] = function (instance) {
+	  instance.registerHelper('lookup', function (obj, field, options) {
+	    if (!obj) {
+	      // Note for 5.0: Change to "obj == null" in 5.0
+	      return obj;
+	    }
+	    return options.lookupProperty(obj, field);
+	  });
+	};
+
+	module.exports = exports['default'];
+
+/***/ }),
+/* 29 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _utils = __webpack_require__(5);
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	exports['default'] = function (instance) {
+	  instance.registerHelper('with', function (context, options) {
+	    if (arguments.length != 2) {
+	      throw new _exception2['default']('#with requires exactly one argument');
+	    }
+	    if (_utils.isFunction(context)) {
+	      context = context.call(this);
+	    }
+
+	    var fn = options.fn;
+
+	    if (!_utils.isEmpty(context)) {
+	      var data = options.data;
+	      if (options.data && options.ids) {
+	        data = _utils.createFrame(options.data);
+	        data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
+	      }
+
+	      return fn(context, {
+	        data: data,
+	        blockParams: _utils.blockParams([context], [data && data.contextPath])
+	      });
+	    } else {
+	      return options.inverse(this);
+	    }
+	  });
+	};
+
+	module.exports = exports['default'];
+
+/***/ }),
+/* 30 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+	exports.registerDefaultDecorators = registerDefaultDecorators;
+
+	var _decoratorsInline = __webpack_require__(31);
+
+	var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
+
+	function registerDefaultDecorators(instance) {
+	  _decoratorsInline2['default'](instance);
+	}
+
+/***/ }),
+/* 31 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	exports.__esModule = true;
+
+	var _utils = __webpack_require__(5);
+
+	exports['default'] = function (instance) {
+	  instance.registerDecorator('inline', function (fn, props, container, options) {
+	    var ret = fn;
+	    if (!props.partials) {
+	      props.partials = {};
+	      ret = function (context, options) {
+	        // Create a new partials stack frame prior to exec.
+	        var original = container.partials;
+	        container.partials = _utils.extend({}, original, props.partials);
+	        var ret = fn(context, options);
+	        container.partials = original;
+	        return ret;
+	      };
+	    }
+
+	    props.partials[options.args[0]] = options.fn;
+
+	    return ret;
+	  });
+	};
+
+	module.exports = exports['default'];
+
+/***/ }),
+/* 32 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	exports.__esModule = true;
+
+	var _utils = __webpack_require__(5);
+
+	var logger = {
+	  methodMap: ['debug', 'info', 'warn', 'error'],
+	  level: 'info',
+
+	  // Maps a given level value to the `methodMap` indexes above.
+	  lookupLevel: function lookupLevel(level) {
+	    if (typeof level === 'string') {
+	      var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
+	      if (levelMap >= 0) {
+	        level = levelMap;
+	      } else {
+	        level = parseInt(level, 10);
+	      }
+	    }
+
+	    return level;
+	  },
+
+	  // Can be overridden in the host environment
+	  log: function log(level) {
+	    level = logger.lookupLevel(level);
+
+	    if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {
+	      var method = logger.methodMap[level];
+	      // eslint-disable-next-line no-console
+	      if (!console[method]) {
+	        method = 'log';
+	      }
+
+	      for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+	        message[_key - 1] = arguments[_key];
+	      }
+
+	      console[method].apply(console, message); // eslint-disable-line no-console
+	    }
+	  }
+	};
+
+	exports['default'] = logger;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 33 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _Object$create = __webpack_require__(34)['default'];
+
+	var _Object$keys = __webpack_require__(13)['default'];
+
+	var _interopRequireWildcard = __webpack_require__(3)['default'];
+
+	exports.__esModule = true;
+	exports.createProtoAccessControl = createProtoAccessControl;
+	exports.resultIsAllowed = resultIsAllowed;
+	exports.resetLoggedProperties = resetLoggedProperties;
+
+	var _createNewLookupObject = __webpack_require__(36);
+
+	var _logger = __webpack_require__(32);
+
+	var logger = _interopRequireWildcard(_logger);
+
+	var loggedProperties = _Object$create(null);
+
+	function createProtoAccessControl(runtimeOptions) {
+	  var defaultMethodWhiteList = _Object$create(null);
+	  defaultMethodWhiteList['constructor'] = false;
+	  defaultMethodWhiteList['__defineGetter__'] = false;
+	  defaultMethodWhiteList['__defineSetter__'] = false;
+	  defaultMethodWhiteList['__lookupGetter__'] = false;
+
+	  var defaultPropertyWhiteList = _Object$create(null);
+	  // eslint-disable-next-line no-proto
+	  defaultPropertyWhiteList['__proto__'] = false;
+
+	  return {
+	    properties: {
+	      whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
+	      defaultValue: runtimeOptions.allowProtoPropertiesByDefault
+	    },
+	    methods: {
+	      whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
+	      defaultValue: runtimeOptions.allowProtoMethodsByDefault
+	    }
+	  };
+	}
+
+	function resultIsAllowed(result, protoAccessControl, propertyName) {
+	  if (typeof result === 'function') {
+	    return checkWhiteList(protoAccessControl.methods, propertyName);
+	  } else {
+	    return checkWhiteList(protoAccessControl.properties, propertyName);
+	  }
+	}
+
+	function checkWhiteList(protoAccessControlForType, propertyName) {
+	  if (protoAccessControlForType.whitelist[propertyName] !== undefined) {
+	    return protoAccessControlForType.whitelist[propertyName] === true;
+	  }
+	  if (protoAccessControlForType.defaultValue !== undefined) {
+	    return protoAccessControlForType.defaultValue;
+	  }
+	  logUnexpecedPropertyAccessOnce(propertyName);
+	  return false;
+	}
+
+	function logUnexpecedPropertyAccessOnce(propertyName) {
+	  if (loggedProperties[propertyName] !== true) {
+	    loggedProperties[propertyName] = true;
+	    logger.log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');
+	  }
+	}
+
+	function resetLoggedProperties() {
+	  _Object$keys(loggedProperties).forEach(function (propertyName) {
+	    delete loggedProperties[propertyName];
+	  });
+	}
+
+/***/ }),
+/* 34 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	module.exports = { "default": __webpack_require__(35), __esModule: true };
+
+/***/ }),
+/* 35 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	var $ = __webpack_require__(9);
+	module.exports = function create(P, D){
+	  return $.create(P, D);
+	};
+
+/***/ }),
+/* 36 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _Object$create = __webpack_require__(34)['default'];
+
+	exports.__esModule = true;
+	exports.createNewLookupObject = createNewLookupObject;
+
+	var _utils = __webpack_require__(5);
+
+	/**
+	 * Create a new object with "null"-prototype to avoid truthy results on prototype properties.
+	 * The resulting object can be used with "object[property]" to check if a property exists
+	 * @param {...object} sources a varargs parameter of source objects that will be merged
+	 * @returns {object}
+	 */
+
+	function createNewLookupObject() {
+	  for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
+	    sources[_key] = arguments[_key];
+	  }
+
+	  return _utils.extend.apply(undefined, [_Object$create(null)].concat(sources));
+	}
+
+/***/ }),
+/* 37 */
+/***/ (function(module, exports) {
+
+	// Build out our basic SafeString type
+	'use strict';
+
+	exports.__esModule = true;
+	function SafeString(string) {
+	  this.string = string;
+	}
+
+	SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
+	  return '' + this.string;
+	};
+
+	exports['default'] = SafeString;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 38 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _Object$seal = __webpack_require__(39)['default'];
+
+	var _Object$keys = __webpack_require__(13)['default'];
+
+	var _interopRequireWildcard = __webpack_require__(3)['default'];
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+	exports.checkRevision = checkRevision;
+	exports.template = template;
+	exports.wrapProgram = wrapProgram;
+	exports.resolvePartial = resolvePartial;
+	exports.invokePartial = invokePartial;
+	exports.noop = noop;
+
+	var _utils = __webpack_require__(5);
+
+	var Utils = _interopRequireWildcard(_utils);
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	var _base = __webpack_require__(4);
+
+	var _helpers = __webpack_require__(10);
+
+	var _internalWrapHelper = __webpack_require__(43);
+
+	var _internalProtoAccess = __webpack_require__(33);
+
+	function checkRevision(compilerInfo) {
+	  var compilerRevision = compilerInfo && compilerInfo[0] || 1,
+	      currentRevision = _base.COMPILER_REVISION;
+
+	  if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
+	    return;
+	  }
+
+	  if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
+	    var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
+	        compilerVersions = _base.REVISION_CHANGES[compilerRevision];
+	    throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
+	  } else {
+	    // Use the embedded version info since the runtime doesn't know about this revision yet
+	    throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
+	  }
+	}
+
+	function template(templateSpec, env) {
+	  /* istanbul ignore next */
+	  if (!env) {
+	    throw new _exception2['default']('No environment passed to template');
+	  }
+	  if (!templateSpec || !templateSpec.main) {
+	    throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);
+	  }
+
+	  templateSpec.main.decorator = templateSpec.main_d;
+
+	  // Note: Using env.VM references rather than local var references throughout this section to allow
+	  // for external users to override these as pseudo-supported APIs.
+	  env.VM.checkRevision(templateSpec.compiler);
+
+	  // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0)
+	  var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
+
+	  function invokePartialWrapper(partial, context, options) {
+	    if (options.hash) {
+	      context = Utils.extend({}, context, options.hash);
+	      if (options.ids) {
+	        options.ids[0] = true;
+	      }
+	    }
+	    partial = env.VM.resolvePartial.call(this, partial, context, options);
+
+	    var extendedOptions = Utils.extend({}, options, {
+	      hooks: this.hooks,
+	      protoAccessControl: this.protoAccessControl
+	    });
+
+	    var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
+
+	    if (result == null && env.compile) {
+	      options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
+	      result = options.partials[options.name](context, extendedOptions);
+	    }
+	    if (result != null) {
+	      if (options.indent) {
+	        var lines = result.split('\n');
+	        for (var i = 0, l = lines.length; i < l; i++) {
+	          if (!lines[i] && i + 1 === l) {
+	            break;
+	          }
+
+	          lines[i] = options.indent + lines[i];
+	        }
+	        result = lines.join('\n');
+	      }
+	      return result;
+	    } else {
+	      throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
+	    }
+	  }
+
+	  // Just add water
+	  var container = {
+	    strict: function strict(obj, name, loc) {
+	      if (!obj || !(name in obj)) {
+	        throw new _exception2['default']('"' + name + '" not defined in ' + obj, {
+	          loc: loc
+	        });
+	      }
+	      return container.lookupProperty(obj, name);
+	    },
+	    lookupProperty: function lookupProperty(parent, propertyName) {
+	      var result = parent[propertyName];
+	      if (result == null) {
+	        return result;
+	      }
+	      if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
+	        return result;
+	      }
+
+	      if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
+	        return result;
+	      }
+	      return undefined;
+	    },
+	    lookup: function lookup(depths, name) {
+	      var len = depths.length;
+	      for (var i = 0; i < len; i++) {
+	        var result = depths[i] && container.lookupProperty(depths[i], name);
+	        if (result != null) {
+	          return depths[i][name];
+	        }
+	      }
+	    },
+	    lambda: function lambda(current, context) {
+	      return typeof current === 'function' ? current.call(context) : current;
+	    },
+
+	    escapeExpression: Utils.escapeExpression,
+	    invokePartial: invokePartialWrapper,
+
+	    fn: function fn(i) {
+	      var ret = templateSpec[i];
+	      ret.decorator = templateSpec[i + '_d'];
+	      return ret;
+	    },
+
+	    programs: [],
+	    program: function program(i, data, declaredBlockParams, blockParams, depths) {
+	      var programWrapper = this.programs[i],
+	          fn = this.fn(i);
+	      if (data || depths || blockParams || declaredBlockParams) {
+	        programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
+	      } else if (!programWrapper) {
+	        programWrapper = this.programs[i] = wrapProgram(this, i, fn);
+	      }
+	      return programWrapper;
+	    },
+
+	    data: function data(value, depth) {
+	      while (value && depth--) {
+	        value = value._parent;
+	      }
+	      return value;
+	    },
+	    mergeIfNeeded: function mergeIfNeeded(param, common) {
+	      var obj = param || common;
+
+	      if (param && common && param !== common) {
+	        obj = Utils.extend({}, common, param);
+	      }
+
+	      return obj;
+	    },
+	    // An empty object to use as replacement for null-contexts
+	    nullContext: _Object$seal({}),
+
+	    noop: env.VM.noop,
+	    compilerInfo: templateSpec.compiler
+	  };
+
+	  function ret(context) {
+	    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+	    var data = options.data;
+
+	    ret._setup(options);
+	    if (!options.partial && templateSpec.useData) {
+	      data = initData(context, data);
+	    }
+	    var depths = undefined,
+	        blockParams = templateSpec.useBlockParams ? [] : undefined;
+	    if (templateSpec.useDepths) {
+	      if (options.depths) {
+	        depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
+	      } else {
+	        depths = [context];
+	      }
+	    }
+
+	    function main(context /*, options*/) {
+	      return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);
+	    }
+
+	    main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
+	    return main(context, options);
+	  }
+
+	  ret.isTop = true;
+
+	  ret._setup = function (options) {
+	    if (!options.partial) {
+	      var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
+	      wrapHelpersToPassLookupProperty(mergedHelpers, container);
+	      container.helpers = mergedHelpers;
+
+	      if (templateSpec.usePartial) {
+	        // Use mergeIfNeeded here to prevent compiling global partials multiple times
+	        container.partials = container.mergeIfNeeded(options.partials, env.partials);
+	      }
+	      if (templateSpec.usePartial || templateSpec.useDecorators) {
+	        container.decorators = Utils.extend({}, env.decorators, options.decorators);
+	      }
+
+	      container.hooks = {};
+	      container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
+
+	      var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
+	      _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers);
+	      _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers);
+	    } else {
+	      container.protoAccessControl = options.protoAccessControl; // internal option
+	      container.helpers = options.helpers;
+	      container.partials = options.partials;
+	      container.decorators = options.decorators;
+	      container.hooks = options.hooks;
+	    }
+	  };
+
+	  ret._child = function (i, data, blockParams, depths) {
+	    if (templateSpec.useBlockParams && !blockParams) {
+	      throw new _exception2['default']('must pass block params');
+	    }
+	    if (templateSpec.useDepths && !depths) {
+	      throw new _exception2['default']('must pass parent depths');
+	    }
+
+	    return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
+	  };
+	  return ret;
+	}
+
+	function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
+	  function prog(context) {
+	    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+	    var currentDepths = depths;
+	    if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
+	      currentDepths = [context].concat(depths);
+	    }
+
+	    return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
+	  }
+
+	  prog = executeDecorators(fn, prog, container, depths, data, blockParams);
+
+	  prog.program = i;
+	  prog.depth = depths ? depths.length : 0;
+	  prog.blockParams = declaredBlockParams || 0;
+	  return prog;
+	}
+
+	/**
+	 * This is currently part of the official API, therefore implementation details should not be changed.
+	 */
+
+	function resolvePartial(partial, context, options) {
+	  if (!partial) {
+	    if (options.name === '@partial-block') {
+	      partial = options.data['partial-block'];
+	    } else {
+	      partial = options.partials[options.name];
+	    }
+	  } else if (!partial.call && !options.name) {
+	    // This is a dynamic partial that returned a string
+	    options.name = partial;
+	    partial = options.partials[partial];
+	  }
+	  return partial;
+	}
+
+	function invokePartial(partial, context, options) {
+	  // Use the current closure context to save the partial-block if this partial
+	  var currentPartialBlock = options.data && options.data['partial-block'];
+	  options.partial = true;
+	  if (options.ids) {
+	    options.data.contextPath = options.ids[0] || options.data.contextPath;
+	  }
+
+	  var partialBlock = undefined;
+	  if (options.fn && options.fn !== noop) {
+	    (function () {
+	      options.data = _base.createFrame(options.data);
+	      // Wrapper function to get access to currentPartialBlock from the closure
+	      var fn = options.fn;
+	      partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) {
+	        var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
+
+	        // Restore the partial-block from the closure for the execution of the block
+	        // i.e. the part inside the block of the partial call.
+	        options.data = _base.createFrame(options.data);
+	        options.data['partial-block'] = currentPartialBlock;
+	        return fn(context, options);
+	      };
+	      if (fn.partials) {
+	        options.partials = Utils.extend({}, options.partials, fn.partials);
+	      }
+	    })();
+	  }
+
+	  if (partial === undefined && partialBlock) {
+	    partial = partialBlock;
+	  }
+
+	  if (partial === undefined) {
+	    throw new _exception2['default']('The partial ' + options.name + ' could not be found');
+	  } else if (partial instanceof Function) {
+	    return partial(context, options);
+	  }
+	}
+
+	function noop() {
+	  return '';
+	}
+
+	function initData(context, data) {
+	  if (!data || !('root' in data)) {
+	    data = data ? _base.createFrame(data) : {};
+	    data.root = context;
+	  }
+	  return data;
+	}
+
+	function executeDecorators(fn, prog, container, depths, data, blockParams) {
+	  if (fn.decorator) {
+	    var props = {};
+	    prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
+	    Utils.extend(prog, props);
+	  }
+	  return prog;
+	}
+
+	function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
+	  _Object$keys(mergedHelpers).forEach(function (helperName) {
+	    var helper = mergedHelpers[helperName];
+	    mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
+	  });
+	}
+
+	function passLookupPropertyOption(helper, container) {
+	  var lookupProperty = container.lookupProperty;
+	  return _internalWrapHelper.wrapHelper(helper, function (options) {
+	    return Utils.extend({ lookupProperty: lookupProperty }, options);
+	  });
+	}
+
+/***/ }),
+/* 39 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	module.exports = { "default": __webpack_require__(40), __esModule: true };
+
+/***/ }),
+/* 40 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	__webpack_require__(41);
+	module.exports = __webpack_require__(21).Object.seal;
+
+/***/ }),
+/* 41 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	// 19.1.2.17 Object.seal(O)
+	var isObject = __webpack_require__(42);
+
+	__webpack_require__(18)('seal', function($seal){
+	  return function seal(it){
+	    return $seal && isObject(it) ? $seal(it) : it;
+	  };
+	});
+
+/***/ }),
+/* 42 */
+/***/ (function(module, exports) {
+
+	module.exports = function(it){
+	  return typeof it === 'object' ? it !== null : typeof it === 'function';
+	};
+
+/***/ }),
+/* 43 */
+/***/ (function(module, exports) {
+
+	'use strict';
+
+	exports.__esModule = true;
+	exports.wrapHelper = wrapHelper;
+
+	function wrapHelper(helper, transformOptionsFn) {
+	  if (typeof helper !== 'function') {
+	    // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639
+	    // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function.
+	    return helper;
+	  }
+	  var wrapper = function wrapper() /* dynamic arguments */{
+	    var options = arguments[arguments.length - 1];
+	    arguments[arguments.length - 1] = transformOptionsFn(options);
+	    return helper.apply(this, arguments);
+	  };
+	  return wrapper;
+	}
+
+/***/ }),
+/* 44 */
+/***/ (function(module, exports) {
+
+	/* WEBPACK VAR INJECTION */(function(global) {'use strict';
+
+	exports.__esModule = true;
+
+	exports['default'] = function (Handlebars) {
+	  /* istanbul ignore next */
+	  var root = typeof global !== 'undefined' ? global : window,
+	      $Handlebars = root.Handlebars;
+	  /* istanbul ignore next */
+	  Handlebars.noConflict = function () {
+	    if (root.Handlebars === Handlebars) {
+	      root.Handlebars = $Handlebars;
+	    }
+	    return Handlebars;
+	  };
+	};
+
+	module.exports = exports['default'];
+	/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ }),
+/* 45 */
+/***/ (function(module, exports) {
+
+	'use strict';
+
+	exports.__esModule = true;
+	var AST = {
+	  // Public API used to evaluate derived attributes regarding AST nodes
+	  helpers: {
+	    // a mustache is definitely a helper if:
+	    // * it is an eligible helper, and
+	    // * it has at least one parameter or hash segment
+	    helperExpression: function helperExpression(node) {
+	      return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);
+	    },
+
+	    scopedId: function scopedId(path) {
+	      return (/^\.|this\b/.test(path.original)
+	      );
+	    },
+
+	    // an ID is simple if it only has one part, and that part is not
+	    // `..` or `this`.
+	    simpleId: function simpleId(path) {
+	      return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;
+	    }
+	  }
+	};
+
+	// Must be exported as an object rather than the root of the module as the jison lexer
+	// must modify the object to operate properly.
+	exports['default'] = AST;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 46 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	var _interopRequireWildcard = __webpack_require__(3)['default'];
+
+	exports.__esModule = true;
+	exports.parseWithoutProcessing = parseWithoutProcessing;
+	exports.parse = parse;
+
+	var _parser = __webpack_require__(47);
+
+	var _parser2 = _interopRequireDefault(_parser);
+
+	var _whitespaceControl = __webpack_require__(48);
+
+	var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
+
+	var _helpers = __webpack_require__(50);
+
+	var Helpers = _interopRequireWildcard(_helpers);
+
+	var _utils = __webpack_require__(5);
+
+	exports.parser = _parser2['default'];
+
+	var yy = {};
+	_utils.extend(yy, Helpers);
+
+	function parseWithoutProcessing(input, options) {
+	  // Just return if an already-compiled AST was passed in.
+	  if (input.type === 'Program') {
+	    return input;
+	  }
+
+	  _parser2['default'].yy = yy;
+
+	  // Altering the shared object here, but this is ok as parser is a sync operation
+	  yy.locInfo = function (locInfo) {
+	    return new yy.SourceLocation(options && options.srcName, locInfo);
+	  };
+
+	  var ast = _parser2['default'].parse(input);
+
+	  return ast;
+	}
+
+	function parse(input, options) {
+	  var ast = parseWithoutProcessing(input, options);
+	  var strip = new _whitespaceControl2['default'](options);
+
+	  return strip.accept(ast);
+	}
+
+/***/ }),
+/* 47 */
+/***/ (function(module, exports) {
+
+	// File ignored in coverage tests via setting in .istanbul.yml
+	/* Jison generated parser */
+	"use strict";
+
+	exports.__esModule = true;
+	var handlebars = (function () {
+	    var parser = { trace: function trace() {},
+	        yy: {},
+	        symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
+	        terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
+	        productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
+	        performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+
+	            var $0 = $$.length - 1;
+	            switch (yystate) {
+	                case 1:
+	                    return $$[$0 - 1];
+	                    break;
+	                case 2:
+	                    this.$ = yy.prepareProgram($$[$0]);
+	                    break;
+	                case 3:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 4:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 5:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 6:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 7:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 8:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 9:
+	                    this.$ = {
+	                        type: 'CommentStatement',
+	                        value: yy.stripComment($$[$0]),
+	                        strip: yy.stripFlags($$[$0], $$[$0]),
+	                        loc: yy.locInfo(this._$)
+	                    };
+
+	                    break;
+	                case 10:
+	                    this.$ = {
+	                        type: 'ContentStatement',
+	                        original: $$[$0],
+	                        value: $$[$0],
+	                        loc: yy.locInfo(this._$)
+	                    };
+
+	                    break;
+	                case 11:
+	                    this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
+	                    break;
+	                case 12:
+	                    this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
+	                    break;
+	                case 13:
+	                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
+	                    break;
+	                case 14:
+	                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
+	                    break;
+	                case 15:
+	                    this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
+	                    break;
+	                case 16:
+	                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
+	                    break;
+	                case 17:
+	                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
+	                    break;
+	                case 18:
+	                    this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
+	                    break;
+	                case 19:
+	                    var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),
+	                        program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
+	                    program.chained = true;
+
+	                    this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };
+
+	                    break;
+	                case 20:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 21:
+	                    this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
+	                    break;
+	                case 22:
+	                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
+	                    break;
+	                case 23:
+	                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
+	                    break;
+	                case 24:
+	                    this.$ = {
+	                        type: 'PartialStatement',
+	                        name: $$[$0 - 3],
+	                        params: $$[$0 - 2],
+	                        hash: $$[$0 - 1],
+	                        indent: '',
+	                        strip: yy.stripFlags($$[$0 - 4], $$[$0]),
+	                        loc: yy.locInfo(this._$)
+	                    };
+
+	                    break;
+	                case 25:
+	                    this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
+	                    break;
+	                case 26:
+	                    this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
+	                    break;
+	                case 27:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 28:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 29:
+	                    this.$ = {
+	                        type: 'SubExpression',
+	                        path: $$[$0 - 3],
+	                        params: $$[$0 - 2],
+	                        hash: $$[$0 - 1],
+	                        loc: yy.locInfo(this._$)
+	                    };
+
+	                    break;
+	                case 30:
+	                    this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };
+	                    break;
+	                case 31:
+	                    this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
+	                    break;
+	                case 32:
+	                    this.$ = yy.id($$[$0 - 1]);
+	                    break;
+	                case 33:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 34:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 35:
+	                    this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
+	                    break;
+	                case 36:
+	                    this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
+	                    break;
+	                case 37:
+	                    this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };
+	                    break;
+	                case 38:
+	                    this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };
+	                    break;
+	                case 39:
+	                    this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };
+	                    break;
+	                case 40:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 41:
+	                    this.$ = $$[$0];
+	                    break;
+	                case 42:
+	                    this.$ = yy.preparePath(true, $$[$0], this._$);
+	                    break;
+	                case 43:
+	                    this.$ = yy.preparePath(false, $$[$0], this._$);
+	                    break;
+	                case 44:
+	                    $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];
+	                    break;
+	                case 45:
+	                    this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
+	                    break;
+	                case 46:
+	                    this.$ = [];
+	                    break;
+	                case 47:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 48:
+	                    this.$ = [];
+	                    break;
+	                case 49:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 50:
+	                    this.$ = [];
+	                    break;
+	                case 51:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 58:
+	                    this.$ = [];
+	                    break;
+	                case 59:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 64:
+	                    this.$ = [];
+	                    break;
+	                case 65:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 70:
+	                    this.$ = [];
+	                    break;
+	                case 71:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 78:
+	                    this.$ = [];
+	                    break;
+	                case 79:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 82:
+	                    this.$ = [];
+	                    break;
+	                case 83:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 86:
+	                    this.$ = [];
+	                    break;
+	                case 87:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 90:
+	                    this.$ = [];
+	                    break;
+	                case 91:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 94:
+	                    this.$ = [];
+	                    break;
+	                case 95:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 98:
+	                    this.$ = [$$[$0]];
+	                    break;
+	                case 99:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	                case 100:
+	                    this.$ = [$$[$0]];
+	                    break;
+	                case 101:
+	                    $$[$0 - 1].push($$[$0]);
+	                    break;
+	            }
+	        },
+	        table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
+	        defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] },
+	        parseError: function parseError(str, hash) {
+	            throw new Error(str);
+	        },
+	        parse: function parse(input) {
+	            var self = this,
+	                stack = [0],
+	                vstack = [null],
+	                lstack = [],
+	                table = this.table,
+	                yytext = "",
+	                yylineno = 0,
+	                yyleng = 0,
+	                recovering = 0,
+	                TERROR = 2,
+	                EOF = 1;
+	            this.lexer.setInput(input);
+	            this.lexer.yy = this.yy;
+	            this.yy.lexer = this.lexer;
+	            this.yy.parser = this;
+	            if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
+	            var yyloc = this.lexer.yylloc;
+	            lstack.push(yyloc);
+	            var ranges = this.lexer.options && this.lexer.options.ranges;
+	            if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
+	            function popStack(n) {
+	                stack.length = stack.length - 2 * n;
+	                vstack.length = vstack.length - n;
+	                lstack.length = lstack.length - n;
+	            }
+	            function lex() {
+	                var token;
+	                token = self.lexer.lex() || 1;
+	                if (typeof token !== "number") {
+	                    token = self.symbols_[token] || token;
+	                }
+	                return token;
+	            }
+	            var symbol,
+	                preErrorSymbol,
+	                state,
+	                action,
+	                a,
+	                r,
+	                yyval = {},
+	                p,
+	                len,
+	                newState,
+	                expected;
+	            while (true) {
+	                state = stack[stack.length - 1];
+	                if (this.defaultActions[state]) {
+	                    action = this.defaultActions[state];
+	                } else {
+	                    if (symbol === null || typeof symbol == "undefined") {
+	                        symbol = lex();
+	                    }
+	                    action = table[state] && table[state][symbol];
+	                }
+	                if (typeof action === "undefined" || !action.length || !action[0]) {
+	                    var errStr = "";
+	                    if (!recovering) {
+	                        expected = [];
+	                        for (p in table[state]) if (this.terminals_[p] && p > 2) {
+	                            expected.push("'" + this.terminals_[p] + "'");
+	                        }
+	                        if (this.lexer.showPosition) {
+	                            errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
+	                        } else {
+	                            errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
+	                        }
+	                        this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });
+	                    }
+	                }
+	                if (action[0] instanceof Array && action.length > 1) {
+	                    throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
+	                }
+	                switch (action[0]) {
+	                    case 1:
+	                        stack.push(symbol);
+	                        vstack.push(this.lexer.yytext);
+	                        lstack.push(this.lexer.yylloc);
+	                        stack.push(action[1]);
+	                        symbol = null;
+	                        if (!preErrorSymbol) {
+	                            yyleng = this.lexer.yyleng;
+	                            yytext = this.lexer.yytext;
+	                            yylineno = this.lexer.yylineno;
+	                            yyloc = this.lexer.yylloc;
+	                            if (recovering > 0) recovering--;
+	                        } else {
+	                            symbol = preErrorSymbol;
+	                            preErrorSymbol = null;
+	                        }
+	                        break;
+	                    case 2:
+	                        len = this.productions_[action[1]][1];
+	                        yyval.$ = vstack[vstack.length - len];
+	                        yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
+	                        if (ranges) {
+	                            yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
+	                        }
+	                        r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
+	                        if (typeof r !== "undefined") {
+	                            return r;
+	                        }
+	                        if (len) {
+	                            stack = stack.slice(0, -1 * len * 2);
+	                            vstack = vstack.slice(0, -1 * len);
+	                            lstack = lstack.slice(0, -1 * len);
+	                        }
+	                        stack.push(this.productions_[action[1]][0]);
+	                        vstack.push(yyval.$);
+	                        lstack.push(yyval._$);
+	                        newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
+	                        stack.push(newState);
+	                        break;
+	                    case 3:
+	                        return true;
+	                }
+	            }
+	            return true;
+	        }
+	    };
+	    /* Jison generated lexer */
+	    var lexer = (function () {
+	        var lexer = { EOF: 1,
+	            parseError: function parseError(str, hash) {
+	                if (this.yy.parser) {
+	                    this.yy.parser.parseError(str, hash);
+	                } else {
+	                    throw new Error(str);
+	                }
+	            },
+	            setInput: function setInput(input) {
+	                this._input = input;
+	                this._more = this._less = this.done = false;
+	                this.yylineno = this.yyleng = 0;
+	                this.yytext = this.matched = this.match = '';
+	                this.conditionStack = ['INITIAL'];
+	                this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
+	                if (this.options.ranges) this.yylloc.range = [0, 0];
+	                this.offset = 0;
+	                return this;
+	            },
+	            input: function input() {
+	                var ch = this._input[0];
+	                this.yytext += ch;
+	                this.yyleng++;
+	                this.offset++;
+	                this.match += ch;
+	                this.matched += ch;
+	                var lines = ch.match(/(?:\r\n?|\n).*/g);
+	                if (lines) {
+	                    this.yylineno++;
+	                    this.yylloc.last_line++;
+	                } else {
+	                    this.yylloc.last_column++;
+	                }
+	                if (this.options.ranges) this.yylloc.range[1]++;
+
+	                this._input = this._input.slice(1);
+	                return ch;
+	            },
+	            unput: function unput(ch) {
+	                var len = ch.length;
+	                var lines = ch.split(/(?:\r\n?|\n)/g);
+
+	                this._input = ch + this._input;
+	                this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
+	                //this.yyleng -= len;
+	                this.offset -= len;
+	                var oldLines = this.match.split(/(?:\r\n?|\n)/g);
+	                this.match = this.match.substr(0, this.match.length - 1);
+	                this.matched = this.matched.substr(0, this.matched.length - 1);
+
+	                if (lines.length - 1) this.yylineno -= lines.length - 1;
+	                var r = this.yylloc.range;
+
+	                this.yylloc = { first_line: this.yylloc.first_line,
+	                    last_line: this.yylineno + 1,
+	                    first_column: this.yylloc.first_column,
+	                    last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
+	                };
+
+	                if (this.options.ranges) {
+	                    this.yylloc.range = [r[0], r[0] + this.yyleng - len];
+	                }
+	                return this;
+	            },
+	            more: function more() {
+	                this._more = true;
+	                return this;
+	            },
+	            less: function less(n) {
+	                this.unput(this.match.slice(n));
+	            },
+	            pastInput: function pastInput() {
+	                var past = this.matched.substr(0, this.matched.length - this.match.length);
+	                return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
+	            },
+	            upcomingInput: function upcomingInput() {
+	                var next = this.match;
+	                if (next.length < 20) {
+	                    next += this._input.substr(0, 20 - next.length);
+	                }
+	                return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
+	            },
+	            showPosition: function showPosition() {
+	                var pre = this.pastInput();
+	                var c = new Array(pre.length + 1).join("-");
+	                return pre + this.upcomingInput() + "\n" + c + "^";
+	            },
+	            next: function next() {
+	                if (this.done) {
+	                    return this.EOF;
+	                }
+	                if (!this._input) this.done = true;
+
+	                var token, match, tempMatch, index, col, lines;
+	                if (!this._more) {
+	                    this.yytext = '';
+	                    this.match = '';
+	                }
+	                var rules = this._currentRules();
+	                for (var i = 0; i < rules.length; i++) {
+	                    tempMatch = this._input.match(this.rules[rules[i]]);
+	                    if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
+	                        match = tempMatch;
+	                        index = i;
+	                        if (!this.options.flex) break;
+	                    }
+	                }
+	                if (match) {
+	                    lines = match[0].match(/(?:\r\n?|\n).*/g);
+	                    if (lines) this.yylineno += lines.length;
+	                    this.yylloc = { first_line: this.yylloc.last_line,
+	                        last_line: this.yylineno + 1,
+	                        first_column: this.yylloc.last_column,
+	                        last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length };
+	                    this.yytext += match[0];
+	                    this.match += match[0];
+	                    this.matches = match;
+	                    this.yyleng = this.yytext.length;
+	                    if (this.options.ranges) {
+	                        this.yylloc.range = [this.offset, this.offset += this.yyleng];
+	                    }
+	                    this._more = false;
+	                    this._input = this._input.slice(match[0].length);
+	                    this.matched += match[0];
+	                    token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
+	                    if (this.done && this._input) this.done = false;
+	                    if (token) return token;else return;
+	                }
+	                if (this._input === "") {
+	                    return this.EOF;
+	                } else {
+	                    return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno });
+	                }
+	            },
+	            lex: function lex() {
+	                var r = this.next();
+	                if (typeof r !== 'undefined') {
+	                    return r;
+	                } else {
+	                    return this.lex();
+	                }
+	            },
+	            begin: function begin(condition) {
+	                this.conditionStack.push(condition);
+	            },
+	            popState: function popState() {
+	                return this.conditionStack.pop();
+	            },
+	            _currentRules: function _currentRules() {
+	                return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
+	            },
+	            topState: function topState() {
+	                return this.conditionStack[this.conditionStack.length - 2];
+	            },
+	            pushState: function begin(condition) {
+	                this.begin(condition);
+	            } };
+	        lexer.options = {};
+	        lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+
+	            function strip(start, end) {
+	                return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);
+	            }
+
+	            var YYSTATE = YY_START;
+	            switch ($avoiding_name_collisions) {
+	                case 0:
+	                    if (yy_.yytext.slice(-2) === "\\\\") {
+	                        strip(0, 1);
+	                        this.begin("mu");
+	                    } else if (yy_.yytext.slice(-1) === "\\") {
+	                        strip(0, 1);
+	                        this.begin("emu");
+	                    } else {
+	                        this.begin("mu");
+	                    }
+	                    if (yy_.yytext) return 15;
+
+	                    break;
+	                case 1:
+	                    return 15;
+	                    break;
+	                case 2:
+	                    this.popState();
+	                    return 15;
+
+	                    break;
+	                case 3:
+	                    this.begin('raw');return 15;
+	                    break;
+	                case 4:
+	                    this.popState();
+	                    // Should be using `this.topState()` below, but it currently
+	                    // returns the second top instead of the first top. Opened an
+	                    // issue about it at https://github.com/zaach/jison/issues/291
+	                    if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {
+	                        return 15;
+	                    } else {
+	                        strip(5, 9);
+	                        return 'END_RAW_BLOCK';
+	                    }
+
+	                    break;
+	                case 5:
+	                    return 15;
+	                    break;
+	                case 6:
+	                    this.popState();
+	                    return 14;
+
+	                    break;
+	                case 7:
+	                    return 65;
+	                    break;
+	                case 8:
+	                    return 68;
+	                    break;
+	                case 9:
+	                    return 19;
+	                    break;
+	                case 10:
+	                    this.popState();
+	                    this.begin('raw');
+	                    return 23;
+
+	                    break;
+	                case 11:
+	                    return 55;
+	                    break;
+	                case 12:
+	                    return 60;
+	                    break;
+	                case 13:
+	                    return 29;
+	                    break;
+	                case 14:
+	                    return 47;
+	                    break;
+	                case 15:
+	                    this.popState();return 44;
+	                    break;
+	                case 16:
+	                    this.popState();return 44;
+	                    break;
+	                case 17:
+	                    return 34;
+	                    break;
+	                case 18:
+	                    return 39;
+	                    break;
+	                case 19:
+	                    return 51;
+	                    break;
+	                case 20:
+	                    return 48;
+	                    break;
+	                case 21:
+	                    this.unput(yy_.yytext);
+	                    this.popState();
+	                    this.begin('com');
+
+	                    break;
+	                case 22:
+	                    this.popState();
+	                    return 14;
+
+	                    break;
+	                case 23:
+	                    return 48;
+	                    break;
+	                case 24:
+	                    return 73;
+	                    break;
+	                case 25:
+	                    return 72;
+	                    break;
+	                case 26:
+	                    return 72;
+	                    break;
+	                case 27:
+	                    return 87;
+	                    break;
+	                case 28:
+	                    // ignore whitespace
+	                    break;
+	                case 29:
+	                    this.popState();return 54;
+	                    break;
+	                case 30:
+	                    this.popState();return 33;
+	                    break;
+	                case 31:
+	                    yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80;
+	                    break;
+	                case 32:
+	                    yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80;
+	                    break;
+	                case 33:
+	                    return 85;
+	                    break;
+	                case 34:
+	                    return 82;
+	                    break;
+	                case 35:
+	                    return 82;
+	                    break;
+	                case 36:
+	                    return 83;
+	                    break;
+	                case 37:
+	                    return 84;
+	                    break;
+	                case 38:
+	                    return 81;
+	                    break;
+	                case 39:
+	                    return 75;
+	                    break;
+	                case 40:
+	                    return 77;
+	                    break;
+	                case 41:
+	                    return 72;
+	                    break;
+	                case 42:
+	                    yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72;
+	                    break;
+	                case 43:
+	                    return 'INVALID';
+	                    break;
+	                case 44:
+	                    return 5;
+	                    break;
+	            }
+	        };
+	        lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
+	        lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
+	        return lexer;
+	    })();
+	    parser.lexer = lexer;
+	    function Parser() {
+	        this.yy = {};
+	    }Parser.prototype = parser;parser.Parser = Parser;
+	    return new Parser();
+	})();exports["default"] = handlebars;
+	module.exports = exports["default"];
+
+/***/ }),
+/* 48 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _visitor = __webpack_require__(49);
+
+	var _visitor2 = _interopRequireDefault(_visitor);
+
+	function WhitespaceControl() {
+	  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
+
+	  this.options = options;
+	}
+	WhitespaceControl.prototype = new _visitor2['default']();
+
+	WhitespaceControl.prototype.Program = function (program) {
+	  var doStandalone = !this.options.ignoreStandalone;
+
+	  var isRoot = !this.isRootSeen;
+	  this.isRootSeen = true;
+
+	  var body = program.body;
+	  for (var i = 0, l = body.length; i < l; i++) {
+	    var current = body[i],
+	        strip = this.accept(current);
+
+	    if (!strip) {
+	      continue;
+	    }
+
+	    var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),
+	        _isNextWhitespace = isNextWhitespace(body, i, isRoot),
+	        openStandalone = strip.openStandalone && _isPrevWhitespace,
+	        closeStandalone = strip.closeStandalone && _isNextWhitespace,
+	        inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
+
+	    if (strip.close) {
+	      omitRight(body, i, true);
+	    }
+	    if (strip.open) {
+	      omitLeft(body, i, true);
+	    }
+
+	    if (doStandalone && inlineStandalone) {
+	      omitRight(body, i);
+
+	      if (omitLeft(body, i)) {
+	        // If we are on a standalone node, save the indent info for partials
+	        if (current.type === 'PartialStatement') {
+	          // Pull out the whitespace from the final line
+	          current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
+	        }
+	      }
+	    }
+	    if (doStandalone && openStandalone) {
+	      omitRight((current.program || current.inverse).body);
+
+	      // Strip out the previous content node if it's whitespace only
+	      omitLeft(body, i);
+	    }
+	    if (doStandalone && closeStandalone) {
+	      // Always strip the next node
+	      omitRight(body, i);
+
+	      omitLeft((current.inverse || current.program).body);
+	    }
+	  }
+
+	  return program;
+	};
+
+	WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {
+	  this.accept(block.program);
+	  this.accept(block.inverse);
+
+	  // Find the inverse program that is involed with whitespace stripping.
+	  var program = block.program || block.inverse,
+	      inverse = block.program && block.inverse,
+	      firstInverse = inverse,
+	      lastInverse = inverse;
+
+	  if (inverse && inverse.chained) {
+	    firstInverse = inverse.body[0].program;
+
+	    // Walk the inverse chain to find the last inverse that is actually in the chain.
+	    while (lastInverse.chained) {
+	      lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
+	    }
+	  }
+
+	  var strip = {
+	    open: block.openStrip.open,
+	    close: block.closeStrip.close,
+
+	    // Determine the standalone candiacy. Basically flag our content as being possibly standalone
+	    // so our parent can determine if we actually are standalone
+	    openStandalone: isNextWhitespace(program.body),
+	    closeStandalone: isPrevWhitespace((firstInverse || program).body)
+	  };
+
+	  if (block.openStrip.close) {
+	    omitRight(program.body, null, true);
+	  }
+
+	  if (inverse) {
+	    var inverseStrip = block.inverseStrip;
+
+	    if (inverseStrip.open) {
+	      omitLeft(program.body, null, true);
+	    }
+
+	    if (inverseStrip.close) {
+	      omitRight(firstInverse.body, null, true);
+	    }
+	    if (block.closeStrip.open) {
+	      omitLeft(lastInverse.body, null, true);
+	    }
+
+	    // Find standalone else statments
+	    if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
+	      omitLeft(program.body);
+	      omitRight(firstInverse.body);
+	    }
+	  } else if (block.closeStrip.open) {
+	    omitLeft(program.body, null, true);
+	  }
+
+	  return strip;
+	};
+
+	WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {
+	  return mustache.strip;
+	};
+
+	WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {
+	  /* istanbul ignore next */
+	  var strip = node.strip || {};
+	  return {
+	    inlineStandalone: true,
+	    open: strip.open,
+	    close: strip.close
+	  };
+	};
+
+	function isPrevWhitespace(body, i, isRoot) {
+	  if (i === undefined) {
+	    i = body.length;
+	  }
+
+	  // Nodes that end with newlines are considered whitespace (but are special
+	  // cased for strip operations)
+	  var prev = body[i - 1],
+	      sibling = body[i - 2];
+	  if (!prev) {
+	    return isRoot;
+	  }
+
+	  if (prev.type === 'ContentStatement') {
+	    return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
+	  }
+	}
+	function isNextWhitespace(body, i, isRoot) {
+	  if (i === undefined) {
+	    i = -1;
+	  }
+
+	  var next = body[i + 1],
+	      sibling = body[i + 2];
+	  if (!next) {
+	    return isRoot;
+	  }
+
+	  if (next.type === 'ContentStatement') {
+	    return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
+	  }
+	}
+
+	// Marks the node to the right of the position as omitted.
+	// I.e. {{foo}}' ' will mark the ' ' node as omitted.
+	//
+	// If i is undefined, then the first child will be marked as such.
+	//
+	// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
+	// content is met.
+	function omitRight(body, i, multiple) {
+	  var current = body[i == null ? 0 : i + 1];
+	  if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {
+	    return;
+	  }
+
+	  var original = current.value;
+	  current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, '');
+	  current.rightStripped = current.value !== original;
+	}
+
+	// Marks the node to the left of the position as omitted.
+	// I.e. ' '{{foo}} will mark the ' ' node as omitted.
+	//
+	// If i is undefined then the last child will be marked as such.
+	//
+	// If mulitple is truthy then all whitespace will be stripped out until non-whitespace
+	// content is met.
+	function omitLeft(body, i, multiple) {
+	  var current = body[i == null ? body.length - 1 : i - 1];
+	  if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {
+	    return;
+	  }
+
+	  // We omit the last node if it's whitespace only and not preceded by a non-content node.
+	  var original = current.value;
+	  current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, '');
+	  current.leftStripped = current.value !== original;
+	  return current.leftStripped;
+	}
+
+	exports['default'] = WhitespaceControl;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 49 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	function Visitor() {
+	  this.parents = [];
+	}
+
+	Visitor.prototype = {
+	  constructor: Visitor,
+	  mutating: false,
+
+	  // Visits a given value. If mutating, will replace the value if necessary.
+	  acceptKey: function acceptKey(node, name) {
+	    var value = this.accept(node[name]);
+	    if (this.mutating) {
+	      // Hacky sanity check: This may have a few false positives for type for the helper
+	      // methods but will generally do the right thing without a lot of overhead.
+	      if (value && !Visitor.prototype[value.type]) {
+	        throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type);
+	      }
+	      node[name] = value;
+	    }
+	  },
+
+	  // Performs an accept operation with added sanity check to ensure
+	  // required keys are not removed.
+	  acceptRequired: function acceptRequired(node, name) {
+	    this.acceptKey(node, name);
+
+	    if (!node[name]) {
+	      throw new _exception2['default'](node.type + ' requires ' + name);
+	    }
+	  },
+
+	  // Traverses a given array. If mutating, empty respnses will be removed
+	  // for child elements.
+	  acceptArray: function acceptArray(array) {
+	    for (var i = 0, l = array.length; i < l; i++) {
+	      this.acceptKey(array, i);
+
+	      if (!array[i]) {
+	        array.splice(i, 1);
+	        i--;
+	        l--;
+	      }
+	    }
+	  },
+
+	  accept: function accept(object) {
+	    if (!object) {
+	      return;
+	    }
+
+	    /* istanbul ignore next: Sanity code */
+	    if (!this[object.type]) {
+	      throw new _exception2['default']('Unknown type: ' + object.type, object);
+	    }
+
+	    if (this.current) {
+	      this.parents.unshift(this.current);
+	    }
+	    this.current = object;
+
+	    var ret = this[object.type](object);
+
+	    this.current = this.parents.shift();
+
+	    if (!this.mutating || ret) {
+	      return ret;
+	    } else if (ret !== false) {
+	      return object;
+	    }
+	  },
+
+	  Program: function Program(program) {
+	    this.acceptArray(program.body);
+	  },
+
+	  MustacheStatement: visitSubExpression,
+	  Decorator: visitSubExpression,
+
+	  BlockStatement: visitBlock,
+	  DecoratorBlock: visitBlock,
+
+	  PartialStatement: visitPartial,
+	  PartialBlockStatement: function PartialBlockStatement(partial) {
+	    visitPartial.call(this, partial);
+
+	    this.acceptKey(partial, 'program');
+	  },
+
+	  ContentStatement: function ContentStatement() /* content */{},
+	  CommentStatement: function CommentStatement() /* comment */{},
+
+	  SubExpression: visitSubExpression,
+
+	  PathExpression: function PathExpression() /* path */{},
+
+	  StringLiteral: function StringLiteral() /* string */{},
+	  NumberLiteral: function NumberLiteral() /* number */{},
+	  BooleanLiteral: function BooleanLiteral() /* bool */{},
+	  UndefinedLiteral: function UndefinedLiteral() /* literal */{},
+	  NullLiteral: function NullLiteral() /* literal */{},
+
+	  Hash: function Hash(hash) {
+	    this.acceptArray(hash.pairs);
+	  },
+	  HashPair: function HashPair(pair) {
+	    this.acceptRequired(pair, 'value');
+	  }
+	};
+
+	function visitSubExpression(mustache) {
+	  this.acceptRequired(mustache, 'path');
+	  this.acceptArray(mustache.params);
+	  this.acceptKey(mustache, 'hash');
+	}
+	function visitBlock(block) {
+	  visitSubExpression.call(this, block);
+
+	  this.acceptKey(block, 'program');
+	  this.acceptKey(block, 'inverse');
+	}
+	function visitPartial(partial) {
+	  this.acceptRequired(partial, 'name');
+	  this.acceptArray(partial.params);
+	  this.acceptKey(partial, 'hash');
+	}
+
+	exports['default'] = Visitor;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 50 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+	exports.SourceLocation = SourceLocation;
+	exports.id = id;
+	exports.stripFlags = stripFlags;
+	exports.stripComment = stripComment;
+	exports.preparePath = preparePath;
+	exports.prepareMustache = prepareMustache;
+	exports.prepareRawBlock = prepareRawBlock;
+	exports.prepareBlock = prepareBlock;
+	exports.prepareProgram = prepareProgram;
+	exports.preparePartialBlock = preparePartialBlock;
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	function validateClose(open, close) {
+	  close = close.path ? close.path.original : close;
+
+	  if (open.path.original !== close) {
+	    var errorNode = { loc: open.path.loc };
+
+	    throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode);
+	  }
+	}
+
+	function SourceLocation(source, locInfo) {
+	  this.source = source;
+	  this.start = {
+	    line: locInfo.first_line,
+	    column: locInfo.first_column
+	  };
+	  this.end = {
+	    line: locInfo.last_line,
+	    column: locInfo.last_column
+	  };
+	}
+
+	function id(token) {
+	  if (/^\[.*\]$/.test(token)) {
+	    return token.substring(1, token.length - 1);
+	  } else {
+	    return token;
+	  }
+	}
+
+	function stripFlags(open, close) {
+	  return {
+	    open: open.charAt(2) === '~',
+	    close: close.charAt(close.length - 3) === '~'
+	  };
+	}
+
+	function stripComment(comment) {
+	  return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, '');
+	}
+
+	function preparePath(data, parts, loc) {
+	  loc = this.locInfo(loc);
+
+	  var original = data ? '@' : '',
+	      dig = [],
+	      depth = 0;
+
+	  for (var i = 0, l = parts.length; i < l; i++) {
+	    var part = parts[i].part,
+
+	    // If we have [] syntax then we do not treat path references as operators,
+	    // i.e. foo.[this] resolves to approximately context.foo['this']
+	    isLiteral = parts[i].original !== part;
+	    original += (parts[i].separator || '') + part;
+
+	    if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {
+	      if (dig.length > 0) {
+	        throw new _exception2['default']('Invalid path: ' + original, { loc: loc });
+	      } else if (part === '..') {
+	        depth++;
+	      }
+	    } else {
+	      dig.push(part);
+	    }
+	  }
+
+	  return {
+	    type: 'PathExpression',
+	    data: data,
+	    depth: depth,
+	    parts: dig,
+	    original: original,
+	    loc: loc
+	  };
+	}
+
+	function prepareMustache(path, params, hash, open, strip, locInfo) {
+	  // Must use charAt to support IE pre-10
+	  var escapeFlag = open.charAt(3) || open.charAt(2),
+	      escaped = escapeFlag !== '{' && escapeFlag !== '&';
+
+	  var decorator = /\*/.test(open);
+	  return {
+	    type: decorator ? 'Decorator' : 'MustacheStatement',
+	    path: path,
+	    params: params,
+	    hash: hash,
+	    escaped: escaped,
+	    strip: strip,
+	    loc: this.locInfo(locInfo)
+	  };
+	}
+
+	function prepareRawBlock(openRawBlock, contents, close, locInfo) {
+	  validateClose(openRawBlock, close);
+
+	  locInfo = this.locInfo(locInfo);
+	  var program = {
+	    type: 'Program',
+	    body: contents,
+	    strip: {},
+	    loc: locInfo
+	  };
+
+	  return {
+	    type: 'BlockStatement',
+	    path: openRawBlock.path,
+	    params: openRawBlock.params,
+	    hash: openRawBlock.hash,
+	    program: program,
+	    openStrip: {},
+	    inverseStrip: {},
+	    closeStrip: {},
+	    loc: locInfo
+	  };
+	}
+
+	function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
+	  if (close && close.path) {
+	    validateClose(openBlock, close);
+	  }
+
+	  var decorator = /\*/.test(openBlock.open);
+
+	  program.blockParams = openBlock.blockParams;
+
+	  var inverse = undefined,
+	      inverseStrip = undefined;
+
+	  if (inverseAndProgram) {
+	    if (decorator) {
+	      throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);
+	    }
+
+	    if (inverseAndProgram.chain) {
+	      inverseAndProgram.program.body[0].closeStrip = close.strip;
+	    }
+
+	    inverseStrip = inverseAndProgram.strip;
+	    inverse = inverseAndProgram.program;
+	  }
+
+	  if (inverted) {
+	    inverted = inverse;
+	    inverse = program;
+	    program = inverted;
+	  }
+
+	  return {
+	    type: decorator ? 'DecoratorBlock' : 'BlockStatement',
+	    path: openBlock.path,
+	    params: openBlock.params,
+	    hash: openBlock.hash,
+	    program: program,
+	    inverse: inverse,
+	    openStrip: openBlock.strip,
+	    inverseStrip: inverseStrip,
+	    closeStrip: close && close.strip,
+	    loc: this.locInfo(locInfo)
+	  };
+	}
+
+	function prepareProgram(statements, loc) {
+	  if (!loc && statements.length) {
+	    var firstLoc = statements[0].loc,
+	        lastLoc = statements[statements.length - 1].loc;
+
+	    /* istanbul ignore else */
+	    if (firstLoc && lastLoc) {
+	      loc = {
+	        source: firstLoc.source,
+	        start: {
+	          line: firstLoc.start.line,
+	          column: firstLoc.start.column
+	        },
+	        end: {
+	          line: lastLoc.end.line,
+	          column: lastLoc.end.column
+	        }
+	      };
+	    }
+	  }
+
+	  return {
+	    type: 'Program',
+	    body: statements,
+	    strip: {},
+	    loc: loc
+	  };
+	}
+
+	function preparePartialBlock(open, program, close, locInfo) {
+	  validateClose(open, close);
+
+	  return {
+	    type: 'PartialBlockStatement',
+	    name: open.path,
+	    params: open.params,
+	    hash: open.hash,
+	    program: program,
+	    openStrip: open.strip,
+	    closeStrip: close && close.strip,
+	    loc: this.locInfo(locInfo)
+	  };
+	}
+
+/***/ }),
+/* 51 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	/* eslint-disable new-cap */
+
+	'use strict';
+
+	var _Object$create = __webpack_require__(34)['default'];
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+	exports.Compiler = Compiler;
+	exports.precompile = precompile;
+	exports.compile = compile;
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	var _utils = __webpack_require__(5);
+
+	var _ast = __webpack_require__(45);
+
+	var _ast2 = _interopRequireDefault(_ast);
+
+	var slice = [].slice;
+
+	function Compiler() {}
+
+	// the foundHelper register will disambiguate helper lookup from finding a
+	// function in a context. This is necessary for mustache compatibility, which
+	// requires that context functions in blocks are evaluated by blockHelperMissing,
+	// and then proceed as if the resulting value was provided to blockHelperMissing.
+
+	Compiler.prototype = {
+	  compiler: Compiler,
+
+	  equals: function equals(other) {
+	    var len = this.opcodes.length;
+	    if (other.opcodes.length !== len) {
+	      return false;
+	    }
+
+	    for (var i = 0; i < len; i++) {
+	      var opcode = this.opcodes[i],
+	          otherOpcode = other.opcodes[i];
+	      if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
+	        return false;
+	      }
+	    }
+
+	    // We know that length is the same between the two arrays because they are directly tied
+	    // to the opcode behavior above.
+	    len = this.children.length;
+	    for (var i = 0; i < len; i++) {
+	      if (!this.children[i].equals(other.children[i])) {
+	        return false;
+	      }
+	    }
+
+	    return true;
+	  },
+
+	  guid: 0,
+
+	  compile: function compile(program, options) {
+	    this.sourceNode = [];
+	    this.opcodes = [];
+	    this.children = [];
+	    this.options = options;
+	    this.stringParams = options.stringParams;
+	    this.trackIds = options.trackIds;
+
+	    options.blockParams = options.blockParams || [];
+
+	    options.knownHelpers = _utils.extend(_Object$create(null), {
+	      helperMissing: true,
+	      blockHelperMissing: true,
+	      each: true,
+	      'if': true,
+	      unless: true,
+	      'with': true,
+	      log: true,
+	      lookup: true
+	    }, options.knownHelpers);
+
+	    return this.accept(program);
+	  },
+
+	  compileProgram: function compileProgram(program) {
+	    var childCompiler = new this.compiler(),
+	        // eslint-disable-line new-cap
+	    result = childCompiler.compile(program, this.options),
+	        guid = this.guid++;
+
+	    this.usePartial = this.usePartial || result.usePartial;
+
+	    this.children[guid] = result;
+	    this.useDepths = this.useDepths || result.useDepths;
+
+	    return guid;
+	  },
+
+	  accept: function accept(node) {
+	    /* istanbul ignore next: Sanity code */
+	    if (!this[node.type]) {
+	      throw new _exception2['default']('Unknown type: ' + node.type, node);
+	    }
+
+	    this.sourceNode.unshift(node);
+	    var ret = this[node.type](node);
+	    this.sourceNode.shift();
+	    return ret;
+	  },
+
+	  Program: function Program(program) {
+	    this.options.blockParams.unshift(program.blockParams);
+
+	    var body = program.body,
+	        bodyLength = body.length;
+	    for (var i = 0; i < bodyLength; i++) {
+	      this.accept(body[i]);
+	    }
+
+	    this.options.blockParams.shift();
+
+	    this.isSimple = bodyLength === 1;
+	    this.blockParams = program.blockParams ? program.blockParams.length : 0;
+
+	    return this;
+	  },
+
+	  BlockStatement: function BlockStatement(block) {
+	    transformLiteralToPath(block);
+
+	    var program = block.program,
+	        inverse = block.inverse;
+
+	    program = program && this.compileProgram(program);
+	    inverse = inverse && this.compileProgram(inverse);
+
+	    var type = this.classifySexpr(block);
+
+	    if (type === 'helper') {
+	      this.helperSexpr(block, program, inverse);
+	    } else if (type === 'simple') {
+	      this.simpleSexpr(block);
+
+	      // now that the simple mustache is resolved, we need to
+	      // evaluate it by executing `blockHelperMissing`
+	      this.opcode('pushProgram', program);
+	      this.opcode('pushProgram', inverse);
+	      this.opcode('emptyHash');
+	      this.opcode('blockValue', block.path.original);
+	    } else {
+	      this.ambiguousSexpr(block, program, inverse);
+
+	      // now that the simple mustache is resolved, we need to
+	      // evaluate it by executing `blockHelperMissing`
+	      this.opcode('pushProgram', program);
+	      this.opcode('pushProgram', inverse);
+	      this.opcode('emptyHash');
+	      this.opcode('ambiguousBlockValue');
+	    }
+
+	    this.opcode('append');
+	  },
+
+	  DecoratorBlock: function DecoratorBlock(decorator) {
+	    var program = decorator.program && this.compileProgram(decorator.program);
+	    var params = this.setupFullMustacheParams(decorator, program, undefined),
+	        path = decorator.path;
+
+	    this.useDecorators = true;
+	    this.opcode('registerDecorator', params.length, path.original);
+	  },
+
+	  PartialStatement: function PartialStatement(partial) {
+	    this.usePartial = true;
+
+	    var program = partial.program;
+	    if (program) {
+	      program = this.compileProgram(partial.program);
+	    }
+
+	    var params = partial.params;
+	    if (params.length > 1) {
+	      throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);
+	    } else if (!params.length) {
+	      if (this.options.explicitPartialContext) {
+	        this.opcode('pushLiteral', 'undefined');
+	      } else {
+	        params.push({ type: 'PathExpression', parts: [], depth: 0 });
+	      }
+	    }
+
+	    var partialName = partial.name.original,
+	        isDynamic = partial.name.type === 'SubExpression';
+	    if (isDynamic) {
+	      this.accept(partial.name);
+	    }
+
+	    this.setupFullMustacheParams(partial, program, undefined, true);
+
+	    var indent = partial.indent || '';
+	    if (this.options.preventIndent && indent) {
+	      this.opcode('appendContent', indent);
+	      indent = '';
+	    }
+
+	    this.opcode('invokePartial', isDynamic, partialName, indent);
+	    this.opcode('append');
+	  },
+	  PartialBlockStatement: function PartialBlockStatement(partialBlock) {
+	    this.PartialStatement(partialBlock);
+	  },
+
+	  MustacheStatement: function MustacheStatement(mustache) {
+	    this.SubExpression(mustache);
+
+	    if (mustache.escaped && !this.options.noEscape) {
+	      this.opcode('appendEscaped');
+	    } else {
+	      this.opcode('append');
+	    }
+	  },
+	  Decorator: function Decorator(decorator) {
+	    this.DecoratorBlock(decorator);
+	  },
+
+	  ContentStatement: function ContentStatement(content) {
+	    if (content.value) {
+	      this.opcode('appendContent', content.value);
+	    }
+	  },
+
+	  CommentStatement: function CommentStatement() {},
+
+	  SubExpression: function SubExpression(sexpr) {
+	    transformLiteralToPath(sexpr);
+	    var type = this.classifySexpr(sexpr);
+
+	    if (type === 'simple') {
+	      this.simpleSexpr(sexpr);
+	    } else if (type === 'helper') {
+	      this.helperSexpr(sexpr);
+	    } else {
+	      this.ambiguousSexpr(sexpr);
+	    }
+	  },
+	  ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
+	    var path = sexpr.path,
+	        name = path.parts[0],
+	        isBlock = program != null || inverse != null;
+
+	    this.opcode('getContext', path.depth);
+
+	    this.opcode('pushProgram', program);
+	    this.opcode('pushProgram', inverse);
+
+	    path.strict = true;
+	    this.accept(path);
+
+	    this.opcode('invokeAmbiguous', name, isBlock);
+	  },
+
+	  simpleSexpr: function simpleSexpr(sexpr) {
+	    var path = sexpr.path;
+	    path.strict = true;
+	    this.accept(path);
+	    this.opcode('resolvePossibleLambda');
+	  },
+
+	  helperSexpr: function helperSexpr(sexpr, program, inverse) {
+	    var params = this.setupFullMustacheParams(sexpr, program, inverse),
+	        path = sexpr.path,
+	        name = path.parts[0];
+
+	    if (this.options.knownHelpers[name]) {
+	      this.opcode('invokeKnownHelper', params.length, name);
+	    } else if (this.options.knownHelpersOnly) {
+	      throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);
+	    } else {
+	      path.strict = true;
+	      path.falsy = true;
+
+	      this.accept(path);
+	      this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));
+	    }
+	  },
+
+	  PathExpression: function PathExpression(path) {
+	    this.addDepth(path.depth);
+	    this.opcode('getContext', path.depth);
+
+	    var name = path.parts[0],
+	        scoped = _ast2['default'].helpers.scopedId(path),
+	        blockParamId = !path.depth && !scoped && this.blockParamIndex(name);
+
+	    if (blockParamId) {
+	      this.opcode('lookupBlockParam', blockParamId, path.parts);
+	    } else if (!name) {
+	      // Context reference, i.e. `{{foo .}}` or `{{foo ..}}`
+	      this.opcode('pushContext');
+	    } else if (path.data) {
+	      this.options.data = true;
+	      this.opcode('lookupData', path.depth, path.parts, path.strict);
+	    } else {
+	      this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);
+	    }
+	  },
+
+	  StringLiteral: function StringLiteral(string) {
+	    this.opcode('pushString', string.value);
+	  },
+
+	  NumberLiteral: function NumberLiteral(number) {
+	    this.opcode('pushLiteral', number.value);
+	  },
+
+	  BooleanLiteral: function BooleanLiteral(bool) {
+	    this.opcode('pushLiteral', bool.value);
+	  },
+
+	  UndefinedLiteral: function UndefinedLiteral() {
+	    this.opcode('pushLiteral', 'undefined');
+	  },
+
+	  NullLiteral: function NullLiteral() {
+	    this.opcode('pushLiteral', 'null');
+	  },
+
+	  Hash: function Hash(hash) {
+	    var pairs = hash.pairs,
+	        i = 0,
+	        l = pairs.length;
+
+	    this.opcode('pushHash');
+
+	    for (; i < l; i++) {
+	      this.pushParam(pairs[i].value);
+	    }
+	    while (i--) {
+	      this.opcode('assignToHash', pairs[i].key);
+	    }
+	    this.opcode('popHash');
+	  },
+
+	  // HELPERS
+	  opcode: function opcode(name) {
+	    this.opcodes.push({
+	      opcode: name,
+	      args: slice.call(arguments, 1),
+	      loc: this.sourceNode[0].loc
+	    });
+	  },
+
+	  addDepth: function addDepth(depth) {
+	    if (!depth) {
+	      return;
+	    }
+
+	    this.useDepths = true;
+	  },
+
+	  classifySexpr: function classifySexpr(sexpr) {
+	    var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);
+
+	    var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
+
+	    // a mustache is an eligible helper if:
+	    // * its id is simple (a single part, not `this` or `..`)
+	    var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);
+
+	    // if a mustache is an eligible helper but not a definite
+	    // helper, it is ambiguous, and will be resolved in a later
+	    // pass or at runtime.
+	    var isEligible = !isBlockParam && (isHelper || isSimple);
+
+	    // if ambiguous, we can possibly resolve the ambiguity now
+	    // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.
+	    if (isEligible && !isHelper) {
+	      var _name = sexpr.path.parts[0],
+	          options = this.options;
+	      if (options.knownHelpers[_name]) {
+	        isHelper = true;
+	      } else if (options.knownHelpersOnly) {
+	        isEligible = false;
+	      }
+	    }
+
+	    if (isHelper) {
+	      return 'helper';
+	    } else if (isEligible) {
+	      return 'ambiguous';
+	    } else {
+	      return 'simple';
+	    }
+	  },
+
+	  pushParams: function pushParams(params) {
+	    for (var i = 0, l = params.length; i < l; i++) {
+	      this.pushParam(params[i]);
+	    }
+	  },
+
+	  pushParam: function pushParam(val) {
+	    var value = val.value != null ? val.value : val.original || '';
+
+	    if (this.stringParams) {
+	      if (value.replace) {
+	        value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.');
+	      }
+
+	      if (val.depth) {
+	        this.addDepth(val.depth);
+	      }
+	      this.opcode('getContext', val.depth || 0);
+	      this.opcode('pushStringParam', value, val.type);
+
+	      if (val.type === 'SubExpression') {
+	        // SubExpressions get evaluated and passed in
+	        // in string params mode.
+	        this.accept(val);
+	      }
+	    } else {
+	      if (this.trackIds) {
+	        var blockParamIndex = undefined;
+	        if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {
+	          blockParamIndex = this.blockParamIndex(val.parts[0]);
+	        }
+	        if (blockParamIndex) {
+	          var blockParamChild = val.parts.slice(1).join('.');
+	          this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);
+	        } else {
+	          value = val.original || value;
+	          if (value.replace) {
+	            value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, '');
+	          }
+
+	          this.opcode('pushId', val.type, value);
+	        }
+	      }
+	      this.accept(val);
+	    }
+	  },
+
+	  setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
+	    var params = sexpr.params;
+	    this.pushParams(params);
+
+	    this.opcode('pushProgram', program);
+	    this.opcode('pushProgram', inverse);
+
+	    if (sexpr.hash) {
+	      this.accept(sexpr.hash);
+	    } else {
+	      this.opcode('emptyHash', omitEmpty);
+	    }
+
+	    return params;
+	  },
+
+	  blockParamIndex: function blockParamIndex(name) {
+	    for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
+	      var blockParams = this.options.blockParams[depth],
+	          param = blockParams && _utils.indexOf(blockParams, name);
+	      if (blockParams && param >= 0) {
+	        return [depth, param];
+	      }
+	    }
+	  }
+	};
+
+	function precompile(input, options, env) {
+	  if (input == null || typeof input !== 'string' && input.type !== 'Program') {
+	    throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);
+	  }
+
+	  options = options || {};
+	  if (!('data' in options)) {
+	    options.data = true;
+	  }
+	  if (options.compat) {
+	    options.useDepths = true;
+	  }
+
+	  var ast = env.parse(input, options),
+	      environment = new env.Compiler().compile(ast, options);
+	  return new env.JavaScriptCompiler().compile(environment, options);
+	}
+
+	function compile(input, options, env) {
+	  if (options === undefined) options = {};
+
+	  if (input == null || typeof input !== 'string' && input.type !== 'Program') {
+	    throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);
+	  }
+
+	  options = _utils.extend({}, options);
+	  if (!('data' in options)) {
+	    options.data = true;
+	  }
+	  if (options.compat) {
+	    options.useDepths = true;
+	  }
+
+	  var compiled = undefined;
+
+	  function compileInput() {
+	    var ast = env.parse(input, options),
+	        environment = new env.Compiler().compile(ast, options),
+	        templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);
+	    return env.template(templateSpec);
+	  }
+
+	  // Template is only compiled on first use and cached after that point.
+	  function ret(context, execOptions) {
+	    if (!compiled) {
+	      compiled = compileInput();
+	    }
+	    return compiled.call(this, context, execOptions);
+	  }
+	  ret._setup = function (setupOptions) {
+	    if (!compiled) {
+	      compiled = compileInput();
+	    }
+	    return compiled._setup(setupOptions);
+	  };
+	  ret._child = function (i, data, blockParams, depths) {
+	    if (!compiled) {
+	      compiled = compileInput();
+	    }
+	    return compiled._child(i, data, blockParams, depths);
+	  };
+	  return ret;
+	}
+
+	function argEquals(a, b) {
+	  if (a === b) {
+	    return true;
+	  }
+
+	  if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
+	    for (var i = 0; i < a.length; i++) {
+	      if (!argEquals(a[i], b[i])) {
+	        return false;
+	      }
+	    }
+	    return true;
+	  }
+	}
+
+	function transformLiteralToPath(sexpr) {
+	  if (!sexpr.path.parts) {
+	    var literal = sexpr.path;
+	    // Casting to string here to make false and 0 literal values play nicely with the rest
+	    // of the system.
+	    sexpr.path = {
+	      type: 'PathExpression',
+	      data: false,
+	      depth: 0,
+	      parts: [literal.original + ''],
+	      original: literal.original + '',
+	      loc: literal.loc
+	    };
+	  }
+	}
+
+/***/ }),
+/* 52 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	'use strict';
+
+	var _Object$keys = __webpack_require__(13)['default'];
+
+	var _interopRequireDefault = __webpack_require__(1)['default'];
+
+	exports.__esModule = true;
+
+	var _base = __webpack_require__(4);
+
+	var _exception = __webpack_require__(6);
+
+	var _exception2 = _interopRequireDefault(_exception);
+
+	var _utils = __webpack_require__(5);
+
+	var _codeGen = __webpack_require__(53);
+
+	var _codeGen2 = _interopRequireDefault(_codeGen);
+
+	function Literal(value) {
+	  this.value = value;
+	}
+
+	function JavaScriptCompiler() {}
+
+	JavaScriptCompiler.prototype = {
+	  // PUBLIC API: You can override these methods in a subclass to provide
+	  // alternative compiled forms for name lookup and buffering semantics
+	  nameLookup: function nameLookup(parent, name /*,  type */) {
+	    return this.internalNameLookup(parent, name);
+	  },
+	  depthedLookup: function depthedLookup(name) {
+	    return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')'];
+	  },
+
+	  compilerInfo: function compilerInfo() {
+	    var revision = _base.COMPILER_REVISION,
+	        versions = _base.REVISION_CHANGES[revision];
+	    return [revision, versions];
+	  },
+
+	  appendToBuffer: function appendToBuffer(source, location, explicit) {
+	    // Force a source as this simplifies the merge logic.
+	    if (!_utils.isArray(source)) {
+	      source = [source];
+	    }
+	    source = this.source.wrap(source, location);
+
+	    if (this.environment.isSimple) {
+	      return ['return ', source, ';'];
+	    } else if (explicit) {
+	      // This is a case where the buffer operation occurs as a child of another
+	      // construct, generally braces. We have to explicitly output these buffer
+	      // operations to ensure that the emitted code goes in the correct location.
+	      return ['buffer += ', source, ';'];
+	    } else {
+	      source.appendToBuffer = true;
+	      return source;
+	    }
+	  },
+
+	  initializeBuffer: function initializeBuffer() {
+	    return this.quotedString('');
+	  },
+	  // END PUBLIC API
+	  internalNameLookup: function internalNameLookup(parent, name) {
+	    this.lookupPropertyFunctionIsUsed = true;
+	    return ['lookupProperty(', parent, ',', JSON.stringify(name), ')'];
+	  },
+
+	  lookupPropertyFunctionIsUsed: false,
+
+	  compile: function compile(environment, options, context, asObject) {
+	    this.environment = environment;
+	    this.options = options;
+	    this.stringParams = this.options.stringParams;
+	    this.trackIds = this.options.trackIds;
+	    this.precompile = !asObject;
+
+	    this.name = this.environment.name;
+	    this.isChild = !!context;
+	    this.context = context || {
+	      decorators: [],
+	      programs: [],
+	      environments: []
+	    };
+
+	    this.preamble();
+
+	    this.stackSlot = 0;
+	    this.stackVars = [];
+	    this.aliases = {};
+	    this.registers = { list: [] };
+	    this.hashes = [];
+	    this.compileStack = [];
+	    this.inlineStack = [];
+	    this.blockParams = [];
+
+	    this.compileChildren(environment, options);
+
+	    this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
+	    this.useBlockParams = this.useBlockParams || environment.useBlockParams;
+
+	    var opcodes = environment.opcodes,
+	        opcode = undefined,
+	        firstLoc = undefined,
+	        i = undefined,
+	        l = undefined;
+
+	    for (i = 0, l = opcodes.length; i < l; i++) {
+	      opcode = opcodes[i];
+
+	      this.source.currentLocation = opcode.loc;
+	      firstLoc = firstLoc || opcode.loc;
+	      this[opcode.opcode].apply(this, opcode.args);
+	    }
+
+	    // Flush any trailing content that might be pending.
+	    this.source.currentLocation = firstLoc;
+	    this.pushSource('');
+
+	    /* istanbul ignore next */
+	    if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
+	      throw new _exception2['default']('Compile completed with content left on stack');
+	    }
+
+	    if (!this.decorators.isEmpty()) {
+	      this.useDecorators = true;
+
+	      this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']);
+	      this.decorators.push('return fn;');
+
+	      if (asObject) {
+	        this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);
+	      } else {
+	        this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n');
+	        this.decorators.push('}\n');
+	        this.decorators = this.decorators.merge();
+	      }
+	    } else {
+	      this.decorators = undefined;
+	    }
+
+	    var fn = this.createFunctionContext(asObject);
+	    if (!this.isChild) {
+	      var ret = {
+	        compiler: this.compilerInfo(),
+	        main: fn
+	      };
+
+	      if (this.decorators) {
+	        ret.main_d = this.decorators; // eslint-disable-line camelcase
+	        ret.useDecorators = true;
+	      }
+
+	      var _context = this.context;
+	      var programs = _context.programs;
+	      var decorators = _context.decorators;
+
+	      for (i = 0, l = programs.length; i < l; i++) {
+	        if (programs[i]) {
+	          ret[i] = programs[i];
+	          if (decorators[i]) {
+	            ret[i + '_d'] = decorators[i];
+	            ret.useDecorators = true;
+	          }
+	        }
+	      }
+
+	      if (this.environment.usePartial) {
+	        ret.usePartial = true;
+	      }
+	      if (this.options.data) {
+	        ret.useData = true;
+	      }
+	      if (this.useDepths) {
+	        ret.useDepths = true;
+	      }
+	      if (this.useBlockParams) {
+	        ret.useBlockParams = true;
+	      }
+	      if (this.options.compat) {
+	        ret.compat = true;
+	      }
+
+	      if (!asObject) {
+	        ret.compiler = JSON.stringify(ret.compiler);
+
+	        this.source.currentLocation = { start: { line: 1, column: 0 } };
+	        ret = this.objectLiteral(ret);
+
+	        if (options.srcName) {
+	          ret = ret.toStringWithSourceMap({ file: options.destName });
+	          ret.map = ret.map && ret.map.toString();
+	        } else {
+	          ret = ret.toString();
+	        }
+	      } else {
+	        ret.compilerOptions = this.options;
+	      }
+
+	      return ret;
+	    } else {
+	      return fn;
+	    }
+	  },
+
+	  preamble: function preamble() {
+	    // track the last context pushed into place to allow skipping the
+	    // getContext opcode when it would be a noop
+	    this.lastContext = 0;
+	    this.source = new _codeGen2['default'](this.options.srcName);
+	    this.decorators = new _codeGen2['default'](this.options.srcName);
+	  },
+
+	  createFunctionContext: function createFunctionContext(asObject) {
+	    // istanbul ignore next
+
+	    var _this = this;
+
+	    var varDeclarations = '';
+
+	    var locals = this.stackVars.concat(this.registers.list);
+	    if (locals.length > 0) {
+	      varDeclarations += ', ' + locals.join(', ');
+	    }
+
+	    // Generate minimizer alias mappings
+	    //
+	    // When using true SourceNodes, this will update all references to the given alias
+	    // as the source nodes are reused in situ. For the non-source node compilation mode,
+	    // aliases will not be used, but this case is already being run on the client and
+	    // we aren't concern about minimizing the template size.
+	    var aliasCount = 0;
+	    _Object$keys(this.aliases).forEach(function (alias) {
+	      var node = _this.aliases[alias];
+	      if (node.children && node.referenceCount > 1) {
+	        varDeclarations += ', alias' + ++aliasCount + '=' + alias;
+	        node.children[0] = 'alias' + aliasCount;
+	      }
+	    });
+
+	    if (this.lookupPropertyFunctionIsUsed) {
+	      varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration();
+	    }
+
+	    var params = ['container', 'depth0', 'helpers', 'partials', 'data'];
+
+	    if (this.useBlockParams || this.useDepths) {
+	      params.push('blockParams');
+	    }
+	    if (this.useDepths) {
+	      params.push('depths');
+	    }
+
+	    // Perform a second pass over the output to merge content when possible
+	    var source = this.mergeSource(varDeclarations);
+
+	    if (asObject) {
+	      params.push(source);
+
+	      return Function.apply(this, params);
+	    } else {
+	      return this.source.wrap(['function(', params.join(','), ') {\n  ', source, '}']);
+	    }
+	  },
+	  mergeSource: function mergeSource(varDeclarations) {
+	    var isSimple = this.environment.isSimple,
+	        appendOnly = !this.forceBuffer,
+	        appendFirst = undefined,
+	        sourceSeen = undefined,
+	        bufferStart = undefined,
+	        bufferEnd = undefined;
+	    this.source.each(function (line) {
+	      if (line.appendToBuffer) {
+	        if (bufferStart) {
+	          line.prepend('  + ');
+	        } else {
+	          bufferStart = line;
+	        }
+	        bufferEnd = line;
+	      } else {
+	        if (bufferStart) {
+	          if (!sourceSeen) {
+	            appendFirst = true;
+	          } else {
+	            bufferStart.prepend('buffer += ');
+	          }
+	          bufferEnd.add(';');
+	          bufferStart = bufferEnd = undefined;
+	        }
+
+	        sourceSeen = true;
+	        if (!isSimple) {
+	          appendOnly = false;
+	        }
+	      }
+	    });
+
+	    if (appendOnly) {
+	      if (bufferStart) {
+	        bufferStart.prepend('return ');
+	        bufferEnd.add(';');
+	      } else if (!sourceSeen) {
+	        this.source.push('return "";');
+	      }
+	    } else {
+	      varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());
+
+	      if (bufferStart) {
+	        bufferStart.prepend('return buffer + ');
+	        bufferEnd.add(';');
+	      } else {
+	        this.source.push('return buffer;');
+	      }
+	    }
+
+	    if (varDeclarations) {
+	      this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n'));
+	    }
+
+	    return this.source.merge();
+	  },
+
+	  lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() {
+	    return '\n      lookupProperty = container.lookupProperty || function(parent, propertyName) {\n        if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n          return parent[propertyName];\n        }\n        return undefined\n    }\n    '.trim();
+	  },
+
+	  // [blockValue]
+	  //
+	  // On stack, before: hash, inverse, program, value
+	  // On stack, after: return value of blockHelperMissing
+	  //
+	  // The purpose of this opcode is to take a block of the form
+	  // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
+	  // replace it on the stack with the result of properly
+	  // invoking blockHelperMissing.
+	  blockValue: function blockValue(name) {
+	    var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'),
+	        params = [this.contextName(0)];
+	    this.setupHelperArgs(name, 0, params);
+
+	    var blockName = this.popStack();
+	    params.splice(1, 0, blockName);
+
+	    this.push(this.source.functionCall(blockHelperMissing, 'call', params));
+	  },
+
+	  // [ambiguousBlockValue]
+	  //
+	  // On stack, before: hash, inverse, program, value
+	  // Compiler value, before: lastHelper=value of last found helper, if any
+	  // On stack, after, if no lastHelper: same as [blockValue]
+	  // On stack, after, if lastHelper: value
+	  ambiguousBlockValue: function ambiguousBlockValue() {
+	    // We're being a bit cheeky and reusing the options value from the prior exec
+	    var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'),
+	        params = [this.contextName(0)];
+	    this.setupHelperArgs('', 0, params, true);
+
+	    this.flushInline();
+
+	    var current = this.topStack();
+	    params.splice(1, 0, current);
+
+	    this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);
+	  },
+
+	  // [appendContent]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: ...
+	  //
+	  // Appends the string value of `content` to the current buffer
+	  appendContent: function appendContent(content) {
+	    if (this.pendingContent) {
+	      content = this.pendingContent + content;
+	    } else {
+	      this.pendingLocation = this.source.currentLocation;
+	    }
+
+	    this.pendingContent = content;
+	  },
+
+	  // [append]
+	  //
+	  // On stack, before: value, ...
+	  // On stack, after: ...
+	  //
+	  // Coerces `value` to a String and appends it to the current buffer.
+	  //
+	  // If `value` is truthy, or 0, it is coerced into a string and appended
+	  // Otherwise, the empty string is appended
+	  append: function append() {
+	    if (this.isInline()) {
+	      this.replaceStack(function (current) {
+	        return [' != null ? ', current, ' : ""'];
+	      });
+
+	      this.pushSource(this.appendToBuffer(this.popStack()));
+	    } else {
+	      var local = this.popStack();
+	      this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);
+	      if (this.environment.isSimple) {
+	        this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']);
+	      }
+	    }
+	  },
+
+	  // [appendEscaped]
+	  //
+	  // On stack, before: value, ...
+	  // On stack, after: ...
+	  //
+	  // Escape `value` and append it to the buffer
+	  appendEscaped: function appendEscaped() {
+	    this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));
+	  },
+
+	  // [getContext]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: ...
+	  // Compiler value, after: lastContext=depth
+	  //
+	  // Set the value of the `lastContext` compiler value to the depth
+	  getContext: function getContext(depth) {
+	    this.lastContext = depth;
+	  },
+
+	  // [pushContext]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: currentContext, ...
+	  //
+	  // Pushes the value of the current context onto the stack.
+	  pushContext: function pushContext() {
+	    this.pushStackLiteral(this.contextName(this.lastContext));
+	  },
+
+	  // [lookupOnContext]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: currentContext[name], ...
+	  //
+	  // Looks up the value of `name` on the current context and pushes
+	  // it onto the stack.
+	  lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
+	    var i = 0;
+
+	    if (!scoped && this.options.compat && !this.lastContext) {
+	      // The depthed query is expected to handle the undefined logic for the root level that
+	      // is implemented below, so we evaluate that directly in compat mode
+	      this.push(this.depthedLookup(parts[i++]));
+	    } else {
+	      this.pushContext();
+	    }
+
+	    this.resolvePath('context', parts, i, falsy, strict);
+	  },
+
+	  // [lookupBlockParam]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: blockParam[name], ...
+	  //
+	  // Looks up the value of `parts` on the given block param and pushes
+	  // it onto the stack.
+	  lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
+	    this.useBlockParams = true;
+
+	    this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);
+	    this.resolvePath('context', parts, 1);
+	  },
+
+	  // [lookupData]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: data, ...
+	  //
+	  // Push the data lookup operator
+	  lookupData: function lookupData(depth, parts, strict) {
+	    if (!depth) {
+	      this.pushStackLiteral('data');
+	    } else {
+	      this.pushStackLiteral('container.data(data, ' + depth + ')');
+	    }
+
+	    this.resolvePath('data', parts, 0, true, strict);
+	  },
+
+	  resolvePath: function resolvePath(type, parts, i, falsy, strict) {
+	    // istanbul ignore next
+
+	    var _this2 = this;
+
+	    if (this.options.strict || this.options.assumeObjects) {
+	      this.push(strictLookup(this.options.strict && strict, this, parts, type));
+	      return;
+	    }
+
+	    var len = parts.length;
+	    for (; i < len; i++) {
+	      /* eslint-disable no-loop-func */
+	      this.replaceStack(function (current) {
+	        var lookup = _this2.nameLookup(current, parts[i], type);
+	        // We want to ensure that zero and false are handled properly if the context (falsy flag)
+	        // needs to have the special handling for these values.
+	        if (!falsy) {
+	          return [' != null ? ', lookup, ' : ', current];
+	        } else {
+	          // Otherwise we can use generic falsy handling
+	          return [' && ', lookup];
+	        }
+	      });
+	      /* eslint-enable no-loop-func */
+	    }
+	  },
+
+	  // [resolvePossibleLambda]
+	  //
+	  // On stack, before: value, ...
+	  // On stack, after: resolved value, ...
+	  //
+	  // If the `value` is a lambda, replace it on the stack by
+	  // the return value of the lambda
+	  resolvePossibleLambda: function resolvePossibleLambda() {
+	    this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);
+	  },
+
+	  // [pushStringParam]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: string, currentContext, ...
+	  //
+	  // This opcode is designed for use in string mode, which
+	  // provides the string value of a parameter along with its
+	  // depth rather than resolving it immediately.
+	  pushStringParam: function pushStringParam(string, type) {
+	    this.pushContext();
+	    this.pushString(type);
+
+	    // If it's a subexpression, the string result
+	    // will be pushed after this opcode.
+	    if (type !== 'SubExpression') {
+	      if (typeof string === 'string') {
+	        this.pushString(string);
+	      } else {
+	        this.pushStackLiteral(string);
+	      }
+	    }
+	  },
+
+	  emptyHash: function emptyHash(omitEmpty) {
+	    if (this.trackIds) {
+	      this.push('{}'); // hashIds
+	    }
+	    if (this.stringParams) {
+	      this.push('{}'); // hashContexts
+	      this.push('{}'); // hashTypes
+	    }
+	    this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');
+	  },
+	  pushHash: function pushHash() {
+	    if (this.hash) {
+	      this.hashes.push(this.hash);
+	    }
+	    this.hash = { values: {}, types: [], contexts: [], ids: [] };
+	  },
+	  popHash: function popHash() {
+	    var hash = this.hash;
+	    this.hash = this.hashes.pop();
+
+	    if (this.trackIds) {
+	      this.push(this.objectLiteral(hash.ids));
+	    }
+	    if (this.stringParams) {
+	      this.push(this.objectLiteral(hash.contexts));
+	      this.push(this.objectLiteral(hash.types));
+	    }
+
+	    this.push(this.objectLiteral(hash.values));
+	  },
+
+	  // [pushString]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: quotedString(string), ...
+	  //
+	  // Push a quoted version of `string` onto the stack
+	  pushString: function pushString(string) {
+	    this.pushStackLiteral(this.quotedString(string));
+	  },
+
+	  // [pushLiteral]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: value, ...
+	  //
+	  // Pushes a value onto the stack. This operation prevents
+	  // the compiler from creating a temporary variable to hold
+	  // it.
+	  pushLiteral: function pushLiteral(value) {
+	    this.pushStackLiteral(value);
+	  },
+
+	  // [pushProgram]
+	  //
+	  // On stack, before: ...
+	  // On stack, after: program(guid), ...
+	  //
+	  // Push a program expression onto the stack. This takes
+	  // a compile-time guid and converts it into a runtime-accessible
+	  // expression.
+	  pushProgram: function pushProgram(guid) {
+	    if (guid != null) {
+	      this.pushStackLiteral(this.programExpression(guid));
+	    } else {
+	      this.pushStackLiteral(null);
+	    }
+	  },
+
+	  // [registerDecorator]
+	  //
+	  // On stack, before: hash, program, params..., ...
+	  // On stack, after: ...
+	  //
+	  // Pops off the decorator's parameters, invokes the decorator,
+	  // and inserts the decorator into the decorators list.
+	  registerDecorator: function registerDecorator(paramSize, name) {
+	    var foundDecorator = this.nameLookup('decorators', name, 'decorator'),
+	        options = this.setupHelperArgs(name, paramSize);
+
+	    this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);
+	  },
+
+	  // [invokeHelper]
+	  //
+	  // On stack, before: hash, inverse, program, params..., ...
+	  // On stack, after: result of helper invocation
+	  //
+	  // Pops off the helper's parameters, invokes the helper,
+	  // and pushes the helper's return value onto the stack.
+	  //
+	  // If the helper is not found, `helperMissing` is called.
+	  invokeHelper: function invokeHelper(paramSize, name, isSimple) {
+	    var nonHelper = this.popStack(),
+	        helper = this.setupHelper(paramSize, name);
+
+	    var possibleFunctionCalls = [];
+
+	    if (isSimple) {
+	      // direct call to helper
+	      possibleFunctionCalls.push(helper.name);
+	    }
+	    // call a function from the input object
+	    possibleFunctionCalls.push(nonHelper);
+	    if (!this.options.strict) {
+	      possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing'));
+	    }
+
+	    var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')'];
+	    var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams);
+	    this.push(functionCall);
+	  },
+
+	  itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
+	    var result = [];
+	    result.push(items[0]);
+	    for (var i = 1; i < items.length; i++) {
+	      result.push(separator, items[i]);
+	    }
+	    return result;
+	  },
+	  // [invokeKnownHelper]
+	  //
+	  // On stack, before: hash, inverse, program, params..., ...
+	  // On stack, after: result of helper invocation
+	  //
+	  // This operation is used when the helper is known to exist,
+	  // so a `helperMissing` fallback is not required.
+	  invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
+	    var helper = this.setupHelper(paramSize, name);
+	    this.push(this.source.functionCall(helper.name, 'call', helper.callParams));
+	  },
+
+	  // [invokeAmbiguous]
+	  //
+	  // On stack, before: hash, inverse, program, params..., ...
+	  // On stack, after: result of disambiguation
+	  //
+	  // This operation is used when an expression like `{{foo}}`
+	  // is provided, but we don't know at compile-time whether it
+	  // is a helper or a path.
+	  //
+	  // This operation emits more code than the other options,
+	  // and can be avoided by passing the `knownHelpers` and
+	  // `knownHelpersOnly` flags at compile-time.
+	  invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
+	    this.useRegister('helper');
+
+	    var nonHelper = this.popStack();
+
+	    this.emptyHash();
+	    var helper = this.setupHelper(0, name, helperCall);
+
+	    var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
+
+	    var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];
+	    if (!this.options.strict) {
+	      lookup[0] = '(helper = ';
+	      lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing'));
+	    }
+
+	    this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);
+	  },
+
+	  // [invokePartial]
+	  //
+	  // On stack, before: context, ...
+	  // On stack after: result of partial invocation
+	  //
+	  // This operation pops off a context, invokes a partial with that context,
+	  // and pushes the result of the invocation back.
+	  invokePartial: function invokePartial(isDynamic, name, indent) {
+	    var params = [],
+	        options = this.setupParams(name, 1, params);
+
+	    if (isDynamic) {
+	      name = this.popStack();
+	      delete options.name;
+	    }
+
+	    if (indent) {
+	      options.indent = JSON.stringify(indent);
+	    }
+	    options.helpers = 'helpers';
+	    options.partials = 'partials';
+	    options.decorators = 'container.decorators';
+
+	    if (!isDynamic) {
+	      params.unshift(this.nameLookup('partials', name, 'partial'));
+	    } else {
+	      params.unshift(name);
+	    }
+
+	    if (this.options.compat) {
+	      options.depths = 'depths';
+	    }
+	    options = this.objectLiteral(options);
+	    params.push(options);
+
+	    this.push(this.source.functionCall('container.invokePartial', '', params));
+	  },
+
+	  // [assignToHash]
+	  //
+	  // On stack, before: value, ..., hash, ...
+	  // On stack, after: ..., hash, ...
+	  //
+	  // Pops a value off the stack and assigns it to the current hash
+	  assignToHash: function assignToHash(key) {
+	    var value = this.popStack(),
+	        context = undefined,
+	        type = undefined,
+	        id = undefined;
+
+	    if (this.trackIds) {
+	      id = this.popStack();
+	    }
+	    if (this.stringParams) {
+	      type = this.popStack();
+	      context = this.popStack();
+	    }
+
+	    var hash = this.hash;
+	    if (context) {
+	      hash.contexts[key] = context;
+	    }
+	    if (type) {
+	      hash.types[key] = type;
+	    }
+	    if (id) {
+	      hash.ids[key] = id;
+	    }
+	    hash.values[key] = value;
+	  },
+
+	  pushId: function pushId(type, name, child) {
+	    if (type === 'BlockParam') {
+	      this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));
+	    } else if (type === 'PathExpression') {
+	      this.pushString(name);
+	    } else if (type === 'SubExpression') {
+	      this.pushStackLiteral('true');
+	    } else {
+	      this.pushStackLiteral('null');
+	    }
+	  },
+
+	  // HELPERS
+
+	  compiler: JavaScriptCompiler,
+
+	  compileChildren: function compileChildren(environment, options) {
+	    var children = environment.children,
+	        child = undefined,
+	        compiler = undefined;
+
+	    for (var i = 0, l = children.length; i < l; i++) {
+	      child = children[i];
+	      compiler = new this.compiler(); // eslint-disable-line new-cap
+
+	      var existing = this.matchExistingProgram(child);
+
+	      if (existing == null) {
+	        this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
+	        var index = this.context.programs.length;
+	        child.index = index;
+	        child.name = 'program' + index;
+	        this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
+	        this.context.decorators[index] = compiler.decorators;
+	        this.context.environments[index] = child;
+
+	        this.useDepths = this.useDepths || compiler.useDepths;
+	        this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
+	        child.useDepths = this.useDepths;
+	        child.useBlockParams = this.useBlockParams;
+	      } else {
+	        child.index = existing.index;
+	        child.name = 'program' + existing.index;
+
+	        this.useDepths = this.useDepths || existing.useDepths;
+	        this.useBlockParams = this.useBlockParams || existing.useBlockParams;
+	      }
+	    }
+	  },
+	  matchExistingProgram: function matchExistingProgram(child) {
+	    for (var i = 0, len = this.context.environments.length; i < len; i++) {
+	      var environment = this.context.environments[i];
+	      if (environment && environment.equals(child)) {
+	        return environment;
+	      }
+	    }
+	  },
+
+	  programExpression: function programExpression(guid) {
+	    var child = this.environment.children[guid],
+	        programParams = [child.index, 'data', child.blockParams];
+
+	    if (this.useBlockParams || this.useDepths) {
+	      programParams.push('blockParams');
+	    }
+	    if (this.useDepths) {
+	      programParams.push('depths');
+	    }
+
+	    return 'container.program(' + programParams.join(', ') + ')';
+	  },
+
+	  useRegister: function useRegister(name) {
+	    if (!this.registers[name]) {
+	      this.registers[name] = true;
+	      this.registers.list.push(name);
+	    }
+	  },
+
+	  push: function push(expr) {
+	    if (!(expr instanceof Literal)) {
+	      expr = this.source.wrap(expr);
+	    }
+
+	    this.inlineStack.push(expr);
+	    return expr;
+	  },
+
+	  pushStackLiteral: function pushStackLiteral(item) {
+	    this.push(new Literal(item));
+	  },
+
+	  pushSource: function pushSource(source) {
+	    if (this.pendingContent) {
+	      this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
+	      this.pendingContent = undefined;
+	    }
+
+	    if (source) {
+	      this.source.push(source);
+	    }
+	  },
+
+	  replaceStack: function replaceStack(callback) {
+	    var prefix = ['('],
+	        stack = undefined,
+	        createdStack = undefined,
+	        usedLiteral = undefined;
+
+	    /* istanbul ignore next */
+	    if (!this.isInline()) {
+	      throw new _exception2['default']('replaceStack on non-inline');
+	    }
+
+	    // We want to merge the inline statement into the replacement statement via ','
+	    var top = this.popStack(true);
+
+	    if (top instanceof Literal) {
+	      // Literals do not need to be inlined
+	      stack = [top.value];
+	      prefix = ['(', stack];
+	      usedLiteral = true;
+	    } else {
+	      // Get or create the current stack name for use by the inline
+	      createdStack = true;
+	      var _name = this.incrStack();
+
+	      prefix = ['((', this.push(_name), ' = ', top, ')'];
+	      stack = this.topStack();
+	    }
+
+	    var item = callback.call(this, stack);
+
+	    if (!usedLiteral) {
+	      this.popStack();
+	    }
+	    if (createdStack) {
+	      this.stackSlot--;
+	    }
+	    this.push(prefix.concat(item, ')'));
+	  },
+
+	  incrStack: function incrStack() {
+	    this.stackSlot++;
+	    if (this.stackSlot > this.stackVars.length) {
+	      this.stackVars.push('stack' + this.stackSlot);
+	    }
+	    return this.topStackName();
+	  },
+	  topStackName: function topStackName() {
+	    return 'stack' + this.stackSlot;
+	  },
+	  flushInline: function flushInline() {
+	    var inlineStack = this.inlineStack;
+	    this.inlineStack = [];
+	    for (var i = 0, len = inlineStack.length; i < len; i++) {
+	      var entry = inlineStack[i];
+	      /* istanbul ignore if */
+	      if (entry instanceof Literal) {
+	        this.compileStack.push(entry);
+	      } else {
+	        var stack = this.incrStack();
+	        this.pushSource([stack, ' = ', entry, ';']);
+	        this.compileStack.push(stack);
+	      }
+	    }
+	  },
+	  isInline: function isInline() {
+	    return this.inlineStack.length;
+	  },
+
+	  popStack: function popStack(wrapped) {
+	    var inline = this.isInline(),
+	        item = (inline ? this.inlineStack : this.compileStack).pop();
+
+	    if (!wrapped && item instanceof Literal) {
+	      return item.value;
+	    } else {
+	      if (!inline) {
+	        /* istanbul ignore next */
+	        if (!this.stackSlot) {
+	          throw new _exception2['default']('Invalid stack pop');
+	        }
+	        this.stackSlot--;
+	      }
+	      return item;
+	    }
+	  },
+
+	  topStack: function topStack() {
+	    var stack = this.isInline() ? this.inlineStack : this.compileStack,
+	        item = stack[stack.length - 1];
+
+	    /* istanbul ignore if */
+	    if (item instanceof Literal) {
+	      return item.value;
+	    } else {
+	      return item;
+	    }
+	  },
+
+	  contextName: function contextName(context) {
+	    if (this.useDepths && context) {
+	      return 'depths[' + context + ']';
+	    } else {
+	      return 'depth' + context;
+	    }
+	  },
+
+	  quotedString: function quotedString(str) {
+	    return this.source.quotedString(str);
+	  },
+
+	  objectLiteral: function objectLiteral(obj) {
+	    return this.source.objectLiteral(obj);
+	  },
+
+	  aliasable: function aliasable(name) {
+	    var ret = this.aliases[name];
+	    if (ret) {
+	      ret.referenceCount++;
+	      return ret;
+	    }
+
+	    ret = this.aliases[name] = this.source.wrap(name);
+	    ret.aliasable = true;
+	    ret.referenceCount = 1;
+
+	    return ret;
+	  },
+
+	  setupHelper: function setupHelper(paramSize, name, blockHelper) {
+	    var params = [],
+	        paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
+	    var foundHelper = this.nameLookup('helpers', name, 'helper'),
+	        callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})');
+
+	    return {
+	      params: params,
+	      paramsInit: paramsInit,
+	      name: foundHelper,
+	      callParams: [callContext].concat(params)
+	    };
+	  },
+
+	  setupParams: function setupParams(helper, paramSize, params) {
+	    var options = {},
+	        contexts = [],
+	        types = [],
+	        ids = [],
+	        objectArgs = !params,
+	        param = undefined;
+
+	    if (objectArgs) {
+	      params = [];
+	    }
+
+	    options.name = this.quotedString(helper);
+	    options.hash = this.popStack();
+
+	    if (this.trackIds) {
+	      options.hashIds = this.popStack();
+	    }
+	    if (this.stringParams) {
+	      options.hashTypes = this.popStack();
+	      options.hashContexts = this.popStack();
+	    }
+
+	    var inverse = this.popStack(),
+	        program = this.popStack();
+
+	    // Avoid setting fn and inverse if neither are set. This allows
+	    // helpers to do a check for `if (options.fn)`
+	    if (program || inverse) {
+	      options.fn = program || 'container.noop';
+	      options.inverse = inverse || 'container.noop';
+	    }
+
+	    // The parameters go on to the stack in order (making sure that they are evaluated in order)
+	    // so we need to pop them off the stack in reverse order
+	    var i = paramSize;
+	    while (i--) {
+	      param = this.popStack();
+	      params[i] = param;
+
+	      if (this.trackIds) {
+	        ids[i] = this.popStack();
+	      }
+	      if (this.stringParams) {
+	        types[i] = this.popStack();
+	        contexts[i] = this.popStack();
+	      }
+	    }
+
+	    if (objectArgs) {
+	      options.args = this.source.generateArray(params);
+	    }
+
+	    if (this.trackIds) {
+	      options.ids = this.source.generateArray(ids);
+	    }
+	    if (this.stringParams) {
+	      options.types = this.source.generateArray(types);
+	      options.contexts = this.source.generateArray(contexts);
+	    }
+
+	    if (this.options.data) {
+	      options.data = 'data';
+	    }
+	    if (this.useBlockParams) {
+	      options.blockParams = 'blockParams';
+	    }
+	    return options;
+	  },
+
+	  setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
+	    var options = this.setupParams(helper, paramSize, params);
+	    options.loc = JSON.stringify(this.source.currentLocation);
+	    options = this.objectLiteral(options);
+	    if (useRegister) {
+	      this.useRegister('options');
+	      params.push('options');
+	      return ['options=', options];
+	    } else if (params) {
+	      params.push(options);
+	      return '';
+	    } else {
+	      return options;
+	    }
+	  }
+	};
+
+	(function () {
+	  var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' ');
+
+	  var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
+
+	  for (var i = 0, l = reservedWords.length; i < l; i++) {
+	    compilerWords[reservedWords[i]] = true;
+	  }
+	})();
+
+	/**
+	 * @deprecated May be removed in the next major version
+	 */
+	JavaScriptCompiler.isValidJavaScriptVariableName = function (name) {
+	  return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
+	};
+
+	function strictLookup(requireTerminal, compiler, parts, type) {
+	  var stack = compiler.popStack(),
+	      i = 0,
+	      len = parts.length;
+	  if (requireTerminal) {
+	    len--;
+	  }
+
+	  for (; i < len; i++) {
+	    stack = compiler.nameLookup(stack, parts[i], type);
+	  }
+
+	  if (requireTerminal) {
+	    return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )'];
+	  } else {
+	    return stack;
+	  }
+	}
+
+	exports['default'] = JavaScriptCompiler;
+	module.exports = exports['default'];
+
+/***/ }),
+/* 53 */
+/***/ (function(module, exports, __webpack_require__) {
+
+	/* global define */
+	'use strict';
+
+	var _Object$keys = __webpack_require__(13)['default'];
+
+	exports.__esModule = true;
+
+	var _utils = __webpack_require__(5);
+
+	var SourceNode = undefined;
+
+	try {
+	  /* istanbul ignore next */
+	  if (false) {
+	    // We don't support this in AMD environments. For these environments, we asusme that
+	    // they are running on the browser and thus have no need for the source-map library.
+	    var SourceMap = require('source-map');
+	    SourceNode = SourceMap.SourceNode;
+	  }
+	} catch (err) {}
+	/* NOP */
+
+	/* istanbul ignore if: tested but not covered in istanbul due to dist build  */
+	if (!SourceNode) {
+	  SourceNode = function (line, column, srcFile, chunks) {
+	    this.src = '';
+	    if (chunks) {
+	      this.add(chunks);
+	    }
+	  };
+	  /* istanbul ignore next */
+	  SourceNode.prototype = {
+	    add: function add(chunks) {
+	      if (_utils.isArray(chunks)) {
+	        chunks = chunks.join('');
+	      }
+	      this.src += chunks;
+	    },
+	    prepend: function prepend(chunks) {
+	      if (_utils.isArray(chunks)) {
+	        chunks = chunks.join('');
+	      }
+	      this.src = chunks + this.src;
+	    },
+	    toStringWithSourceMap: function toStringWithSourceMap() {
+	      return { code: this.toString() };
+	    },
+	    toString: function toString() {
+	      return this.src;
+	    }
+	  };
+	}
+
+	function castChunk(chunk, codeGen, loc) {
+	  if (_utils.isArray(chunk)) {
+	    var ret = [];
+
+	    for (var i = 0, len = chunk.length; i < len; i++) {
+	      ret.push(codeGen.wrap(chunk[i], loc));
+	    }
+	    return ret;
+	  } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
+	    // Handle primitives that the SourceNode will throw up on
+	    return chunk + '';
+	  }
+	  return chunk;
+	}
+
+	function CodeGen(srcFile) {
+	  this.srcFile = srcFile;
+	  this.source = [];
+	}
+
+	CodeGen.prototype = {
+	  isEmpty: function isEmpty() {
+	    return !this.source.length;
+	  },
+	  prepend: function prepend(source, loc) {
+	    this.source.unshift(this.wrap(source, loc));
+	  },
+	  push: function push(source, loc) {
+	    this.source.push(this.wrap(source, loc));
+	  },
+
+	  merge: function merge() {
+	    var source = this.empty();
+	    this.each(function (line) {
+	      source.add(['  ', line, '\n']);
+	    });
+	    return source;
+	  },
+
+	  each: function each(iter) {
+	    for (var i = 0, len = this.source.length; i < len; i++) {
+	      iter(this.source[i]);
+	    }
+	  },
+
+	  empty: function empty() {
+	    var loc = this.currentLocation || { start: {} };
+	    return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
+	  },
+	  wrap: function wrap(chunk) {
+	    var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];
+
+	    if (chunk instanceof SourceNode) {
+	      return chunk;
+	    }
+
+	    chunk = castChunk(chunk, this, loc);
+
+	    return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
+	  },
+
+	  functionCall: function functionCall(fn, type, params) {
+	    params = this.generateList(params);
+	    return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
+	  },
+
+	  quotedString: function quotedString(str) {
+	    return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
+	    .replace(/\u2029/g, '\\u2029') + '"';
+	  },
+
+	  objectLiteral: function objectLiteral(obj) {
+	    // istanbul ignore next
+
+	    var _this = this;
+
+	    var pairs = [];
+
+	    _Object$keys(obj).forEach(function (key) {
+	      var value = castChunk(obj[key], _this);
+	      if (value !== 'undefined') {
+	        pairs.push([_this.quotedString(key), ':', value]);
+	      }
+	    });
+
+	    var ret = this.generateList(pairs);
+	    ret.prepend('{');
+	    ret.add('}');
+	    return ret;
+	  },
+
+	  generateList: function generateList(entries) {
+	    var ret = this.empty();
+
+	    for (var i = 0, len = entries.length; i < len; i++) {
+	      if (i) {
+	        ret.add(',');
+	      }
+
+	      ret.add(castChunk(entries[i], this));
+	    }
+
+	    return ret;
+	  },
+
+	  generateArray: function generateArray(entries) {
+	    var ret = this.generateList(entries);
+	    ret.prepend('[');
+	    ret.add(']');
+
+	    return ret;
+	  }
+	};
+
+	exports['default'] = CodeGen;
+	module.exports = exports['default'];
+
+/***/ })
+/******/ ])
+});
+;
\ No newline at end of file
diff --git a/addons/js/helpers/README.adoc b/addons/js/helpers/README.adoc
new file mode 100644
index 000000000..a501cb035
--- /dev/null
+++ b/addons/js/helpers/README.adoc
@@ -0,0 +1,3 @@
+= Addons/JS/Helpers
+
+This directory holds JavaScript helpers used by Handlebars.
diff --git a/addons/js/helpers/and.js b/addons/js/helpers/and.js
new file mode 100644
index 000000000..5637b154b
--- /dev/null
+++ b/addons/js/helpers/and.js
@@ -0,0 +1,9 @@
+'use strict'
+
+module.exports = (...args) => {
+  const numArgs = args.length
+  if (numArgs === 3) return args[0] && args[1]
+  if (numArgs < 3) throw new Error('{{and}} helper expects at least 2 arguments')
+  args.pop()
+  return args.every((it) => it)
+}
diff --git a/addons/js/helpers/detag.js b/addons/js/helpers/detag.js
new file mode 100644
index 000000000..e32f14766
--- /dev/null
+++ b/addons/js/helpers/detag.js
@@ -0,0 +1,5 @@
+'use strict'
+
+const TAG_ALL_RX = /<[^>]+>/g
+
+module.exports = (html) => html && html.replace(TAG_ALL_RX, '')
diff --git a/addons/js/helpers/eq.js b/addons/js/helpers/eq.js
new file mode 100644
index 000000000..16dc28701
--- /dev/null
+++ b/addons/js/helpers/eq.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = (a, b) => a === b
diff --git a/addons/js/helpers/increment.js b/addons/js/helpers/increment.js
new file mode 100644
index 000000000..bb8f7e185
--- /dev/null
+++ b/addons/js/helpers/increment.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = (value) => (value || 0) + 1
diff --git a/addons/js/helpers/ne.js b/addons/js/helpers/ne.js
new file mode 100644
index 000000000..245f03b44
--- /dev/null
+++ b/addons/js/helpers/ne.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = (a, b) => a !== b
diff --git a/addons/js/helpers/not.js b/addons/js/helpers/not.js
new file mode 100644
index 000000000..8b3aa917b
--- /dev/null
+++ b/addons/js/helpers/not.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = (val) => !val
diff --git a/addons/js/helpers/or.js b/addons/js/helpers/or.js
new file mode 100644
index 000000000..eb53907aa
--- /dev/null
+++ b/addons/js/helpers/or.js
@@ -0,0 +1,9 @@
+'use strict'
+
+module.exports = (...args) => {
+  const numArgs = args.length
+  if (numArgs === 3) return args[0] || args[1]
+  if (numArgs < 3) throw new Error('{{or}} helper expects at least 2 arguments')
+  args.pop()
+  return args.some((it) => it)
+}
diff --git a/addons/js/helpers/relativize.js b/addons/js/helpers/relativize.js
new file mode 100644
index 000000000..6fdfb45e6
--- /dev/null
+++ b/addons/js/helpers/relativize.js
@@ -0,0 +1,24 @@
+'use strict'
+
+const { posix: path } = require('path')
+
+module.exports = (to, from, ctx) => {
+  if (!to) return '#'
+  // NOTE only legacy invocation provides both to and from
+  if (!ctx) from = (ctx = from).data.root.page.url
+  if (to.charAt() !== '/') return to
+  if (!from) return (ctx.data.root.site.path || '') + to
+  let hash = ''
+  const hashIdx = to.indexOf('#')
+  if (~hashIdx) {
+    hash = to.substr(hashIdx)
+    to = to.substr(0, hashIdx)
+  }
+  return to === from
+    ? hash || (isDir(to) ? './' : path.basename(to))
+    : (path.relative(path.dirname(from + '.'), to) || '.') + (isDir(to) ? '/' + hash : hash)
+}
+
+function isDir (str) {
+  return str.charAt(str.length - 1) === '/'
+}
diff --git a/addons/js/helpers/year.js b/addons/js/helpers/year.js
new file mode 100644
index 000000000..aa38992cc
--- /dev/null
+++ b/addons/js/helpers/year.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = () => new Date().getFullYear().toString()
diff --git a/addons/plugins/README.adoc b/addons/plugins/README.adoc
new file mode 100644
index 000000000..d738aec96
--- /dev/null
+++ b/addons/plugins/README.adoc
@@ -0,0 +1,4 @@
+= Plugins
+
+This directory holds DLLs or shared libraries
+which are loaded when mrdox is launched.
diff --git a/include/mrdox/Config.hpp b/include/mrdox/Config.hpp
index 21d839f8e..c54edd446 100644
--- a/include/mrdox/Config.hpp
+++ b/include/mrdox/Config.hpp
@@ -117,6 +117,13 @@ class MRDOX_VISIBLE
     */
     std::string workingDir;
 
+    /** Full path to the Addons directory.
+
+        This string will always be native style
+        and have a trailing directory separator.
+    */
+    std::string addonsDir;
+
     /** A string holding the complete configuration YAML.
     */
     std::string configYaml;
diff --git a/include/mrdox/Support/Path.hpp b/include/mrdox/Support/Path.hpp
index 3ca4853f4..ddc96cff8 100644
--- a/include/mrdox/Support/Path.hpp
+++ b/include/mrdox/Support/Path.hpp
@@ -80,6 +80,13 @@ bool
 isAbsolute(
     std::string_view pathName) noexcept;
 
+/** Return an error if pathName is not absolute.
+*/
+MRDOX_DECL
+Error
+requireAbsolute(
+    std::string_view pathName);
+
 /** Return true if pathName ends in a separator.
 */
 MRDOX_DECL
@@ -171,6 +178,13 @@ appendPath(
     std::string_view basePath,
     std::string_view pathName);
 
+/** Return an error if the path is not a directory.
+*/
+MRDOX_DECL
+Error
+requireDirectory(
+    std::string_view pathName);
+
 } // files
 
 } // mrdox
diff --git a/source/Support/Path.cpp b/source/Support/Path.cpp
index 8e6eb3eb9..388799fa0 100644
--- a/source/Support/Path.cpp
+++ b/source/Support/Path.cpp
@@ -91,6 +91,15 @@ isAbsolute(
     return path::is_absolute(pathName);
 }
 
+Error
+requireAbsolute(
+    std::string_view pathName)
+{
+    if(! isAbsolute(pathName))
+        return Error("\"{}\" is not an absolute path");
+    return Error::success();
+}
+
 bool
 isDirsy(
     std::string_view pathName) noexcept
@@ -230,6 +239,20 @@ appendPath(
     return static_cast<std::string>(temp.str());
 }
 
+Error
+requireDirectory(
+    std::string_view pathName)
+{
+    namespace fs = llvm::sys::fs;
+
+    fs::file_status fileStatus;
+    if(auto ec = fs::status(pathName, fileStatus))
+        return Error("fs::status(\"{}\") returned \"{}\"", pathName, ec);
+    if(fileStatus.type() != fs::file_type::directory_file)
+        return Error("\"{}\" is not a directory", pathName);
+    return Error::success();
+}
+
 } // files
 
 } // mrdox
diff --git a/source/Tool/ConfigImpl.cpp b/source/Tool/ConfigImpl.cpp
index 9cb932609..27db1fe3a 100644
--- a/source/Tool/ConfigImpl.cpp
+++ b/source/Tool/ConfigImpl.cpp
@@ -70,6 +70,7 @@ namespace mrdox {
 ConfigImpl::
 ConfigImpl(
     llvm::StringRef workingDir_,
+    llvm::StringRef addonsDir_,
     llvm::StringRef configYaml_,
     llvm::StringRef extraYaml_)
 {
@@ -79,6 +80,12 @@ ConfigImpl(
     if(! files::isAbsolute(workingDir_))
         throw Error("path \"{}\" is not absolute", workingDir_);
     workingDir = files::makeDirsy(files::normalizePath(workingDir_));
+
+    if(auto err = files::requireDirectory(addonsDir_))
+        throw Error("path \"{}\" is not absolute", addonsDir_);
+    MRDOX_ASSERT(files::isDirsy(addonsDir_));
+    addonsDir = addonsDir_;
+
     configYaml = configYaml_;
     extraYaml = extraYaml_;
 
@@ -163,14 +170,15 @@ yamlDiagnostic(
 
 Expected<std::shared_ptr<ConfigImpl const>>
 createConfigFromYAML(
-    llvm::StringRef workingDir,
-    llvm::StringRef configYaml,
-    llvm::StringRef extraYaml)
+    std::string_view workingDir,
+    std::string_view addonsDir,
+    std::string_view configYaml,
+    std::string_view extraYaml)
 {
     try
     {
         auto config = std::make_shared<ConfigImpl>(
-            workingDir, configYaml, extraYaml);
+            workingDir, addonsDir, configYaml, extraYaml);
         return config;
     }
     catch(Error err)
@@ -182,6 +190,7 @@ createConfigFromYAML(
 Expected<std::shared_ptr<ConfigImpl const>>
 loadConfigFile(
     std::string_view configFilePath,
+    std::string_view addonsDir,
     std::string_view extraYaml)
 {
     namespace fs = llvm::sys::fs;
@@ -204,7 +213,7 @@ loadConfigFile(
     try
     {
         auto config = std::make_shared<ConfigImpl>(
-            workingDir, *text, extraYaml);
+            workingDir, addonsDir, *text, extraYaml);
         return config;
     }
     catch(Error err)
diff --git a/source/Tool/ConfigImpl.hpp b/source/Tool/ConfigImpl.hpp
index fd2f5b2aa..48c1a2d00 100644
--- a/source/Tool/ConfigImpl.hpp
+++ b/source/Tool/ConfigImpl.hpp
@@ -61,6 +61,7 @@ class ConfigImpl
 public:
     ConfigImpl(
         llvm::StringRef workingDir,
+        llvm::StringRef addonsDir,
         llvm::StringRef configYaml,
         llvm::StringRef extraYaml);
 
@@ -120,15 +121,17 @@ class ConfigImpl
     friend
     Expected<std::shared_ptr<ConfigImpl const>>
     createConfigFromYAML(
-        llvm::StringRef workingDir,
-        llvm::StringRef configYaml,
-        llvm::StringRef extraYaml);
+        std::string_view workingDir,
+        std::string_view addonsDir,
+        std::string_view configYaml,
+        std::string_view extraYaml);
 
     friend
     Expected<std::shared_ptr<ConfigImpl const>>
     loadConfigFile(
         std::string_view configFilePath,
-        std::string_view extraYam);
+        std::string_view addonsDir,
+        std::string_view extraYaml);
 };
 
 //------------------------------------------------
@@ -159,6 +162,10 @@ class ConfigImpl
     for calculating filenames from relative
     paths.
 
+    @param addonsDir A valid directory to determine
+    the location of the addons/ folder.
+    This must be an absolute path.
+
     @param configYaml A string containing valid
     YAML which will be parsed and applied to create
     the configuration.
@@ -169,9 +176,10 @@ class ConfigImpl
 */
 Expected<std::shared_ptr<ConfigImpl const>>
 createConfigFromYAML(
-    llvm::StringRef workingDir,
-    llvm::StringRef configYaml,
-    llvm::StringRef extraYaml = "");
+    std::string_view workingDir,
+    std::string_view addonsDir,
+    std::string_view configYaml,
+    std::string_view extraYaml = "");
 
 /** Create a configuration by loading a YAML file.
 
@@ -198,6 +206,10 @@ createConfigFromYAML(
     directory of the process. POSIX or Windows style
     path separators are accepted.
 
+    @param addonsDir A valid directory to determine
+    the location of the addons/ folder.
+    This must be an absolute path.
+
     @param extraYaml An optional string containing
     additional valid YAML which will be parsed and
     applied to the existing configuration.
@@ -206,7 +218,8 @@ MRDOX_DECL
 Expected<std::shared_ptr<ConfigImpl const>>
 loadConfigFile(
     std::string_view configFilePath,
-    std::string_view extraYam = "");
+    std::string_view addonsDir,
+    std::string_view extraYaml = "");
 
 /** Create a configuration by loading a YAML string.
 
@@ -223,7 +236,11 @@ loadConfigFile(
     @param workingDir The directory which should
     be considered the working directory for
     calculating filenames from relative paths.
-    This must be an absolute path, or empty.
+    This must be an absolute path.
+
+    @param addonsDir A valid directory to determine
+    the location of the addons/ folder.
+    This must be an absolute path.
 
     @param configYaml A string containing valid
     YAML which will be parsed and applied to create
@@ -235,6 +252,7 @@ inline
 Expected<std::shared_ptr<ConfigImpl const>>
 loadConfigString(
     std::string_view workingDir,
+    std::string_view addonsDir,
     std::string_view configYaml)
 {
     return createConfigFromYAML(workingDir, configYaml, "");
diff --git a/source/Tool/GenerateAction.cpp b/source/Tool/GenerateAction.cpp
index b6a5e95ae..3524c85db 100644
--- a/source/Tool/GenerateAction.cpp
+++ b/source/Tool/GenerateAction.cpp
@@ -37,9 +37,10 @@ DoGenerateAction()
     }
 
     // Load configuration file
-    if(! toolArgs.configPath.hasArgStr())
+    if(toolArgs.configPath.empty())
         return Error("the config path argument is missing");
-    auto config = loadConfigFile(toolArgs.configPath, extraYaml);
+    auto config = loadConfigFile(
+        toolArgs.configPath, toolArgs.addonsDir, extraYaml);
     if(! config)
         return config.getError();
 
diff --git a/source/Tool/TestAction.cpp b/source/Tool/TestAction.cpp
index d1d9144af..031e55ef8 100644
--- a/source/Tool/TestAction.cpp
+++ b/source/Tool/TestAction.cpp
@@ -144,7 +144,7 @@ makeConfig(
 
     std::error_code ec;
     auto config = loadConfigString(
-        workingDir, configYaml);
+        workingDir, toolArgs.addonsDir, configYaml);
     MRDOX_ASSERT(config);
     return *config;
 }
diff --git a/source/Tool/ToolArgs.cpp b/source/Tool/ToolArgs.cpp
index 54c0e4fcc..8d637a595 100644
--- a/source/Tool/ToolArgs.cpp
+++ b/source/Tool/ToolArgs.cpp
@@ -19,18 +19,26 @@ namespace mrdox {
 
 ToolArgs::
 ToolArgs()
-    : genCat("Generation Options")
-    , testCat("Test Options")
+    : commonCat("COMMON")
+    , generateCat("GENERATE")
+    , testCat("TEST")
+
     , usageText(
 R"( Generate C++ reference documentation
 )")
+
     , extraHelp(
 R"(
-USAGE:
-    mrdox .. ( compile-commands )
-    mrdox .. --action ( "test" | "update" ) ( dir | file )...
+ADDONS:
+    The location of the addons directory is determined in this order:
+
+    1. The --addons command line argument if present, or
+    2. The directory containing the mrdox tool executable, otherwise
+    3. The environment variable MRDOX_ADDONS_DIR if set.
 
 EXAMPLES:
+    mrdox .. ( compile-commands )
+    mrdox .. --action ( "test" | "update" ) ( dir | file )...
     mrdox --action test friend.cpp
     mrdox --format adoc compile_commands.json
 )")
@@ -41,26 +49,35 @@ R"(
 
 , toolAction(
     "action",
-    llvm::cl::desc(R"(Which action should be performed)"),
+    llvm::cl::desc(R"(Which action should be performed:)"),
     llvm::cl::init(Action::generate),
     llvm::cl::values(
-        clEnumVal(test, "Compare output against expected"),
-        clEnumVal(update, "Update all expected xml files"),
-        clEnumVal(generate, "Generate reference documentation")))
+        clEnumVal(test, "Compare output against expected."),
+        clEnumVal(update, "Update all expected xml files."),
+        clEnumVal(generate, "Generate reference documentation.")),
+    llvm::cl::cat(commonCat))
+
+, addonsDir(
+    "addons",
+    llvm::cl::desc("The path to the addons directory."),
+    llvm::cl::cat(commonCat))
 
 , configPath(
     "config",
-    llvm::cl::desc(R"(The config filename relative to the repository root)"))
+    llvm::cl::desc(R"(The config filename relative to the repository root.)"),
+    llvm::cl::cat(commonCat))
 
 , outputPath(
     "output",
     llvm::cl::desc("Directory or file for generating output."),
-    llvm::cl::init("."))
+    llvm::cl::init("."),
+    llvm::cl::cat(commonCat))
 
 , inputPaths(
     "inputs",
     llvm::cl::Sink,
-    llvm::cl::desc("The path to the compilation database, or one or more .cpp files to test."))
+    llvm::cl::desc("The path to the compilation database, or one or more .cpp files to test."),
+    llvm::cl::cat(commonCat))
 
 //
 // Generate options
@@ -70,13 +87,13 @@ R"(
     "format",
     llvm::cl::desc("Format for outputted docs (\"adoc\" or \"xml\")."),
     llvm::cl::init("adoc"),
-    llvm::cl::cat(genCat))
+    llvm::cl::cat(generateCat))
 
 , ignoreMappingFailures(
     "ignore-map-errors",
     llvm::cl::desc("Continue if files are not mapped correctly."),
     llvm::cl::init(true),
-    llvm::cl::cat(genCat))
+    llvm::cl::cat(generateCat))
 
 //
 // Test options
@@ -84,7 +101,7 @@ R"(
 
 , badOption(
     "bad",
-    llvm::cl::desc("Write a .bad.xml file for each test failure"),
+    llvm::cl::desc("Write a .bad.xml file for each test failure."),
     llvm::cl::init(true),
     llvm::cl::cat(testCat))
 {
@@ -102,10 +119,11 @@ hideForeignOptions()
 
     std::vector<llvm::cl::Option const*> ours({
         &toolAction,
-        &formatType,
+        &addonsDir,
         &configPath,
         &outputPath,
         std::addressof(inputPaths),
+        &formatType,
         &ignoreMappingFailures,
         &badOption
     });
diff --git a/source/Tool/ToolArgs.hpp b/source/Tool/ToolArgs.hpp
index b3ac7b8f5..95e9b0171 100644
--- a/source/Tool/ToolArgs.hpp
+++ b/source/Tool/ToolArgs.hpp
@@ -30,7 +30,8 @@ class ToolArgs
 {
     ToolArgs();
 
-    llvm::cl::OptionCategory    genCat;
+    llvm::cl::OptionCategory    commonCat;
+    llvm::cl::OptionCategory    generateCat;
     llvm::cl::OptionCategory    testCat;
 
 public:
@@ -41,6 +42,7 @@ class ToolArgs
 
     // Common options
     llvm::cl::opt<Action>       toolAction;
+    llvm::cl::opt<std::string>  addonsDir;
     llvm::cl::opt<std::string>  configPath;
     llvm::cl::opt<std::string>  outputPath;
     llvm::cl::list<std::string> inputPaths;
diff --git a/source/Tool/ToolMain.cpp b/source/Tool/ToolMain.cpp
index ab2af8e58..673f05d56 100644
--- a/source/Tool/ToolMain.cpp
+++ b/source/Tool/ToolMain.cpp
@@ -34,11 +34,13 @@
 
 #include "ToolArgs.hpp"
 #include "Support/Debug.hpp"
+#include <mrdox/Support/Path.hpp>
 #include <mrdox/Support/Report.hpp>
 #include <mrdox/Version.hpp>
-#include <llvm/Support/Signals.h>
-#include <llvm/Support/CommandLine.h>
+#include <llvm/Support/Filesystem.h>
+#include <llvm/Support/Process.h>
 #include <llvm/Support/raw_ostream.h>
+#include <llvm/Support/Signals.h>
 #include <stdlib.h>
 
 namespace clang {
@@ -47,7 +49,8 @@ namespace mrdox {
 extern Error DoGenerateAction();
 extern int DoTestAction();
 
-inline void print_version(llvm::raw_ostream& os)
+void
+print_version(llvm::raw_ostream& os)
 {
     os << project_name
        << "\n    " << project_description
@@ -61,10 +64,12 @@ inline void print_version(llvm::raw_ostream& os)
 int main(int argc, char const** argv)
 {
     using namespace clang::mrdox;
+    using Process = llvm::sys::Process;
+    namespace fs = llvm::sys::fs;
 
     // VFALCO this heap checking is too strong for
     // a clang tool's model of what is actually a leak.
-    // clang::mrdox::debugEnableHeapChecking();
+    // debugEnableHeapChecking();
 
     llvm::sys::PrintStackTraceOnErrorSignal(argv[0]);
     llvm::cl::SetVersionPrinter(&print_version);
@@ -74,15 +79,77 @@ int main(int argc, char const** argv)
             argc, argv, toolArgs.usageText))
         return EXIT_FAILURE;
 
+    // Set addons dir
+    std::string addonsDir;
+    if(! toolArgs.addonsDir.getValue().empty())
+    {
+        // from command line
+        auto absPath = files::makeAbsolute(
+            toolArgs.addonsDir.getValue());
+        if(! absPath)
+            reportError(absPath.getError(), "set the addons directory");
+        addonsDir = files::makeDirsy(files::normalizePath(*absPath));
+        if(auto err = files::requireDirectory(addonsDir))
+        {
+            reportError(err, "set the addons directory");
+            return EXIT_FAILURE;
+        }
+        toolArgs.addonsDir.getValue() = addonsDir;
+    }
+    else
+    {
+        // check process working directory
+        addonsDir = fs::getMainExecutable(argv[0], &main);
+        if(addonsDir.empty())
+        {
+            reportError(
+                "Could locate the executable because "
+                "fs::getMainExecutable failed.");
+            return EXIT_FAILURE;
+        }
+        addonsDir = files::makeDirsy(files::appendPath(
+            files::getParentDir(addonsDir), "addons"));
+        if(! files::requireDirectory(addonsDir).failed())
+        {
+            // from directory containing the process executable
+            toolArgs.addonsDir.getValue() = addonsDir;
+        }
+        else
+        {
+            auto addonsEnvVar = Process::GetEnv("MRDOX_ADDONS_DIR");
+            if(! addonsEnvVar.has_value())
+            {
+                reportError(
+                    "Could not locate the addons directory because "
+                    "the MRDOX_ADDONS_DIR environment variable is not set, "
+                    "no addons location was specified on the command line, "
+                    "and no addons directory exists in the same directory as "
+                    "the executable.");
+                return EXIT_FAILURE;
+            }
+            // from environment variable
+            addonsDir = files::makeDirsy(files::normalizePath(*addonsEnvVar));
+            if(auto err = files::requireAbsolute(addonsDir))
+                reportError(err, "set the addons directory");
+            if(auto err = files::requireDirectory(addonsDir))
+            {
+                reportError(err, "set the addons directory");
+                return EXIT_FAILURE;
+            }
+            toolArgs.addonsDir.getValue() = addonsDir;
+        }
+    }
+
     // Generate
-    if(clang::mrdox::toolArgs.toolAction == Action::generate)
+    if(toolArgs.toolAction == Action::generate)
     {
         auto err = DoGenerateAction();
-        if(! err)
-            return EXIT_SUCCESS;
-
-        reportError(err, "generate reference documentation");
-        return EXIT_FAILURE;
+        if(err)
+        {
+            reportError(err, "generate reference documentation");
+            return EXIT_FAILURE;
+        }
+        return EXIT_SUCCESS;
     }
 
     // Test

From fab205da055e5ce36d54d211c8c99df5d9e1416c Mon Sep 17 00:00:00 2001
From: Klemens Morgenstern <klemens.d.morgenstern@gmail.com>
Date: Mon, 12 Jun 2023 08:18:55 +0800
Subject: [PATCH 6/8] fix: linux build

---
 source/Tool/ToolArgs.hpp | 2 +-
 source/Tool/ToolMain.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/source/Tool/ToolArgs.hpp b/source/Tool/ToolArgs.hpp
index 95e9b0171..d22062b3b 100644
--- a/source/Tool/ToolArgs.hpp
+++ b/source/Tool/ToolArgs.hpp
@@ -63,7 +63,7 @@ class ToolArgs
     This is a global variable because of how the
     LLVM command line interface is designed.
 */
-constexpr ToolArgs& toolArgs = ToolArgs::instance_;
+constexpr static ToolArgs& toolArgs = ToolArgs::instance_;
 
 } // mrdox
 } // clang
diff --git a/source/Tool/ToolMain.cpp b/source/Tool/ToolMain.cpp
index 673f05d56..dd2177391 100644
--- a/source/Tool/ToolMain.cpp
+++ b/source/Tool/ToolMain.cpp
@@ -37,7 +37,7 @@
 #include <mrdox/Support/Path.hpp>
 #include <mrdox/Support/Report.hpp>
 #include <mrdox/Version.hpp>
-#include <llvm/Support/Filesystem.h>
+#include <llvm/Support/FileSystem.h>
 #include <llvm/Support/Process.h>
 #include <llvm/Support/raw_ostream.h>
 #include <llvm/Support/Signals.h>
@@ -99,7 +99,7 @@ int main(int argc, char const** argv)
     else
     {
         // check process working directory
-        addonsDir = fs::getMainExecutable(argv[0], &main);
+        addonsDir = fs::getMainExecutable(argv[0], reinterpret_cast<void*>(&main));
         if(addonsDir.empty())
         {
             reportError(

From ea602c23b4e6594da5434d0a565f9ed7afe3bc8e Mon Sep 17 00:00:00 2001
From: Klemens Morgenstern <klemens.d.morgenstern@gmail.com>
Date: Mon, 12 Jun 2023 09:30:47 +0800
Subject: [PATCH 7/8] fix: added addons folder copy

---
 CMakeLists.txt | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bce3f0f60..f6cd197df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,7 +125,6 @@ find_package(fmt REQUIRED CONFIG)
 configure_file(source/Version.hpp.in "${PROJECT_SOURCE_DIR}/include/mrdox/Version.hpp")
 file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS source/*.cpp source/*.hpp source/*.in source/*.natvis)
 file(GLOB_RECURSE INCLUDES CONFIGURE_DEPENDS include/*.hpp)
-
 add_executable(mrdox ${SOURCES} ${INCLUDES})
 
 target_compile_features(mrdox PUBLIC cxx_std_20)
@@ -220,6 +219,16 @@ source_group(TREE ${PROJECT_SOURCE_DIR}/source PREFIX "source" FILES ${SOURCES})
 #-------------------------------------------------
 
 if (MRDOX_BUILD_TESTS)
+    # if we run tests, we need the addons in the right place.
+    add_custom_command(
+            TARGET mrdox
+            POST_BUILD
+            COMMAND ${CMAKE_COMMAND} -E copy
+                    ${CMAKE_SOURCE_DIR}/addons
+                    ${CMAKE_BINARY_DIR}/addons
+            BYPRODUCTS ${CMAKE_BINARY_DIR}/addons
+    )
+
     file(GLOB_RECURSE TEST_SOURCES CONFIGURE_DEPENDS source/*.cpp source/*.hpp)
     enable_testing()
     add_test(NAME mrdox-test COMMAND mrdox --action test

From d4739200ee357d26cad8ba9bdbcdb240aeb29665 Mon Sep 17 00:00:00 2001
From: Klemens Morgenstern <klemens.d.morgenstern@gmail.com>
Date: Mon, 12 Jun 2023 10:14:22 +0800
Subject: [PATCH 8/8] fix: runtime errors

---
 source/Tool/ConfigImpl.cpp | 4 ++--
 source/Tool/ConfigImpl.hpp | 2 +-
 source/Tool/TestAction.cpp | 2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/source/Tool/ConfigImpl.cpp b/source/Tool/ConfigImpl.cpp
index 27db1fe3a..ae0b465b4 100644
--- a/source/Tool/ConfigImpl.cpp
+++ b/source/Tool/ConfigImpl.cpp
@@ -78,11 +78,11 @@ ConfigImpl(
     namespace path = llvm::sys::path;
 
     if(! files::isAbsolute(workingDir_))
-        throw Error("path \"{}\" is not absolute", workingDir_);
+        throw Error("working path \"{}\" is not absolute", workingDir_);
     workingDir = files::makeDirsy(files::normalizePath(workingDir_));
 
     if(auto err = files::requireDirectory(addonsDir_))
-        throw Error("path \"{}\" is not absolute", addonsDir_);
+        throw Error("addons path \"{}\" is not absolute", addonsDir_);
     MRDOX_ASSERT(files::isDirsy(addonsDir_));
     addonsDir = addonsDir_;
 
diff --git a/source/Tool/ConfigImpl.hpp b/source/Tool/ConfigImpl.hpp
index 48c1a2d00..7420f3ce2 100644
--- a/source/Tool/ConfigImpl.hpp
+++ b/source/Tool/ConfigImpl.hpp
@@ -255,7 +255,7 @@ loadConfigString(
     std::string_view addonsDir,
     std::string_view configYaml)
 {
-    return createConfigFromYAML(workingDir, configYaml, "");
+    return createConfigFromYAML(workingDir, addonsDir, configYaml);
 }
 
 } // mrdox
diff --git a/source/Tool/TestAction.cpp b/source/Tool/TestAction.cpp
index 031e55ef8..569759edc 100644
--- a/source/Tool/TestAction.cpp
+++ b/source/Tool/TestAction.cpp
@@ -145,6 +145,8 @@ makeConfig(
     std::error_code ec;
     auto config = loadConfigString(
         workingDir, toolArgs.addonsDir, configYaml);
+    if (!config)
+      reportError(config.getError(), "load the configuration string");
     MRDOX_ASSERT(config);
     return *config;
 }