[
  {
    "path": ".babelrc",
    "content": "{\n    \"presets\": [\n      [\"env\", {\n        \"targets\": {\n          \"browsers\": [\"Explorer >= 7\"]\n        }\n      }]\n    ]\n  }"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nindent_style = space\nindent_size = 4\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = false\ninsert_final_newline = false"
  },
  {
    "path": ".eslintignore",
    "content": "lib/*"
  },
  {
    "path": ".eslintrc.json",
    "content": "{\n    \"env\": {\n        \"browser\": true,\n        \"commonjs\": true,\n        \"es6\": true,\n        \"node\": true\n    },\n    \"parserOptions\": {\n        \"ecmaFeatures\": {\n            \"jsx\": true\n        },\n        \"sourceType\": \"module\"\n    },\n    \"globals\": {\n        \"describe\": true,\n        \"it\": true\n    },\n    \"plugins\": [\n        \"prettier\"\n    ],\n    \"rules\": {\n        \"no-const-assign\": \"warn\",\n        \"no-this-before-super\": \"warn\",\n        \"no-undef\": \"warn\",\n        \"no-unreachable\": \"warn\",\n        \"no-unused-vars\": \"warn\",\n        \"constructor-super\": \"warn\",\n        \"valid-typeof\": \"warn\",\n        \"prettier/prettier\": \"error\"\n    }\n}\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE.md",
    "content": "<!--\n1. 请附带可以 **直接** 重现的 Demo，可以是压缩包、仓库、或者使用在线运行服务，否则直接关闭问题\n2. 标题请简短，把内容写在 Issue 内容中，否则直接关闭问题\n3. 不欢迎询问使用问题，否则直接关闭问题\n-->\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\n.vscode\n.idea\nlib\ncoverage\nnode_modules\nnpm-debug.log\n"
  },
  {
    "path": ".prettierrc",
    "content": "{\n    \"printWidth\": 100,\n    \"parser\": \"flow\",\n    \"useTabs\": false,\n    \"tabWidth\": 4,\n    \"singleQuote\": true\n}\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - 6\ncache:\n  directories:\n    - node_modules\nbranches:\n  only:\n  - master\ninstall:\n  - npm install\nscript:\n  - npm run build\n  - npm test\nafter_success:\n  - npm run coverage"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# CHANGELOG\n\n## v4.13.2\n\n1. 修复 npm 包 index.d.ts 丢失的问题\n\n## v4.13.1\n\n1. 修复在某些情况 runtime 提示 window 未定义的问题 [#553](https://github.com/aui/art-template/issues/553)\n\n## v4.13.0\n\n1. 修复超大模板编译性能问题 [#539](https://github.com/aui/art-template/issues/539)、[#4](https://github.com/aui/express-art-template/issues/4)\n2. 支持嵌套 block [#468](https://github.com/aui/art-template/issues/468)\n\n## v4.12.2\n\n1. 修复 [#483](https://github.com/aui/art-template/issues/483)\n\n## v4.12.1\n\n1. 修复过滤器不能使用包含空的格字符串参数的问题\n\n## v4.12.0\n\n1. `bail` 默认为 `true`\n2. 修复过滤器不支持 javascript 表达式的问题 [#430](https://github.com/aui/art-template/issues/430)\n\n## v4.11.0\n\n1. `include`、`extend` 支持使用函数表达式。例如 `{{include(file, {list[]})}}` [#414](https://github.com/aui/art-template/issues/414)\n2. 修复 `options.escape=false` 不生效的 BUG\n\n## v4.10.2\n\n1. 修复与 art-template-loader 兼容问题 [art-template-loader#9](https://github.com/aui/art-template-loader/issues/9)\n\n## v4.10.1\n\n1.  `rule.use` 函数第一个传入数据类型由“类 `String` ”对象改为真正的 `String` 对象\n\n## v4.10.0\n\n1. 修复标准语法的 BUG [#408](https://github.com/aui/art-template/issues/408)，并且不再兼容 v3 的辅助方法调用：`{{helper args}}`\n2. 修复 EJS `<%- include(src) %>` 语句兼容问题\n\n## v4.9.1\n\n1. 修复模板内部 `$escape` 与 `$each` 变量可能没有定义的问题 [#3](https://github.com/aui/express-art-template/issues/3) [#1](https://github.com/aui/express-art-template/issues/1)\n\n## v4.9.0\n\n1. 增强调试功能：日志输出错误行号以及上下文\n\n## v4.8.2\n\n1. 修复子模板没有继承父模板编译 options 问题\n2. 渲染函数参数可以为空\n\n## v4.8.1\n\n1. 修复低版本 NodeJS 报错问题\n\n## v4.8.0\n\n1. 过滤器支持在运行时注入 [#4](https://github.com/aui/art-template-loader/issues/4)\n2. 过滤器语法可以直接使用全局对象，无需特别声明。例如 `{{url | encodeURIComponent}}`\n\n## v4.7.0\n\n1. 增加 `ignore` 配置，可以让模板编译器忽略指定的变量初始化\n2. 增加 `htmlMinifierOptions` 配置，可对  [htmlMinifie](https://github.com/kangax/html-minifier) 压缩器进行配置\n\n## v4.6.0\n\n1. `$escape()` 函数提高 4 倍性能\n2. 支持输出 sourceMap: sourcesContent\n\n## v4.5.1\n\n1. 修复 `{{/if}}` 语句不支持头尾空格的问题\n2. 修复 NodeJS 版本兼容问题 [#393](https://github.com/aui/art-template/issues/393)\n\n## v4.5.0\n\n1. 支持对 `options.imports` 的深拷贝 [#1](https://github.com/aui/express-art-template/issues/1)\n2. 支持对 `options.rules` 的覆盖\n\n## v4.4.2\n\n1. 兼容 IE8\n\n## v4.4.1\n\n1. 修正 `root` 配置的行为，如果 filename 为全局模块路径，会直接根据 `root` 来定位\n2. 修复多行模板逻辑表达式下 sourceMap 行号记录不准确的 BUG\n3. 标准化错误处理\n\n## v4.4.0\n\n1. 预编译 API 支持输出 sourceMap\n\n## v4.3.2\n\n1. 修复 web 版本无法被 requirejs 加载问题\n\n## v4.3.1\n\n1. 修复预编译 API 默认配置 `imports` 错误问题\n\n## v4.3.0\n\n1. NodeJS: 支持预编译 API\n\n## v4.2.1\n\n1. 适配器 `loader`、`onerror`、`htmlMinifier` 第二个参数接收 `options`\n\n## v4.2.0\n\n1. 支持 HTML、CSS、JS 压缩（`minimize: true`）。同时废弃 `compressor` 字段\n2. 修复配置 `debuger` 拼写错误，`debuger` 更名为 `onerror`\n3. 将模板全局变量 `$options` 私有化\n\n## v4.1.0\n\n1. 支持 layout\n2. 修复 `{{if else value}}` 语句 BUG\n3. 修复多个 `include` 语句共存导致路径的 BUG\n\n## v4.0.0\n\n1. 调试功能增强：支持编译阶段捕获语法错误具体行\n2. `template.config()` 方法取消，请直接读写 `template.defaults`\n3. `template.helpers` 更改为 `template.defaults.imports`\n4. `template.defaults.debuger` 选项可以定制输出的调试信息\n5. `template.defaults.parser` 被取消，使用更强大的 `template.defaults.rules` 代替\n6. 兼容 EJS 的模板\n7. 使用 ECMA5 构建，低于 IE9 的浏览器需要使用 ECMA5 补丁以及 JSON 库支持才可以运行\n8. `<%=value%>` 语句支持输出 JSON\n\n##\tv3.1.0\n\n1. 修复``template.runder()``方法与文档表现不一致的问题\n2. 去掉鸡肋的``fs.watch``特性\n\n##\tv3.0.3\n\n1. 解决``template.helper()``方法传入的数据被转成字符串的问题 #96\n2. 解决``{{value || value2}}``被识别为管道语句的问题 #105 <https://github.com/aui/tmodjs/issues/48>\n\n##\tv3.0.2\n\n1.\t~~解决管道语法必须使用空格分隔的问题~~\n\n## v3.0.1\n\n1.\t适配 express3.x 与 4.x，修复路径 BUG\n\n## v3.0.0\n\n1. 提供 NodeJS 专属版本，支持使用路径加载模板，并且模板的``include``语句也支持相对路径\n2. 适配 [express](http://expressjs.com) 框架\n3. 内置``print``语句支持传入多个参数\n4. 支持全局缓存配置\n5. 简洁语法版支持管道风格的 helper 调用，例如：``{{time | dateFormat:'yyyy年 MM月 dd日 hh:mm:ss'}}``\n\n当前版本接口有调整，请阅读 [升级参考](#升级参考)\n\n> artTemplate 预编译工具 [TmodJS](https://github.com/aui/tmodjs) 已更新\n\n##\tv2.0.4\n\n1.\t修复低版本安卓浏览器编译后可能产生语法错误的问题（因为此版本浏览器 js 引擎存在 BUG）\n\n##\tv2.0.3\n\n1.\t优化辅助方法性能\n2.\tNodeJS 用户可以通过 npm 获取 artTemplate：``$ npm install art-template -g``\n3.\t不转义输出语句推荐使用``<%=#value%>``（兼容 v2.0.3 版本之前使用的``<%==value%>``），而简版语法则可以使用``{{#value}}``\n4.\t提供简版语法的合并版本 dist/[template-simple.js](https://raw.github.com/aui/artTemplate/master/dist/template-simple.js)\n\n## v2.0.2\n\n1.\t优化自定义语法扩展，减少体积\n2.\t[重要]为了最大化兼容第三方库，自定义语法扩展默认界定符修改为``{{``与``}}``。\n3.\t修复合并工具的BUG [#25](https://github.com/aui/artTemplate/issues/25)\n4.\t公开了内部缓存，可以通过``template.cache``访问到编译后的函数\n5.\t公开了辅助方法缓存，可以通过``template.helpers``访问到\n6.\t优化了调试信息\n\n## v2.0.1\n\n1.\t修复模板变量静态分析的[BUG](https://github.com/aui/artTemplate/pull/22)\n\n## v2.0 release\n\n1.\t~~编译工具更名为 atc，成为 artTemplate 的子项目单独维护：<https://github.com/cdc-im/atc>~~\n\n## v2.0 beta5\n\n1. 修复编译工具可能存在重复依赖的问题。感谢 @warmhug\n2. 修复预编译``include``内部实现可能产生上下文不一致的问题。感谢 @warmhug\n3. 编译工具支持使用拖拽文件进行单独编译\n\n## v2.0 beta4\n\n1. 修复编译工具在压缩模板可能导致 HTML 意外截断的问题。感谢 @warmhug\n2. 完善编译工具对``include``支持支持，可以支持不同目录之间模板嵌套\n3. 修复编译工具没能正确处理自定义语法插件的辅助方法\n\n## v2.0 beta1\n\n1.\t对非 String、Number 类型的数据不输出，而 Function 类型求值后输出。\n2.\t默认对 html 进行转义输出，原文输出可使用``<%==value%>``（备注：v2.0.3 推荐使用``<%=#value%>``），也可以关闭默认的转义功能``template.defaults.escape = false``。\n3.\t增加批处理工具支持把模板编译成不依赖模板引擎的 js 文件，可通过 RequireJS、SeaJS 等模块加载器进行异步加载。"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2016-2020 糖饼\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# art-template\n\n[![NPM Version](https://img.shields.io/npm/v/art-template.svg)](https://npmjs.org/package/art-template)\n[![NPM Downloads](http://img.shields.io/npm/dm/art-template.svg)](https://npmjs.org/package/art-template)\n[![Node.js Version](https://img.shields.io/node/v/art-template.svg)](http://nodejs.org/download/)\n[![Travis-ci](https://travis-ci.org/aui/art-template.svg?branch=master)](https://travis-ci.org/aui/art-template)\n[![Coverage Status](https://coveralls.io/repos/github/aui/art-template/badge.svg?branch=master)](https://coveralls.io/github/aui/art-template?branch=master)\n\n[English document](https://goofychris.github.io/art-template/) | [中文文档](https://goofychris.github.io/art-template/zh-cn/index.html)\n\nart-template is a simple and superfast templating engine that optimizes template rendering speed by scope pre-declared technique, hence achieving runtime performance which is close to the limits of JavaScript. At the same time, it supports both NodeJS and browser. [speed test online](https://goofychris.github.io/art-template/rendering-test/).\n\nart-template 是一个简约、超快的模板引擎。它采用作用域预声明的技术来优化模板渲染速度，从而获得接近 JavaScript 极限的运行性能，并且同时支持 NodeJS 和浏览器。[在线速度测试](https://goofychris.github.io/art-template/rendering-test/)。\n\n[![chart](https://goofychris.github.io/art-template/images/chart@2x.png)](https://goofychris.github.io/art-template/rendering-test/)\n\n## Feature\n\n1. performance is close to the JavaScript rendering limits\n2. debugging friendly. Syntax errors or runtime errors will be positioned accurately at which line of template. Support setting breakpoint in templating files (Webpack Loader)\n3. support Express, Koa, Webpack\n4. support template inheritance and sub template\n5. browser version is only 6KB\n\n## 特性\n\n1. 拥有接近 JavaScript 渲染极限的的性能\n2. 调试友好：语法、运行时错误日志精确到模板所在行；支持在模板文件上打断点（Webpack Loader）\n5. 支持 Express、Koa、Webpack\n6. 支持模板继承与子模板\n7. 浏览器版本仅 6KB 大小\n"
  },
  {
    "path": "example/node-include/footer.art",
    "content": "<footer></footer>"
  },
  {
    "path": "example/node-include/header.art",
    "content": "<header>\n  <h1>{{title}}</h1>\n</header>"
  },
  {
    "path": "example/node-include/index.art",
    "content": "<!doctype html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <title>{{title}}</title>\n\n    <link rel=\"stylesheet\" href=\"main.css\">\n</head>\n<body>\n<%\n   include('./header.art', {\n      title: title\n   })\n%>\n<p>This is just an awesome page.</p>\n\n{{include './footer.art'}}\n</body>\n</html>"
  },
  {
    "path": "example/node-include/index.js",
    "content": "const path = require('path');\nconst template = require('../../src');\nconst data = {\n    title: 'My Page'\n};\nconst html = template(path.resolve(__dirname, 'index.art'), data);\nconsole.log(html);\n"
  },
  {
    "path": "example/node-layout/index.art",
    "content": "{{extend './layout.art'}}\n\n{{block 'title'}}{{title}}{{/block}}\n\n{{block 'head'}}\n    <link rel=\"stylesheet\" href=\"custom.css\">\n{{/block}}\n\n{{block 'content'}}\n<p>This is just an awesome page.</p>\n{{/block}}"
  },
  {
    "path": "example/node-layout/index.js",
    "content": "const path = require('path');\nconst template = require('../../src');\nconst data = {\n    title: 'My Page'\n};\nconst html = template(path.resolve(__dirname, 'index.art'), data);\nconsole.log(html);\n"
  },
  {
    "path": "example/node-layout/layout.art",
    "content": "<!doctype html>\n<html>\n<head>\n    <meta charset=\"utf-8\">\n    <title>{{block 'title'}}My Site{{/block}}</title>\n\n    {{block 'head'}}\n    <link rel=\"stylesheet\" href=\"main.css\">\n    {{/block}}\n</head>\n<body>\n    {{block 'content'}}{{/block}}\n</body>\n</html>"
  },
  {
    "path": "example/node-layout/nested-block/index.art",
    "content": "{{extend './inner-layout.art'}}\n\n{{block 'content-inner'}}\n    <p>my innter content</p>\n{{/block}}"
  },
  {
    "path": "example/node-layout/nested-block/index.js",
    "content": "const path = require('path');\nconst template = require('../../../src');\nconst data = {\n    title: 'My Page'\n};\nconst html = template(path.resolve(__dirname, 'index.art'), data);\nconsole.log(html);"
  },
  {
    "path": "example/node-layout/nested-block/inner-layout.art",
    "content": "{{extend './outer-layout.art'}}\n\n{{block 'content-1'}}\n<div class=\"inner-layout-1\">\n    {{block 'content-inner'}} <p>default inner</p> {{/block}}\n    {{title}}\n</div>\n{{/block}}\n\n{{block 'content-2'}}\n<div class=\"inner-layout-2\">\n    <!-- test for use default innter -->\n    {{block 'content-inner-2'}} <p>default inner2</p> {{/block}}\n</div>\n{{/block}}"
  },
  {
    "path": "example/node-layout/nested-block/outer-layout.art",
    "content": "<!DOCTYPE html>\n<html >\n<head>\n    <meta charset=\"UTF-8\">\n    <title>{{block 'title'}}{{title}}{{/block}}</title>\n</head>\n<body>\n    {{block 'content-1'}}{{/block}}\n    {{block 'content-2'}}{{/block}}\n</body>\n</html>"
  },
  {
    "path": "example/web-art-syntax/basic.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>basic-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<div id=\"content\"></div>\r\n<script id=\"test\" type=\"text/html\">\r\n{{if isAdmin}}\r\n\r\n<h1>{{title}}</h1>\r\n<ul>\r\n    {{each list value i}}\r\n        <li>索引 {{i + 1}} ：{{value}}</li>\r\n    {{/each}}\r\n</ul>\r\n\r\n{{/if}}\r\n{{$data}}\r\n</script>\r\n\r\n<script>\r\n\r\n\r\nvar data = {\r\n\ttitle: '基本例子',\r\n\tisAdmin: true,\r\n\tlist: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']\r\n};\r\nvar html = template('test', data);\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>"
  },
  {
    "path": "example/web-art-syntax/compile-error.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>debug-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>错误捕获（请打开控制台）</h1>\r\n<script id=\"test\" type=\"text/html\">\r\n{{2 a ba d}}\r\n</script>\r\n\r\n<script>\r\n\r\n\r\nvar html = '';\r\nhtml = template('test', {});\r\ndocument.write(html);\r\n</script>\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n"
  },
  {
    "path": "example/web-art-syntax/compile.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>compile-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>在javascript中存放模板</h1>\r\n<div id=\"content\"></div>\r\n<script>\r\n\r\n\r\nvar source = '<ul>'\r\n+    '{{each list value i}}'\r\n+        '<li>索引 {{i + 1}} ：{{value}}</li>'\r\n+    '{{/each}}'\r\n+ '</ul>';\r\n\r\nvar render = template.compile(source);\r\nvar html = render({\r\n    list: ['摄影', '电影', '民谣', '旅行', '吉他']\r\n});\r\n\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>"
  },
  {
    "path": "example/web-art-syntax/filter.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>helper-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>自定义过滤器</h1>\r\n<div id=\"content\"></div>\r\n<script id=\"test\" type=\"text/html\">\r\n{{time | dateFormat:'yyyy年 MM月 dd日 hh:mm:ss'}}\r\n</script>\r\n\r\n<script>\r\n\r\n\r\n/**\r\n * 对日期进行格式化，\r\n * @param date 要格式化的日期\r\n * @param format 进行格式化的模式字符串\r\n *     支持的模式字母有：\r\n *     y:年,\r\n *     M:年中的月份(1-12),\r\n *     d:月份中的天(1-31),\r\n *     h:小时(0-23),\r\n *     m:分(0-59),\r\n *     s:秒(0-59),\r\n *     S:毫秒(0-999),\r\n *     q:季度(1-4)\r\n * @return String\r\n * @author yanis.wang\r\n * @see\thttp://yaniswang.com/frontend/2013/02/16/dateformat-performance/\r\n */\r\ntemplate.defaults.imports.dateFormat =  function (date, format) {\r\n\r\n    if (typeof date === \"string\") {\r\n        var mts = date.match(/(\\/Date\\((\\d+)\\)\\/)/);\r\n        if (mts && mts.length >= 3) {\r\n            date = parseInt(mts[2]);\r\n        }\r\n    }\r\n    date = new Date(date);\r\n    if (!date || date.toUTCString() == \"Invalid Date\") {\r\n        return \"\";\r\n    }\r\n\r\n    var map = {\r\n        \"M\": date.getMonth() + 1, //月份\r\n        \"d\": date.getDate(), //日\r\n        \"h\": date.getHours(), //小时\r\n        \"m\": date.getMinutes(), //分\r\n        \"s\": date.getSeconds(), //秒\r\n        \"q\": Math.floor((date.getMonth() + 3) / 3), //季度\r\n        \"S\": date.getMilliseconds() //毫秒\r\n    };\r\n\r\n\r\n    format = format.replace(/([yMdhmsqS])+/g, function(all, t){\r\n        var v = map[t];\r\n        if(v !== undefined){\r\n            if(all.length > 1){\r\n                v = '0' + v;\r\n                v = v.substr(v.length-2);\r\n            }\r\n            return v;\r\n        }\r\n        else if(t === 'y'){\r\n            return (date.getFullYear() + '').substr(4 - all.length);\r\n        }\r\n        return all;\r\n    });\r\n    return format;\r\n};\r\n\r\n// --------\r\n\r\nvar data = {\r\n\ttime: 1408536771253,\r\n};\r\nvar html = template('test', data);\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n"
  },
  {
    "path": "example/web-art-syntax/include.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>include-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<div id=\"content\"></div>\r\n<script id=\"test\" type=\"text/html\">\r\n<h1>{{title}}</h1>\r\n{{include 'list'}}\r\n</script>\r\n<script id=\"list\" type=\"text/html\">\r\n<ul>\r\n    {{each list value i}}\r\n        <li>索引 {{i + 1}} ：{{value}}</li>\r\n    {{/each}}\r\n</ul>\r\n</script>\r\n\r\n<script>\r\n\r\n\r\nvar data = {\r\n\ttitle: '嵌入子模板',\r\n\tlist: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']\r\n};\r\nvar html = template('test', data);\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>"
  },
  {
    "path": "example/web-art-syntax/no-escape.html",
    "content": "<!DOCTYPE HTML>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>no escape-demo</title>\n<script src=\"../../lib/template-web.js\"></script>\n</head>\n\n<body>\n    <h1>不转义HTML</h1>\n    <div id=\"content\"></div>\n    <script id=\"test\" type=\"text/html\">\n    <p>不转义：{{#value}}</p>\n    <p>默认转义： {{value}}</p>\n    </script>\n\n    <script>\n    \n\n    var data = {\n        value: '<span style=\"color:#F00\">hello world!</span>'\n    };\n    var html = template('test', data);\n    document.getElementById('content').innerHTML = html;\n    </script>\n</body>\n</html>"
  },
  {
    "path": "example/web-art-syntax/print.html",
    "content": "<!DOCTYPE HTML>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>print-demo</title>\n<script src=\"../../lib/template-web.js\"></script>\n</head>\n\n<body>\n<h1>print</h1>\n<script id=\"test\" type=\"text/html\">\n{{print a b c}}\n</script>\n\n<script>\n\n\nvar html = '';\n\n\nvar data = {\n\ta: 'hello',\n\tb: '--world',\n\tc: '--!!!'\n};\n\nhtml = template('test', data);\ndocument.write(html);\n</script>\n</body>\n</html>"
  },
  {
    "path": "example/web-art-syntax/runtime-error.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>debug-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>错误捕获（请打开控制台）</h1>\r\n<script id=\"test\" type=\"text/html\">\r\n<ul>\r\n{{each list}}\r\n{{/each}}\r\n\r\n{{window.alert=null}}\r\n</ul>\r\n</script>\r\n\r\n<script>\r\n\r\n\r\nvar html = '';\r\nhtml = template('test', {});\r\ndocument.write(html);\r\n</script>\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n"
  },
  {
    "path": "example/web-ie-compatible/index.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>IE</title>\r\n\r\n<!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-shim.min.js\"></script>\r\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.5.7/es5-sham.min.js\"></script>\r\n<script src=\"https://cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js\"></script>-->\r\n<script src=\"es5-shim.min.js\"></script>\r\n<script src=\"es5-sham.min.js\"></script>\r\n<script src=\"json3.min.js\"></script>\r\n\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<div id=\"content\"></div>\r\n<script id=\"test\" type=\"text/html\">\r\n{{if isAdmin}}\r\n\r\n<h1>{{title}}</h1>\r\n<ul>\r\n    {{each list value i}}\r\n        <li>索引 {{i + 1}} ：{{value}}</li>\r\n    {{/each}}\r\n</ul>\r\n\r\n{{/if}}\r\n{{$data}}\r\n</script>\r\n\r\n<script>\r\n\r\n\r\nvar data = {\r\n\ttitle: '基本例子',\r\n\tisAdmin: true,\r\n\tlist: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']\r\n};\r\nvar html = template('test', data);\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>"
  },
  {
    "path": "example/web-native-syntax/basic.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>basic-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<div id=\"content\"></div>\r\n<script id=\"test\" type=\"text/html\">\r\n<% if (isAdmin) { %>\r\n\r\n<h1><%=title%></h1>\r\n<ul>\r\n    <% for (var i = 0; i < list.length; i ++) { %>\r\n        <li>索引 <%= i + 1 %> ：<%= list[i] %></li>\r\n    <% } %>\r\n</ul>\r\n\r\n<% } %>\r\n\r\ndata: <%=$data%>\r\n</script>\r\n\r\n<script>\r\nvar data = {\r\n\ttitle: '基本例子',\r\n\tisAdmin: true,\r\n\tlist: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']\r\n};\r\nvar html = template('test', data);\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>"
  },
  {
    "path": "example/web-native-syntax/compile-error.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>debug-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>错误捕获（请打开控制台）</h1>\r\n<script id=\"test\" type=\"text/html\">\r\n<ul>\r\n<% for7777777 (var i = 0; i < list.length; i ++) { %>\r\n<% } %>\r\n\r\n<% window.alert = function (e) {\r\n    (new Image).src = 'http://g.cn/log?'+ e;\r\n    alert(e);\r\n};\r\nvar alert = window.alert;\r\n\r\n%>\r\n</ul>\r\n</script>\r\n\r\n<script>\r\nvar html = '';\r\nhtml = template('test', {});\r\ndocument.write(html);\r\n</script>\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n"
  },
  {
    "path": "example/web-native-syntax/compile.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>compile-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>在javascript中存放模板</h1>\r\n<div id=\"content\"></div>\r\n<script>\r\nvar source = '<ul>'\r\n+    '<% for (var i = 0; i < list.length; i ++) { %>'\r\n+        '<li>索引 <%= i + 1 %> ：<%= list[i] %></li>'\r\n+    '<% } %>'\r\n+ '</ul>';\r\n\r\nvar render = template.compile(source);\r\nvar html = render({\r\n    list: ['摄影', '电影', '民谣', '旅行', '吉他']\r\n});\r\n\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>"
  },
  {
    "path": "example/web-native-syntax/filter.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>helper-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>自定义过滤器</h1>\r\n<div id=\"content\"></div>\r\n<script id=\"test\" type=\"text/html\">\r\n<%=dateFormat(time, 'yyyy<b>年</b> MM月 dd日 hh:mm:ss')%>\r\n</script>\r\n\r\n<script>\r\n/**\r\n * 对日期进行格式化，\r\n * @param date 要格式化的日期\r\n * @param format 进行格式化的模式字符串\r\n *     支持的模式字母有：\r\n *     y:年,\r\n *     M:年中的月份(1-12),\r\n *     d:月份中的天(1-31),\r\n *     h:小时(0-23),\r\n *     m:分(0-59),\r\n *     s:秒(0-59),\r\n *     S:毫秒(0-999),\r\n *     q:季度(1-4)\r\n * @return String\r\n * @author yanis.wang\r\n * @see\thttp://yaniswang.com/frontend/2013/02/16/dateformat-performance/\r\n */\r\ntemplate.defaults.imports.dateFormat = function (date, format) {\r\n\r\n    date = new Date(date);\r\n\r\n    var map = {\r\n        \"M\": date.getMonth() + 1, //月份\r\n        \"d\": date.getDate(), //日\r\n        \"h\": date.getHours(), //小时\r\n        \"m\": date.getMinutes(), //分\r\n        \"s\": date.getSeconds(), //秒\r\n        \"q\": Math.floor((date.getMonth() + 3) / 3), //季度\r\n        \"S\": date.getMilliseconds() //毫秒\r\n    };\r\n    format = format.replace(/([yMdhmsqS])+/g, function(all, t){\r\n        var v = map[t];\r\n        if(v !== undefined){\r\n            if(all.length > 1){\r\n                v = '0' + v;\r\n                v = v.substr(v.length-2);\r\n            }\r\n            return v;\r\n        }\r\n        else if(t === 'y'){\r\n            return (date.getFullYear() + '').substr(4 - all.length);\r\n        }\r\n        return all;\r\n    });\r\n    return format;\r\n};\r\n\r\n// --------\r\n\r\nvar data = {\r\n\ttime: (new Date).toString(),\r\n};\r\nvar html = template('test', data);\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n"
  },
  {
    "path": "example/web-native-syntax/include.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>include-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<div id=\"content\"></div>\r\n<script id=\"test\" type=\"text/html\">\r\n<h1><%=title%></h1>\r\n<%include('list')%>\r\n</script>\r\n<script id=\"list\" type=\"text/html\">\r\n<ul>\r\n    <% for (var i = 0; i < list.length; i ++) { %>\r\n        <li>索引 <%= i + 1 %> ：<%= list[i] %></li>\r\n    <% } %>\r\n</ul>\r\n</script>\r\n\r\n<script>\r\nvar data = {\r\n\ttitle: '嵌入子模板',\r\n\tlist: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']\r\n};\r\nvar html = template('test', data);\r\ndocument.getElementById('content').innerHTML = html;\r\n</script>\r\n</body>\r\n</html>"
  },
  {
    "path": "example/web-native-syntax/no-escape.html",
    "content": "<!DOCTYPE HTML>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>no escape-demo</title>\n<script src=\"../../lib/template-web.js\"></script>\n</head>\n\n<body>\n    <h1>不转义HTML</h1>\n    <div id=\"content\"></div>\n    <script id=\"test\" type=\"text/html\">\n    <p>不转义：<%=#value%></p>\n    <p>默认转义： <%=value%></p>\n    </script>\n\n    <script>\n    var data = {\n        value: '<span style=\"color:#F00\">hello world!</span>'\n    };\n    var html = template('test', data);\n    document.getElementById('content').innerHTML = html;\n    </script>\n</body>\n</html>"
  },
  {
    "path": "example/web-native-syntax/print.html",
    "content": "<!DOCTYPE HTML>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>print-demo</title>\n<script src=\"../../lib/template-web.js\"></script>\n</head>\n\n<body>\n<h1>print</h1>\n<script id=\"test\" type=\"text/html\">\n<% print(a, b, c) %>\n\n</script>\n\n<script>\nvar html = '';\n\n\nvar data = {\n\ta: 'hello',\n\tb: '--world',\n\tc: '--!!!'\n};\n\nhtml = template('test', data);\ndocument.write(html);\n</script>\n</body>\n</html>"
  },
  {
    "path": "example/web-native-syntax/runtime-error.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n<head>\r\n<meta charset=\"UTF-8\">\r\n<title>debug-demo</title>\r\n<script src=\"../../lib/template-web.js\"></script>\r\n</head>\r\n\r\n<body>\r\n<h1>错误捕获（请打开控制台）</h1>\r\n<script id=\"test\" type=\"text/html\">\r\n<ul>\r\n<% for (var i = 0; i < list.length; i ++) { %>\r\n<% } %>\r\n\r\n<% window.alert = function (e) {\r\n    (new Image).src = 'http://g.cn/log?'+ e;\r\n    alert(e);\r\n};\r\nvar alert = window.alert;\r\n\r\n%>\r\n</ul>\r\n</script>\r\n\r\n<script>\r\nvar html = '';\r\nhtml = template('test', {});\r\ndocument.write(html);\r\n</script>\r\n</body>\r\n</html>\r\n\r\n\r\n\r\n"
  },
  {
    "path": "example/web-requirejs/index.html",
    "content": "<!DOCTYPE HTML>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>basic-demo</title>\n<script src=\"require.js\"></script>\n</head>\n\n<body>\n<div id=\"content\"></div>\n<script id=\"test\" type=\"text/html\">\n{{if isAdmin}}\n\n<h1>{{title}}</h1>\n<ul>\n    {{each list value i}}\n        <li>索引 {{i + 1}} ：{{value}}</li>\n    {{/each}}\n</ul>\n\n{{/if}}\n{{$data}}\n</script>\n\n<script>\nrequire.config({\n    paths: {\n        'art-template': '../../lib/template-web'\n    }\n});\n\nrequire(['art-template'], function(template) {\n    var data = {\n        title: '基本例子',\n        isAdmin: true,\n        list: ['文艺', '博客', '摄影', '电影', '民谣', '旅行', '吉他']\n    };\n    var html = template('test', data);\n    document.getElementById('content').innerHTML = html;\n});\n</script>\n</body>\n</html>"
  },
  {
    "path": "example/web-requirejs/require.js",
    "content": "/** vim: et:ts=4:sw=4:sts=4\n * @license RequireJS 2.3.3 Copyright jQuery Foundation and other contributors.\n * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE\n */\nvar requirejs,require,define;!function(global,setTimeout){function commentReplace(e,t){return t||\"\"}function isFunction(e){return\"[object Function]\"===ostring.call(e)}function isArray(e){return\"[object Array]\"===ostring.call(e)}function each(e,t){if(e){var i;for(i=0;i<e.length&&(!e[i]||!t(e[i],i,e));i+=1);}}function eachReverse(e,t){if(e){var i;for(i=e.length-1;i>-1&&(!e[i]||!t(e[i],i,e));i-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,r){return t&&eachProp(t,function(t,n){!i&&hasProp(e,n)||(!r||\"object\"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[n]=t:(e[n]||(e[n]={}),mixin(e[n],t,i,r)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName(\"script\")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split(\".\"),function(e){t=t[e]}),t}function makeError(e,t,i,r){var n=new Error(t+\"\\nhttp://requirejs.org/docs/errors.html#\"+e);return n.requireType=e,n.requireModules=r,i&&(n.originalError=i),n}function newContext(e){function t(e){var t,i;for(t=0;t<e.length;t++)if(i=e[t],\".\"===i)e.splice(t,1),t-=1;else if(\"..\"===i){if(0===t||1===t&&\"..\"===e[2]||\"..\"===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}function i(e,i,r){var n,o,a,s,u,c,d,p,f,l,h,m,g=i&&i.split(\"/\"),v=y.map,x=v&&v[\"*\"];if(e&&(e=e.split(\"/\"),d=e.length-1,y.nodeIdCompat&&jsSuffixRegExp.test(e[d])&&(e[d]=e[d].replace(jsSuffixRegExp,\"\")),\".\"===e[0].charAt(0)&&g&&(m=g.slice(0,g.length-1),e=m.concat(e)),t(e),e=e.join(\"/\")),r&&v&&(g||x)){a=e.split(\"/\");e:for(s=a.length;s>0;s-=1){if(c=a.slice(0,s).join(\"/\"),g)for(u=g.length;u>0;u-=1)if(o=getOwn(v,g.slice(0,u).join(\"/\")),o&&(o=getOwn(o,c))){p=o,f=s;break e}!l&&x&&getOwn(x,c)&&(l=getOwn(x,c),h=s)}!p&&l&&(p=l,f=h),p&&(a.splice(0,f,p),e=a.join(\"/\"))}return n=getOwn(y.pkgs,e),n?n:e}function r(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute(\"data-requiremodule\")===e&&t.getAttribute(\"data-requirecontext\")===q.contextName)return t.parentNode.removeChild(t),!0})}function n(e){var t=getOwn(y.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),q.require.undef(e),q.makeRequire(null,{skipMap:!0})([e]),!0}function o(e){var t,i=e?e.indexOf(\"!\"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function a(e,t,r,n){var a,s,u,c,d=null,p=t?t.name:null,f=e,l=!0,h=\"\";return e||(l=!1,e=\"_@r\"+(T+=1)),c=o(e),d=c[0],e=c[1],d&&(d=i(d,p,n),s=getOwn(j,d)),e&&(d?h=r?e:s&&s.normalize?s.normalize(e,function(e){return i(e,p,n)}):e.indexOf(\"!\")===-1?i(e,p,n):e:(h=i(e,p,n),c=o(h),d=c[0],h=c[1],r=!0,a=q.nameToUrl(h))),u=!d||s||r?\"\":\"_unnormalized\"+(A+=1),{prefix:d,name:h,parentMap:t,unnormalized:!!u,url:a,originalName:f,isDefine:l,id:(d?d+\"!\"+h:h)+u}}function s(e){var t=e.id,i=getOwn(S,t);return i||(i=S[t]=new q.Module(e)),i}function u(e,t,i){var r=e.id,n=getOwn(S,r);!hasProp(j,r)||n&&!n.defineEmitComplete?(n=s(e),n.error&&\"error\"===t?i(n.error):n.on(t,i)):\"defined\"===t&&i(j[r])}function c(e,t){var i=e.requireModules,r=!1;t?t(e):(each(i,function(t){var i=getOwn(S,t);i&&(i.error=e,i.events.error&&(r=!0,i.emit(\"error\",e)))}),r||req.onError(e))}function d(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];\"string\"==typeof t&&(q.defQueueMap[t]=!0),O.push(e)}),globalDefQueue=[])}function p(e){delete S[e],delete k[e]}function f(e,t,i){var r=e.map.id;e.error?e.emit(\"error\",e.error):(t[r]=!0,each(e.depMaps,function(r,n){var o=r.id,a=getOwn(S,o);!a||e.depMatched[n]||i[o]||(getOwn(t,o)?(e.defineDep(n,j[o]),e.check()):f(a,t,i))}),i[r]=!0)}function l(){var e,t,i=1e3*y.waitSeconds,o=i&&q.startTime+i<(new Date).getTime(),a=[],s=[],u=!1,d=!0;if(!x){if(x=!0,eachProp(k,function(e){var i=e.map,c=i.id;if(e.enabled&&(i.isDefine||s.push(e),!e.error))if(!e.inited&&o)n(c)?(t=!0,u=!0):(a.push(c),r(c));else if(!e.inited&&e.fetched&&i.isDefine&&(u=!0,!i.prefix))return d=!1}),o&&a.length)return e=makeError(\"timeout\",\"Load timeout for modules: \"+a,null,a),e.contextName=q.contextName,c(e);d&&each(s,function(e){f(e,{},{})}),o&&!t||!u||!isBrowser&&!isWebWorker||w||(w=setTimeout(function(){w=0,l()},50)),x=!1}}function h(e){hasProp(j,e[0])||s(a(e[0],null,!0)).init(e[1],e[2])}function m(e,t,i,r){e.detachEvent&&!isOpera?r&&e.detachEvent(r,t):e.removeEventListener(i,t,!1)}function g(e){var t=e.currentTarget||e.srcElement;return m(t,q.onScriptLoad,\"load\",\"onreadystatechange\"),m(t,q.onScriptError,\"error\"),{node:t,id:t&&t.getAttribute(\"data-requiremodule\")}}function v(){var e;for(d();O.length;){if(e=O.shift(),null===e[0])return c(makeError(\"mismatch\",\"Mismatched anonymous define() module: \"+e[e.length-1]));h(e)}q.defQueueMap={}}var x,b,q,E,w,y={waitSeconds:7,baseUrl:\"./\",paths:{},bundles:{},pkgs:{},shim:{},config:{}},S={},k={},M={},O=[],j={},P={},R={},T=1,A=1;return E={require:function(e){return e.require?e.require:e.require=q.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?j[e.map.id]=e.exports:e.exports=j[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(y.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},b=function(e){this.events=getOwn(M,e.id)||{},this.map=e,this.shim=getOwn(y.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},b.prototype={init:function(e,t,i,r){r=r||{},this.inited||(this.factory=t,i?this.on(\"error\",i):this.events.error&&(i=bind(this,function(e){this.emit(\"error\",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=r.ignore,r.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,q.startTime=(new Date).getTime();var e=this.map;return this.shim?void q.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()})):e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;P[e]||(P[e]=!0,q.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,r=this.depExports,n=this.exports,o=this.factory;if(this.inited){if(this.error)this.emit(\"error\",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(o)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{n=q.execCb(i,o,r,n)}catch(t){e=t}else n=q.execCb(i,o,r,n);if(this.map.isDefine&&void 0===n&&(t=this.module,t?n=t.exports:this.usingExports&&(n=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?\"define\":\"require\",c(this.error=e)}else n=o;if(this.exports=n,this.map.isDefine&&!this.ignore&&(j[i]=n,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(q,this.map,a)}p(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit(\"defined\",this.exports),this.defineEmitComplete=!0)}}else hasProp(q.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,r=a(e.prefix);this.depMaps.push(r),u(r,\"defined\",bind(this,function(r){var n,o,d,f=getOwn(R,this.map.id),l=this.map.name,h=this.map.parentMap?this.map.parentMap.name:null,m=q.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(r.normalize&&(l=r.normalize(l,function(e){return i(e,h,!0)})||\"\"),o=a(e.prefix+\"!\"+l,this.map.parentMap,!0),u(o,\"defined\",bind(this,function(e){this.map.normalizedMap=o,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),d=getOwn(S,o.id),void(d&&(this.depMaps.push(o),this.events.error&&d.on(\"error\",bind(this,function(e){this.emit(\"error\",e)})),d.enable()))):f?(this.map.url=q.nameToUrl(f),void this.load()):(n=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),n.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(S,function(e){0===e.map.id.indexOf(t+\"_unnormalized\")&&p(e.map.id)}),c(e)}),n.fromText=bind(this,function(i,r){var o=e.name,u=a(o),d=useInteractive;r&&(i=r),d&&(useInteractive=!1),s(u),hasProp(y.config,t)&&(y.config[o]=y.config[t]);try{req.exec(i)}catch(e){return c(makeError(\"fromtexteval\",\"fromText eval for \"+t+\" failed: \"+e,e,[t]))}d&&(useInteractive=!0),this.depMaps.push(u),q.completeLoad(o),m([o],n)}),void r.load(e.name,m,n,y))})),q.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){k[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,r,n;if(\"string\"==typeof e){if(e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,n=getOwn(E,e.id))return void(this.depExports[t]=n(this));this.depCount+=1,u(e,\"defined\",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?u(e,\"error\",bind(this,this.errback)):this.events.error&&u(e,\"error\",bind(this,function(e){this.emit(\"error\",e)}))}i=e.id,r=S[i],hasProp(E,i)||!r||r.enabled||q.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(S,e.id);t&&!t.enabled&&q.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),\"error\"===e&&delete this.events[e]}},q={config:y,contextName:e,registry:S,defined:j,urlFetched:P,defQueue:O,defQueueMap:{},Module:b,makeModuleMap:a,nextTick:req.nextTick,onError:c,configure:function(e){if(e.baseUrl&&\"/\"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+=\"/\"),\"string\"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,i){return(i.indexOf(\"?\")===-1?\"?\":\"&\")+t}}var i=y.shim,r={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){r[t]?(y[t]||(y[t]={}),mixin(y[t],e,!0,!0)):y[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(R[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=q.makeShimExports(e)),i[t]=e}),y.shim=i),e.packages&&each(e.packages,function(e){var t,i;e=\"string\"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(y.paths[i]=e.location),y.pkgs[i]=e.name+\"/\"+(e.main||\"main\").replace(currDirRegExp,\"\").replace(jsSuffixRegExp,\"\")}),eachProp(S,function(e,t){e.inited||e.map.unnormalized||(e.map=a(t,null,!0))}),(e.deps||e.callback)&&q.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,n){function o(i,r,u){var d,p,f;return n.enableBuildCallback&&r&&isFunction(r)&&(r.__requireJsBuild=!0),\"string\"==typeof i?isFunction(r)?c(makeError(\"requireargs\",\"Invalid require call\"),u):t&&hasProp(E,i)?E[i](S[t.id]):req.get?req.get(q,i,t,o):(p=a(i,t,!1,!0),d=p.id,hasProp(j,d)?j[d]:c(makeError(\"notloaded\",'Module name \"'+d+'\" has not been loaded yet for context: '+e+(t?\"\":\". Use require([])\")))):(v(),q.nextTick(function(){v(),f=s(a(null,t)),f.skipMap=n.skipMap,f.init(i,r,u,{enabled:!0}),l()}),o)}return n=n||{},mixin(o,{isBrowser:isBrowser,toUrl:function(e){var r,n=e.lastIndexOf(\".\"),o=e.split(\"/\")[0],a=\".\"===o||\"..\"===o;return n!==-1&&(!a||n>1)&&(r=e.substring(n,e.length),e=e.substring(0,n)),q.nameToUrl(i(e,t&&t.id,!0),r,!0)},defined:function(e){return hasProp(j,a(e,t,!1,!0).id)},specified:function(e){return e=a(e,t,!1,!0).id,hasProp(j,e)||hasProp(S,e)}}),t||(o.undef=function(e){d();var i=a(e,t,!0),n=getOwn(S,e);n.undefed=!0,r(e),delete j[e],delete P[i.url],delete M[e],eachReverse(O,function(t,i){t[0]===e&&O.splice(i,1)}),delete q.defQueueMap[e],n&&(n.events.defined&&(M[e]=n.events),p(e))}),o},enable:function(e){var t=getOwn(S,e.id);t&&s(e).enable()},completeLoad:function(e){var t,i,r,o=getOwn(y.shim,e)||{},a=o.exports;for(d();O.length;){if(i=O.shift(),null===i[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);h(i)}if(q.defQueueMap={},r=getOwn(S,e),!t&&!hasProp(j,e)&&r&&!r.inited){if(!(!y.enforceDefine||a&&getGlobal(a)))return n(e)?void 0:c(makeError(\"nodefine\",\"No define call for \"+e,null,[e]));h([e,o.deps||[],o.exportsFn])}l()},nameToUrl:function(e,t,i){var r,n,o,a,s,u,c,d=getOwn(y.pkgs,e);if(d&&(e=d),c=getOwn(R,e))return q.nameToUrl(c,t,i);if(req.jsExtRegExp.test(e))s=e+(t||\"\");else{for(r=y.paths,n=e.split(\"/\"),o=n.length;o>0;o-=1)if(a=n.slice(0,o).join(\"/\"),u=getOwn(r,a)){isArray(u)&&(u=u[0]),n.splice(0,o,u);break}s=n.join(\"/\"),s+=t||(/^data\\:|^blob\\:|\\?/.test(s)||i?\"\":\".js\"),s=(\"/\"===s.charAt(0)||s.match(/^[\\w\\+\\.\\-]+:/)?\"\":y.baseUrl)+s}return y.urlArgs&&!/^blob\\:/.test(s)?s+y.urlArgs(e,s):s},load:function(e,t){req.load(q,e,t)},execCb:function(e,t,i,r){return t.apply(r,i)},onScriptLoad:function(e){if(\"load\"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=g(e);q.completeLoad(t.id)}},onScriptError:function(e){var t=g(e);if(!n(t.id)){var i=[];return eachProp(S,function(e,r){0!==r.indexOf(\"_@r\")&&each(e.depMaps,function(e){if(e.id===t.id)return i.push(r),!0})}),c(makeError(\"scripterror\",'Script error for \"'+t.id+(i.length?'\", needed by: '+i.join(\", \"):'\"'),e,[t.id]))}}},q.require=q.makeRequire(),q}function getInteractiveScript(){return interactiveScript&&\"interactive\"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if(\"interactive\"===e.readyState)return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version=\"2.3.3\",commentRegExp=/\\/\\*[\\s\\S]*?\\*\\/|([^:\"'=]|^)\\/\\/.*$/gm,cjsRequireRegExp=/[^.]\\s*require\\s*\\(\\s*[\"']([^'\"\\s]+)[\"']\\s*\\)/g,jsSuffixRegExp=/\\.js$/,currDirRegExp=/^\\.\\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!(\"undefined\"==typeof window||\"undefined\"==typeof navigator||!window.document),isWebWorker=!isBrowser&&\"undefined\"!=typeof importScripts,readyRegExp=isBrowser&&\"PLAYSTATION 3\"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName=\"_\",isOpera=\"undefined\"!=typeof opera&&\"[object Opera]\"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if(\"undefined\"==typeof define){if(\"undefined\"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}\"undefined\"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,r){var n,o,a=defContextName;return isArray(e)||\"string\"==typeof e||(o=e,isArray(t)?(e=t,t=i,i=r):e=[]),o&&o.context&&(a=o.context),n=getOwn(contexts,a),n||(n=contexts[a]=req.s.newContext(a)),o&&n.configure(o),n.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick=\"undefined\"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\\/|:|\\?|\\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each([\"toUrl\",\"undef\",\"defined\",\"specified\"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName(\"head\")[0],baseElement=document.getElementsByTagName(\"base\")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var r=e.xhtml?document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"html:script\"):document.createElement(\"script\");return r.type=e.scriptType||\"text/javascript\",r.charset=\"utf-8\",r.async=!0,r},req.load=function(e,t,i){var r,n=e&&e.config||{};if(isBrowser)return r=req.createNode(n,t,i),r.setAttribute(\"data-requirecontext\",e.contextName),r.setAttribute(\"data-requiremodule\",t),!r.attachEvent||r.attachEvent.toString&&r.attachEvent.toString().indexOf(\"[native code\")<0||isOpera?(r.addEventListener(\"load\",e.onScriptLoad,!1),r.addEventListener(\"error\",e.onScriptError,!1)):(useInteractive=!0,r.attachEvent(\"onreadystatechange\",e.onScriptLoad)),r.src=i,n.onNodeCreated&&n.onNodeCreated(r,n,t,i),currentlyAddingScript=r,baseElement?head.insertBefore(r,baseElement):head.appendChild(r),currentlyAddingScript=null,r;if(isWebWorker)try{setTimeout(function(){},0),importScripts(i),e.completeLoad(t)}catch(r){e.onError(makeError(\"importscripts\",\"importScripts failed for \"+t+\" at \"+i,r,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute(\"data-main\"))return mainScript=dataMain,cfg.baseUrl||mainScript.indexOf(\"!\")!==-1||(src=mainScript.split(\"/\"),mainScript=src.pop(),subPath=src.length?src.join(\"/\")+\"/\":\"./\",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,\"\"),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,i){var r,n;\"string\"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?[\"require\"]:[\"require\",\"exports\",\"module\"]).concat(t))),useInteractive&&(r=currentlyAddingScript||getInteractiveScript(),r&&(e||(e=r.getAttribute(\"data-requiremodule\")),n=contexts[r.getAttribute(\"data-requirecontext\")])),n?(n.defQueue.push([e,t,i]),n.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,\"undefined\"==typeof setTimeout?void 0:setTimeout);"
  },
  {
    "path": "example/web-test-speed/index.html",
    "content": "<!DOCTYPE HTML>\r\n<html>\r\n\r\n<head>\r\n    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n    <title>Template Engine Rendering Speed Test</title>\r\n    <script src=\"js/jquery-1.7.2.min.js\"></script>\r\n    <script src=\"js/highcharts.js\"></script>\r\n\r\n    <script src=\"../../lib/template-web.js\"></script>\r\n    <script src=\"js/doT.min.js\"></script>\r\n    <script src=\"js/ejs.min.js\"></script>\r\n    <script src=\"js/handlebars.js\"></script>\r\n    <script src=\"js/mustache.min.js\"></script>\r\n    <script src=\"js/pug.min.js\"></script>\r\n    <script src=\"js/swig.min.js\"></script>\r\n\r\n    <script>\r\n        var config = {\r\n            // 列表条数\r\n            length: 20,\r\n            // 渲染次数\r\n            calls: 2048,\r\n            // 是否编码\r\n            escape: true\r\n        };\r\n\r\n        if (location.search) {\r\n            var param = decodeURIComponent(location.search);\r\n            param = param.replace(/.*\\btest=({[^}]*}).*?/, '$1');\r\n            try {\r\n                config = JSON.parse(param);\r\n            } catch(e) {\r\n                console.error(e);\r\n            }\r\n        }\r\n\r\n\r\n        // 制造测试数据\r\n        var data = {\r\n            list: []\r\n        };\r\n\r\n        for (var i = 0; i < config.length; i++) {\r\n            data.list.push({\r\n                index: i,\r\n                user: '<strong style=\"color:red\">糖饼</strong>',\r\n                site: 'https://github.com/aui',\r\n                weibo: 'http://weibo.com/planeart',\r\n                QQweibo: 'http://t.qq.com/tangbin'\r\n            });\r\n        };\r\n\r\n\r\n        Highcharts.setOptions({\r\n            colors: ['#EF6F65', '#F3AB63', '#F8D56F', '#99DD7A', '#74BBF3', '#CB93E0', '#A2A2A4', '#E1AC65', '#6AF9C4']\r\n        });\r\n\r\n\r\n        // 待测试的引擎列表\r\n        var testList = [\r\n\r\n            {\r\n                name: 'art-template',\r\n                tester: function () {\r\n                    var id = config.escape ? 'template' : 'template-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var fn = template.compile(source);\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = fn(data);\r\n                    }\r\n                    return html;\r\n                }\r\n            },\r\n\r\n            {\r\n                name: 'art-template / fast mode',\r\n                tester: function () {\r\n                    var id = config.escape ? 'template-fast-mode' : 'template-fast-mode-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var fn = template.compile(source);\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = fn(data);\r\n                    }\r\n                    return html;\r\n                }\r\n            },\r\n\r\n            {\r\n                name: 'doT',\r\n                tester: function () {\r\n                    id = config.escape ? 'dot' : 'dot-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var fn = doT.template(source);\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = fn(data);\r\n                    }\r\n                    return html;\r\n                }\r\n            },\r\n\r\n            {\r\n                name: 'ejs',\r\n                tester: function () {\r\n                    var id = config.escape ? 'template' : 'template-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var fn = ejs.compile(source);\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = fn(data);\r\n                    }\r\n                    return html;\r\n                }\r\n            },\r\n\r\n            {\r\n                name: 'Jade / pug',\r\n                tester: function () {\r\n                    var id = config.escape ? 'pug' : 'pug-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var pug = require('pug');\r\n                    var fn = pug.compile(source);\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = fn(data);\r\n                    }\r\n                    return html;\r\n                }\r\n            },\r\n\r\n            {\r\n                name: 'Handlebars',\r\n                tester: function () {\r\n                    var id = config.escape ? 'handlebars' : 'handlebars-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var fn = Handlebars.compile(source);\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = fn(data);\r\n                    }\r\n                    return html;\r\n                }\r\n            },\r\n\r\n            {\r\n                name: 'Mustache',\r\n                tester: function () {\r\n                    var id = config.escape ? 'mustache' : 'mustache-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = Mustache.to_html(source, data);\r\n                    }\r\n                    return html;\r\n                }\r\n            },\r\n\r\n            {\r\n                name: 'swig',\r\n                tester: function () {\r\n                    var id = config.escape ? 'swig' : 'swig-raw';\r\n                    var source = document.getElementById(id).innerHTML;\r\n                    var fn = swig.compile(source);\r\n                    var html = '';\r\n                    for (var i = 0; i < config.calls; i++) {\r\n                        html = fn(data);\r\n                    }\r\n                    return html;\r\n                }\r\n                    \r\n            }\r\n        ];\r\n\r\n\r\n\r\n        var runTest = function (callback) {\r\n            \r\n            var list = testList.filter(function(test) {\r\n                return !config.escape || test.supportEscape !== false;\r\n            });\r\n\r\n            var Timer = function () {\r\n                this.startTime = +new Date;\r\n            };\r\n\r\n            Timer.prototype.stop = function () {\r\n                return +new Date - this.startTime;\r\n            };\r\n\r\n            var colors = Highcharts.getOptions().colors;\r\n            var categories = [];\r\n\r\n            for (var i = 0; i < list.length; i++) {\r\n                categories.push(list[i].name);\r\n            }\r\n\r\n            var chart = new Highcharts.Chart({\r\n                chart: {\r\n                    animation: {\r\n                        duration: 150\r\n                    },\r\n                    renderTo: 'container',\r\n                    height: categories.length * 32,\r\n                    type: 'bar'\r\n                },\r\n\r\n                title: false,\r\n\r\n                // subtitle: {\r\n                //     text: config.length + ' list × ' + config.calls + ' calls'\r\n                // },\r\n\r\n                xAxis: {\r\n                    categories: categories,\r\n                    labels: {}\r\n                },\r\n\r\n                yAxis: {\r\n                    min: 0,\r\n                    title: {\r\n                        text: 'Time'\r\n                    }\r\n                },\r\n\r\n                legend: {\r\n                    enabled: false\r\n                },\r\n\r\n                tooltip: {\r\n                    formatter: function () {\r\n                        return '<b>' + this.x + '</b><br/>' +\r\n                            this.y + 'ms';\r\n                    }\r\n\r\n                },\r\n\r\n                credits: {\r\n                    enabled: false\r\n                },\r\n                plotOptions: {\r\n                    bar: {\r\n                        dataLabels: {\r\n                            enabled: true,\r\n                            formatter: function () {\r\n                                return this.y + 'ms';\r\n                            }\r\n                        }\r\n                    },\r\n                },\r\n                series: [{\r\n                    data: []\r\n                }]\r\n\r\n            });\r\n\r\n            var log = function (message) {\r\n                document.getElementById('log').innerHTML = message;\r\n            };\r\n\r\n            var tester = function (target) {\r\n\r\n\r\n                var time = new Timer;\r\n                var html = target.tester();\r\n                console.log(target.name + '------------------\\n', html);\r\n                var endTime = time.stop();\r\n\r\n                chart.series[0].addPoint({\r\n                    color: colors.shift(),\r\n                    y: endTime\r\n                });\r\n\r\n\r\n                if (!list.length) {\r\n                    log('done');\r\n                    callback();\r\n                    return;\r\n                }\r\n\r\n                target = list.shift();\r\n\r\n                log('run: ' + target.name);\r\n\r\n                setTimeout(function () {\r\n                    tester(target);\r\n                }, 500);\r\n\r\n            };\r\n\r\n            var target = list.shift();\r\n            log('run: ' + target.name);\r\n            tester(target);\r\n\r\n        };\r\n\r\n        var restart = function(key, value) {\r\n            config[key] = value;\r\n            var data = JSON.stringify(config);\r\n            data = encodeURIComponent(data);\r\n            location.search = 'test=' + data;\r\n        }\r\n    </script>\r\n\r\n\r\n<!-- art-template || ejs || lodash-template || underscore-template -->\r\n<script id=\"template\" type=\"text/tmpl\">\r\n<ul>\r\n    <% for (var i = 0, l = list.length; i < l; i ++) { %>\r\n        <li>User: <%= list[i].user %> / Web Site: <%= list[i].site %></li>\r\n    <% } %>\r\n</ul>\r\n</script>\r\n\r\n<script id=\"template-raw\" type=\"text/tmpl\">\r\n<ul>\r\n    <% for (var i = 0, l = list.length; i < l; i ++) { %>\r\n        <li>User: <%- list[i].user %> / Web Site: <%- list[i].site %></li>\r\n    <% } %>\r\n</ul>\r\n</script>\r\n\r\n<script id=\"template-fast-mode\" type=\"text/tmpl\">\r\n<ul>\r\n    <% for (var i = 0, l = $data.list.length; i < l; i ++) { %>\r\n        <li>User: <%= $data.list[i].user %> / Web Site: <%= $data.list[i].site %></li>\r\n    <% } %>\r\n</ul>\r\n</script>\r\n\r\n<script id=\"template-fast-mode-raw\" type=\"text/tmpl\">\r\n<ul>\r\n    <% for (var i = 0, l = $data.list.length; i < l; i ++) { %>\r\n        <li>User: <%- $data.list[i].user %> / Web Site: <%- $data.list[i].site %></li>\r\n    <% } %>\r\n</ul>\r\n</script>\r\n\r\n<!-- pug -->\r\n<script id=\"pug\" type=\"text/tmpl\">\r\nul\r\n    -for (var i = 0, l = list.length; i < l; i ++) {\r\n        li User: #{list[i].user} / Web Site: #{list[i].site}\r\n    -}\r\n</script>\r\n\r\n<script id=\"pug-raw\" type=\"text/tmpl\">\r\nul\r\n    -for (var i = 0, l = list.length; i < l; i ++) {\r\n        li User: !{list[i].user} / Web Site: !{list[i].site}\r\n    -}\r\n</script>\r\n\r\n<!-- doT -->\r\n<script id=\"dot\" type=\"text/tmpl\">\r\n<ul>\r\n    {{ for (var i = 0, l = it.list.length; i < l; i ++) { }}\r\n        <li>User: {{!it.list[i].user}} / Web Site: {{!it.list[i].site}}</li>\r\n    {{ } }}\r\n</ul>\r\n</script>\r\n<script id=\"dot-raw\" type=\"text/tmpl\">\r\n<ul>\r\n    {{ for (var i = 0, l = it.list.length; i < l; i ++) { }}\r\n        <li>User: {{=it.list[i].user}} / Web Site: {{=it.list[i].site}}</li>\r\n    {{ } }}\r\n</ul>\r\n</script>\r\n\r\n<!--Mustache -->\r\n<script id=\"mustache\" type=\"text/tmpl\">\r\n<ul>\r\n    {{#list}}\r\n        <li>User: {{user}} / Web Site: {{site}}</li>\r\n    {{/list}}\r\n</ul>\r\n</script>\r\n\r\n<script id=\"mustache-raw\" type=\"text/tmpl\">\r\n<ul>\r\n    {{#list}}\r\n        <li>User: {{{user}}} / Web Site: {{{site}}}</li>\r\n    {{/list}}\r\n</ul>\r\n</script>\r\n\r\n<!--Handlebars  -->\r\n<script id=\"handlebars\" type=\"text/tmpl\">\r\n<ul>\r\n    {{#list}}\r\n        <li>User: {{user}} / Web Site: {{site}}</li>\r\n    {{/list}}\r\n</ul>\r\n</script>\r\n\r\n<script id=\"handlebars-raw\" type=\"text/tmpl\">\r\n<ul>\r\n    {{#list}}\r\n        <li>User: {{{user}}} / Web Site: {{{site}}}</li>\r\n    {{/list}}\r\n</ul>\r\n</script>\r\n\r\n<!--swig  -->\r\n<script id=\"swig\" type=\"text/tmpl\">\r\n<ul>\r\n    {% for key, value in list %}\r\n        <li>User: {{value.user}} / Web Site: {{value.site}}</li>\r\n    {% endfor %}\r\n</ul>\r\n</script>\r\n\r\n<script id=\"swig-raw\" type=\"text/tmpl\">\r\n<ul>\r\n    {% for key, value in list %}\r\n        {% autoescape false %}<li>User: {{value.user}} / Web Site: {{value.site}}</li>{% endautoescape %}\r\n    {% endfor %}\r\n</ul>\r\n</script>\r\n\r\n<style>\r\n    body {\r\n        font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\r\n        font-size: 16px;\r\n        line-height: 1.5;\r\n        word-wrap: break-word;\r\n    }\r\n    #app .header {\r\n        padding: 10px 20px;\r\n        background: #eee;\r\n    }\r\n    #app .header .item {\r\n        margin-bottom: 5px;\r\n    }\r\n    #app input[type=number] {\r\n        max-width: 4em;\r\n    }\r\n    #app ul {\r\n        padding-left: 0;\r\n    }\r\n</style>\r\n</head>\r\n\r\n<body>\r\n\r\n<div id=\"app\"></div>\r\n<script id=\"body\" type=\"text/tmpl\">\r\n    <h1>Template Engine Rendering Speed Test</h1>\r\n    <div class=\"header\">\r\n        <div class=\"item\">\r\n            <label><input type=\"number\" value=\"{{length}}\" onchange=\"restart('length', this.value)\"> list</label>\r\n            <strong>×</strong>\r\n            <label><input type=\"number\" value=\"{{calls}}\" onchange=\"restart('calls', this.value)\"> calls</label>\r\n            <label><input type=\"checkbox\" {{if escape}}checked{{/if}} onchange=\"restart('escape', this.checked)\"> escape</label>\r\n            <label><input type=\"checkbox\" checked disabled> cache</label>\r\n        </div>\r\n        <div class=\"item\">\r\n            <button id=\"button-start\">Run Test&raquo;</button>\r\n            <button id=\"button-restart\" style=\"display:none\">Restart</button>\r\n            <span id=\"log\">\r\n                \r\n            </span>\r\n        </div>\r\n    </div>\r\n    <div id=\"container\" style=\"min-width: 400px; margin: 0 auto\">\r\n        <ul>\r\n        <%\r\n            testList.forEach(function(test){\r\n                if (!escape || test.supportEscape !== false) {\r\n                    print('<li>', $escape(test.name), '</li>');\r\n                }\r\n            });\r\n        %>\r\n        </ul>\r\n    </div>\r\n</script>\r\n\r\n<script>\r\n    (function() {\r\n        var data = Object.create(config);\r\n        data.testList = testList;\r\n        document.getElementById('app').innerHTML = template('body', data);\r\n\r\n        document.getElementById('button-start').onclick = function() {\r\n            var elem = this;\r\n            this.disabled=true;\r\n            runTest(function() {\r\n                elem.style.display = 'none';\r\n                document.getElementById('button-restart').style.display = '';\r\n            });\r\n        };\r\n\r\n        document.getElementById('button-restart').onclick = function() {\r\n            location.reload();\r\n        };\r\n    })();\r\n</script>\r\n</body>\r\n\r\n</html>"
  },
  {
    "path": "example/web-test-speed/js/handlebars.js",
    "content": "/*!\n\n handlebars v4.0.5\n\nCopyright (C) 2011-2015 by Yehuda Katz\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n@license\n*/\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Handlebars\"] = factory();\n\telse\n\t\troot[\"Handlebars\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\n\tvar _handlebarsRuntime = __webpack_require__(2);\n\n\tvar _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);\n\n\t// Compiler imports\n\n\tvar _handlebarsCompilerAst = __webpack_require__(21);\n\n\tvar _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);\n\n\tvar _handlebarsCompilerBase = __webpack_require__(22);\n\n\tvar _handlebarsCompilerCompiler = __webpack_require__(27);\n\n\tvar _handlebarsCompilerJavascriptCompiler = __webpack_require__(28);\n\n\tvar _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);\n\n\tvar _handlebarsCompilerVisitor = __webpack_require__(25);\n\n\tvar _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);\n\n\tvar _handlebarsNoConflict = __webpack_require__(20);\n\n\tvar _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);\n\n\tvar _create = _handlebarsRuntime2['default'].create;\n\tfunction create() {\n\t  var hb = _create();\n\n\t  hb.compile = function (input, options) {\n\t    return _handlebarsCompilerCompiler.compile(input, options, hb);\n\t  };\n\t  hb.precompile = function (input, options) {\n\t    return _handlebarsCompilerCompiler.precompile(input, options, hb);\n\t  };\n\n\t  hb.AST = _handlebarsCompilerAst2['default'];\n\t  hb.Compiler = _handlebarsCompilerCompiler.Compiler;\n\t  hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default'];\n\t  hb.Parser = _handlebarsCompilerBase.parser;\n\t  hb.parse = _handlebarsCompilerBase.parse;\n\n\t  return hb;\n\t}\n\n\tvar inst = create();\n\tinst.create = create;\n\n\t_handlebarsNoConflict2['default'](inst);\n\n\tinst.Visitor = _handlebarsCompilerVisitor2['default'];\n\n\tinst['default'] = inst;\n\n\texports['default'] = inst;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\n\texports[\"default\"] = function (obj) {\n\t  return obj && obj.__esModule ? obj : {\n\t    \"default\": obj\n\t  };\n\t};\n\n\texports.__esModule = true;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireWildcard = __webpack_require__(3)['default'];\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\n\tvar _handlebarsBase = __webpack_require__(4);\n\n\tvar base = _interopRequireWildcard(_handlebarsBase);\n\n\t// Each of these augment the Handlebars object. No need to setup here.\n\t// (This is done to easily share code between commonjs and browse envs)\n\n\tvar _handlebarsSafeString = __webpack_require__(18);\n\n\tvar _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);\n\n\tvar _handlebarsException = __webpack_require__(6);\n\n\tvar _handlebarsException2 = _interopRequireDefault(_handlebarsException);\n\n\tvar _handlebarsUtils = __webpack_require__(5);\n\n\tvar Utils = _interopRequireWildcard(_handlebarsUtils);\n\n\tvar _handlebarsRuntime = __webpack_require__(19);\n\n\tvar runtime = _interopRequireWildcard(_handlebarsRuntime);\n\n\tvar _handlebarsNoConflict = __webpack_require__(20);\n\n\tvar _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);\n\n\t// For compatibility and usage outside of module systems, make the Handlebars object a namespace\n\tfunction create() {\n\t  var hb = new base.HandlebarsEnvironment();\n\n\t  Utils.extend(hb, base);\n\t  hb.SafeString = _handlebarsSafeString2['default'];\n\t  hb.Exception = _handlebarsException2['default'];\n\t  hb.Utils = Utils;\n\t  hb.escapeExpression = Utils.escapeExpression;\n\n\t  hb.VM = runtime;\n\t  hb.template = function (spec) {\n\t    return runtime.template(spec, hb);\n\t  };\n\n\t  return hb;\n\t}\n\n\tvar inst = create();\n\tinst.create = create;\n\n\t_handlebarsNoConflict2['default'](inst);\n\n\tinst['default'] = inst;\n\n\texports['default'] = inst;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\n\texports[\"default\"] = function (obj) {\n\t  if (obj && obj.__esModule) {\n\t    return obj;\n\t  } else {\n\t    var newObj = {};\n\n\t    if (obj != null) {\n\t      for (var key in obj) {\n\t        if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n\t      }\n\t    }\n\n\t    newObj[\"default\"] = obj;\n\t    return newObj;\n\t  }\n\t};\n\n\texports.__esModule = true;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\texports.HandlebarsEnvironment = HandlebarsEnvironment;\n\n\tvar _utils = __webpack_require__(5);\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\tvar _helpers = __webpack_require__(7);\n\n\tvar _decorators = __webpack_require__(15);\n\n\tvar _logger = __webpack_require__(17);\n\n\tvar _logger2 = _interopRequireDefault(_logger);\n\n\tvar VERSION = '4.0.5';\n\texports.VERSION = VERSION;\n\tvar COMPILER_REVISION = 7;\n\n\texports.COMPILER_REVISION = COMPILER_REVISION;\n\tvar REVISION_CHANGES = {\n\t  1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n\t  2: '== 1.0.0-rc.3',\n\t  3: '== 1.0.0-rc.4',\n\t  4: '== 1.x.x',\n\t  5: '== 2.0.0-alpha.x',\n\t  6: '>= 2.0.0-beta.1',\n\t  7: '>= 4.0.0'\n\t};\n\n\texports.REVISION_CHANGES = REVISION_CHANGES;\n\tvar objectType = '[object Object]';\n\n\tfunction HandlebarsEnvironment(helpers, partials, decorators) {\n\t  this.helpers = helpers || {};\n\t  this.partials = partials || {};\n\t  this.decorators = decorators || {};\n\n\t  _helpers.registerDefaultHelpers(this);\n\t  _decorators.registerDefaultDecorators(this);\n\t}\n\n\tHandlebarsEnvironment.prototype = {\n\t  constructor: HandlebarsEnvironment,\n\n\t  logger: _logger2['default'],\n\t  log: _logger2['default'].log,\n\n\t  registerHelper: function registerHelper(name, fn) {\n\t    if (_utils.toString.call(name) === objectType) {\n\t      if (fn) {\n\t        throw new _exception2['default']('Arg not supported with multiple helpers');\n\t      }\n\t      _utils.extend(this.helpers, name);\n\t    } else {\n\t      this.helpers[name] = fn;\n\t    }\n\t  },\n\t  unregisterHelper: function unregisterHelper(name) {\n\t    delete this.helpers[name];\n\t  },\n\n\t  registerPartial: function registerPartial(name, partial) {\n\t    if (_utils.toString.call(name) === objectType) {\n\t      _utils.extend(this.partials, name);\n\t    } else {\n\t      if (typeof partial === 'undefined') {\n\t        throw new _exception2['default']('Attempting to register a partial called \"' + name + '\" as undefined');\n\t      }\n\t      this.partials[name] = partial;\n\t    }\n\t  },\n\t  unregisterPartial: function unregisterPartial(name) {\n\t    delete this.partials[name];\n\t  },\n\n\t  registerDecorator: function registerDecorator(name, fn) {\n\t    if (_utils.toString.call(name) === objectType) {\n\t      if (fn) {\n\t        throw new _exception2['default']('Arg not supported with multiple decorators');\n\t      }\n\t      _utils.extend(this.decorators, name);\n\t    } else {\n\t      this.decorators[name] = fn;\n\t    }\n\t  },\n\t  unregisterDecorator: function unregisterDecorator(name) {\n\t    delete this.decorators[name];\n\t  }\n\t};\n\n\tvar log = _logger2['default'].log;\n\n\texports.log = log;\n\texports.createFrame = _utils.createFrame;\n\texports.logger = _logger2['default'];\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\texports.extend = extend;\n\texports.indexOf = indexOf;\n\texports.escapeExpression = escapeExpression;\n\texports.isEmpty = isEmpty;\n\texports.createFrame = createFrame;\n\texports.blockParams = blockParams;\n\texports.appendContextPath = appendContextPath;\n\tvar escape = {\n\t  '&': '&amp;',\n\t  '<': '&lt;',\n\t  '>': '&gt;',\n\t  '\"': '&quot;',\n\t  \"'\": '&#x27;',\n\t  '`': '&#x60;',\n\t  '=': '&#x3D;'\n\t};\n\n\tvar badChars = /[&<>\"'`=]/g,\n\t    possible = /[&<>\"'`=]/;\n\n\tfunction escapeChar(chr) {\n\t  return escape[chr];\n\t}\n\n\tfunction extend(obj /* , ...source */) {\n\t  for (var i = 1; i < arguments.length; i++) {\n\t    for (var key in arguments[i]) {\n\t      if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {\n\t        obj[key] = arguments[i][key];\n\t      }\n\t    }\n\t  }\n\n\t  return obj;\n\t}\n\n\tvar toString = Object.prototype.toString;\n\n\texports.toString = toString;\n\t// Sourced from lodash\n\t// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\n\t/* eslint-disable func-style */\n\tvar isFunction = function isFunction(value) {\n\t  return typeof value === 'function';\n\t};\n\t// fallback for older versions of Chrome and Safari\n\t/* istanbul ignore next */\n\tif (isFunction(/x/)) {\n\t  exports.isFunction = isFunction = function (value) {\n\t    return typeof value === 'function' && toString.call(value) === '[object Function]';\n\t  };\n\t}\n\texports.isFunction = isFunction;\n\n\t/* eslint-enable func-style */\n\n\t/* istanbul ignore next */\n\tvar isArray = Array.isArray || function (value) {\n\t  return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;\n\t};\n\n\texports.isArray = isArray;\n\t// Older IE versions do not directly support indexOf so we must implement our own, sadly.\n\n\tfunction indexOf(array, value) {\n\t  for (var i = 0, len = array.length; i < len; i++) {\n\t    if (array[i] === value) {\n\t      return i;\n\t    }\n\t  }\n\t  return -1;\n\t}\n\n\tfunction escapeExpression(string) {\n\t  if (typeof string !== 'string') {\n\t    // don't escape SafeStrings, since they're already safe\n\t    if (string && string.toHTML) {\n\t      return string.toHTML();\n\t    } else if (string == null) {\n\t      return '';\n\t    } else if (!string) {\n\t      return string + '';\n\t    }\n\n\t    // Force a string conversion as this will be done by the append regardless and\n\t    // the regex test will do this transparently behind the scenes, causing issues if\n\t    // an object's to string has escaped characters in it.\n\t    string = '' + string;\n\t  }\n\n\t  if (!possible.test(string)) {\n\t    return string;\n\t  }\n\t  return string.replace(badChars, escapeChar);\n\t}\n\n\tfunction isEmpty(value) {\n\t  if (!value && value !== 0) {\n\t    return true;\n\t  } else if (isArray(value) && value.length === 0) {\n\t    return true;\n\t  } else {\n\t    return false;\n\t  }\n\t}\n\n\tfunction createFrame(object) {\n\t  var frame = extend({}, object);\n\t  frame._parent = object;\n\t  return frame;\n\t}\n\n\tfunction blockParams(params, ids) {\n\t  params.path = ids;\n\t  return params;\n\t}\n\n\tfunction appendContextPath(contextPath, id) {\n\t  return (contextPath ? contextPath + '.' : '') + id;\n\t}\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\tvar errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];\n\n\tfunction Exception(message, node) {\n\t  var loc = node && node.loc,\n\t      line = undefined,\n\t      column = undefined;\n\t  if (loc) {\n\t    line = loc.start.line;\n\t    column = loc.start.column;\n\n\t    message += ' - ' + line + ':' + column;\n\t  }\n\n\t  var tmp = Error.prototype.constructor.call(this, message);\n\n\t  // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n\t  for (var idx = 0; idx < errorProps.length; idx++) {\n\t    this[errorProps[idx]] = tmp[errorProps[idx]];\n\t  }\n\n\t  /* istanbul ignore else */\n\t  if (Error.captureStackTrace) {\n\t    Error.captureStackTrace(this, Exception);\n\t  }\n\n\t  if (loc) {\n\t    this.lineNumber = line;\n\t    this.column = column;\n\t  }\n\t}\n\n\tException.prototype = new Error();\n\n\texports['default'] = Exception;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\texports.registerDefaultHelpers = registerDefaultHelpers;\n\n\tvar _helpersBlockHelperMissing = __webpack_require__(8);\n\n\tvar _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);\n\n\tvar _helpersEach = __webpack_require__(9);\n\n\tvar _helpersEach2 = _interopRequireDefault(_helpersEach);\n\n\tvar _helpersHelperMissing = __webpack_require__(10);\n\n\tvar _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);\n\n\tvar _helpersIf = __webpack_require__(11);\n\n\tvar _helpersIf2 = _interopRequireDefault(_helpersIf);\n\n\tvar _helpersLog = __webpack_require__(12);\n\n\tvar _helpersLog2 = _interopRequireDefault(_helpersLog);\n\n\tvar _helpersLookup = __webpack_require__(13);\n\n\tvar _helpersLookup2 = _interopRequireDefault(_helpersLookup);\n\n\tvar _helpersWith = __webpack_require__(14);\n\n\tvar _helpersWith2 = _interopRequireDefault(_helpersWith);\n\n\tfunction registerDefaultHelpers(instance) {\n\t  _helpersBlockHelperMissing2['default'](instance);\n\t  _helpersEach2['default'](instance);\n\t  _helpersHelperMissing2['default'](instance);\n\t  _helpersIf2['default'](instance);\n\t  _helpersLog2['default'](instance);\n\t  _helpersLookup2['default'](instance);\n\t  _helpersWith2['default'](instance);\n\t}\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\tvar _utils = __webpack_require__(5);\n\n\texports['default'] = function (instance) {\n\t  instance.registerHelper('blockHelperMissing', function (context, options) {\n\t    var inverse = options.inverse,\n\t        fn = options.fn;\n\n\t    if (context === true) {\n\t      return fn(this);\n\t    } else if (context === false || context == null) {\n\t      return inverse(this);\n\t    } else if (_utils.isArray(context)) {\n\t      if (context.length > 0) {\n\t        if (options.ids) {\n\t          options.ids = [options.name];\n\t        }\n\n\t        return instance.helpers.each(context, options);\n\t      } else {\n\t        return inverse(this);\n\t      }\n\t    } else {\n\t      if (options.data && options.ids) {\n\t        var data = _utils.createFrame(options.data);\n\t        data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);\n\t        options = { data: data };\n\t      }\n\n\t      return fn(context, options);\n\t    }\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\n\tvar _utils = __webpack_require__(5);\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\texports['default'] = function (instance) {\n\t  instance.registerHelper('each', function (context, options) {\n\t    if (!options) {\n\t      throw new _exception2['default']('Must pass iterator to #each');\n\t    }\n\n\t    var fn = options.fn,\n\t        inverse = options.inverse,\n\t        i = 0,\n\t        ret = '',\n\t        data = undefined,\n\t        contextPath = undefined;\n\n\t    if (options.data && options.ids) {\n\t      contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';\n\t    }\n\n\t    if (_utils.isFunction(context)) {\n\t      context = context.call(this);\n\t    }\n\n\t    if (options.data) {\n\t      data = _utils.createFrame(options.data);\n\t    }\n\n\t    function execIteration(field, index, last) {\n\t      if (data) {\n\t        data.key = field;\n\t        data.index = index;\n\t        data.first = index === 0;\n\t        data.last = !!last;\n\n\t        if (contextPath) {\n\t          data.contextPath = contextPath + field;\n\t        }\n\t      }\n\n\t      ret = ret + fn(context[field], {\n\t        data: data,\n\t        blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])\n\t      });\n\t    }\n\n\t    if (context && typeof context === 'object') {\n\t      if (_utils.isArray(context)) {\n\t        for (var j = context.length; i < j; i++) {\n\t          if (i in context) {\n\t            execIteration(i, i, i === context.length - 1);\n\t          }\n\t        }\n\t      } else {\n\t        var priorKey = undefined;\n\n\t        for (var key in context) {\n\t          if (context.hasOwnProperty(key)) {\n\t            // We're running the iterations one step out of sync so we can detect\n\t            // the last iteration without have to scan the object twice and create\n\t            // an itermediate keys array.\n\t            if (priorKey !== undefined) {\n\t              execIteration(priorKey, i - 1);\n\t            }\n\t            priorKey = key;\n\t            i++;\n\t          }\n\t        }\n\t        if (priorKey !== undefined) {\n\t          execIteration(priorKey, i - 1, true);\n\t        }\n\t      }\n\t    }\n\n\t    if (i === 0) {\n\t      ret = inverse(this);\n\t    }\n\n\t    return ret;\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\texports['default'] = function (instance) {\n\t  instance.registerHelper('helperMissing', function () /* [args, ]options */{\n\t    if (arguments.length === 1) {\n\t      // A missing field in a {{foo}} construct.\n\t      return undefined;\n\t    } else {\n\t      // Someone is actually trying to call something, blow up.\n\t      throw new _exception2['default']('Missing helper: \"' + arguments[arguments.length - 1].name + '\"');\n\t    }\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\tvar _utils = __webpack_require__(5);\n\n\texports['default'] = function (instance) {\n\t  instance.registerHelper('if', function (conditional, options) {\n\t    if (_utils.isFunction(conditional)) {\n\t      conditional = conditional.call(this);\n\t    }\n\n\t    // Default behavior is to render the positive path if the value is truthy and not empty.\n\t    // The `includeZero` option may be set to treat the condtional as purely not empty based on the\n\t    // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.\n\t    if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {\n\t      return options.inverse(this);\n\t    } else {\n\t      return options.fn(this);\n\t    }\n\t  });\n\n\t  instance.registerHelper('unless', function (conditional, options) {\n\t    return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 12 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\texports['default'] = function (instance) {\n\t  instance.registerHelper('log', function () /* message, options */{\n\t    var args = [undefined],\n\t        options = arguments[arguments.length - 1];\n\t    for (var i = 0; i < arguments.length - 1; i++) {\n\t      args.push(arguments[i]);\n\t    }\n\n\t    var level = 1;\n\t    if (options.hash.level != null) {\n\t      level = options.hash.level;\n\t    } else if (options.data && options.data.level != null) {\n\t      level = options.data.level;\n\t    }\n\t    args[0] = level;\n\n\t    instance.log.apply(instance, args);\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\texports['default'] = function (instance) {\n\t  instance.registerHelper('lookup', function (obj, field) {\n\t    return obj && obj[field];\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\tvar _utils = __webpack_require__(5);\n\n\texports['default'] = function (instance) {\n\t  instance.registerHelper('with', function (context, options) {\n\t    if (_utils.isFunction(context)) {\n\t      context = context.call(this);\n\t    }\n\n\t    var fn = options.fn;\n\n\t    if (!_utils.isEmpty(context)) {\n\t      var data = options.data;\n\t      if (options.data && options.ids) {\n\t        data = _utils.createFrame(options.data);\n\t        data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);\n\t      }\n\n\t      return fn(context, {\n\t        data: data,\n\t        blockParams: _utils.blockParams([context], [data && data.contextPath])\n\t      });\n\t    } else {\n\t      return options.inverse(this);\n\t    }\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\texports.registerDefaultDecorators = registerDefaultDecorators;\n\n\tvar _decoratorsInline = __webpack_require__(16);\n\n\tvar _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);\n\n\tfunction registerDefaultDecorators(instance) {\n\t  _decoratorsInline2['default'](instance);\n\t}\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\tvar _utils = __webpack_require__(5);\n\n\texports['default'] = function (instance) {\n\t  instance.registerDecorator('inline', function (fn, props, container, options) {\n\t    var ret = fn;\n\t    if (!props.partials) {\n\t      props.partials = {};\n\t      ret = function (context, options) {\n\t        // Create a new partials stack frame prior to exec.\n\t        var original = container.partials;\n\t        container.partials = _utils.extend({}, original, props.partials);\n\t        var ret = fn(context, options);\n\t        container.partials = original;\n\t        return ret;\n\t      };\n\t    }\n\n\t    props.partials[options.args[0]] = options.fn;\n\n\t    return ret;\n\t  });\n\t};\n\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\n\tvar _utils = __webpack_require__(5);\n\n\tvar logger = {\n\t  methodMap: ['debug', 'info', 'warn', 'error'],\n\t  level: 'info',\n\n\t  // Maps a given level value to the `methodMap` indexes above.\n\t  lookupLevel: function lookupLevel(level) {\n\t    if (typeof level === 'string') {\n\t      var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());\n\t      if (levelMap >= 0) {\n\t        level = levelMap;\n\t      } else {\n\t        level = parseInt(level, 10);\n\t      }\n\t    }\n\n\t    return level;\n\t  },\n\n\t  // Can be overridden in the host environment\n\t  log: function log(level) {\n\t    level = logger.lookupLevel(level);\n\n\t    if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) {\n\t      var method = logger.methodMap[level];\n\t      if (!console[method]) {\n\t        // eslint-disable-line no-console\n\t        method = 'log';\n\t      }\n\n\t      for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t        message[_key - 1] = arguments[_key];\n\t      }\n\n\t      console[method].apply(console, message); // eslint-disable-line no-console\n\t    }\n\t  }\n\t};\n\n\texports['default'] = logger;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 18 */\n/***/ function(module, exports) {\n\n\t// Build out our basic SafeString type\n\t'use strict';\n\n\texports.__esModule = true;\n\tfunction SafeString(string) {\n\t  this.string = string;\n\t}\n\n\tSafeString.prototype.toString = SafeString.prototype.toHTML = function () {\n\t  return '' + this.string;\n\t};\n\n\texports['default'] = SafeString;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireWildcard = __webpack_require__(3)['default'];\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\texports.checkRevision = checkRevision;\n\texports.template = template;\n\texports.wrapProgram = wrapProgram;\n\texports.resolvePartial = resolvePartial;\n\texports.invokePartial = invokePartial;\n\texports.noop = noop;\n\n\tvar _utils = __webpack_require__(5);\n\n\tvar Utils = _interopRequireWildcard(_utils);\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\tvar _base = __webpack_require__(4);\n\n\tfunction checkRevision(compilerInfo) {\n\t  var compilerRevision = compilerInfo && compilerInfo[0] || 1,\n\t      currentRevision = _base.COMPILER_REVISION;\n\n\t  if (compilerRevision !== currentRevision) {\n\t    if (compilerRevision < currentRevision) {\n\t      var runtimeVersions = _base.REVISION_CHANGES[currentRevision],\n\t          compilerVersions = _base.REVISION_CHANGES[compilerRevision];\n\t      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 + ').');\n\t    } else {\n\t      // Use the embedded version info since the runtime doesn't know about this revision yet\n\t      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] + ').');\n\t    }\n\t  }\n\t}\n\n\tfunction template(templateSpec, env) {\n\t  /* istanbul ignore next */\n\t  if (!env) {\n\t    throw new _exception2['default']('No environment passed to template');\n\t  }\n\t  if (!templateSpec || !templateSpec.main) {\n\t    throw new _exception2['default']('Unknown template object: ' + typeof templateSpec);\n\t  }\n\n\t  templateSpec.main.decorator = templateSpec.main_d;\n\n\t  // Note: Using env.VM references rather than local var references throughout this section to allow\n\t  // for external users to override these as psuedo-supported APIs.\n\t  env.VM.checkRevision(templateSpec.compiler);\n\n\t  function invokePartialWrapper(partial, context, options) {\n\t    if (options.hash) {\n\t      context = Utils.extend({}, context, options.hash);\n\t      if (options.ids) {\n\t        options.ids[0] = true;\n\t      }\n\t    }\n\n\t    partial = env.VM.resolvePartial.call(this, partial, context, options);\n\t    var result = env.VM.invokePartial.call(this, partial, context, options);\n\n\t    if (result == null && env.compile) {\n\t      options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);\n\t      result = options.partials[options.name](context, options);\n\t    }\n\t    if (result != null) {\n\t      if (options.indent) {\n\t        var lines = result.split('\\n');\n\t        for (var i = 0, l = lines.length; i < l; i++) {\n\t          if (!lines[i] && i + 1 === l) {\n\t            break;\n\t          }\n\n\t          lines[i] = options.indent + lines[i];\n\t        }\n\t        result = lines.join('\\n');\n\t      }\n\t      return result;\n\t    } else {\n\t      throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');\n\t    }\n\t  }\n\n\t  // Just add water\n\t  var container = {\n\t    strict: function strict(obj, name) {\n\t      if (!(name in obj)) {\n\t        throw new _exception2['default']('\"' + name + '\" not defined in ' + obj);\n\t      }\n\t      return obj[name];\n\t    },\n\t    lookup: function lookup(depths, name) {\n\t      var len = depths.length;\n\t      for (var i = 0; i < len; i++) {\n\t        if (depths[i] && depths[i][name] != null) {\n\t          return depths[i][name];\n\t        }\n\t      }\n\t    },\n\t    lambda: function lambda(current, context) {\n\t      return typeof current === 'function' ? current.call(context) : current;\n\t    },\n\n\t    escapeExpression: Utils.escapeExpression,\n\t    invokePartial: invokePartialWrapper,\n\n\t    fn: function fn(i) {\n\t      var ret = templateSpec[i];\n\t      ret.decorator = templateSpec[i + '_d'];\n\t      return ret;\n\t    },\n\n\t    programs: [],\n\t    program: function program(i, data, declaredBlockParams, blockParams, depths) {\n\t      var programWrapper = this.programs[i],\n\t          fn = this.fn(i);\n\t      if (data || depths || blockParams || declaredBlockParams) {\n\t        programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);\n\t      } else if (!programWrapper) {\n\t        programWrapper = this.programs[i] = wrapProgram(this, i, fn);\n\t      }\n\t      return programWrapper;\n\t    },\n\n\t    data: function data(value, depth) {\n\t      while (value && depth--) {\n\t        value = value._parent;\n\t      }\n\t      return value;\n\t    },\n\t    merge: function merge(param, common) {\n\t      var obj = param || common;\n\n\t      if (param && common && param !== common) {\n\t        obj = Utils.extend({}, common, param);\n\t      }\n\n\t      return obj;\n\t    },\n\n\t    noop: env.VM.noop,\n\t    compilerInfo: templateSpec.compiler\n\t  };\n\n\t  function ret(context) {\n\t    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n\t    var data = options.data;\n\n\t    ret._setup(options);\n\t    if (!options.partial && templateSpec.useData) {\n\t      data = initData(context, data);\n\t    }\n\t    var depths = undefined,\n\t        blockParams = templateSpec.useBlockParams ? [] : undefined;\n\t    if (templateSpec.useDepths) {\n\t      if (options.depths) {\n\t        depths = context !== options.depths[0] ? [context].concat(options.depths) : options.depths;\n\t      } else {\n\t        depths = [context];\n\t      }\n\t    }\n\n\t    function main(context /*, options*/) {\n\t      return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths);\n\t    }\n\t    main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);\n\t    return main(context, options);\n\t  }\n\t  ret.isTop = true;\n\n\t  ret._setup = function (options) {\n\t    if (!options.partial) {\n\t      container.helpers = container.merge(options.helpers, env.helpers);\n\n\t      if (templateSpec.usePartial) {\n\t        container.partials = container.merge(options.partials, env.partials);\n\t      }\n\t      if (templateSpec.usePartial || templateSpec.useDecorators) {\n\t        container.decorators = container.merge(options.decorators, env.decorators);\n\t      }\n\t    } else {\n\t      container.helpers = options.helpers;\n\t      container.partials = options.partials;\n\t      container.decorators = options.decorators;\n\t    }\n\t  };\n\n\t  ret._child = function (i, data, blockParams, depths) {\n\t    if (templateSpec.useBlockParams && !blockParams) {\n\t      throw new _exception2['default']('must pass block params');\n\t    }\n\t    if (templateSpec.useDepths && !depths) {\n\t      throw new _exception2['default']('must pass parent depths');\n\t    }\n\n\t    return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);\n\t  };\n\t  return ret;\n\t}\n\n\tfunction wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {\n\t  function prog(context) {\n\t    var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n\t    var currentDepths = depths;\n\t    if (depths && context !== depths[0]) {\n\t      currentDepths = [context].concat(depths);\n\t    }\n\n\t    return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);\n\t  }\n\n\t  prog = executeDecorators(fn, prog, container, depths, data, blockParams);\n\n\t  prog.program = i;\n\t  prog.depth = depths ? depths.length : 0;\n\t  prog.blockParams = declaredBlockParams || 0;\n\t  return prog;\n\t}\n\n\tfunction resolvePartial(partial, context, options) {\n\t  if (!partial) {\n\t    if (options.name === '@partial-block') {\n\t      partial = options.data['partial-block'];\n\t    } else {\n\t      partial = options.partials[options.name];\n\t    }\n\t  } else if (!partial.call && !options.name) {\n\t    // This is a dynamic partial that returned a string\n\t    options.name = partial;\n\t    partial = options.partials[partial];\n\t  }\n\t  return partial;\n\t}\n\n\tfunction invokePartial(partial, context, options) {\n\t  options.partial = true;\n\t  if (options.ids) {\n\t    options.data.contextPath = options.ids[0] || options.data.contextPath;\n\t  }\n\n\t  var partialBlock = undefined;\n\t  if (options.fn && options.fn !== noop) {\n\t    options.data = _base.createFrame(options.data);\n\t    partialBlock = options.data['partial-block'] = options.fn;\n\n\t    if (partialBlock.partials) {\n\t      options.partials = Utils.extend({}, options.partials, partialBlock.partials);\n\t    }\n\t  }\n\n\t  if (partial === undefined && partialBlock) {\n\t    partial = partialBlock;\n\t  }\n\n\t  if (partial === undefined) {\n\t    throw new _exception2['default']('The partial ' + options.name + ' could not be found');\n\t  } else if (partial instanceof Function) {\n\t    return partial(context, options);\n\t  }\n\t}\n\n\tfunction noop() {\n\t  return '';\n\t}\n\n\tfunction initData(context, data) {\n\t  if (!data || !('root' in data)) {\n\t    data = data ? _base.createFrame(data) : {};\n\t    data.root = context;\n\t  }\n\t  return data;\n\t}\n\n\tfunction executeDecorators(fn, prog, container, depths, data, blockParams) {\n\t  if (fn.decorator) {\n\t    var props = {};\n\t    prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);\n\t    Utils.extend(prog, props);\n\t  }\n\t  return prog;\n\t}\n\n/***/ },\n/* 20 */\n/***/ function(module, exports) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {/* global window */\n\t'use strict';\n\n\texports.__esModule = true;\n\n\texports['default'] = function (Handlebars) {\n\t  /* istanbul ignore next */\n\t  var root = typeof global !== 'undefined' ? global : window,\n\t      $Handlebars = root.Handlebars;\n\t  /* istanbul ignore next */\n\t  Handlebars.noConflict = function () {\n\t    if (root.Handlebars === Handlebars) {\n\t      root.Handlebars = $Handlebars;\n\t    }\n\t    return Handlebars;\n\t  };\n\t};\n\n\tmodule.exports = exports['default'];\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 21 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\n\texports.__esModule = true;\n\tvar AST = {\n\t  // Public API used to evaluate derived attributes regarding AST nodes\n\t  helpers: {\n\t    // a mustache is definitely a helper if:\n\t    // * it is an eligible helper, and\n\t    // * it has at least one parameter or hash segment\n\t    helperExpression: function helperExpression(node) {\n\t      return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash);\n\t    },\n\n\t    scopedId: function scopedId(path) {\n\t      return (/^\\.|this\\b/.test(path.original)\n\t      );\n\t    },\n\n\t    // an ID is simple if it only has one part, and that part is not\n\t    // `..` or `this`.\n\t    simpleId: function simpleId(path) {\n\t      return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth;\n\t    }\n\t  }\n\t};\n\n\t// Must be exported as an object rather than the root of the module as the jison lexer\n\t// must modify the object to operate properly.\n\texports['default'] = AST;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\tvar _interopRequireWildcard = __webpack_require__(3)['default'];\n\n\texports.__esModule = true;\n\texports.parse = parse;\n\n\tvar _parser = __webpack_require__(23);\n\n\tvar _parser2 = _interopRequireDefault(_parser);\n\n\tvar _whitespaceControl = __webpack_require__(24);\n\n\tvar _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);\n\n\tvar _helpers = __webpack_require__(26);\n\n\tvar Helpers = _interopRequireWildcard(_helpers);\n\n\tvar _utils = __webpack_require__(5);\n\n\texports.parser = _parser2['default'];\n\n\tvar yy = {};\n\t_utils.extend(yy, Helpers);\n\n\tfunction parse(input, options) {\n\t  // Just return if an already-compiled AST was passed in.\n\t  if (input.type === 'Program') {\n\t    return input;\n\t  }\n\n\t  _parser2['default'].yy = yy;\n\n\t  // Altering the shared object here, but this is ok as parser is a sync operation\n\t  yy.locInfo = function (locInfo) {\n\t    return new yy.SourceLocation(options && options.srcName, locInfo);\n\t  };\n\n\t  var strip = new _whitespaceControl2['default'](options);\n\t  return strip.accept(_parser2['default'].parse(input));\n\t}\n\n/***/ },\n/* 23 */\n/***/ function(module, exports) {\n\n\t/* istanbul ignore next */\n\t/* Jison generated parser */\n\t\"use strict\";\n\n\tvar handlebars = (function () {\n\t    var parser = { trace: function trace() {},\n\t        yy: {},\n\t        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_repetition_plus0\": 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 },\n\t        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\" },\n\t        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, 1], [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]],\n\t        performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$\n\t        /**/) {\n\n\t            var $0 = $$.length - 1;\n\t            switch (yystate) {\n\t                case 1:\n\t                    return $$[$0 - 1];\n\t                    break;\n\t                case 2:\n\t                    this.$ = yy.prepareProgram($$[$0]);\n\t                    break;\n\t                case 3:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 4:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 5:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 6:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 7:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 8:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 9:\n\t                    this.$ = {\n\t                        type: 'CommentStatement',\n\t                        value: yy.stripComment($$[$0]),\n\t                        strip: yy.stripFlags($$[$0], $$[$0]),\n\t                        loc: yy.locInfo(this._$)\n\t                    };\n\n\t                    break;\n\t                case 10:\n\t                    this.$ = {\n\t                        type: 'ContentStatement',\n\t                        original: $$[$0],\n\t                        value: $$[$0],\n\t                        loc: yy.locInfo(this._$)\n\t                    };\n\n\t                    break;\n\t                case 11:\n\t                    this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);\n\t                    break;\n\t                case 12:\n\t                    this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };\n\t                    break;\n\t                case 13:\n\t                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);\n\t                    break;\n\t                case 14:\n\t                    this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);\n\t                    break;\n\t                case 15:\n\t                    this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };\n\t                    break;\n\t                case 16:\n\t                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };\n\t                    break;\n\t                case 17:\n\t                    this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };\n\t                    break;\n\t                case 18:\n\t                    this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };\n\t                    break;\n\t                case 19:\n\t                    var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$),\n\t                        program = yy.prepareProgram([inverse], $$[$0 - 1].loc);\n\t                    program.chained = true;\n\n\t                    this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true };\n\n\t                    break;\n\t                case 20:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 21:\n\t                    this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };\n\t                    break;\n\t                case 22:\n\t                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);\n\t                    break;\n\t                case 23:\n\t                    this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);\n\t                    break;\n\t                case 24:\n\t                    this.$ = {\n\t                        type: 'PartialStatement',\n\t                        name: $$[$0 - 3],\n\t                        params: $$[$0 - 2],\n\t                        hash: $$[$0 - 1],\n\t                        indent: '',\n\t                        strip: yy.stripFlags($$[$0 - 4], $$[$0]),\n\t                        loc: yy.locInfo(this._$)\n\t                    };\n\n\t                    break;\n\t                case 25:\n\t                    this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);\n\t                    break;\n\t                case 26:\n\t                    this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };\n\t                    break;\n\t                case 27:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 28:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 29:\n\t                    this.$ = {\n\t                        type: 'SubExpression',\n\t                        path: $$[$0 - 3],\n\t                        params: $$[$0 - 2],\n\t                        hash: $$[$0 - 1],\n\t                        loc: yy.locInfo(this._$)\n\t                    };\n\n\t                    break;\n\t                case 30:\n\t                    this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) };\n\t                    break;\n\t                case 31:\n\t                    this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };\n\t                    break;\n\t                case 32:\n\t                    this.$ = yy.id($$[$0 - 1]);\n\t                    break;\n\t                case 33:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 34:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 35:\n\t                    this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };\n\t                    break;\n\t                case 36:\n\t                    this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };\n\t                    break;\n\t                case 37:\n\t                    this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) };\n\t                    break;\n\t                case 38:\n\t                    this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) };\n\t                    break;\n\t                case 39:\n\t                    this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) };\n\t                    break;\n\t                case 40:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 41:\n\t                    this.$ = $$[$0];\n\t                    break;\n\t                case 42:\n\t                    this.$ = yy.preparePath(true, $$[$0], this._$);\n\t                    break;\n\t                case 43:\n\t                    this.$ = yy.preparePath(false, $$[$0], this._$);\n\t                    break;\n\t                case 44:\n\t                    $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2];\n\t                    break;\n\t                case 45:\n\t                    this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];\n\t                    break;\n\t                case 46:\n\t                    this.$ = [];\n\t                    break;\n\t                case 47:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 48:\n\t                    this.$ = [$$[$0]];\n\t                    break;\n\t                case 49:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 50:\n\t                    this.$ = [];\n\t                    break;\n\t                case 51:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 58:\n\t                    this.$ = [];\n\t                    break;\n\t                case 59:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 64:\n\t                    this.$ = [];\n\t                    break;\n\t                case 65:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 70:\n\t                    this.$ = [];\n\t                    break;\n\t                case 71:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 78:\n\t                    this.$ = [];\n\t                    break;\n\t                case 79:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 82:\n\t                    this.$ = [];\n\t                    break;\n\t                case 83:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 86:\n\t                    this.$ = [];\n\t                    break;\n\t                case 87:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 90:\n\t                    this.$ = [];\n\t                    break;\n\t                case 91:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 94:\n\t                    this.$ = [];\n\t                    break;\n\t                case 95:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 98:\n\t                    this.$ = [$$[$0]];\n\t                    break;\n\t                case 99:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t                case 100:\n\t                    this.$ = [$$[$0]];\n\t                    break;\n\t                case 101:\n\t                    $$[$0 - 1].push($$[$0]);\n\t                    break;\n\t            }\n\t        },\n\t        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] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 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: 45, 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: 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: 48, 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: 42, 56: 49, 64: 43, 65: [1, 44], 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: 50, 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, 51] }, { 72: [1, 35], 86: 52 }, { 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: 53, 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: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 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: 65, 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: 66, 47: [1, 67] }, { 30: 68, 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: 69, 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: 70, 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: 71, 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: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 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, 80] }, { 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, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 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: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 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: 86, 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: 87, 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: 88, 47: [1, 67] }, { 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: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 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: 92, 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: 93, 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: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 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: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 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: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 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: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 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, 106] }, { 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: 107, 72: [1, 108], 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, 109], 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, 110] }, { 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: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 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, 114] }, { 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: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 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, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 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: 122, 74: 123, 75: [1, 121] }, { 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, 124] }, { 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, 125] }, { 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, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 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: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 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, 130] }, { 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, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [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: 135, 74: 136, 75: [1, 121] }, { 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, 138], 77: [1, 137] }, { 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, 139] }, { 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] }],\n\t        defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] },\n\t        parseError: function parseError(str, hash) {\n\t            throw new Error(str);\n\t        },\n\t        parse: function parse(input) {\n\t            var self = this,\n\t                stack = [0],\n\t                vstack = [null],\n\t                lstack = [],\n\t                table = this.table,\n\t                yytext = \"\",\n\t                yylineno = 0,\n\t                yyleng = 0,\n\t                recovering = 0,\n\t                TERROR = 2,\n\t                EOF = 1;\n\t            this.lexer.setInput(input);\n\t            this.lexer.yy = this.yy;\n\t            this.yy.lexer = this.lexer;\n\t            this.yy.parser = this;\n\t            if (typeof this.lexer.yylloc == \"undefined\") this.lexer.yylloc = {};\n\t            var yyloc = this.lexer.yylloc;\n\t            lstack.push(yyloc);\n\t            var ranges = this.lexer.options && this.lexer.options.ranges;\n\t            if (typeof this.yy.parseError === \"function\") this.parseError = this.yy.parseError;\n\t            function popStack(n) {\n\t                stack.length = stack.length - 2 * n;\n\t                vstack.length = vstack.length - n;\n\t                lstack.length = lstack.length - n;\n\t            }\n\t            function lex() {\n\t                var token;\n\t                token = self.lexer.lex() || 1;\n\t                if (typeof token !== \"number\") {\n\t                    token = self.symbols_[token] || token;\n\t                }\n\t                return token;\n\t            }\n\t            var symbol,\n\t                preErrorSymbol,\n\t                state,\n\t                action,\n\t                a,\n\t                r,\n\t                yyval = {},\n\t                p,\n\t                len,\n\t                newState,\n\t                expected;\n\t            while (true) {\n\t                state = stack[stack.length - 1];\n\t                if (this.defaultActions[state]) {\n\t                    action = this.defaultActions[state];\n\t                } else {\n\t                    if (symbol === null || typeof symbol == \"undefined\") {\n\t                        symbol = lex();\n\t                    }\n\t                    action = table[state] && table[state][symbol];\n\t                }\n\t                if (typeof action === \"undefined\" || !action.length || !action[0]) {\n\t                    var errStr = \"\";\n\t                    if (!recovering) {\n\t                        expected = [];\n\t                        for (p in table[state]) if (this.terminals_[p] && p > 2) {\n\t                            expected.push(\"'\" + this.terminals_[p] + \"'\");\n\t                        }\n\t                        if (this.lexer.showPosition) {\n\t                            errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + this.lexer.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n\t                        } else {\n\t                            errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == 1 ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n\t                        }\n\t                        this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected });\n\t                    }\n\t                }\n\t                if (action[0] instanceof Array && action.length > 1) {\n\t                    throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n\t                }\n\t                switch (action[0]) {\n\t                    case 1:\n\t                        stack.push(symbol);\n\t                        vstack.push(this.lexer.yytext);\n\t                        lstack.push(this.lexer.yylloc);\n\t                        stack.push(action[1]);\n\t                        symbol = null;\n\t                        if (!preErrorSymbol) {\n\t                            yyleng = this.lexer.yyleng;\n\t                            yytext = this.lexer.yytext;\n\t                            yylineno = this.lexer.yylineno;\n\t                            yyloc = this.lexer.yylloc;\n\t                            if (recovering > 0) recovering--;\n\t                        } else {\n\t                            symbol = preErrorSymbol;\n\t                            preErrorSymbol = null;\n\t                        }\n\t                        break;\n\t                    case 2:\n\t                        len = this.productions_[action[1]][1];\n\t                        yyval.$ = vstack[vstack.length - len];\n\t                        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 };\n\t                        if (ranges) {\n\t                            yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];\n\t                        }\n\t                        r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);\n\t                        if (typeof r !== \"undefined\") {\n\t                            return r;\n\t                        }\n\t                        if (len) {\n\t                            stack = stack.slice(0, -1 * len * 2);\n\t                            vstack = vstack.slice(0, -1 * len);\n\t                            lstack = lstack.slice(0, -1 * len);\n\t                        }\n\t                        stack.push(this.productions_[action[1]][0]);\n\t                        vstack.push(yyval.$);\n\t                        lstack.push(yyval._$);\n\t                        newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n\t                        stack.push(newState);\n\t                        break;\n\t                    case 3:\n\t                        return true;\n\t                }\n\t            }\n\t            return true;\n\t        }\n\t    };\n\t    /* Jison generated lexer */\n\t    var lexer = (function () {\n\t        var lexer = { EOF: 1,\n\t            parseError: function parseError(str, hash) {\n\t                if (this.yy.parser) {\n\t                    this.yy.parser.parseError(str, hash);\n\t                } else {\n\t                    throw new Error(str);\n\t                }\n\t            },\n\t            setInput: function setInput(input) {\n\t                this._input = input;\n\t                this._more = this._less = this.done = false;\n\t                this.yylineno = this.yyleng = 0;\n\t                this.yytext = this.matched = this.match = '';\n\t                this.conditionStack = ['INITIAL'];\n\t                this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };\n\t                if (this.options.ranges) this.yylloc.range = [0, 0];\n\t                this.offset = 0;\n\t                return this;\n\t            },\n\t            input: function input() {\n\t                var ch = this._input[0];\n\t                this.yytext += ch;\n\t                this.yyleng++;\n\t                this.offset++;\n\t                this.match += ch;\n\t                this.matched += ch;\n\t                var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n\t                if (lines) {\n\t                    this.yylineno++;\n\t                    this.yylloc.last_line++;\n\t                } else {\n\t                    this.yylloc.last_column++;\n\t                }\n\t                if (this.options.ranges) this.yylloc.range[1]++;\n\n\t                this._input = this._input.slice(1);\n\t                return ch;\n\t            },\n\t            unput: function unput(ch) {\n\t                var len = ch.length;\n\t                var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n\t                this._input = ch + this._input;\n\t                this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);\n\t                //this.yyleng -= len;\n\t                this.offset -= len;\n\t                var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n\t                this.match = this.match.substr(0, this.match.length - 1);\n\t                this.matched = this.matched.substr(0, this.matched.length - 1);\n\n\t                if (lines.length - 1) this.yylineno -= lines.length - 1;\n\t                var r = this.yylloc.range;\n\n\t                this.yylloc = { first_line: this.yylloc.first_line,\n\t                    last_line: this.yylineno + 1,\n\t                    first_column: this.yylloc.first_column,\n\t                    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\n\t                };\n\n\t                if (this.options.ranges) {\n\t                    this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n\t                }\n\t                return this;\n\t            },\n\t            more: function more() {\n\t                this._more = true;\n\t                return this;\n\t            },\n\t            less: function less(n) {\n\t                this.unput(this.match.slice(n));\n\t            },\n\t            pastInput: function pastInput() {\n\t                var past = this.matched.substr(0, this.matched.length - this.match.length);\n\t                return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\\n/g, \"\");\n\t            },\n\t            upcomingInput: function upcomingInput() {\n\t                var next = this.match;\n\t                if (next.length < 20) {\n\t                    next += this._input.substr(0, 20 - next.length);\n\t                }\n\t                return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n\t            },\n\t            showPosition: function showPosition() {\n\t                var pre = this.pastInput();\n\t                var c = new Array(pre.length + 1).join(\"-\");\n\t                return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n\t            },\n\t            next: function next() {\n\t                if (this.done) {\n\t                    return this.EOF;\n\t                }\n\t                if (!this._input) this.done = true;\n\n\t                var token, match, tempMatch, index, col, lines;\n\t                if (!this._more) {\n\t                    this.yytext = '';\n\t                    this.match = '';\n\t                }\n\t                var rules = this._currentRules();\n\t                for (var i = 0; i < rules.length; i++) {\n\t                    tempMatch = this._input.match(this.rules[rules[i]]);\n\t                    if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n\t                        match = tempMatch;\n\t                        index = i;\n\t                        if (!this.options.flex) break;\n\t                    }\n\t                }\n\t                if (match) {\n\t                    lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n\t                    if (lines) this.yylineno += lines.length;\n\t                    this.yylloc = { first_line: this.yylloc.last_line,\n\t                        last_line: this.yylineno + 1,\n\t                        first_column: this.yylloc.last_column,\n\t                        last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length };\n\t                    this.yytext += match[0];\n\t                    this.match += match[0];\n\t                    this.matches = match;\n\t                    this.yyleng = this.yytext.length;\n\t                    if (this.options.ranges) {\n\t                        this.yylloc.range = [this.offset, this.offset += this.yyleng];\n\t                    }\n\t                    this._more = false;\n\t                    this._input = this._input.slice(match[0].length);\n\t                    this.matched += match[0];\n\t                    token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);\n\t                    if (this.done && this._input) this.done = false;\n\t                    if (token) return token;else return;\n\t                }\n\t                if (this._input === \"\") {\n\t                    return this.EOF;\n\t                } else {\n\t                    return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), { text: \"\", token: null, line: this.yylineno });\n\t                }\n\t            },\n\t            lex: function lex() {\n\t                var r = this.next();\n\t                if (typeof r !== 'undefined') {\n\t                    return r;\n\t                } else {\n\t                    return this.lex();\n\t                }\n\t            },\n\t            begin: function begin(condition) {\n\t                this.conditionStack.push(condition);\n\t            },\n\t            popState: function popState() {\n\t                return this.conditionStack.pop();\n\t            },\n\t            _currentRules: function _currentRules() {\n\t                return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n\t            },\n\t            topState: function topState() {\n\t                return this.conditionStack[this.conditionStack.length - 2];\n\t            },\n\t            pushState: function begin(condition) {\n\t                this.begin(condition);\n\t            } };\n\t        lexer.options = {};\n\t        lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START\n\t        /**/) {\n\n\t            function strip(start, end) {\n\t                return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end);\n\t            }\n\n\t            var YYSTATE = YY_START;\n\t            switch ($avoiding_name_collisions) {\n\t                case 0:\n\t                    if (yy_.yytext.slice(-2) === \"\\\\\\\\\") {\n\t                        strip(0, 1);\n\t                        this.begin(\"mu\");\n\t                    } else if (yy_.yytext.slice(-1) === \"\\\\\") {\n\t                        strip(0, 1);\n\t                        this.begin(\"emu\");\n\t                    } else {\n\t                        this.begin(\"mu\");\n\t                    }\n\t                    if (yy_.yytext) return 15;\n\n\t                    break;\n\t                case 1:\n\t                    return 15;\n\t                    break;\n\t                case 2:\n\t                    this.popState();\n\t                    return 15;\n\n\t                    break;\n\t                case 3:\n\t                    this.begin('raw');return 15;\n\t                    break;\n\t                case 4:\n\t                    this.popState();\n\t                    // Should be using `this.topState()` below, but it currently\n\t                    // returns the second top instead of the first top. Opened an\n\t                    // issue about it at https://github.com/zaach/jison/issues/291\n\t                    if (this.conditionStack[this.conditionStack.length - 1] === 'raw') {\n\t                        return 15;\n\t                    } else {\n\t                        yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9);\n\t                        return 'END_RAW_BLOCK';\n\t                    }\n\n\t                    break;\n\t                case 5:\n\t                    return 15;\n\t                    break;\n\t                case 6:\n\t                    this.popState();\n\t                    return 14;\n\n\t                    break;\n\t                case 7:\n\t                    return 65;\n\t                    break;\n\t                case 8:\n\t                    return 68;\n\t                    break;\n\t                case 9:\n\t                    return 19;\n\t                    break;\n\t                case 10:\n\t                    this.popState();\n\t                    this.begin('raw');\n\t                    return 23;\n\n\t                    break;\n\t                case 11:\n\t                    return 55;\n\t                    break;\n\t                case 12:\n\t                    return 60;\n\t                    break;\n\t                case 13:\n\t                    return 29;\n\t                    break;\n\t                case 14:\n\t                    return 47;\n\t                    break;\n\t                case 15:\n\t                    this.popState();return 44;\n\t                    break;\n\t                case 16:\n\t                    this.popState();return 44;\n\t                    break;\n\t                case 17:\n\t                    return 34;\n\t                    break;\n\t                case 18:\n\t                    return 39;\n\t                    break;\n\t                case 19:\n\t                    return 51;\n\t                    break;\n\t                case 20:\n\t                    return 48;\n\t                    break;\n\t                case 21:\n\t                    this.unput(yy_.yytext);\n\t                    this.popState();\n\t                    this.begin('com');\n\n\t                    break;\n\t                case 22:\n\t                    this.popState();\n\t                    return 14;\n\n\t                    break;\n\t                case 23:\n\t                    return 48;\n\t                    break;\n\t                case 24:\n\t                    return 73;\n\t                    break;\n\t                case 25:\n\t                    return 72;\n\t                    break;\n\t                case 26:\n\t                    return 72;\n\t                    break;\n\t                case 27:\n\t                    return 87;\n\t                    break;\n\t                case 28:\n\t                    // ignore whitespace\n\t                    break;\n\t                case 29:\n\t                    this.popState();return 54;\n\t                    break;\n\t                case 30:\n\t                    this.popState();return 33;\n\t                    break;\n\t                case 31:\n\t                    yy_.yytext = strip(1, 2).replace(/\\\\\"/g, '\"');return 80;\n\t                    break;\n\t                case 32:\n\t                    yy_.yytext = strip(1, 2).replace(/\\\\'/g, \"'\");return 80;\n\t                    break;\n\t                case 33:\n\t                    return 85;\n\t                    break;\n\t                case 34:\n\t                    return 82;\n\t                    break;\n\t                case 35:\n\t                    return 82;\n\t                    break;\n\t                case 36:\n\t                    return 83;\n\t                    break;\n\t                case 37:\n\t                    return 84;\n\t                    break;\n\t                case 38:\n\t                    return 81;\n\t                    break;\n\t                case 39:\n\t                    return 75;\n\t                    break;\n\t                case 40:\n\t                    return 77;\n\t                    break;\n\t                case 41:\n\t                    return 72;\n\t                    break;\n\t                case 42:\n\t                    yy_.yytext = yy_.yytext.replace(/\\\\([\\\\\\]])/g, '$1');return 72;\n\t                    break;\n\t                case 43:\n\t                    return 'INVALID';\n\t                    break;\n\t                case 44:\n\t                    return 5;\n\t                    break;\n\t            }\n\t        };\n\t        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\\/.)|]))))/, /^(?:\\[(\\\\\\]|[^\\]])*\\])/, /^(?:.)/, /^(?:$)/];\n\t        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 } };\n\t        return lexer;\n\t    })();\n\t    parser.lexer = lexer;\n\t    function Parser() {\n\t        this.yy = {};\n\t    }Parser.prototype = parser;parser.Parser = Parser;\n\t    return new Parser();\n\t})();exports.__esModule = true;\n\texports['default'] = handlebars;\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\n\tvar _visitor = __webpack_require__(25);\n\n\tvar _visitor2 = _interopRequireDefault(_visitor);\n\n\tfunction WhitespaceControl() {\n\t  var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n\t  this.options = options;\n\t}\n\tWhitespaceControl.prototype = new _visitor2['default']();\n\n\tWhitespaceControl.prototype.Program = function (program) {\n\t  var doStandalone = !this.options.ignoreStandalone;\n\n\t  var isRoot = !this.isRootSeen;\n\t  this.isRootSeen = true;\n\n\t  var body = program.body;\n\t  for (var i = 0, l = body.length; i < l; i++) {\n\t    var current = body[i],\n\t        strip = this.accept(current);\n\n\t    if (!strip) {\n\t      continue;\n\t    }\n\n\t    var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot),\n\t        _isNextWhitespace = isNextWhitespace(body, i, isRoot),\n\t        openStandalone = strip.openStandalone && _isPrevWhitespace,\n\t        closeStandalone = strip.closeStandalone && _isNextWhitespace,\n\t        inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;\n\n\t    if (strip.close) {\n\t      omitRight(body, i, true);\n\t    }\n\t    if (strip.open) {\n\t      omitLeft(body, i, true);\n\t    }\n\n\t    if (doStandalone && inlineStandalone) {\n\t      omitRight(body, i);\n\n\t      if (omitLeft(body, i)) {\n\t        // If we are on a standalone node, save the indent info for partials\n\t        if (current.type === 'PartialStatement') {\n\t          // Pull out the whitespace from the final line\n\t          current.indent = /([ \\t]+$)/.exec(body[i - 1].original)[1];\n\t        }\n\t      }\n\t    }\n\t    if (doStandalone && openStandalone) {\n\t      omitRight((current.program || current.inverse).body);\n\n\t      // Strip out the previous content node if it's whitespace only\n\t      omitLeft(body, i);\n\t    }\n\t    if (doStandalone && closeStandalone) {\n\t      // Always strip the next node\n\t      omitRight(body, i);\n\n\t      omitLeft((current.inverse || current.program).body);\n\t    }\n\t  }\n\n\t  return program;\n\t};\n\n\tWhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) {\n\t  this.accept(block.program);\n\t  this.accept(block.inverse);\n\n\t  // Find the inverse program that is involed with whitespace stripping.\n\t  var program = block.program || block.inverse,\n\t      inverse = block.program && block.inverse,\n\t      firstInverse = inverse,\n\t      lastInverse = inverse;\n\n\t  if (inverse && inverse.chained) {\n\t    firstInverse = inverse.body[0].program;\n\n\t    // Walk the inverse chain to find the last inverse that is actually in the chain.\n\t    while (lastInverse.chained) {\n\t      lastInverse = lastInverse.body[lastInverse.body.length - 1].program;\n\t    }\n\t  }\n\n\t  var strip = {\n\t    open: block.openStrip.open,\n\t    close: block.closeStrip.close,\n\n\t    // Determine the standalone candiacy. Basically flag our content as being possibly standalone\n\t    // so our parent can determine if we actually are standalone\n\t    openStandalone: isNextWhitespace(program.body),\n\t    closeStandalone: isPrevWhitespace((firstInverse || program).body)\n\t  };\n\n\t  if (block.openStrip.close) {\n\t    omitRight(program.body, null, true);\n\t  }\n\n\t  if (inverse) {\n\t    var inverseStrip = block.inverseStrip;\n\n\t    if (inverseStrip.open) {\n\t      omitLeft(program.body, null, true);\n\t    }\n\n\t    if (inverseStrip.close) {\n\t      omitRight(firstInverse.body, null, true);\n\t    }\n\t    if (block.closeStrip.open) {\n\t      omitLeft(lastInverse.body, null, true);\n\t    }\n\n\t    // Find standalone else statments\n\t    if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {\n\t      omitLeft(program.body);\n\t      omitRight(firstInverse.body);\n\t    }\n\t  } else if (block.closeStrip.open) {\n\t    omitLeft(program.body, null, true);\n\t  }\n\n\t  return strip;\n\t};\n\n\tWhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) {\n\t  return mustache.strip;\n\t};\n\n\tWhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) {\n\t  /* istanbul ignore next */\n\t  var strip = node.strip || {};\n\t  return {\n\t    inlineStandalone: true,\n\t    open: strip.open,\n\t    close: strip.close\n\t  };\n\t};\n\n\tfunction isPrevWhitespace(body, i, isRoot) {\n\t  if (i === undefined) {\n\t    i = body.length;\n\t  }\n\n\t  // Nodes that end with newlines are considered whitespace (but are special\n\t  // cased for strip operations)\n\t  var prev = body[i - 1],\n\t      sibling = body[i - 2];\n\t  if (!prev) {\n\t    return isRoot;\n\t  }\n\n\t  if (prev.type === 'ContentStatement') {\n\t    return (sibling || !isRoot ? /\\r?\\n\\s*?$/ : /(^|\\r?\\n)\\s*?$/).test(prev.original);\n\t  }\n\t}\n\tfunction isNextWhitespace(body, i, isRoot) {\n\t  if (i === undefined) {\n\t    i = -1;\n\t  }\n\n\t  var next = body[i + 1],\n\t      sibling = body[i + 2];\n\t  if (!next) {\n\t    return isRoot;\n\t  }\n\n\t  if (next.type === 'ContentStatement') {\n\t    return (sibling || !isRoot ? /^\\s*?\\r?\\n/ : /^\\s*?(\\r?\\n|$)/).test(next.original);\n\t  }\n\t}\n\n\t// Marks the node to the right of the position as omitted.\n\t// I.e. {{foo}}' ' will mark the ' ' node as omitted.\n\t//\n\t// If i is undefined, then the first child will be marked as such.\n\t//\n\t// If mulitple is truthy then all whitespace will be stripped out until non-whitespace\n\t// content is met.\n\tfunction omitRight(body, i, multiple) {\n\t  var current = body[i == null ? 0 : i + 1];\n\t  if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) {\n\t    return;\n\t  }\n\n\t  var original = current.value;\n\t  current.value = current.value.replace(multiple ? /^\\s+/ : /^[ \\t]*\\r?\\n?/, '');\n\t  current.rightStripped = current.value !== original;\n\t}\n\n\t// Marks the node to the left of the position as omitted.\n\t// I.e. ' '{{foo}} will mark the ' ' node as omitted.\n\t//\n\t// If i is undefined then the last child will be marked as such.\n\t//\n\t// If mulitple is truthy then all whitespace will be stripped out until non-whitespace\n\t// content is met.\n\tfunction omitLeft(body, i, multiple) {\n\t  var current = body[i == null ? body.length - 1 : i - 1];\n\t  if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) {\n\t    return;\n\t  }\n\n\t  // We omit the last node if it's whitespace only and not preceeded by a non-content node.\n\t  var original = current.value;\n\t  current.value = current.value.replace(multiple ? /\\s+$/ : /[ \\t]+$/, '');\n\t  current.leftStripped = current.value !== original;\n\t  return current.leftStripped;\n\t}\n\n\texports['default'] = WhitespaceControl;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\tfunction Visitor() {\n\t  this.parents = [];\n\t}\n\n\tVisitor.prototype = {\n\t  constructor: Visitor,\n\t  mutating: false,\n\n\t  // Visits a given value. If mutating, will replace the value if necessary.\n\t  acceptKey: function acceptKey(node, name) {\n\t    var value = this.accept(node[name]);\n\t    if (this.mutating) {\n\t      // Hacky sanity check: This may have a few false positives for type for the helper\n\t      // methods but will generally do the right thing without a lot of overhead.\n\t      if (value && !Visitor.prototype[value.type]) {\n\t        throw new _exception2['default']('Unexpected node type \"' + value.type + '\" found when accepting ' + name + ' on ' + node.type);\n\t      }\n\t      node[name] = value;\n\t    }\n\t  },\n\n\t  // Performs an accept operation with added sanity check to ensure\n\t  // required keys are not removed.\n\t  acceptRequired: function acceptRequired(node, name) {\n\t    this.acceptKey(node, name);\n\n\t    if (!node[name]) {\n\t      throw new _exception2['default'](node.type + ' requires ' + name);\n\t    }\n\t  },\n\n\t  // Traverses a given array. If mutating, empty respnses will be removed\n\t  // for child elements.\n\t  acceptArray: function acceptArray(array) {\n\t    for (var i = 0, l = array.length; i < l; i++) {\n\t      this.acceptKey(array, i);\n\n\t      if (!array[i]) {\n\t        array.splice(i, 1);\n\t        i--;\n\t        l--;\n\t      }\n\t    }\n\t  },\n\n\t  accept: function accept(object) {\n\t    if (!object) {\n\t      return;\n\t    }\n\n\t    /* istanbul ignore next: Sanity code */\n\t    if (!this[object.type]) {\n\t      throw new _exception2['default']('Unknown type: ' + object.type, object);\n\t    }\n\n\t    if (this.current) {\n\t      this.parents.unshift(this.current);\n\t    }\n\t    this.current = object;\n\n\t    var ret = this[object.type](object);\n\n\t    this.current = this.parents.shift();\n\n\t    if (!this.mutating || ret) {\n\t      return ret;\n\t    } else if (ret !== false) {\n\t      return object;\n\t    }\n\t  },\n\n\t  Program: function Program(program) {\n\t    this.acceptArray(program.body);\n\t  },\n\n\t  MustacheStatement: visitSubExpression,\n\t  Decorator: visitSubExpression,\n\n\t  BlockStatement: visitBlock,\n\t  DecoratorBlock: visitBlock,\n\n\t  PartialStatement: visitPartial,\n\t  PartialBlockStatement: function PartialBlockStatement(partial) {\n\t    visitPartial.call(this, partial);\n\n\t    this.acceptKey(partial, 'program');\n\t  },\n\n\t  ContentStatement: function ContentStatement() /* content */{},\n\t  CommentStatement: function CommentStatement() /* comment */{},\n\n\t  SubExpression: visitSubExpression,\n\n\t  PathExpression: function PathExpression() /* path */{},\n\n\t  StringLiteral: function StringLiteral() /* string */{},\n\t  NumberLiteral: function NumberLiteral() /* number */{},\n\t  BooleanLiteral: function BooleanLiteral() /* bool */{},\n\t  UndefinedLiteral: function UndefinedLiteral() /* literal */{},\n\t  NullLiteral: function NullLiteral() /* literal */{},\n\n\t  Hash: function Hash(hash) {\n\t    this.acceptArray(hash.pairs);\n\t  },\n\t  HashPair: function HashPair(pair) {\n\t    this.acceptRequired(pair, 'value');\n\t  }\n\t};\n\n\tfunction visitSubExpression(mustache) {\n\t  this.acceptRequired(mustache, 'path');\n\t  this.acceptArray(mustache.params);\n\t  this.acceptKey(mustache, 'hash');\n\t}\n\tfunction visitBlock(block) {\n\t  visitSubExpression.call(this, block);\n\n\t  this.acceptKey(block, 'program');\n\t  this.acceptKey(block, 'inverse');\n\t}\n\tfunction visitPartial(partial) {\n\t  this.acceptRequired(partial, 'name');\n\t  this.acceptArray(partial.params);\n\t  this.acceptKey(partial, 'hash');\n\t}\n\n\texports['default'] = Visitor;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\texports.SourceLocation = SourceLocation;\n\texports.id = id;\n\texports.stripFlags = stripFlags;\n\texports.stripComment = stripComment;\n\texports.preparePath = preparePath;\n\texports.prepareMustache = prepareMustache;\n\texports.prepareRawBlock = prepareRawBlock;\n\texports.prepareBlock = prepareBlock;\n\texports.prepareProgram = prepareProgram;\n\texports.preparePartialBlock = preparePartialBlock;\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\tfunction validateClose(open, close) {\n\t  close = close.path ? close.path.original : close;\n\n\t  if (open.path.original !== close) {\n\t    var errorNode = { loc: open.path.loc };\n\n\t    throw new _exception2['default'](open.path.original + \" doesn't match \" + close, errorNode);\n\t  }\n\t}\n\n\tfunction SourceLocation(source, locInfo) {\n\t  this.source = source;\n\t  this.start = {\n\t    line: locInfo.first_line,\n\t    column: locInfo.first_column\n\t  };\n\t  this.end = {\n\t    line: locInfo.last_line,\n\t    column: locInfo.last_column\n\t  };\n\t}\n\n\tfunction id(token) {\n\t  if (/^\\[.*\\]$/.test(token)) {\n\t    return token.substr(1, token.length - 2);\n\t  } else {\n\t    return token;\n\t  }\n\t}\n\n\tfunction stripFlags(open, close) {\n\t  return {\n\t    open: open.charAt(2) === '~',\n\t    close: close.charAt(close.length - 3) === '~'\n\t  };\n\t}\n\n\tfunction stripComment(comment) {\n\t  return comment.replace(/^\\{\\{~?\\!-?-?/, '').replace(/-?-?~?\\}\\}$/, '');\n\t}\n\n\tfunction preparePath(data, parts, loc) {\n\t  loc = this.locInfo(loc);\n\n\t  var original = data ? '@' : '',\n\t      dig = [],\n\t      depth = 0,\n\t      depthString = '';\n\n\t  for (var i = 0, l = parts.length; i < l; i++) {\n\t    var part = parts[i].part,\n\n\t    // If we have [] syntax then we do not treat path references as operators,\n\t    // i.e. foo.[this] resolves to approximately context.foo['this']\n\t    isLiteral = parts[i].original !== part;\n\t    original += (parts[i].separator || '') + part;\n\n\t    if (!isLiteral && (part === '..' || part === '.' || part === 'this')) {\n\t      if (dig.length > 0) {\n\t        throw new _exception2['default']('Invalid path: ' + original, { loc: loc });\n\t      } else if (part === '..') {\n\t        depth++;\n\t        depthString += '../';\n\t      }\n\t    } else {\n\t      dig.push(part);\n\t    }\n\t  }\n\n\t  return {\n\t    type: 'PathExpression',\n\t    data: data,\n\t    depth: depth,\n\t    parts: dig,\n\t    original: original,\n\t    loc: loc\n\t  };\n\t}\n\n\tfunction prepareMustache(path, params, hash, open, strip, locInfo) {\n\t  // Must use charAt to support IE pre-10\n\t  var escapeFlag = open.charAt(3) || open.charAt(2),\n\t      escaped = escapeFlag !== '{' && escapeFlag !== '&';\n\n\t  var decorator = /\\*/.test(open);\n\t  return {\n\t    type: decorator ? 'Decorator' : 'MustacheStatement',\n\t    path: path,\n\t    params: params,\n\t    hash: hash,\n\t    escaped: escaped,\n\t    strip: strip,\n\t    loc: this.locInfo(locInfo)\n\t  };\n\t}\n\n\tfunction prepareRawBlock(openRawBlock, contents, close, locInfo) {\n\t  validateClose(openRawBlock, close);\n\n\t  locInfo = this.locInfo(locInfo);\n\t  var program = {\n\t    type: 'Program',\n\t    body: contents,\n\t    strip: {},\n\t    loc: locInfo\n\t  };\n\n\t  return {\n\t    type: 'BlockStatement',\n\t    path: openRawBlock.path,\n\t    params: openRawBlock.params,\n\t    hash: openRawBlock.hash,\n\t    program: program,\n\t    openStrip: {},\n\t    inverseStrip: {},\n\t    closeStrip: {},\n\t    loc: locInfo\n\t  };\n\t}\n\n\tfunction prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {\n\t  if (close && close.path) {\n\t    validateClose(openBlock, close);\n\t  }\n\n\t  var decorator = /\\*/.test(openBlock.open);\n\n\t  program.blockParams = openBlock.blockParams;\n\n\t  var inverse = undefined,\n\t      inverseStrip = undefined;\n\n\t  if (inverseAndProgram) {\n\t    if (decorator) {\n\t      throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram);\n\t    }\n\n\t    if (inverseAndProgram.chain) {\n\t      inverseAndProgram.program.body[0].closeStrip = close.strip;\n\t    }\n\n\t    inverseStrip = inverseAndProgram.strip;\n\t    inverse = inverseAndProgram.program;\n\t  }\n\n\t  if (inverted) {\n\t    inverted = inverse;\n\t    inverse = program;\n\t    program = inverted;\n\t  }\n\n\t  return {\n\t    type: decorator ? 'DecoratorBlock' : 'BlockStatement',\n\t    path: openBlock.path,\n\t    params: openBlock.params,\n\t    hash: openBlock.hash,\n\t    program: program,\n\t    inverse: inverse,\n\t    openStrip: openBlock.strip,\n\t    inverseStrip: inverseStrip,\n\t    closeStrip: close && close.strip,\n\t    loc: this.locInfo(locInfo)\n\t  };\n\t}\n\n\tfunction prepareProgram(statements, loc) {\n\t  if (!loc && statements.length) {\n\t    var firstLoc = statements[0].loc,\n\t        lastLoc = statements[statements.length - 1].loc;\n\n\t    /* istanbul ignore else */\n\t    if (firstLoc && lastLoc) {\n\t      loc = {\n\t        source: firstLoc.source,\n\t        start: {\n\t          line: firstLoc.start.line,\n\t          column: firstLoc.start.column\n\t        },\n\t        end: {\n\t          line: lastLoc.end.line,\n\t          column: lastLoc.end.column\n\t        }\n\t      };\n\t    }\n\t  }\n\n\t  return {\n\t    type: 'Program',\n\t    body: statements,\n\t    strip: {},\n\t    loc: loc\n\t  };\n\t}\n\n\tfunction preparePartialBlock(open, program, close, locInfo) {\n\t  validateClose(open, close);\n\n\t  return {\n\t    type: 'PartialBlockStatement',\n\t    name: open.path,\n\t    params: open.params,\n\t    hash: open.hash,\n\t    program: program,\n\t    openStrip: open.strip,\n\t    closeStrip: close && close.strip,\n\t    loc: this.locInfo(locInfo)\n\t  };\n\t}\n\n/***/ },\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* eslint-disable new-cap */\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\texports.Compiler = Compiler;\n\texports.precompile = precompile;\n\texports.compile = compile;\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\tvar _utils = __webpack_require__(5);\n\n\tvar _ast = __webpack_require__(21);\n\n\tvar _ast2 = _interopRequireDefault(_ast);\n\n\tvar slice = [].slice;\n\n\tfunction Compiler() {}\n\n\t// the foundHelper register will disambiguate helper lookup from finding a\n\t// function in a context. This is necessary for mustache compatibility, which\n\t// requires that context functions in blocks are evaluated by blockHelperMissing,\n\t// and then proceed as if the resulting value was provided to blockHelperMissing.\n\n\tCompiler.prototype = {\n\t  compiler: Compiler,\n\n\t  equals: function equals(other) {\n\t    var len = this.opcodes.length;\n\t    if (other.opcodes.length !== len) {\n\t      return false;\n\t    }\n\n\t    for (var i = 0; i < len; i++) {\n\t      var opcode = this.opcodes[i],\n\t          otherOpcode = other.opcodes[i];\n\t      if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {\n\t        return false;\n\t      }\n\t    }\n\n\t    // We know that length is the same between the two arrays because they are directly tied\n\t    // to the opcode behavior above.\n\t    len = this.children.length;\n\t    for (var i = 0; i < len; i++) {\n\t      if (!this.children[i].equals(other.children[i])) {\n\t        return false;\n\t      }\n\t    }\n\n\t    return true;\n\t  },\n\n\t  guid: 0,\n\n\t  compile: function compile(program, options) {\n\t    this.sourceNode = [];\n\t    this.opcodes = [];\n\t    this.children = [];\n\t    this.options = options;\n\t    this.stringParams = options.stringParams;\n\t    this.trackIds = options.trackIds;\n\n\t    options.blockParams = options.blockParams || [];\n\n\t    // These changes will propagate to the other compiler components\n\t    var knownHelpers = options.knownHelpers;\n\t    options.knownHelpers = {\n\t      'helperMissing': true,\n\t      'blockHelperMissing': true,\n\t      'each': true,\n\t      'if': true,\n\t      'unless': true,\n\t      'with': true,\n\t      'log': true,\n\t      'lookup': true\n\t    };\n\t    if (knownHelpers) {\n\t      for (var _name in knownHelpers) {\n\t        /* istanbul ignore else */\n\t        if (_name in knownHelpers) {\n\t          options.knownHelpers[_name] = knownHelpers[_name];\n\t        }\n\t      }\n\t    }\n\n\t    return this.accept(program);\n\t  },\n\n\t  compileProgram: function compileProgram(program) {\n\t    var childCompiler = new this.compiler(),\n\t        // eslint-disable-line new-cap\n\t    result = childCompiler.compile(program, this.options),\n\t        guid = this.guid++;\n\n\t    this.usePartial = this.usePartial || result.usePartial;\n\n\t    this.children[guid] = result;\n\t    this.useDepths = this.useDepths || result.useDepths;\n\n\t    return guid;\n\t  },\n\n\t  accept: function accept(node) {\n\t    /* istanbul ignore next: Sanity code */\n\t    if (!this[node.type]) {\n\t      throw new _exception2['default']('Unknown type: ' + node.type, node);\n\t    }\n\n\t    this.sourceNode.unshift(node);\n\t    var ret = this[node.type](node);\n\t    this.sourceNode.shift();\n\t    return ret;\n\t  },\n\n\t  Program: function Program(program) {\n\t    this.options.blockParams.unshift(program.blockParams);\n\n\t    var body = program.body,\n\t        bodyLength = body.length;\n\t    for (var i = 0; i < bodyLength; i++) {\n\t      this.accept(body[i]);\n\t    }\n\n\t    this.options.blockParams.shift();\n\n\t    this.isSimple = bodyLength === 1;\n\t    this.blockParams = program.blockParams ? program.blockParams.length : 0;\n\n\t    return this;\n\t  },\n\n\t  BlockStatement: function BlockStatement(block) {\n\t    transformLiteralToPath(block);\n\n\t    var program = block.program,\n\t        inverse = block.inverse;\n\n\t    program = program && this.compileProgram(program);\n\t    inverse = inverse && this.compileProgram(inverse);\n\n\t    var type = this.classifySexpr(block);\n\n\t    if (type === 'helper') {\n\t      this.helperSexpr(block, program, inverse);\n\t    } else if (type === 'simple') {\n\t      this.simpleSexpr(block);\n\n\t      // now that the simple mustache is resolved, we need to\n\t      // evaluate it by executing `blockHelperMissing`\n\t      this.opcode('pushProgram', program);\n\t      this.opcode('pushProgram', inverse);\n\t      this.opcode('emptyHash');\n\t      this.opcode('blockValue', block.path.original);\n\t    } else {\n\t      this.ambiguousSexpr(block, program, inverse);\n\n\t      // now that the simple mustache is resolved, we need to\n\t      // evaluate it by executing `blockHelperMissing`\n\t      this.opcode('pushProgram', program);\n\t      this.opcode('pushProgram', inverse);\n\t      this.opcode('emptyHash');\n\t      this.opcode('ambiguousBlockValue');\n\t    }\n\n\t    this.opcode('append');\n\t  },\n\n\t  DecoratorBlock: function DecoratorBlock(decorator) {\n\t    var program = decorator.program && this.compileProgram(decorator.program);\n\t    var params = this.setupFullMustacheParams(decorator, program, undefined),\n\t        path = decorator.path;\n\n\t    this.useDecorators = true;\n\t    this.opcode('registerDecorator', params.length, path.original);\n\t  },\n\n\t  PartialStatement: function PartialStatement(partial) {\n\t    this.usePartial = true;\n\n\t    var program = partial.program;\n\t    if (program) {\n\t      program = this.compileProgram(partial.program);\n\t    }\n\n\t    var params = partial.params;\n\t    if (params.length > 1) {\n\t      throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial);\n\t    } else if (!params.length) {\n\t      if (this.options.explicitPartialContext) {\n\t        this.opcode('pushLiteral', 'undefined');\n\t      } else {\n\t        params.push({ type: 'PathExpression', parts: [], depth: 0 });\n\t      }\n\t    }\n\n\t    var partialName = partial.name.original,\n\t        isDynamic = partial.name.type === 'SubExpression';\n\t    if (isDynamic) {\n\t      this.accept(partial.name);\n\t    }\n\n\t    this.setupFullMustacheParams(partial, program, undefined, true);\n\n\t    var indent = partial.indent || '';\n\t    if (this.options.preventIndent && indent) {\n\t      this.opcode('appendContent', indent);\n\t      indent = '';\n\t    }\n\n\t    this.opcode('invokePartial', isDynamic, partialName, indent);\n\t    this.opcode('append');\n\t  },\n\t  PartialBlockStatement: function PartialBlockStatement(partialBlock) {\n\t    this.PartialStatement(partialBlock);\n\t  },\n\n\t  MustacheStatement: function MustacheStatement(mustache) {\n\t    this.SubExpression(mustache);\n\n\t    if (mustache.escaped && !this.options.noEscape) {\n\t      this.opcode('appendEscaped');\n\t    } else {\n\t      this.opcode('append');\n\t    }\n\t  },\n\t  Decorator: function Decorator(decorator) {\n\t    this.DecoratorBlock(decorator);\n\t  },\n\n\t  ContentStatement: function ContentStatement(content) {\n\t    if (content.value) {\n\t      this.opcode('appendContent', content.value);\n\t    }\n\t  },\n\n\t  CommentStatement: function CommentStatement() {},\n\n\t  SubExpression: function SubExpression(sexpr) {\n\t    transformLiteralToPath(sexpr);\n\t    var type = this.classifySexpr(sexpr);\n\n\t    if (type === 'simple') {\n\t      this.simpleSexpr(sexpr);\n\t    } else if (type === 'helper') {\n\t      this.helperSexpr(sexpr);\n\t    } else {\n\t      this.ambiguousSexpr(sexpr);\n\t    }\n\t  },\n\t  ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {\n\t    var path = sexpr.path,\n\t        name = path.parts[0],\n\t        isBlock = program != null || inverse != null;\n\n\t    this.opcode('getContext', path.depth);\n\n\t    this.opcode('pushProgram', program);\n\t    this.opcode('pushProgram', inverse);\n\n\t    path.strict = true;\n\t    this.accept(path);\n\n\t    this.opcode('invokeAmbiguous', name, isBlock);\n\t  },\n\n\t  simpleSexpr: function simpleSexpr(sexpr) {\n\t    var path = sexpr.path;\n\t    path.strict = true;\n\t    this.accept(path);\n\t    this.opcode('resolvePossibleLambda');\n\t  },\n\n\t  helperSexpr: function helperSexpr(sexpr, program, inverse) {\n\t    var params = this.setupFullMustacheParams(sexpr, program, inverse),\n\t        path = sexpr.path,\n\t        name = path.parts[0];\n\n\t    if (this.options.knownHelpers[name]) {\n\t      this.opcode('invokeKnownHelper', params.length, name);\n\t    } else if (this.options.knownHelpersOnly) {\n\t      throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr);\n\t    } else {\n\t      path.strict = true;\n\t      path.falsy = true;\n\n\t      this.accept(path);\n\t      this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path));\n\t    }\n\t  },\n\n\t  PathExpression: function PathExpression(path) {\n\t    this.addDepth(path.depth);\n\t    this.opcode('getContext', path.depth);\n\n\t    var name = path.parts[0],\n\t        scoped = _ast2['default'].helpers.scopedId(path),\n\t        blockParamId = !path.depth && !scoped && this.blockParamIndex(name);\n\n\t    if (blockParamId) {\n\t      this.opcode('lookupBlockParam', blockParamId, path.parts);\n\t    } else if (!name) {\n\t      // Context reference, i.e. `{{foo .}}` or `{{foo ..}}`\n\t      this.opcode('pushContext');\n\t    } else if (path.data) {\n\t      this.options.data = true;\n\t      this.opcode('lookupData', path.depth, path.parts, path.strict);\n\t    } else {\n\t      this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped);\n\t    }\n\t  },\n\n\t  StringLiteral: function StringLiteral(string) {\n\t    this.opcode('pushString', string.value);\n\t  },\n\n\t  NumberLiteral: function NumberLiteral(number) {\n\t    this.opcode('pushLiteral', number.value);\n\t  },\n\n\t  BooleanLiteral: function BooleanLiteral(bool) {\n\t    this.opcode('pushLiteral', bool.value);\n\t  },\n\n\t  UndefinedLiteral: function UndefinedLiteral() {\n\t    this.opcode('pushLiteral', 'undefined');\n\t  },\n\n\t  NullLiteral: function NullLiteral() {\n\t    this.opcode('pushLiteral', 'null');\n\t  },\n\n\t  Hash: function Hash(hash) {\n\t    var pairs = hash.pairs,\n\t        i = 0,\n\t        l = pairs.length;\n\n\t    this.opcode('pushHash');\n\n\t    for (; i < l; i++) {\n\t      this.pushParam(pairs[i].value);\n\t    }\n\t    while (i--) {\n\t      this.opcode('assignToHash', pairs[i].key);\n\t    }\n\t    this.opcode('popHash');\n\t  },\n\n\t  // HELPERS\n\t  opcode: function opcode(name) {\n\t    this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc });\n\t  },\n\n\t  addDepth: function addDepth(depth) {\n\t    if (!depth) {\n\t      return;\n\t    }\n\n\t    this.useDepths = true;\n\t  },\n\n\t  classifySexpr: function classifySexpr(sexpr) {\n\t    var isSimple = _ast2['default'].helpers.simpleId(sexpr.path);\n\n\t    var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);\n\n\t    // a mustache is an eligible helper if:\n\t    // * its id is simple (a single part, not `this` or `..`)\n\t    var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr);\n\n\t    // if a mustache is an eligible helper but not a definite\n\t    // helper, it is ambiguous, and will be resolved in a later\n\t    // pass or at runtime.\n\t    var isEligible = !isBlockParam && (isHelper || isSimple);\n\n\t    // if ambiguous, we can possibly resolve the ambiguity now\n\t    // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc.\n\t    if (isEligible && !isHelper) {\n\t      var _name2 = sexpr.path.parts[0],\n\t          options = this.options;\n\n\t      if (options.knownHelpers[_name2]) {\n\t        isHelper = true;\n\t      } else if (options.knownHelpersOnly) {\n\t        isEligible = false;\n\t      }\n\t    }\n\n\t    if (isHelper) {\n\t      return 'helper';\n\t    } else if (isEligible) {\n\t      return 'ambiguous';\n\t    } else {\n\t      return 'simple';\n\t    }\n\t  },\n\n\t  pushParams: function pushParams(params) {\n\t    for (var i = 0, l = params.length; i < l; i++) {\n\t      this.pushParam(params[i]);\n\t    }\n\t  },\n\n\t  pushParam: function pushParam(val) {\n\t    var value = val.value != null ? val.value : val.original || '';\n\n\t    if (this.stringParams) {\n\t      if (value.replace) {\n\t        value = value.replace(/^(\\.?\\.\\/)*/g, '').replace(/\\//g, '.');\n\t      }\n\n\t      if (val.depth) {\n\t        this.addDepth(val.depth);\n\t      }\n\t      this.opcode('getContext', val.depth || 0);\n\t      this.opcode('pushStringParam', value, val.type);\n\n\t      if (val.type === 'SubExpression') {\n\t        // SubExpressions get evaluated and passed in\n\t        // in string params mode.\n\t        this.accept(val);\n\t      }\n\t    } else {\n\t      if (this.trackIds) {\n\t        var blockParamIndex = undefined;\n\t        if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) {\n\t          blockParamIndex = this.blockParamIndex(val.parts[0]);\n\t        }\n\t        if (blockParamIndex) {\n\t          var blockParamChild = val.parts.slice(1).join('.');\n\t          this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild);\n\t        } else {\n\t          value = val.original || value;\n\t          if (value.replace) {\n\t            value = value.replace(/^this(?:\\.|$)/, '').replace(/^\\.\\//, '').replace(/^\\.$/, '');\n\t          }\n\n\t          this.opcode('pushId', val.type, value);\n\t        }\n\t      }\n\t      this.accept(val);\n\t    }\n\t  },\n\n\t  setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {\n\t    var params = sexpr.params;\n\t    this.pushParams(params);\n\n\t    this.opcode('pushProgram', program);\n\t    this.opcode('pushProgram', inverse);\n\n\t    if (sexpr.hash) {\n\t      this.accept(sexpr.hash);\n\t    } else {\n\t      this.opcode('emptyHash', omitEmpty);\n\t    }\n\n\t    return params;\n\t  },\n\n\t  blockParamIndex: function blockParamIndex(name) {\n\t    for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {\n\t      var blockParams = this.options.blockParams[depth],\n\t          param = blockParams && _utils.indexOf(blockParams, name);\n\t      if (blockParams && param >= 0) {\n\t        return [depth, param];\n\t      }\n\t    }\n\t  }\n\t};\n\n\tfunction precompile(input, options, env) {\n\t  if (input == null || typeof input !== 'string' && input.type !== 'Program') {\n\t    throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input);\n\t  }\n\n\t  options = options || {};\n\t  if (!('data' in options)) {\n\t    options.data = true;\n\t  }\n\t  if (options.compat) {\n\t    options.useDepths = true;\n\t  }\n\n\t  var ast = env.parse(input, options),\n\t      environment = new env.Compiler().compile(ast, options);\n\t  return new env.JavaScriptCompiler().compile(environment, options);\n\t}\n\n\tfunction compile(input, options, env) {\n\t  if (options === undefined) options = {};\n\n\t  if (input == null || typeof input !== 'string' && input.type !== 'Program') {\n\t    throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input);\n\t  }\n\n\t  if (!('data' in options)) {\n\t    options.data = true;\n\t  }\n\t  if (options.compat) {\n\t    options.useDepths = true;\n\t  }\n\n\t  var compiled = undefined;\n\n\t  function compileInput() {\n\t    var ast = env.parse(input, options),\n\t        environment = new env.Compiler().compile(ast, options),\n\t        templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true);\n\t    return env.template(templateSpec);\n\t  }\n\n\t  // Template is only compiled on first use and cached after that point.\n\t  function ret(context, execOptions) {\n\t    if (!compiled) {\n\t      compiled = compileInput();\n\t    }\n\t    return compiled.call(this, context, execOptions);\n\t  }\n\t  ret._setup = function (setupOptions) {\n\t    if (!compiled) {\n\t      compiled = compileInput();\n\t    }\n\t    return compiled._setup(setupOptions);\n\t  };\n\t  ret._child = function (i, data, blockParams, depths) {\n\t    if (!compiled) {\n\t      compiled = compileInput();\n\t    }\n\t    return compiled._child(i, data, blockParams, depths);\n\t  };\n\t  return ret;\n\t}\n\n\tfunction argEquals(a, b) {\n\t  if (a === b) {\n\t    return true;\n\t  }\n\n\t  if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {\n\t    for (var i = 0; i < a.length; i++) {\n\t      if (!argEquals(a[i], b[i])) {\n\t        return false;\n\t      }\n\t    }\n\t    return true;\n\t  }\n\t}\n\n\tfunction transformLiteralToPath(sexpr) {\n\t  if (!sexpr.path.parts) {\n\t    var literal = sexpr.path;\n\t    // Casting to string here to make false and 0 literal values play nicely with the rest\n\t    // of the system.\n\t    sexpr.path = {\n\t      type: 'PathExpression',\n\t      data: false,\n\t      depth: 0,\n\t      parts: [literal.original + ''],\n\t      original: literal.original + '',\n\t      loc: literal.loc\n\t    };\n\t  }\n\t}\n\n/***/ },\n/* 28 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\n\tvar _interopRequireDefault = __webpack_require__(1)['default'];\n\n\texports.__esModule = true;\n\n\tvar _base = __webpack_require__(4);\n\n\tvar _exception = __webpack_require__(6);\n\n\tvar _exception2 = _interopRequireDefault(_exception);\n\n\tvar _utils = __webpack_require__(5);\n\n\tvar _codeGen = __webpack_require__(29);\n\n\tvar _codeGen2 = _interopRequireDefault(_codeGen);\n\n\tfunction Literal(value) {\n\t  this.value = value;\n\t}\n\n\tfunction JavaScriptCompiler() {}\n\n\tJavaScriptCompiler.prototype = {\n\t  // PUBLIC API: You can override these methods in a subclass to provide\n\t  // alternative compiled forms for name lookup and buffering semantics\n\t  nameLookup: function nameLookup(parent, name /* , type*/) {\n\t    if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {\n\t      return [parent, '.', name];\n\t    } else {\n\t      return [parent, '[', JSON.stringify(name), ']'];\n\t    }\n\t  },\n\t  depthedLookup: function depthedLookup(name) {\n\t    return [this.aliasable('container.lookup'), '(depths, \"', name, '\")'];\n\t  },\n\n\t  compilerInfo: function compilerInfo() {\n\t    var revision = _base.COMPILER_REVISION,\n\t        versions = _base.REVISION_CHANGES[revision];\n\t    return [revision, versions];\n\t  },\n\n\t  appendToBuffer: function appendToBuffer(source, location, explicit) {\n\t    // Force a source as this simplifies the merge logic.\n\t    if (!_utils.isArray(source)) {\n\t      source = [source];\n\t    }\n\t    source = this.source.wrap(source, location);\n\n\t    if (this.environment.isSimple) {\n\t      return ['return ', source, ';'];\n\t    } else if (explicit) {\n\t      // This is a case where the buffer operation occurs as a child of another\n\t      // construct, generally braces. We have to explicitly output these buffer\n\t      // operations to ensure that the emitted code goes in the correct location.\n\t      return ['buffer += ', source, ';'];\n\t    } else {\n\t      source.appendToBuffer = true;\n\t      return source;\n\t    }\n\t  },\n\n\t  initializeBuffer: function initializeBuffer() {\n\t    return this.quotedString('');\n\t  },\n\t  // END PUBLIC API\n\n\t  compile: function compile(environment, options, context, asObject) {\n\t    this.environment = environment;\n\t    this.options = options;\n\t    this.stringParams = this.options.stringParams;\n\t    this.trackIds = this.options.trackIds;\n\t    this.precompile = !asObject;\n\n\t    this.name = this.environment.name;\n\t    this.isChild = !!context;\n\t    this.context = context || {\n\t      decorators: [],\n\t      programs: [],\n\t      environments: []\n\t    };\n\n\t    this.preamble();\n\n\t    this.stackSlot = 0;\n\t    this.stackVars = [];\n\t    this.aliases = {};\n\t    this.registers = { list: [] };\n\t    this.hashes = [];\n\t    this.compileStack = [];\n\t    this.inlineStack = [];\n\t    this.blockParams = [];\n\n\t    this.compileChildren(environment, options);\n\n\t    this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;\n\t    this.useBlockParams = this.useBlockParams || environment.useBlockParams;\n\n\t    var opcodes = environment.opcodes,\n\t        opcode = undefined,\n\t        firstLoc = undefined,\n\t        i = undefined,\n\t        l = undefined;\n\n\t    for (i = 0, l = opcodes.length; i < l; i++) {\n\t      opcode = opcodes[i];\n\n\t      this.source.currentLocation = opcode.loc;\n\t      firstLoc = firstLoc || opcode.loc;\n\t      this[opcode.opcode].apply(this, opcode.args);\n\t    }\n\n\t    // Flush any trailing content that might be pending.\n\t    this.source.currentLocation = firstLoc;\n\t    this.pushSource('');\n\n\t    /* istanbul ignore next */\n\t    if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {\n\t      throw new _exception2['default']('Compile completed with content left on stack');\n\t    }\n\n\t    if (!this.decorators.isEmpty()) {\n\t      this.useDecorators = true;\n\n\t      this.decorators.prepend('var decorators = container.decorators;\\n');\n\t      this.decorators.push('return fn;');\n\n\t      if (asObject) {\n\t        this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]);\n\t      } else {\n\t        this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\\n');\n\t        this.decorators.push('}\\n');\n\t        this.decorators = this.decorators.merge();\n\t      }\n\t    } else {\n\t      this.decorators = undefined;\n\t    }\n\n\t    var fn = this.createFunctionContext(asObject);\n\t    if (!this.isChild) {\n\t      var ret = {\n\t        compiler: this.compilerInfo(),\n\t        main: fn\n\t      };\n\n\t      if (this.decorators) {\n\t        ret.main_d = this.decorators; // eslint-disable-line camelcase\n\t        ret.useDecorators = true;\n\t      }\n\n\t      var _context = this.context;\n\t      var programs = _context.programs;\n\t      var decorators = _context.decorators;\n\n\t      for (i = 0, l = programs.length; i < l; i++) {\n\t        if (programs[i]) {\n\t          ret[i] = programs[i];\n\t          if (decorators[i]) {\n\t            ret[i + '_d'] = decorators[i];\n\t            ret.useDecorators = true;\n\t          }\n\t        }\n\t      }\n\n\t      if (this.environment.usePartial) {\n\t        ret.usePartial = true;\n\t      }\n\t      if (this.options.data) {\n\t        ret.useData = true;\n\t      }\n\t      if (this.useDepths) {\n\t        ret.useDepths = true;\n\t      }\n\t      if (this.useBlockParams) {\n\t        ret.useBlockParams = true;\n\t      }\n\t      if (this.options.compat) {\n\t        ret.compat = true;\n\t      }\n\n\t      if (!asObject) {\n\t        ret.compiler = JSON.stringify(ret.compiler);\n\n\t        this.source.currentLocation = { start: { line: 1, column: 0 } };\n\t        ret = this.objectLiteral(ret);\n\n\t        if (options.srcName) {\n\t          ret = ret.toStringWithSourceMap({ file: options.destName });\n\t          ret.map = ret.map && ret.map.toString();\n\t        } else {\n\t          ret = ret.toString();\n\t        }\n\t      } else {\n\t        ret.compilerOptions = this.options;\n\t      }\n\n\t      return ret;\n\t    } else {\n\t      return fn;\n\t    }\n\t  },\n\n\t  preamble: function preamble() {\n\t    // track the last context pushed into place to allow skipping the\n\t    // getContext opcode when it would be a noop\n\t    this.lastContext = 0;\n\t    this.source = new _codeGen2['default'](this.options.srcName);\n\t    this.decorators = new _codeGen2['default'](this.options.srcName);\n\t  },\n\n\t  createFunctionContext: function createFunctionContext(asObject) {\n\t    var varDeclarations = '';\n\n\t    var locals = this.stackVars.concat(this.registers.list);\n\t    if (locals.length > 0) {\n\t      varDeclarations += ', ' + locals.join(', ');\n\t    }\n\n\t    // Generate minimizer alias mappings\n\t    //\n\t    // When using true SourceNodes, this will update all references to the given alias\n\t    // as the source nodes are reused in situ. For the non-source node compilation mode,\n\t    // aliases will not be used, but this case is already being run on the client and\n\t    // we aren't concern about minimizing the template size.\n\t    var aliasCount = 0;\n\t    for (var alias in this.aliases) {\n\t      // eslint-disable-line guard-for-in\n\t      var node = this.aliases[alias];\n\n\t      if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) {\n\t        varDeclarations += ', alias' + ++aliasCount + '=' + alias;\n\t        node.children[0] = 'alias' + aliasCount;\n\t      }\n\t    }\n\n\t    var params = ['container', 'depth0', 'helpers', 'partials', 'data'];\n\n\t    if (this.useBlockParams || this.useDepths) {\n\t      params.push('blockParams');\n\t    }\n\t    if (this.useDepths) {\n\t      params.push('depths');\n\t    }\n\n\t    // Perform a second pass over the output to merge content when possible\n\t    var source = this.mergeSource(varDeclarations);\n\n\t    if (asObject) {\n\t      params.push(source);\n\n\t      return Function.apply(this, params);\n\t    } else {\n\t      return this.source.wrap(['function(', params.join(','), ') {\\n  ', source, '}']);\n\t    }\n\t  },\n\t  mergeSource: function mergeSource(varDeclarations) {\n\t    var isSimple = this.environment.isSimple,\n\t        appendOnly = !this.forceBuffer,\n\t        appendFirst = undefined,\n\t        sourceSeen = undefined,\n\t        bufferStart = undefined,\n\t        bufferEnd = undefined;\n\t    this.source.each(function (line) {\n\t      if (line.appendToBuffer) {\n\t        if (bufferStart) {\n\t          line.prepend('  + ');\n\t        } else {\n\t          bufferStart = line;\n\t        }\n\t        bufferEnd = line;\n\t      } else {\n\t        if (bufferStart) {\n\t          if (!sourceSeen) {\n\t            appendFirst = true;\n\t          } else {\n\t            bufferStart.prepend('buffer += ');\n\t          }\n\t          bufferEnd.add(';');\n\t          bufferStart = bufferEnd = undefined;\n\t        }\n\n\t        sourceSeen = true;\n\t        if (!isSimple) {\n\t          appendOnly = false;\n\t        }\n\t      }\n\t    });\n\n\t    if (appendOnly) {\n\t      if (bufferStart) {\n\t        bufferStart.prepend('return ');\n\t        bufferEnd.add(';');\n\t      } else if (!sourceSeen) {\n\t        this.source.push('return \"\";');\n\t      }\n\t    } else {\n\t      varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer());\n\n\t      if (bufferStart) {\n\t        bufferStart.prepend('return buffer + ');\n\t        bufferEnd.add(';');\n\t      } else {\n\t        this.source.push('return buffer;');\n\t      }\n\t    }\n\n\t    if (varDeclarations) {\n\t      this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\\n'));\n\t    }\n\n\t    return this.source.merge();\n\t  },\n\n\t  // [blockValue]\n\t  //\n\t  // On stack, before: hash, inverse, program, value\n\t  // On stack, after: return value of blockHelperMissing\n\t  //\n\t  // The purpose of this opcode is to take a block of the form\n\t  // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and\n\t  // replace it on the stack with the result of properly\n\t  // invoking blockHelperMissing.\n\t  blockValue: function blockValue(name) {\n\t    var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),\n\t        params = [this.contextName(0)];\n\t    this.setupHelperArgs(name, 0, params);\n\n\t    var blockName = this.popStack();\n\t    params.splice(1, 0, blockName);\n\n\t    this.push(this.source.functionCall(blockHelperMissing, 'call', params));\n\t  },\n\n\t  // [ambiguousBlockValue]\n\t  //\n\t  // On stack, before: hash, inverse, program, value\n\t  // Compiler value, before: lastHelper=value of last found helper, if any\n\t  // On stack, after, if no lastHelper: same as [blockValue]\n\t  // On stack, after, if lastHelper: value\n\t  ambiguousBlockValue: function ambiguousBlockValue() {\n\t    // We're being a bit cheeky and reusing the options value from the prior exec\n\t    var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'),\n\t        params = [this.contextName(0)];\n\t    this.setupHelperArgs('', 0, params, true);\n\n\t    this.flushInline();\n\n\t    var current = this.topStack();\n\t    params.splice(1, 0, current);\n\n\t    this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']);\n\t  },\n\n\t  // [appendContent]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: ...\n\t  //\n\t  // Appends the string value of `content` to the current buffer\n\t  appendContent: function appendContent(content) {\n\t    if (this.pendingContent) {\n\t      content = this.pendingContent + content;\n\t    } else {\n\t      this.pendingLocation = this.source.currentLocation;\n\t    }\n\n\t    this.pendingContent = content;\n\t  },\n\n\t  // [append]\n\t  //\n\t  // On stack, before: value, ...\n\t  // On stack, after: ...\n\t  //\n\t  // Coerces `value` to a String and appends it to the current buffer.\n\t  //\n\t  // If `value` is truthy, or 0, it is coerced into a string and appended\n\t  // Otherwise, the empty string is appended\n\t  append: function append() {\n\t    if (this.isInline()) {\n\t      this.replaceStack(function (current) {\n\t        return [' != null ? ', current, ' : \"\"'];\n\t      });\n\n\t      this.pushSource(this.appendToBuffer(this.popStack()));\n\t    } else {\n\t      var local = this.popStack();\n\t      this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']);\n\t      if (this.environment.isSimple) {\n\t        this.pushSource(['else { ', this.appendToBuffer(\"''\", undefined, true), ' }']);\n\t      }\n\t    }\n\t  },\n\n\t  // [appendEscaped]\n\t  //\n\t  // On stack, before: value, ...\n\t  // On stack, after: ...\n\t  //\n\t  // Escape `value` and append it to the buffer\n\t  appendEscaped: function appendEscaped() {\n\t    this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')']));\n\t  },\n\n\t  // [getContext]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: ...\n\t  // Compiler value, after: lastContext=depth\n\t  //\n\t  // Set the value of the `lastContext` compiler value to the depth\n\t  getContext: function getContext(depth) {\n\t    this.lastContext = depth;\n\t  },\n\n\t  // [pushContext]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: currentContext, ...\n\t  //\n\t  // Pushes the value of the current context onto the stack.\n\t  pushContext: function pushContext() {\n\t    this.pushStackLiteral(this.contextName(this.lastContext));\n\t  },\n\n\t  // [lookupOnContext]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: currentContext[name], ...\n\t  //\n\t  // Looks up the value of `name` on the current context and pushes\n\t  // it onto the stack.\n\t  lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {\n\t    var i = 0;\n\n\t    if (!scoped && this.options.compat && !this.lastContext) {\n\t      // The depthed query is expected to handle the undefined logic for the root level that\n\t      // is implemented below, so we evaluate that directly in compat mode\n\t      this.push(this.depthedLookup(parts[i++]));\n\t    } else {\n\t      this.pushContext();\n\t    }\n\n\t    this.resolvePath('context', parts, i, falsy, strict);\n\t  },\n\n\t  // [lookupBlockParam]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: blockParam[name], ...\n\t  //\n\t  // Looks up the value of `parts` on the given block param and pushes\n\t  // it onto the stack.\n\t  lookupBlockParam: function lookupBlockParam(blockParamId, parts) {\n\t    this.useBlockParams = true;\n\n\t    this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']);\n\t    this.resolvePath('context', parts, 1);\n\t  },\n\n\t  // [lookupData]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: data, ...\n\t  //\n\t  // Push the data lookup operator\n\t  lookupData: function lookupData(depth, parts, strict) {\n\t    if (!depth) {\n\t      this.pushStackLiteral('data');\n\t    } else {\n\t      this.pushStackLiteral('container.data(data, ' + depth + ')');\n\t    }\n\n\t    this.resolvePath('data', parts, 0, true, strict);\n\t  },\n\n\t  resolvePath: function resolvePath(type, parts, i, falsy, strict) {\n\t    // istanbul ignore next\n\n\t    var _this = this;\n\n\t    if (this.options.strict || this.options.assumeObjects) {\n\t      this.push(strictLookup(this.options.strict && strict, this, parts, type));\n\t      return;\n\t    }\n\n\t    var len = parts.length;\n\t    for (; i < len; i++) {\n\t      /* eslint-disable no-loop-func */\n\t      this.replaceStack(function (current) {\n\t        var lookup = _this.nameLookup(current, parts[i], type);\n\t        // We want to ensure that zero and false are handled properly if the context (falsy flag)\n\t        // needs to have the special handling for these values.\n\t        if (!falsy) {\n\t          return [' != null ? ', lookup, ' : ', current];\n\t        } else {\n\t          // Otherwise we can use generic falsy handling\n\t          return [' && ', lookup];\n\t        }\n\t      });\n\t      /* eslint-enable no-loop-func */\n\t    }\n\t  },\n\n\t  // [resolvePossibleLambda]\n\t  //\n\t  // On stack, before: value, ...\n\t  // On stack, after: resolved value, ...\n\t  //\n\t  // If the `value` is a lambda, replace it on the stack by\n\t  // the return value of the lambda\n\t  resolvePossibleLambda: function resolvePossibleLambda() {\n\t    this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']);\n\t  },\n\n\t  // [pushStringParam]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: string, currentContext, ...\n\t  //\n\t  // This opcode is designed for use in string mode, which\n\t  // provides the string value of a parameter along with its\n\t  // depth rather than resolving it immediately.\n\t  pushStringParam: function pushStringParam(string, type) {\n\t    this.pushContext();\n\t    this.pushString(type);\n\n\t    // If it's a subexpression, the string result\n\t    // will be pushed after this opcode.\n\t    if (type !== 'SubExpression') {\n\t      if (typeof string === 'string') {\n\t        this.pushString(string);\n\t      } else {\n\t        this.pushStackLiteral(string);\n\t      }\n\t    }\n\t  },\n\n\t  emptyHash: function emptyHash(omitEmpty) {\n\t    if (this.trackIds) {\n\t      this.push('{}'); // hashIds\n\t    }\n\t    if (this.stringParams) {\n\t      this.push('{}'); // hashContexts\n\t      this.push('{}'); // hashTypes\n\t    }\n\t    this.pushStackLiteral(omitEmpty ? 'undefined' : '{}');\n\t  },\n\t  pushHash: function pushHash() {\n\t    if (this.hash) {\n\t      this.hashes.push(this.hash);\n\t    }\n\t    this.hash = { values: [], types: [], contexts: [], ids: [] };\n\t  },\n\t  popHash: function popHash() {\n\t    var hash = this.hash;\n\t    this.hash = this.hashes.pop();\n\n\t    if (this.trackIds) {\n\t      this.push(this.objectLiteral(hash.ids));\n\t    }\n\t    if (this.stringParams) {\n\t      this.push(this.objectLiteral(hash.contexts));\n\t      this.push(this.objectLiteral(hash.types));\n\t    }\n\n\t    this.push(this.objectLiteral(hash.values));\n\t  },\n\n\t  // [pushString]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: quotedString(string), ...\n\t  //\n\t  // Push a quoted version of `string` onto the stack\n\t  pushString: function pushString(string) {\n\t    this.pushStackLiteral(this.quotedString(string));\n\t  },\n\n\t  // [pushLiteral]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: value, ...\n\t  //\n\t  // Pushes a value onto the stack. This operation prevents\n\t  // the compiler from creating a temporary variable to hold\n\t  // it.\n\t  pushLiteral: function pushLiteral(value) {\n\t    this.pushStackLiteral(value);\n\t  },\n\n\t  // [pushProgram]\n\t  //\n\t  // On stack, before: ...\n\t  // On stack, after: program(guid), ...\n\t  //\n\t  // Push a program expression onto the stack. This takes\n\t  // a compile-time guid and converts it into a runtime-accessible\n\t  // expression.\n\t  pushProgram: function pushProgram(guid) {\n\t    if (guid != null) {\n\t      this.pushStackLiteral(this.programExpression(guid));\n\t    } else {\n\t      this.pushStackLiteral(null);\n\t    }\n\t  },\n\n\t  // [registerDecorator]\n\t  //\n\t  // On stack, before: hash, program, params..., ...\n\t  // On stack, after: ...\n\t  //\n\t  // Pops off the decorator's parameters, invokes the decorator,\n\t  // and inserts the decorator into the decorators list.\n\t  registerDecorator: function registerDecorator(paramSize, name) {\n\t    var foundDecorator = this.nameLookup('decorators', name, 'decorator'),\n\t        options = this.setupHelperArgs(name, paramSize);\n\n\t    this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']);\n\t  },\n\n\t  // [invokeHelper]\n\t  //\n\t  // On stack, before: hash, inverse, program, params..., ...\n\t  // On stack, after: result of helper invocation\n\t  //\n\t  // Pops off the helper's parameters, invokes the helper,\n\t  // and pushes the helper's return value onto the stack.\n\t  //\n\t  // If the helper is not found, `helperMissing` is called.\n\t  invokeHelper: function invokeHelper(paramSize, name, isSimple) {\n\t    var nonHelper = this.popStack(),\n\t        helper = this.setupHelper(paramSize, name),\n\t        simple = isSimple ? [helper.name, ' || '] : '';\n\n\t    var lookup = ['('].concat(simple, nonHelper);\n\t    if (!this.options.strict) {\n\t      lookup.push(' || ', this.aliasable('helpers.helperMissing'));\n\t    }\n\t    lookup.push(')');\n\n\t    this.push(this.source.functionCall(lookup, 'call', helper.callParams));\n\t  },\n\n\t  // [invokeKnownHelper]\n\t  //\n\t  // On stack, before: hash, inverse, program, params..., ...\n\t  // On stack, after: result of helper invocation\n\t  //\n\t  // This operation is used when the helper is known to exist,\n\t  // so a `helperMissing` fallback is not required.\n\t  invokeKnownHelper: function invokeKnownHelper(paramSize, name) {\n\t    var helper = this.setupHelper(paramSize, name);\n\t    this.push(this.source.functionCall(helper.name, 'call', helper.callParams));\n\t  },\n\n\t  // [invokeAmbiguous]\n\t  //\n\t  // On stack, before: hash, inverse, program, params..., ...\n\t  // On stack, after: result of disambiguation\n\t  //\n\t  // This operation is used when an expression like `{{foo}}`\n\t  // is provided, but we don't know at compile-time whether it\n\t  // is a helper or a path.\n\t  //\n\t  // This operation emits more code than the other options,\n\t  // and can be avoided by passing the `knownHelpers` and\n\t  // `knownHelpersOnly` flags at compile-time.\n\t  invokeAmbiguous: function invokeAmbiguous(name, helperCall) {\n\t    this.useRegister('helper');\n\n\t    var nonHelper = this.popStack();\n\n\t    this.emptyHash();\n\t    var helper = this.setupHelper(0, name, helperCall);\n\n\t    var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');\n\n\t    var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')'];\n\t    if (!this.options.strict) {\n\t      lookup[0] = '(helper = ';\n\t      lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing'));\n\t    }\n\n\t    this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('\"function\"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']);\n\t  },\n\n\t  // [invokePartial]\n\t  //\n\t  // On stack, before: context, ...\n\t  // On stack after: result of partial invocation\n\t  //\n\t  // This operation pops off a context, invokes a partial with that context,\n\t  // and pushes the result of the invocation back.\n\t  invokePartial: function invokePartial(isDynamic, name, indent) {\n\t    var params = [],\n\t        options = this.setupParams(name, 1, params);\n\n\t    if (isDynamic) {\n\t      name = this.popStack();\n\t      delete options.name;\n\t    }\n\n\t    if (indent) {\n\t      options.indent = JSON.stringify(indent);\n\t    }\n\t    options.helpers = 'helpers';\n\t    options.partials = 'partials';\n\t    options.decorators = 'container.decorators';\n\n\t    if (!isDynamic) {\n\t      params.unshift(this.nameLookup('partials', name, 'partial'));\n\t    } else {\n\t      params.unshift(name);\n\t    }\n\n\t    if (this.options.compat) {\n\t      options.depths = 'depths';\n\t    }\n\t    options = this.objectLiteral(options);\n\t    params.push(options);\n\n\t    this.push(this.source.functionCall('container.invokePartial', '', params));\n\t  },\n\n\t  // [assignToHash]\n\t  //\n\t  // On stack, before: value, ..., hash, ...\n\t  // On stack, after: ..., hash, ...\n\t  //\n\t  // Pops a value off the stack and assigns it to the current hash\n\t  assignToHash: function assignToHash(key) {\n\t    var value = this.popStack(),\n\t        context = undefined,\n\t        type = undefined,\n\t        id = undefined;\n\n\t    if (this.trackIds) {\n\t      id = this.popStack();\n\t    }\n\t    if (this.stringParams) {\n\t      type = this.popStack();\n\t      context = this.popStack();\n\t    }\n\n\t    var hash = this.hash;\n\t    if (context) {\n\t      hash.contexts[key] = context;\n\t    }\n\t    if (type) {\n\t      hash.types[key] = type;\n\t    }\n\t    if (id) {\n\t      hash.ids[key] = id;\n\t    }\n\t    hash.values[key] = value;\n\t  },\n\n\t  pushId: function pushId(type, name, child) {\n\t    if (type === 'BlockParam') {\n\t      this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : ''));\n\t    } else if (type === 'PathExpression') {\n\t      this.pushString(name);\n\t    } else if (type === 'SubExpression') {\n\t      this.pushStackLiteral('true');\n\t    } else {\n\t      this.pushStackLiteral('null');\n\t    }\n\t  },\n\n\t  // HELPERS\n\n\t  compiler: JavaScriptCompiler,\n\n\t  compileChildren: function compileChildren(environment, options) {\n\t    var children = environment.children,\n\t        child = undefined,\n\t        compiler = undefined;\n\n\t    for (var i = 0, l = children.length; i < l; i++) {\n\t      child = children[i];\n\t      compiler = new this.compiler(); // eslint-disable-line new-cap\n\n\t      var index = this.matchExistingProgram(child);\n\n\t      if (index == null) {\n\t        this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children\n\t        index = this.context.programs.length;\n\t        child.index = index;\n\t        child.name = 'program' + index;\n\t        this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);\n\t        this.context.decorators[index] = compiler.decorators;\n\t        this.context.environments[index] = child;\n\n\t        this.useDepths = this.useDepths || compiler.useDepths;\n\t        this.useBlockParams = this.useBlockParams || compiler.useBlockParams;\n\t      } else {\n\t        child.index = index;\n\t        child.name = 'program' + index;\n\n\t        this.useDepths = this.useDepths || child.useDepths;\n\t        this.useBlockParams = this.useBlockParams || child.useBlockParams;\n\t      }\n\t    }\n\t  },\n\t  matchExistingProgram: function matchExistingProgram(child) {\n\t    for (var i = 0, len = this.context.environments.length; i < len; i++) {\n\t      var environment = this.context.environments[i];\n\t      if (environment && environment.equals(child)) {\n\t        return i;\n\t      }\n\t    }\n\t  },\n\n\t  programExpression: function programExpression(guid) {\n\t    var child = this.environment.children[guid],\n\t        programParams = [child.index, 'data', child.blockParams];\n\n\t    if (this.useBlockParams || this.useDepths) {\n\t      programParams.push('blockParams');\n\t    }\n\t    if (this.useDepths) {\n\t      programParams.push('depths');\n\t    }\n\n\t    return 'container.program(' + programParams.join(', ') + ')';\n\t  },\n\n\t  useRegister: function useRegister(name) {\n\t    if (!this.registers[name]) {\n\t      this.registers[name] = true;\n\t      this.registers.list.push(name);\n\t    }\n\t  },\n\n\t  push: function push(expr) {\n\t    if (!(expr instanceof Literal)) {\n\t      expr = this.source.wrap(expr);\n\t    }\n\n\t    this.inlineStack.push(expr);\n\t    return expr;\n\t  },\n\n\t  pushStackLiteral: function pushStackLiteral(item) {\n\t    this.push(new Literal(item));\n\t  },\n\n\t  pushSource: function pushSource(source) {\n\t    if (this.pendingContent) {\n\t      this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));\n\t      this.pendingContent = undefined;\n\t    }\n\n\t    if (source) {\n\t      this.source.push(source);\n\t    }\n\t  },\n\n\t  replaceStack: function replaceStack(callback) {\n\t    var prefix = ['('],\n\t        stack = undefined,\n\t        createdStack = undefined,\n\t        usedLiteral = undefined;\n\n\t    /* istanbul ignore next */\n\t    if (!this.isInline()) {\n\t      throw new _exception2['default']('replaceStack on non-inline');\n\t    }\n\n\t    // We want to merge the inline statement into the replacement statement via ','\n\t    var top = this.popStack(true);\n\n\t    if (top instanceof Literal) {\n\t      // Literals do not need to be inlined\n\t      stack = [top.value];\n\t      prefix = ['(', stack];\n\t      usedLiteral = true;\n\t    } else {\n\t      // Get or create the current stack name for use by the inline\n\t      createdStack = true;\n\t      var _name = this.incrStack();\n\n\t      prefix = ['((', this.push(_name), ' = ', top, ')'];\n\t      stack = this.topStack();\n\t    }\n\n\t    var item = callback.call(this, stack);\n\n\t    if (!usedLiteral) {\n\t      this.popStack();\n\t    }\n\t    if (createdStack) {\n\t      this.stackSlot--;\n\t    }\n\t    this.push(prefix.concat(item, ')'));\n\t  },\n\n\t  incrStack: function incrStack() {\n\t    this.stackSlot++;\n\t    if (this.stackSlot > this.stackVars.length) {\n\t      this.stackVars.push('stack' + this.stackSlot);\n\t    }\n\t    return this.topStackName();\n\t  },\n\t  topStackName: function topStackName() {\n\t    return 'stack' + this.stackSlot;\n\t  },\n\t  flushInline: function flushInline() {\n\t    var inlineStack = this.inlineStack;\n\t    this.inlineStack = [];\n\t    for (var i = 0, len = inlineStack.length; i < len; i++) {\n\t      var entry = inlineStack[i];\n\t      /* istanbul ignore if */\n\t      if (entry instanceof Literal) {\n\t        this.compileStack.push(entry);\n\t      } else {\n\t        var stack = this.incrStack();\n\t        this.pushSource([stack, ' = ', entry, ';']);\n\t        this.compileStack.push(stack);\n\t      }\n\t    }\n\t  },\n\t  isInline: function isInline() {\n\t    return this.inlineStack.length;\n\t  },\n\n\t  popStack: function popStack(wrapped) {\n\t    var inline = this.isInline(),\n\t        item = (inline ? this.inlineStack : this.compileStack).pop();\n\n\t    if (!wrapped && item instanceof Literal) {\n\t      return item.value;\n\t    } else {\n\t      if (!inline) {\n\t        /* istanbul ignore next */\n\t        if (!this.stackSlot) {\n\t          throw new _exception2['default']('Invalid stack pop');\n\t        }\n\t        this.stackSlot--;\n\t      }\n\t      return item;\n\t    }\n\t  },\n\n\t  topStack: function topStack() {\n\t    var stack = this.isInline() ? this.inlineStack : this.compileStack,\n\t        item = stack[stack.length - 1];\n\n\t    /* istanbul ignore if */\n\t    if (item instanceof Literal) {\n\t      return item.value;\n\t    } else {\n\t      return item;\n\t    }\n\t  },\n\n\t  contextName: function contextName(context) {\n\t    if (this.useDepths && context) {\n\t      return 'depths[' + context + ']';\n\t    } else {\n\t      return 'depth' + context;\n\t    }\n\t  },\n\n\t  quotedString: function quotedString(str) {\n\t    return this.source.quotedString(str);\n\t  },\n\n\t  objectLiteral: function objectLiteral(obj) {\n\t    return this.source.objectLiteral(obj);\n\t  },\n\n\t  aliasable: function aliasable(name) {\n\t    var ret = this.aliases[name];\n\t    if (ret) {\n\t      ret.referenceCount++;\n\t      return ret;\n\t    }\n\n\t    ret = this.aliases[name] = this.source.wrap(name);\n\t    ret.aliasable = true;\n\t    ret.referenceCount = 1;\n\n\t    return ret;\n\t  },\n\n\t  setupHelper: function setupHelper(paramSize, name, blockHelper) {\n\t    var params = [],\n\t        paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);\n\t    var foundHelper = this.nameLookup('helpers', name, 'helper'),\n\t        callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : {}');\n\n\t    return {\n\t      params: params,\n\t      paramsInit: paramsInit,\n\t      name: foundHelper,\n\t      callParams: [callContext].concat(params)\n\t    };\n\t  },\n\n\t  setupParams: function setupParams(helper, paramSize, params) {\n\t    var options = {},\n\t        contexts = [],\n\t        types = [],\n\t        ids = [],\n\t        objectArgs = !params,\n\t        param = undefined;\n\n\t    if (objectArgs) {\n\t      params = [];\n\t    }\n\n\t    options.name = this.quotedString(helper);\n\t    options.hash = this.popStack();\n\n\t    if (this.trackIds) {\n\t      options.hashIds = this.popStack();\n\t    }\n\t    if (this.stringParams) {\n\t      options.hashTypes = this.popStack();\n\t      options.hashContexts = this.popStack();\n\t    }\n\n\t    var inverse = this.popStack(),\n\t        program = this.popStack();\n\n\t    // Avoid setting fn and inverse if neither are set. This allows\n\t    // helpers to do a check for `if (options.fn)`\n\t    if (program || inverse) {\n\t      options.fn = program || 'container.noop';\n\t      options.inverse = inverse || 'container.noop';\n\t    }\n\n\t    // The parameters go on to the stack in order (making sure that they are evaluated in order)\n\t    // so we need to pop them off the stack in reverse order\n\t    var i = paramSize;\n\t    while (i--) {\n\t      param = this.popStack();\n\t      params[i] = param;\n\n\t      if (this.trackIds) {\n\t        ids[i] = this.popStack();\n\t      }\n\t      if (this.stringParams) {\n\t        types[i] = this.popStack();\n\t        contexts[i] = this.popStack();\n\t      }\n\t    }\n\n\t    if (objectArgs) {\n\t      options.args = this.source.generateArray(params);\n\t    }\n\n\t    if (this.trackIds) {\n\t      options.ids = this.source.generateArray(ids);\n\t    }\n\t    if (this.stringParams) {\n\t      options.types = this.source.generateArray(types);\n\t      options.contexts = this.source.generateArray(contexts);\n\t    }\n\n\t    if (this.options.data) {\n\t      options.data = 'data';\n\t    }\n\t    if (this.useBlockParams) {\n\t      options.blockParams = 'blockParams';\n\t    }\n\t    return options;\n\t  },\n\n\t  setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {\n\t    var options = this.setupParams(helper, paramSize, params);\n\t    options = this.objectLiteral(options);\n\t    if (useRegister) {\n\t      this.useRegister('options');\n\t      params.push('options');\n\t      return ['options=', options];\n\t    } else if (params) {\n\t      params.push(options);\n\t      return '';\n\t    } else {\n\t      return options;\n\t    }\n\t  }\n\t};\n\n\t(function () {\n\t  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(' ');\n\n\t  var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};\n\n\t  for (var i = 0, l = reservedWords.length; i < l; i++) {\n\t    compilerWords[reservedWords[i]] = true;\n\t  }\n\t})();\n\n\tJavaScriptCompiler.isValidJavaScriptVariableName = function (name) {\n\t  return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);\n\t};\n\n\tfunction strictLookup(requireTerminal, compiler, parts, type) {\n\t  var stack = compiler.popStack(),\n\t      i = 0,\n\t      len = parts.length;\n\t  if (requireTerminal) {\n\t    len--;\n\t  }\n\n\t  for (; i < len; i++) {\n\t    stack = compiler.nameLookup(stack, parts[i], type);\n\t  }\n\n\t  if (requireTerminal) {\n\t    return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')'];\n\t  } else {\n\t    return stack;\n\t  }\n\t}\n\n\texports['default'] = JavaScriptCompiler;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 29 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* global define */\n\t'use strict';\n\n\texports.__esModule = true;\n\n\tvar _utils = __webpack_require__(5);\n\n\tvar SourceNode = undefined;\n\n\ttry {\n\t  /* istanbul ignore next */\n\t  if (false) {\n\t    // We don't support this in AMD environments. For these environments, we asusme that\n\t    // they are running on the browser and thus have no need for the source-map library.\n\t    var SourceMap = require('source-map');\n\t    SourceNode = SourceMap.SourceNode;\n\t  }\n\t} catch (err) {}\n\t/* NOP */\n\n\t/* istanbul ignore if: tested but not covered in istanbul due to dist build  */\n\tif (!SourceNode) {\n\t  SourceNode = function (line, column, srcFile, chunks) {\n\t    this.src = '';\n\t    if (chunks) {\n\t      this.add(chunks);\n\t    }\n\t  };\n\t  /* istanbul ignore next */\n\t  SourceNode.prototype = {\n\t    add: function add(chunks) {\n\t      if (_utils.isArray(chunks)) {\n\t        chunks = chunks.join('');\n\t      }\n\t      this.src += chunks;\n\t    },\n\t    prepend: function prepend(chunks) {\n\t      if (_utils.isArray(chunks)) {\n\t        chunks = chunks.join('');\n\t      }\n\t      this.src = chunks + this.src;\n\t    },\n\t    toStringWithSourceMap: function toStringWithSourceMap() {\n\t      return { code: this.toString() };\n\t    },\n\t    toString: function toString() {\n\t      return this.src;\n\t    }\n\t  };\n\t}\n\n\tfunction castChunk(chunk, codeGen, loc) {\n\t  if (_utils.isArray(chunk)) {\n\t    var ret = [];\n\n\t    for (var i = 0, len = chunk.length; i < len; i++) {\n\t      ret.push(codeGen.wrap(chunk[i], loc));\n\t    }\n\t    return ret;\n\t  } else if (typeof chunk === 'boolean' || typeof chunk === 'number') {\n\t    // Handle primitives that the SourceNode will throw up on\n\t    return chunk + '';\n\t  }\n\t  return chunk;\n\t}\n\n\tfunction CodeGen(srcFile) {\n\t  this.srcFile = srcFile;\n\t  this.source = [];\n\t}\n\n\tCodeGen.prototype = {\n\t  isEmpty: function isEmpty() {\n\t    return !this.source.length;\n\t  },\n\t  prepend: function prepend(source, loc) {\n\t    this.source.unshift(this.wrap(source, loc));\n\t  },\n\t  push: function push(source, loc) {\n\t    this.source.push(this.wrap(source, loc));\n\t  },\n\n\t  merge: function merge() {\n\t    var source = this.empty();\n\t    this.each(function (line) {\n\t      source.add(['  ', line, '\\n']);\n\t    });\n\t    return source;\n\t  },\n\n\t  each: function each(iter) {\n\t    for (var i = 0, len = this.source.length; i < len; i++) {\n\t      iter(this.source[i]);\n\t    }\n\t  },\n\n\t  empty: function empty() {\n\t    var loc = this.currentLocation || { start: {} };\n\t    return new SourceNode(loc.start.line, loc.start.column, this.srcFile);\n\t  },\n\t  wrap: function wrap(chunk) {\n\t    var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1];\n\n\t    if (chunk instanceof SourceNode) {\n\t      return chunk;\n\t    }\n\n\t    chunk = castChunk(chunk, this, loc);\n\n\t    return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);\n\t  },\n\n\t  functionCall: function functionCall(fn, type, params) {\n\t    params = this.generateList(params);\n\t    return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);\n\t  },\n\n\t  quotedString: function quotedString(str) {\n\t    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\n\t    .replace(/\\u2029/g, '\\\\u2029') + '\"';\n\t  },\n\n\t  objectLiteral: function objectLiteral(obj) {\n\t    var pairs = [];\n\n\t    for (var key in obj) {\n\t      if (obj.hasOwnProperty(key)) {\n\t        var value = castChunk(obj[key], this);\n\t        if (value !== 'undefined') {\n\t          pairs.push([this.quotedString(key), ':', value]);\n\t        }\n\t      }\n\t    }\n\n\t    var ret = this.generateList(pairs);\n\t    ret.prepend('{');\n\t    ret.add('}');\n\t    return ret;\n\t  },\n\n\t  generateList: function generateList(entries) {\n\t    var ret = this.empty();\n\n\t    for (var i = 0, len = entries.length; i < len; i++) {\n\t      if (i) {\n\t        ret.add(',');\n\t      }\n\n\t      ret.add(castChunk(entries[i], this));\n\t    }\n\n\t    return ret;\n\t  },\n\n\t  generateArray: function generateArray(entries) {\n\t    var ret = this.generateList(entries);\n\t    ret.prepend('[');\n\t    ret.add(']');\n\n\t    return ret;\n\t  }\n\t};\n\n\texports['default'] = CodeGen;\n\tmodule.exports = exports['default'];\n\n/***/ }\n/******/ ])\n});\n;"
  },
  {
    "path": "example/web-test-speed/js/highcharts.js",
    "content": "/*\n Highcharts JS v5.0.10 (2017-03-31)\n\n (c) 2009-2016 Torstein Honsi\n\n License: www.highcharts.com/license\n*/\n(function(L,a){\"object\"===typeof module&&module.exports?module.exports=L.document?a(L):a:L.Highcharts=a(L)})(\"undefined\"!==typeof window?window:this,function(L){L=function(){var a=window,B=a.document,A=a.navigator&&a.navigator.userAgent||\"\",H=B&&B.createElementNS&&!!B.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\").createSVGRect,G=/(edge|msie|trident)/i.test(A)&&!window.opera,r=!H,f=/Firefox/.test(A),l=f&&4>parseInt(A.split(\"Firefox/\")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:\"Highcharts\",\nversion:\"5.0.10\",deg2rad:2*Math.PI/360,doc:B,hasBidiBug:l,hasTouch:B&&void 0!==B.documentElement.ontouchstart,isMS:G,isWebKit:/AppleWebKit/.test(A),isFirefox:f,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(A),SVG_NS:\"http://www.w3.org/2000/svg\",chartCount:0,seriesTypes:{},symbolSizes:{},svg:H,vml:r,win:a,charts:[],marginNames:[\"plotTop\",\"marginRight\",\"marginBottom\",\"plotLeft\"],noop:function(){}}}();(function(a){var B=[],A=a.charts,H=a.doc,G=a.win;a.error=function(r,f){r=a.isNumber(r)?\"Highcharts error #\"+\nr+\": www.highcharts.com/errors/\"+r:r;if(f)throw Error(r);G.console&&console.log(r)};a.Fx=function(a,f,l){this.options=f;this.elem=a;this.prop=l};a.Fx.prototype={dSetter:function(){var a=this.paths[0],f=this.paths[1],l=[],q=this.now,k=a.length,u;if(1===q)l=this.toD;else if(k===f.length&&1>q)for(;k--;)u=parseFloat(a[k]),l[k]=isNaN(u)?a[k]:q*parseFloat(f[k]-u)+u;else l=f;this.elem.attr(\"d\",l,null,!0)},update:function(){var a=this.elem,f=this.prop,l=this.now,q=this.options.step;if(this[f+\"Setter\"])this[f+\n\"Setter\"]();else a.attr?a.element&&a.attr(f,l,null,!0):a.style[f]=l+this.unit;q&&q.call(a,l,this)},run:function(a,f,l){var r=this,k=function(a){return k.stopped?!1:r.step(a)},u;this.startTime=+new Date;this.start=a;this.end=f;this.unit=l;this.now=this.start;this.pos=0;k.elem=this.elem;k.prop=this.prop;k()&&1===B.push(k)&&(k.timerId=setInterval(function(){for(u=0;u<B.length;u++)B[u]()||B.splice(u--,1);B.length||clearInterval(k.timerId)},13))},step:function(a){var f=+new Date,r,q=this.options;r=this.elem;\nvar k=q.complete,u=q.duration,d=q.curAnim,c;if(r.attr&&!r.element)r=!1;else if(a||f>=u+this.startTime){this.now=this.end;this.pos=1;this.update();a=d[this.prop]=!0;for(c in d)!0!==d[c]&&(a=!1);a&&k&&k.call(r);r=!1}else this.pos=q.easing((f-this.startTime)/u),this.now=this.start+(this.end-this.start)*this.pos,this.update(),r=!0;return r},initPath:function(r,f,l){function q(a){var b,e;for(t=a.length;t--;)b=\"M\"===a[t]||\"L\"===a[t],e=/[a-zA-Z]/.test(a[t+3]),b&&e&&a.splice(t+1,0,a[t+1],a[t+2],a[t+1],a[t+\n2])}function k(a,e){for(;a.length<p;){a[0]=e[p-a.length];var h=a.slice(0,b);[].splice.apply(a,[0,0].concat(h));D&&(h=a.slice(a.length-b),[].splice.apply(a,[a.length,0].concat(h)),t--)}a[0]=\"M\"}function u(a,e){for(var c=(p-a.length)/b;0<c&&c--;)h=a.slice().splice(a.length/w-b,b*w),h[0]=e[p-b-c*b],z&&(h[b-6]=h[b-2],h[b-5]=h[b-1]),[].splice.apply(a,[a.length/w,0].concat(h)),D&&c--}f=f||\"\";var d,c=r.startX,n=r.endX,z=-1<f.indexOf(\"C\"),b=z?7:3,p,h,t;f=f.split(\" \");l=l.slice();var D=r.isArea,w=D?2:1,e;\nz&&(q(f),q(l));if(c&&n){for(t=0;t<c.length;t++)if(c[t]===n[0]){d=t;break}else if(c[0]===n[n.length-c.length+t]){d=t;e=!0;break}void 0===d&&(f=[])}f.length&&a.isNumber(d)&&(p=l.length+d*w*b,e?(k(f,l),u(l,f)):(k(l,f),u(f,l)));return[f,l]}};a.extend=function(a,f){var r;a||(a={});for(r in f)a[r]=f[r];return a};a.merge=function(){var r,f=arguments,l,q={},k=function(u,d){var c,n;\"object\"!==typeof u&&(u={});for(n in d)d.hasOwnProperty(n)&&(c=d[n],a.isObject(c,!0)&&\"renderTo\"!==n&&\"number\"!==typeof c.nodeType?\nu[n]=k(u[n]||{},c):u[n]=d[n]);return u};!0===f[0]&&(q=f[1],f=Array.prototype.slice.call(f,2));l=f.length;for(r=0;r<l;r++)q=k(q,f[r]);return q};a.pInt=function(a,f){return parseInt(a,f||10)};a.isString=function(a){return\"string\"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return\"[object Array]\"===a||\"[object Array Iterator]\"===a};a.isObject=function(r,f){return r&&\"object\"===typeof r&&(!f||!a.isArray(r))};a.isNumber=function(a){return\"number\"===typeof a&&!isNaN(a)};a.erase=\nfunction(a,f){for(var r=a.length;r--;)if(a[r]===f){a.splice(r,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(r,f,l){var q,k;if(a.isString(f))a.defined(l)?r.setAttribute(f,l):r&&r.getAttribute&&(k=r.getAttribute(f));else if(a.defined(f)&&a.isObject(f))for(q in f)r.setAttribute(q,f[q]);return k};a.splat=function(r){return a.isArray(r)?r:[r]};a.syncTimeout=function(a,f,l){if(f)return setTimeout(a,f,l);a.call(0,l)};a.pick=function(){var a=arguments,f,l,q=a.length;for(f=\n0;f<q;f++)if(l=a[f],void 0!==l&&null!==l)return l};a.css=function(r,f){a.isMS&&!a.svg&&f&&void 0!==f.opacity&&(f.filter=\"alpha(opacity\\x3d\"+100*f.opacity+\")\");a.extend(r.style,f)};a.createElement=function(r,f,l,q,k){r=H.createElement(r);var u=a.css;f&&a.extend(r,f);k&&u(r,{padding:0,border:\"none\",margin:0});l&&u(r,l);q&&q.appendChild(r);return r};a.extendClass=function(r,f){var l=function(){};l.prototype=new r;a.extend(l.prototype,f);return l};a.pad=function(a,f,l){return Array((f||2)+1-String(a).length).join(l||\n0)+a};a.relativeLength=function(a,f){return/%$/.test(a)?f*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,f,l){var q=a[f];a[f]=function(){var a=Array.prototype.slice.call(arguments),u=arguments,d=this;d.proceed=function(){q.apply(d,arguments.length?arguments:u)};a.unshift(q);a=l.apply(this,a);d.proceed=null;return a}};a.getTZOffset=function(r){var f=a.Date;return 6E4*(f.hcGetTimezoneOffset&&f.hcGetTimezoneOffset(r)||f.hcTimezoneOffset||0)};a.dateFormat=function(r,f,l){if(!a.defined(f)||isNaN(f))return a.defaultOptions.lang.invalidDate||\n\"\";r=a.pick(r,\"%Y-%m-%d %H:%M:%S\");var q=a.Date,k=new q(f-a.getTZOffset(f)),u,d=k[q.hcGetHours](),c=k[q.hcGetDay](),n=k[q.hcGetDate](),z=k[q.hcGetMonth](),b=k[q.hcGetFullYear](),p=a.defaultOptions.lang,h=p.weekdays,t=p.shortWeekdays,D=a.pad,q=a.extend({a:t?t[c]:h[c].substr(0,3),A:h[c],d:D(n),e:D(n,2,\" \"),w:c,b:p.shortMonths[z],B:p.months[z],m:D(z+1),y:b.toString().substr(2,2),Y:b,H:D(d),k:d,I:D(d%12||12),l:d%12||12,M:D(k[q.hcGetMinutes]()),p:12>d?\"AM\":\"PM\",P:12>d?\"am\":\"pm\",S:D(k.getSeconds()),L:D(Math.round(f%\n1E3),3)},a.dateFormats);for(u in q)for(;-1!==r.indexOf(\"%\"+u);)r=r.replace(\"%\"+u,\"function\"===typeof q[u]?q[u](f):q[u]);return l?r.substr(0,1).toUpperCase()+r.substr(1):r};a.formatSingle=function(r,f){var l=/\\.([0-9])/,q=a.defaultOptions.lang;/f$/.test(r)?(l=(l=r.match(l))?l[1]:-1,null!==f&&(f=a.numberFormat(f,l,q.decimalPoint,-1<r.indexOf(\",\")?q.thousandsSep:\"\"))):f=a.dateFormat(r,f);return f};a.format=function(r,f){for(var l=\"{\",q=!1,k,u,d,c,n=[],z;r;){l=r.indexOf(l);if(-1===l)break;k=r.slice(0,\nl);if(q){k=k.split(\":\");u=k.shift().split(\".\");c=u.length;z=f;for(d=0;d<c;d++)z=z[u[d]];k.length&&(z=a.formatSingle(k.join(\":\"),z));n.push(z)}else n.push(k);r=r.slice(l+1);l=(q=!q)?\"}\":\"{\"}n.push(r);return n.join(\"\")};a.getMagnitude=function(a){return Math.pow(10,Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(r,f,l,q,k){var u,d=r;l=a.pick(l,1);u=r/l;f||(f=k?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===q&&(1===l?f=a.grep(f,function(a){return 0===a%1}):.1>=l&&(f=[1/l])));\nfor(q=0;q<f.length&&!(d=f[q],k&&d*l>=r||!k&&u<=(f[q]+(f[q+1]||f[q]))/2);q++);return d=a.correctFloat(d*l,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,f){var l=a.length,q,k;for(k=0;k<l;k++)a[k].safeI=k;a.sort(function(a,d){q=f(a,d);return 0===q?a.safeI-d.safeI:q});for(k=0;k<l;k++)delete a[k].safeI};a.arrayMin=function(a){for(var f=a.length,l=a[0];f--;)a[f]<l&&(l=a[f]);return l};a.arrayMax=function(a){for(var f=a.length,l=a[0];f--;)a[f]>l&&(l=a[f]);return l};a.destroyObjectProperties=\nfunction(a,f){for(var l in a)a[l]&&a[l]!==f&&a[l].destroy&&a[l].destroy(),delete a[l]};a.discardElement=function(r){var f=a.garbageBin;f||(f=a.createElement(\"div\"));r&&f.appendChild(r);f.innerHTML=\"\"};a.correctFloat=function(a,f){return parseFloat(a.toPrecision(f||14))};a.setAnimation=function(r,f){f.renderer.globalAnimation=a.pick(r,f.options.chart.animation,!0)};a.animObject=function(r){return a.isObject(r)?a.merge(r):{duration:r?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,\nday:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(r,f,l,q){r=+r||0;f=+f;var k=a.defaultOptions.lang,u=(r.toString().split(\".\")[1]||\"\").length,d,c;-1===f?f=Math.min(u,20):a.isNumber(f)||(f=2);c=(Math.abs(r)+Math.pow(10,-Math.max(f,u)-1)).toFixed(f);u=String(a.pInt(c));d=3<u.length?u.length%3:0;l=a.pick(l,k.decimalPoint);q=a.pick(q,k.thousandsSep);r=(0>r?\"-\":\"\")+(d?u.substr(0,d)+q:\"\");r+=u.substr(d).replace(/(\\d{3})(?=\\d)/g,\"$1\"+q);f&&(r+=l+c.slice(-f));return r};Math.easeInOutSine=\nfunction(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(r,f){return\"width\"===f?Math.min(r.offsetWidth,r.scrollWidth)-a.getStyle(r,\"padding-left\")-a.getStyle(r,\"padding-right\"):\"height\"===f?Math.min(r.offsetHeight,r.scrollHeight)-a.getStyle(r,\"padding-top\")-a.getStyle(r,\"padding-bottom\"):(r=G.getComputedStyle(r,void 0))&&a.pInt(r.getPropertyValue(f))};a.inArray=function(a,f){return f.indexOf?f.indexOf(a):[].indexOf.call(f,a)};a.grep=function(a,f){return[].filter.call(a,f)};a.find=function(a,\nf){return[].find.call(a,f)};a.map=function(a,f){for(var l=[],q=0,k=a.length;q<k;q++)l[q]=f.call(a[q],a[q],q,a);return l};a.offset=function(a){var f=H.documentElement;a=a.getBoundingClientRect();return{top:a.top+(G.pageYOffset||f.scrollTop)-(f.clientTop||0),left:a.left+(G.pageXOffset||f.scrollLeft)-(f.clientLeft||0)}};a.stop=function(a,f){for(var l=B.length;l--;)B[l].elem!==a||f&&f!==B[l].prop||(B[l].stopped=!0)};a.each=function(a,f,l){return Array.prototype.forEach.call(a,f,l)};a.addEvent=function(r,\nf,l){function q(a){a.target=a.srcElement||G;l.call(r,a)}var k=r.hcEvents=r.hcEvents||{};r.addEventListener?r.addEventListener(f,l,!1):r.attachEvent&&(r.hcEventsIE||(r.hcEventsIE={}),r.hcEventsIE[l.toString()]=q,r.attachEvent(\"on\"+f,q));k[f]||(k[f]=[]);k[f].push(l);return function(){a.removeEvent(r,f,l)}};a.removeEvent=function(r,f,l){function q(a,c){r.removeEventListener?r.removeEventListener(a,c,!1):r.attachEvent&&(c=r.hcEventsIE[c.toString()],r.detachEvent(\"on\"+a,c))}function k(){var a,c;if(r.nodeName)for(c in f?\n(a={},a[f]=!0):a=d,a)if(d[c])for(a=d[c].length;a--;)q(c,d[c][a])}var u,d=r.hcEvents,c;d&&(f?(u=d[f]||[],l?(c=a.inArray(l,u),-1<c&&(u.splice(c,1),d[f]=u),q(f,l)):(k(),d[f]=[])):(k(),r.hcEvents={}))};a.fireEvent=function(r,f,l,q){var k;k=r.hcEvents;var u,d;l=l||{};if(H.createEvent&&(r.dispatchEvent||r.fireEvent))k=H.createEvent(\"Events\"),k.initEvent(f,!0,!0),a.extend(k,l),r.dispatchEvent?r.dispatchEvent(k):r.fireEvent(f,k);else if(k)for(k=k[f]||[],u=k.length,l.target||a.extend(l,{preventDefault:function(){l.defaultPrevented=\n!0},target:r,type:f}),f=0;f<u;f++)(d=k[f])&&!1===d.call(r,l)&&l.preventDefault();q&&!l.defaultPrevented&&q(l)};a.animate=function(r,f,l){var q,k=\"\",u,d,c;a.isObject(l)||(q=arguments,l={duration:q[2],easing:q[3],complete:q[4]});a.isNumber(l.duration)||(l.duration=400);l.easing=\"function\"===typeof l.easing?l.easing:Math[l.easing]||Math.easeInOutSine;l.curAnim=a.merge(f);for(c in f)a.stop(r,c),d=new a.Fx(r,l,c),u=null,\"d\"===c?(d.paths=d.initPath(r,r.d,f.d),d.toD=f.d,q=0,u=1):r.attr?q=r.attr(c):(q=parseFloat(a.getStyle(r,\nc))||0,\"opacity\"!==c&&(k=\"px\")),u||(u=f[c]),u&&u.match&&u.match(\"px\")&&(u=u.replace(/px/g,\"\")),d.run(q,u,k)};a.seriesType=function(r,f,l,q,k){var u=a.getOptions(),d=a.seriesTypes;u.plotOptions[r]=a.merge(u.plotOptions[f],l);d[r]=a.extendClass(d[f]||function(){},q);d[r].prototype.type=r;k&&(d[r].prototype.pointClass=a.extendClass(a.Point,k));return d[r]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),f=0;return function(){return\"highcharts-\"+a+\"-\"+f++}}();G.jQuery&&(G.jQuery.fn.highcharts=\nfunction(){var r=[].slice.call(arguments);if(this[0])return r[0]?(new (a[a.isString(r[0])?r.shift():\"Chart\"])(this[0],r[0],r[1]),this):A[a.attr(this[0],\"data-highcharts-chart\")]});H&&!H.defaultView&&(a.getStyle=function(r,f){var l={width:\"clientWidth\",height:\"clientHeight\"}[f];if(r.style[f])return a.pInt(r.style[f]);\"opacity\"===f&&(f=\"filter\");if(l)return r.style.zoom=1,Math.max(r[l]-2*a.getStyle(r,\"padding\"),0);r=r.currentStyle[f.replace(/\\-(\\w)/g,function(a,k){return k.toUpperCase()})];\"filter\"===\nf&&(r=r.replace(/alpha\\(opacity=([0-9]+)\\)/,function(a,k){return k/100}));return\"\"===r?1:a.pInt(r)});Array.prototype.forEach||(a.each=function(a,f,l){for(var q=0,k=a.length;q<k;q++)if(!1===f.call(l,a[q],q,a))return q});Array.prototype.indexOf||(a.inArray=function(a,f){var l,q=0;if(f)for(l=f.length;q<l;q++)if(f[q]===a)return q;return-1});Array.prototype.filter||(a.grep=function(a,f){for(var l=[],q=0,k=a.length;q<k;q++)f(a[q],q)&&l.push(a[q]);return l});Array.prototype.find||(a.find=function(a,f){var l,\nq=a.length;for(l=0;l<q;l++)if(f(a[l],l))return a[l]})})(L);(function(a){var B=a.each,A=a.isNumber,H=a.map,G=a.merge,r=a.pInt;a.Color=function(f){if(!(this instanceof a.Color))return new a.Color(f);this.init(f)};a.Color.prototype={parsers:[{regex:/rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]?(?:\\.[0-9]+)?)\\s*\\)/,parse:function(a){return[r(a[1]),r(a[2]),r(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/,parse:function(a){return[r(a[1]),\nr(a[2]),r(a[3]),1]}}],names:{white:\"#ffffff\",black:\"#000000\"},init:function(f){var l,q,k,u;if((this.input=f=this.names[f&&f.toLowerCase?f.toLowerCase():\"\"]||f)&&f.stops)this.stops=H(f.stops,function(d){return new a.Color(d[1])});else if(f&&\"#\"===f[0]&&(l=f.length,f=parseInt(f.substr(1),16),7===l?q=[(f&16711680)>>16,(f&65280)>>8,f&255,1]:4===l&&(q=[(f&3840)>>4|(f&3840)>>8,(f&240)>>4|f&240,(f&15)<<4|f&15,1])),!q)for(k=this.parsers.length;k--&&!q;)u=this.parsers[k],(l=u.regex.exec(f))&&(q=u.parse(l));\nthis.rgba=q||[]},get:function(a){var f=this.input,q=this.rgba,k;this.stops?(k=G(f),k.stops=[].concat(k.stops),B(this.stops,function(u,d){k.stops[d]=[k.stops[d][0],u.get(a)]})):k=q&&A(q[0])?\"rgb\"===a||!a&&1===q[3]?\"rgb(\"+q[0]+\",\"+q[1]+\",\"+q[2]+\")\":\"a\"===a?q[3]:\"rgba(\"+q.join(\",\")+\")\":f;return k},brighten:function(a){var f,q=this.rgba;if(this.stops)B(this.stops,function(k){k.brighten(a)});else if(A(a)&&0!==a)for(f=0;3>f;f++)q[f]+=r(255*a),0>q[f]&&(q[f]=0),255<q[f]&&(q[f]=255);return this},setOpacity:function(a){this.rgba[3]=\na;return this}};a.color=function(f){return new a.Color(f)}})(L);(function(a){var B,A,H=a.addEvent,G=a.animate,r=a.attr,f=a.charts,l=a.color,q=a.css,k=a.createElement,u=a.defined,d=a.deg2rad,c=a.destroyObjectProperties,n=a.doc,z=a.each,b=a.extend,p=a.erase,h=a.grep,t=a.hasTouch,D=a.inArray,w=a.isArray,e=a.isFirefox,x=a.isMS,C=a.isObject,E=a.isString,m=a.isWebKit,y=a.merge,I=a.noop,K=a.pick,J=a.pInt,g=a.removeEvent,F=a.stop,Q=a.svg,N=a.SVG_NS,P=a.symbolSizes,O=a.win;B=a.SVGElement=function(){return this};\nB.prototype={opacity:1,SVG_NS:N,textProps:\"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline\".split(\" \"),init:function(a,g){this.element=\"span\"===g?k(g):n.createElementNS(this.SVG_NS,g);this.renderer=a},animate:function(v,g,b){g=a.animObject(K(g,this.renderer.globalAnimation,!0));0!==g.duration?(b&&(g.complete=b),G(this,v,g)):(this.attr(v,null,b),g.step&&g.step.call(this));return this},colorGradient:function(v,g,b){var e=this.renderer,\nh,c,m,M,F,x,d,C,t,p,n,k=[],R;v.radialGradient?c=\"radialGradient\":v.linearGradient&&(c=\"linearGradient\");if(c){m=v[c];F=e.gradients;d=v.stops;p=b.radialReference;w(m)&&(v[c]=m={x1:m[0],y1:m[1],x2:m[2],y2:m[3],gradientUnits:\"userSpaceOnUse\"});\"radialGradient\"===c&&p&&!u(m.gradientUnits)&&(M=m,m=y(m,e.getRadialAttr(p,M),{gradientUnits:\"userSpaceOnUse\"}));for(n in m)\"id\"!==n&&k.push(n,m[n]);for(n in d)k.push(d[n]);k=k.join(\",\");F[k]?p=F[k].attr(\"id\"):(m.id=p=a.uniqueKey(),F[k]=x=e.createElement(c).attr(m).add(e.defs),\nx.radAttr=M,x.stops=[],z(d,function(v){0===v[1].indexOf(\"rgba\")?(h=a.color(v[1]),C=h.get(\"rgb\"),t=h.get(\"a\")):(C=v[1],t=1);v=e.createElement(\"stop\").attr({offset:v[0],\"stop-color\":C,\"stop-opacity\":t}).add(x);x.stops.push(v)}));R=\"url(\"+e.url+\"#\"+p+\")\";b.setAttribute(g,R);b.gradient=k;v.toString=function(){return R}}},applyTextOutline:function(v){var g=this.element,b,e,c,h,m;-1!==v.indexOf(\"contrast\")&&(v=v.replace(/contrast/g,this.renderer.getContrast(g.style.fill)));v=v.split(\" \");e=v[v.length-1];\nif((c=v[0])&&\"none\"!==c&&a.svg){this.fakeTS=!0;v=[].slice.call(g.getElementsByTagName(\"tspan\"));this.ySetter=this.xSetter;c=c.replace(/(^[\\d\\.]+)(.*?)$/g,function(a,v,g){return 2*v+g});for(m=v.length;m--;)b=v[m],\"highcharts-text-outline\"===b.getAttribute(\"class\")&&p(v,g.removeChild(b));h=g.firstChild;z(v,function(a,v){0===v&&(a.setAttribute(\"x\",g.getAttribute(\"x\")),v=g.getAttribute(\"y\"),a.setAttribute(\"y\",v||0),null===v&&g.setAttribute(\"y\",0));a=a.cloneNode(1);r(a,{\"class\":\"highcharts-text-outline\",\nfill:e,stroke:e,\"stroke-width\":c,\"stroke-linejoin\":\"round\"});g.insertBefore(a,h)})}},attr:function(a,g,b,e){var v,c=this.element,h,m=this,M;\"string\"===typeof a&&void 0!==g&&(v=a,a={},a[v]=g);if(\"string\"===typeof a)m=(this[a+\"Getter\"]||this._defaultGetter).call(this,a,c);else{for(v in a)g=a[v],M=!1,e||F(this,v),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(v)&&(h||(this.symbolAttr(a),h=!0),M=!0),!this.rotation||\"x\"!==v&&\"y\"!==v||(this.doTransform=!0),M||(M=this[v+\n\"Setter\"]||this._defaultSetter,M.call(this,g,v,c),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(v)&&this.updateShadows(v,g,M));this.doTransform&&(this.updateTransform(),this.doTransform=!1)}b&&b();return m},updateShadows:function(a,g,b){for(var v=this.shadows,e=v.length;e--;)b.call(v[e],\"height\"===a?Math.max(g-(v[e].cutHeight||0),0):\"d\"===a?this.d:g,a,v[e])},addClass:function(a,g){var v=this.attr(\"class\")||\"\";-1===v.indexOf(a)&&(g||(a=(v+(v?\" \":\"\")+a).replace(\"  \",\" \")),\nthis.attr(\"class\",a));return this},hasClass:function(a){return-1!==r(this.element,\"class\").indexOf(a)},removeClass:function(a){r(this.element,\"class\",(r(this.element,\"class\")||\"\").replace(a,\"\"));return this},symbolAttr:function(a){var v=this;z(\"x y r start end width height innerR anchorX anchorY\".split(\" \"),function(g){v[g]=K(a[g],v[g])});v.attr({d:v.renderer.symbols[v.symbolName](v.x,v.y,v.width,v.height,v)})},clip:function(a){return this.attr(\"clip-path\",a?\"url(\"+this.renderer.url+\"#\"+a.id+\")\":\n\"none\")},crisp:function(a,g){var v,b={},e;g=g||a.strokeWidth||0;e=Math.round(g)%2/2;a.x=Math.floor(a.x||this.x||0)+e;a.y=Math.floor(a.y||this.y||0)+e;a.width=Math.floor((a.width||this.width||0)-2*e);a.height=Math.floor((a.height||this.height||0)-2*e);u(a.strokeWidth)&&(a.strokeWidth=g);for(v in a)this[v]!==a[v]&&(this[v]=b[v]=a[v]);return b},css:function(a){var v=this.styles,g={},e=this.element,c,h=\"\",m=!v,F=[\"textOutline\",\"textOverflow\",\"width\"];a&&a.color&&(a.fill=a.color);if(v)for(c in a)a[c]!==\nv[c]&&(g[c]=a[c],m=!0);if(m){v&&(a=b(v,g));v=this.textWidth=a&&a.width&&\"auto\"!==a.width&&\"text\"===e.nodeName.toLowerCase()&&J(a.width);this.styles=a;v&&!Q&&this.renderer.forExport&&delete a.width;if(x&&!Q)q(this.element,a);else{v=function(a,v){return\"-\"+v.toLowerCase()};for(c in a)-1===D(c,F)&&(h+=c.replace(/([A-Z])/g,v)+\":\"+a[c]+\";\");h&&r(e,\"style\",h)}this.added&&(\"text\"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this},strokeWidth:function(){return this[\"stroke-width\"]||\n0},on:function(a,g){var v=this,e=v.element;t&&\"click\"===a?(e.ontouchstart=function(a){v.touchEventFired=Date.now();a.preventDefault();g.call(e,a)},e.onclick=function(a){(-1===O.navigator.userAgent.indexOf(\"Android\")||1100<Date.now()-(v.touchEventFired||0))&&g.call(e,a)}):e[\"on\"+a]=g;return this},setRadialReference:function(a){var v=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;v&&v.radAttr&&v.animate(this.renderer.getRadialAttr(a,v.radAttr));return this},translate:function(a,\ng){return this.attr({translateX:a,translateY:g})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,g=this.translateY||0,e=this.scaleX,b=this.scaleY,c=this.inverted,h=this.rotation,m=this.element;c&&(a+=this.width,g+=this.height);a=[\"translate(\"+a+\",\"+g+\")\"];c?a.push(\"rotate(90) scale(-1,1)\"):h&&a.push(\"rotate(\"+h+\" \"+(m.getAttribute(\"x\")||0)+\" \"+(m.getAttribute(\"y\")||0)+\")\");(u(e)||u(b))&&a.push(\"scale(\"+K(e,1)+\" \"+K(b,1)+\")\");\na.length&&m.setAttribute(\"transform\",a.join(\" \"))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,g,e){var v,b,c,h,m={};b=this.renderer;c=b.alignedObjects;var F,x;if(a){if(this.alignOptions=a,this.alignByTranslate=g,!e||E(e))this.alignTo=v=e||\"renderer\",p(c,this),c.push(this),e=null}else a=this.alignOptions,g=this.alignByTranslate,v=this.alignTo;e=K(e,b[v],b);v=a.align;b=a.verticalAlign;c=(e.x||0)+(a.x||0);h=(e.y||0)+(a.y||0);\"right\"===v?F=1:\"center\"===\nv&&(F=2);F&&(c+=(e.width-(a.width||0))/F);m[g?\"translateX\":\"x\"]=Math.round(c);\"bottom\"===b?x=1:\"middle\"===b&&(x=2);x&&(h+=(e.height-(a.height||0))/x);m[g?\"translateY\":\"y\"]=Math.round(h);this[this.placed?\"animate\":\"attr\"](m);this.placed=!0;this.alignAttr=m;return this},getBBox:function(a,g){var v,e=this.renderer,c,h=this.element,m=this.styles,F,x=this.textStr,y,M=e.cache,C=e.cacheKeys,t;g=K(g,this.rotation);c=g*d;F=m&&m.fontSize;void 0!==x&&(t=x.toString(),-1===t.indexOf(\"\\x3c\")&&(t=t.replace(/[0-9]/g,\n\"0\")),t+=[\"\",g||0,F,m&&m.width,m&&m.textOverflow].join());t&&!a&&(v=M[t]);if(!v){if(h.namespaceURI===this.SVG_NS||e.forExport){try{(y=this.fakeTS&&function(a){z(h.querySelectorAll(\".highcharts-text-outline\"),function(v){v.style.display=a})})&&y(\"none\"),v=h.getBBox?b({},h.getBBox()):{width:h.offsetWidth,height:h.offsetHeight},y&&y(\"\")}catch(X){}if(!v||0>v.width)v={width:0,height:0}}else v=this.htmlGetBBox();e.isSVG&&(a=v.width,e=v.height,m&&\"11px\"===m.fontSize&&17===Math.round(e)&&(v.height=e=14),\ng&&(v.width=Math.abs(e*Math.sin(c))+Math.abs(a*Math.cos(c)),v.height=Math.abs(e*Math.cos(c))+Math.abs(a*Math.sin(c))));if(t&&0<v.height){for(;250<C.length;)delete M[C.shift()];M[t]||C.push(t);M[t]=v}}return v},show:function(a){return this.attr({visibility:a?\"inherit\":\"visible\"})},hide:function(){return this.attr({visibility:\"hidden\"})},fadeOut:function(a){var v=this;v.animate({opacity:0},{duration:a||150,complete:function(){v.attr({y:-9999})}})},add:function(a){var v=this.renderer,g=this.element,\ne;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&v.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)e=this.zIndexSetter();e||(a?a.element:v.box).appendChild(g);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var v=a.parentNode;v&&v.removeChild(a)},destroy:function(){var a=this,g=a.element||{},e=a.renderer.isSVG&&\"SPAN\"===g.nodeName&&a.parentGroup,b,c;g.onclick=g.onmouseout=g.onmouseover=g.onmousemove=g.point=null;F(a);a.clipPath&&(z(a.element.ownerSVGElement.querySelectorAll(\"[clip-path]\"),\nfunction(v){-1<v.getAttribute(\"clip-path\").indexOf(a.clipPath.element.id)&&v.removeAttribute(\"clip-path\")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(c=0;c<a.stops.length;c++)a.stops[c]=a.stops[c].destroy();a.stops=null}a.safeRemoveChild(g);for(a.destroyShadows();e&&e.div&&0===e.div.childNodes.length;)g=e.parentGroup,a.safeRemoveChild(e.div),delete e.div,e=g;a.alignTo&&p(a.renderer.alignedObjects,a);for(b in a)delete a[b];return null},shadow:function(a,g,e){var v=[],b,c,h=this.element,m,F,\nx,y;if(!a)this.destroyShadows();else if(!this.shadows){F=K(a.width,3);x=(a.opacity||.15)/F;y=this.parentInverted?\"(-1,-1)\":\"(\"+K(a.offsetX,1)+\", \"+K(a.offsetY,1)+\")\";for(b=1;b<=F;b++)c=h.cloneNode(0),m=2*F+1-2*b,r(c,{isShadow:\"true\",stroke:a.color||\"#000000\",\"stroke-opacity\":x*b,\"stroke-width\":m,transform:\"translate\"+y,fill:\"none\"}),e&&(r(c,\"height\",Math.max(r(c,\"height\")-m,0)),c.cutHeight=m),g?g.element.appendChild(c):h.parentNode.insertBefore(c,h),v.push(c);this.shadows=v}return this},destroyShadows:function(){z(this.shadows||\n[],function(a){this.safeRemoveChild(a)},this);this.shadows=void 0},xGetter:function(a){\"circle\"===this.element.nodeName&&(\"x\"===a?a=\"cx\":\"y\"===a&&(a=\"cy\"));return this._defaultGetter(a)},_defaultGetter:function(a){a=K(this[a],this.element?this.element.getAttribute(a):null,0);/^[\\-0-9\\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,g,e){a&&a.join&&(a=a.join(\" \"));/(NaN| {2}|^$)/.test(a)&&(a=\"M 0 0\");e.setAttribute(g,a);this[g]=a},dashstyleSetter:function(a){var v,g=this[\"stroke-width\"];\n\"inherit\"===g&&(g=1);if(a=a&&a.toLowerCase()){a=a.replace(\"shortdashdotdot\",\"3,1,1,1,1,1,\").replace(\"shortdashdot\",\"3,1,1,1\").replace(\"shortdot\",\"1,1,\").replace(\"shortdash\",\"3,1,\").replace(\"longdash\",\"8,3,\").replace(/dot/g,\"1,3,\").replace(\"dash\",\"4,3,\").replace(/,$/,\"\").split(\",\");for(v=a.length;v--;)a[v]=J(a[v])*g;a=a.join(\",\").replace(/NaN/g,\"none\");this.element.setAttribute(\"stroke-dasharray\",a)}},alignSetter:function(a){this.element.setAttribute(\"text-anchor\",{left:\"start\",center:\"middle\",right:\"end\"}[a])},\nopacitySetter:function(a,g,e){this[g]=a;e.setAttribute(g,a)},titleSetter:function(a){var v=this.element.getElementsByTagName(\"title\")[0];v||(v=n.createElementNS(this.SVG_NS,\"title\"),this.element.appendChild(v));v.firstChild&&v.removeChild(v.firstChild);v.appendChild(n.createTextNode(String(K(a),\"\").replace(/<[^>]*>/g,\"\")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,g,e){\"string\"===typeof a?e.setAttribute(g,\na):a&&this.colorGradient(a,g,e)},visibilitySetter:function(a,g,e){\"inherit\"===a?e.removeAttribute(g):e.setAttribute(g,a)},zIndexSetter:function(a,g){var v=this.renderer,e=this.parentGroup,b=(e||v).element||v.box,c,h=this.element,m;c=this.added;var F;u(a)&&(h.zIndex=a,a=+a,this[g]===a&&(c=!1),this[g]=a);if(c){(a=this.zIndex)&&e&&(e.handleZ=!0);g=b.childNodes;for(F=0;F<g.length&&!m;F++)e=g[F],c=e.zIndex,e!==h&&(J(c)>a||!u(a)&&u(c)||0>a&&!u(c)&&b!==v.box)&&(b.insertBefore(h,e),m=!0);m||b.appendChild(h)}return m},\n_defaultSetter:function(a,g,e){e.setAttribute(g,a)}};B.prototype.yGetter=B.prototype.xGetter;B.prototype.translateXSetter=B.prototype.translateYSetter=B.prototype.rotationSetter=B.prototype.verticalAlignSetter=B.prototype.scaleXSetter=B.prototype.scaleYSetter=function(a,g){this[g]=a;this.doTransform=!0};B.prototype[\"stroke-widthSetter\"]=B.prototype.strokeSetter=function(a,g,e){this[g]=a;this.stroke&&this[\"stroke-width\"]?(B.prototype.fillSetter.call(this,this.stroke,\"stroke\",e),e.setAttribute(\"stroke-width\",\nthis[\"stroke-width\"]),this.hasStroke=!0):\"stroke-width\"===g&&0===a&&this.hasStroke&&(e.removeAttribute(\"stroke\"),this.hasStroke=!1)};A=a.SVGRenderer=function(){this.init.apply(this,arguments)};A.prototype={Element:B,SVG_NS:N,init:function(a,g,b,c,h,F){var v;c=this.createElement(\"svg\").attr({version:\"1.1\",\"class\":\"highcharts-root\"}).css(this.getStyle(c));v=c.element;a.appendChild(v);-1===a.innerHTML.indexOf(\"xmlns\")&&r(v,\"xmlns\",this.SVG_NS);this.isSVG=!0;this.box=v;this.boxWrapper=c;this.alignedObjects=\n[];this.url=(e||m)&&n.getElementsByTagName(\"base\").length?O.location.href.replace(/#.*?$/,\"\").replace(/<[^>]*>/g,\"\").replace(/([\\('\\)])/g,\"\\\\$1\").replace(/ /g,\"%20\"):\"\";this.createElement(\"desc\").add().element.appendChild(n.createTextNode(\"Created with Highcharts 5.0.10\"));this.defs=this.createElement(\"defs\").add();this.allowHTML=F;this.forExport=h;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(g,b,!1);var x;e&&a.getBoundingClientRect&&(g=function(){q(a,{left:0,top:0});\nx=a.getBoundingClientRect();q(a,{left:Math.ceil(x.left)-x.left+\"px\",top:Math.ceil(x.top)-x.top+\"px\"})},g(),this.unSubPixelFix=H(O,\"resize\",g))},getStyle:function(a){return this.style=b({fontFamily:'\"Lucida Grande\", \"Lucida Sans Unicode\", Arial, Helvetica, sans-serif',fontSize:\"12px\"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();c(this.gradients||\n{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var g=new this.Element;g.init(this,a);return g},draw:I,getRadialAttr:function(a,g){return{cx:a[0]-a[2]/2+g.cx*a[2],cy:a[1]-a[2]/2+g.cy*a[2],r:g.r*a[2]}},getSpanWidth:function(a,g){var v=a.getBBox(!0).width;!Q&&this.forExport&&(v=this.measureSpanWidth(g.firstChild.data,a.styles));return v},applyEllipsis:function(a,g,e,b){var v=this.getSpanWidth(a,g),\nc=v>b,v=e,h,m=0,F=e.length,x=function(a){g.removeChild(g.firstChild);a&&g.appendChild(n.createTextNode(a))};if(c){for(;m<=F;)h=Math.ceil((m+F)/2),v=e.substring(0,h)+\"\\u2026\",x(v),v=this.getSpanWidth(a,g),m===F?m=F+1:v>b?F=h-1:m=h;0===F&&x(\"\")}return c},buildText:function(a){var g=a.element,e=this,v=e.forExport,b=K(a.textStr,\"\").toString(),c=-1!==b.indexOf(\"\\x3c\"),m=g.childNodes,F,x,y,t,d=r(g,\"x\"),C=a.styles,p=a.textWidth,k=C&&C.lineHeight,w=C&&C.textOutline,u=C&&\"ellipsis\"===C.textOverflow,f=C&&\"nowrap\"===\nC.whiteSpace,E=C&&C.fontSize,D,I,l=m.length,C=p&&!a.added&&this.box,P=function(a){var v;v=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:E||e.style.fontSize||12;return k?J(k):e.fontMetrics(v,a.getAttribute(\"style\")?a:g).h};D=[b,u,f,k,w,E,p].join();if(D!==a.textCache){for(a.textCache=D;l--;)g.removeChild(m[l]);c||w||u||p||-1!==b.indexOf(\" \")?(F=/<.*class=\"([^\"]+)\".*>/,x=/<.*style=\"([^\"]+)\".*>/,y=/<.*href=\"(http[^\"]+)\".*>/,C&&C.appendChild(g),b=c?b.replace(/<(b|strong)>/g,'\\x3cspan style\\x3d\"font-weight:bold\"\\x3e').replace(/<(i|em)>/g,\n'\\x3cspan style\\x3d\"font-style:italic\"\\x3e').replace(/<a/g,\"\\x3cspan\").replace(/<\\/(b|strong|i|em|a)>/g,\"\\x3c/span\\x3e\").split(/<br.*?>/g):[b],b=h(b,function(a){return\"\"!==a}),z(b,function(b,c){var m,h=0;b=b.replace(/^\\s+|\\s+$/g,\"\").replace(/<span/g,\"|||\\x3cspan\").replace(/<\\/span>/g,\"\\x3c/span\\x3e|||\");m=b.split(\"|||\");z(m,function(b){if(\"\"!==b||1===m.length){var C={},k=n.createElementNS(e.SVG_NS,\"tspan\"),w,E;F.test(b)&&(w=b.match(F)[1],r(k,\"class\",w));x.test(b)&&(E=b.match(x)[1].replace(/(;| |^)color([ :])/,\n\"$1fill$2\"),r(k,\"style\",E));y.test(b)&&!v&&(r(k,\"onclick\",'location.href\\x3d\"'+b.match(y)[1]+'\"'),q(k,{cursor:\"pointer\"}));b=(b.replace(/<(.|\\n)*?>/g,\"\")||\" \").replace(/&lt;/g,\"\\x3c\").replace(/&gt;/g,\"\\x3e\");if(\" \"!==b){k.appendChild(n.createTextNode(b));h?C.dx=0:c&&null!==d&&(C.x=d);r(k,C);g.appendChild(k);!h&&I&&(!Q&&v&&q(k,{display:\"block\"}),r(k,\"dy\",P(k)));if(p){C=b.replace(/([^\\^])-/g,\"$1- \").split(\" \");w=1<m.length||c||1<C.length&&!f;var D=[],M,z=P(k),l=a.rotation;for(u&&(t=e.applyEllipsis(a,\nk,b,p));!u&&w&&(C.length||D.length);)a.rotation=0,M=e.getSpanWidth(a,k),b=M>p,void 0===t&&(t=b),b&&1!==C.length?(k.removeChild(k.firstChild),D.unshift(C.pop())):(C=D,D=[],C.length&&!f&&(k=n.createElementNS(N,\"tspan\"),r(k,{dy:z,x:d}),E&&r(k,\"style\",E),g.appendChild(k)),M>p&&(p=M)),C.length&&k.appendChild(n.createTextNode(C.join(\" \").replace(/- /g,\"-\")));a.rotation=l}h++}}});I=I||g.childNodes.length}),t&&a.attr(\"title\",a.textStr),C&&C.removeChild(g),w&&a.applyTextOutline&&a.applyTextOutline(w)):g.appendChild(n.createTextNode(b.replace(/&lt;/g,\n\"\\x3c\").replace(/&gt;/g,\"\\x3e\")))}},getContrast:function(a){a=l(a).rgba;return 510<a[0]+a[1]+a[2]?\"#000000\":\"#FFFFFF\"},button:function(a,g,e,c,m,h,F,C,t){var v=this.label(a,g,e,t,null,null,null,null,\"button\"),d=0;v.attr(y({padding:8,r:2},m));var p,n,k,w;m=y({fill:\"#f7f7f7\",stroke:\"#cccccc\",\"stroke-width\":1,style:{color:\"#333333\",cursor:\"pointer\",fontWeight:\"normal\"}},m);p=m.style;delete m.style;h=y(m,{fill:\"#e6e6e6\"},h);n=h.style;delete h.style;F=y(m,{fill:\"#e6ebf5\",style:{color:\"#000000\",fontWeight:\"bold\"}},\nF);k=F.style;delete F.style;C=y(m,{style:{color:\"#cccccc\"}},C);w=C.style;delete C.style;H(v.element,x?\"mouseover\":\"mouseenter\",function(){3!==d&&v.setState(1)});H(v.element,x?\"mouseout\":\"mouseleave\",function(){3!==d&&v.setState(d)});v.setState=function(a){1!==a&&(v.state=d=a);v.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass(\"highcharts-button-\"+[\"normal\",\"hover\",\"pressed\",\"disabled\"][a||0]);v.attr([m,h,F,C][a||0]).css([p,n,k,w][a||0])};v.attr(m).css(b({cursor:\"default\"},\np));return v.on(\"click\",function(a){3!==d&&c.call(v,a)})},crispLine:function(a,g){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-g%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+g%2/2);return a},path:function(a){var g={fill:\"none\"};w(a)?g.d=a:C(a)&&b(g,a);return this.createElement(\"path\").attr(g)},circle:function(a,g,e){a=C(a)?a:{x:a,y:g,r:e};g=this.createElement(\"circle\");g.xSetter=g.ySetter=function(a,g,e){e.setAttribute(\"c\"+g,a)};return g.attr(a)},arc:function(a,g,e,b,c,m){C(a)?(b=a,g=b.y,e=b.r,a=b.x):\nb={innerR:b,start:c,end:m};a=this.symbol(\"arc\",a,g,e,e,b);a.r=e;return a},rect:function(a,g,e,b,c,m){c=C(a)?a.r:c;var v=this.createElement(\"rect\");a=C(a)?a:void 0===a?{}:{x:a,y:g,width:Math.max(e,0),height:Math.max(b,0)};void 0!==m&&(a.strokeWidth=m,a=v.crisp(a));a.fill=\"none\";c&&(a.r=c);v.rSetter=function(a,g,e){r(e,{rx:a,ry:a})};return v.attr(a)},setSize:function(a,g,e){var b=this.alignedObjects,v=b.length;this.width=a;this.height=g;for(this.boxWrapper.animate({width:a,height:g},{step:function(){this.attr({viewBox:\"0 0 \"+\nthis.attr(\"width\")+\" \"+this.attr(\"height\")})},duration:K(e,!0)?void 0:0});v--;)b[v].align()},g:function(a){var g=this.createElement(\"g\");return a?g.attr({\"class\":\"highcharts-\"+a}):g},image:function(a,g,e,c,m){var v={preserveAspectRatio:\"none\"};1<arguments.length&&b(v,{x:g,y:e,width:c,height:m});v=this.createElement(\"image\").attr(v);v.element.setAttributeNS?v.element.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\",a):v.element.setAttribute(\"hc-svg-href\",a);return v},symbol:function(a,g,e,c,m,\nh){var v=this,F,x=this.symbols[a],y=u(g)&&x&&this.symbols[a](Math.round(g),Math.round(e),c,m,h),C=/^url\\((.*?)\\)$/,d,t;x?(F=this.path(y),F.attr(\"fill\",\"none\"),b(F,{symbolName:a,x:g,y:e,width:c,height:m}),h&&b(F,h)):C.test(a)&&(d=a.match(C)[1],F=this.image(d),F.imgwidth=K(P[d]&&P[d].width,h&&h.width),F.imgheight=K(P[d]&&P[d].height,h&&h.height),t=function(){F.attr({width:F.width,height:F.height})},z([\"width\",\"height\"],function(a){F[a+\"Setter\"]=function(a,g){var e={},b=this[\"img\"+g],v=\"width\"===g?\"translateX\":\n\"translateY\";this[g]=a;u(b)&&(this.element&&this.element.setAttribute(g,b),this.alignByTranslate||(e[v]=((this[g]||0)-b)/2,this.attr(e)))}}),u(g)&&F.attr({x:g,y:e}),F.isImg=!0,u(F.imgwidth)&&u(F.imgheight)?t():(F.attr({width:0,height:0}),k(\"img\",{onload:function(){var a=f[v.chartIndex];0===this.width&&(q(this,{position:\"absolute\",top:\"-999em\"}),n.body.appendChild(this));P[d]={width:this.width,height:this.height};F.imgwidth=this.width;F.imgheight=this.height;F.element&&t();this.parentNode&&this.parentNode.removeChild(this);\nv.imgCount--;if(!v.imgCount&&a&&a.onload)a.onload()},src:d}),this.imgCount++));return F},symbols:{circle:function(a,g,e,b){return this.arc(a+e/2,g+b/2,e/2,b/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,g,e,b){return[\"M\",a,g,\"L\",a+e,g,a+e,g+b,a,g+b,\"Z\"]},triangle:function(a,g,e,b){return[\"M\",a+e/2,g,\"L\",a+e,g+b,a,g+b,\"Z\"]},\"triangle-down\":function(a,g,e,b){return[\"M\",a,g,\"L\",a+e,g,a+e/2,g+b,\"Z\"]},diamond:function(a,g,e,b){return[\"M\",a+e/2,g,\"L\",a+e,g+b/2,a+e/2,g+b,a,g+b/2,\"Z\"]},arc:function(a,\ng,e,b,c){var v=c.start,m=c.r||e,h=c.r||b||e,F=c.end-.001;e=c.innerR;b=c.open;var x=Math.cos(v),y=Math.sin(v),C=Math.cos(F),F=Math.sin(F);c=c.end-v<Math.PI?0:1;m=[\"M\",a+m*x,g+h*y,\"A\",m,h,0,c,1,a+m*C,g+h*F];u(e)&&m.push(b?\"M\":\"L\",a+e*C,g+e*F,\"A\",e,e,0,c,0,a+e*x,g+e*y);m.push(b?\"\":\"Z\");return m},callout:function(a,g,e,b,c){var m=Math.min(c&&c.r||0,e,b),h=m+6,v=c&&c.anchorX;c=c&&c.anchorY;var F;F=[\"M\",a+m,g,\"L\",a+e-m,g,\"C\",a+e,g,a+e,g,a+e,g+m,\"L\",a+e,g+b-m,\"C\",a+e,g+b,a+e,g+b,a+e-m,g+b,\"L\",a+m,g+b,\"C\",\na,g+b,a,g+b,a,g+b-m,\"L\",a,g+m,\"C\",a,g,a,g,a+m,g];v&&v>e?c>g+h&&c<g+b-h?F.splice(13,3,\"L\",a+e,c-6,a+e+6,c,a+e,c+6,a+e,g+b-m):F.splice(13,3,\"L\",a+e,b/2,v,c,a+e,b/2,a+e,g+b-m):v&&0>v?c>g+h&&c<g+b-h?F.splice(33,3,\"L\",a,c+6,a-6,c,a,c-6,a,g+m):F.splice(33,3,\"L\",a,b/2,v,c,a,b/2,a,g+m):c&&c>b&&v>a+h&&v<a+e-h?F.splice(23,3,\"L\",v+6,g+b,v,g+b+6,v-6,g+b,a+m,g+b):c&&0>c&&v>a+h&&v<a+e-h&&F.splice(3,3,\"L\",v-6,g,v,g-6,v+6,g,e-m,g);return F}},clipRect:function(g,e,b,c){var m=a.uniqueKey(),h=this.createElement(\"clipPath\").attr({id:m}).add(this.defs);\ng=this.rect(g,e,b,c,0).add(h);g.id=m;g.clipPath=h;g.count=0;return g},text:function(a,g,e,b){var c=!Q&&this.forExport,m={};if(b&&(this.allowHTML||!this.forExport))return this.html(a,g,e);m.x=Math.round(g||0);e&&(m.y=Math.round(e));if(a||0===a)m.text=a;a=this.createElement(\"text\").attr(m);c&&a.css({position:\"absolute\"});b||(a.xSetter=function(a,g,e){var b=e.getElementsByTagName(\"tspan\"),c,m=e.getAttribute(g),h;for(h=0;h<b.length;h++)c=b[h],c.getAttribute(g)===m&&c.setAttribute(g,a);e.setAttribute(g,\na)});return a},fontMetrics:function(a,g){a=a||g&&g.style&&g.style.fontSize||this.style&&this.style.fontSize;a=/px/.test(a)?J(a):/em/.test(a)?parseFloat(a)*(g?this.fontMetrics(null,g.parentNode).f:16):12;g=24>a?a+3:Math.round(1.2*a);return{h:g,b:Math.round(.8*g),f:a}},rotCorr:function(a,g,e){var b=a;g&&e&&(b=Math.max(b*Math.cos(g*d),4));return{x:-a/3*Math.sin(g*d),y:b}},label:function(e,c,m,h,F,x,C,d,t){var v=this,p=v.g(\"button\"!==t&&\"label\"),n=p.text=v.text(\"\",0,0,C).attr({zIndex:1}),k,w,E=0,f=3,\nD=0,I,q,l,Q,N,K={},J,r,M=/^url\\((.*?)\\)$/.test(h),P=M,R,S,O,U;t&&p.addClass(\"highcharts-\"+t);P=M;R=function(){return(J||0)%2/2};S=function(){var a=n.element.style,g={};w=(void 0===I||void 0===q||N)&&u(n.textStr)&&n.getBBox();p.width=(I||w.width||0)+2*f+D;p.height=(q||w.height||0)+2*f;r=f+v.fontMetrics(a&&a.fontSize,n).b;P&&(k||(p.box=k=v.symbols[h]||M?v.symbol(h):v.rect(),k.addClass((\"button\"===t?\"\":\"highcharts-label-box\")+(t?\" highcharts-\"+t+\"-box\":\"\")),k.add(p),a=R(),g.x=a,g.y=(d?-r:0)+a),g.width=\nMath.round(p.width),g.height=Math.round(p.height),k.attr(b(g,K)),K={})};O=function(){var a=D+f,g;g=d?0:r;u(I)&&w&&(\"center\"===N||\"right\"===N)&&(a+={center:.5,right:1}[N]*(I-w.width));if(a!==n.x||g!==n.y)n.attr(\"x\",a),void 0!==g&&n.attr(\"y\",g);n.x=a;n.y=g};U=function(a,g){k?k.attr(a,g):K[a]=g};p.onAdd=function(){n.add(p);p.attr({text:e||0===e?e:\"\",x:c,y:m});k&&u(F)&&p.attr({anchorX:F,anchorY:x})};p.widthSetter=function(g){I=a.isNumber(g)?g:null};p.heightSetter=function(a){q=a};p[\"text-alignSetter\"]=\nfunction(a){N=a};p.paddingSetter=function(a){u(a)&&a!==f&&(f=p.padding=a,O())};p.paddingLeftSetter=function(a){u(a)&&a!==D&&(D=a,O())};p.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==E&&(E=a,w&&p.attr({x:l}))};p.textSetter=function(a){void 0!==a&&n.textSetter(a);S();O()};p[\"stroke-widthSetter\"]=function(a,g){a&&(P=!0);J=this[\"stroke-width\"]=a;U(g,a)};p.strokeSetter=p.fillSetter=p.rSetter=function(a,g){\"fill\"===g&&a&&(P=!0);U(g,a)};p.anchorXSetter=function(a,g){F=a;U(g,Math.round(a)-\nR()-l)};p.anchorYSetter=function(a,g){x=a;U(g,a-Q)};p.xSetter=function(a){p.x=a;E&&(a-=E*((I||w.width)+2*f));l=Math.round(a);p.attr(\"translateX\",l)};p.ySetter=function(a){Q=p.y=Math.round(a);p.attr(\"translateY\",Q)};var W=p.css;return b(p,{css:function(a){if(a){var g={};a=y(a);z(p.textProps,function(e){void 0!==a[e]&&(g[e]=a[e],delete a[e])});n.css(g)}return W.call(p,a)},getBBox:function(){return{width:w.width+2*f,height:w.height+2*f,x:w.x-f,y:w.y-f}},shadow:function(a){a&&(S(),k&&k.shadow(a));return p},\ndestroy:function(){g(p.element,\"mouseenter\");g(p.element,\"mouseleave\");n&&(n=n.destroy());k&&(k=k.destroy());B.prototype.destroy.call(p);p=v=S=O=U=null}})}};a.Renderer=A})(L);(function(a){var B=a.attr,A=a.createElement,H=a.css,G=a.defined,r=a.each,f=a.extend,l=a.isFirefox,q=a.isMS,k=a.isWebKit,u=a.pInt,d=a.SVGRenderer,c=a.win,n=a.wrap;f(a.SVGElement.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&\"SPAN\"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();a&&\"ellipsis\"===\na.textOverflow&&(a.whiteSpace=\"nowrap\",a.overflow=\"hidden\");this.styles=f(this.styles,a);H(this.element,a);return this},htmlGetBBox:function(){var a=this.element;\"text\"===a.nodeName&&(a.style.position=\"absolute\");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,h=this.translateY||0,d=this.x||0,n=this.y||0,w=this.textAlign||\"left\",e={left:0,center:.5,right:1}[w],x=this.styles;\nH(b,{marginLeft:c,marginTop:h});this.shadows&&r(this.shadows,function(a){H(a,{marginLeft:c+1,marginTop:h+1})});this.inverted&&r(b.childNodes,function(e){a.invertChild(e,b)});if(\"SPAN\"===b.tagName){var C=this.rotation,f=u(this.textWidth),m=x&&x.whiteSpace,y=[C,w,b.innerHTML,this.textWidth,this.textAlign].join();y!==this.cTT&&(x=a.fontMetrics(b.style.fontSize).b,G(C)&&this.setSpanRotation(C,e,x),H(b,{width:\"\",whiteSpace:m||\"nowrap\"}),b.offsetWidth>f&&/[ \\-]/.test(b.textContent||b.innerText)&&H(b,{width:f+\n\"px\",display:\"block\",whiteSpace:m||\"normal\"}),this.getSpanCorrection(b.offsetWidth,x,e,C,w));H(b,{left:d+(this.xCorr||0)+\"px\",top:n+(this.yCorr||0)+\"px\"});k&&(x=b.offsetHeight);this.cTT=y}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,p){var h={},d=q?\"-ms-transform\":k?\"-webkit-transform\":l?\"MozTransform\":c.opera?\"-o-transform\":\"\";h[d]=h.transform=\"rotate(\"+a+\"deg)\";h[d+(l?\"Origin\":\"-origin\")]=h.transformOrigin=100*b+\"% \"+p+\"px\";H(this.element,h)},getSpanCorrection:function(a,b,c){this.xCorr=\n-a*c;this.yCorr=-b}});f(d.prototype,{html:function(a,b,c){var h=this.createElement(\"span\"),d=h.element,p=h.renderer,k=p.isSVG,e=function(a,e){r([\"opacity\",\"visibility\"],function(b){n(a,b+\"Setter\",function(a,b,c,h){a.call(this,b,c,h);e[c]=b})})};h.textSetter=function(a){a!==d.innerHTML&&delete this.bBox;d.innerHTML=this.textStr=a;h.htmlUpdateTransform()};k&&e(h,h.element.style);h.xSetter=h.ySetter=h.alignSetter=h.rotationSetter=function(a,e){\"align\"===e&&(e=\"textAlign\");h[e]=a;h.htmlUpdateTransform()};\nh.attr({text:a,x:Math.round(b),y:Math.round(c)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:\"absolute\"});d.style.whiteSpace=\"nowrap\";h.css=h.htmlCss;k&&(h.add=function(a){var b,c=p.box.parentNode,m=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)m.push(a),a=a.parentGroup;r(m.reverse(),function(a){var x,d=B(a.element,\"class\");d&&(d={className:d});b=a.div=a.div||A(\"div\",d,{position:\"absolute\",left:(a.translateX||0)+\"px\",top:(a.translateY||0)+\"px\",display:a.display,\nopacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},b||c);x=b.style;f(a,{on:function(){h.on.apply({element:m[0].div},arguments);return a},translateXSetter:function(e,g){x.left=e+\"px\";a[g]=e;a.doTransform=!0},translateYSetter:function(e,g){x.top=e+\"px\";a[g]=e;a.doTransform=!0}});e(a,x)})}}else b=c;b.appendChild(d);h.added=!0;h.alignOnAdd&&h.htmlUpdateTransform();return h});return h}})})(L);(function(a){var B,A,H=a.createElement,G=a.css,r=a.defined,f=a.deg2rad,l=a.discardElement,q=a.doc,\nk=a.each,u=a.erase,d=a.extend;B=a.extendClass;var c=a.isArray,n=a.isNumber,z=a.isObject,b=a.merge;A=a.noop;var p=a.pick,h=a.pInt,t=a.SVGElement,D=a.SVGRenderer,w=a.win;a.svg||(A={docMode8:q&&8===q.documentMode,init:function(a,b){var e=[\"\\x3c\",b,' filled\\x3d\"f\" stroked\\x3d\"f\"'],c=[\"position: \",\"absolute\",\";\"],m=\"div\"===b;(\"shape\"===b||m)&&c.push(\"left:0;top:0;width:1px;height:1px;\");c.push(\"visibility: \",m?\"hidden\":\"visible\");e.push(' style\\x3d\"',c.join(\"\"),'\"/\\x3e');b&&(e=m||\"span\"===b||\"img\"===b?\ne.join(\"\"):a.prepVML(e),this.element=H(e));this.renderer=a},add:function(a){var e=this.renderer,b=this.element,c=e.box,m=a&&a.inverted,c=a?a.element||a:c;a&&(this.parentGroup=a);m&&e.invertChild(b,c);c.appendChild(b);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();this.className&&this.attr(\"class\",this.className);return this},updateTransform:t.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=Math.cos(a*f),c=\nMath.sin(a*f);G(this.element,{filter:a?[\"progid:DXImageTransform.Microsoft.Matrix(M11\\x3d\",b,\", M12\\x3d\",-c,\", M21\\x3d\",c,\", M22\\x3d\",b,\", sizingMethod\\x3d'auto expand')\"].join(\"\"):\"none\"})},getSpanCorrection:function(a,b,c,h,m){var e=h?Math.cos(h*f):1,x=h?Math.sin(h*f):0,d=p(this.elemHeight,this.element.offsetHeight),t;this.xCorr=0>e&&-a;this.yCorr=0>x&&-d;t=0>e*x;this.xCorr+=x*b*(t?1-c:c);this.yCorr-=e*b*(h?t?c:1-c:1);m&&\"left\"!==m&&(this.xCorr-=a*c*(0>e?-1:1),h&&(this.yCorr-=d*c*(0>x?-1:1)),G(this.element,\n{textAlign:m}))},pathToVML:function(a){for(var e=a.length,b=[];e--;)n(a[e])?b[e]=Math.round(10*a[e])-5:\"Z\"===a[e]?b[e]=\"x\":(b[e]=a[e],!a.isArc||\"wa\"!==a[e]&&\"at\"!==a[e]||(b[e+5]===b[e+7]&&(b[e+7]+=a[e+7]>a[e+5]?1:-1),b[e+6]===b[e+8]&&(b[e+8]+=a[e+8]>a[e+6]?1:-1)));return b.join(\" \")||\"x\"},clip:function(a){var e=this,b;a?(b=a.members,u(b,e),b.push(e),e.destroyClip=function(){u(b,e)},a=a.getCSS(e)):(e.destroyClip&&e.destroyClip(),a={clip:e.docMode8?\"inherit\":\"rect(auto)\"});return e.css(a)},css:t.prototype.htmlCss,\nsafeRemoveChild:function(a){a.parentNode&&l(a)},destroy:function(){this.destroyClip&&this.destroyClip();return t.prototype.destroy.apply(this)},on:function(a,b){this.element[\"on\"+a]=function(){var a=w.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var e;a=a.split(/[ ,]/);e=a.length;if(9===e||11===e)a[e-4]=a[e-2]=h(a[e-2])-10*b;return a.join(\" \")},shadow:function(a,b,c){var e=[],m,d=this.element,t=this.renderer,x,n=d.style,g,F=d.path,k,C,w,f;F&&\"string\"!==typeof F.value&&(F=\n\"x\");C=F;if(a){w=p(a.width,3);f=(a.opacity||.15)/w;for(m=1;3>=m;m++)k=2*w+1-2*m,c&&(C=this.cutOffPath(F.value,k+.5)),g=['\\x3cshape isShadow\\x3d\"true\" strokeweight\\x3d\"',k,'\" filled\\x3d\"false\" path\\x3d\"',C,'\" coordsize\\x3d\"10 10\" style\\x3d\"',d.style.cssText,'\" /\\x3e'],x=H(t.prepVML(g),null,{left:h(n.left)+p(a.offsetX,1),top:h(n.top)+p(a.offsetY,1)}),c&&(x.cutOff=k+1),g=['\\x3cstroke color\\x3d\"',a.color||\"#000000\",'\" opacity\\x3d\"',f*m,'\"/\\x3e'],H(t.prepVML(g),null,null,x),b?b.element.appendChild(x):\nd.parentNode.insertBefore(x,d),e.push(x);this.shadows=e}return this},updateShadows:A,setAttr:function(a,b){this.docMode8?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){(this.added?this.element:this).className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName(\"stroke\")[0]||H(this.renderer.prepVML([\"\\x3cstroke/\\x3e\"]),null,null,c))[b]=a||\"solid\";this[b]=a},dSetter:function(a,b,c){var e=this.shadows;a=a||[];this.d=a.join&&a.join(\" \");c.path=a=this.pathToVML(a);if(e)for(c=\ne.length;c--;)e[c].path=e[c].cutOff?this.cutOffPath(a,e[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var e=c.nodeName;\"SPAN\"===e?c.style.color=a:\"IMG\"!==e&&(c.filled=\"none\"!==a,this.setAttr(\"fillcolor\",this.renderer.color(a,c,b,this)))},\"fill-opacitySetter\":function(a,b,c){H(this.renderer.prepVML([\"\\x3c\",b.split(\"-\")[0],' opacity\\x3d\"',a,'\"/\\x3e']),null,null,c)},opacitySetter:A,rotationSetter:function(a,b,c){c=c.style;this[b]=c[b]=a;c.left=-Math.round(Math.sin(a*f)+1)+\"px\";c.top=Math.round(Math.cos(a*\nf))+\"px\"},strokeSetter:function(a,b,c){this.setAttr(\"strokecolor\",this.renderer.color(a,c,b,this))},\"stroke-widthSetter\":function(a,b,c){c.stroked=!!a;this[b]=a;n(a)&&(a+=\"px\");this.setAttr(\"strokeweight\",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){\"inherit\"===a&&(a=\"visible\");this.shadows&&k(this.shadows,function(e){e.style[b]=a});\"DIV\"===c.nodeName&&(a=\"hidden\"===a?\"-999em\":0,this.docMode8||(c.style[b]=a?\"visible\":\"hidden\"),b=\"top\");c.style[b]=a},xSetter:function(a,\nb,c){this[b]=a;\"x\"===b?b=\"left\":\"y\"===b&&(b=\"top\");this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}},A[\"stroke-opacitySetter\"]=A[\"fill-opacitySetter\"],a.VMLElement=A=B(t,A),A.prototype.ySetter=A.prototype.widthSetter=A.prototype.heightSetter=A.prototype.xSetter,A={Element:A,isIE8:-1<w.navigator.userAgent.indexOf(\"MSIE 8.0\"),init:function(a,b,c){var e,m;this.alignedObjects=[];e=this.createElement(\"div\").css({position:\"relative\"});m=e.element;\na.appendChild(e.element);this.isVML=!0;this.box=m;this.boxWrapper=e;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(b,c,!1);if(!q.namespaces.hcv){q.namespaces.add(\"hcv\",\"urn:schemas-microsoft-com:vml\");try{q.createStyleSheet().cssText=\"hcv\\\\:fill, hcv\\\\:path, hcv\\\\:shape, hcv\\\\:stroke{ behavior:url(#default#VML); display: inline-block; } \"}catch(y){q.styleSheets[0].cssText+=\"hcv\\\\:fill, hcv\\\\:path, hcv\\\\:shape, hcv\\\\:stroke{ behavior:url(#default#VML); display: inline-block; } \"}}},\nisHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,h){var e=this.createElement(),p=z(a);return d(e,{members:[],count:0,left:(p?a.x:a)+1,top:(p?a.y:b)+1,width:(p?a.width:c)-1,height:(p?a.height:h)-1,getCSS:function(a){var b=a.element,c=b.nodeName,g=a.inverted,e=this.top-(\"shape\"===c?b.offsetTop:0),m=this.left,b=m+this.width,h=e+this.height,e={clip:\"rect(\"+Math.round(g?m:e)+\"px,\"+Math.round(g?h:b)+\"px,\"+Math.round(g?b:h)+\"px,\"+Math.round(g?e:m)+\"px)\"};!g&&a.docMode8&&\"DIV\"===c&&\nd(e,{width:b+\"px\",height:h+\"px\"});return e},updateClipping:function(){k(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(b,c,h,d){var e=this,p,t=/^rgba/,n,x,g=\"none\";b&&b.linearGradient?x=\"gradient\":b&&b.radialGradient&&(x=\"pattern\");if(x){var F,w,f=b.linearGradient||b.radialGradient,C,u,v,D,q,l=\"\";b=b.stops;var z,E=[],r=function(){n=['\\x3cfill colors\\x3d\"'+E.join(\",\")+'\" opacity\\x3d\"',v,'\" o:opacity2\\x3d\"',u,'\" type\\x3d\"',x,'\" ',l,'focus\\x3d\"100%\" method\\x3d\"any\" /\\x3e'];\nH(e.prepVML(n),null,null,c)};C=b[0];z=b[b.length-1];0<C[0]&&b.unshift([0,C[1]]);1>z[0]&&b.push([1,z[1]]);k(b,function(g,b){t.test(g[1])?(p=a.color(g[1]),F=p.get(\"rgb\"),w=p.get(\"a\")):(F=g[1],w=1);E.push(100*g[0]+\"% \"+F);b?(v=w,D=F):(u=w,q=F)});if(\"fill\"===h)if(\"gradient\"===x)h=f.x1||f[0]||0,b=f.y1||f[1]||0,C=f.x2||f[2]||0,f=f.y2||f[3]||0,l='angle\\x3d\"'+(90-180*Math.atan((f-b)/(C-h))/Math.PI)+'\"',r();else{var g=f.r,A=2*g,B=2*g,G=f.cx,V=f.cy,L=c.radialReference,T,g=function(){L&&(T=d.getBBox(),G+=(L[0]-\nT.x)/T.width-.5,V+=(L[1]-T.y)/T.height-.5,A*=L[2]/T.width,B*=L[2]/T.height);l='src\\x3d\"'+a.getOptions().global.VMLRadialGradientURL+'\" size\\x3d\"'+A+\",\"+B+'\" origin\\x3d\"0.5,0.5\" position\\x3d\"'+G+\",\"+V+'\" color2\\x3d\"'+q+'\" ';r()};d.added?g():d.onAdd=g;g=D}else g=F}else t.test(b)&&\"IMG\"!==c.tagName?(p=a.color(b),d[h+\"-opacitySetter\"](p.get(\"a\"),h,c),g=p.get(\"rgb\")):(g=c.getElementsByTagName(h),g.length&&(g[0].opacity=1,g[0].type=\"solid\"),g=b);return g},prepVML:function(a){var b=this.isIE8;a=a.join(\"\");\nb?(a=a.replace(\"/\\x3e\",' xmlns\\x3d\"urn:schemas-microsoft-com:vml\" /\\x3e'),a=-1===a.indexOf('style\\x3d\"')?a.replace(\"/\\x3e\",' style\\x3d\"display:inline-block;behavior:url(#default#VML);\" /\\x3e'):a.replace('style\\x3d\"','style\\x3d\"display:inline-block;behavior:url(#default#VML);')):a=a.replace(\"\\x3c\",\"\\x3chcv:\");return a},text:D.prototype.html,path:function(a){var b={coordsize:\"10 10\"};c(a)?b.d=a:z(a)&&d(b,a);return this.createElement(\"shape\").attr(b)},circle:function(a,b,c){var e=this.symbol(\"circle\");\nz(a)&&(c=a.r,b=a.y,a=a.x);e.isCircle=!0;e.r=c;return e.attr({x:a,y:b})},g:function(a){var b;a&&(b={className:\"highcharts-\"+a,\"class\":\"highcharts-\"+a});return this.createElement(\"div\").attr(b)},image:function(a,b,c,h,m){var e=this.createElement(\"img\").attr({src:a});1<arguments.length&&e.attr({x:b,y:c,width:h,height:m});return e},createElement:function(a){return\"rect\"===a?this.symbol(a):D.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this;b=b.style;var e=\"IMG\"===a.tagName&&a.style;\nG(a,{flip:\"x\",left:h(b.width)-(e?h(e.top):1),top:h(b.height)-(e?h(e.left):1),rotation:-90});k(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,h,m){var e=m.start,d=m.end,p=m.r||c||h;c=m.innerR;h=Math.cos(e);var t=Math.sin(e),g=Math.cos(d),F=Math.sin(d);if(0===d-e)return[\"x\"];e=[\"wa\",a-p,b-p,a+p,b+p,a+p*h,b+p*t,a+p*g,b+p*F];m.open&&!c&&e.push(\"e\",\"M\",a,b);e.push(\"at\",a-c,b-c,a+c,b+c,a+c*g,b+c*F,a+c*h,b+c*t,\"x\",\"e\");e.isArc=!0;return e},circle:function(a,b,c,h,m){m&&r(m.r)&&\n(c=h=2*m.r);m&&m.isCircle&&(a-=c/2,b-=h/2);return[\"wa\",a,b,a+c,b+h,a+c,b+h/2,a+c,b+h/2,\"e\"]},rect:function(a,b,c,h,m){return D.prototype.symbols[r(m)&&m.r?\"callout\":\"square\"].call(0,a,b,c,h,m)}}},a.VMLRenderer=B=function(){this.init.apply(this,arguments)},B.prototype=b(D.prototype,A),a.Renderer=B);D.prototype.measureSpanWidth=function(a,b){var c=q.createElement(\"span\");a=q.createTextNode(a);c.appendChild(a);G(c,b);this.box.appendChild(c);b=c.offsetWidth;l(c);return b}})(L);(function(a){function B(){var k=\na.defaultOptions.global,f=q.moment;if(k.timezone){if(f)return function(a){return-f.tz(a,k.timezone).utcOffset()};a.error(25)}return k.useUTC&&k.getTimezoneOffset}function A(){var k=a.defaultOptions.global,f,d=k.useUTC,c=d?\"getUTC\":\"get\",n=d?\"setUTC\":\"set\";a.Date=f=k.Date||q.Date;f.hcTimezoneOffset=d&&k.timezoneOffset;f.hcGetTimezoneOffset=B();f.hcMakeTime=function(a,b,c,h,t,n){var p;d?(p=f.UTC.apply(0,arguments),p+=r(p)):p=(new f(a,b,l(c,1),l(h,0),l(t,0),l(n,0))).getTime();return p};G(\"Minutes Hours Day Date Month FullYear\".split(\" \"),\nfunction(a){f[\"hcGet\"+a]=c+a});G(\"Milliseconds Seconds Minutes Hours Date Month FullYear\".split(\" \"),function(a){f[\"hcSet\"+a]=n+a})}var H=a.color,G=a.each,r=a.getTZOffset,f=a.merge,l=a.pick,q=a.win;a.defaultOptions={colors:\"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1\".split(\" \"),symbols:[\"circle\",\"diamond\",\"square\",\"triangle\",\"triangle-down\"],lang:{loading:\"Loading...\",months:\"January February March April May June July August September October November December\".split(\" \"),\nshortMonths:\"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec\".split(\" \"),weekdays:\"Sunday Monday Tuesday Wednesday Thursday Friday Saturday\".split(\" \"),decimalPoint:\".\",numericSymbols:\"kMGTPE\".split(\"\"),resetZoom:\"Reset zoom\",resetZoomTitle:\"Reset zoom level 1:1\",thousandsSep:\" \"},global:{useUTC:!0,VMLRadialGradientURL:\"http://code.highcharts.com/5.0.10/gfx/vml-radial-gradient.png\"},chart:{borderRadius:0,defaultSeriesType:\"line\",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},\nposition:{align:\"right\",x:-10,y:10}},width:null,height:null,borderColor:\"#335cad\",backgroundColor:\"#ffffff\",plotBorderColor:\"#cccccc\"},title:{text:\"Chart title\",align:\"center\",margin:15,widthAdjust:-44},subtitle:{text:\"\",align:\"center\",widthAdjust:-44},plotOptions:{},labels:{style:{position:\"absolute\",color:\"#333333\"}},legend:{enabled:!0,align:\"center\",layout:\"horizontal\",labelFormatter:function(){return this.name},borderColor:\"#999999\",borderRadius:0,navigation:{activeColor:\"#003399\",inactiveColor:\"#cccccc\"},\nitemStyle:{color:\"#333333\",fontSize:\"12px\",fontWeight:\"bold\"},itemHoverStyle:{color:\"#000000\"},itemHiddenStyle:{color:\"#cccccc\"},shadow:!1,itemCheckboxStyle:{position:\"absolute\",width:\"13px\",height:\"13px\"},squareSymbol:!0,symbolPadding:5,verticalAlign:\"bottom\",x:0,y:0,title:{style:{fontWeight:\"bold\"}}},loading:{labelStyle:{fontWeight:\"bold\",position:\"relative\",top:\"45%\"},style:{position:\"absolute\",backgroundColor:\"#ffffff\",opacity:.5,textAlign:\"center\"}},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,\ndateTimeLabelFormats:{millisecond:\"%A, %b %e, %H:%M:%S.%L\",second:\"%A, %b %e, %H:%M:%S\",minute:\"%A, %b %e, %H:%M\",hour:\"%A, %b %e, %H:%M\",day:\"%A, %b %e, %Y\",week:\"Week from %A, %b %e, %Y\",month:\"%B %Y\",year:\"%Y\"},footerFormat:\"\",padding:8,snap:a.isTouchDevice?25:10,backgroundColor:H(\"#f7f7f7\").setOpacity(.85).get(),borderWidth:1,headerFormat:'\\x3cspan style\\x3d\"font-size: 10px\"\\x3e{point.key}\\x3c/span\\x3e\\x3cbr/\\x3e',pointFormat:'\\x3cspan style\\x3d\"color:{point.color}\"\\x3e\\u25cf\\x3c/span\\x3e {series.name}: \\x3cb\\x3e{point.y}\\x3c/b\\x3e\\x3cbr/\\x3e',\nshadow:!0,style:{color:\"#333333\",cursor:\"default\",fontSize:\"12px\",pointerEvents:\"none\",whiteSpace:\"nowrap\"}},credits:{enabled:!0,href:\"http://www.highcharts.com\",position:{align:\"right\",x:-10,verticalAlign:\"bottom\",y:-5},style:{cursor:\"pointer\",color:\"#999999\",fontSize:\"9px\"},text:\"Highcharts.com\"}};a.setOptions=function(k){a.defaultOptions=f(!0,a.defaultOptions,k);A();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;A()})(L);\n(function(a){var B=a.arrayMax,A=a.arrayMin,H=a.defined,G=a.destroyObjectProperties,r=a.each,f=a.erase,l=a.merge,q=a.pick;a.PlotLineOrBand=function(a,f){this.axis=a;f&&(this.options=f,this.id=f.id)};a.PlotLineOrBand.prototype={render:function(){var a=this,f=a.axis,d=f.horiz,c=a.options,n=c.label,z=a.label,b=c.to,p=c.from,h=c.value,t=H(p)&&H(b),D=H(h),w=a.svgElem,e=!w,x=[],C,E=c.color,m=q(c.zIndex,0),y=c.events,x={\"class\":\"highcharts-plot-\"+(t?\"band \":\"line \")+(c.className||\"\")},I={},r=f.chart.renderer,\nJ=t?\"bands\":\"lines\",g=f.log2lin;f.isLog&&(p=g(p),b=g(b),h=g(h));D?(x={stroke:E,\"stroke-width\":c.width},c.dashStyle&&(x.dashstyle=c.dashStyle)):t&&(E&&(x.fill=E),c.borderWidth&&(x.stroke=c.borderColor,x[\"stroke-width\"]=c.borderWidth));I.zIndex=m;J+=\"-\"+m;(E=f.plotLinesAndBandsGroups[J])||(f.plotLinesAndBandsGroups[J]=E=r.g(\"plot-\"+J).attr(I).add());e&&(a.svgElem=w=r.path().attr(x).add(E));if(D)x=f.getPlotLinePath(h,w.strokeWidth());else if(t)x=f.getPlotBandPath(p,b,c);else return;if(e&&x&&x.length){if(w.attr({d:x}),\ny)for(C in c=function(g){w.on(g,function(b){y[g].apply(a,[b])})},y)c(C)}else w&&(x?(w.show(),w.animate({d:x})):(w.hide(),z&&(a.label=z=z.destroy())));n&&H(n.text)&&x&&x.length&&0<f.width&&0<f.height&&!x.flat?(n=l({align:d&&t&&\"center\",x:d?!t&&4:10,verticalAlign:!d&&t&&\"middle\",y:d?t?16:10:t?6:-4,rotation:d&&!t&&90},n),this.renderLabel(n,x,t,m)):z&&z.hide();return a},renderLabel:function(a,f,d,c){var n=this.label,k=this.axis.chart.renderer;n||(n={align:a.textAlign||a.align,rotation:a.rotation,\"class\":\"highcharts-plot-\"+\n(d?\"band\":\"line\")+\"-label \"+(a.className||\"\")},n.zIndex=c,this.label=n=k.text(a.text,0,0,a.useHTML).attr(n).add(),n.css(a.style));c=[f[1],f[4],d?f[6]:f[1]];f=[f[2],f[5],d?f[7]:f[2]];d=A(c);k=A(f);n.align(a,!1,{x:d,y:k,width:B(c)-d,height:B(f)-k});n.show()},destroy:function(){f(this.axis.plotLinesAndBands,this);delete this.axis;G(this)}};a.AxisPlotLineOrBandExtension={getPlotBandPath:function(a,f){var d=this.getPlotLinePath(f,null,null,!0),c=this.getPlotLinePath(a,null,null,!0),n=this.horiz,k=1;a=\na<this.min&&f<this.min||a>this.max&&f>this.max;c&&d?(a&&(c.flat=c.toString()===d.toString(),k=0),c.push(n&&d[4]===c[4]?d[4]+k:d[4],n||d[5]!==c[5]?d[5]:d[5]+k,n&&d[1]===c[1]?d[1]+k:d[1],n||d[2]!==c[2]?d[2]:d[2]+k)):c=null;return c},addPlotBand:function(a){return this.addPlotBandOrLine(a,\"plotBands\")},addPlotLine:function(a){return this.addPlotBandOrLine(a,\"plotLines\")},addPlotBandOrLine:function(f,q){var d=(new a.PlotLineOrBand(this,f)).render(),c=this.userOptions;d&&(q&&(c[q]=c[q]||[],c[q].push(f)),\nthis.plotLinesAndBands.push(d));return d},removePlotBandOrLine:function(a){for(var k=this.plotLinesAndBands,d=this.options,c=this.userOptions,n=k.length;n--;)k[n].id===a&&k[n].destroy();r([d.plotLines||[],c.plotLines||[],d.plotBands||[],c.plotBands||[]],function(c){for(n=c.length;n--;)c[n].id===a&&f(c,c[n])})}}})(L);(function(a){var B=a.correctFloat,A=a.defined,H=a.destroyObjectProperties,G=a.isNumber,r=a.merge,f=a.pick,l=a.deg2rad;a.Tick=function(a,f,l,d){this.axis=a;this.pos=f;this.type=l||\"\";this.isNew=\n!0;l||d||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,k=a.options,l=a.chart,d=a.categories,c=a.names,n=this.pos,z=k.labels,b=a.tickPositions,p=n===b[0],h=n===b[b.length-1],c=d?f(d[n],c[n],n):n,d=this.label,b=b.info,t;a.isDatetimeAxis&&b&&(t=k.dateTimeLabelFormats[b.higherRanks[n]||b.unitName]);this.isFirst=p;this.isLast=h;k=a.labelFormatter.call({axis:a,chart:l,isFirst:p,isLast:h,dateTimeLabelFormat:t,value:a.isLog?B(a.lin2log(c)):c});A(d)?d&&d.attr({text:k}):(this.labelLength=\n(this.label=d=A(k)&&z.enabled?l.renderer.text(k,0,0,z.useHTML).css(r(z.style)).add(a.labelGroup):null)&&d.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?\"height\":\"width\"]:0},handleOverflow:function(a){var k=this.axis,q=a.x,d=k.chart.chartWidth,c=k.chart.spacing,n=f(k.labelLeft,Math.min(k.pos,c[3])),c=f(k.labelRight,Math.max(k.pos+k.len,d-c[1])),z=this.label,b=this.rotation,p={left:0,center:.5,right:1}[k.labelAlign],h=z.getBBox().width,\nt=k.getSlotWidth(),D=t,w=1,e,x={};if(b)0>b&&q-p*h<n?e=Math.round(q/Math.cos(b*l)-n):0<b&&q+p*h>c&&(e=Math.round((d-q)/Math.cos(b*l)));else if(d=q+(1-p)*h,q-p*h<n?D=a.x+D*(1-p)-n:d>c&&(D=c-a.x+D*p,w=-1),D=Math.min(t,D),D<t&&\"center\"===k.labelAlign&&(a.x+=w*(t-D-p*(t-Math.min(h,D)))),h>D||k.autoRotation&&(z.styles||{}).width)e=D;e&&(x.width=e,(k.options.labels.style||{}).textOverflow||(x.textOverflow=\"ellipsis\"),z.css(x))},getPosition:function(a,f,l,d){var c=this.axis,n=c.chart,k=d&&n.oldChartHeight||\nn.chartHeight;return{x:a?c.translate(f+l,null,null,d)+c.transB:c.left+c.offset+(c.opposite?(d&&n.oldChartWidth||n.chartWidth)-c.right-c.left:0),y:a?k-c.bottom+c.offset-(c.opposite?c.height:0):k-c.translate(f+l,null,null,d)-c.transB}},getLabelPosition:function(a,f,u,d,c,n,z,b){var p=this.axis,h=p.transA,t=p.reversed,k=p.staggerLines,w=p.tickRotCorr||{x:0,y:0},e=c.y;A(e)||(e=0===p.side?u.rotation?-8:-u.getBBox().height:2===p.side?w.y+8:Math.cos(u.rotation*l)*(w.y-u.getBBox(!1,0).height/2));a=a+c.x+\nw.x-(n&&d?n*h*(t?-1:1):0);f=f+e-(n&&!d?n*h*(t?1:-1):0);k&&(u=z/(b||1)%k,p.opposite&&(u=k-u-1),f+=p.labelOffset/k*u);return{x:a,y:Math.round(f)}},getMarkPath:function(a,f,l,d,c,n){return n.crispLine([\"M\",a,f,\"L\",a+(c?0:-l),f+(c?l:0)],d)},renderGridLine:function(a,f,l){var d=this.axis,c=d.options,n=this.gridLine,k={},b=this.pos,p=this.type,h=d.tickmarkOffset,t=d.chart.renderer,D=p?p+\"Grid\":\"grid\",w=c[D+\"LineWidth\"],e=c[D+\"LineColor\"],c=c[D+\"LineDashStyle\"];n||(k.stroke=e,k[\"stroke-width\"]=w,c&&(k.dashstyle=\nc),p||(k.zIndex=1),a&&(k.opacity=0),this.gridLine=n=t.path().attr(k).addClass(\"highcharts-\"+(p?p+\"-\":\"\")+\"grid-line\").add(d.gridGroup));if(!a&&n&&(a=d.getPlotLinePath(b+h,n.strokeWidth()*l,a,!0)))n[this.isNew?\"attr\":\"animate\"]({d:a,opacity:f})},renderMark:function(a,k,l){var d=this.axis,c=d.options,n=d.chart.renderer,q=this.type,b=q?q+\"Tick\":\"tick\",p=d.tickSize(b),h=this.mark,t=!h,D=a.x;a=a.y;var w=f(c[b+\"Width\"],!q&&d.isXAxis?1:0),c=c[b+\"Color\"];p&&(d.opposite&&(p[0]=-p[0]),t&&(this.mark=h=n.path().addClass(\"highcharts-\"+\n(q?q+\"-\":\"\")+\"tick\").add(d.axisGroup),h.attr({stroke:c,\"stroke-width\":w})),h[t?\"attr\":\"animate\"]({d:this.getMarkPath(D,a,p[0],h.strokeWidth()*l,d.horiz,n),opacity:k}))},renderLabel:function(a,k,l,d){var c=this.axis,n=c.horiz,q=c.options,b=this.label,p=q.labels,h=p.step,t=c.tickmarkOffset,D=!0,w=a.x;a=a.y;b&&G(w)&&(b.xy=a=this.getLabelPosition(w,a,b,n,p,t,d,h),this.isFirst&&!this.isLast&&!f(q.showFirstLabel,1)||this.isLast&&!this.isFirst&&!f(q.showLastLabel,1)?D=!1:!n||c.isRadial||p.step||p.rotation||\nk||0===l||this.handleOverflow(a),h&&d%h&&(D=!1),D&&G(a.y)?(a.opacity=l,b[this.isNew?\"attr\":\"animate\"](a)):b.attr(\"y\",-9999),this.isNew=!1)},render:function(a,k,l){var d=this.axis,c=d.horiz,n=this.getPosition(c,this.pos,d.tickmarkOffset,k),q=n.x,b=n.y,d=c&&q===d.pos+d.len||!c&&b===d.pos?-1:1;l=f(l,1);this.isActive=!0;this.renderGridLine(k,l,d);this.renderMark(n,l,d);this.renderLabel(n,k,l,a)},destroy:function(){H(this,this.axis)}}})(L);(function(a){var B=a.addEvent,A=a.animObject,H=a.arrayMax,G=a.arrayMin,\nr=a.AxisPlotLineOrBandExtension,f=a.color,l=a.correctFloat,q=a.defaultOptions,k=a.defined,u=a.deg2rad,d=a.destroyObjectProperties,c=a.each,n=a.extend,z=a.fireEvent,b=a.format,p=a.getMagnitude,h=a.grep,t=a.inArray,D=a.isArray,w=a.isNumber,e=a.isString,x=a.merge,C=a.normalizeTickInterval,E=a.pick,m=a.PlotLineOrBand,y=a.removeEvent,I=a.splat,K=a.syncTimeout,J=a.Tick;a.Axis=function(){this.init.apply(this,arguments)};a.Axis.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:\"%H:%M:%S.%L\",second:\"%H:%M:%S\",\nminute:\"%H:%M\",hour:\"%H:%M\",day:\"%e. %b\",week:\"%e. %b\",month:\"%b '%y\",year:\"%Y\"},endOnTick:!1,labels:{enabled:!0,style:{color:\"#666666\",cursor:\"default\",fontSize:\"11px\"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:\"outside\",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:\"between\",tickPixelInterval:100,tickPosition:\"outside\",title:{align:\"middle\",style:{color:\"#666666\"}},type:\"linear\",minorGridLineColor:\"#f2f2f2\",minorGridLineWidth:1,minorTickColor:\"#999999\",\nlineColor:\"#ccd6eb\",lineWidth:1,gridLineColor:\"#e6e6e6\",tickColor:\"#ccd6eb\"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:\"Values\"},stackLabels:{enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:\"11px\",fontWeight:\"bold\",color:\"#000000\",textOutline:\"1px contrast\"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},\ndefaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,b){var g=b.isX;this.chart=a;this.horiz=a.inverted?!g:g;this.isXAxis=g;this.coll=this.coll||(g?\"xAxis\":\"yAxis\");this.opposite=b.opposite;this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(b);var c=this.options,e=c.type;this.labelFormatter=c.labels.formatter||\nthis.defaultLabelFormatter;this.userOptions=b;this.minPixelPadding=0;this.reversed=c.reversed;this.visible=!1!==c.visible;this.zoomEnabled=!1!==c.zoomEnabled;this.hasNames=\"category\"===e||!0===c.categories;this.categories=c.categories||this.hasNames;this.names=this.names||[];this.plotLinesAndBandsGroups={};this.isLog=\"logarithmic\"===e;this.isDatetimeAxis=\"datetime\"===e;this.positiveValuesOnly=this.isLog&&!this.allowNegativeLog;this.isLinked=k(c.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks=\n{};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=c.minRange||c.maxZoom;this.range=c.range;this.offset=c.offset||0;this.stacks={};this.oldStacks={};this.stacksTouched=0;this.min=this.max=null;this.crosshair=E(c.crosshair,I(a.options.tooltip.crosshairs)[g?0:1],!1);var h;b=this.options.events;-1===t(this,a.axes)&&(g?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];a.inverted&&g&&void 0===this.reversed&&\n(this.reversed=!0);this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(h in b)B(this,h,b[h]);this.lin2log=c.linearToLogConverter||this.lin2log;this.isLog&&(this.val2lin=this.log2lin,this.lin2val=this.lin2log)},setOptions:function(a){this.options=x(this.defaultOptions,\"yAxis\"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],x(q[this.coll],a))},defaultLabelFormatter:function(){var g=\nthis.axis,c=this.value,e=g.categories,h=this.dateTimeLabelFormat,m=q.lang,d=m.numericSymbols,m=m.numericSymbolMagnitude||1E3,v=d&&d.length,p,t=g.options.labels.format,g=g.isLog?Math.abs(c):g.tickInterval;if(t)p=b(t,this);else if(e)p=c;else if(h)p=a.dateFormat(h,c);else if(v&&1E3<=g)for(;v--&&void 0===p;)e=Math.pow(m,v+1),g>=e&&0===10*c%e&&null!==d[v]&&0!==c&&(p=a.numberFormat(c/e,-1)+d[v]);void 0===p&&(p=1E4<=Math.abs(c)?a.numberFormat(c,-1):a.numberFormat(c,-1,void 0,\"\"));return p},getSeriesExtremes:function(){var a=\nthis,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();c(a.series,function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var c=g.options,e=c.threshold,m;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=e&&(e=null);if(a.isXAxis)c=g.xData,c.length&&(g=G(c),w(g)||g instanceof Date||(c=h(c,function(a){return w(a)}),g=G(c)),a.dataMin=Math.min(E(a.dataMin,c[0]),g),a.dataMax=Math.max(E(a.dataMax,c[0]),H(c)));else if(g.getExtremes(),\nm=g.dataMax,g=g.dataMin,k(g)&&k(m)&&(a.dataMin=Math.min(E(a.dataMin,g),g),a.dataMax=Math.max(E(a.dataMax,m),m)),k(e)&&(a.threshold=e),!c.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,b,c,e,h,m){var g=this.linkedParent||this,F=1,p=0,d=e?g.oldTransA:g.transA;e=e?g.oldMin:g.min;var t=g.minPixelPadding;h=(g.isOrdinal||g.isBroken||g.isLog&&h)&&g.lin2val;d||(d=g.transA);c&&(F*=-1,p=g.len);g.reversed&&(F*=-1,p-=F*(g.sector||g.len));b?(a=(a*F+p-t)/d+e,h&&(a=g.lin2val(a))):\n(h&&(a=g.val2lin(a)),a=F*(a-e)*d+p+F*t+(w(m)?d*m:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,c,e,h){var g=this.chart,m=this.left,F=this.top,p,d,t=c&&g.oldChartHeight||g.chartHeight,f=c&&g.oldChartWidth||g.chartWidth,n;p=this.transB;var y=function(a,b,g){if(a<b||a>g)e?a=Math.min(Math.max(b,a),g):n=!0;return a};h=E(h,this.translate(a,\nnull,null,c));a=c=Math.round(h+p);p=d=Math.round(t-h-p);w(h)?this.horiz?(p=F,d=t-this.bottom,a=c=y(a,m,m+this.width)):(a=m,c=f-this.right,p=d=y(p,F,F+this.height)):n=!0;return n&&!e?null:g.renderer.crispLine([\"M\",a,p,\"L\",c,d],b||1)},getLinearTickPositions:function(a,b,c){var g,e=l(Math.floor(b/a)*a);c=l(Math.ceil(c/a)*a);var h=[];if(this.single)return[b];for(b=e;b<=c;){h.push(b);b=l(b+a);if(b===g)break;g=b}return h},getMinorTickPositions:function(){var a=this,b=a.options,e=a.tickPositions,h=a.minorTickInterval,\nm=[],p=a.pointRangePadding||0,v=a.min-p,p=a.max+p,d=p-v;if(d&&d/h<a.len/3)if(a.isLog)c(this.paddedTicks,function(b,g,c){g&&m.push.apply(m,a.getLogTickPositions(h,c[g-1],c[g],!0))});else if(a.isDatetimeAxis&&\"auto\"===b.minorTickInterval)m=m.concat(a.getTimeTicks(a.normalizeTimeTickInterval(h),v,p,b.startOfWeek));else for(b=v+(e[0]-v)%h;b<=p&&b!==m[0];b+=h)m.push(b);0!==m.length&&a.trimTicks(m);return m},adjustForMinRange:function(){var a=this.options,b=this.min,e=this.max,h,m=this.dataMax-this.dataMin>=\nthis.minRange,p,v,d,t,f,n;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(k(a.min)||k(a.max)?this.minRange=null:(c(this.series,function(a){t=a.xData;for(v=f=a.xIncrement?1:t.length-1;0<v;v--)if(d=t[v]-t[v-1],void 0===p||d<p)p=d}),this.minRange=Math.min(5*p,this.dataMax-this.dataMin)));e-b<this.minRange&&(n=this.minRange,h=(n-e+b)/2,h=[b-h,E(a.min,b-h)],m&&(h[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),b=H(h),e=[b+n,E(a.max,b+n)],m&&(e[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),\ne=G(e),e-b<n&&(h[0]=e-n,h[1]=E(a.min,e-n),b=H(h)));this.min=b;this.max=e},getClosest:function(){var a;this.categories?a=1:c(this.series,function(b){var g=b.closestPointRange,c=b.visible||!b.chart.options.chart.ignoreHiddenSeries;!b.noSharedTooltip&&k(g)&&c&&(a=k(a)?Math.min(a,g):g)});return a},nameToX:function(a){var b=D(this.categories),g=b?this.categories:this.names,c=a.options.x,e;a.series.requireSorting=!1;k(c)||(c=!1===this.options.uniqueNames?a.series.autoIncrement():t(a.name,g));-1===c?b||\n(e=g.length):e=c;void 0!==e&&(this.names[e]=a.name);return e},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=void 0,c(this.series||[],function(b){b.xIncrement=null;if(!b.points||b.isDirtyData)b.processData(),b.generatePoints();c(b.points,function(g,c){var e;g.options&&(e=a.nameToX(g),void 0!==e&&e!==g.x&&(g.x=e,b.xData[c]=e))})}))},setAxisTranslation:function(a){var b=this,g=b.max-b.min,h=b.axisPointRange||0,m,p=0,v=0,d=b.linkedParent,t=!!b.categories,f=\nb.transA,n=b.isXAxis;if(n||t||h)m=b.getClosest(),d?(p=d.minPointOffset,v=d.pointRangePadding):c(b.series,function(a){var g=t?1:n?E(a.options.pointRange,m,0):b.axisPointRange||0;a=a.options.pointPlacement;h=Math.max(h,g);b.single||(p=Math.max(p,e(a)?0:g/2),v=Math.max(v,\"on\"===a?0:g))}),d=b.ordinalSlope&&m?b.ordinalSlope/m:1,b.minPointOffset=p*=d,b.pointRangePadding=v*=d,b.pointRange=Math.min(h,g),n&&(b.closestPointRange=m);a&&(b.oldTransA=f);b.translationSlope=b.transA=f=b.options.staticScale||b.len/\n(g+v||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=f*p},minFromRange:function(){return this.max-this.range},setTickInterval:function(b){var g=this,e=g.chart,h=g.options,m=g.isLog,d=g.log2lin,v=g.isDatetimeAxis,t=g.isXAxis,f=g.isLinked,n=h.maxPadding,y=h.minPadding,x=h.tickInterval,D=h.tickPixelInterval,I=g.categories,q=g.threshold,u=g.softThreshold,r,K,J,A;v||I||f||this.getTickAmount();J=E(g.userMin,h.min);A=E(g.userMax,h.max);f?(g.linkedParent=e[g.coll][h.linkedTo],e=g.linkedParent.getExtremes(),\ng.min=E(e.min,e.dataMin),g.max=E(e.max,e.dataMax),h.type!==g.linkedParent.options.type&&a.error(11,1)):(!u&&k(q)&&(g.dataMin>=q?(r=q,y=0):g.dataMax<=q&&(K=q,n=0)),g.min=E(J,r,g.dataMin),g.max=E(A,K,g.dataMax));m&&(g.positiveValuesOnly&&!b&&0>=Math.min(g.min,E(g.dataMin,g.min))&&a.error(10,1),g.min=l(d(g.min),15),g.max=l(d(g.max),15));g.range&&k(g.max)&&(g.userMin=g.min=J=Math.max(g.min,g.minFromRange()),g.userMax=A=g.max,g.range=null);z(g,\"foundExtremes\");g.beforePadding&&g.beforePadding();g.adjustForMinRange();\n!(I||g.axisPointRange||g.usePercentage||f)&&k(g.min)&&k(g.max)&&(d=g.max-g.min)&&(!k(J)&&y&&(g.min-=d*y),!k(A)&&n&&(g.max+=d*n));w(h.softMin)&&(g.min=Math.min(g.min,h.softMin));w(h.softMax)&&(g.max=Math.max(g.max,h.softMax));w(h.floor)&&(g.min=Math.max(g.min,h.floor));w(h.ceiling)&&(g.max=Math.min(g.max,h.ceiling));u&&k(g.dataMin)&&(q=q||0,!k(J)&&g.min<q&&g.dataMin>=q?g.min=q:!k(A)&&g.max>q&&g.dataMax<=q&&(g.max=q));g.tickInterval=g.min===g.max||void 0===g.min||void 0===g.max?1:f&&!x&&D===g.linkedParent.options.tickPixelInterval?\nx=g.linkedParent.tickInterval:E(x,this.tickAmount?(g.max-g.min)/Math.max(this.tickAmount-1,1):void 0,I?1:(g.max-g.min)*D/Math.max(g.len,D));t&&!b&&c(g.series,function(a){a.processData(g.min!==g.oldMin||g.max!==g.oldMax)});g.setAxisTranslation(!0);g.beforeSetTickPositions&&g.beforeSetTickPositions();g.postProcessTickInterval&&(g.tickInterval=g.postProcessTickInterval(g.tickInterval));g.pointRange&&!x&&(g.tickInterval=Math.max(g.pointRange,g.tickInterval));b=E(h.minTickInterval,g.isDatetimeAxis&&g.closestPointRange);\n!x&&g.tickInterval<b&&(g.tickInterval=b);v||m||x||(g.tickInterval=C(g.tickInterval,null,p(g.tickInterval),E(h.allowDecimals,!(.5<g.tickInterval&&5>g.tickInterval&&1E3<g.max&&9999>g.max)),!!this.tickAmount));this.tickAmount||(g.tickInterval=g.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b,c=a.tickPositions,e=a.tickPositioner,h=a.startOnTick,m=a.endOnTick;this.tickmarkOffset=this.categories&&\"between\"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval=\n\"auto\"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.single=this.min===this.max&&k(this.min)&&!this.tickAmount&&!1!==a.allowDecimals;this.tickPositions=b=c&&c.slice();!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,\nthis.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,e&&(e=e.apply(this,[this.min,this.max])))&&(this.tickPositions=b=e);this.paddedTicks=b.slice(0);this.trimTicks(b,h,m);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),c||e||this.adjustTickAmount())},trimTicks:function(a,b,c){var g=a[0],e=a[a.length-1],h=this.minPointOffset||0;if(!this.isLinked){if(b&&-Infinity!==g)this.min=g;else for(;this.min-h>a[0];)a.shift();if(c)this.max=e;else for(;this.max+h<a[a.length-1];)a.pop();\n0===a.length&&k(g)&&a.push((e+g)/2)}},alignToOthers:function(){var a={},b,e=this.options;!1===this.chart.options.chart.alignTicks||!1===e.alignTicks||this.isLog||c(this.chart[this.coll],function(g){var c=g.options,c=[g.horiz?c.left:c.top,c.width,c.height,c.pane].join();g.series.length&&(a[c]?b=!0:a[c]=1)});return b},getTickAmount:function(){var a=this.options,b=a.tickAmount,c=a.tickPixelInterval;!k(a.tickInterval)&&this.len<c&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(b=2);!b&&this.alignToOthers()&&\n(b=Math.ceil(this.len/c)+1);4>b&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,c=this.tickAmount,e=this.finalTickAmt,h=b&&b.length;if(h<c){for(;b.length<c;)b.push(l(b[b.length-1]+a));this.transA*=(h-1)/(c-1);this.max=b[b.length-1]}else h>c&&(this.tickInterval*=2,this.setTickPositions());if(k(e)){for(a=c=b.length;a--;)(3===e&&1===a%2||2>=e&&0<a&&a<c-1)&&b.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,b;this.oldMin=\nthis.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();b=this.len!==this.oldAxisLength;c(this.series,function(b){if(b.isDirtyData||b.isDirty||b.xAxis.isDirty)a=!0});b||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=\nb||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,b,e,h,m){var g=this,p=g.chart;e=E(e,!0);c(g.series,function(a){delete a.kdTree});m=n(m,{min:a,max:b});z(g,\"setExtremes\",m,function(){g.userMin=a;g.userMax=b;g.eventArgs=m;e&&p.redraw(h)})},zoom:function(a,b){var g=this.dataMin,c=this.dataMax,e=this.options,h=Math.min(g,E(e.min,g)),e=Math.max(c,E(e.max,c));if(a!==this.min||b!==this.max)this.allowZoomOutside||(k(g)&&(a<h&&(a=h),a>e&&(a=e)),\nk(c)&&(b<h&&(b=h),b>e&&(b=e))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:\"zoom\"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsets||[0,0,0,0],e=this.horiz,h=E(b.width,a.plotWidth-c[3]+c[1]),m=E(b.height,a.plotHeight-c[0]+c[2]),p=E(b.top,a.plotTop+c[0]),b=E(b.left,a.plotLeft+c[3]),c=/%$/;c.test(m)&&(m=Math.round(parseFloat(m)/100*a.plotHeight));c.test(p)&&(p=Math.round(parseFloat(p)/100*a.plotHeight+a.plotTop));this.left=b;this.top=p;\nthis.width=h;this.height=m;this.bottom=a.chartHeight-m-p;this.right=a.chartWidth-h-b;this.len=Math.max(e?h:m,0);this.pos=e?b:p},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?l(b(this.min)):this.min,max:a?l(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,g=this.lin2log,c=b?g(this.min):this.min,b=b?g(this.max):this.max;null===a?a=c:c>a?a=c:b<a&&(a=b);return this.translate(a,0,\n1,0,1)},autoLabelAlign:function(a){a=(E(a,0)-90*this.side+720)%360;return 15<a&&165>a?\"right\":195<a&&345>a?\"left\":\"center\"},tickSize:function(a){var b=this.options,g=b[a+\"Length\"],c=E(b[a+\"Width\"],\"tick\"===a&&this.isXAxis?1:0);if(c&&g)return\"inside\"===b[a+\"Position\"]&&(g=-g),[g,c]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[0]&&this.ticks[0].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,\ne=this.tickInterval,h=e,m=this.len/(((this.categories?1:0)+this.max-this.min)/e),p,d=a.rotation,t=this.labelMetrics(),f,n=Number.MAX_VALUE,y,w=function(a){a/=m||1;a=1<a?Math.ceil(a):1;return a*e};b?(y=!a.staggerLines&&!a.step&&(k(d)?[d]:m<E(a.autoRotationLimit,80)&&a.autoRotation))&&c(y,function(a){var b;if(a===d||a&&-90<=a&&90>=a)f=w(Math.abs(t.h/Math.sin(u*a))),b=f+Math.abs(a/360),b<n&&(n=b,p=a,h=f)}):a.step||(h=w(t.h));this.autoRotation=y;this.labelRotation=E(p,d);return h},getSlotWidth:function(){var a=\nthis.chart,b=this.horiz,c=this.options.labels,e=Math.max(this.tickPositions.length-(this.categories?0:1),1),h=a.margin[3];return b&&2>(c.step||0)&&!c.rotation&&(this.staggerLines||1)*this.len/e||!b&&(h&&h-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,h=this.tickPositions,m=this.ticks,p=this.options.labels,d=this.horiz,v=this.getSlotWidth(),t=Math.max(1,Math.round(v-2*(p.padding||5))),f={},n=this.labelMetrics(),y=p.style&&p.style.textOverflow,k,w=0,D,l;e(p.rotation)||\n(f.rotation=p.rotation||0);c(h,function(a){(a=m[a])&&a.labelLength>w&&(w=a.labelLength)});this.maxLabelLength=w;if(this.autoRotation)w>t&&w>n.h?f.rotation=this.labelRotation:this.labelRotation=0;else if(v&&(k={width:t+\"px\"},!y))for(k.textOverflow=\"clip\",D=h.length;!d&&D--;)if(l=h[D],t=m[l].label)t.styles&&\"ellipsis\"===t.styles.textOverflow?t.css({textOverflow:\"clip\"}):m[l].labelLength>v&&t.css({width:v+\"px\"}),t.getBBox().height>this.len/h.length-(n.h-n.f)&&(t.specCss={textOverflow:\"ellipsis\"});f.rotation&&\n(k={width:(w>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+\"px\"},y||(k.textOverflow=\"ellipsis\"));if(this.labelAlign=p.align||this.autoLabelAlign(this.labelRotation))f.align=this.labelAlign;c(h,function(a){var b=(a=m[a])&&a.label;b&&(b.attr(f),k&&b.css(x(k,b.specCss)),delete b.specCss,a.rotation=f.rotation)});this.tickRotCorr=b.rotCorr(n.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||k(this.min)&&k(this.max)&&!!this.tickPositions},addTitle:function(a){var b=\nthis.chart.renderer,c=this.horiz,g=this.opposite,e=this.options.title,h;this.axisTitle||((h=e.textAlign)||(h=(c?{low:\"left\",middle:\"center\",high:\"right\"}:{low:g?\"right\":\"left\",middle:\"center\",high:g?\"left\":\"right\"})[e.align]),this.axisTitle=b.text(e.text,0,0,e.useHTML).attr({zIndex:7,rotation:e.rotation||0,align:h}).addClass(\"highcharts-axis-title\").css(e.style).add(this.axisGroup),this.axisTitle.isNew=!0);this.axisTitle[a?\"show\":\"hide\"](!0)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel():\nb[a]=new J(this,a)},getOffset:function(){var a=this,b=a.chart,e=b.renderer,h=a.options,m=a.tickPositions,p=a.ticks,d=a.horiz,t=a.side,f=b.inverted?[1,0,3,2][t]:t,n,y,w=0,x,D=0,l=h.title,C=h.labels,q=0,I=b.axisOffset,b=b.clipOffset,u=[-1,1,1,-1][t],z,r=h.className,K=a.axisParent,J=this.tickSize(\"tick\");n=a.hasData();a.showAxis=y=n||E(h.showEmpty,!0);a.staggerLines=a.horiz&&C.staggerLines;a.axisGroup||(a.gridGroup=e.g(\"grid\").attr({zIndex:h.gridZIndex||1}).addClass(\"highcharts-\"+this.coll.toLowerCase()+\n\"-grid \"+(r||\"\")).add(K),a.axisGroup=e.g(\"axis\").attr({zIndex:h.zIndex||2}).addClass(\"highcharts-\"+this.coll.toLowerCase()+\" \"+(r||\"\")).add(K),a.labelGroup=e.g(\"axis-labels\").attr({zIndex:C.zIndex||7}).addClass(\"highcharts-\"+a.coll.toLowerCase()+\"-labels \"+(r||\"\")).add(K));if(n||a.isLinked)c(m,function(b,c){a.generateTick(b,c)}),a.renderUnsquish(),!1===C.reserveSpace||0!==t&&2!==t&&{1:\"left\",3:\"right\"}[t]!==a.labelAlign&&\"center\"!==a.labelAlign||c(m,function(a){q=Math.max(p[a].getLabelSize(),q)}),\na.staggerLines&&(q*=a.staggerLines,a.labelOffset=q*(a.opposite?-1:1));else for(z in p)p[z].destroy(),delete p[z];l&&l.text&&!1!==l.enabled&&(a.addTitle(y),y&&(w=a.axisTitle.getBBox()[d?\"height\":\"width\"],x=l.offset,D=k(x)?0:E(l.margin,d?5:10)));a.renderLine();a.offset=u*E(h.offset,I[t]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};e=0===t?-a.labelMetrics().h:2===t?a.tickRotCorr.y:0;D=Math.abs(q)+D;q&&(D=D-e+u*(d?E(C.y,a.tickRotCorr.y+8*u):C.x));a.axisTitleMargin=E(x,D);I[t]=Math.max(I[t],a.axisTitleMargin+\nw+u*a.offset,D,n&&m.length&&J?J[0]+u*a.offset:0);h=h.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[f]=Math.max(b[f],h)},getLinePath:function(a){var b=this.chart,c=this.opposite,g=this.offset,e=this.horiz,h=this.left+(c?this.width:0)+g,g=b.chartHeight-this.bottom-(c?this.height:0)+g;c&&(a*=-1);return b.renderer.crispLine([\"M\",e?this.left:h,e?g:this.top,\"L\",e?b.chartWidth-this.right:h,e?g:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass(\"highcharts-axis-line\").add(this.axisGroup),\nthis.axisLine.attr({stroke:this.options.lineColor,\"stroke-width\":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,e=this.len,h=this.options.title,m=a?b:c,p=this.opposite,d=this.offset,t=h.x||0,f=h.y||0,n=this.chart.renderer.fontMetrics(h.style&&h.style.fontSize,this.axisTitle).f,e={low:m+(a?0:e),middle:m+e/2,high:m+(a?e:0)}[h.align],b=(a?c+this.height:b)+(a?1:-1)*(p?-1:1)*this.axisTitleMargin+(2===this.side?n:0);return{x:a?e+t:b+(p?this.width:\n0)+d+t,y:a?b+f-(p?this.height:0)+d:e+f}},renderMinorTick:function(a){var b=this.chart.hasRendered&&w(this.oldMin),c=this.minorTicks;c[a]||(c[a]=new J(this,a,\"minor\"));b&&c[a].isNew&&c[a].render(null,!0);c[a].render(null,!1,1)},renderTick:function(a,b){var c=this.isLinked,g=this.ticks,e=this.chart.hasRendered&&w(this.oldMin);if(!c||a>=this.min&&a<=this.max)g[a]||(g[a]=new J(this,a)),e&&g[a].isNew&&g[a].render(b,!0,.1),g[a].render(b)},render:function(){var a=this,b=a.chart,e=a.options,h=a.isLog,p=a.lin2log,\nd=a.isLinked,t=a.tickPositions,f=a.axisTitle,n=a.ticks,y=a.minorTicks,k=a.alternateBands,w=e.stackLabels,x=e.alternateGridColor,D=a.tickmarkOffset,l=a.axisLine,C=a.showAxis,q=A(b.renderer.globalAnimation),I,E;a.labelEdge.length=0;a.overlap=!1;c([n,y,k],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||d)a.minorTickInterval&&!a.categories&&c(a.getMinorTickPositions(),function(b){a.renderMinorTick(b)}),t.length&&(c(t,function(b,c){a.renderTick(b,c)}),D&&(0===a.min||a.single)&&(n[-1]||(n[-1]=\nnew J(a,-1,null,!0)),n[-1].render(-1))),x&&c(t,function(c,e){E=void 0!==t[e+1]?t[e+1]+D:a.max-D;0===e%2&&c<a.max&&E<=a.max+(b.polar?-D:D)&&(k[c]||(k[c]=new m(a)),I=c+D,k[c].options={from:h?p(I):I,to:h?p(E):E,color:x},k[c].render(),k[c].isActive=!0)}),a._addedPlotLB||(c((e.plotLines||[]).concat(e.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0);c([n,y,k],function(a){var c,e,g=[],h=q.duration;for(c in a)a[c].isActive||(a[c].render(c,!1,0),a[c].isActive=!1,g.push(c));K(function(){for(e=\ng.length;e--;)a[g[e]]&&!a[g[e]].isActive&&(a[g[e]].destroy(),delete a[g[e]])},a!==k&&b.hasRendered&&h?h:0)});l&&(l[l.isPlaced?\"animate\":\"attr\"]({d:this.getLinePath(l.strokeWidth())}),l.isPlaced=!0,l[C?\"show\":\"hide\"](!0));f&&C&&(f[f.isNew?\"attr\":\"animate\"](a.getTitlePosition()),f.isNew=!1);w&&w.enabled&&a.renderStackTotals();a.isDirty=!1},redraw:function(){this.visible&&(this.render(),c(this.plotLinesAndBands,function(a){a.render()}));c(this.series,function(a){a.isDirty=!0})},keepProps:\"extKey hcEvents names series userMax userMin\".split(\" \"),\ndestroy:function(a){var b=this,e=b.stacks,g,h=b.plotLinesAndBands,m,p;a||y(b);for(g in e)d(e[g]),e[g]=null;c([b.ticks,b.minorTicks,b.alternateBands],function(a){d(a)});if(h)for(a=h.length;a--;)h[a].destroy();c(\"stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross\".split(\" \"),function(a){b[a]&&(b[a]=b[a].destroy())});for(m in b.plotLinesAndBandsGroups)b.plotLinesAndBandsGroups[m]=b.plotLinesAndBandsGroups[m].destroy();for(p in b)b.hasOwnProperty(p)&&-1===t(p,b.keepProps)&&delete b[p]},\ndrawCrosshair:function(a,b){var c,e=this.crosshair,g=E(e.snap,!0),h,m=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(k(b)||!g)?(g?k(b)&&(h=this.isXAxis?b.plotX:this.len-b.plotY):h=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),k(h)&&(c=this.getPlotLinePath(b&&(this.isXAxis?b.x:E(b.stackY,b.y)),null,null,null,h)||null),k(c)?(b=this.categories&&!this.isRadial,m||(this.cross=m=this.chart.renderer.path().addClass(\"highcharts-crosshair highcharts-crosshair-\"+(b?\"category \":\n\"thin \")+e.className).attr({zIndex:E(e.zIndex,2)}).add(),m.attr({stroke:e.color||(b?f(\"#ccd6eb\").setOpacity(.25).get():\"#cccccc\"),\"stroke-width\":E(e.width,1)}),e.dashStyle&&m.attr({dashstyle:e.dashStyle})),m.show().attr({d:c}),b&&!e.width&&m.attr({\"stroke-width\":this.transA}),this.cross.e=a):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}};n(a.Axis.prototype,r)})(L);(function(a){var B=a.Axis,A=a.Date,H=a.dateFormat,G=a.defaultOptions,r=a.defined,\nf=a.each,l=a.extend,q=a.getMagnitude,k=a.getTZOffset,u=a.normalizeTickInterval,d=a.pick,c=a.timeUnits;B.prototype.getTimeTicks=function(a,q,b,p){var h=[],t={},n=G.global.useUTC,w,e=new A(q-Math.abs(k(q))),x=A.hcMakeTime,C=a.unitRange,E=a.count,m;if(r(q)){e[A.hcSetMilliseconds](C>=c.second?0:E*Math.floor(e.getMilliseconds()/E));if(C>=c.second)e[A.hcSetSeconds](C>=c.minute?0:E*Math.floor(e.getSeconds()/E));if(C>=c.minute)e[A.hcSetMinutes](C>=c.hour?0:E*Math.floor(e[A.hcGetMinutes]()/E));if(C>=c.hour)e[A.hcSetHours](C>=\nc.day?0:E*Math.floor(e[A.hcGetHours]()/E));if(C>=c.day)e[A.hcSetDate](C>=c.month?1:E*Math.floor(e[A.hcGetDate]()/E));C>=c.month&&(e[A.hcSetMonth](C>=c.year?0:E*Math.floor(e[A.hcGetMonth]()/E)),w=e[A.hcGetFullYear]());if(C>=c.year)e[A.hcSetFullYear](w-w%E);if(C===c.week)e[A.hcSetDate](e[A.hcGetDate]()-e[A.hcGetDay]()+d(p,1));w=e[A.hcGetFullYear]();p=e[A.hcGetMonth]();var y=e[A.hcGetDate](),I=e[A.hcGetHours]();if(A.hcTimezoneOffset||A.hcGetTimezoneOffset)m=(!n||!!A.hcGetTimezoneOffset)&&(b-q>4*c.month||\nk(q)!==k(b)),e=e.getTime(),e=new A(e+k(e));n=e.getTime();for(q=1;n<b;)h.push(n),n=C===c.year?x(w+q*E,0):C===c.month?x(w,p+q*E):!m||C!==c.day&&C!==c.week?m&&C===c.hour?x(w,p,y,I+q*E):n+C*E:x(w,p,y+q*E*(C===c.day?1:7)),q++;h.push(n);C<=c.hour&&1E4>h.length&&f(h,function(a){0===a%18E5&&\"000000000\"===H(\"%H%M%S%L\",a)&&(t[a]=\"day\")})}h.info=l(a,{higherRanks:t,totalRange:C*E});return h};B.prototype.normalizeTimeTickInterval=function(a,d){var b=d||[[\"millisecond\",[1,2,5,10,20,25,50,100,200,500]],[\"second\",\n[1,2,5,10,15,30]],[\"minute\",[1,2,5,10,15,30]],[\"hour\",[1,2,3,4,6,8,12]],[\"day\",[1,2]],[\"week\",[1,2]],[\"month\",[1,2,3,4,6]],[\"year\",null]];d=b[b.length-1];var p=c[d[0]],h=d[1],t;for(t=0;t<b.length&&!(d=b[t],p=c[d[0]],h=d[1],b[t+1]&&a<=(p*h[h.length-1]+c[b[t+1][0]])/2);t++);p===c.year&&a<5*p&&(h=[1,2,5]);a=u(a/p,h,\"year\"===d[0]?Math.max(q(a/p),1):1);return{unitRange:p,count:a,unitName:d[0]}}})(L);(function(a){var B=a.Axis,A=a.getMagnitude,H=a.map,G=a.normalizeTickInterval,r=a.pick;B.prototype.getLogTickPositions=\nfunction(a,l,q,k){var f=this.options,d=this.len,c=this.lin2log,n=this.log2lin,z=[];k||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),z=this.getLinearTickPositions(a,l,q);else if(.08<=a)for(var d=Math.floor(l),b,p,h,t,D,f=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];d<q+1&&!D;d++)for(p=f.length,b=0;b<p&&!D;b++)h=n(c(d)*f[b]),h>l&&(!k||t<=q)&&void 0!==t&&z.push(t),t>q&&(D=!0),t=h;else l=c(l),q=c(q),a=f[k?\"minorTickInterval\":\"tickInterval\"],a=r(\"auto\"===a?null:a,this._minorAutoInterval,\nf.tickPixelInterval/(k?5:1)*(q-l)/((k?d/this.tickPositions.length:d)||1)),a=G(a,null,A(a)),z=H(this.getLinearTickPositions(a,l,q),n),k||(this._minorAutoInterval=a/5);k||(this.tickInterval=a);return z};B.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};B.prototype.lin2log=function(a){return Math.pow(10,a)}})(L);(function(a){var B=a.dateFormat,A=a.each,H=a.extend,G=a.format,r=a.isNumber,f=a.map,l=a.merge,q=a.pick,k=a.splat,u=a.syncTimeout,d=a.timeUnits;a.Tooltip=function(){this.init.apply(this,\narguments)};a.Tooltip.prototype={init:function(a,d){this.chart=a;this.options=d;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=d.split&&!a.inverted;this.shared=d.shared||this.split},cleanSplit:function(a){A(this.chart.series,function(c){var d=c&&c.tt;d&&(!d.isActive||a?c.tt=d.destroy():d.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,d=this.options;this.label||(this.split?this.label=a.g(\"tooltip\"):(this.label=a.label(\"\",0,0,d.shape||\"callout\",null,null,d.useHTML,\nnull,\"tooltip\").attr({padding:d.padding,r:d.borderRadius}),this.label.attr({fill:d.backgroundColor,\"stroke-width\":d.borderWidth}).css(d.style).shadow(d.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();this.init(this.chart,l(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},\nmove:function(a,d,f,b){var c=this,h=c.now,t=!1!==c.options.animation&&!c.isHidden&&(1<Math.abs(a-h.x)||1<Math.abs(d-h.y)),n=c.followPointer||1<c.len;H(h,{x:t?(2*h.x+a)/3:a,y:t?(h.y+d)/2:d,anchorX:n?void 0:t?(2*h.anchorX+f)/3:f,anchorY:n?void 0:t?(h.anchorY+b)/2:b});c.getLabel().attr(h);t&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){c&&c.move(a,d,f,b)},32))},hide:function(a){var c=this;clearTimeout(this.hideTimer);a=q(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=\nu(function(){c.getLabel()[a?\"fadeOut\":\"hide\"]();c.isHidden=!0},a))},getAnchor:function(a,d){var c,b=this.chart,p=b.inverted,h=b.plotTop,t=b.plotLeft,n=0,w=0,e,x;a=k(a);c=a[0].tooltipPos;this.followPointer&&d&&(void 0===d.chartX&&(d=b.pointer.normalize(d)),c=[d.chartX-b.plotLeft,d.chartY-h]);c||(A(a,function(a){e=a.series.yAxis;x=a.series.xAxis;n+=a.plotX+(!p&&x?x.left-t:0);w+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!p&&e?e.top-h:0)}),n/=a.length,w/=a.length,c=[p?b.plotWidth-w:n,this.shared&&\n!p&&1<a.length&&d?d.chartY-h:p?b.plotHeight-n:w]);return f(c,Math.round)},getPosition:function(a,d,f){var b=this.chart,c=this.distance,h={},t=f.h||0,n,k=[\"y\",b.chartHeight,d,f.plotY+b.plotTop,b.plotTop,b.plotTop+b.plotHeight],e=[\"x\",b.chartWidth,a,f.plotX+b.plotLeft,b.plotLeft,b.plotLeft+b.plotWidth],x=!this.followPointer&&q(f.ttBelow,!b.inverted===!!f.negative),l=function(a,b,e,g,m,d){var p=e<g-c,f=g+c+e<b,n=g-c-e;g+=c;if(x&&f)h[a]=g;else if(!x&&p)h[a]=n;else if(p)h[a]=Math.min(d-e,0>n-t?n:n-t);\nelse if(f)h[a]=Math.max(m,g+t+e>b?g:g+t);else return!1},E=function(a,b,e,g){var m;g<c||g>b-c?m=!1:h[a]=g<e/2?1:g>b-e/2?b-e-2:g-e/2;return m},m=function(a){var b=k;k=e;e=b;n=a},y=function(){!1!==l.apply(0,k)?!1!==E.apply(0,e)||n||(m(!0),y()):n?h.x=h.y=0:(m(!0),y())};(b.inverted||1<this.len)&&m();y();return h},defaultFormatter:function(a){var c=this.points||k(this),d;d=[a.tooltipFooterHeaderFormatter(c[0])];d=d.concat(a.bodyFormatter(c));d.push(a.tooltipFooterHeaderFormatter(c[0],!0));return d},refresh:function(a,\nd){var c,b=this.options,p,h=a,t,f={},n=[];c=b.formatter||this.defaultFormatter;var f=this.shared,e;clearTimeout(this.hideTimer);this.followPointer=k(h)[0].series.tooltipOptions.followPointer;t=this.getAnchor(h,d);d=t[0];p=t[1];!f||h.series&&h.series.noSharedTooltip?f=h.getLabelConfig():(A(h,function(a){a.setState(\"hover\");n.push(a.getLabelConfig())}),f={x:h[0].category,y:h[0].y},f.points=n,h=h[0]);this.len=n.length;f=c.call(f,this);e=h.series;this.distance=q(e.tooltipOptions.distance,16);!1===f?this.hide():\n(c=this.getLabel(),this.isHidden&&c.attr({opacity:1}).show(),this.split?this.renderSplit(f,a):(c.attr({text:f&&f.join?f.join(\"\"):f}),c.removeClass(/highcharts-color-[\\d]+/g).addClass(\"highcharts-color-\"+q(h.colorIndex,e.colorIndex)),c.attr({stroke:b.borderColor||h.color||e.color||\"#666666\"}),this.updatePosition({plotX:d,plotY:p,negative:h.negative,ttBelow:h.ttBelow,h:t[2]||0})),this.isHidden=!1)},renderSplit:function(c,d){var f=this,b=[],p=this.chart,h=p.renderer,t=!0,n=this.options,k,e=this.getLabel();\nA(c.slice(0,d.length+1),function(a,c){c=d[c-1]||{isHeader:!0,plotX:d[0].plotX};var w=c.series||f,m=w.tt,y=c.series||{},x=\"highcharts-color-\"+q(c.colorIndex,y.colorIndex,\"none\");m||(w.tt=m=h.label(null,null,null,\"callout\").addClass(\"highcharts-tooltip-box \"+x).attr({padding:n.padding,r:n.borderRadius,fill:n.backgroundColor,stroke:c.color||y.color||\"#333333\",\"stroke-width\":n.borderWidth}).add(e));m.isActive=!0;m.attr({text:a});m.css(n.style);a=m.getBBox();y=a.width+m.strokeWidth();c.isHeader?(k=a.height,\ny=Math.max(0,Math.min(c.plotX+p.plotLeft-y/2,p.chartWidth-y))):y=c.plotX+p.plotLeft-q(n.distance,16)-y;0>y&&(t=!1);a=(c.series&&c.series.yAxis&&c.series.yAxis.pos)+(c.plotY||0);a-=p.plotTop;b.push({target:c.isHeader?p.plotHeight+k:a,rank:c.isHeader?1:0,size:w.tt.getBBox().height+1,point:c,x:y,tt:m})});this.cleanSplit();a.distribute(b,p.plotHeight+k);A(b,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?\"hidden\":\"inherit\",x:t||b.isHeader?a.x:b.plotX+p.plotLeft+q(n.distance,\n16),y:a.pos+p.plotTop,anchorX:b.isHeader?b.plotX+p.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?a.pos+p.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var c=this.chart,d=this.getLabel(),d=(this.options.positioner||this.getPosition).call(this,d.width,d.height,a);this.move(Math.round(d.x),Math.round(d.y||0),a.plotX+c.plotLeft,a.plotY+c.plotTop)},getDateFormat:function(a,f,k,b){var c=B(\"%m-%d %H:%M:%S.%L\",f),h,t,n={millisecond:15,second:12,minute:9,hour:6,day:3},w=\"millisecond\";for(t in d){if(a===\nd.week&&+B(\"%w\",f)===k&&\"00:00:00.000\"===c.substr(6)){t=\"week\";break}if(d[t]>a){t=w;break}if(n[t]&&c.substr(n[t])!==\"01-01 00:00:00.000\".substr(n[t]))break;\"week\"!==t&&(w=t)}t&&(h=b[t]);return h},getXDateFormat:function(a,d,f){d=d.dateTimeLabelFormats;var b=f&&f.closestPointRange;return(b?this.getDateFormat(b,a.x,f.options.startOfWeek,d):d.day)||d.year},tooltipFooterHeaderFormatter:function(a,d){var c=d?\"footer\":\"header\";d=a.series;var b=d.tooltipOptions,p=b.xDateFormat,h=d.xAxis,t=h&&\"datetime\"===\nh.options.type&&r(a.key),c=b[c+\"Format\"];t&&!p&&(p=this.getXDateFormat(a,b,h));t&&p&&(c=c.replace(\"{point.key}\",\"{point.key:\"+p+\"}\"));return G(c,{point:a,series:d})},bodyFormatter:function(a){return f(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}}})(L);(function(a){var B=a.addEvent,A=a.attr,H=a.charts,G=a.color,r=a.css,f=a.defined,l=a.doc,q=a.each,k=a.extend,u=a.fireEvent,d=a.offset,c=a.pick,n=a.removeEvent,z=a.splat,\nb=a.Tooltip,p=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,d){this.options=d;this.chart=a;this.runChartClick=d.chart.events&&!!d.chart.events.click;this.pinchDown=[];this.lastValidTouch={};b&&d.tooltip.enabled&&(a.tooltip=new b(a,d.tooltip),this.followTouchMove=c(d.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,h=b.options.chart,d=h.zoomType||\"\",b=b.inverted;/touch/.test(a.type)&&(d=c(h.pinchType,d));this.zoomX=a=/x/.test(d);\nthis.zoomY=d=/y/.test(d);this.zoomHor=a&&!b||d&&b;this.zoomVert=d&&!b||a&&b;this.hasZoom=a||d},normalize:function(a,b){var c,h;a=a||p.event;a.target||(a.target=a.srcElement);h=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=d(this.chart.container));void 0===h.pageX?(c=Math.max(a.x,a.clientX-b.left),b=a.y):(c=h.pageX-b.left,b=h.pageY-b.top);return k(a,{chartX:Math.round(c),chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};q(this.chart.axes,\nfunction(c){b[c.isXAxis?\"xAxis\":\"yAxis\"].push({axis:c,value:c.toValue(a[c.horiz?\"chartX\":\"chartY\"])})});return b},getKDPoints:function(a,b,d){var h=[],e,p,f;q(a,function(a){e=a.noSharedTooltip&&b;p=!b&&a.directTouch;a.visible&&!p&&c(a.options.enableMouseTracking,!0)&&(f=a.searchPoint(d,!e&&0>a.options.findNearestPointBy.indexOf(\"y\")))&&f.series&&h.push(f)});h.sort(function(a,c){var e=a.distX-c.distX,h=a.dist-c.dist,m=(c.series.group&&c.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);\nreturn 0!==e&&b?e:0!==h?h:0!==m?m:a.series.index>c.series.index?-1:1});if(b&&h[0]&&!h[0].series.noSharedTooltip)for(a=h.length;a--;)(h[a].x!==h[0].x||h[a].series.noSharedTooltip)&&h.splice(a,1);return h},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getHoverData:function(b,d,p,f,e,n){var h=b,t=d,m;f?e?(m=[],q(p,function(a){var b=a.noSharedTooltip&&e,d=!e&&a.directTouch;a.visible&&!b&&!d&&c(a.options.enableMouseTracking,!0)&&(a=a.searchKDTree({clientX:h.clientX,\nplotY:h.plotY},!b&&1===a.kdDimensions))&&a.series&&m.push(a)}),0===m.length&&(m=[h])):m=[h]:t&&!t.stickyTracking?(e||(p=[t]),m=this.getKDPoints(p,e,n),h=a.find(m,function(a){return a.series===t})):(b=a.grep(p,function(a){return a.stickyTracking}),m=this.getKDPoints(b,e,n),t=(h=m[0])&&h.series,e&&(m=this.getKDPoints(p,e,n)));m.sort(function(a,b){return a.series.index-b.series.index});return{hoverPoint:h,hoverSeries:t,hoverPoints:m}},runPointActions:function(b,d){var h=this.chart,p=h.tooltip,e=p?p.shared:\n!1,f=d||h.hoverPoint,t=f&&f.series||h.hoverSeries;d=this.getHoverData(f,t,h.series,!!d||!e&&t&&t.directTouch,e,b);var n,m,f=d.hoverPoint;n=(t=d.hoverSeries)&&t.tooltipOptions.followPointer;m=(e=e&&f&&!f.series.noSharedTooltip)?d.hoverPoints:f?[f]:[];if(f&&(f!==h.hoverPoint||p&&p.isHidden)){q(h.hoverPoints||[],function(b){-1===a.inArray(b,m)&&b.setState()});q(m||[],function(a){a.setState(\"hover\")});if(h.hoverSeries!==t)t.onMouseOver();t&&!t.directTouch&&(h.hoverPoint&&h.hoverPoint.firePointEvent(\"mouseOut\"),\nf.firePointEvent(\"mouseOver\"));h.hoverPoints=m;h.hoverPoint=f;p&&p.refresh(e?m:f,b)}else n&&p&&!p.isHidden&&(f=p.getAnchor([{}],b),p.updatePosition({plotX:f[0],plotY:f[1]}));this.unDocMouseMove||(this.unDocMouseMove=B(l,\"mousemove\",function(b){var c=H[a.hoverChartIndex];if(c)c.pointer.onDocumentMouseMove(b)}));q(h.axes,function(a){c(a.crosshair.snap,!0)?q(m,function(c){c.series[a.coll]===a&&a.drawCrosshair(b,c)}):a.drawCrosshair(b)})},reset:function(a,b){var c=this.chart,h=c.hoverSeries,e=c.hoverPoint,\nd=c.hoverPoints,p=c.tooltip,f=p&&p.shared?d:e;a&&f&&q(z(f),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)p&&f&&(p.refresh(f),e&&(e.setState(e.state,!0),q(c.axes,function(a){a.crosshair&&a.drawCrosshair(null,e)})));else{if(e)e.onMouseOut();d&&q(d,function(a){a.setState()});if(h)h.onMouseOut();p&&p.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());q(c.axes,function(a){a.hideCrosshair()});this.hoverX=c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(a,\nb){var c=this.chart,h;q(c.series,function(e){h=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&e.group&&(e.group.attr(h),e.markerGroup&&(e.markerGroup.attr(h),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(h))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,h=a.chartX,e=a.chartY,\nd=this.zoomHor,p=this.zoomVert,f=b.plotLeft,m=b.plotTop,n=b.plotWidth,k=b.plotHeight,l,q=this.selectionMarker,g=this.mouseDownX,u=this.mouseDownY,r=c.panKey&&a[c.panKey+\"Key\"];q&&q.touch||(h<f?h=f:h>f+n&&(h=f+n),e<m?e=m:e>m+k&&(e=m+k),this.hasDragged=Math.sqrt(Math.pow(g-h,2)+Math.pow(u-e,2)),10<this.hasDragged&&(l=b.isInsidePlot(g-f,u-m),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&l&&!r&&!q&&(this.selectionMarker=q=b.renderer.rect(f,m,d?1:n,p?1:k,0).attr({fill:c.selectionMarkerFill||G(\"#335cad\").setOpacity(.25).get(),\n\"class\":\"highcharts-selection-marker\",zIndex:7}).add()),q&&d&&(h-=g,q.attr({width:Math.abs(h),x:(0<h?0:h)+g})),q&&p&&(h=e-u,q.attr({height:Math.abs(h),y:(0<h?0:h)+u})),l&&!q&&c.panning&&b.pan(a,c.panning)))},drop:function(a){var b=this,c=this.chart,h=this.hasPinched;if(this.selectionMarker){var e={originalEvent:a,xAxis:[],yAxis:[]},d=this.selectionMarker,p=d.attr?d.attr(\"x\"):d.x,n=d.attr?d.attr(\"y\"):d.y,m=d.attr?d.attr(\"width\"):d.width,y=d.attr?d.attr(\"height\"):d.height,l;if(this.hasDragged||h)q(c.axes,\nfunction(c){if(c.zoomEnabled&&f(c.min)&&(h||b[{xAxis:\"zoomX\",yAxis:\"zoomY\"}[c.coll]])){var d=c.horiz,g=\"touchend\"===a.type?c.minPixelPadding:0,t=c.toValue((d?p:n)+g),d=c.toValue((d?p+m:n+y)-g);e[c.coll].push({axis:c,min:Math.min(t,d),max:Math.max(t,d)});l=!0}}),l&&u(c,\"selection\",e,function(a){c.zoom(k(a,h?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();h&&this.scaleGroups()}c&&(r(c.container,{cursor:c._cursor}),c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=\nthis.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){H[a.hoverChartIndex]&&H[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition;a=this.normalize(a,c);!c||this.inClass(a.target,\"highcharts-tracker\")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var c=\nH[a.hoverChartIndex];c&&(b.relatedTarget||b.toElement)&&(c.pointer.reset(),c.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;f(a.hoverChartIndex)&&H[a.hoverChartIndex]&&H[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=c.index);b=this.normalize(b);b.returnValue=!1;\"mousedown\"===c.mouseIsDown&&this.drag(b);!this.inClass(b.target,\"highcharts-tracker\")&&!c.isInsidePlot(b.chartX-c.plotLeft,b.chartY-c.plotTop)||c.openMenu||this.runPointActions(b)},inClass:function(a,b){for(var c;a;){if(c=\nA(a,\"class\")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf(\"highcharts-container\"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;if(!(!b||!a||b.stickyTracking||this.inClass(a,\"highcharts-tooltip\")||this.inClass(a,\"highcharts-series-\"+b.index)&&this.inClass(a,\"highcharts-tracker\")))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,h=b.plotLeft,e=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,\n\"highcharts-tracker\")?(u(c.series,\"click\",k(a,{point:c})),b.hoverPoint&&c.firePointEvent(\"click\",a)):(k(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-h,a.chartY-e)&&u(b,\"click\",a)))},setDOMEvents:function(){var b=this,c=b.chart.container;c.onmousedown=function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};B(c,\"mouseleave\",b.onContainerMouseLeave);1===a.chartCount&&B(l,\"mouseup\",b.onDocumentMouseUp);a.hasTouch&&(c.ontouchstart=\nfunction(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},1===a.chartCount&&B(l,\"touchend\",b.onDocumentTouchEnd))},destroy:function(){var b;this.unDocMouseMove&&this.unDocMouseMove();n(this.chart.container,\"mouseleave\",this.onContainerMouseLeave);a.chartCount||(n(l,\"mouseup\",this.onDocumentMouseUp),n(l,\"touchend\",this.onDocumentTouchEnd));clearInterval(this.tooltipTimeout);for(b in this)this[b]=null}}})(L);(function(a){var B=a.charts,A=a.each,H=a.extend,G=a.map,\nr=a.noop,f=a.pick;H(a.Pointer.prototype,{pinchTranslate:function(a,f,k,u,d,c){this.zoomHor&&this.pinchTranslateDirection(!0,a,f,k,u,d,c);this.zoomVert&&this.pinchTranslateDirection(!1,a,f,k,u,d,c)},pinchTranslateDirection:function(a,f,k,u,d,c,n,r){var b=this.chart,p=a?\"x\":\"y\",h=a?\"X\":\"Y\",t=\"chart\"+h,l=a?\"width\":\"height\",w=b[\"plot\"+(a?\"Left\":\"Top\")],e,q,C=r||1,E=b.inverted,m=b.bounds[a?\"h\":\"v\"],y=1===f.length,I=f[0][t],K=k[0][t],J=!y&&f[1][t],g=!y&&k[1][t],z;k=function(){!y&&20<Math.abs(I-J)&&(C=r||\nMath.abs(K-g)/Math.abs(I-J));q=(w-K)/C+I;e=b[\"plot\"+(a?\"Width\":\"Height\")]/C};k();f=q;f<m.min?(f=m.min,z=!0):f+e>m.max&&(f=m.max-e,z=!0);z?(K-=.8*(K-n[p][0]),y||(g-=.8*(g-n[p][1])),k()):n[p]=[K,g];E||(c[p]=q-w,c[l]=e);c=E?1/C:C;d[l]=e;d[p]=f;u[E?a?\"scaleY\":\"scaleX\":\"scale\"+h]=C;u[\"translate\"+h]=c*w+(K-c*I)},pinch:function(a){var l=this,k=l.chart,u=l.pinchDown,d=a.touches,c=d.length,n=l.lastValidTouch,z=l.hasZoom,b=l.selectionMarker,p={},h=1===c&&(l.inClass(a.target,\"highcharts-tracker\")&&k.runTrackerClick||\nl.runChartClick),t={};1<c&&(l.initiated=!0);z&&l.initiated&&!h&&a.preventDefault();G(d,function(a){return l.normalize(a)});\"touchstart\"===a.type?(A(d,function(a,b){u[b]={chartX:a.chartX,chartY:a.chartY}}),n.x=[u[0].chartX,u[1]&&u[1].chartX],n.y=[u[0].chartY,u[1]&&u[1].chartY],A(k.axes,function(a){if(a.zoomEnabled){var b=k.bounds[a.horiz?\"h\":\"v\"],c=a.minPixelPadding,h=a.toPixels(f(a.options.min,a.dataMin)),d=a.toPixels(f(a.options.max,a.dataMax)),p=Math.max(h,d);b.min=Math.min(a.pos,Math.min(h,d)-\nc);b.max=Math.max(a.pos+a.len,p+c)}}),l.res=!0):l.followTouchMove&&1===c?this.runPointActions(l.normalize(a)):u.length&&(b||(l.selectionMarker=b=H({destroy:r,touch:!0},k.plotBox)),l.pinchTranslate(u,d,p,b,t,n),l.hasPinched=z,l.scaleGroups(p,t),l.res&&(l.res=!1,this.reset(!1,0)))},touch:function(l,q){var k=this.chart,u,d;if(k.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=k.index;1===l.touches.length?(l=this.normalize(l),(d=k.isInsidePlot(l.chartX-k.plotLeft,\nl.chartY-k.plotTop))&&!k.openMenu?(q&&this.runPointActions(l),\"touchmove\"===l.type&&(q=this.pinchDown,u=q[0]?4<=Math.sqrt(Math.pow(q[0].chartX-l.chartX,2)+Math.pow(q[0].chartY-l.chartY,2)):!1),f(u,!0)&&this.pinch(l)):q&&this.reset()):2===l.touches.length&&this.pinch(l)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(f){B[a.hoverChartIndex]&&B[a.hoverChartIndex].pointer.drop(f)}})})(L);(function(a){var B=\na.addEvent,A=a.charts,H=a.css,G=a.doc,r=a.extend,f=a.noop,l=a.Pointer,q=a.removeEvent,k=a.win,u=a.wrap;if(k.PointerEvent||k.MSPointerEvent){var d={},c=!!k.PointerEvent,n=function(){var a,c=[];c.item=function(a){return this[a]};for(a in d)d.hasOwnProperty(a)&&c.push({pageX:d[a].pageX,pageY:d[a].pageY,target:d[a].target});return c},z=function(b,c,h,d){\"touch\"!==b.pointerType&&b.pointerType!==b.MSPOINTER_TYPE_TOUCH||!A[a.hoverChartIndex]||(d(b),d=A[a.hoverChartIndex].pointer,d[c]({type:h,target:b.currentTarget,\npreventDefault:f,touches:n()}))};r(l.prototype,{onContainerPointerDown:function(a){z(a,\"onContainerTouchStart\",\"touchstart\",function(a){d[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){z(a,\"onContainerTouchMove\",\"touchmove\",function(a){d[a.pointerId]={pageX:a.pageX,pageY:a.pageY};d[a.pointerId].target||(d[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){z(a,\"onDocumentTouchEnd\",\"touchend\",function(a){delete d[a.pointerId]})},\nbatchMSEvents:function(a){a(this.chart.container,c?\"pointerdown\":\"MSPointerDown\",this.onContainerPointerDown);a(this.chart.container,c?\"pointermove\":\"MSPointerMove\",this.onContainerPointerMove);a(G,c?\"pointerup\":\"MSPointerUp\",this.onDocumentPointerUp)}});u(l.prototype,\"init\",function(a,c,h){a.call(this,c,h);this.hasZoom&&H(c.container,{\"-ms-touch-action\":\"none\",\"touch-action\":\"none\"})});u(l.prototype,\"setDOMEvents\",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(B)});\nu(l.prototype,\"destroy\",function(a){this.batchMSEvents(q);a.call(this)})}})(L);(function(a){var B,A=a.addEvent,H=a.css,G=a.discardElement,r=a.defined,f=a.each,l=a.isFirefox,q=a.marginNames,k=a.merge,u=a.pick,d=a.setAnimation,c=a.stableSort,n=a.win,z=a.wrap;B=a.Legend=function(a,c){this.init(a,c)};B.prototype={init:function(a,c){this.chart=a;this.setOptions(c);c.enabled&&(this.render(),A(this.chart,\"endResize\",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var b=u(a.padding,\n8);this.options=a;this.itemStyle=a.itemStyle;this.itemHiddenStyle=k(this.itemStyle,a.itemHiddenStyle);this.itemMarginTop=a.itemMarginTop||0;this.padding=b;this.initialItemY=b-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=u(a.symbolWidth,16);this.pages=[]},update:function(a,c){var b=this.chart;this.setOptions(k(!0,this.options,a));this.destroy();b.isDirtyLegend=b.isDirtyBox=!0;u(c,!0)&&b.redraw()},colorizeItem:function(a,c){a.legendGroup[c?\"removeClass\":\"addClass\"](\"highcharts-legend-item-hidden\");\nvar b=this.options,d=a.legendItem,f=a.legendLine,p=a.legendSymbol,e=this.itemHiddenStyle.color,b=c?b.itemStyle.color:e,n=c?a.color||e:e,k=a.options&&a.options.marker,l={fill:n},m;d&&d.css({fill:b,color:b});f&&f.attr({stroke:n});if(p){if(k&&p.isMarker&&(l=a.pointAttribs(),!c))for(m in l)l[m]=e;p.attr(l)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,f=d[0],d=d[1],n=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?f:this.legendWidth-f-2*c-4,d);n&&(n.x=\nf,n.y=d)},destroyItem:function(a){var b=a.checkbox;f([\"legendItem\",\"legendLine\",\"legendSymbol\",\"legendGroup\"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&G(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}f(this.getAllItems(),function(b){f([\"legendItem\",\"legendGroup\"],a,b)});f(\"clipRect up down pager nav box title group\".split(\" \"),a,this);this.display=null},positionCheckboxes:function(a){var b=this.group&&this.group.alignAttr,c,d=this.clipHeight||this.legendHeight,\nn=this.titleHeight;b&&(c=b.translateY,f(this.allItems,function(h){var e=h.checkbox,f;e&&(f=c+n+e.y+(a||0)+3,H(e,{left:b.translateX+h.checkboxOffset+e.x-20+\"px\",top:f+\"px\",display:f>c-6&&f<c+d-6?\"\":\"none\"}))}))},renderTitle:function(){var a=this.padding,c=this.options.title,h=0;c.text&&(this.title||(this.title=this.chart.renderer.label(c.text,a-3,a-4,null,null,null,null,null,\"legend-title\").attr({zIndex:1}).css(c.style).add(this.group)),a=this.title.getBBox(),h=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:h}));\nthis.titleHeight=h},setText:function(b){var c=this.options;b.legendItem.attr({text:c.labelFormat?a.format(c.labelFormat,b):c.labelFormatter.call(b)})},renderItem:function(a){var b=this.chart,c=b.renderer,d=this.options,f=\"horizontal\"===d.layout,n=this.symbolWidth,e=d.symbolPadding,l=this.itemStyle,q=this.itemHiddenStyle,r=this.padding,m=f?u(d.itemDistance,20):0,y=!d.rtl,I=d.width,K=d.itemMarginBottom||0,J=this.itemMarginTop,g=a.legendItem,z=!a.series,Q=!z&&a.series.drawLegendSymbol?a.series:a,A=Q.options,\nA=this.createCheckboxForItem&&A&&A.showCheckbox,B=d.useHTML,H=a.options.className;g||(a.legendGroup=c.g(\"legend-item\").addClass(\"highcharts-\"+Q.type+\"-series highcharts-color-\"+a.colorIndex+(H?\" \"+H:\"\")+(z?\" highcharts-series-\"+a.index:\"\")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=g=c.text(\"\",y?n+e:-e,this.baseline||0,B).css(k(a.visible?l:q)).attr({align:y?\"left\":\"right\",zIndex:2}).add(a.legendGroup),this.baseline||(l=l.fontSize,this.fontMetrics=c.fontMetrics(l,g),this.baseline=this.fontMetrics.f+\n3+J,g.attr(\"y\",this.baseline)),this.symbolHeight=d.symbolHeight||this.fontMetrics.f,Q.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,g,B),A&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);this.setText(a);c=g.getBBox();n=a.checkboxOffset=d.itemWidth||a.legendItemWidth||n+e+c.width+m+(A?20:0);this.itemHeight=e=Math.round(a.legendItemHeight||c.height||this.symbolHeight);f&&this.itemX-r+n>(I||b.spacingBox.width-2*r-d.x)&&(this.itemX=r,this.itemY+=J+this.lastLineHeight+\nK,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,n);this.lastItemY=J+this.itemY+K;this.lastLineHeight=Math.max(e,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=n:(this.itemY+=J+e+K,this.lastLineHeight=e);this.offsetWidth=I||Math.max((f?this.itemX-r-m:n)+r,this.offsetWidth)},getAllItems:function(){var a=[];f(this.chart.series,function(b){var c=b&&b.options;b&&u(c.showInLegend,r(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||(\"point\"===c.legendType?\nb.data:b)))});return a},adjustMargins:function(a,c){var b=this.chart,d=this.options,p=d.align.charAt(0)+d.verticalAlign.charAt(0)+d.layout.charAt(0);d.floating||f([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(h,e){h.test(p)&&!r(a[e])&&(b[q[e]]=Math.max(b[q[e]],b.legend[(e+1)%2?\"legendHeight\":\"legendWidth\"]+[1,-1,-1,1][e]*d[e%2?\"x\":\"y\"]+u(d.margin,12)+c[e]))})},render:function(){var a=this,d=a.chart,h=d.renderer,n=a.group,l,q,e,x,u=a.box,r=a.options,m=a.padding;a.itemX=m;a.itemY=\na.initialItemY;a.offsetWidth=0;a.lastItemY=0;n||(a.group=n=h.g(\"legend\").attr({zIndex:7}).add(),a.contentGroup=h.g().attr({zIndex:1}).add(n),a.scrollGroup=h.g().add(a.contentGroup));a.renderTitle();l=a.getAllItems();c(l,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});r.reversed&&l.reverse();a.allItems=l;a.display=q=!!l.length;a.lastLineHeight=0;f(l,function(b){a.renderItem(b)});e=(r.width||a.offsetWidth)+m;x=a.lastItemY+a.lastLineHeight+a.titleHeight;\nx=a.handleOverflow(x);x+=m;u||(a.box=u=h.rect().addClass(\"highcharts-legend-box\").attr({r:r.borderRadius}).add(n),u.isNew=!0);u.attr({stroke:r.borderColor,\"stroke-width\":r.borderWidth||0,fill:r.backgroundColor||\"none\"}).shadow(r.shadow);0<e&&0<x&&(u[u.isNew?\"attr\":\"animate\"](u.crisp({x:0,y:0,width:e,height:x},u.strokeWidth())),u.isNew=!1);u[q?\"show\":\"hide\"]();a.legendWidth=e;a.legendHeight=x;f(l,function(b){a.positionItem(b)});q&&n.align(k(r,{width:e,height:x}),!0,\"spacingBox\");d.isResizing||this.positionCheckboxes()},\nhandleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,n=this.options,k=n.y,e=this.padding,c=c.spacingBox.height+(\"top\"===n.verticalAlign?-k:k)-e,k=n.maxHeight,l,q=this.clipRect,r=n.navigation,m=u(r.animation,!0),y=r.arrowSize||12,I=this.nav,K=this.pages,J,g=this.allItems,z=function(a){a?q.attr({height:a}):q&&(b.clipRect=q.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=a?\"rect(\"+e+\"px,9999px,\"+(e+a)+\"px,0)\":\"auto\")};\"horizontal\"!==n.layout||\"middle\"===\nn.verticalAlign||n.floating||(c/=2);k&&(c=Math.min(c,k));K.length=0;a>c&&!1!==r.enabled?(this.clipHeight=l=Math.max(c-20-this.titleHeight-e,0),this.currentPage=u(this.currentPage,1),this.fullHeight=a,f(g,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var e=K.length;if(!e||c-K[e-1]>l&&(J||c)!==K[e-1])K.push(J||c),e++;b===g.length-1&&c+a-K[e-1]>l&&K.push(c);c!==J&&(J=c)}),q||(q=b.clipRect=d.clipRect(0,e,9999,0),b.contentGroup.clip(q)),z(l),I||(this.nav=I=d.g().attr({zIndex:1}).add(this.group),\nthis.up=d.symbol(\"triangle\",0,0,y,y).on(\"click\",function(){b.scroll(-1,m)}).add(I),this.pager=d.text(\"\",15,10).addClass(\"highcharts-legend-navigation\").css(r.style).add(I),this.down=d.symbol(\"triangle-down\",0,0,y,y).on(\"click\",function(){b.scroll(1,m)}).add(I)),b.scroll(0),a=c):I&&(z(),this.nav=I.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,c){var b=this.pages,f=b.length;a=this.currentPage+a;var p=this.clipHeight,n=this.options.navigation,e=this.pager,\nk=this.padding;a>f&&(a=f);0<a&&(void 0!==c&&d(c,this.chart),this.nav.attr({translateX:k,translateY:p+this.padding+7+this.titleHeight,visibility:\"visible\"}),this.up.attr({\"class\":1===a?\"highcharts-legend-nav-inactive\":\"highcharts-legend-nav-active\"}),e.attr({text:a+\"/\"+f}),this.down.attr({x:18+this.pager.getBBox().width,\"class\":a===f?\"highcharts-legend-nav-inactive\":\"highcharts-legend-nav-active\"}),this.up.attr({fill:1===a?n.inactiveColor:n.activeColor}).css({cursor:1===a?\"default\":\"pointer\"}),this.down.attr({fill:a===\nf?n.inactiveColor:n.activeColor}).css({cursor:a===f?\"default\":\"pointer\"}),c=-b[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=a,this.positionCheckboxes(c))}};a.LegendSymbolMixin={drawRectangle:function(a,c){var b=a.symbolHeight,d=a.options.squareSymbol;c.legendSymbol=this.chart.renderer.rect(d?(a.symbolWidth-b)/2:0,a.baseline-b+1,d?b:a.symbolWidth,b,u(a.options.symbolRadius,b/2)).addClass(\"highcharts-point\").attr({zIndex:3}).add(c.legendGroup)},drawLineMarker:function(a){var b=\nthis.options,c=b.marker,d=a.symbolWidth,f=a.symbolHeight,n=f/2,e=this.chart.renderer,l=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);var q;q={\"stroke-width\":b.lineWidth||0};b.dashStyle&&(q.dashstyle=b.dashStyle);this.legendLine=e.path([\"M\",0,a,\"L\",d,a]).addClass(\"highcharts-graph\").attr(q).add(l);c&&!1!==c.enabled&&(b=Math.min(u(c.radius,n),n),0===this.symbol.indexOf(\"url\")&&(c=k(c,{width:f,height:f}),b=0),this.legendSymbol=c=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b,c).addClass(\"highcharts-point\").add(l),\nc.isMarker=!0)}};(/Trident\\/7\\.0/.test(n.navigator.userAgent)||l)&&z(B.prototype,\"positionItem\",function(a,c){var b=this,d=function(){c._legendItemPos&&a.call(b,c)};d();setTimeout(d)})})(L);(function(a){var B=a.addEvent,A=a.animate,H=a.animObject,G=a.attr,r=a.doc,f=a.Axis,l=a.createElement,q=a.defaultOptions,k=a.discardElement,u=a.charts,d=a.css,c=a.defined,n=a.each,z=a.extend,b=a.find,p=a.fireEvent,h=a.getStyle,t=a.grep,D=a.isNumber,w=a.isObject,e=a.isString,x=a.Legend,C=a.marginNames,E=a.merge,\nm=a.Pointer,y=a.pick,I=a.pInt,K=a.removeEvent,J=a.seriesTypes,g=a.splat,F=a.svg,Q=a.syncTimeout,N=a.win,P=a.Renderer,O=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,b,c){return new O(a,b,c)};O.prototype={callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(e(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(b,c){var e,g=b.series;b.series=null;e=E(q,b);e.series=b.series=g;this.userOptions=b;b=e.chart;g=b.events;this.margin=[];\nthis.spacing=[];this.bounds={h:{},v:{}};this.callback=c;this.isResizing=0;this.options=e;this.axes=[];this.series=[];this.hasCartesianSeries=b.showAxes;var d;this.index=u.length;u.push(this);a.chartCount++;if(g)for(d in g)B(this,d,g[d]);this.xAxis=[];this.yAxis=[];this.pointCount=this.colorCounter=this.symbolCounter=0;this.firstRender()},initSeries:function(b){var c=this.options.chart;(c=J[b.type||c.type||c.defaultSeriesType])||a.error(17,!0);c=new c;c.init(this,b);return c},orderSeries:function(a){var b=\nthis.series;for(a=a||0;a<b.length;a++)b[a]&&(b[a].index=a,b[a].name=b[a].name||\"Series \"+(b[a].index+1))},isInsidePlot:function(a,b,c){var e=c?b:a;a=c?a:b;return 0<=e&&e<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(b){var c=this.axes,e=this.series,g=this.pointer,d=this.legend,m=this.isDirtyLegend,h,f,v=this.hasCartesianSeries,k=this.isDirtyBox,y,l=this.renderer,t=l.isHidden(),q=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(b,this);t&&this.cloneRenderTo();this.layOutTitles();\nfor(b=e.length;b--;)if(y=e[b],y.options.stacking&&(h=!0,y.isDirty)){f=!0;break}if(f)for(b=e.length;b--;)y=e[b],y.options.stacking&&(y.isDirty=!0);n(e,function(a){a.isDirty&&\"point\"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),m=!0);a.isDirtyData&&p(a,\"updatedData\")});m&&d.options.enabled&&(d.render(),this.isDirtyLegend=!1);h&&this.getStacks();v&&n(c,function(a){a.updateNames();a.setScale()});this.getMargins();v&&(n(c,function(a){a.isDirty&&(k=!0)}),n(c,function(a){var b=a.min+\",\"+a.max;\na.extKey!==b&&(a.extKey=b,q.push(function(){p(a,\"afterSetExtremes\",z(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(k||h)&&a.redraw()}));k&&this.drawChartBox();p(this,\"predraw\");n(e,function(a){(k||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});g&&g.reset(!0);l.draw();p(this,\"redraw\");p(this,\"render\");t&&this.cloneRenderTo(!0);n(q,function(a){a.call()})},get:function(a){function c(b){return b.id===a||b.options&&b.options.id===a}var e,g=this.series,d;e=b(this.axes,c)||b(this.series,c);\nfor(d=0;!e&&d<g.length;d++)e=b(g[d].points||[],c);return e},getAxes:function(){var a=this,b=this.options,c=b.xAxis=g(b.xAxis||{}),b=b.yAxis=g(b.yAxis||{});n(c,function(a,b){a.index=b;a.isX=!0});n(b,function(a,b){a.index=b});c=c.concat(b);n(c,function(b){new f(a,b)})},getSelectedPoints:function(){var a=[];n(this.series,function(b){a=a.concat(t(b.points||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return t(this.series,function(a){return a.selected})},setTitle:function(a,\nb,c){var e=this,g=e.options,d;d=g.title=E({style:{color:\"#333333\",fontSize:g.isStock?\"16px\":\"18px\"}},g.title,a);g=g.subtitle=E({style:{color:\"#666666\"}},g.subtitle,b);n([[\"title\",a,d],[\"subtitle\",b,g]],function(a,b){var c=a[0],g=e[c],d=a[1];a=a[2];g&&d&&(e[c]=g=g.destroy());a&&a.text&&!g&&(e[c]=e.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,\"class\":\"highcharts-\"+c,zIndex:a.zIndex||4}).add(),e[c].update=function(a){e.setTitle(!b&&a,b&&a)},e[c].css(a.style))});e.layOutTitles(c)},layOutTitles:function(a){var b=\n0,c,e=this.renderer,g=this.spacingBox;n([\"title\",\"subtitle\"],function(a){var c=this[a],d=this.options[a],m;c&&(m=d.style.fontSize,m=e.fontMetrics(m,c).b,c.css({width:(d.width||g.width+d.widthAdjust)+\"px\"}).align(z({y:b+m+(\"title\"===a?-3:2)},d),!1,\"spacingBox\"),d.floating||d.verticalAlign||(b=Math.ceil(b+c.getBBox(d.useHTML).height)))},this);c=this.titleOffset!==b;this.titleOffset=b;!this.isDirtyBox&&c&&(this.isDirtyBox=c,this.hasRendered&&y(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var b=\nthis.options.chart,e=b.width,b=b.height,g=this.renderToClone||this.renderTo;c(e)||(this.containerWidth=h(g,\"width\"));c(b)||(this.containerHeight=h(g,\"height\"));this.chartWidth=Math.max(0,e||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(b,this.chartWidth)||this.containerHeight||400)},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;if(a){if(b){for(;b.childNodes.length;)this.renderTo.appendChild(b.firstChild);k(b);delete this.renderToClone}}else c&&c.parentNode===\nthis.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),d(b,{position:\"absolute\",top:\"-9999px\",display:\"block\"}),b.style.setProperty&&b.style.setProperty(\"display\",\"block\",\"important\"),r.body.appendChild(b),c&&b.appendChild(c)},setClassName:function(a){this.container.className=\"highcharts-container \"+(a||\"\")},getContainer:function(){var b,c=this.options,g=c.chart,d,m;b=this.renderTo;var h=a.uniqueKey(),f;b||(this.renderTo=b=g.renderTo);e(b)&&(this.renderTo=b=r.getElementById(b));\nb||a.error(13,!0);d=I(G(b,\"data-highcharts-chart\"));D(d)&&u[d]&&u[d].hasRendered&&u[d].destroy();G(b,\"data-highcharts-chart\",this.index);b.innerHTML=\"\";g.skipClone||b.offsetWidth||this.cloneRenderTo();this.getChartSize();d=this.chartWidth;m=this.chartHeight;f=z({position:\"relative\",overflow:\"hidden\",width:d+\"px\",height:m+\"px\",textAlign:\"left\",lineHeight:\"normal\",zIndex:0,\"-webkit-tap-highlight-color\":\"rgba(0,0,0,0)\"},g.style);this.container=b=l(\"div\",{id:h},f,this.renderToClone||b);this._cursor=b.style.cursor;\nthis.renderer=new (a[g.renderer]||P)(b,d,m,null,g.forExport,c.exporting&&c.exporting.allowHTML);this.setClassName(g.className);this.renderer.setStyle(g.style);this.renderer.chartIndex=this.index},getMargins:function(a){var b=this.spacing,e=this.margin,g=this.titleOffset;this.resetMargins();g&&!c(e[0])&&(this.plotTop=Math.max(this.plotTop,g+this.options.title.margin+b[0]));this.legend.display&&this.legend.adjustMargins(e,b);this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||\n0)+this.extraMargin.value);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,b=a.axisOffset=[0,0,0,0],e=a.margin;a.hasCartesianSeries&&n(a.axes,function(a){a.visible&&a.getOffset()});n(C,function(g,d){c(e[d])||(a[g]+=b[d])});a.setChartSize()},reflow:function(a){var b=this,e=b.options.chart,g=b.renderTo,d=c(e.width),m=e.width||h(g,\"width\"),e=e.height||h(g,\"height\"),g=a?a.target:N;if(!d&&!b.isPrinting&&m&&e&&(g===N||g===r)){if(m!==\nb.containerWidth||e!==b.containerHeight)clearTimeout(b.reflowTimeout),b.reflowTimeout=Q(function(){b.container&&b.setSize(void 0,void 0,!1)},a?100:0);b.containerWidth=m;b.containerHeight=e}},initReflow:function(){var a=this,b;b=B(N,\"resize\",function(b){a.reflow(b)});B(a,\"destroy\",b)},setSize:function(b,c,e){var g=this,m=g.renderer;g.isResizing+=1;a.setAnimation(e,g);g.oldChartHeight=g.chartHeight;g.oldChartWidth=g.chartWidth;void 0!==b&&(g.options.chart.width=b);void 0!==c&&(g.options.chart.height=\nc);g.getChartSize();b=m.globalAnimation;(b?A:d)(g.container,{width:g.chartWidth+\"px\",height:g.chartHeight+\"px\"},b);g.setChartSize(!0);m.setSize(g.chartWidth,g.chartHeight,e);n(g.axes,function(a){a.isDirty=!0;a.setScale()});g.isDirtyLegend=!0;g.isDirtyBox=!0;g.layOutTitles();g.getMargins();g.redraw(e);g.oldChartHeight=null;p(g,\"resize\");Q(function(){g&&p(g,\"endResize\",null,function(){--g.isResizing})},H(b).duration)},setChartSize:function(a){var b=this.inverted,c=this.renderer,e=this.chartWidth,g=\nthis.chartHeight,d=this.options.chart,m=this.spacing,h=this.clipOffset,f,p,k,y;this.plotLeft=f=Math.round(this.plotLeft);this.plotTop=p=Math.round(this.plotTop);this.plotWidth=k=Math.max(0,Math.round(e-f-this.marginRight));this.plotHeight=y=Math.max(0,Math.round(g-p-this.marginBottom));this.plotSizeX=b?y:k;this.plotSizeY=b?k:y;this.plotBorderWidth=d.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:m[3],y:m[0],width:e-m[3]-m[1],height:g-m[0]-m[2]};this.plotBox=c.plotBox={x:f,y:p,width:k,height:y};\ne=2*Math.floor(this.plotBorderWidth/2);b=Math.ceil(Math.max(e,h[3])/2);c=Math.ceil(Math.max(e,h[0])/2);this.clipBox={x:b,y:c,width:Math.floor(this.plotSizeX-Math.max(e,h[1])/2-b),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(e,h[2])/2-c))};a||n(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this,b=a.options.chart;n([\"margin\",\"spacing\"],function(c){var e=b[c],g=w(e)?e:[e,e,e,e];n([\"Top\",\"Right\",\"Bottom\",\"Left\"],function(e,d){a[c][d]=y(b[c+e],g[d])})});\nn(C,function(b,c){a[b]=y(a.margin[c],a.spacing[c])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,e=this.chartHeight,g=this.chartBackground,d=this.plotBackground,m=this.plotBorder,h,f=this.plotBGImage,n=a.backgroundColor,p=a.plotBackgroundColor,k=a.plotBackgroundImage,y,l=this.plotLeft,t=this.plotTop,q=this.plotWidth,u=this.plotHeight,x=this.plotBox,r=this.clipRect,w=this.clipBox,I=\"animate\";g||(this.chartBackground=\ng=b.rect().addClass(\"highcharts-background\").add(),I=\"attr\");h=a.borderWidth||0;y=h+(a.shadow?8:0);n={fill:n||\"none\"};if(h||g[\"stroke-width\"])n.stroke=a.borderColor,n[\"stroke-width\"]=h;g.attr(n).shadow(a.shadow);g[I]({x:y/2,y:y/2,width:c-y-h%2,height:e-y-h%2,r:a.borderRadius});I=\"animate\";d||(I=\"attr\",this.plotBackground=d=b.rect().addClass(\"highcharts-plot-background\").add());d[I](x);d.attr({fill:p||\"none\"}).shadow(a.plotShadow);k&&(f?f.animate(x):this.plotBGImage=b.image(k,l,t,q,u).add());r?r.animate({width:w.width,\nheight:w.height}):this.clipRect=b.clipRect(w);I=\"animate\";m||(I=\"attr\",this.plotBorder=m=b.rect().addClass(\"highcharts-plot-border\").attr({zIndex:1}).add());m.attr({stroke:a.plotBorderColor,\"stroke-width\":a.plotBorderWidth||0,fill:\"none\"});m[I](m.crisp({x:l,y:t,width:q,height:u},-m.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,e=a.options.series,g,d;n([\"inverted\",\"angular\",\"polar\"],function(m){c=J[b.type||b.defaultSeriesType];d=b[m]||c&&c.prototype[m];\nfor(g=e&&e.length;!d&&g--;)(c=J[e[g].type])&&c.prototype[m]&&(d=!0);a[m]=d})},linkSeries:function(){var a=this,b=a.series;n(b,function(a){a.linkedSeries.length=0});n(b,function(b){var c=b.options.linkedTo;e(c)&&(c=\":previous\"===c?a.series[b.index-1]:a.get(c))&&c.linkedParent!==b&&(c.linkedSeries.push(b),b.linkedParent=c,b.visible=y(b.options.visible,c.options.visible,b.visible))})},renderSeries:function(){n(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,b=a.options.labels;\nb.items&&n(b.items,function(c){var e=z(b.style,c.style),g=I(e.left)+a.plotLeft,d=I(e.top)+a.plotTop+12;delete e.left;delete e.top;a.renderer.text(c.html,g,d).attr({zIndex:2}).css(e).add()})},render:function(){var a=this.axes,b=this.renderer,c=this.options,e,g,d;this.setTitle();this.legend=new x(this,c.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();c=this.plotWidth;e=this.plotHeight-=21;n(a,function(a){a.setScale()});this.getAxisMargins();g=1.1<c/this.plotWidth;d=\n1.05<e/this.plotHeight;if(g||d)n(a,function(a){(a.horiz&&g||!a.horiz&&d)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&n(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=b.g(\"series-group\").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var b=this;a=E(!0,this.options.credits,a);a.enabled&&!this.credits&&(this.credits=\nthis.renderer.text(a.text+(this.mapCredits||\"\"),0,0).addClass(\"highcharts-credits\").on(\"click\",function(){a.href&&(N.location.href=a.href)}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position),this.credits.update=function(a){b.credits=b.credits.destroy();b.addCredits(a)})},destroy:function(){var b=this,c=b.axes,e=b.series,g=b.container,d,m=g&&g.parentNode;p(b,\"destroy\");u[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute(\"data-highcharts-chart\");K(b);for(d=c.length;d--;)c[d]=\nc[d].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(d=e.length;d--;)e[d]=e[d].destroy();n(\"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer\".split(\" \"),function(a){var c=b[a];c&&c.destroy&&(b[a]=c.destroy())});g&&(g.innerHTML=\"\",K(g),m&&k(g));for(d in b)delete b[d]},isReadyToRender:function(){var a=this;return F||N!=N.top||\"complete\"===r.readyState?!0:(r.attachEvent(\"onreadystatechange\",\nfunction(){r.detachEvent(\"onreadystatechange\",a.firstRender);\"complete\"===r.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,b=a.options;if(a.isReadyToRender()){a.getContainer();p(a,\"init\");a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();n(b.series||[],function(b){a.initSeries(b)});a.linkSeries();p(a,\"beforeRender\");m&&(a.pointer=new m(a,b));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.cloneRenderTo(!0)}},onload:function(){n([this.callback].concat(this.callbacks),\nfunction(a){a&&void 0!==this.index&&a.apply(this,[this])},this);p(this,\"load\");p(this,\"render\");c(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}}})(L);(function(a){var B,A=a.each,H=a.extend,G=a.erase,r=a.fireEvent,f=a.format,l=a.isArray,q=a.isNumber,k=a.pick,u=a.removeEvent;B=a.Point=function(){};B.prototype={init:function(a,c,f){this.series=a;this.color=a.color;this.applyOptions(c,f);a.options.colorByPoint?(c=a.options.colors||a.chart.options.colors,this.color=this.color||\nc[a.colorCounter],c=c.length,f=a.colorCounter,a.colorCounter++,a.colorCounter===c&&(a.colorCounter=0)):f=a.colorIndex;this.colorIndex=k(this.colorIndex,f);a.chart.pointCount++;return this},applyOptions:function(a,c){var d=this.series,f=d.options.pointValKey||d.pointValKey;a=B.prototype.optionsToObject.call(this,a);H(this,a);this.options=this.options?H(this.options,a):a;a.group&&delete this.group;f&&(this.y=this[f]);this.isNull=k(this.isValid&&!this.isValid(),null===this.x||!q(this.y,!0));this.selected&&\n(this.state=\"select\");\"name\"in this&&void 0===c&&d.xAxis&&d.xAxis.hasNames&&(this.x=d.xAxis.nameToX(this));void 0===this.x&&d&&(this.x=void 0===c?d.autoIncrement(this):c);return this},optionsToObject:function(a){var c={},d=this.series,f=d.options.keys,b=f||d.pointArrayMap||[\"y\"],p=b.length,h=0,k=0;if(q(a)||null===a)c[b[0]]=a;else if(l(a))for(!f&&a.length>p&&(d=typeof a[0],\"string\"===d?c.name=a[0]:\"number\"===d&&(c.x=a[0]),h++);k<p;)f&&void 0===a[h]||(c[b[k]]=a[h]),h++,k++;else\"object\"===typeof a&&\n(c=a,a.dataLabels&&(d._hasPointLabels=!0),a.marker&&(d._hasPointMarkers=!0));return c},getClassName:function(){return\"highcharts-point\"+(this.selected?\" highcharts-point-select\":\"\")+(this.negative?\" highcharts-negative\":\"\")+(this.isNull?\" highcharts-null-point\":\"\")+(void 0!==this.colorIndex?\" highcharts-color-\"+this.colorIndex:\"\")+(this.options.className?\" \"+this.options.className:\"\")+(this.zone&&this.zone.className?\" \"+this.zone.className.replace(\"highcharts-negative\",\"\"):\"\")},getZone:function(){var a=\nthis.series,c=a.zones,a=a.zoneAxis||\"y\",f=0,k;for(k=c[f];this[a]>=k.value;)k=c[++f];k&&k.color&&!this.options.color&&(this.color=k.color);return k},destroy:function(){var a=this.series.chart,c=a.hoverPoints,f;a.pointCount--;c&&(this.setState(),G(c,this),c.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)u(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(f in this)this[f]=null},destroyElements:function(){for(var a=[\"graphic\",\n\"dataLabel\",\"dataLabelUpper\",\"connector\",\"shadowGroup\"],c,f=6;f--;)c=a[f],this[c]&&(this[c]=this[c].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var c=this.series,d=c.tooltipOptions,l=k(d.valueDecimals,\"\"),b=d.valuePrefix||\"\",p=d.valueSuffix||\"\";A(c.pointArrayMap||[\"y\"],function(c){c=\n\"{point.\"+c;if(b||p)a=a.replace(c+\"}\",b+c+\"}\"+p);a=a.replace(c+\"}\",c+\":,.\"+l+\"f}\")});return f(a,{point:this,series:this.series})},firePointEvent:function(a,c,f){var d=this,b=this.series.options;(b.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();\"click\"===a&&b.allowPointSelect&&(f=function(a){d.select&&d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});r(this,a,c,f)},visible:!0}})(L);(function(a){var B=a.addEvent,A=a.animObject,H=a.arrayMax,G=a.arrayMin,r=a.correctFloat,\nf=a.Date,l=a.defaultOptions,q=a.defaultPlotOptions,k=a.defined,u=a.each,d=a.erase,c=a.extend,n=a.fireEvent,z=a.grep,b=a.isArray,p=a.isNumber,h=a.isString,t=a.merge,D=a.pick,w=a.removeEvent,e=a.splat,x=a.SVGElement,C=a.syncTimeout,E=a.win;a.Series=a.seriesType(\"line\",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:\"#ffffff\",radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:\"#cccccc\",\nlineColor:\"#000000\",lineWidth:2}}},point:{events:{}},dataLabels:{align:\"center\",formatter:function(){return null===this.y?\"\":a.numberFormat(this.y,-1)},style:{fontSize:\"11px\",fontWeight:\"bold\",color:\"contrast\",textOutline:\"1px contrast\"},verticalAlign:\"bottom\",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:\"x\"},\n{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:[\"xAxis\",\"yAxis\"],colorCounter:0,parallelArrays:[\"x\",\"y\"],coll:\"series\",init:function(a,b){var e=this,d,m,g=a.series,h;e.chart=a;e.options=b=e.setOptions(b);e.linkedSeries=[];e.bindAxes();c(e,{name:b.name,state:\"\",visible:!1!==b.visible,selected:!0===b.selected});m=b.events;for(d in m)B(e,d,m[d]);if(m&&m.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;e.getColor();\ne.getSymbol();u(e.parallelArrays,function(a){e[a+\"Data\"]=[]});e.setData(b.data,!1);e.isCartesian&&(a.hasCartesianSeries=!0);g.length&&(h=g[g.length-1]);e._i=D(h&&h._i,-1)+1;a.orderSeries(this.insert(g))},insert:function(a){var b=this.options.index,c;if(p(b)){for(c=a.length;c--;)if(b>=D(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return D(c,a.length-1)},bindAxes:function(){var b=this,c=b.options,e=b.chart,d;u(b.axisTypes||[],function(m){u(e[m],\nfunction(a){d=a.options;if(c[m]===d.index||void 0!==c[m]&&c[m]===d.id||void 0===c[m]&&0===d.index)b.insert(a.series),b[m]=a,a.isDirty=!0});b[m]||b.optionalAxis===m||a.error(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,e=arguments,d=p(b)?function(e){var g=\"y\"===e&&c.toYData?c.toYData(a):a[e];c[e+\"Data\"][b]=g}:function(a){Array.prototype[b].apply(c[a+\"Data\"],Array.prototype.slice.call(e,2))};u(c.parallelArrays,d)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,e=a.pointIntervalUnit,\nb=D(b,a.pointStart,0);this.pointInterval=c=D(this.pointInterval,a.pointInterval,1);e&&(a=new f(b),\"day\"===e?a=+a[f.hcSetDate](a[f.hcGetDate]()+c):\"month\"===e?a=+a[f.hcSetMonth](a[f.hcGetMonth]()+c):\"year\"===e&&(a=+a[f.hcSetFullYear](a[f.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},e=b.plotOptions||{},d=c[this.type];this.userOptions=a;c=t(d,c.series,a);this.tooltipOptions=t(l.tooltip,l.plotOptions[this.type].tooltip,\nb.tooltip,e.series&&e.series.tooltip,e[this.type]&&e[this.type].tooltip,a.tooltip);this.stickyTracking=D(a.stickyTracking,e[this.type]&&e[this.type].stickyTracking,e.series&&e.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);null===d.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+\"Threshold\"]||c.threshold||0,className:\"highcharts-negative\",\ncolor:c.negativeColor,fillColor:c.negativeFillColor});a.length&&k(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return c},getCyclic:function(a,b,c){var e,d=this.chart,g=this.userOptions,m=a+\"Index\",h=a+\"Counter\",f=c?c.length:D(d.options.chart[a+\"Count\"],d[a+\"Count\"]);b||(e=D(g[m],g[\"_\"+m]),k(e)||(d.series.length||(d[h]=0),g[\"_\"+m]=e=d[h]%f,d[h]+=1),c&&(b=c[e]));void 0!==e&&(this[m]=e);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic(\"color\",\nthis.options.color||q[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic(\"symbol\",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(c,e,d,f){var m=this,g=m.points,k=g&&g.length||0,n,l=m.options,y=m.chart,t=null,q=m.xAxis,x=l.turboThreshold,r=this.xData,w=this.yData,C=(n=m.pointArrayMap)&&n.length;c=c||[];n=c.length;e=D(e,!0);if(!1!==f&&n&&k===n&&!m.cropped&&!m.hasGroupedData&&m.visible)u(c,function(a,\nb){g[b].update&&a!==l.data[b]&&g[b].update(a,!1,null,!1)});else{m.xIncrement=null;m.colorCounter=0;u(this.parallelArrays,function(a){m[a+\"Data\"].length=0});if(x&&n>x){for(d=0;null===t&&d<n;)t=c[d],d++;if(p(t))for(d=0;d<n;d++)r[d]=this.autoIncrement(),w[d]=c[d];else if(b(t))if(C)for(d=0;d<n;d++)t=c[d],r[d]=t[0],w[d]=t.slice(1,C+1);else for(d=0;d<n;d++)t=c[d],r[d]=t[0],w[d]=t[1];else a.error(12)}else for(d=0;d<n;d++)void 0!==c[d]&&(t={series:m},m.pointClass.prototype.applyOptions.apply(t,[c[d]]),m.updateParallelArrays(t,\nd));h(w[0])&&a.error(14,!0);m.data=[];m.options.data=m.userOptions.data=c;for(d=k;d--;)g[d]&&g[d].destroy&&g[d].destroy();q&&(q.minRange=q.userMinRange);m.isDirty=y.isDirtyBox=!0;m.isDirtyData=!!g;d=!1}\"point\"===l.legendType&&(this.processData(),this.generatePoints());e&&y.redraw(d)},processData:function(b){var c=this.xData,e=this.yData,d=c.length,m;m=0;var g,h,f=this.xAxis,p,k=this.options;p=k.cropThreshold;var n=this.getExtremesFromAll||k.getExtremesFromAll,l=this.isCartesian,k=f&&f.val2lin,t=f&&\nf.isLog,q,x;if(l&&!this.isDirty&&!f.isDirty&&!this.yAxis.isDirty&&!b)return!1;f&&(b=f.getExtremes(),q=b.min,x=b.max);if(l&&this.sorted&&!n&&(!p||d>p||this.forceCrop))if(c[d-1]<q||c[0]>x)c=[],e=[];else if(c[0]<q||c[d-1]>x)m=this.cropData(this.xData,this.yData,q,x),c=m.xData,e=m.yData,m=m.start,g=!0;for(p=c.length||1;--p;)d=t?k(c[p])-k(c[p-1]):c[p]-c[p-1],0<d&&(void 0===h||d<h)?h=d:0>d&&this.requireSorting&&a.error(15);this.cropped=g;this.cropStart=m;this.processedXData=c;this.processedYData=e;this.closestPointRange=\nh},cropData:function(a,b,c,e){var d=a.length,g=0,m=d,h=D(this.cropShoulder,1),f;for(f=0;f<d;f++)if(a[f]>=c){g=Math.max(0,f-h);break}for(c=f;c<d;c++)if(a[c]>e){m=c+h;break}return{xData:a.slice(g,m),yData:b.slice(g,m),start:g,end:m}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,h=this.processedYData,g=this.pointClass,f=d.length,p=this.cropStart||0,k,n=this.hasGroupedData,l,t=[],q;b||n||(b=[],b.length=a.length,b=this.data=b);for(q=0;q<f;q++)k=p+q,n?(l=(new g).init(this,\n[d[q]].concat(e(h[q]))),l.dataGroup=this.groupMap[q]):(l=b[k])||void 0===a[k]||(b[k]=l=(new g).init(this,a[k],d[q])),l&&(l.index=k,t[q]=l);if(b&&(f!==(c=b.length)||n))for(q=0;q<c;q++)q!==p||n||(q+=f),b[q]&&(b[q].destroyElements(),b[q].plotX=void 0);this.data=b;this.points=t},getExtremes:function(a){var c=this.yAxis,e=this.processedXData,d,m=[],g=0;d=this.xAxis.getExtremes();var h=d.min,f=d.max,k,n,l,t;a=a||this.stackedYData||this.processedYData||[];d=a.length;for(t=0;t<d;t++)if(n=e[t],l=a[t],k=(p(l,\n!0)||b(l))&&(!c.positiveValuesOnly||l.length||0<l),n=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(e[t]||n)>=h&&(e[t]||n)<=f,k&&n)if(k=l.length)for(;k--;)null!==l[k]&&(m[g++]=l[k]);else m[g++]=l;this.dataMin=G(m);this.dataMax=H(m)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,e=c.categories,d=this.yAxis,g=this.points,h=g.length,f=!!this.modifyValue,n=a.pointPlacement,l=\"between\"===n||p(n),\nt=a.threshold,q=a.startFromThreshold?t:0,x,u,w,C,E=Number.MAX_VALUE;\"between\"===n&&(n=.5);p(n)&&(n*=D(a.pointRange||c.pointRange));for(a=0;a<h;a++){var z=g[a],A=z.x,B=z.y;u=z.low;var H=b&&d.stacks[(this.negStacks&&B<(q?0:t)?\"-\":\"\")+this.stackKey],G;d.positiveValuesOnly&&null!==B&&0>=B&&(z.isNull=!0);z.plotX=x=r(Math.min(Math.max(-1E5,c.translate(A,0,0,0,1,n,\"flags\"===this.type)),1E5));b&&this.visible&&!z.isNull&&H&&H[A]&&(C=this.getStackIndicator(C,A,this.index),G=H[A],B=G.points[C.key],u=B[0],B=\nB[1],u===q&&C.key===H[A].base&&(u=D(t,d.min)),d.positiveValuesOnly&&0>=u&&(u=null),z.total=z.stackTotal=G.total,z.percentage=G.total&&z.y/G.total*100,z.stackY=B,G.setOffset(this.pointXOffset||0,this.barW||0));z.yBottom=k(u)?d.translate(u,0,1,0,1):null;f&&(B=this.modifyValue(B,z));z.plotY=u=\"number\"===typeof B&&Infinity!==B?Math.min(Math.max(-1E5,d.translate(B,0,1,0,1)),1E5):void 0;z.isInside=void 0!==u&&0<=u&&u<=d.len&&0<=x&&x<=c.len;z.clientX=l?r(c.translate(A,0,0,0,1,n)):x;z.negative=z.y<(t||0);\nz.category=e&&void 0!==e[z.x]?e[z.x]:z.x;z.isNull||(void 0!==w&&(E=Math.min(E,Math.abs(x-w))),w=x);z.zone=this.zones.length&&z.getZone()}this.closestPointRangePx=E},getValidPoints:function(a,b){var c=this.chart;return z(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,e=b.renderer,d=b.inverted,g=this.clipBox,h=g||b.clipBox,m=this.sharedClipKey||[\"_sharedClip\",a&&a.duration,a&&a.easing,h.height,\nc.xAxis,c.yAxis].join(),f=b[m],p=b[m+\"m\"];f||(a&&(h.width=0,b[m+\"m\"]=p=e.clipRect(-99,d?-b.plotLeft:-b.plotTop,99,d?b.chartWidth:b.chartHeight)),b[m]=f=e.clipRect(h),f.count={length:0});a&&!f.count[this.index]&&(f.count[this.index]=!0,f.count.length+=1);!1!==c.clip&&(this.group.clip(a||g?f:b.clipRect),this.markerGroup.clip(p),this.sharedClipKey=m);a||(f.count[this.index]&&(delete f.count[this.index],--f.count.length),0===f.count.length&&m&&b[m]&&(g||(b[m]=b[m].destroy()),b[m+\"m\"]&&(b[m+\"m\"]=b[m+\"m\"].destroy())))},\nanimate:function(a){var b=this.chart,c=A(this.options.animation),e;a?this.setClip(c):(e=this.sharedClipKey,(a=b[e])&&a.animate({width:b.plotSizeX},c),b[e+\"m\"]&&b[e+\"m\"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();n(this,\"afterAnimate\")},drawPoints:function(){var a=this.points,b=this.chart,c,e,d,g,h=this.options.marker,f,n,k,l,t=this.markerGroup,q=D(h.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*h.radius);if(!1!==h.enabled||this._hasPointMarkers)for(e=\n0;e<a.length;e++)d=a[e],c=d.plotY,g=d.graphic,f=d.marker||{},n=!!d.marker,k=q&&void 0===f.enabled||f.enabled,l=d.isInside,k&&p(c)&&null!==d.y?(c=D(f.symbol,this.symbol),d.hasImage=0===c.indexOf(\"url\"),k=this.markerAttribs(d,d.selected&&\"select\"),g?g[l?\"show\":\"hide\"](!0).animate(k):l&&(0<k.width||d.hasImage)&&(d.graphic=g=b.renderer.symbol(c,k.x,k.y,k.width,k.height,n?f:h).add(t)),g&&g.attr(this.pointAttribs(d,d.selected&&\"select\")),g&&g.addClass(d.getClassName(),!0)):g&&(d.graphic=g.destroy())},markerAttribs:function(a,\nb){var c=this.options.marker,e=a.marker||{},d=D(e.radius,c.radius);b&&(c=c.states[b],b=e.states&&e.states[b],d=D(b&&b.radius,c&&c.radius,d+(c&&c.radiusPlus||0)));a.hasImage&&(d=0);a={x:Math.floor(a.plotX)-d,y:a.plotY-d};d&&(a.width=a.height=2*d);return a},pointAttribs:function(a,b){var c=this.options.marker,e=a&&a.options,d=e&&e.marker||{},g=this.color,h=e&&e.color,f=a&&a.color,e=D(d.lineWidth,c.lineWidth);a=a&&a.zone&&a.zone.color;g=h||a||f||g;a=d.fillColor||c.fillColor||g;g=d.lineColor||c.lineColor||\ng;b&&(c=c.states[b],b=d.states&&d.states[b]||{},e=D(b.lineWidth,c.lineWidth,e+D(b.lineWidthPlus,c.lineWidthPlus,0)),a=b.fillColor||c.fillColor||a,g=b.lineColor||c.lineColor||g);return{stroke:g,\"stroke-width\":e,fill:a}},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\\/533/.test(E.navigator.userAgent),e,h=a.data||[],g,f,k;n(a,\"destroy\");w(a);u(a.axisTypes||[],function(b){(k=a[b])&&k.series&&(d(k.series,a),k.isDirty=k.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(e=h.length;e--;)(g=\nh[e])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout);for(f in a)a[f]instanceof x&&!a[f].survive&&(e=c&&\"group\"===f?\"hide\":\"destroy\",a[f][e]());b.hoverSeries===a&&(b.hoverSeries=null);d(b.series,a);b.orderSeries();for(f in a)delete a[f]},getGraphPath:function(a,b,c){var e=this,d=e.options,g=d.step,h,f=[],m=[],p;a=a||e.points;(h=a.reversed)&&a.reverse();(g={right:1,center:2}[g]||g&&3)&&h&&(g=4-g);!d.connectNulls||b||c||(a=this.getValidPoints(a));u(a,function(h,n){var l=h.plotX,\nt=h.plotY,q=a[n-1];(h.leftCliff||q&&q.rightCliff)&&!c&&(p=!0);h.isNull&&!k(b)&&0<n?p=!d.connectNulls:h.isNull&&!b?p=!0:(0===n||p?n=[\"M\",h.plotX,h.plotY]:e.getPointSpline?n=e.getPointSpline(a,h,n):g?(n=1===g?[\"L\",q.plotX,t]:2===g?[\"L\",(q.plotX+l)/2,q.plotY,\"L\",(q.plotX+l)/2,t]:[\"L\",l,q.plotY],n.push(\"L\",l,t)):n=[\"L\",l,t],m.push(h.x),g&&m.push(h.x),f.push.apply(f,n),p=!1)});f.xMap=m;return e.graphPath=f},drawGraph:function(){var a=this,b=this.options,c=(this.gappedPath||this.getGraphPath).call(this),\ne=[[\"graph\",\"highcharts-graph\",b.lineColor||this.color,b.dashStyle]];u(this.zones,function(c,d){e.push([\"zone-graph-\"+d,\"highcharts-graph highcharts-zone-graph-\"+d+\" \"+(c.className||\"\"),c.color||a.color,c.dashStyle||b.dashStyle])});u(e,function(e,d){var g=e[0],h=a[g];h?(h.endX=c.xMap,h.animate({d:c})):c.length&&(a[g]=a.chart.renderer.path(c).addClass(e[1]).attr({zIndex:1}).add(a.group),h={stroke:e[2],\"stroke-width\":b.lineWidth,fill:a.fillGraph&&a.color||\"none\"},e[3]?h.dashstyle=e[3]:\"square\"!==b.linecap&&\n(h[\"stroke-linecap\"]=h[\"stroke-linejoin\"]=\"round\"),h=a[g].attr(h).shadow(2>d&&b.shadow));h&&(h.startX=c.xMap,h.isArea=c.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,e=this.zones,d,g,h=this.clips||[],f,k=this.graph,p=this.area,n=Math.max(b.chartWidth,b.chartHeight),l=this[(this.zoneAxis||\"y\")+\"Axis\"],t,q,x=b.inverted,w,r,C,E,z=!1;e.length&&(k||p)&&l&&void 0!==l.min&&(q=l.reversed,w=l.horiz,k&&k.hide(),p&&p.hide(),t=l.getExtremes(),u(e,function(e,m){d=q?w?b.plotWidth:0:w?0:\nl.toPixels(t.min);d=Math.min(Math.max(D(g,d),0),n);g=Math.min(Math.max(Math.round(l.toPixels(D(e.value,t.max),!0)),0),n);z&&(d=g=l.toPixels(t.max));r=Math.abs(d-g);C=Math.min(d,g);E=Math.max(d,g);l.isXAxis?(f={x:x?E:C,y:0,width:r,height:n},w||(f.x=b.plotHeight-f.x)):(f={x:0,y:x?E:C,width:n,height:r},w&&(f.y=b.plotWidth-f.y));x&&c.isVML&&(f=l.isXAxis?{x:0,y:q?C:E,height:f.width,width:b.chartWidth}:{x:f.y-b.plotLeft-b.spacingBox.x,y:0,width:f.height,height:b.chartHeight});h[m]?h[m].animate(f):(h[m]=\nc.clipRect(f),k&&a[\"zone-graph-\"+m].clip(h[m]),p&&a[\"zone-area-\"+m].clip(h[m]));z=e.value>t.max}),this.clips=h)},invertGroups:function(a){function b(){u([\"group\",\"markerGroup\"],function(b){c[b]&&(e.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,e=c.chart,d;c.xAxis&&(d=B(e,\"resize\",b),B(c,\"destroy\",d),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,e,d){var g=this[a],h=!g;h&&(this[a]=g=this.chart.renderer.g(b).attr({zIndex:e||\n.1}).add(d),g.addClass(\"highcharts-series-\"+this.index+\" highcharts-\"+this.type+\"-series highcharts-color-\"+this.colorIndex+\" \"+(this.options.className||\"\")));g.attr({visibility:c})[h?\"attr\":\"animate\"](this.getPlotBox());return g},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,e=a.options,d=!!a.animate&&b.renderer.isSVG&&A(e.animation).duration,\ng=a.visible?\"inherit\":\"hidden\",h=e.zIndex,f=a.hasRendered,k=b.seriesGroup,p=b.inverted;c=a.plotGroup(\"group\",\"series\",g,h,k);a.markerGroup=a.plotGroup(\"markerGroup\",\"markers\",g,h,k);d&&a.animate(!0);c.inverted=a.isCartesian?p:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(p);!1===e.clip||a.sharedClipKey||f||c.clip(b.clipRect);d&&a.animate();f||(a.animationTimeout=\nC(function(){a.afterAnimate()},d));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,e=this.xAxis,d=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:D(e&&e.left,a.plotLeft),translateY:D(d&&d.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:[\"clientX\",\"plotY\"],searchPoint:function(a,b){var c=this.xAxis,e=this.yAxis,d=this.chart.inverted;return this.searchKDTree({clientX:d?\nc.len-a.chartY+c.pos:a.chartX-c.pos,plotY:d?e.len-a.chartX+e.pos:a.chartY-e.pos},b)},buildKDTree:function(){function a(c,e,d){var g,h;if(h=c&&c.length)return g=b.kdAxisArray[e%d],c.sort(function(a,b){return a[g]-b[g]}),h=Math.floor(h/2),{point:c[h],left:a(c.slice(0,h),e+1,d),right:a(c.slice(h+1),e+1,d)}}this.buildingKdTree=!0;var b=this,c=-1<b.options.findNearestPointBy.indexOf(\"y\")?2:1;delete b.kdTree;C(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c);b.buildingKdTree=!1},b.options.kdNow?\n0:1)},searchKDTree:function(a,b){function c(a,b,f,m){var p=b.point,n=e.kdAxisArray[f%m],l,t,q=p;t=k(a[d])&&k(p[d])?Math.pow(a[d]-p[d],2):null;l=k(a[g])&&k(p[g])?Math.pow(a[g]-p[g],2):null;l=(t||0)+(l||0);p.dist=k(l)?Math.sqrt(l):Number.MAX_VALUE;p.distX=k(t)?Math.sqrt(t):Number.MAX_VALUE;n=a[n]-p[n];l=0>n?\"left\":\"right\";t=0>n?\"right\":\"left\";b[l]&&(l=c(a,b[l],f+1,m),q=l[h]<q[h]?l:p);b[t]&&Math.sqrt(n*n)<q[h]&&(a=c(a,b[t],f+1,m),q=a[h]<q[h]?a:q);return q}var e=this,d=this.kdAxisArray[0],g=this.kdAxisArray[1],\nh=b?\"distX\":\"dist\";b=-1<e.options.findNearestPointBy.indexOf(\"y\")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree();if(this.kdTree)return c(a,this.kdTree,b,b)}})})(L);(function(a){function B(a,d,c,f,l){var b=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=d;this.x=f;this.total=null;this.points={};this.stack=l;this.rightCliff=this.leftCliff=0;this.alignOptions={align:d.align||(b?c?\"left\":\"right\":\"center\"),verticalAlign:d.verticalAlign||(b?\"middle\":c?\"bottom\":\"top\"),y:k(d.y,b?4:c?\n14:-6),x:k(d.x,b?c?-6:6:0)};this.textAlign=d.textAlign||(b?c?\"right\":\"left\":\"center\")}var A=a.Axis,H=a.Chart,G=a.correctFloat,r=a.defined,f=a.destroyObjectProperties,l=a.each,q=a.format,k=a.pick;a=a.Series;B.prototype={destroy:function(){f(this,this.axis)},render:function(a){var d=this.options,c=d.format,c=c?q(c,this):d.formatter.call(this);this.label?this.label.attr({text:c,visibility:\"hidden\"}):this.label=this.axis.chart.renderer.text(c,null,null,d.useHTML).css(d.style).attr({align:this.textAlign,\nrotation:d.rotation,visibility:\"hidden\"}).add(a)},setOffset:function(a,d){var c=this.axis,f=c.chart,k=f.inverted,b=c.reversed,b=this.isNegative&&!b||!this.isNegative&&b,p=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=Math.abs(p-c);a=f.xAxis[0].translate(this.x)+a;var h=f.plotHeight,k={x:k?b?p:p-c:a,y:k?h-a-d:b?h-p-c:h-p,width:k?c:d,height:k?d:c};if(d=this.label)d.align(this.alignOptions,null,k),k=d.alignAttr,d[!1===this.options.crop||f.isInsidePlot(k.x,k.y)?\"show\":\"hide\"](!0)}};\nH.prototype.getStacks=function(){var a=this;l(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});l(a.series,function(d){!d.options.stacking||!0!==d.visible&&!1!==a.options.chart.ignoreHiddenSeries||(d.stackKey=d.type+k(d.options.stack,\"\"))})};A.prototype.buildStacks=function(){var a=this.series,d,c=k(this.options.reversedStacks,!0),f=a.length,l;if(!this.isXAxis){this.usePercentage=!1;for(l=f;l--;)a[c?l:f-l-1].setStackedPoints();for(l=f;l--;)d=a[c?l:f-l-1],d.setStackCliffs&&\nd.setStackCliffs();if(this.usePercentage)for(l=0;l<f;l++)a[l].setPercentStacks()}};A.prototype.renderStackTotals=function(){var a=this.chart,d=a.renderer,c=this.stacks,f,k,b=this.stackTotalGroup;b||(this.stackTotalGroup=b=d.g(\"stack-labels\").attr({visibility:\"visible\",zIndex:6}).add());b.translate(a.plotLeft,a.plotTop);for(f in c)for(k in a=c[f],a)a[k].render(b)};A.prototype.resetStacks=function(){var a=this.stacks,d,c;if(!this.isXAxis)for(d in a)for(c in a[d])a[d][c].touched<this.stacksTouched?(a[d][c].destroy(),\ndelete a[d][c]):(a[d][c].total=null,a[d][c].cum=null)};A.prototype.cleanStacks=function(){var a,d,c;if(!this.isXAxis)for(d in this.oldStacks&&(a=this.stacks=this.oldStacks),a)for(c in a[d])a[d][c].cum=a[d][c].total};a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,d=this.processedYData,c=[],f=d.length,l=this.options,b=l.threshold,p=l.startFromThreshold?b:0,h=l.stack,l=l.stacking,t=this.stackKey,\nq=\"-\"+t,w=this.negStacks,e=this.yAxis,x=e.stacks,C=e.oldStacks,E,m,y,A,K,J,g;e.stacksTouched+=1;for(K=0;K<f;K++)J=a[K],g=d[K],E=this.getStackIndicator(E,J,this.index),A=E.key,y=(m=w&&g<(p?0:b))?q:t,x[y]||(x[y]={}),x[y][J]||(C[y]&&C[y][J]?(x[y][J]=C[y][J],x[y][J].total=null):x[y][J]=new B(e,e.options.stackLabels,m,J,h)),y=x[y][J],null!==g&&(y.points[A]=y.points[this.index]=[k(y.cum,p)],r(y.cum)||(y.base=A),y.touched=e.stacksTouched,0<E.index&&!1===this.singleStacks&&(y.points[A][0]=y.points[this.index+\n\",\"+J+\",0\"][0])),\"percent\"===l?(m=m?t:q,w&&x[m]&&x[m][J]?(m=x[m][J],y.total=m.total=Math.max(m.total,y.total)+Math.abs(g)||0):y.total=G(y.total+(Math.abs(g)||0))):y.total=G(y.total+(g||0)),y.cum=k(y.cum,p)+(g||0),null!==g&&(y.points[A].push(y.cum),c[K]=y.cum);\"percent\"===l&&(e.usePercentage=!0);this.stackedYData=c;e.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,d=a.stackKey,c=a.yAxis.stacks,f=a.processedXData,k;l([d,\"-\"+d],function(b){for(var d=f.length,h,n;d--;)if(h=f[d],k=a.getStackIndicator(k,\nh,a.index,b),h=(n=c[b]&&c[b][h])&&n.points[k.key])n=n.total?100/n.total:0,h[0]=G(h[0]*n),h[1]=G(h[1]*n),a.stackedYData[d]=h[1]})};a.prototype.getStackIndicator=function(a,d,c,f){!r(a)||a.x!==d||f&&a.key!==f?a={x:d,index:0,key:f}:a.index++;a.key=[c,d,a.index].join();return a}})(L);(function(a){var B=a.addEvent,A=a.animate,H=a.Axis,G=a.createElement,r=a.css,f=a.defined,l=a.each,q=a.erase,k=a.extend,u=a.fireEvent,d=a.inArray,c=a.isNumber,n=a.isObject,z=a.merge,b=a.pick,p=a.Point,h=a.Series,t=a.seriesTypes,\nD=a.setAnimation,w=a.splat;k(a.Chart.prototype,{addSeries:function(a,c,d){var e,h=this;a&&(c=b(c,!0),u(h,\"addSeries\",{options:a},function(){e=h.initSeries(a);h.isDirtyLegend=!0;h.linkSeries();c&&h.redraw(d)}));return e},addAxis:function(a,c,d,h){var e=c?\"xAxis\":\"yAxis\",f=this.options;a=z(a,{index:this[e].length,isX:c});new H(this,a);f[e]=w(f[e]||{});f[e].push(a);b(d,!0)&&this.redraw(h)},showLoading:function(a){var b=this,c=b.options,e=b.loadingDiv,d=c.loading,h=function(){e&&r(e,{left:b.plotLeft+\n\"px\",top:b.plotTop+\"px\",width:b.plotWidth+\"px\",height:b.plotHeight+\"px\"})};e||(b.loadingDiv=e=G(\"div\",{className:\"highcharts-loading highcharts-loading-hidden\"},null,b.container),b.loadingSpan=G(\"span\",{className:\"highcharts-loading-inner\"},null,e),B(b,\"redraw\",h));e.className=\"highcharts-loading\";b.loadingSpan.innerHTML=a||c.lang.loading;r(e,k(d.style,{zIndex:10}));r(b.loadingSpan,d.labelStyle);b.loadingShown||(r(e,{opacity:0,display:\"\"}),A(e,{opacity:d.style.opacity||.5},{duration:d.showDuration||\n0}));b.loadingShown=!0;h()},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&(b.className=\"highcharts-loading highcharts-loading-hidden\",A(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){r(b,{display:\"none\"})}}));this.loadingShown=!1},propsRequireDirtyBox:\"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow\".split(\" \"),\npropsRequireUpdateSeries:\"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions\".split(\" \"),update:function(a,h){var e,k={credits:\"addCredits\",title:\"setTitle\",subtitle:\"setSubtitle\"},m=a.chart,p,n;if(m){z(!0,this.options.chart,m);\"className\"in m&&this.setClassName(m.className);if(\"inverted\"in m||\"polar\"in m)this.propFromSeries(),p=!0;\"alignTicks\"in m&&(p=!0);for(e in m)m.hasOwnProperty(e)&&(-1!==d(\"chart.\"+e,this.propsRequireUpdateSeries)&&(n=!0),-1!==d(e,this.propsRequireDirtyBox)&&\n(this.isDirtyBox=!0));\"style\"in m&&this.renderer.setStyle(m.style)}for(e in a){if(this[e]&&\"function\"===typeof this[e].update)this[e].update(a[e],!1);else if(\"function\"===typeof this[k[e]])this[k[e]](a[e]);\"chart\"!==e&&-1!==d(e,this.propsRequireUpdateSeries)&&(n=!0)}a.colors&&(this.options.colors=a.colors);a.plotOptions&&z(!0,this.options.plotOptions,a.plotOptions);l([\"xAxis\",\"yAxis\",\"series\",\"colorAxis\",\"pane\"],function(b){a[b]&&l(w(a[b]),function(a,c){(c=f(a.id)&&this.get(a.id)||this[b][c])&&c.coll===\nb&&c.update(a,!1)},this)},this);p&&l(this.axes,function(a){a.update({},!1)});n&&l(this.series,function(a){a.update({},!1)});a.loading&&z(!0,this.options.loading,a.loading);e=m&&m.width;m=m&&m.height;c(e)&&e!==this.chartWidth||c(m)&&m!==this.chartHeight?this.setSize(e,m):b(h,!0)&&this.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});k(p.prototype,{update:function(a,c,d,h){function e(){f.applyOptions(a);null===f.y&&p&&(f.graphic=p.destroy());n(a,!0)&&(p&&p.element&&a&&a.marker&&a.marker.symbol&&\n(f.graphic=p.destroy()),a&&a.dataLabels&&f.dataLabel&&(f.dataLabel=f.dataLabel.destroy()));l=f.index;k.updateParallelArrays(f,l);t.data[l]=n(t.data[l],!0)||n(a,!0)?f.options:a;k.isDirty=k.isDirtyData=!0;!k.fixedBox&&k.hasCartesianSeries&&(g.isDirtyBox=!0);\"point\"===t.legendType&&(g.isDirtyLegend=!0);c&&g.redraw(d)}var f=this,k=f.series,p=f.graphic,l,g=k.chart,t=k.options;c=b(c,!0);!1===h?e():f.firePointEvent(\"update\",{options:a},e)},remove:function(a,b){this.series.removePoint(d(this,this.series.data),\na,b)}});k(h.prototype,{addPoint:function(a,c,d,h){var e=this.options,f=this.data,k=this.chart,p=this.xAxis,p=p&&p.hasNames&&p.names,n=e.data,g,l,t=this.xData,q,w;c=b(c,!0);g={series:this};this.pointClass.prototype.applyOptions.apply(g,[a]);w=g.x;q=t.length;if(this.requireSorting&&w<t[q-1])for(l=!0;q&&t[q-1]>w;)q--;this.updateParallelArrays(g,\"splice\",q,0,0);this.updateParallelArrays(g,q);p&&g.name&&(p[w]=g.name);n.splice(q,0,a);l&&(this.data.splice(q,0,null),this.processData());\"point\"===e.legendType&&\nthis.generatePoints();d&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(g,\"shift\"),n.shift()));this.isDirtyData=this.isDirty=!0;c&&k.redraw(h)},removePoint:function(a,c,d){var e=this,h=e.data,f=h[a],k=e.points,p=e.chart,n=function(){k&&k.length===h.length&&k.splice(a,1);h.splice(a,1);e.options.data.splice(a,1);e.updateParallelArrays(f||{series:e},\"splice\",a,1);f&&f.destroy();e.isDirty=!0;e.isDirtyData=!0;c&&p.redraw()};D(d,p);c=b(c,!0);f?f.firePointEvent(\"remove\",null,n):\nn()},remove:function(a,c,d){function e(){h.destroy();f.isDirtyLegend=f.isDirtyBox=!0;f.linkSeries();b(a,!0)&&f.redraw(c)}var h=this,f=h.chart;!1!==d?u(h,\"remove\",null,e):e()},update:function(a,c){var e=this,d=this.chart,h=this.userOptions,f=this.oldType||this.type,p=a.type||h.type||d.options.chart.type,n=t[f].prototype,q=[\"group\",\"markerGroup\",\"dataLabelsGroup\"],g;if(p&&p!==f||void 0!==a.zIndex)q.length=0;l(q,function(a){q[a]=e[a];delete e[a]});a=z(h,{animation:!1,index:this.index,pointStart:this.xData[0]},\n{data:this.options.data},a);this.remove(!1,null,!1);for(g in n)this[g]=void 0;k(this,t[p||f].prototype);l(q,function(a){e[a]=q[a]});this.init(d,a);this.oldType=f;d.linkSeries();b(c,!0)&&d.redraw(!1)}});k(H.prototype,{update:function(a,c){var e=this.chart;a=e.options[this.coll][this.options.index]=z(this.userOptions,a);this.destroy(!0);this.init(e,k(a,{events:void 0}));e.isDirtyBox=!0;b(c,!0)&&e.redraw()},remove:function(a){for(var c=this.chart,e=this.coll,d=this.series,h=d.length;h--;)d[h]&&d[h].remove(!1);\nq(c.axes,this);q(c[e],this);c.options[e].splice(this.options.index,1);l(c[e],function(a,b){a.options.index=b});this.destroy();c.isDirtyBox=!0;b(a,!0)&&c.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(L);(function(a){var B=a.color,A=a.each,H=a.map,G=a.pick,r=a.Series,f=a.seriesType;f(\"area\",\"line\",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var a=[],f=[],k=this.xAxis,r=this.yAxis,d=r.stacks[this.stackKey],\nc={},n=this.points,z=this.index,b=r.series,p=b.length,h,t=G(r.options.reversedStacks,!0)?1:-1,D,w;if(this.options.stacking){for(D=0;D<n.length;D++)c[n[D].x]=n[D];for(w in d)null!==d[w].total&&f.push(w);f.sort(function(a,b){return a-b});h=H(b,function(){return this.visible});A(f,function(b,n){var e=0,l,m;if(c[b]&&!c[b].isNull)a.push(c[b]),A([-1,1],function(a){var e=1===a?\"rightNull\":\"leftNull\",k=0,q=d[f[n+a]];if(q)for(D=z;0<=D&&D<p;)l=q.points[D],l||(D===z?c[b][e]=!0:h[D]&&(m=d[b].points[D])&&(k-=\nm[1]-m[0])),D+=t;c[b][1===a?\"rightCliff\":\"leftCliff\"]=k});else{for(D=z;0<=D&&D<p;){if(l=d[b].points[D]){e=l[1];break}D+=t}e=r.translate(e,0,1,0,1);a.push({isNull:!0,plotX:k.translate(b,0,0,0,1),x:b,plotY:e,yBottom:e})}})}return a},getGraphPath:function(a){var f=r.prototype.getGraphPath,k=this.options,l=k.stacking,d=this.yAxis,c,n,z=[],b=[],p=this.index,h,t=d.stacks[this.stackKey],D=k.threshold,w=d.getThreshold(k.threshold),e,k=k.connectNulls||\"percent\"===l,x=function(c,e,f){var k=a[c];c=l&&t[k.x].points[p];\nvar m=k[f+\"Null\"]||0;f=k[f+\"Cliff\"]||0;var n,q,k=!0;f||m?(n=(m?c[0]:c[1])+f,q=c[0]+f,k=!!m):!l&&a[e]&&a[e].isNull&&(n=q=D);void 0!==n&&(b.push({plotX:h,plotY:null===n?w:d.getThreshold(n),isNull:k,isCliff:!0}),z.push({plotX:h,plotY:null===q?w:d.getThreshold(q),doCurve:!1}))};a=a||this.points;l&&(a=this.getStackPoints());for(c=0;c<a.length;c++)if(n=a[c].isNull,h=G(a[c].rectPlotX,a[c].plotX),e=G(a[c].yBottom,w),!n||k)k||x(c,c-1,\"left\"),n&&!l&&k||(b.push(a[c]),z.push({x:c,plotX:h,plotY:e})),k||x(c,c+\n1,\"right\");c=f.call(this,b,!0,!0);z.reversed=!0;n=f.call(this,z,!0,!0);n.length&&(n[0]=\"L\");n=c.concat(n);f=f.call(this,b,!1,k);n.xMap=c.xMap;this.areaPath=n;return f},drawGraph:function(){this.areaPath=[];r.prototype.drawGraph.apply(this);var a=this,f=this.areaPath,k=this.options,u=[[\"area\",\"highcharts-area\",this.color,k.fillColor]];A(this.zones,function(d,c){u.push([\"zone-area-\"+c,\"highcharts-area highcharts-zone-area-\"+c+\" \"+d.className,d.color||a.color,d.fillColor||k.fillColor])});A(u,function(d){var c=\nd[0],n=a[c];n?(n.endX=f.xMap,n.animate({d:f})):(n=a[c]=a.chart.renderer.path(f).addClass(d[1]).attr({fill:G(d[3],B(d[2]).setOpacity(G(k.fillOpacity,.75)).get()),zIndex:0}).add(a.group),n.isArea=!0);n.startX=f.xMap;n.shiftUnit=k.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(L);(function(a){var B=a.pick;a=a.seriesType;a(\"spline\",\"line\",{},{getPointSpline:function(a,H,G){var r=H.plotX,f=H.plotY,l=a[G-1];G=a[G+1];var q,k,u,d;if(l&&!l.isNull&&!1!==l.doCurve&&!H.isCliff&&G&&!G.isNull&&\n!1!==G.doCurve&&!H.isCliff){a=l.plotY;u=G.plotX;G=G.plotY;var c=0;q=(1.5*r+l.plotX)/2.5;k=(1.5*f+a)/2.5;u=(1.5*r+u)/2.5;d=(1.5*f+G)/2.5;u!==q&&(c=(d-k)*(u-r)/(u-q)+f-d);k+=c;d+=c;k>a&&k>f?(k=Math.max(a,f),d=2*f-k):k<a&&k<f&&(k=Math.min(a,f),d=2*f-k);d>G&&d>f?(d=Math.max(G,f),k=2*f-d):d<G&&d<f&&(d=Math.min(G,f),k=2*f-d);H.rightContX=u;H.rightContY=d}H=[\"C\",B(l.rightContX,l.plotX),B(l.rightContY,l.plotY),B(q,r),B(k,f),r,f];l.rightContX=l.rightContY=null;return H}})})(L);(function(a){var B=a.seriesTypes.area.prototype,\nA=a.seriesType;A(\"areaspline\",\"spline\",a.defaultPlotOptions.area,{getStackPoints:B.getStackPoints,getGraphPath:B.getGraphPath,setStackCliffs:B.setStackCliffs,drawGraph:B.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(L);(function(a){var B=a.animObject,A=a.color,H=a.each,G=a.extend,r=a.isNumber,f=a.merge,l=a.pick,q=a.Series,k=a.seriesType,u=a.svg;k(\"column\",\"line\",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,\nstates:{hover:{halo:!1,brightness:.1,shadow:!1},select:{color:\"#cccccc\",borderColor:\"#000000\",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:\"#ffffff\"},{cropShoulder:0,directTouch:!0,trackerGroups:[\"group\",\"dataLabelsGroup\"],negStacks:!0,init:function(){q.prototype.init.apply(this,arguments);var a=this,c=a.chart;c.hasRendered&&H(c.series,function(c){c.type===a.type&&(c.isDirty=!0)})},\ngetColumnMetrics:function(){var a=this,c=a.options,f=a.xAxis,k=a.yAxis,b=f.reversed,p,h={},t=0;!1===c.grouping?t=1:H(a.chart.series,function(b){var c=b.options,e=b.yAxis,d;b.type===a.type&&b.visible&&k.len===e.len&&k.pos===e.pos&&(c.stacking?(p=b.stackKey,void 0===h[p]&&(h[p]=t++),d=h[p]):!1!==c.grouping&&(d=t++),b.columnIndex=d)});var q=Math.min(Math.abs(f.transA)*(f.ordinalSlope||c.pointRange||f.closestPointRange||f.tickInterval||1),f.len),w=q*c.groupPadding,e=(q-2*w)/(t||1),c=Math.min(c.maxPointWidth||\nf.len,l(c.pointWidth,e*(1-2*c.pointPadding)));a.columnMetrics={width:c,offset:(e-c)/2+(w+((a.columnIndex||0)+(b?1:0))*e-q/2)*(b?-1:1)};return a.columnMetrics},crispCol:function(a,c,f,k){var b=this.chart,d=this.borderWidth,h=-(d%2?.5:0),d=d%2?.5:1;b.inverted&&b.renderer.isVML&&(d+=1);this.options.crisp&&(f=Math.round(a+f)+h,a=Math.round(a)+h,f-=a);k=Math.round(c+k)+d;h=.5>=Math.abs(c)&&.5<k;c=Math.round(c)+d;k-=c;h&&k&&(--c,k+=1);return{x:a,y:c,width:f,height:k}},translate:function(){var a=this,c=\na.chart,f=a.options,k=a.dense=2>a.closestPointRange*a.xAxis.transA,k=a.borderWidth=l(f.borderWidth,k?0:1),b=a.yAxis,p=a.translatedThreshold=b.getThreshold(f.threshold),h=l(f.minPointLength,5),t=a.getColumnMetrics(),r=t.width,w=a.barW=Math.max(r,1+2*k),e=a.pointXOffset=t.offset;c.inverted&&(p-=.5);f.pointPadding&&(w=Math.ceil(w));q.prototype.translate.apply(a);H(a.points,function(d){var f=l(d.yBottom,p),k=999+Math.abs(f),k=Math.min(Math.max(-k,d.plotY),b.len+k),m=d.plotX+e,n=w,t=Math.min(k,f),q,u=\nMath.max(k,f)-t;Math.abs(u)<h&&h&&(u=h,q=!b.reversed&&!d.negative||b.reversed&&d.negative,t=Math.abs(t-p)>h?f-h:p-(q?h:0));d.barX=m;d.pointWidth=r;d.tooltipPos=c.inverted?[b.len+b.pos-c.plotLeft-k,a.xAxis.len-m-n/2,u]:[m+n/2,k+b.pos-c.plotTop,u];d.shapeType=\"rect\";d.shapeArgs=a.crispCol.apply(a,d.isNull?[d.plotX,b.len/2,0,0]:[m,t,n,u])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?\"addClass\":\"removeClass\"](\"highcharts-dense-data\")},\npointAttribs:function(a,c){var d=this.options,k,b=this.pointAttrToOptions||{};k=b.stroke||\"borderColor\";var p=b[\"stroke-width\"]||\"borderWidth\",h=a&&a.color||this.color,l=a[k]||d[k]||this.color||h,q=a[p]||d[p]||this[p]||0,b=d.dashStyle;a&&this.zones.length&&(h=(h=a.getZone())&&h.color||a.options.color||this.color);c&&(a=f(d.states[c],a.options.states&&a.options.states[c]||{}),c=a.brightness,h=a.color||void 0!==c&&A(h).brighten(a.brightness).get()||h,l=a[k]||l,q=a[p]||q,b=a.dashStyle||b);k={fill:h,\nstroke:l,\"stroke-width\":q};d.borderRadius&&(k.r=d.borderRadius);b&&(k.dashstyle=b);return k},drawPoints:function(){var a=this,c=this.chart,k=a.options,l=c.renderer,b=k.animationLimit||250,p;H(a.points,function(d){var h=d.graphic;if(r(d.plotY)&&null!==d.y){p=d.shapeArgs;if(h)h[c.pointCount<b?\"animate\":\"attr\"](f(p));else d.graphic=h=l[d.shapeType](p).add(d.group||a.group);h.attr(a.pointAttribs(d,d.selected&&\"select\")).shadow(k.shadow,null,k.stacking&&!k.borderRadius);h.addClass(d.getClassName(),!0)}else h&&\n(d.graphic=h.destroy())})},animate:function(a){var c=this,d=this.yAxis,f=c.options,b=this.chart.inverted,k={};u&&(a?(k.scaleY=.001,a=Math.min(d.pos+d.len,Math.max(d.pos,d.toPixels(f.threshold))),b?k.translateX=a-d.len:k.translateY=a,c.group.attr(k)):(k[b?\"translateX\":\"translateY\"]=d.pos,c.group.animate(k,G(B(c.options.animation),{step:function(a,b){c.group.attr({scaleY:Math.max(.001,b.pos)})}})),c.animate=null))},remove:function(){var a=this,c=a.chart;c.hasRendered&&H(c.series,function(c){c.type===\na.type&&(c.isDirty=!0)});q.prototype.remove.apply(a,arguments)}})})(L);(function(a){a=a.seriesType;a(\"bar\",\"column\",null,{inverted:!0})})(L);(function(a){var B=a.Series;a=a.seriesType;a(\"scatter\",\"line\",{lineWidth:0,findNearestPointBy:\"xy\",marker:{enabled:!0},tooltip:{headerFormat:'\\x3cspan style\\x3d\"color:{point.color}\"\\x3e\\u25cf\\x3c/span\\x3e \\x3cspan style\\x3d\"font-size: 0.85em\"\\x3e {series.name}\\x3c/span\\x3e\\x3cbr/\\x3e',pointFormat:\"x: \\x3cb\\x3e{point.x}\\x3c/b\\x3e\\x3cbr/\\x3ey: \\x3cb\\x3e{point.y}\\x3c/b\\x3e\\x3cbr/\\x3e\"}},\n{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:[\"group\",\"markerGroup\",\"dataLabelsGroup\"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&B.prototype.drawGraph.call(this)}})})(L);(function(a){var B=a.pick,A=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,G=this.chart,r=2*(a.slicedOffset||0),f=G.plotWidth-2*r,G=G.plotHeight-2*r,l=a.center,l=[B(l[0],\"50%\"),B(l[1],\"50%\"),a.size||\"100%\",a.innerSize||0],q=Math.min(f,G),k,u;for(k=0;4>k;++k)u=\nl[k],a=2>k||2===k&&/%$/.test(u),l[k]=A(u,[f,G,q,l[2]][k])+(a?r:0);l[3]>l[2]&&(l[3]=l[2]);return l}}})(L);(function(a){var B=a.addEvent,A=a.defined,H=a.each,G=a.extend,r=a.inArray,f=a.noop,l=a.pick,q=a.Point,k=a.Series,u=a.seriesType,d=a.setAnimation;u(\"pie\",\"line\",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:\"point\",marker:null,size:null,showInLegend:!1,slicedOffset:10,\nstickyTracking:!1,tooltip:{followPointer:!0},borderColor:\"#ffffff\",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:[\"group\",\"dataLabelsGroup\"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=this,d=c.points,b=c.startAngleRad;a||(H(d,function(a){var d=a.graphic,f=a.shapeArgs;d&&(d.attr({r:a.startR||c.center[3]/2,start:b,end:b}),d.animate({r:f.r,start:f.start,end:f.end},\nc.options.animation))}),c.animate=null)},updateTotals:function(){var a,d=0,f=this.points,b=f.length,k,h=this.options.ignoreHiddenPoint;for(a=0;a<b;a++)k=f[a],0>k.y&&(k.y=null),d+=h&&!k.visible?0:k.y;this.total=d;for(a=0;a<b;a++)k=f[a],k.percentage=0<d&&(k.visible||!h)?k.y/d*100:0,k.total=d},generatePoints:function(){k.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var c=0,d=this.options,b=d.slicedOffset,f=b+(d.borderWidth||0),h,k,q,w=d.startAngle||\n0,e=this.startAngleRad=Math.PI/180*(w-90),w=(this.endAngleRad=Math.PI/180*(l(d.endAngle,w+360)-90))-e,r=this.points,u=d.dataLabels.distance,d=d.ignoreHiddenPoint,E,m=r.length,y;a||(this.center=a=this.getCenter());this.getX=function(b,c){q=Math.asin(Math.min((b-a[1])/(a[2]/2+u),1));return a[0]+(c?-1:1)*Math.cos(q)*(a[2]/2+u)};for(E=0;E<m;E++){y=r[E];h=e+c*w;if(!d||y.visible)c+=y.percentage/100;k=e+c*w;y.shapeType=\"arc\";y.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:Math.round(1E3*h)/1E3,end:Math.round(1E3*\nk)/1E3};q=(k+h)/2;q>1.5*Math.PI?q-=2*Math.PI:q<-Math.PI/2&&(q+=2*Math.PI);y.slicedTranslation={translateX:Math.round(Math.cos(q)*b),translateY:Math.round(Math.sin(q)*b)};h=Math.cos(q)*a[2]/2;k=Math.sin(q)*a[2]/2;y.tooltipPos=[a[0]+.7*h,a[1]+.7*k];y.half=q<-Math.PI/2||q>Math.PI/2?1:0;y.angle=q;f=Math.min(f,u/5);y.labelPos=[a[0]+h+Math.cos(q)*u,a[1]+k+Math.sin(q)*u,a[0]+h+Math.cos(q)*f,a[1]+k+Math.sin(q)*f,a[0]+h,a[1]+k,0>u?\"center\":y.half?\"right\":\"left\",q]}},drawGraph:null,drawPoints:function(){var a=\nthis,d=a.chart.renderer,f,b,k,h,l=a.options.shadow;l&&!a.shadowGroup&&(a.shadowGroup=d.g(\"shadow\").add(a.group));H(a.points,function(c){if(null!==c.y){b=c.graphic;h=c.shapeArgs;f=c.getTranslate();var p=c.shadowGroup;l&&!p&&(p=c.shadowGroup=d.g(\"shadow\").add(a.shadowGroup));p&&p.attr(f);k=a.pointAttribs(c,c.selected&&\"select\");b?b.setRadialReference(a.center).attr(k).animate(G(h,f)):(c.graphic=b=d[c.shapeType](h).setRadialReference(a.center).attr(f).add(a.group),c.visible||b.attr({visibility:\"hidden\"}),\nb.attr(k).attr({\"stroke-linejoin\":\"round\"}).shadow(l,p));b.addClass(c.getClassName())}})},searchPoint:f,sortByAngle:function(a,d){a.sort(function(a,b){return void 0!==a.angle&&(b.angle-a.angle)*d})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:f},{init:function(){q.prototype.init.apply(this,arguments);var a=this,d;a.name=l(a.name,\"Slice\");d=function(c){a.slice(\"select\"===c.type)};B(a,\"select\",d);B(a,\"unselect\",d);return a},setVisible:function(a,\nd){var c=this,b=c.series,f=b.chart,h=b.options.ignoreHiddenPoint;d=l(d,h);a!==c.visible&&(c.visible=c.options.visible=a=void 0===a?!c.visible:a,b.options.data[r(c,b.data)]=c.options,H([\"graphic\",\"dataLabel\",\"connector\",\"shadowGroup\"],function(b){if(c[b])c[b][a?\"show\":\"hide\"](!0)}),c.legendItem&&f.legend.colorizeItem(c,a),a||\"hover\"!==c.state||c.setState(\"\"),h&&(b.isDirty=!0),d&&f.redraw())},slice:function(a,f,k){var b=this.series;d(k,b.chart);l(f,!0);this.sliced=this.options.sliced=A(a)?a:!this.sliced;\nb.options.data[r(this,b.data)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+a,c.r+a,{innerR:this.shapeArgs.r,start:c.start,end:c.end})}})})(L);(function(a){var B=a.addEvent,A=a.arrayMax,H=a.defined,G=a.each,\nr=a.extend,f=a.format,l=a.map,q=a.merge,k=a.noop,u=a.pick,d=a.relativeLength,c=a.Series,n=a.seriesTypes,z=a.stableSort;a.distribute=function(a,c){function b(a,b){return a.target-b.target}var d,f=!0,k=a,e=[],p;p=0;for(d=a.length;d--;)p+=a[d].size;if(p>c){z(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(p=d=0;p<=c;)p+=a[d].size,d++;e=a.splice(d-1,a.length)}z(a,b);for(a=l(a,function(a){return{size:a.size,targets:[a.target]}});f;){for(d=a.length;d--;)f=a[d],p=(Math.min.apply(0,f.targets)+Math.max.apply(0,\nf.targets))/2,f.pos=Math.min(Math.max(0,p-f.size/2),c-f.size);d=a.length;for(f=!1;d--;)0<d&&a[d-1].pos+a[d-1].size>a[d].pos&&(a[d-1].size+=a[d].size,a[d-1].targets=a[d-1].targets.concat(a[d].targets),a[d-1].pos+a[d-1].size>c&&(a[d-1].pos=c-a[d-1].size),a.splice(d,1),f=!0)}d=0;G(a,function(a){var b=0;G(a.targets,function(){k[d].pos=a.pos+b;b+=k[d].size;d++})});k.push.apply(k,e);z(k,b)};c.prototype.drawDataLabels=function(){var a=this,c=a.options,d=c.dataLabels,k=a.points,l,n,e=a.hasRendered||0,r,C,\nE=u(d.defer,!0),m=a.chart.renderer;if(d.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(d),C=a.plotGroup(\"dataLabelsGroup\",\"data-labels\",E&&!e?\"hidden\":\"visible\",d.zIndex||6),E&&(C.attr({opacity:+e}),e||B(a,\"afterAnimate\",function(){a.visible&&C.show(!0);C[c.animation?\"animate\":\"attr\"]({opacity:1},{duration:200})})),n=d,G(k,function(b){var e,h=b.dataLabel,k,g,p,t=b.connector,w=!h,x;l=b.dlOptions||b.options&&b.options.dataLabels;if(e=u(l&&l.enabled,n.enabled)&&null!==b.y)for(g in d=\nq(n,l),k=b.getLabelConfig(),r=d.format?f(d.format,k):d.formatter.call(k,d),x=d.style,p=d.rotation,x.color=u(d.color,x.color,a.color,\"#000000\"),\"contrast\"===x.color&&(b.contrastColor=m.getContrast(b.color||a.color),x.color=d.inside||0>d.distance||c.stacking?b.contrastColor:\"#000000\"),c.cursor&&(x.cursor=c.cursor),k={fill:d.backgroundColor,stroke:d.borderColor,\"stroke-width\":d.borderWidth,r:d.borderRadius||0,rotation:p,padding:d.padding,zIndex:1},k)void 0===k[g]&&delete k[g];!h||e&&H(r)?e&&H(r)&&(h?\nk.text=r:(h=b.dataLabel=m[p?\"text\":\"label\"](r,0,-9999,d.shape,null,null,d.useHTML,null,\"data-label\"),h.addClass(\"highcharts-data-label-color-\"+b.colorIndex+\" \"+(d.className||\"\")+(d.useHTML?\"highcharts-tracker\":\"\"))),h.attr(k),h.css(x).shadow(d.shadow),h.added||h.add(C),a.alignDataLabel(b,h,d,null,w)):(b.dataLabel=h.destroy(),t&&(b.connector=t.destroy()))})};c.prototype.alignDataLabel=function(a,c,d,f,k){var b=this.chart,e=b.inverted,h=u(a.plotX,-9999),l=u(a.plotY,-9999),p=c.getBBox(),m,n=d.rotation,\nq=d.align,t=this.visible&&(a.series.forceDL||b.isInsidePlot(h,Math.round(l),e)||f&&b.isInsidePlot(h,e?f.x+1:f.y+f.height-1,e)),D=\"justify\"===u(d.overflow,\"justify\");t&&(m=d.style.fontSize,m=b.renderer.fontMetrics(m,c).b,f=r({x:e?b.plotWidth-l:h,y:Math.round(e?b.plotHeight-h:l),width:0,height:0},f),r(d,{width:p.width,height:p.height}),n?(D=!1,e=b.renderer.rotCorr(m,n),e={x:f.x+d.x+f.width/2+e.x,y:f.y+d.y+{top:0,middle:.5,bottom:1}[d.verticalAlign]*f.height},c[k?\"attr\":\"animate\"](e).attr({align:q}),\nh=(n+720)%360,h=180<h&&360>h,\"left\"===q?e.y-=h?p.height:0:\"center\"===q?(e.x-=p.width/2,e.y-=p.height/2):\"right\"===q&&(e.x-=p.width,e.y-=h?0:p.height)):(c.align(d,null,f),e=c.alignAttr),D?a.isLabelJustified=this.justifyDataLabel(c,d,e,p,f,k):u(d.crop,!0)&&(t=b.isInsidePlot(e.x,e.y)&&b.isInsidePlot(e.x+p.width,e.y+p.height)),d.shape&&!n&&c.attr({anchorX:a.plotX,anchorY:a.plotY}));t||(c.attr({y:-9999}),c.placed=!1)};c.prototype.justifyDataLabel=function(a,c,d,f,k,l){var b=this.chart,h=c.align,p=c.verticalAlign,\nn,m,q=a.box?0:a.padding||0;n=d.x+q;0>n&&(\"right\"===h?c.align=\"left\":c.x=-n,m=!0);n=d.x+f.width-q;n>b.plotWidth&&(\"left\"===h?c.align=\"right\":c.x=b.plotWidth-n,m=!0);n=d.y+q;0>n&&(\"bottom\"===p?c.verticalAlign=\"top\":c.y=-n,m=!0);n=d.y+f.height-q;n>b.plotHeight&&(\"top\"===p?c.verticalAlign=\"bottom\":c.y=b.plotHeight-n,m=!0);m&&(a.placed=!l,a.align(c,null,k));return m};n.pie&&(n.pie.prototype.drawDataLabels=function(){var b=this,d=b.data,f,k=b.chart,n=b.options.dataLabels,q=u(n.connectorPadding,10),e=u(n.connectorWidth,\n1),r=k.plotWidth,C=k.plotHeight,E,m=n.distance,y=b.center,z=y[2]/2,B=y[1],H=0<m,g,F,L,N,P=[[],[]],O,v,M,R,S=[0,0,0,0];b.visible&&(n.enabled||b._hasPointLabels)&&(G(d,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:\"auto\"}).css({width:\"auto\",textOverflow:\"clip\"}),a.dataLabel.shortened=!1)}),c.prototype.drawDataLabels.apply(b),G(d,function(a){a.dataLabel&&a.visible&&(P[a.half].push(a),a.dataLabel._pos=null)}),G(P,function(c,e){var d,h,p=c.length,t,w,u;if(p)for(b.sortByAngle(c,\ne-.5),0<m&&(d=Math.max(0,B-z-m),h=Math.min(B+z+m,k.plotHeight),t=l(c,function(a){if(a.dataLabel)return u=a.dataLabel.getBBox().height||21,{target:a.labelPos[1]-d+u/2,size:u,rank:a.y}}),a.distribute(t,h+u-d)),R=0;R<p;R++)f=c[R],L=f.labelPos,g=f.dataLabel,M=!1===f.visible?\"hidden\":\"inherit\",w=L[1],t?void 0===t[R].pos?M=\"hidden\":(N=t[R].size,v=d+t[R].pos):v=w,O=n.justify?y[0]+(e?-1:1)*(z+m):b.getX(v<d+2||v>h-2?w:v,e),g._attr={visibility:M,align:L[6]},g._pos={x:O+n.x+({left:q,right:-q}[L[6]]||0),y:v+\nn.y-10},L.x=O,L.y=v,null===b.options.size&&(F=g.getBBox().width,w=null,O-F<q?(w=Math.round(F-O+q),S[3]=Math.max(w,S[3])):O+F>r-q&&(w=Math.round(O+F-r+q),S[1]=Math.max(w,S[1])),0>v-N/2?S[0]=Math.max(Math.round(-v+N/2),S[0]):v+N/2>C&&(S[2]=Math.max(Math.round(v+N/2-C),S[2])),g.sideOverflow=w)}),0===A(S)||this.verifyDataLabelOverflow(S))&&(this.placeDataLabels(),H&&e&&G(this.points,function(a){var c;E=a.connector;if((g=a.dataLabel)&&g._pos&&a.visible){M=g._attr.visibility;if(c=!E)a.connector=E=k.renderer.path().addClass(\"highcharts-data-label-connector highcharts-color-\"+\na.colorIndex).add(b.dataLabelsGroup),E.attr({\"stroke-width\":e,stroke:n.connectorColor||a.color||\"#666666\"});E[c?\"attr\":\"animate\"]({d:b.connectorPath(a.labelPos)});E.attr(\"visibility\",M)}else E&&(a.connector=E.destroy())}))},n.pie.prototype.connectorPath=function(a){var b=a.x,c=a.y;return u(this.options.dataLabels.softConnector,!0)?[\"M\",b+(\"left\"===a[6]?5:-5),c,\"C\",b,c,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],\"L\",a[4],a[5]]:[\"M\",b+(\"left\"===a[6]?5:-5),c,\"L\",a[2],a[3],\"L\",a[4],a[5]]},n.pie.prototype.placeDataLabels=\nfunction(){G(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=b.getBBox().width-b.sideOverflow,b.css({width:b._attr.width+\"px\",textOverflow:\"ellipsis\"}),b.shortened=!0),b.attr(b._attr),b[b.moved?\"animate\":\"attr\"](a),b.moved=!0):b&&b.attr({y:-9999}))},this)},n.pie.prototype.alignDataLabel=k,n.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,f=c.center,k=c.minSize||80,l,e;null!==f[0]?l=Math.max(b[2]-Math.max(a[1],a[3]),\nk):(l=Math.max(b[2]-a[1]-a[3],k),b[0]+=(a[3]-a[1])/2);null!==f[1]?l=Math.max(Math.min(l,b[2]-Math.max(a[0],a[2])),k):(l=Math.max(Math.min(l,b[2]-a[0]-a[2]),k),b[1]+=(a[0]-a[2])/2);l<b[2]?(b[2]=l,b[3]=Math.min(d(c.innerSize||0,l),l),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):e=!0;return e});n.column&&(n.column.prototype.alignDataLabel=function(a,d,f,k,l){var b=this.chart.inverted,e=a.series,h=a.dlBox||a.shapeArgs,n=u(a.below,a.plotY>u(this.translatedThreshold,e.yAxis.len)),p=u(f.inside,\n!!this.options.stacking);h&&(k=q(h),0>k.y&&(k.height+=k.y,k.y=0),h=k.y+k.height-e.yAxis.len,0<h&&(k.height-=h),b&&(k={x:e.yAxis.len-k.y-k.height,y:e.xAxis.len-k.x-k.width,width:k.height,height:k.width}),p||(b?(k.x+=n?0:k.width,k.width=0):(k.y+=n?k.height:0,k.height=0)));f.align=u(f.align,!b||p?\"center\":n?\"right\":\"left\");f.verticalAlign=u(f.verticalAlign,b||p?\"middle\":n?\"top\":\"bottom\");c.prototype.alignDataLabel.call(this,a,d,f,k,l);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(L);\n(function(a){var B=a.Chart,A=a.each,H=a.pick,G=a.addEvent;B.prototype.callbacks.push(function(a){function f(){var f=[];A(a.series||[],function(a){var k=a.options.dataLabels,l=a.dataLabelCollections||[\"dataLabel\"];(k.enabled||a._hasPointLabels)&&!k.allowOverlap&&a.visible&&A(l,function(d){A(a.points,function(a){a[d]&&(a[d].labelrank=H(a.labelrank,a.shapeArgs&&a.shapeArgs.height),f.push(a[d]))})})});a.hideOverlappingLabels(f)}f();G(a,\"redraw\",f)});B.prototype.hideOverlappingLabels=function(a){var f=\na.length,l,q,k,r,d,c,n,z,b,p=function(a,b,c,d,e,f,k,l){return!(e>a+c||e+k<a||f>b+d||f+l<b)};for(q=0;q<f;q++)if(l=a[q])l.oldOpacity=l.opacity,l.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-(a.labelrank||0)});for(q=0;q<f;q++)for(k=a[q],l=q+1;l<f;++l)if(r=a[l],k&&r&&k!==r&&k.placed&&r.placed&&0!==k.newOpacity&&0!==r.newOpacity&&(d=k.alignAttr,c=r.alignAttr,n=k.parentGroup,z=r.parentGroup,b=2*(k.box?0:k.padding),d=p(d.x+n.translateX,d.y+n.translateY,k.width-b,k.height-b,c.x+z.translateX,c.y+\nz.translateY,r.width-b,r.height-b)))(k.labelrank<r.labelrank?k:r).newOpacity=0;A(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=c,a[a.isOld?\"animate\":\"attr\"](a.alignAttr,null,b)),a.isOld=!0)})}})(L);(function(a){var B=a.addEvent,A=a.Chart,H=a.createElement,G=a.css,r=a.defaultOptions,f=a.defaultPlotOptions,l=a.each,q=a.extend,k=a.fireEvent,u=a.hasTouch,d=a.inArray,c=a.isObject,n=a.Legend,z=a.merge,b=a.pick,p=a.Point,h=a.Series,\nt=a.seriesTypes,D=a.svg;a=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);if(void 0!==c)c.onMouseOver(a)};l(a.points,function(a){a.graphic&&(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||(l(a.trackerGroups,function(e){if(a[e]){a[e].addClass(\"highcharts-tracker\").on(\"mouseover\",c).on(\"mouseout\",function(a){b.onTrackerMouseOut(a)});if(u)a[e].on(\"touchstart\",\nc);a.options.cursor&&a[e].css(G).css({cursor:a.options.cursor})}}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),f=d.length,h=a.chart,k=h.pointer,n=h.renderer,p=h.options.tooltip.snap,q=a.tracker,g,r=function(){if(h.hoverSeries!==a)a.onMouseOver()},t=\"rgba(192,192,192,\"+(D?.0001:.002)+\")\";if(f&&!c)for(g=f+1;g--;)\"M\"===d[g]&&d.splice(g+1,0,d[g+1]-p,d[g+2],\"L\"),(g&&\"M\"===d[g]||g===f)&&d.splice(g,0,\"L\",d[g-2]+p,d[g-1]);q?\nq.attr({d:d}):a.graph&&(a.tracker=n.path(d).attr({\"stroke-linejoin\":\"round\",visibility:a.visible?\"visible\":\"hidden\",stroke:t,fill:c?t:\"none\",\"stroke-width\":a.graph.strokeWidth()+(c?0:2*p),zIndex:2}).add(a.group),l([a.tracker,a.markerGroup],function(a){a.addClass(\"highcharts-tracker\").on(\"mouseover\",r).on(\"mouseout\",function(a){k.onTrackerMouseOut(a)});b.cursor&&a.css({cursor:b.cursor});if(u)a.on(\"touchstart\",r)}))}};t.column&&(t.column.prototype.drawTracker=a.drawTrackerPoint);t.pie&&(t.pie.prototype.drawTracker=\na.drawTrackerPoint);t.scatter&&(t.scatter.prototype.drawTracker=a.drawTrackerPoint);q(n.prototype,{setItemEvents:function(a,b,c){var d=this,e=d.chart.renderer.boxWrapper,f=\"highcharts-legend-\"+(a.series?\"point\":\"series\")+\"-active\";(c?b:a.legendGroup).on(\"mouseover\",function(){a.setState(\"hover\");e.addClass(f);b.css(d.options.itemHoverStyle)}).on(\"mouseout\",function(){b.css(a.visible?d.itemStyle:d.itemHiddenStyle);e.removeClass(f);a.setState()}).on(\"click\",function(b){var c=function(){a.setVisible&&\na.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent(\"legendItemClick\",b,c):k(a,\"legendItemClick\",b,c)})},createCheckboxForItem:function(a){a.checkbox=H(\"input\",{type:\"checkbox\",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);B(a.checkbox,\"click\",function(b){k(a.series||a,\"checkboxClick\",{checked:b.target.checked,item:a},function(){a.select()})})}});r.legend.itemStyle.cursor=\"pointer\";q(A.prototype,{showResetZoom:function(){var a=\nthis,b=r.lang,c=a.options.chart.resetZoomButton,d=c.theme,f=d.states,h=\"chart\"===c.relativeTo?null:\"plotBox\";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,f&&f.hover).attr({align:c.position.align,title:b.resetZoomTitle}).addClass(\"highcharts-reset-zoom\").add().align(c.position,!1,h)},zoomOut:function(){var a=this;k(a,\"selection\",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var d,f=this.pointer,h=!1,k;!a||a.resetSelection?l(this.axes,function(a){d=\na.zoom()}):l(a.xAxis.concat(a.yAxis),function(a){var b=a.axis;f[b.isXAxis?\"zoomX\":\"zoomY\"]&&(d=b.zoom(a.min,a.max),b.displayBtn&&(h=!0))});k=this.resetZoomButton;h&&!k?this.showResetZoom():!h&&c(k)&&(this.resetZoomButton=k.destroy());d&&this.redraw(b(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,e;d&&l(d,function(a){a.setState()});l(\"xy\"===b?[1,0]:[1],function(b){b=c[b?\"xAxis\":\"yAxis\"][0];var d=b.horiz,f=a[d?\"chartX\":\"chartY\"],d=d?\n\"mouseDownX\":\"mouseDownY\",h=c[d],k=(b.pointRange||0)/2,g=b.getExtremes(),l=b.toValue(h-f,!0)+k,k=b.toValue(h+b.len-f,!0)-k,m=k<l,h=m?k:l,l=m?l:k,m=b.toValue(b.toPixels(g.min)-b.minPixelPadding),k=b.toValue(b.toPixels(g.max)+b.minPixelPadding),m=Math.min(g.dataMin,m)-h,g=l-Math.max(g.dataMax,k);b.series.length&&0>m&&0>g&&(b.setExtremes(h,l,!1,!1,{trigger:\"pan\"}),e=!0);c[d]=f});e&&c.redraw(!1);G(c.container,{cursor:\"move\"})}});q(p.prototype,{select:function(a,c){var e=this,f=e.series,h=f.chart;a=b(a,\n!e.selected);e.firePointEvent(a?\"select\":\"unselect\",{accumulate:c},function(){e.selected=e.options.selected=a;f.options.data[d(e,f.data)]=e.options;e.setState(a&&\"select\");c||l(h.getSelectedPoints(),function(a){a.selected&&a!==e&&(a.selected=a.options.selected=!1,f.options.data[d(a,f.data)]=a.options,a.setState(\"\"),a.firePointEvent(\"unselect\"))})})},onMouseOver:function(a){var b=this.series.chart.pointer;this.firePointEvent(\"mouseOver\");b.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;\nthis.firePointEvent(\"mouseOut\");l(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a=z(this.series.options.point,this.options).events,b;this.events=a;for(b in a)B(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a,c){var d=Math.floor(this.plotX),e=this.plotY,h=this.series,k=h.options.states[a]||{},l=f[h.type].marker&&h.options.marker,n=l&&!1===l.enabled,p=l&&l.states&&l.states[a]||{},r=!1===p.enabled,g=\nh.stateMarkerGraphic,t=this.marker||{},u=h.chart,w=h.halo,z,A=l&&h.markerAttribs;a=a||\"\";if(!(a===this.state&&!c||this.selected&&\"select\"!==a||!1===k.enabled||a&&(r||n&&!1===p.enabled)||a&&t.states&&t.states[a]&&!1===t.states[a].enabled)){A&&(z=h.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass(\"highcharts-point-\"+this.state),a&&this.graphic.addClass(\"highcharts-point-\"+a),this.graphic.attr(h.pointAttribs(this,a)),z&&this.graphic.animate(z,b(u.options.chart.animation,p.animation,\nl.animation)),g&&g.hide();else{if(a&&p){l=t.symbol||h.symbol;g&&g.currentSymbol!==l&&(g=g.destroy());if(g)g[c?\"animate\":\"attr\"]({x:z.x,y:z.y});else l&&(h.stateMarkerGraphic=g=u.renderer.symbol(l,z.x,z.y,z.width,z.height).add(h.markerGroup),g.currentSymbol=l);g&&g.attr(h.pointAttribs(this,a))}g&&(g[a&&u.isInsidePlot(d,e,u.inverted)?\"show\":\"hide\"](),g.element.point=this)}(d=k.halo)&&d.size?(w||(h.halo=w=u.renderer.path().add(A?h.markerGroup:h.group)),w[c?\"animate\":\"attr\"]({d:this.haloPath(d.size)}),\nw.attr({\"class\":\"highcharts-halo highcharts-color-\"+b(this.colorIndex,h.colorIndex)}),w.point=this,w.attr(q({fill:this.color||h.color,\"fill-opacity\":d.opacity,zIndex:-1},d.attributes))):w&&w.point&&w.point.haloPath&&w.animate({d:w.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});q(h.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&\nk(this,\"mouseOver\");this.setState(\"hover\");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&k(this,\"mouseOut\");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var c=this,d=c.options,f=c.graph,h=d.states,k=d.lineWidth,d=0;a=a||\"\";if(c.state!==a&&(l([c.group,c.markerGroup,c.dataLabelsGroup],function(b){b&&(c.state&&b.removeClass(\"highcharts-series-\"+\nc.state),a&&b.addClass(\"highcharts-series-\"+a))}),c.state=a,!h[a]||!1!==h[a].enabled)&&(a&&(k=h[a].lineWidth||k+(h[a].lineWidthPlus||0)),f&&!f.dashstyle))for(k={\"stroke-width\":k},f.animate(k,b(c.chart.options.chart.animation,h[a]&&h[a].animation));c[\"zone-graph-\"+d];)c[\"zone-graph-\"+d].attr(k),d+=1},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f,h=d.options.chart.ignoreHiddenSeries,n=c.visible;f=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!n:a)?\"show\":\"hide\";l([\"group\",\n\"dataLabelsGroup\",\"markerGroup\",\"tracker\",\"tt\"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&l(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});l(c.linkedSeries,function(b){b.setVisible(a,!1)});h&&(d.isDirtyBox=!0);!1!==b&&d.redraw();k(c,f)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0===\na?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);k(this,a?\"select\":\"unselect\")},drawTracker:a.drawTrackerGraph})})(L);(function(a){var B=a.Chart,A=a.each,H=a.inArray,G=a.isArray,r=a.isObject,f=a.pick,l=a.splat;B.prototype.setResponsive=function(f){var k=this.options.responsive,l=[],d=this.currentResponsive;k&&k.rules&&A(k.rules,function(c){void 0===c._id&&(c._id=a.uniqueKey());this.matchResponsiveRule(c,l,f)},this);var c=a.merge.apply(0,a.map(l,function(c){return a.find(k.rules,function(a){return a._id===\nc}).chartOptions})),l=l.toString()||void 0;l!==(d&&d.ruleIds)&&(d&&this.update(d.undoOptions,f),l?(this.currentResponsive={ruleIds:l,mergedOptions:c,undoOptions:this.currentOptions(c)},this.update(c,f)):this.currentResponsive=void 0)};B.prototype.matchResponsiveRule=function(a,k){var l=a.condition;(l.callback||function(){return this.chartWidth<=f(l.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=f(l.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=f(l.minWidth,0)&&this.chartHeight>=f(l.minHeight,0)}).call(this)&&\nk.push(a._id)};B.prototype.currentOptions=function(a){function f(a,c,k,q){var b,d;for(b in a)if(!q&&-1<H(b,[\"series\",\"xAxis\",\"yAxis\"]))for(a[b]=l(a[b]),k[b]=[],d=0;d<a[b].length;d++)c[b][d]&&(k[b][d]={},f(a[b][d],c[b][d],k[b][d],q+1));else r(a[b])?(k[b]=G(a[b])?[]:{},f(a[b],c[b]||{},k[b],q+1)):k[b]=c[b]||null}var q={};f(a,this.options,q,0);return q}})(L);return L});\n"
  },
  {
    "path": "index.d.ts",
    "content": "declare type artTemplateDefaults = {\n  /**\n   * template name\n   */\n  filename?: string;\n  /**\n   * an array of rules of template syntax\n   */\n  rules: any[];\n  /**\n   * whether to automatically encode output statements of template. Setting false will close that functionality\n   * escape can prevent XSS attacks\n   */\n  escape: boolean;\n  /**\n   * enable debug mode. If true: {cache:false, minimize:false, compileDebug:true}\n   */\n  debug: boolean;\n  /**\n   * if bail is set true, compilation errors and runtime errors will throw exception\n   */\n  bail: boolean;\n  /**\n   * whether to enable caching\n   */\n  cache: boolean;\n  /**\n   * whether to enable minimization. It will execute htmlMinifier and minimize HTML, CSS, JS\n   * if template contains unclosing tags, please don't open minimize. Otherwise unclosing tags will be restored or filtered\n   */\n  minimize: boolean;\n\n  /**\n   * whether to compile in debug mode\n   */\n  compileDebug: boolean;\n  /**\n   * resolve template path\n   */\n  resolveFilename: any;\n  /**\n   * sub template compilation adapter\n   */\n  include: any,\n\n  /**\n   *  HTML minifier. Work only in NodeJS environment\n   */\n  htmlMinifier: any;\n\n  /**\n   * HTML minifier configuration. Refer to: https://github.com/kangax/html-minifier\n   */\n  htmlMinifierOptions: {\n    collapseWhitespace: boolean,\n    minifyCSS: boolean,\n    minifyJS: boolean,\n    // automatically merged at runtime: rules.map(rule => rule.test)\n    ignoreCustomFragments: any[]\n  };\n\n  /**\n   * error events. Work only if bail is false\n   */\n  onerror: any,\n\n  /**\n   * template file loader\n   */\n  loader: any,\n\n  /**\n   * cache center adapter (depend on filename field)\n   */\n  caches: any,\n\n  /**\n   * root directory of template. If filename field is not a local path, template will be found in root directory\n   * @default '/'\n   */\n  root: string;\n\n  /**\n   * @default '.art'\n   * default extension. If no extensions, extname will be automatically added\n   */\n  extname: string,\n\n  /**\n   * ignored variables. An array of template variables ignored by template compiler\n   */\n  ignore: any[],\n\n  // imported template variables\n  imports: { [key: string]: Function }\n}\n/**\n *\n * @param filenameOrTemplateId  [ for bowser ] id of template      [ for Node ] fileName of template\n * @param content [ if is Object ] return compile result , [ if is string ] return compile Funtion\n */\ndeclare function artTemplate(filenameOrTemplateId: string, content?: string | Object): any;\ndeclare namespace artTemplate {\n  export const defaults: artTemplateDefaults;\n  export const extension: { [key: string]: Function };\n  function render(source: string, data: any, options?: any): string;\n  function compile(source: string, options?: any): (data: any) => string;\n}\nexport = artTemplate;\n"
  },
  {
    "path": "index.js",
    "content": "const template = require('./lib/index');\nconst extension = require('./lib/extension');\n\ntemplate.extension = extension;\nrequire.extensions[template.defaults.extname] = extension;\n\nmodule.exports = template;\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"art-template\",\n  \"typings\": \"index.d.ts\",\n  \"description\": \"JavaScript Template Engine\",\n  \"homepage\": \"http://aui.github.com/art-template/\",\n  \"version\": \"4.13.2\",\n  \"keywords\": [\n    \"template\"\n  ],\n  \"author\": \"tangbin <sugarpie.tang@gmail.com>\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/aui/art-template.git\"\n  },\n  \"scripts\": {\n    \"build\": \"npm run build-lib && npm run build-web\",\n    \"build-lib\": \"rm -rf lib && babel src --out-dir lib\",\n    \"build-web\": \"export NODE_ENV=production && webpack\",\n    \"dev\": \"babel src --watch --out-dir lib\",\n    \"test\": \"export NODE_ENV=production && istanbul cover node_modules/mocha/bin/_mocha -- --ui exports --colors 'test/**/*.js'\",\n    \"coverage\": \"cat ./coverage/lcov.info | coveralls\"\n  },\n  \"main\": \"index.js\",\n  \"files\": [\n    \"lib/\",\n    \"index.d.ts\"\n  ],\n  \"engines\": {\n    \"node\": \">= 1.0.0\"\n  },\n  \"dependencies\": {\n    \"acorn\": \"^5.0.3\",\n    \"escodegen\": \"^1.8.1\",\n    \"estraverse\": \"^4.2.0\",\n    \"html-minifier\": \"^3.4.3\",\n    \"is-keyword-js\": \"^1.0.3\",\n    \"js-tokens\": \"^3.0.1\",\n    \"merge-source-map\": \"^1.0.3\",\n    \"source-map\": \"^0.5.6\"\n  },\n  \"devDependencies\": {\n    \"babel-cli\": \"^6.26.0\",\n    \"babel-preset-env\": \"^1.7.0\",\n    \"coveralls\": \"^2.13.0\",\n    \"eslint\": \"^3.19.0\",\n    \"eslint-loader\": \"^1.7.1\",\n    \"eslint-plugin-prettier\": \"^2.6.2\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\",\n    \"node-noop\": \"^1.0.0\",\n    \"prettier\": \"^1.14.2\",\n    \"webpack\": \"^3.0.0\"\n  },\n  \"license\": \"MIT\"\n}\n"
  },
  {
    "path": "src/compile/adapter/caches.js",
    "content": "const caches = {\n    __data: Object.create(null),\n\n    set: function(key, val) {\n        this.__data[key] = val;\n    },\n\n    get: function(key) {\n        return this.__data[key];\n    },\n\n    reset: function() {\n        this.__data = {};\n    }\n};\n\nmodule.exports = caches;\n"
  },
  {
    "path": "src/compile/adapter/extend.js",
    "content": "const toString = Object.prototype.toString;\nconst toType = value => {\n    // Null: 兼容 IE8\n    return value === null ? 'Null' : toString.call(value).slice(8, -1);\n};\n\n/**\n * 快速继承默认配置\n * @param   {Object}    options\n * @param   {?Object}   defaults\n * @return  {Object}\n */\nconst extend = function(target, defaults) {\n    let object;\n    const type = toType(target);\n\n    if (type === 'Object') {\n        object = Object.create(defaults || {});\n    } else if (type === 'Array') {\n        object = [].concat(defaults || []);\n    }\n\n    if (object) {\n        for (let index in target) {\n            if (Object.hasOwnProperty.call(target, index)) {\n                object[index] = extend(target[index], object[index]);\n            }\n        }\n        return object;\n    } else {\n        return target;\n    }\n};\n\nmodule.exports = extend;\n"
  },
  {
    "path": "src/compile/adapter/html-minifier.js",
    "content": "const detectNode = typeof window === 'undefined';\n\n/**\n * HTML 压缩器\n * @param  {string}     source\n * @param  {Object}     options\n * @return {string}\n */\nconst htmlMinifier = (source, options) => {\n    if (detectNode) {\n        const htmlMinifier = require('html-minifier').minify;\n        const htmlMinifierOptions = options.htmlMinifierOptions;\n        const ignoreCustomFragments = options.rules.map(rule => rule.test);\n        htmlMinifierOptions.ignoreCustomFragments.push(...ignoreCustomFragments);\n        source = htmlMinifier(source, htmlMinifierOptions);\n    }\n\n    return source;\n};\n\nmodule.exports = htmlMinifier;\n"
  },
  {
    "path": "src/compile/adapter/include.js",
    "content": "/**\n * 载入子模板\n * @param   {string}    filename\n * @param   {Object}    data\n * @param   {Object}    blocks\n * @param   {Object}    options\n * @return  {string}\n */\nconst include = (filename, data, blocks, options) => {\n    const compile = require('../index');\n    options = options.$extend({\n        filename: options.resolveFilename(filename, options),\n        bail: true,\n        source: null\n    });\n    return compile(options)(data, blocks);\n};\n\nmodule.exports = include;\n"
  },
  {
    "path": "src/compile/adapter/loader.js",
    "content": "const detectNode = typeof window === 'undefined';\n\n/**\n * 读取模板内容（同步方法）\n * @param   {string}    filename   模板名\n * @param   {?Object}   options\n * @return  {string}\n */\nconst loader = (filename /*, options*/) => {\n    /* istanbul ignore else  */\n    if (detectNode) {\n        const fs = require('fs');\n        return fs.readFileSync(filename, 'utf8');\n    } else {\n        const elem = document.getElementById(filename);\n        return elem.value || elem.innerHTML;\n    }\n};\n\nmodule.exports = loader;\n"
  },
  {
    "path": "src/compile/adapter/onerror.js",
    "content": "/**\n * 调试器\n * @param   {Object}    error\n * @param   {?Object}   options\n * @return  {string}\n */\nconst onerror = (error /*, options*/) => {\n    console.error(error.name, error.message);\n};\n\nmodule.exports = onerror;\n"
  },
  {
    "path": "src/compile/adapter/resolve-filename.js",
    "content": "const detectNode = typeof window === 'undefined';\nconst LOCAL_MODULE = /^\\.+\\//;\n\n/**\n * 获取模板的绝对路径\n * @param   {string} filename\n * @param   {Object} options\n * @return  {string}\n */\nconst resolveFilename = (filename, options) => {\n    /* istanbul ignore else  */\n    if (detectNode) {\n        const path = require('path');\n        const root = options.root;\n        const extname = options.extname;\n\n        if (LOCAL_MODULE.test(filename)) {\n            const from = options.filename;\n            const self = !from || filename === from;\n            const base = self ? root : path.dirname(from);\n            filename = path.resolve(base, filename);\n        } else {\n            filename = path.resolve(root, filename);\n        }\n\n        if (!path.extname(filename)) {\n            filename = filename + extname;\n        }\n    }\n\n    return filename;\n};\n\nmodule.exports = resolveFilename;\n"
  },
  {
    "path": "src/compile/adapter/rule.art.js",
    "content": "/**\n * 简洁模板语法规则\n */\nconst artRule = {\n    test: /{{([@#]?)[ \\t]*(\\/?)([\\w\\W]*?)[ \\t]*}}/,\n    use: function(match, raw, close, code) {\n        const compiler = this;\n        const options = compiler.options;\n        const esTokens = compiler.getEsTokens(code);\n        const values = esTokens.map(token => token.value);\n        const result = {};\n\n        let group;\n        let output = raw ? 'raw' : false;\n        let key = close + values.shift();\n\n        // 旧版语法升级提示\n        const warn = (oldSyntax, newSyntax) => {\n            console.warn(\n                `${options.filename || 'anonymous'}:${match.line + 1}:${match.start + 1}\\n` +\n                    `Template upgrade: {{${oldSyntax}}} -> {{${newSyntax}}}`\n            );\n        };\n\n        // v3 compat: #value\n        if (raw === '#') {\n            warn('#value', '@value');\n        }\n\n        switch (key) {\n            case 'set':\n                code = `var ${values.join('').trim()}`;\n                break;\n\n            case 'if':\n                code = `if(${values.join('').trim()}){`;\n\n                break;\n\n            case 'else':\n                const indexIf = values.indexOf('if');\n\n                if (~indexIf) {\n                    values.splice(0, indexIf + 1);\n                    code = `}else if(${values.join('').trim()}){`;\n                } else {\n                    code = `}else{`;\n                }\n\n                break;\n\n            case '/if':\n                code = '}';\n                break;\n\n            case 'each':\n                group = artRule._split(esTokens);\n                group.shift();\n\n                if (group[1] === 'as') {\n                    // ... v3 compat ...\n                    warn('each object as value index', 'each object value index');\n                    group.splice(1, 1);\n                }\n\n                const object = group[0] || '$data';\n                const value = group[1] || '$value';\n                const index = group[2] || '$index';\n\n                code = `$each(${object},function(${value},${index}){`;\n\n                break;\n\n            case '/each':\n                code = '})';\n                break;\n\n            case 'block':\n                group = artRule._split(esTokens);\n                group.shift();\n                code = `block(${group.join(',').trim()},function(){`;\n                break;\n\n            case '/block':\n                code = '})';\n                break;\n\n            case 'echo':\n                key = 'print';\n                warn('echo value', 'value');\n            case 'print':\n            case 'include':\n            case 'extend':\n                if (\n                    values\n                        .join('')\n                        .trim()\n                        .indexOf('(') !== 0\n                ) {\n                    // 执行函数省略 `()` 与 `,`\n                    group = artRule._split(esTokens);\n                    group.shift();\n                    code = `${key}(${group.join(',')})`;\n                    break;\n                }\n\n            default:\n                if (~values.indexOf('|')) {\n                    const v3split = ':'; // ... v3 compat ...\n\n                    // 将过滤器解析成二维数组\n                    const group = esTokens\n                        .reduce((group, token) => {\n                            const { value, type } = token;\n                            if (value === '|') {\n                                group.push([]);\n                            } else if (type !== `whitespace` && type !== `comment`) {\n                                if (!group.length) {\n                                    group.push([]);\n                                }\n                                if (value === v3split && group[group.length - 1].length === 1) {\n                                    warn('value | filter: argv', 'value | filter argv');\n                                } else {\n                                    group[group.length - 1].push(token);\n                                }\n                            }\n                            return group;\n                        }, [])\n                        .map(g => artRule._split(g));\n\n                    // 将过滤器管道化\n                    code = group.reduce(\n                        (accumulator, filter) => {\n                            const name = filter.shift();\n                            filter.unshift(accumulator);\n\n                            return `$imports.${name}(${filter.join(',')})`;\n                        },\n                        group\n                            .shift()\n                            .join(` `)\n                            .trim()\n                    );\n                }\n\n                output = output || 'escape';\n\n                break;\n        }\n\n        result.code = code;\n        result.output = output;\n\n        return result;\n    },\n\n    // 将多个 javascript 表达式拆分成组\n    // 支持基本运算、三元表达式、取值、运行函数，不支持 `typeof value` 操作\n    // 只支持 string、number、boolean、null、undefined 这几种类型声明，不支持 function、object、array\n    _split: esTokens => {\n        esTokens = esTokens.filter(({ type }) => {\n            return type !== `whitespace` && type !== `comment`;\n        });\n\n        let current = 0;\n        let lastToken = esTokens.shift();\n        const punctuator = `punctuator`;\n        const close = /\\]|\\)/;\n        const group = [[lastToken]];\n\n        while (current < esTokens.length) {\n            const esToken = esTokens[current];\n\n            if (\n                esToken.type === punctuator ||\n                (lastToken.type === punctuator && !close.test(lastToken.value))\n            ) {\n                group[group.length - 1].push(esToken);\n            } else {\n                group.push([esToken]);\n            }\n\n            lastToken = esToken;\n\n            current++;\n        }\n\n        return group.map(g => g.map(g => g.value).join(``));\n    }\n};\n\nmodule.exports = artRule;\n"
  },
  {
    "path": "src/compile/adapter/rule.native.js",
    "content": "/**\n * 原生模板语法规则\n */\nconst nativeRule = {\n    test: /<%(#?)((?:==|=#|[=-])?)[ \\t]*([\\w\\W]*?)[ \\t]*(-?)%>/,\n    use: (match, comment, output, code /*, trimMode*/) => {\n        output = {\n            '-': 'raw',\n            '=': 'escape',\n            '': false,\n            // v3 compat: raw output\n            '==': 'raw',\n            '=#': 'raw'\n        }[output];\n\n        // ejs compat: comment tag\n        if (comment) {\n            code = `/*${code}*/`;\n            output = false;\n        }\n\n        // ejs compat: trims following newline\n        // if (trimMode) {}\n\n        return {\n            code,\n            output\n        };\n    }\n};\n\nmodule.exports = nativeRule;\n"
  },
  {
    "path": "src/compile/compiler.js",
    "content": "const esTokenizer = require('./es-tokenizer');\nconst tplTokenizer = require('./tpl-tokenizer');\n\n/** 传递给模板的数据引用 */\nconst DATA = `$data`;\n\n/** 外部导入的所有全局变量引用 */\nconst IMPORTS = `$imports`;\n\n/**  $imports.$escape */\nconst ESCAPE = `$escape`;\n\n/**  $imports.$each */\nconst EACH = `$each`;\n\n/** 文本输出函数 */\nconst PRINT = `print`;\n\n/** 包含子模板函数 */\nconst INCLUDE = `include`;\n\n/** 继承布局模板函数 */\nconst EXTEND = `extend`;\n\n/** “模板块”读写函数 */\nconst BLOCK = `block`;\n\n/** 字符串拼接变量 */\nconst OUT = `$$out`;\n\n/** 运行时逐行调试记录变量 [line, start, source] */\nconst LINE = `$$line`;\n\n/** 所有“模板块”变量 */\nconst BLOCKS = `$$blocks`;\n\n/** 截取模版输出“流”的函数 */\nconst SLICE = `$$slice`;\n\n/** 继承的布局模板的文件地址变量 */\nconst FROM = `$$from`;\n\n/** 编译设置变量 */\nconst OPTIONS = `$$options`;\n\nconst has = (object, key) => Object.hasOwnProperty.call(object, key);\nconst stringify = JSON.stringify;\n\nclass Compiler {\n    /**\n     * 模板编译器\n     * @param   {Object}    options\n     */\n    constructor(options) {\n        let source = options.source;\n        const minimize = options.minimize;\n        const htmlMinifier = options.htmlMinifier;\n\n        // 编译选项\n        this.options = options;\n\n        // 所有语句堆栈\n        this.stacks = [];\n\n        // 运行时注入的上下文\n        this.context = [];\n\n        // 模板语句编译后的代码\n        this.scripts = [];\n\n        // context map\n        this.CONTEXT_MAP = {};\n\n        // 忽略的变量名单\n        this.ignore = [DATA, IMPORTS, OPTIONS, ...options.ignore];\n\n        // 按需编译到模板渲染函数的内置变量\n        this.internal = {\n            [OUT]: `''`,\n            [LINE]: `[0,0]`,\n            [BLOCKS]: `arguments[1]||{}`,\n            [FROM]: `null`,\n            [PRINT]: `function(){var s=''.concat.apply('',arguments);${OUT}+=s;return s}`,\n            [INCLUDE]: `function(src,data){var s=${OPTIONS}.include(src,data||${DATA},arguments[2]||${BLOCKS},${OPTIONS});${OUT}+=s;return s}`,\n            [EXTEND]: `function(from){${FROM}=from}`,\n            [SLICE]: `function(c,p,s){p=${OUT};${OUT}='';c();s=${OUT};${OUT}=p+s;return s}`,\n            [BLOCK]: `function(){var a=arguments,s;if(typeof a[0]==='function'){return ${SLICE}(a[0])}else if(${FROM}){if(!${BLOCKS}[a[0]]){${BLOCKS}[a[0]]=${SLICE}(a[1])}else{${OUT}+=${BLOCKS}[a[0]]}}else{s=${BLOCKS}[a[0]];if(typeof s==='string'){${OUT}+=s}else{s=${SLICE}(a[1])}return s}}`\n        };\n\n        // 内置函数依赖关系声明\n        this.dependencies = {\n            [PRINT]: [OUT],\n            [INCLUDE]: [OUT, OPTIONS, DATA, BLOCKS],\n            [EXTEND]: [FROM, /*[*/ INCLUDE /*]*/],\n            [BLOCK]: [SLICE, FROM, OUT, BLOCKS]\n        };\n\n        this.importContext(OUT);\n\n        if (options.compileDebug) {\n            this.importContext(LINE);\n        }\n\n        if (minimize) {\n            try {\n                source = htmlMinifier(source, options);\n            } catch (error) {}\n        }\n\n        this.source = source;\n        this.getTplTokens(source, options.rules, this).forEach(tokens => {\n            if (tokens.type === tplTokenizer.TYPE_STRING) {\n                this.parseString(tokens);\n            } else {\n                this.parseExpression(tokens);\n            }\n        });\n    }\n\n    /**\n     * 将模板代码转换成 tplToken 数组\n     * @param   {string} source\n     * @return  {Object[]}\n     */\n    getTplTokens(...args) {\n        return tplTokenizer(...args);\n    }\n\n    /**\n     * 将模板表达式转换成 esToken 数组\n     * @param   {string} source\n     * @return  {Object[]}\n     */\n    getEsTokens(source) {\n        return esTokenizer(source);\n    }\n\n    /**\n     * 获取变量列表\n     * @param {Object[]} esTokens\n     * @return {string[]}\n     */\n    getVariables(esTokens) {\n        let ignore = false;\n        return esTokens\n            .filter(esToken => {\n                return esToken.type !== `whitespace` && esToken.type !== `comment`;\n            })\n            .filter(esToken => {\n                if (esToken.type === `name` && !ignore) {\n                    return true;\n                }\n\n                ignore = esToken.type === `punctuator` && esToken.value === `.`;\n\n                return false;\n            })\n            .map(tooken => tooken.value);\n    }\n\n    /**\n     * 导入模板上下文\n     * @param {string} name\n     */\n    importContext(name) {\n        let value = ``;\n        const internal = this.internal;\n        const dependencies = this.dependencies;\n        const ignore = this.ignore;\n        const context = this.context;\n        const options = this.options;\n        const imports = options.imports;\n        const contextMap = this.CONTEXT_MAP;\n\n        if (!has(contextMap, name) && ignore.indexOf(name) === -1) {\n            if (has(internal, name)) {\n                value = internal[name];\n\n                if (has(dependencies, name)) {\n                    dependencies[name].forEach(name => this.importContext(name));\n                }\n\n                // imports 继承了 Global，但是继承的属性不分配到顶级变量中，避免占用了模板内部的变量名称\n            } else if (name === ESCAPE || name === EACH || has(imports, name)) {\n                value = `${IMPORTS}.${name}`;\n            } else {\n                value = `${DATA}.${name}`;\n            }\n\n            contextMap[name] = value;\n            context.push({\n                name,\n                value\n            });\n        }\n    }\n\n    /**\n     * 解析字符串（HTML）直接输出语句\n     * @param {Object} tplToken\n     */\n    parseString(tplToken) {\n        let source = tplToken.value;\n\n        if (!source) {\n            return;\n        }\n\n        const code = `${OUT}+=${stringify(source)}`;\n        this.scripts.push({\n            source,\n            tplToken,\n            code\n        });\n    }\n\n    /**\n     * 解析逻辑表达式语句\n     * @param {Object} tplToken\n     */\n    parseExpression(tplToken) {\n        const source = tplToken.value;\n        const script = tplToken.script;\n        const output = script.output;\n        const escape = this.options.escape;\n        let code = script.code;\n\n        if (output) {\n            if (escape === false || output === tplTokenizer.TYPE_RAW) {\n                code = `${OUT}+=${script.code}`;\n            } else {\n                code = `${OUT}+=${ESCAPE}(${script.code})`;\n            }\n        }\n\n        const esToken = this.getEsTokens(code);\n        this.getVariables(esToken).forEach(name => this.importContext(name));\n\n        this.scripts.push({\n            source,\n            tplToken,\n            code\n        });\n    }\n\n    /**\n     * 检查解析后的模板语句是否存在语法错误\n     * @param  {string} script\n     * @return {boolean}\n     */\n    checkExpression(script) {\n        // 没有闭合的块级模板语句规则\n        // 基于正则规则来补全语法不能保证 100% 准确，\n        // 但是在绝大多数情况下足以满足辅助开发调试的需要\n        const rules = [\n            // <% } %>\n            // <% }else{ %>\n            // <% }else if(a){ %>\n            [/^\\s*}[\\w\\W]*?{?[\\s;]*$/, ''],\n\n            // <% fn(c,function(a,b){ %>\n            // <% fn(c, a=>{ %>\n            // <% fn(c,(a,b)=>{ %>\n            [/(^[\\w\\W]*?\\([\\w\\W]*?(?:=>|\\([\\w\\W]*?\\))\\s*{[\\s;]*$)/, '$1})'],\n\n            // <% if(a){ %>\n            // <% for(var i in d){ %>\n            [/(^[\\w\\W]*?\\([\\w\\W]*?\\)\\s*{[\\s;]*$)/, '$1}']\n        ];\n\n        let index = 0;\n        while (index < rules.length) {\n            if (rules[index][0].test(script)) {\n                script = script.replace(...rules[index]);\n                break;\n            }\n            index++;\n        }\n\n        try {\n            new Function(script);\n            return true;\n        } catch (e) {\n            return false;\n        }\n    }\n\n    /**\n     * 编译\n     * @return  {function}\n     */\n    build() {\n        const options = this.options;\n        const context = this.context;\n        const scripts = this.scripts;\n        const stacks = this.stacks;\n        const source = this.source;\n        const filename = options.filename;\n        const imports = options.imports;\n        const mappings = [];\n        const extendMode = has(this.CONTEXT_MAP, EXTEND);\n\n        let offsetLine = 0;\n\n        // Create SourceMap: mapping\n        const mapping = (code, { line, start }) => {\n            const node = {\n                generated: {\n                    line: stacks.length + offsetLine + 1,\n                    column: 1\n                },\n                original: {\n                    line: line + 1,\n                    column: start + 1\n                }\n            };\n\n            offsetLine += code.split(/\\n/).length - 1;\n            return node;\n        };\n\n        // Trim code\n        const trim = code => {\n            return code.replace(/^[\\t ]+|[\\t ]$/g, '');\n        };\n\n        stacks.push(`function(${DATA}){`);\n        stacks.push(`'use strict'`);\n        stacks.push(`${DATA}=${DATA}||{}`);\n        stacks.push(`var ` + context.map(({ name, value }) => `${name}=${value}`).join(`,`));\n\n        if (options.compileDebug) {\n            stacks.push(`try{`);\n\n            scripts.forEach(script => {\n                if (script.tplToken.type === tplTokenizer.TYPE_EXPRESSION) {\n                    stacks.push(\n                        `${LINE}=[${[script.tplToken.line, script.tplToken.start].join(',')}]`\n                    );\n                }\n\n                mappings.push(mapping(script.code, script.tplToken));\n                stacks.push(trim(script.code));\n            });\n\n            stacks.push(`}catch(error){`);\n\n            stacks.push(\n                'throw {' +\n                    [\n                        `name:'RuntimeError'`,\n                        `path:${stringify(filename)}`,\n                        `message:error.message`,\n                        `line:${LINE}[0]+1`,\n                        `column:${LINE}[1]+1`,\n                        `source:${stringify(source)}`,\n                        `stack:error.stack`\n                    ].join(`,`) +\n                    '}'\n            );\n\n            stacks.push(`}`);\n        } else {\n            scripts.forEach(script => {\n                mappings.push(mapping(script.code, script.tplToken));\n                stacks.push(trim(script.code));\n            });\n        }\n\n        if (extendMode) {\n            stacks.push(`${OUT}=''`);\n            stacks.push(`${INCLUDE}(${FROM},${DATA},${BLOCKS})`);\n        }\n\n        stacks.push(`return ${OUT}`);\n        stacks.push(`}`);\n\n        const renderCode = stacks.join(`\\n`);\n\n        try {\n            const result = new Function(IMPORTS, OPTIONS, `return ${renderCode}`)(imports, options);\n            result.mappings = mappings;\n            result.sourcesContent = [source];\n            return result;\n        } catch (error) {\n            let index = 0;\n            let line = 0;\n            let start = 0;\n            let generated;\n\n            while (index < scripts.length) {\n                const current = scripts[index];\n                if (!this.checkExpression(current.code)) {\n                    line = current.tplToken.line;\n                    start = current.tplToken.start;\n                    generated = current.code;\n                    break;\n                }\n                index++;\n            }\n\n            throw {\n                name: `CompileError`,\n                path: filename,\n                message: error.message,\n                line: line + 1,\n                column: start + 1,\n                source,\n                generated,\n                stack: error.stack\n            };\n        }\n    }\n}\n\n/**\n * 模板内置常量\n */\nCompiler.CONSTS = {\n    DATA,\n    IMPORTS,\n    PRINT,\n    INCLUDE,\n    EXTEND,\n    BLOCK,\n    OPTIONS,\n    OUT,\n    LINE,\n    BLOCKS,\n    SLICE,\n    FROM,\n    ESCAPE,\n    EACH\n};\n\nmodule.exports = Compiler;\n"
  },
  {
    "path": "src/compile/defaults.js",
    "content": "const runtime = require('./runtime');\nconst extend = require('./adapter/extend');\nconst include = require('./adapter/include');\nconst onerror = require('./adapter/onerror');\nconst caches = require('./adapter/caches');\nconst loader = require('./adapter/loader');\nconst artRule = require('./adapter/rule.art');\nconst nativeRule = require('./adapter/rule.native');\nconst htmlMinifier = require('./adapter/html-minifier');\nconst resolveFilename = require('./adapter/resolve-filename');\n\nconst detectNode = typeof window === 'undefined';\n\n/** 模板编译器默认配置 */\nconst settings = {\n    // 模板内容。如果没有此字段，则会根据 filename 来加载模板内容\n    source: null,\n\n    // 模板名\n    filename: null,\n\n    // 模板语法规则列表\n    rules: [nativeRule, artRule],\n\n    // 是否开启对模板输出语句自动编码功能。为 false 则关闭编码输出功能\n    // escape 可以防范 XSS 攻击\n    escape: true,\n\n    // 启动模板引擎调试模式。如果为 true: {cache:false, minimize:false, compileDebug:true}\n    debug: detectNode ? process.env.NODE_ENV !== 'production' : false,\n\n    // bail 如果为 true，编译错误与运行时错误都会抛出异常\n    bail: true,\n\n    // 是否开启缓存\n    cache: true,\n\n    // 是否开启压缩。它会运行 htmlMinifier，将页面 HTML、CSS、CSS 进行压缩输出\n    // 如果模板包含没有闭合的 HTML 标签，请不要打开 minimize，否则可能被 htmlMinifier 修复或过滤\n    minimize: true,\n\n    // 是否编译调试版\n    compileDebug: false,\n\n    // 模板路径转换器\n    resolveFilename: resolveFilename,\n\n    // 子模板编译适配器\n    include: include,\n\n    // HTML 压缩器。仅在 NodeJS 环境下有效\n    htmlMinifier: htmlMinifier,\n\n    // HTML 压缩器配置。参见 https://github.com/kangax/html-minifier\n    htmlMinifierOptions: {\n        collapseWhitespace: true,\n        minifyCSS: true,\n        minifyJS: true,\n        // 运行时自动合并：rules.map(rule => rule.test)\n        ignoreCustomFragments: []\n    },\n\n    // 错误事件。仅在 bail 为 false 时生效\n    onerror: onerror,\n\n    // 模板文件加载器\n    loader: loader,\n\n    // 缓存中心适配器（依赖 filename 字段）\n    caches: caches,\n\n    // 模板根目录。如果 filename 字段不是本地路径，则在 root 查找模板\n    root: '/',\n\n    // 默认后缀名。如果没有后缀名，则会自动添加 extname\n    extname: '.art',\n\n    // 忽略的变量。被模板编译器忽略的模板变量列表\n    ignore: [],\n\n    // 导入的模板变量\n    imports: runtime\n};\n\nfunction Defaults() {\n    this.$extend = function(options) {\n        options = options || {};\n        return extend(options, options instanceof Defaults ? options : this);\n    };\n}\nDefaults.prototype = settings;\n\nmodule.exports = new Defaults();\n"
  },
  {
    "path": "src/compile/error.js",
    "content": "/**\n * 模板错误处理类\n * @param   {Object}    options\n */\nclass TemplateError extends Error {\n    constructor(options) {\n        super(options.message);\n        this.name = 'TemplateError';\n        this.message = formatMessage(options);\n        if (Error.captureStackTrace) {\n            Error.captureStackTrace(this, this.constructor);\n        }\n    }\n}\n\nfunction formatMessage({ name, source, path, line, column, generated, message }) {\n    if (!source) {\n        return message;\n    }\n\n    const lines = source.split(/\\n/);\n    const start = Math.max(line - 3, 0);\n    const end = Math.min(lines.length, line + 3);\n\n    // Error context\n    const context = lines\n        .slice(start, end)\n        .map((code, index) => {\n            const number = index + start + 1;\n            const left = number === line ? ' >> ' : '    ';\n            return `${left}${number}| ${code}`;\n        })\n        .join('\\n');\n\n    // Alter exception message\n    return (\n        `${path || 'anonymous'}:${line}:${column}\\n` +\n        `${context}\\n\\n` +\n        `${name}: ${message}` +\n        (generated ? `\\n   generated: ${generated}` : '')\n    );\n}\n\nmodule.exports = TemplateError;\n"
  },
  {
    "path": "src/compile/es-tokenizer.js",
    "content": "const isKeyword = require('is-keyword-js');\nconst jsTokens = require('js-tokens').default;\nconst matchToToken = require('js-tokens').matchToToken;\n\n/**\n * 将逻辑表达式解释为 Tokens\n * @param {string} code\n * @return {Object[]}\n */\nconst esTokenizer = code => {\n    const tokens = code\n        .match(jsTokens)\n        .map(value => {\n            jsTokens.lastIndex = 0;\n            return matchToToken(jsTokens.exec(value));\n        })\n        .map(token => {\n            if (token.type === 'name' && isKeyword(token.value)) {\n                token.type = 'keyword';\n            }\n            return token;\n        });\n\n    return tokens;\n};\n\nmodule.exports = esTokenizer;\n"
  },
  {
    "path": "src/compile/index.js",
    "content": "const Compiler = require('./compiler');\nconst defaults = require('./defaults');\nconst TemplateError = require('./error');\n\nconst debugRender = (error, options) => {\n    options.onerror(error, options);\n    const render = () => `{Template Error}`;\n    render.mappings = [];\n    render.sourcesContent = [];\n    return render;\n};\n\n/**\n * 编译模版\n * @param {string|Object} source   模板内容\n * @param {?Object}       options  编译选项\n * @return {function}\n */\nconst compile = (source, options = {}) => {\n    if (typeof source !== 'string') {\n        options = source;\n    } else {\n        options.source = source;\n    }\n\n    // 合并默认配置\n    options = defaults.$extend(options);\n    source = options.source;\n\n    // debug 模式\n    /* istanbul ignore if */\n    if (options.debug === true) {\n        options.cache = false;\n        options.minimize = false;\n        options.compileDebug = true;\n    }\n\n    if (options.compileDebug) {\n        options.minimize = false;\n    }\n\n    // 转换成绝对路径\n    if (options.filename) {\n        options.filename = options.resolveFilename(options.filename, options);\n    }\n\n    const filename = options.filename;\n    const cache = options.cache;\n    const caches = options.caches;\n\n    // 匹配缓存\n    if (cache && filename) {\n        const render = caches.get(filename);\n        if (render) {\n            return render;\n        }\n    }\n\n    // 加载外部模板\n    if (!source) {\n        try {\n            source = options.loader(filename, options);\n            options.source = source;\n        } catch (e) {\n            const error = new TemplateError({\n                name: 'CompileError',\n                path: filename,\n                message: `template not found: ${e.message}`,\n                stack: e.stack\n            });\n\n            if (options.bail) {\n                throw error;\n            } else {\n                return debugRender(error, options);\n            }\n        }\n    }\n\n    let fn;\n    const compiler = new Compiler(options);\n\n    try {\n        fn = compiler.build();\n    } catch (error) {\n        error = new TemplateError(error);\n        if (options.bail) {\n            throw error;\n        } else {\n            return debugRender(error, options);\n        }\n    }\n\n    const render = (data, blocks) => {\n        try {\n            return fn(data, blocks);\n        } catch (error) {\n            // 运行时出错以调试模式重载\n            if (!options.compileDebug) {\n                options.cache = false;\n                options.compileDebug = true;\n                return compile(options)(data, blocks);\n            }\n\n            error = new TemplateError(error);\n\n            if (options.bail) {\n                throw error;\n            } else {\n                return debugRender(error, options)();\n            }\n        }\n    };\n\n    render.mappings = fn.mappings;\n    render.sourcesContent = fn.sourcesContent;\n    render.toString = () => fn.toString();\n\n    if (cache && filename) {\n        caches.set(filename, render);\n    }\n\n    return render;\n};\n\ncompile.Compiler = Compiler;\n\nmodule.exports = compile;\n"
  },
  {
    "path": "src/compile/runtime.js",
    "content": "/*! art-template@runtime | https://github.com/aui/art-template */\n\nconst globalThis = typeof self !== 'undefined' ? self\n    : typeof window !== 'undefined' ? window\n    : typeof global !== 'undefined' ? global : {};\n\nconst runtime = Object.create(globalThis);\nconst ESCAPE_REG = /[\"&'<>]/;\n\n/**\n * 编码模板输出的内容\n * @param  {any}        content\n * @return {string}\n */\nruntime.$escape = content => xmlEscape(toString(content));\n\n/**\n * 迭代器，支持数组与对象\n * @param {array|Object} data\n * @param {function}     callback\n */\nruntime.$each = (data, callback) => {\n    if (Array.isArray(data)) {\n        for (let i = 0, len = data.length; i < len; i++) {\n            callback(data[i], i);\n        }\n    } else {\n        for (let i in data) {\n            callback(data[i], i);\n        }\n    }\n};\n\n// 将目标转成字符\nfunction toString(value) {\n    if (typeof value !== 'string') {\n        if (value === undefined || value === null) {\n            value = '';\n        } else if (typeof value === 'function') {\n            value = toString(value.call(value));\n        } else {\n            value = JSON.stringify(value);\n        }\n    }\n\n    return value;\n}\n\n// 编码 HTML 内容\nfunction xmlEscape(content) {\n    const html = '' + content;\n    const regexResult = ESCAPE_REG.exec(html);\n    if (!regexResult) {\n        return content;\n    }\n\n    let result = '';\n    let i, lastIndex, char;\n    for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {\n        switch (html.charCodeAt(i)) {\n            case 34:\n                char = '&#34;';\n                break;\n            case 38:\n                char = '&#38;';\n                break;\n            case 39:\n                char = '&#39;';\n                break;\n            case 60:\n                char = '&#60;';\n                break;\n            case 62:\n                char = '&#62;';\n                break;\n            default:\n                continue;\n        }\n\n        if (lastIndex !== i) {\n            result += html.substring(lastIndex, i);\n        }\n\n        lastIndex = i + 1;\n        result += char;\n    }\n\n    if (lastIndex !== i) {\n        return result + html.substring(lastIndex, i);\n    } else {\n        return result;\n    }\n}\n\nmodule.exports = runtime;\n"
  },
  {
    "path": "src/compile/tpl-tokenizer.js",
    "content": "const TYPE_STRING = 'string';\nconst TYPE_EXPRESSION = 'expression';\nconst TYPE_RAW = 'raw';\nconst TYPE_ESCAPE = 'escape';\n\nfunction wrapString(token) {\n    const value = new String(token.value);\n    value.line = token.line;\n    value.start = token.start;\n    value.end = token.end;\n    return value;\n}\n\nfunction Token(type, value, prevToken) {\n    this.type = type;\n    this.value = value;\n    this.script = null;\n\n    if (prevToken) {\n        this.line = prevToken.line + prevToken.value.split(/\\n/).length - 1;\n        if (this.line === prevToken.line) {\n            this.start = prevToken.end;\n        } else {\n            this.start = prevToken.value.length - prevToken.value.lastIndexOf('\\n') - 1;\n        }\n    } else {\n        this.line = 0;\n        this.start = 0;\n    }\n\n    this.end = this.start + this.value.length;\n}\n\n/**\n * 将模板转换为 Tokens\n * @param {string}      source\n * @param {Object[]}    rules     @see defaults.rules\n * @param {Object}      context\n * @return {Object[]}\n */\nconst tplTokenizer = (source, rules, context = {}) => {\n    const tokens = [new Token(TYPE_STRING, source)];\n\n    for (let i = 0; i < rules.length; i++) {\n        const rule = rules[i];\n        const flags = rule.test.ignoreCase ? `ig` : `g`;\n        const regexp = new RegExp(rule.test.source, flags);\n\n        for (let i = 0; i < tokens.length; i++) {\n            const token = tokens[i];\n            let prevToken = tokens[i - 1];\n\n            if (token.type !== TYPE_STRING) {\n                continue;\n            }\n\n            let match,\n                index = 0;\n            const substitute = [];\n            const value = token.value;\n\n            while ((match = regexp.exec(value)) !== null) {\n                if (match.index > index) {\n                    prevToken = new Token(TYPE_STRING, value.slice(index, match.index), prevToken);\n                    substitute.push(prevToken);\n                }\n\n                prevToken = new Token(TYPE_EXPRESSION, match[0], prevToken);\n                match[0] = wrapString(prevToken);\n                prevToken.script = rule.use.apply(context, match);\n                substitute.push(prevToken);\n\n                index = match.index + match[0].length;\n            }\n\n            if (index < value.length) {\n                prevToken = new Token(TYPE_STRING, value.slice(index), prevToken);\n                substitute.push(prevToken);\n            }\n\n            tokens.splice(i, 1, ...substitute);\n            i += substitute.length - 1;\n        }\n    }\n\n    return tokens;\n};\n\ntplTokenizer.TYPE_STRING = TYPE_STRING;\ntplTokenizer.TYPE_EXPRESSION = TYPE_EXPRESSION;\ntplTokenizer.TYPE_RAW = TYPE_RAW;\ntplTokenizer.TYPE_ESCAPE = TYPE_ESCAPE;\n\nmodule.exports = tplTokenizer;\n"
  },
  {
    "path": "src/defaults.js",
    "content": "module.exports = require('./compile/defaults');\n"
  },
  {
    "path": "src/extension.js",
    "content": "const templatePath = require.resolve('./index.js');\n\n/**\n * require.extensions 扩展注册函数\n * 使用动态编译机制\n * @param {Object} module\n * @param {string} flnm\n */\nconst extension = function(module, flnm) {\n    const filename = flnm || module.filename;\n    const imports = 'var template=require(' + JSON.stringify(templatePath) + ')';\n    const options = JSON.stringify({\n        filename: filename\n    });\n\n    module._compile(\n        imports + '\\n' + 'module.exports = template.compile(' + options + ');',\n        filename\n    );\n};\n\nmodule.exports = extension;\n"
  },
  {
    "path": "src/index.js",
    "content": "const render = require('./render');\nconst compile = require('./compile');\nconst defaults = require('./defaults');\n\n/**\n * 模板引擎\n * @param   {string}            filename 模板名\n * @param   {Object|string}     content  数据或模板内容\n * @return  {string|function}            如果 content 为 string 则编译并缓存模板，否则渲染模板\n */\nconst template = (filename, content) => {\n    return content instanceof Object\n        ? render(\n              {\n                  filename\n              },\n              content\n          )\n        : compile({\n              filename,\n              source: content\n          });\n};\n\ntemplate.render = render;\ntemplate.compile = compile;\ntemplate.defaults = defaults;\n\nmodule.exports = template;\n"
  },
  {
    "path": "src/precompile.js",
    "content": "const path = require('path');\nconst acorn = require('acorn');\nconst escodegen = require('escodegen');\nconst estraverse = require('estraverse');\nconst sourceMap = require('source-map');\nconst mergeSourceMap = require('merge-source-map');\nconst compile = require('./compile');\nconst defaults = require('./defaults');\nconst runtimePath = require.resolve('./runtime');\n\nconst CONSTS = compile.Compiler.CONSTS;\nconst LOCAL_MODULE = /^\\.+\\//;\n\n// 获取默认设置\nconst getDefaults = options => {\n    // new defaults\n    const setting = {\n        imports: runtimePath,\n        bail: true,\n        cache: false,\n        debug: false,\n\n        sourceMap: false,\n        sourceRoot: options.sourceRoot\n    };\n\n    for (let name in options) {\n        setting[name] = options[name];\n    }\n\n    return defaults.$extend(setting);\n};\n\n// 转换外部模板文件引入语句的 filename 参数节点\n// 所有绝对路径都转换成相对路径\nconst convertFilenameNode = (node, options) => {\n    if (node.type === 'Literal') {\n        const resolvePath = options.resolveFilename(node.value, options);\n        const dirname = path.dirname(options.filename);\n        const relativePath = path.relative(dirname, resolvePath);\n\n        if (LOCAL_MODULE.test(relativePath)) {\n            node.value = relativePath;\n        } else {\n            node.value = './' + relativePath;\n        }\n\n        delete node.raw;\n    }\n\n    return node;\n};\n\n// 获取原始渲染函数的 sourceMap\nconst getOldSourceMap = (mappings, { sourceRoot, source, file }) => {\n    const oldSourceMap = new sourceMap.SourceMapGenerator({\n        file,\n        sourceRoot\n    });\n\n    mappings.forEach(mapping => {\n        mapping.source = source;\n        oldSourceMap.addMapping(mapping);\n    });\n\n    return oldSourceMap.toJSON();\n};\n\n/**\n * 预编译模版，将模板编译成 javascript 代码\n * 使用静态分析，将模板内部之间依赖转换成 `require()`\n * @param  {Object}       options  编译选项\n * @return {Object}\n */\nconst precompile = (options = {}) => {\n    if (typeof options.filename !== 'string') {\n        throw Error('template.precompile(): \"options.filename\" required');\n    }\n\n    options = getDefaults(options);\n\n    let code = null;\n    let sourceMap = null;\n    let ast = null;\n    const imports = options.imports;\n    const functions = [CONSTS.INCLUDE, CONSTS.EXTEND];\n\n    if (typeof imports !== 'string') {\n        throw Error(\n            'template.precompile(): \"options.imports\" is a file. Example:\\n' +\n                'options: { imports: require.resolve(\"art-template/lib/runtime\") }\\n'\n        );\n    } else {\n        options.imports = require(imports);\n    }\n\n    const isLocalModule = LOCAL_MODULE.test(imports);\n    const tplImportsPath = isLocalModule\n        ? imports\n        : path.relative(path.dirname(options.filename), imports);\n    const fn = compile(options);\n\n    code = '(' + fn.toString() + ')';\n    ast = acorn.parse(code, {\n        locations: options.sourceMap\n    });\n\n    let extendNode = null;\n    const enter = function(node) {\n        if (node.type === 'VariableDeclarator' && functions.indexOf(node.id.name) !== -1) {\n            // TODO 对变量覆盖进行抛错\n            if (node.id.name === CONSTS.INCLUDE) {\n                node['init'] = {\n                    type: 'FunctionExpression',\n                    params: [\n                        {\n                            type: 'Identifier',\n                            name: 'content'\n                        }\n                    ],\n                    body: {\n                        type: 'BlockStatement',\n                        body: [\n                            {\n                                type: 'ExpressionStatement',\n                                expression: {\n                                    type: 'AssignmentExpression',\n                                    operator: '+=',\n                                    left: {\n                                        type: 'Identifier',\n                                        name: CONSTS.OUT\n                                    },\n                                    right: {\n                                        type: 'Identifier',\n                                        name: 'content'\n                                    }\n                                }\n                            },\n                            {\n                                type: 'ReturnStatement',\n                                argument: {\n                                    type: 'Identifier',\n                                    name: CONSTS.OUT\n                                }\n                            }\n                        ]\n                    }\n                };\n                return node;\n            } else {\n                this.remove();\n            }\n        } else if (\n            node.type === 'CallExpression' &&\n            node.callee.type === 'Identifier' &&\n            functions.indexOf(node.callee.name) !== -1\n        ) {\n            let replaceNode;\n            switch (node.callee.name) {\n                case CONSTS.EXTEND:\n                    extendNode = convertFilenameNode(node.arguments[0], options);\n                    replaceNode = {\n                        type: 'AssignmentExpression',\n                        operator: '=',\n                        left: {\n                            type: 'Identifier',\n                            name: CONSTS.FROM\n                        },\n                        right: {\n                            type: 'Literal',\n                            value: true\n                        }\n                    };\n\n                    break;\n\n                case CONSTS.INCLUDE:\n                    const filename = node.arguments.shift();\n                    const filenameNode =\n                        filename.name === CONSTS.FROM\n                            ? extendNode\n                            : convertFilenameNode(filename, options);\n                    const paramNodes = node.arguments.length\n                        ? node.arguments\n                        : [\n                              {\n                                  type: 'Identifier',\n                                  name: CONSTS.DATA\n                              }\n                          ];\n\n                    replaceNode = node;\n                    replaceNode['arguments'] = [\n                        {\n                            type: 'CallExpression',\n                            callee: {\n                                type: 'CallExpression',\n                                callee: {\n                                    type: 'Identifier',\n                                    name: 'require'\n                                },\n                                arguments: [filenameNode]\n                            },\n                            arguments: paramNodes\n                        }\n                    ];\n\n                    break;\n            }\n\n            return replaceNode;\n        }\n    };\n\n    ast = estraverse.replace(ast, {\n        enter: enter\n    });\n\n    if (options.sourceMap) {\n        const sourceRoot = options.sourceRoot;\n        const source = path.relative(sourceRoot, options.filename);\n        const file = path.basename(source);\n        const gen = escodegen.generate(ast, {\n            sourceMap: source,\n            file: file,\n            sourceMapRoot: sourceRoot,\n            sourceMapWithCode: true\n        });\n        code = gen.code;\n\n        const newSourceMap = gen.map.toJSON();\n        const oldSourceMap = getOldSourceMap(fn.mappings, {\n            sourceRoot,\n            source,\n            file\n        });\n        sourceMap = mergeSourceMap(oldSourceMap, newSourceMap);\n        sourceMap.file = file;\n        sourceMap.sourcesContent = fn.sourcesContent;\n    } else {\n        code = escodegen.generate(ast);\n    }\n\n    code = code.replace(/^\\(|\\)[;\\s]*?$/g, '');\n    code =\n        'var ' +\n        CONSTS.IMPORTS +\n        ' = require(' +\n        JSON.stringify(tplImportsPath) +\n        ');\\n' +\n        'module.exports = ' +\n        code +\n        ';';\n\n    return {\n        code,\n        ast,\n        sourceMap,\n        toString: () => code\n    };\n};\n\nmodule.exports = precompile;\n"
  },
  {
    "path": "src/render.js",
    "content": "const compile = require('./compile');\n\n/**\n * 渲染模板\n * @param   {string|Object}     source  模板内容\n * @param   {Object}            data    数据\n * @param   {?Object}           options 选项\n * @return  {string}            渲染好的字符串\n */\nconst render = (source, data, options) => compile(source, options)(data);\n\nmodule.exports = render;\n"
  },
  {
    "path": "src/runtime.js",
    "content": "module.exports = require('./compile/runtime');\n"
  },
  {
    "path": "test/compile/adapter/caches.js",
    "content": "const assert = require('assert');\nconst caches = require('../../../src/compile/adapter/caches');\n\nmodule.exports = {\n    caches: {\n        'set value': () => {\n            caches.set('test', 'hello');\n            assert.deepEqual('hello', caches.get('test'));\n        },\n\n        'get value': () => {\n            assert.deepEqual('undefined', typeof caches.get('toString'));\n        },\n\n        'reset caches': () => {\n            caches.set('test', 9);\n            caches.reset();\n            assert.deepEqual(undefined, caches.get('test'));\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/adapter/html-minifier.js",
    "content": "const assert = require('assert');\nconst htmlMinifier = require('../../../src/compile/adapter/html-minifier');\nconst rules = [];\nconst htmlMinifierOptions = {\n    collapseWhitespace: true,\n    minifyCSS: true,\n    minifyJS: true,\n    ignoreCustomFragments: []\n};\n\nmodule.exports = {\n    'html-minifier': {\n        text: () => {\n            const result = htmlMinifier('hello world', {\n                rules,\n                htmlMinifierOptions\n            });\n            assert.equal('hello world', result);\n        },\n\n        tag: () => {\n            let result;\n            result = htmlMinifier('<div></div>   <a></a>', {\n                rules,\n                htmlMinifierOptions\n            });\n            assert.equal('<div></div><a></a>', result);\n\n            result = htmlMinifier('hello   <div>world</div>', {\n                rules,\n                htmlMinifierOptions\n            });\n            assert.equal('hello<div>world</div>', result);\n        },\n\n        script: () => {\n            const result = htmlMinifier('<script>var x = \"     \";</script>', {\n                rules,\n                htmlMinifierOptions\n            });\n            assert.equal('<script>var x=\"     \"</script>', result);\n        },\n\n        'html fragment': () => {\n            let result;\n\n            result = htmlMinifier('hello   <div>world', {\n                rules,\n                htmlMinifierOptions\n            });\n            assert.equal('hello<div>world</div>', result);\n        },\n\n        'throw error': () => {\n            let result = null;\n            try {\n                result = htmlMinifier('<div ', {\n                    rules,\n                    htmlMinifierOptions\n                });\n            } catch (e) {}\n            assert.equal(null, result);\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/adapter/loader.js",
    "content": "const assert = require('assert');\nconst tplLoader = require('../../../src/compile/adapter/loader');\nconst path = require('path');\n\nmodule.exports = {\n    loader: {\n        'read file': () => {\n            const filename = path.resolve(__dirname, '..', '..', 'res', 'file.html');\n            assert.deepEqual('hello world', tplLoader(filename));\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/adapter/onerror.js",
    "content": "const onerror = require('../../../src/compile/adapter/onerror');\n\nmodule.exports = {\n    onerror: {\n        basic: () => {\n            onerror({});\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/adapter/resolve-filename.js",
    "content": "const assert = require('assert');\nconst resolveFilename = require('../../../src/compile/adapter/resolve-filename');\n\nmodule.exports = {\n    resolveFilename: {\n        basic: () => {\n            const test = (args, result) => {\n                assert.deepEqual(result, resolveFilename(...args));\n            };\n\n            test(\n                [\n                    'header.html',\n                    {\n                        root: '/'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    'header.html',\n                    {\n                        root: '/Root'\n                    }\n                ],\n                '/Root/header.html'\n            );\n\n            test(\n                [\n                    'header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Root/base/index.html'\n                    }\n                ],\n                '/Root/header.html'\n            );\n\n            test(\n                [\n                    'header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Web/base/index.html'\n                    }\n                ],\n                '/Root/header.html'\n            );\n\n            test(\n                [\n                    './header.html',\n                    {\n                        root: '/'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    './header.html',\n                    {\n                        root: '/Root'\n                    }\n                ],\n                '/Root/header.html'\n            );\n\n            test(\n                [\n                    './header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Root/base/index.html'\n                    }\n                ],\n                '/Root/base/header.html'\n            );\n\n            test(\n                [\n                    './header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Web/base/index.html'\n                    }\n                ],\n                '/Web/base/header.html'\n            );\n\n            test(\n                [\n                    '../../header.html',\n                    {\n                        root: '/'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    '../../header.html',\n                    {\n                        root: '/Root'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    '../../header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Root/base/index.html'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    '../../header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Web/base/index.html'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    '/header.html',\n                    {\n                        root: '/'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    '/header.html',\n                    {\n                        root: '/Root'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    '/header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Root/base/index.html'\n                    }\n                ],\n                '/header.html'\n            );\n\n            test(\n                [\n                    '/header.html',\n                    {\n                        root: '/Root',\n                        extname: '.art',\n                        filename: '/Web/base/index.html'\n                    }\n                ],\n                '/header.html'\n            );\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/adapter/rule.art.js",
    "content": "const assert = require('assert');\nconst ruleArt = require('../../../src/compile/adapter/rule.art');\nconst esTokenizer = require('../../../src/compile/es-tokenizer');\n\nconst callRule = code => {\n    const compiler = {\n        options: {},\n        getEsTokens: esTokenizer\n    };\n    const list = code.match(ruleArt.test);\n    list[0] = new String(list[0]);\n    list[0].line = 0;\n    list[0].start = 0;\n    return ruleArt.use.apply(compiler, list);\n};\n\nmodule.exports = {\n    syntax: {\n        set: () => {\n            assert.deepEqual(\n                {\n                    code: 'var a = b',\n                    output: false\n                },\n                callRule(`{{set a = b}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'var a = b',\n                    output: false\n                },\n                callRule(`{{ set a = b }}`)\n            );\n\n            // 多个声明\n            assert.deepEqual(\n                {\n                    code: 'var a = b, c = 1',\n                    output: false\n                },\n                callRule(`{{set a = b, c = 1}}`)\n            );\n        },\n        if: () => {\n            // 布尔\n            assert.deepEqual(\n                {\n                    code: 'if(value){',\n                    output: false\n                },\n                callRule(`{{if value}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'if(value){',\n                    output: false\n                },\n                callRule(`{{ if value }}`)\n            );\n\n            // 算术\n            assert.deepEqual(\n                {\n                    code: 'if(a + b === 4){',\n                    output: false\n                },\n                callRule(`{{if a + b === 4}}`)\n            );\n\n            // 优先级\n            assert.deepEqual(\n                {\n                    code: 'if((a + b) * c){',\n                    output: false\n                },\n                callRule(`{{if (a + b) * c}}`)\n            );\n        },\n        'else if': () => {\n            // 布尔\n            assert.deepEqual(\n                {\n                    code: '}else if(value){',\n                    output: false\n                },\n                callRule(`{{else if value}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '}else if(value){',\n                    output: false\n                },\n                callRule(`{{ else if value }}`)\n            );\n\n            // 算术\n            assert.deepEqual(\n                {\n                    code: '}else if(a + b === 4){',\n                    output: false\n                },\n                callRule(`{{else if a + b === 4}}`)\n            );\n\n            // 优先级\n            assert.deepEqual(\n                {\n                    code: '}else if((a + b) * c){',\n                    output: false\n                },\n                callRule(`{{else if (a + b) * c}}`)\n            );\n        },\n        else: () => {\n            assert.deepEqual(\n                {\n                    code: '}else{',\n                    output: false\n                },\n                callRule(`{{else}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '}else{',\n                    output: false\n                },\n                callRule(`{{ else }}`)\n            );\n        },\n        '/if': () => {\n            assert.deepEqual(\n                {\n                    code: '}',\n                    output: false\n                },\n                callRule(`{{/if}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '}',\n                    output: false\n                },\n                callRule(`{{ /if }}`)\n            );\n        },\n        each: () => {\n            assert.deepEqual(\n                {\n                    code: '$each($data,function($value,$index){',\n                    output: false\n                },\n                callRule(`{{each}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '$each($data,function($value,$index){',\n                    output: false\n                },\n                callRule(`{{ each }}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '$each(list,function($value,$index){',\n                    output: false\n                },\n                callRule(`{{each list}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '$each(list,function(val,$index){',\n                    output: false\n                },\n                callRule(`{{each list val}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '$each(list,function(val,key){',\n                    output: false\n                },\n                callRule(`{{each list val key}}`)\n            );\n\n            // 表达式\n            assert.deepEqual(\n                {\n                    code: '$each(list[a].b,function(val,key){',\n                    output: false\n                },\n                callRule(`{{each list[a].b val key}}`)\n            );\n\n            // 兼容 v3 as 语法\n            assert.deepEqual(\n                {\n                    code: '$each(list,function(val,key){',\n                    output: false\n                },\n                callRule(`{{each list as val key}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$each(list['var'].a,function(val,key){`,\n                    output: false\n                },\n                callRule(`{{each list['var'].a as val key}}`)\n            );\n        },\n        '/each': () => {\n            assert.deepEqual(\n                {\n                    code: '})',\n                    output: false\n                },\n                callRule(`{{/each}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: '})',\n                    output: false\n                },\n                callRule(`{{ /each }}`)\n            );\n        },\n        block: () => {\n            assert.deepEqual(\n                {\n                    code: `block('header',function(){`,\n                    output: false\n                },\n                callRule(`{{block 'header'}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `block('header',function(){`,\n                    output: false\n                },\n                callRule(`{{ block 'header' }}`)\n            );\n        },\n        include: () => {\n            assert.deepEqual(\n                {\n                    code: `include('header')`,\n                    output: false\n                },\n                callRule(`{{include 'header'}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `include('header')`,\n                    output: false\n                },\n                callRule(`{{ include 'header' }}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `include('header',data)`,\n                    output: false\n                },\n                callRule(`{{include 'header' data}}`)\n            );\n\n            // 当作函数调用\n            assert.deepEqual(\n                {\n                    code: `include('header',data)`,\n                    output: 'escape'\n                },\n                callRule(`{{include('header',data)}}`)\n            );\n        },\n        extend: () => {\n            assert.deepEqual(\n                {\n                    code: `extend('header')`,\n                    output: false\n                },\n                callRule(`{{extend 'header'}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `extend('header')`,\n                    output: false\n                },\n                callRule(`{{ extend 'header' }}`)\n            );\n\n            // 当作函数调用\n            assert.deepEqual(\n                {\n                    code: `extend('header')`,\n                    output: 'escape'\n                },\n                callRule(`{{extend('header')}}`)\n            );\n        }\n    },\n\n    output: {\n        autoescape: () => {\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'escape'\n                },\n                callRule(`{{value}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'escape'\n                },\n                callRule(`{{ value }}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'typeof value',\n                    output: 'escape'\n                },\n                callRule(`{{typeof value}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value + 1',\n                    output: 'escape'\n                },\n                callRule(`{{value + 1}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value?a:b',\n                    output: 'escape'\n                },\n                callRule(`{{value?a:b}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value ? a : b',\n                    output: 'escape'\n                },\n                callRule(`{{ value ? a : b }}`)\n            );\n        },\n        raw: () => {\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'raw'\n                },\n                callRule(`{{@value}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'raw'\n                },\n                callRule(`{{@ value }}`)\n            );\n        },\n        filter: () => {\n            assert.deepEqual(\n                {\n                    code: `$imports.c($imports.b(a))`,\n                    output: 'escape'\n                },\n                callRule(`{{a | b | c}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.c($imports.b(a))`,\n                    output: 'escape'\n                },\n                callRule(`{{ a | b | c }}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.c($imports.b(a(9+9,54)))`,\n                    output: 'escape'\n                },\n                callRule(`{{a(9 + 9, 54) | b | c}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.c($imports.b(a,1),2)`,\n                    output: 'escape'\n                },\n                callRule(`{{a | b 1 | c 2}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.c($imports.b(a,1+3),2+4)`,\n                    output: 'escape'\n                },\n                callRule(`{{a | b 1 + 3 | c 2 + 4}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.dateFormat(time)`,\n                    output: 'escape'\n                },\n                callRule(`{{time | dateFormat}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.dateFormat(time,'yyyy-MM-dd')`,\n                    output: 'escape'\n                },\n                callRule(`{{time | dateFormat 'yyyy-MM-dd'}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.dateFormat(time,'yyyy-MM-dd')`,\n                    output: 'escape'\n                },\n                callRule(`{{time | dateFormat:'yyyy-MM-dd'}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.dateFormat(time,f?a.b[c]:y(),9.99)`,\n                    output: 'escape'\n                },\n                callRule(`{{time | dateFormat f ? a.b[c] : y() 9.99}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.dateFormat(time||Date.now(),'yyyy-MM-dd')`,\n                    output: 'escape'\n                },\n                callRule(`{{time || Date.now() | dateFormat 'yyyy-MM-dd'}}`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: `$imports.dateFormat(item.add_time*1000,'yyyy-MM-dd hh:mm:ss')`,\n                    output: 'escape'\n                },\n                callRule(`{{item.add_time*1000 | dateFormat 'yyyy-MM-dd hh:mm:ss'}}`)\n            );\n        }\n    },\n\n    'rule.art': {\n        _split: () => {\n            let code;\n            let esTokens;\n            let result;\n\n            code = 'a b c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a', 'b', 'c'], result);\n\n            code = ' a b c ';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a', 'b', 'c'], result);\n\n            code = 'a b   c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a', 'b', 'c'], result);\n\n            code = 'a.b c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a.b', 'c'], result);\n\n            code = 'a. b c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a.b', 'c'], result);\n\n            code = 'a[b] c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a[b]', 'c'], result);\n\n            code = 'a[\"b\"] c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a[\"b\"]', 'c'], result);\n\n            code = 'a[\"b\"][c] c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a[\"b\"][c]', 'c'], result);\n\n            code = 'a[\"b\"].c d';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a[\"b\"].c', 'd'], result);\n\n            code = 'a[\" b \"] c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a[\" b \"]', 'c'], result);\n\n            code = 'a + b c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a+b', 'c'], result);\n\n            code = 'a - b c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a-b', 'c'], result);\n\n            code = 'a * b c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a*b', 'c'], result);\n\n            code = 'a / b c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a/b', 'c'], result);\n\n            code = 'a + b + c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a+b+c'], result);\n\n            code = 'a + b.f + c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a+b.f+c'], result);\n\n            code = 'a ? b : c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a?b:c'], result);\n\n            code = 'a ? b : c ? d : e';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a?b:c?d:e'], result);\n\n            code = 'a.f ? b : c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a.f?b:c'], result);\n\n            code = 'a . f ? b : c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a.f?b:c'], result);\n\n            code = 'a ? b : c . d';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a?b:c.d'], result);\n\n            code = 'a ? b : c e';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['a?b:c', 'e'], result);\n\n            code = '(a + b) / c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['(a+b)/c'], result);\n\n            code = '(a + b) / c[a]';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['(a+b)/c[a]'], result);\n\n            code = '++ a c';\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['++a', 'c'], result);\n\n            code = `dateFormat 'yyyy-MM-dd hh:mm:ss'`;\n            esTokens = esTokenizer(code);\n            result = ruleArt._split(esTokens);\n            assert.deepEqual(['dateFormat', `'yyyy-MM-dd hh:mm:ss'`], result);\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/adapter/rule.native.js",
    "content": "const assert = require('assert');\nconst ruleNative = require('../../../src/compile/adapter/rule.native');\nconst esTokenizer = require('../../../src/compile/es-tokenizer');\n\nconst callRule = code => {\n    const compiler = {\n        options: {},\n        getEsTokens: esTokenizer\n    };\n    const list = code.match(ruleNative.test);\n    list[0] = new String(list[0]);\n    list[0].line = 0;\n    list[0].start = 0;\n    return ruleNative.use.apply(compiler, list);\n};\n\nmodule.exports = {\n    syntax: {\n        basic: () => {\n            assert.deepEqual(\n                {\n                    code: 'if (value) {',\n                    output: false\n                },\n                callRule(`<%if (value) {%>`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'if (value) {',\n                    output: false\n                },\n                callRule(`<% if (value) { %>`)\n            );\n        },\n        comment: () => {\n            assert.deepEqual(\n                {\n                    code: '/*if (value) {*/',\n                    output: false\n                },\n                callRule(`<%#if (value) {%>`)\n            );\n        },\n        trimMode: () => {\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: false\n                },\n                callRule(`<%value-%>`)\n            );\n        }\n    },\n\n    output: {\n        autoescape: () => {\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'escape'\n                },\n                callRule(`<%=value%>`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'escape'\n                },\n                callRule(`<%= value %>`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'typeof value',\n                    output: 'escape'\n                },\n                callRule(`<%=typeof value%>`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value + 1',\n                    output: 'escape'\n                },\n                callRule(`<%=value + 1%>`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value?a:b',\n                    output: 'escape'\n                },\n                callRule(`<%=value?a:b%>`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value ? a : b',\n                    output: 'escape'\n                },\n                callRule(`<%= value ? a : b %>`)\n            );\n        },\n        raw: () => {\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'raw'\n                },\n                callRule(`<%-value%>`)\n            );\n\n            assert.deepEqual(\n                {\n                    code: 'value',\n                    output: 'raw'\n                },\n                callRule(`<%- value %>`)\n            );\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/compiler.js",
    "content": "const assert = require('assert');\nconst Compiler = require('../../src/compile/compiler');\nconst defaults = require('../../src/compile/defaults');\nconst ruleNative = require('../../src/compile/adapter/rule.native');\n\nconst htmlMinifier = ({ source }) => {\n    return source.replace(/\\s+/g, ` `).replace(/<!--[\\w\\W]*?-->/g, ``);\n};\n\nmodule.exports = {\n    getVariables: {\n        basic: () => {\n            const test = (code, result) => {\n                const tokens = Compiler.prototype.getEsTokens(code);\n                const variables = Compiler.prototype.getVariables(tokens);\n                assert.deepEqual(result, variables);\n            };\n\n            test('var', []);\n            test('var a', ['a']);\n            test('a', ['a']);\n            test('a.b', ['a']);\n            test('a.b.c', ['a']);\n            test('a.b;c', ['a', 'c']);\n            test('a.b\\nd', ['a', 'd']);\n            test('a.\\nb', ['a']);\n            test('0.99 + a', ['a']);\n            test('0.99 + a + b.c', ['a', 'b']);\n            test('a /*.*/. b /**/; c', ['a', 'c']);\n            test('a \".b.c; d;\" /*e*/ f', ['a', 'f']);\n\n            test('a[b]', ['a', 'b']);\n            test('a[b].c[d]', ['a', 'b', 'd']);\n            test('a[\"b\"]', ['a']);\n            test('a[\"b\"].c', ['a']);\n\n            test(`var a, b, c`, ['a', 'b', 'c']);\n            test(`function a(b,c){d}`, ['a', 'b', 'c', 'd']);\n            test(`try{a}catch(b){c}`, ['a', 'b', 'c']);\n            test(`{...a,\\nb}`, ['a', 'b']);\n        }\n    },\n\n    importContext: {\n        basic: () => {\n            const test = (code, result, options) => {\n                options = defaults.$extend(options);\n                options.source = '';\n                const compiler = new Compiler(options);\n                compiler.importContext(code);\n                result.$$out = `''`;\n                assert.deepEqual(result, compiler.CONTEXT_MAP);\n            };\n\n            test('value', {\n                value: '$data.value'\n            });\n\n            //test('if', {});\n            //test('for', {});\n            test('$data', {});\n            test('$imports', {});\n\n            test('$escape', {\n                $escape: '$imports.$escape'\n            });\n        },\n\n        imports: () => {\n            const options = defaults.$extend({});\n            options.imports.Math = Math;\n            options.source = '';\n            const compiler = new Compiler(options);\n            compiler.importContext('Math');\n            assert.deepEqual(\n                {\n                    $$out: `''`,\n                    Math: '$imports.Math'\n                },\n                compiler.CONTEXT_MAP\n            );\n        }\n    },\n\n    addSource: {\n        basic: () => {\n            const test = (code, result, options) => {\n                options = defaults.$extend(options);\n                options.minimize = false;\n                options.source = code;\n                const compiler = new Compiler(options);\n                assert.deepEqual(result, compiler.scripts.map(script => script.code));\n            };\n\n            test('hello', ['$$out+=\"hello\"']);\n            test('<%=value%>', ['$$out+=$escape(value)']);\n\n            test('hello<%=value%>', ['$$out+=\"hello\"', '$$out+=$escape(value)']);\n            test('hello\\n<%=value%>', ['$$out+=\"hello\\\\n\"', '$$out+=$escape(value)']);\n        }\n    },\n\n    parseString: {\n        basic: () => {\n            const test = (code, result, options) => {\n                it(code, () => {\n                    options = defaults.$extend(options);\n                    options.source = '';\n                    const compiler = new Compiler(options);\n                    const token = compiler.getTplTokens(code, [ruleNative]);\n                    compiler.parseString(token[0]);\n                    assert.deepEqual(result, compiler.scripts.map(script => script.code));\n                });\n            };\n\n            // raw\n            test('hello', ['$$out+=\"hello\"']);\n            test(\"'hello'\", ['$$out+=\"\\'hello\\'\"']);\n            test('\"hello    world\"', ['$$out+=\"\\\\\"hello    world\\\\\"\"']);\n            test('<div>hello</div>', ['$$out+=\"<div>hello</div>\"']);\n            test('<div id=\"test\">hello</div>', ['$$out+=\"<div id=\\\\\"test\\\\\">hello</div>\"']);\n\n            // htmlMinifier\n            test('  hello  ', ['$$out+=\" hello \"'], {\n                htmlMinifier\n            });\n            test('\\n  hello  \\n\\n.', ['$$out+=\" hello .\"'], {\n                htmlMinifier\n            });\n            test('\"hello    world\"', ['$$out+=\"\\\\\"hello world\\\\\"\"'], {\n                htmlMinifier\n            });\n            test(\"'hello    world'\", ['$$out+=\"\\'hello world\\'\"'], {\n                htmlMinifier\n            });\n        },\n\n        parseExpression: () => {\n            const test = (code, result, options) => {\n                it(code, () => {\n                    options = defaults.$extend(options);\n                    options.source = '';\n                    const compiler = new Compiler(options);\n                    const token = compiler.getTplTokens(code, [ruleNative]);\n                    compiler.parseExpression(token[0]);\n                    assert.deepEqual(result, compiler.scripts.map(script => script.code));\n                });\n            };\n\n            // v3 compat\n            test('<%=value%>', ['$$out+=$escape(value)']);\n            test('<%=#value%>', ['$$out+=value']);\n\n            // v4\n            test('<%-value%>', ['$$out+=value']);\n            test('<%- value %>', ['$$out+= value']);\n\n            test('<%=value%>', ['$$out+=value'], {\n                escape: false\n            });\n            test('<%-value%>', ['$$out+=value'], {\n                escape: false\n            });\n\n            test('<%if (value) {%>', ['if (value) {']);\n            test('<% if (value) { %>', [' if (value) { ']);\n            test('<%    if ( value ) {    %>', ['    if ( value ) {    '], {\n                htmlMinifier\n            });\n        }\n    },\n\n    checkExpression: {\n        basic: () => {\n            const test = (code, result, options) => {\n                options = defaults.$extend(options);\n                options.source = code;\n                const compiler = new Compiler(options);\n                assert.deepEqual(result, compiler.checkExpression(code));\n            };\n\n            test('if(a){', true);\n            test('for(var i in d){', true);\n            test('fn(function(a,b){', true);\n            test('fn  (  function  (  a,  b  )  {  ', true);\n            test('fn(1,function(a,b){', true);\n            test('fn  (  1,  function  (  a,  b  )  {  ', true);\n            test('fn(function(){', true);\n            test('fn  (  function  (  )  {  ', true);\n            test('fn(1,function(){', true);\n            test('fn  (  1,  function  (  )  {  ', true);\n            test('fn((a,b)=>{', true);\n            test('fn  (  (  a  ,  b  )  =>  {  ', true);\n            test('fn(1,(a,b)=>{', true);\n            test('fn  (  1,  (  a  ,  b  )  =>  {  ', true);\n            test('fn(()=>{', true);\n            test('fn  (  (  )  =>  {  ', true);\n            test('fn(1,()=>{', true);\n            test('fn  (  1  ,  (  )  =>  {  ', true);\n            test('$each(user.tags,function($value,$index){;', true);\n            test('}else if(a){', true);\n            test('}else{', true);\n            test('}', true);\n\n            //test('(a,b)=>{', true);\n\n            test('if(a){}', true);\n            test('for(var i in d){}', true);\n            test('fn(function(a,b){})', true);\n            test('fn((a,b)=>{})', true);\n\n            test('@if(a){', false);\n            test('@for(var i in d){', false);\n            test('@fn(function(a,b){', false);\n            test('@fn((a,b)=>{', false);\n        }\n    },\n\n    mappings: {\n        basic: () => {\n            const test = (source, result) => {\n                const options = defaults.$extend({\n                    source,\n                    minimize: false\n                });\n                const compiler = new Compiler(options);\n                const render = compiler.build();\n                const mappings = render.mappings;\n                assert.deepEqual(result, mappings);\n            };\n\n            test(`{{value}}`, [\n                {\n                    generated: {\n                        line: 5,\n                        column: 1\n                    },\n                    original: {\n                        line: 1,\n                        column: 1\n                    }\n                }\n            ]);\n\n            test(`abc{{value}}`, [\n                {\n                    generated: {\n                        line: 5,\n                        column: 1\n                    },\n                    original: {\n                        line: 1,\n                        column: 1\n                    }\n                },\n                {\n                    generated: {\n                        line: 6,\n                        column: 1\n                    },\n                    original: {\n                        line: 1,\n                        column: 4\n                    }\n                }\n            ]);\n\n            test(`abc\\n{{value}}`, [\n                {\n                    generated: {\n                        line: 5,\n                        column: 1\n                    },\n                    original: {\n                        line: 1,\n                        column: 1\n                    }\n                },\n                {\n                    generated: {\n                        line: 6,\n                        column: 1\n                    },\n                    original: {\n                        line: 2,\n                        column: 1\n                    }\n                }\n            ]);\n\n            test(`abc\\n<%\\n print('s') \\n eeee(2) %>\\n{{a}}`, [\n                {\n                    generated: {\n                        line: 5,\n                        column: 1\n                    },\n                    original: {\n                        line: 1,\n                        column: 1\n                    }\n                },\n                {\n                    generated: {\n                        line: 6,\n                        column: 1\n                    },\n                    original: {\n                        line: 2,\n                        column: 1\n                    }\n                },\n                {\n                    generated: {\n                        line: 9,\n                        column: 1\n                    },\n                    original: {\n                        line: 4,\n                        column: 12\n                    }\n                },\n                {\n                    generated: {\n                        line: 10,\n                        column: 1\n                    },\n                    original: {\n                        line: 5,\n                        column: 1\n                    }\n                }\n            ]);\n        }\n    },\n\n    build: {\n        CompileError: {\n            throw: () => {\n                const options = Object.create(defaults);\n                options.minimize = false;\n                options.source = 'hello\\n\\n<% a b c d %>';\n                const compiler = new Compiler(options);\n\n                try {\n                    compiler.build();\n                } catch (e) {\n                    assert.deepEqual('CompileError', e.name);\n                    assert.deepEqual(3, e.line);\n                }\n            }\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/defaults.js",
    "content": "const assert = require('assert');\nconst defaults = require('../../src/compile/defaults');\nmodule.exports = {\n    defaults: {\n        imports: () => {\n            const imports = defaults.imports;\n            const options = defaults.$extend({\n                imports: {\n                    test: 1\n                }\n            });\n\n            assert.deepEqual(1, options.imports.test);\n            assert.deepEqual(imports.$escape, options.imports.$escape);\n            assert.deepEqual(undefined, imports.test);\n        },\n\n        rules: () => {\n            const rules = defaults.rules;\n            const length = rules.length;\n            const options = defaults.$extend({\n                rules: [null]\n            });\n\n            assert.deepEqual(null, options.rules[0]);\n            assert.deepEqual(rules[1], options.rules[1]);\n            assert.deepEqual(length, rules.length);\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/es-tokenizer.js",
    "content": "const assert = require('assert');\nconst esTokenizer = require('../../src/compile/es-tokenizer');\n\nmodule.exports = {\n    parser: {\n        basic: () => {\n            const test = (code, result) => {\n                assert.deepEqual(result, esTokenizer(code));\n            };\n\n            test('var', [\n                {\n                    type: 'keyword',\n                    value: 'var'\n                }\n            ]);\n\n            test('0.99', [\n                {\n                    type: 'number',\n                    value: '0.99'\n                }\n            ]);\n\n            test('\"value\"', [\n                {\n                    type: 'string',\n                    value: '\"value\"',\n                    closed: true\n                }\n            ]);\n\n            test('/*value*/', [\n                {\n                    type: 'comment',\n                    value: '/*value*/',\n                    closed: true\n                }\n            ]);\n\n            test('=>', [\n                {\n                    type: 'punctuator',\n                    value: '=>'\n                }\n            ]);\n\n            test('#', [\n                {\n                    type: 'invalid',\n                    value: '#'\n                }\n            ]);\n\n            test('@', [\n                {\n                    type: 'invalid',\n                    value: '@'\n                }\n            ]);\n\n            test('a.b.c+d', [\n                {\n                    type: 'name',\n                    value: 'a'\n                },\n                {\n                    type: 'punctuator',\n                    value: '.'\n                },\n                {\n                    type: 'name',\n                    value: 'b'\n                },\n                {\n                    type: 'punctuator',\n                    value: '.'\n                },\n                {\n                    type: 'name',\n                    value: 'c'\n                },\n                {\n                    type: 'punctuator',\n                    value: '+'\n                },\n                {\n                    type: 'name',\n                    value: 'd'\n                }\n            ]);\n\n            test('[...a][b]', [\n                {\n                    type: 'punctuator',\n                    value: '['\n                },\n                {\n                    type: 'punctuator',\n                    value: '...'\n                },\n                {\n                    type: 'name',\n                    value: 'a'\n                },\n                {\n                    type: 'punctuator',\n                    value: ']'\n                },\n                {\n                    type: 'punctuator',\n                    value: '['\n                },\n                {\n                    type: 'name',\n                    value: 'b'\n                },\n                {\n                    type: 'punctuator',\n                    value: ']'\n                }\n            ]);\n\n            test('@if a + b === 0', [\n                {\n                    type: 'invalid',\n                    value: '@'\n                },\n                {\n                    type: 'keyword',\n                    value: 'if'\n                },\n                {\n                    type: 'whitespace',\n                    value: ' '\n                },\n                {\n                    type: 'name',\n                    value: 'a'\n                },\n                {\n                    type: 'whitespace',\n                    value: ' '\n                },\n                {\n                    type: 'punctuator',\n                    value: '+'\n                },\n                {\n                    type: 'whitespace',\n                    value: ' '\n                },\n                {\n                    type: 'name',\n                    value: 'b'\n                },\n                {\n                    type: 'whitespace',\n                    value: ' '\n                },\n                {\n                    type: 'punctuator',\n                    value: '==='\n                },\n                {\n                    type: 'whitespace',\n                    value: ' '\n                },\n                {\n                    type: 'number',\n                    value: '0'\n                }\n            ]);\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/index.js",
    "content": "const assert = require('assert');\nconst compile = require('../../src/compile/index');\nconst tplTokenizer = require('../../src/compile/tpl-tokenizer');\nconst defaults = require('../../src/compile/defaults');\nconst onerror = defaults.onerror;\nconst path = require('path');\n\nlet render, data, result;\n\nmodule.exports = {\n    before: () => {\n        defaults.onerror = () => {\n            return () => '{Template Error}';\n        };\n    },\n\n    after: () => {\n        defaults.onerror = onerror;\n    },\n\n    'rule.native': {\n        output: () => {\n            render = compile('hello <%=value%>.');\n            data = {\n                value: 'aui'\n            };\n            result = render(data);\n            assert.deepEqual('hello aui.', result);\n\n            render = compile('hello <%=值%>.');\n            data = {\n                值: 'aui'\n            };\n            result = render(data);\n            assert.deepEqual('hello aui.', result);\n\n            render = compile('hello <%=value%>.');\n            data = {\n                value: '<aui>'\n            };\n            result = render(data);\n            assert.deepEqual('hello &#60;aui&#62;.', result);\n\n            render = compile('hello <%-value%>.');\n            data = {\n                value: '<aui>'\n            };\n            result = render(data);\n            assert.deepEqual('hello <aui>.', result);\n\n            render = compile(`<%\\nprint('hello > world')\\n%>`);\n            data = {};\n            result = render(data);\n            assert.deepEqual('hello > world', result);\n\n            // todo empty\n        },\n\n        block: () => {\n            render = compile('<% block(function(){ %>hello <%= value %>.<% }) %>', {\n                bail: true\n            });\n            data = {\n                value: 'aui'\n            };\n            result = render(data);\n            assert.deepEqual('hello aui.', result);\n        },\n\n        'syntax compat: art-template@v3': () => {\n            render = compile('<%== value %>');\n            data = {\n                value: '<aui>'\n            };\n            result = render(data);\n            assert.deepEqual('<aui>', result);\n\n            render = compile('<%=# value %>');\n            data = {\n                value: '<aui>'\n            };\n            result = render(data);\n            assert.deepEqual('<aui>', result);\n        },\n\n        'syntax compat: ejs': () => {\n            render = compile('<%# value %>');\n            data = {\n                value: 'aui'\n            };\n            result = render(data);\n            assert.deepEqual('', result);\n\n            render = compile('<%= value -%>');\n            data = {\n                value: 'aui'\n            };\n            result = render(data);\n            assert.deepEqual('aui', result);\n        }\n    },\n\n    'rule.art': {\n        output: () => {\n            render = compile('hello');\n            data = {};\n            result = render(data);\n            assert.deepEqual('hello', result);\n\n            render = compile('hello, {{value}}.');\n            data = {\n                value: 'world'\n            };\n            result = render(data);\n            assert.deepEqual('hello, world.', result);\n\n            render = compile('{{value}}');\n            data = {\n                value: '<>'\n            };\n            result = render(data);\n            assert.deepEqual('&#60;&#62;', result);\n\n            render = compile('{{@value}}');\n            data = {\n                value: '<>'\n            };\n            result = render(data);\n            assert.deepEqual('<>', result);\n\n            render = compile('{{a + b + c}}');\n            data = {\n                a: 0,\n                b: 1,\n                c: 2\n            };\n            result = render(data);\n            assert.deepEqual('3', result);\n\n            render = compile('{{a ? b : c}}');\n            data = {\n                a: 0,\n                b: 1,\n                c: 2\n            };\n            result = render(data);\n            assert.deepEqual('2', result);\n\n            render = compile('{{a || b || c}}');\n            data = {\n                a: 0,\n                b: 1,\n                c: 2\n            };\n            result = render(data);\n            assert.deepEqual('1', result);\n        },\n\n        'syntax compat: art-template@v3': () => {\n            render = compile('{{#value}}');\n            data = {\n                value: '<>'\n            };\n            result = render(data);\n            assert.deepEqual('<>', result);\n        },\n\n        filter: () => {\n            const dateFormat = (date, format) => {\n                date = new Date(date);\n                const map = {\n                    // 月份\n                    M: date.getMonth() + 1,\n                    // 日\n                    d: date.getDate(),\n                    // 小时\n                    h: date.getHours(),\n                    // 分\n                    m: date.getMinutes(),\n                    // 秒\n                    s: date.getSeconds(),\n                    // 季度\n                    q: Math.floor((date.getMonth() + 3) / 3),\n                    // 毫秒\n                    S: date.getMilliseconds()\n                };\n                format = format.replace(/([yMdhmsqS])+/g, (all, t) => {\n                    let v = map[t];\n                    if (v !== undefined) {\n                        if (all.length > 1) {\n                            v = '0' + v;\n                            v = v.substr(v.length - 2);\n                        }\n                        return v;\n                    } else if (t === 'y') {\n                        return (date.getFullYear() + '').substr(4 - all.length);\n                    }\n                    return all;\n                });\n                return format;\n            };\n\n            const brackets = string => `『${string}』`;\n            const imports = Object.assign({}, defaults.imports, {\n                dateFormat,\n                brackets\n            });\n            const options = {\n                imports\n            };\n\n            const test = (code, data, result, options = {}) => {\n                const render = compile(code, options);\n                assert.deepEqual(result, render(data));\n            };\n\n            test(`{{print 'hello' '-' 'world'}}`, {}, `hello-world`, options);\n            test(\n                `{{value | brackets}}`,\n                {\n                    value: '糖饼'\n                },\n                '『糖饼』',\n                options\n            );\n            test(\n                `{{value.name | brackets}}`,\n                {\n                    value: {\n                        name: '糖饼'\n                    }\n                },\n                '『糖饼』',\n                options\n            );\n            test(\n                `{{time | dateFormat 'yyyy-MM-dd'}}`,\n                {\n                    time: 1491566794863\n                },\n                `2017-04-07`,\n                options\n            );\n            test(\n                `{{time|dateFormat 'yyyy-MM-dd'}}`,\n                {\n                    time: 1491566794863\n                },\n                `2017-04-07`,\n                options\n            );\n            test(\n                `{{time | dateFormat 'yyyy-MM-dd' | brackets}}`,\n                {\n                    time: 1491566794863\n                },\n                `『2017-04-07』`,\n                options\n            );\n            test(\n                `{{time * 1000 | dateFormat 'yyyy-MM-dd'}}`,\n                {\n                    time: 1491566794\n                },\n                `2017-04-07`,\n                options\n            );\n            test(`{{3.14 | parseInt}}`, {}, `3`, options);\n            test(\n                `{{time | dateFormat:'yyyy-MM-dd'}}`,\n                {\n                    time: 1491566794863\n                },\n                `2017-04-07`,\n                options\n            ); // ... v3 compat ...\n        },\n\n        include: () => {\n            compile('#title: {{title}}', {\n                root: '/',\n                filename: '/header.html',\n                minimize: false\n            });\n\n            render = compile(`{{include 'header.html'}}\\ncontent: {{content}}`, {\n                minimize: false,\n                bail: true\n            });\n            data = {\n                title: 'hello',\n                content: 'world'\n            };\n            result = render(data);\n            assert.deepEqual(`#title: hello\\ncontent: world`, result);\n\n            render = compile(`{{include file.header}}\\ncontent: {{content}}`, {\n                minimize: false\n            });\n            data = {\n                title: 'hello',\n                content: 'world',\n                file: {\n                    header: 'header.html'\n                }\n            };\n            result = render(data);\n            assert.deepEqual(`#title: hello\\ncontent: world`, result);\n\n            render = compile(`{{include './header.html'}}\\ncontent: {{content}}`, {\n                minimize: false\n            });\n            data = {\n                title: 'hello',\n                content: 'world'\n            };\n            result = render(data);\n            assert.deepEqual(`#title: hello\\ncontent: world`, result);\n\n            render = compile(`{{include 'header.html' sub}}\\ncontent: {{content}}`, {\n                minimize: false\n            });\n            data = {\n                title: 'hello',\n                content: 'world',\n                sub: {\n                    title: '糖饼'\n                }\n            };\n            result = render(data);\n            assert.deepEqual(`#title: 糖饼\\ncontent: world`, result);\n\n            render = compile(`{{@include('header.html', {title: '糖饼'})}}\\ncontent: {{content}}`, {\n                bail: true,\n                minimize: false\n            });\n            data = {\n                title: 'hello',\n                content: 'world'\n            };\n            result = render(data);\n            assert.deepEqual(`#title: 糖饼\\ncontent: world`, result);\n\n            render = compile({\n                filename: path.resolve(\n                    __dirname,\n                    '..',\n                    '..',\n                    'example',\n                    'node-include',\n                    'index.art'\n                ),\n                minimize: true\n            });\n            data = {\n                title: 'My Page'\n            };\n            result = render(data);\n            assert.equal(true, result.indexOf('<title>My Page</title>') > -1);\n            assert.equal(true, result.indexOf('</head>') > -1);\n            assert.equal(false, /<\\/html>.+/.test(result));\n        },\n\n        layout: () => {\n            render = compile({\n                filename: path.resolve(\n                    __dirname,\n                    '..',\n                    '..',\n                    'example',\n                    'node-layout',\n                    'index.art'\n                ),\n                minimize: true,\n                bail: true\n            });\n            data = {\n                title: 'My Page'\n            };\n            result = render(data);\n            assert.equal(true, result.indexOf('<title>My Page</title>') > -1);\n            assert.equal(true, result.indexOf('</head>') > -1);\n        },\n\n        echo: () => {\n            render = compile('{{echo 2017}}');\n            data = {};\n            result = render(data);\n            assert.deepEqual('2017', result);\n            render = compile('{{echo value}}');\n            data = {\n                value: 'hello'\n            };\n            result = render(data);\n            assert.deepEqual('hello', result);\n        },\n\n        each: () => {\n            render = compile('{{each}}{{$index}}{{$value}}{{/each}}');\n            data = ['a', 'b', 'c'];\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n            render = compile('{{each}}{{$index}}{{$value}}{{/each}}');\n            data = {\n                a: 1,\n                b: 2,\n                c: 3\n            };\n            result = render(data);\n            assert.deepEqual('a1b2c3', result);\n\n            render = compile('{{each list}}{{$index}}{{$value}}{{/each}}');\n            data = {\n                list: ['a', 'b', 'c']\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n\n            render = compile('{{each list val}}{{$index}}{{val}}{{/each}}');\n            data = {\n                list: ['a', 'b', 'c']\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n\n            render = compile('{{each list val key}}{{key}}{{val}}{{/each}}');\n            data = {\n                list: ['a', 'b', 'c']\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n\n            render = compile('{{each   list   val    key}}{{key}}{{val}}{{/each}}');\n            data = {\n                list: ['a', 'b', 'c']\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n\n            render = compile('{{each list.data val key}}{{key}}{{val}}{{/each}}');\n            data = {\n                list: {\n                    data: ['a', 'b', 'c']\n                }\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n\n            // ... v3 compat ...\n            render = compile('{{each list as val}}{{$index}}{{val}}{{/each}}');\n            data = {\n                list: ['a', 'b', 'c']\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n            render = compile('{{each list as val key}}{{key}}{{val}}{{/each}}');\n            data = {\n                list: ['a', 'b', 'c']\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n\n            // 空格兼容\n            render = compile('{{ each list.data val key }}{{key}}{{val}}{{ /each }}');\n            data = {\n                list: {\n                    data: ['a', 'b', 'c']\n                }\n            };\n            result = render(data);\n            assert.deepEqual('0a1b2c', result);\n        },\n\n        if: () => {\n            render = compile('{{if value}}hello world{{/if}}');\n            data = {\n                value: true\n            };\n            result = render(data);\n            assert.deepEqual('hello world', result);\n\n            render = compile('{{if a.b}}hello world{{/if}}');\n            data = {\n                a: {\n                    b: true\n                }\n            };\n            result = render(data);\n            assert.deepEqual('hello world', result);\n\n            render = compile('{{if a.b + 1}}hello world{{/if}}');\n            data = {\n                a: {\n                    b: 1\n                }\n            };\n            result = render(data);\n            assert.deepEqual('hello world', result);\n\n            render = compile('{{if value}}hello world{{else}}hello 糖饼{{/if}}');\n            data = {\n                value: false\n            };\n            result = render(data);\n            assert.deepEqual('hello 糖饼', result);\n\n            render = compile('{{if value !== false}}hello world{{else}}hello 糖饼{{/if}}');\n            data = {\n                value: false\n            };\n            result = render(data);\n            assert.deepEqual('hello 糖饼', result);\n\n            render = compile('{{if value!==false}}hello world{{else}}hello 糖饼{{/if}}');\n            data = {\n                value: false\n            };\n            result = render(data);\n            assert.deepEqual('hello 糖饼', result);\n\n            render = compile('{{if a + b === 3}}hello world{{/if}}');\n            data = {\n                a: 1,\n                b: 2\n            };\n            result = render(data);\n            assert.deepEqual('hello world', result);\n\n            render = compile('{{if a}}hello world{{else if b}}😊{{/if}}');\n            data = {\n                a: 0,\n                b: 2\n            };\n            result = render(data);\n            assert.deepEqual('😊', result);\n            render = compile('{{if a}}hello world{{else if b}}😊{{/if}}');\n            data = {\n                a: 0,\n                b: 0\n            };\n            result = render(data);\n            assert.deepEqual('', result);\n        },\n        set: () => {\n            render = compile('{{set value=\"😊\"}}{{value}}');\n            data = {};\n            result = render(data);\n            assert.deepEqual('😊', result);\n        }\n    },\n    options: {\n        minimize: {\n            basic: () => {\n                const render = compile('<div>     </div>\\n     <%=value%>', {\n                    minimize: true\n                });\n                assert.deepEqual(\n                    '<div></div> aui',\n                    render({\n                        value: 'aui'\n                    })\n                );\n            },\n            'Do not compress unclosed tags': () => {\n                const render = compile('<div>x</div>   <a href=\"{{url}}\">link</a>   <div', {\n                    minimize: true\n                });\n                assert.deepEqual(\n                    '<div>x</div>   <a href=\"###\">link</a>   <div',\n                    render({\n                        url: '###'\n                    })\n                );\n            },\n            'Not compressed \"pre\"': () => {\n                let render;\n                render = compile('<pre>\\n\\n\\n</pre>{{value}}', {\n                    minimize: true\n                });\n                assert.deepEqual(\n                    '<pre>\\n\\n\\n</pre>aui',\n                    render({\n                        value: 'aui'\n                    })\n                );\n\n                // TODO\n                // render = compile('<pre>\\n<span></span>\\n<%=value%></pre>', {\n                //     minimize: true\n                // });\n                // assert.deepEqual('<pre>\\n<span></span>\\naui</pre>', render({\n                //     value: 'aui'\n                // }));\n            },\n            'Not compressed \"textarea\"': () => {\n                let render;\n                render = compile('<textarea>\\n\\n\\n</textarea>{{value}}', {\n                    minimize: true\n                });\n                assert.deepEqual(\n                    '<textarea>\\n\\n\\n</textarea>aui',\n                    render({\n                        value: 'aui'\n                    })\n                );\n            }\n        },\n        rules: () => {\n            const source = 'hello ${name} <%=name%>';\n            const options = {\n                rules: [\n                    {\n                        test: /\\${([\\w\\W]*?)}/,\n                        use: (match, code) => {\n                            return {\n                                code,\n                                output: tplTokenizer.TYPE_ESCAPE\n                            };\n                        }\n                    }\n                ]\n            };\n            const render = compile(source, options);\n            assert.deepEqual(\n                'hello aui <%=name%>',\n                render({\n                    name: 'aui'\n                })\n            );\n        },\n        filename: () => {\n            let render, html;\n            render = compile({\n                filename: path.resolve(__dirname, '..', 'res', 'file')\n            });\n            html = render({});\n            assert.deepEqual('hello world', html);\n            render = compile({\n                extname: '.html',\n                filename: path.resolve(__dirname, '..', 'res', 'file')\n            });\n            html = render({});\n            assert.deepEqual('hello world', html);\n        },\n        'include: extend options': () => {\n            let render, html;\n            render = compile({\n                bail: true,\n                filename: path.resolve(__dirname, '..', 'res', 'extend-options', 'file'),\n                rules: [\n                    {\n                        test: /\\${([\\w\\W]*?)}/,\n                        use: function(match, code) {\n                            return {\n                                code: code,\n                                output: false\n                            };\n                        }\n                    }\n                ]\n            });\n            html = render({\n                value: 'hello world'\n            });\n            assert.deepEqual('hello world', html);\n            render = compile({\n                bail: true,\n                filename: path.resolve(__dirname, '..', 'res', 'extend-options', 'file2')\n            });\n            html = render({\n                value: 'hello world'\n            });\n            assert.deepEqual('${value}hello world', html);\n        },\n        imports: () => {\n            const render = compile('<%= $imports.stringify(value) %>', {\n                bail: true,\n                imports: {\n                    stringify: JSON.stringify,\n                    log: console.log\n                }\n            });\n            assert.deepEqual(\n                '&#34;hello&#34;',\n                render({\n                    value: 'hello'\n                })\n            );\n        }\n    },\n    'rule.mix': {},\n    errors: {\n        RuntimeError: {\n            error: () => {\n                const render = compile('<%=a.b.c%>', {\n                    bail: false\n                });\n                assert.deepEqual('{Template Error}', render({}));\n            },\n            'throw error': () => {\n                const filename = '/test.html';\n                const render = compile({\n                    filename,\n                    source: '<%=a.b.c%>',\n                    bail: true\n                });\n                try {\n                    render({});\n                } catch (e) {\n                    assert.deepEqual('TemplateError', e.name);\n                    assert.deepEqual(true, e.message.indexOf(filename) !== -1);\n                }\n            }\n        },\n        CompileError: {\n            error: () => {\n                let render;\n                render = compile('<%=a b c%>', {\n                    bail: false\n                });\n                assert.deepEqual('{Template Error}', render({}));\n                render = compile('{{a b c}}', {\n                    bail: false\n                });\n                assert.deepEqual('{Template Error}', render({}));\n            },\n            'throw error': () => {\n                let render;\n                try {\n                    render = compile('<%=a b c%>', {\n                        bail: true\n                    });\n                    render({});\n                } catch (e) {\n                    assert.deepEqual('TemplateError', e.name);\n                }\n                assert.deepEqual(undefined, render);\n            },\n            //             'error line': () => {\n            //                 const tpl = `<!--template-->\n            // {{if user}}\n            //   <h2>{{user.name}}</h2>\n            //   <ul>\n            //     {{each user.tags}}\n            //         <li>{{$value}} {{a b c d}}</li>\n            //     {{/each}}\n            //   </ul>\n            // {{/if}}`;\n            //                 let render;\n            //                 try {\n            //                     render = compile(tpl, {\n            //                         bail: true,\n            //                         minimize: false\n            //                     });\n            //                     render({});\n            //                 } catch (e) {\n            //                     assert.deepEqual(6, e.line);\n            //                 }\n            //                 assert.deepEqual(undefined, render);\n            //             },\n            'template not found': () => {\n                const render = compile({\n                    filename: '/404.html',\n                    bail: false\n                });\n                assert.deepEqual('{Template Error}', render({}));\n            },\n            'throw error: template not found': () => {\n                try {\n                    compile({\n                        filename: '/404.html',\n                        bail: true\n                    });\n                } catch (e) {\n                    assert.deepEqual(true, e.message.indexOf('template not found') !== -1);\n                }\n            }\n        }\n    },\n    toString: {\n        'compile to string': () => {\n            const render = compile('<%=value%>');\n            assert.deepEqual('string', typeof render.toString());\n            assert.deepEqual(-1, render.toString.toString().indexOf('[native code]'));\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/runtime.js",
    "content": "const assert = require('assert');\nconst runtime = require('../../src/compile/runtime');\n\nmodule.exports = {\n    escape: {\n        basic: () => {\n            const test = (content, result) => {\n                assert.deepEqual(result, runtime.$escape(content));\n            };\n\n            // basic\n            test('string', 'string');\n            test(1, '1');\n            test(0, '0');\n            test(function() {\n                return 'value';\n            }, 'value');\n            test(() => 'value', 'value');\n            test(null, '');\n            test(undefined, '');\n            test([0, 1, 2, {}], JSON.stringify([0, 1, 2, {}]));\n            test({}, JSON.stringify({}));\n        },\n\n        html: () => {\n            const test = (content, result) => {\n                assert.deepEqual(result, runtime.$escape(content));\n            };\n\n            test('<', '&#60;');\n            test('>', '&#62;');\n            test('\"', '&#34;');\n            test(\"'\", '&#39;');\n            test('&', '&#38;');\n        },\n\n        mixing: () => {\n            const test = (content, result) => {\n                assert.deepEqual(result, runtime.$escape(content));\n            };\n\n            test('<img onerror=\"alert(0)\">', '&#60;img onerror=&#34;alert(0)&#34;&#62;');\n            test(\n                {\n                    '<': '&#60;',\n                    '>': '&#62;',\n                    '\"': '&#34;',\n                    \"'\": '&#39;',\n                    '&': '&#38;'\n                },\n                '{&#34;&#60;&#34;:&#34;&#38;#60;&#34;,&#34;&#62;&#34;:&#34;&#38;#62;&#34;,&#34;\\\\&#34;&#34;:&#34;&#38;#34;&#34;,&#34;&#39;&#34;:&#34;&#38;#39;&#34;,&#34;&#38;&#34;:&#34;&#38;#38;&#34;}'\n            );\n        }\n    }\n};\n"
  },
  {
    "path": "test/compile/tpl-tokenizer.js",
    "content": "const assert = require('assert');\nconst tplTokenizer = require('../../src/compile/tpl-tokenizer');\n\nmodule.exports = {\n    'type & value': {\n        [tplTokenizer.TYPE_STRING]: () => {\n            const result = tplTokenizer('value', []);\n            assert.deepEqual(\n                [\n                    {\n                        type: tplTokenizer.TYPE_STRING,\n                        value: 'value',\n                        line: 0,\n                        start: 0,\n                        end: 5,\n                        script: null\n                    }\n                ],\n                result\n            );\n        },\n\n        [tplTokenizer.TYPE_EXPRESSION]: () => {\n            const rule = {\n                test: /<%([\\w\\W]*?)%>/,\n                use: (match, code) => {\n                    return {\n                        code,\n                        output: false\n                    };\n                }\n            };\n            const result = tplTokenizer('<%value%>', [rule]);\n            assert.deepEqual(\n                [\n                    {\n                        type: tplTokenizer.TYPE_EXPRESSION,\n                        value: '<%value%>',\n                        line: 0,\n                        start: 0,\n                        end: 9,\n                        script: {\n                            code: 'value',\n                            output: false\n                        }\n                    }\n                ],\n                result\n            );\n        },\n\n        [tplTokenizer.TYPE_STRING + ' & ' + tplTokenizer.TYPE_EXPRESSION]: () => {\n            const rule = {\n                test: /<%([\\w\\W]*?)%>/,\n                use: (match, code) => {\n                    return {\n                        code,\n                        output: false\n                    };\n                }\n            };\n            const result = tplTokenizer('hello, <%value%>', [rule]);\n            assert.deepEqual(\n                [\n                    {\n                        type: tplTokenizer.TYPE_STRING,\n                        value: 'hello, ',\n                        line: 0,\n                        start: 0,\n                        end: 7,\n                        script: null\n                    },\n                    {\n                        type: tplTokenizer.TYPE_EXPRESSION,\n                        value: '<%value%>',\n                        line: 0,\n                        start: 7,\n                        end: 16,\n                        script: {\n                            code: 'value',\n                            output: false\n                        }\n                    }\n                ],\n                result\n            );\n        }\n    },\n\n    'line & start & end': {\n        'check that the values are correct': () => {\n            let result;\n            const rules = [\n                {\n                    test: /<%([\\w\\W]*?)%>/,\n                    use: (match, code) => {\n                        return {\n                            code,\n                            output: false\n                        };\n                    }\n                },\n                {\n                    test: /\\${([\\w\\W]*?)}/,\n                    use: (match, code) => {\n                        return {\n                            code,\n                            output: 'escape'\n                        };\n                    }\n                }\n            ];\n\n            result = tplTokenizer('hello,\\n <%value%>', rules);\n            assert.deepEqual(\n                [\n                    {\n                        type: tplTokenizer.TYPE_STRING,\n                        value: 'hello,\\n ',\n                        line: 0,\n                        start: 0,\n                        end: 8,\n                        script: null\n                    },\n                    {\n                        type: tplTokenizer.TYPE_EXPRESSION,\n                        value: '<%value%>',\n                        line: 1,\n                        start: 1,\n                        end: 10,\n                        script: {\n                            code: 'value',\n                            output: false\n                        }\n                    }\n                ],\n                result\n            );\n\n            result = tplTokenizer('hello,\\n <%\\nvalue\\n%>\\nxx${abc}', rules);\n            assert.deepEqual(\n                [\n                    {\n                        type: tplTokenizer.TYPE_STRING,\n                        value: 'hello,\\n ',\n                        line: 0,\n                        start: 0,\n                        end: 8,\n                        script: null\n                    },\n                    {\n                        type: tplTokenizer.TYPE_EXPRESSION,\n                        value: '<%\\nvalue\\n%>',\n                        line: 1,\n                        start: 1,\n                        end: 12,\n                        script: {\n                            code: '\\nvalue\\n',\n                            output: false\n                        }\n                    },\n                    {\n                        type: tplTokenizer.TYPE_STRING,\n                        value: '\\nxx',\n                        line: 3,\n                        start: 2,\n                        end: 5,\n                        script: null\n                    },\n                    {\n                        type: tplTokenizer.TYPE_EXPRESSION,\n                        value: '${abc}',\n                        line: 4,\n                        start: 2,\n                        end: 8,\n                        script: {\n                            code: 'abc',\n                            output: 'escape'\n                        }\n                    }\n                ],\n                result\n            );\n        }\n    }\n};\n"
  },
  {
    "path": "test/index.js",
    "content": "const assert = require('assert');\nconst template = require('../src/index');\nconst defaults = require('../src/compile/defaults');\nconst path = require('path');\n\nconst root = defaults.root;\n\nmodule.exports = {\n    before: () => {\n        console.log('#index');\n    },\n\n    template: {\n        render: () => {\n            const html = template(__dirname + '/res/template.file.html', {});\n            assert.deepEqual('hello world', html);\n        },\n\n        compile: () => {\n            defaults.root = path.join(__dirname, 'res');\n            const render = template('template.file.html');\n            const html = render({});\n            assert.deepEqual('hello world', html);\n            defaults.root = root;\n        },\n\n        include: () => {\n            defaults.root = path.join(__dirname, 'res');\n            const html = template('index/index.html', { name: 'aui' });\n            assert.deepEqual(true, html.indexOf('aui') !== -1);\n            assert.deepEqual(true, html.indexOf('糖饼') !== -1);\n            defaults.root = root;\n        },\n\n        cache: () => {\n            template('/index.html', 'hi, <%=value%>.');\n            const html = template('/index.html', { value: 'aui' });\n            assert.deepEqual('hi, aui.', html);\n        },\n\n        nestedBlockUseActualValue: () => {\n            defaults.root = path.join(__dirname, 'res');\n            const html = template('nested-block/index.art', { hello: 'hello' });\n            assert.deepEqual('hello', html);\n            defaults.root = root;\n        },\n\n        nestedBlockUseDefaultValue: () => {\n            defaults.root = path.join(__dirname, 'res');\n            const html = template('nested-block/default.art', {});\n            assert.deepEqual('default', html);\n            defaults.root = root;\n        }\n    }\n};\n"
  },
  {
    "path": "test/node.js",
    "content": "const assert = require('assert');\nconst template = require('../');\nconst defaults = template.defaults;\nconst path = require('path');\nconst resetBail = defaults.bail;\nconst onerror = defaults.onerror;\n\nmodule.exports = {\n    before: () => {\n        console.log('#node');\n\n        require.extensions['.html'] = template.extension;\n        require.extensions['.tpl'] = template.extension;\n\n        defaults.onerror = () => {\n            return () => '{Template Error}';\n        };\n    },\n\n    after: () => {\n        defaults.onerror = onerror;\n    },\n\n    extension: {\n        'require .art': () => {\n            const render = require(path.join(__dirname, 'res', 'file'));\n            assert.deepEqual('hello world', render({}));\n        },\n\n        'require .html': () => {\n            const render = require(path.join(__dirname, 'res', 'extension.file.html'));\n            assert.deepEqual('hello world', render({}));\n        },\n\n        'require .tpl': () => {\n            const render = require(path.join(__dirname, 'res', 'extension.file.tpl'));\n            assert.deepEqual('hello world', render({}));\n        },\n\n        'CompileError: bail=false': () => {\n            defaults.bail = false;\n            const render = require(path.join(__dirname, 'res', 'extension.compile-error.tpl'));\n            assert.deepEqual('{Template Error}', render({}));\n            defaults.bail = resetBail;\n        },\n\n        'CompileError: bail=true': () => {\n            defaults.bail = true;\n            let runder;\n            const filename = path.join(__dirname, './res/extension.compile-error.2.tpl');\n\n            try {\n                runder = require(filename);\n            } catch (e) {\n                assert.deepEqual('TemplateError', e.name);\n                assert.deepEqual(true, e.message.indexOf(filename) !== -1);\n            }\n\n            assert.deepEqual('undefined', typeof runder);\n            defaults.bail = resetBail;\n        },\n\n        'RuntimeError: bail=false': () => {\n            defaults.bail = false;\n            const render = require(path.join(__dirname, 'res', 'extension.runtime-error.tpl'));\n            assert.deepEqual('{Template Error}', render({}));\n            defaults.bail = resetBail;\n        },\n\n        'RuntimeError: bail=true': () => {\n            defaults.bail = true;\n            const filename = path.join(__dirname, 'res', 'extension.runtime-error.2.tpl');\n            try {\n                const render = require(filename);\n                render({});\n            } catch (e) {\n                assert.deepEqual('TemplateError', e.name);\n                assert.deepEqual(true, e.message.indexOf(filename) !== -1);\n            }\n            defaults.bail = resetBail;\n        }\n    }\n};\n"
  },
  {
    "path": "test/res/extend-options/file.art",
    "content": "${include('./include')}"
  },
  {
    "path": "test/res/extend-options/file2.art",
    "content": "${value}{{value}}"
  },
  {
    "path": "test/res/extend-options/include.art",
    "content": "${print(value)}"
  },
  {
    "path": "test/res/extension.compile-error.2.tpl",
    "content": "<% if (a b c) { %>"
  },
  {
    "path": "test/res/extension.compile-error.tpl",
    "content": "<% if (a b c) { %>"
  },
  {
    "path": "test/res/extension.file.html",
    "content": "hello world"
  },
  {
    "path": "test/res/extension.file.tpl",
    "content": "hello world"
  },
  {
    "path": "test/res/extension.runtime-error.2.tpl",
    "content": "<%= a.b.c %>"
  },
  {
    "path": "test/res/extension.runtime-error.tpl",
    "content": "<%= a.b.c %>"
  },
  {
    "path": "test/res/file.art",
    "content": "hello world"
  },
  {
    "path": "test/res/file.html",
    "content": "hello world"
  },
  {
    "path": "test/res/index/include.html",
    "content": "hello {{name}}"
  },
  {
    "path": "test/res/index/index.html",
    "content": "{{include './include.html'}}\n<% include('./include.html', {name: '糖饼'}) %>"
  },
  {
    "path": "test/res/nested-block/base-layout.art",
    "content": "{{block 'content'}}{{/block}}"
  },
  {
    "path": "test/res/nested-block/default.art",
    "content": "{{extend './layout.art'}}"
  },
  {
    "path": "test/res/nested-block/index.art",
    "content": "{{extend './layout.art'}}\n{{block 'inner'}}{{hello}}{{/block}}"
  },
  {
    "path": "test/res/nested-block/layout.art",
    "content": "{{extend './base-layout.art'}}\n{{block 'content'}}{{block 'inner'}}default{{/block}}{{/block}}"
  },
  {
    "path": "test/res/template.file.html",
    "content": "hello world"
  },
  {
    "path": "webpack.config.js",
    "content": "const path = require('path');\nconst webpack = require('webpack');\nconst packageInfo = require('./package.json');\nconst version = packageInfo.version;\n\nmodule.exports = {\n    target: 'web',\n    entry: {\n        'template-web': path.resolve(__dirname, 'lib', 'index')\n    },\n    output: {\n        path: path.resolve(__dirname, 'lib'),\n        filename: '[name].js',\n        library: 'template',\n        libraryTarget: 'umd'\n    },\n    node: {\n        fs: 'empty',\n        path: 'empty',\n        process: false\n    },\n    resolve: {\n        alias: {\n            'html-minifier': 'node-noop'\n        }\n    },\n    module: {\n        rules: [\n            {\n                test: /\\.js$/,\n                use: [\n                    {\n                        loader: 'eslint-loader'\n                    }\n                ]\n            }\n        ]\n    },\n    devtool: 'source-map',\n    plugins: [\n        new webpack.BannerPlugin(\n            `art-template@${version} for browser | https://github.com/aui/art-template`\n        ),\n        new webpack.optimize.ModuleConcatenationPlugin(),\n        process.env.NODE_ENV === 'production'\n            ? new webpack.optimize.UglifyJsPlugin({\n                  compress: {\n                      warnings: false,\n                      screw_ie8: false\n                  },\n                  mangle: {\n                      screw_ie8: false\n                  },\n                  output: {\n                      screw_ie8: false\n                  }\n              })\n            : () => {}\n    ]\n};\n"
  }
]