pinkman 0.9.9.8 → 0.9.9.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +12 -12
  3. data/app/assets/javascripts/pinkman_base/collection.coffee +48 -20
  4. data/app/assets/javascripts/pinkman_base/common.coffee +38 -9
  5. data/app/assets/javascripts/pinkman_base/controller.coffee +134 -36
  6. data/app/assets/javascripts/pinkman_base/mixins.coffee +8 -4
  7. data/app/assets/javascripts/pinkman_base/object.coffee.erb +15 -13
  8. data/app/assets/javascripts/pinkman_base/pinkman.coffee +16 -0
  9. data/app/assets/javascripts/pinkman_base/render.coffee.erb +17 -5
  10. data/app/assets/javascripts/pinkman_base/router.coffee +95 -46
  11. data/app/assets/javascripts/pinkman_base/tools.coffee +3 -3
  12. data/app/assets/stylesheets/_colors.scss +45 -0
  13. data/app/assets/stylesheets/_custom_colors.scss +7 -0
  14. data/app/assets/stylesheets/_mixins.scss +39 -0
  15. data/app/assets/stylesheets/_settings.scss +1 -0
  16. data/app/assets/stylesheets/pinkman/buttons.scss +15 -0
  17. data/app/assets/stylesheets/pinkman/colors.scss +99 -0
  18. data/app/assets/stylesheets/pinkman/containers.scss +15 -0
  19. data/app/assets/stylesheets/pinkman/elements.scss +33 -0
  20. data/app/assets/stylesheets/pinkman/forms.scss +89 -0
  21. data/app/assets/stylesheets/pinkman/grid.scss +120 -0
  22. data/app/assets/stylesheets/pinkman/imgs.scss +7 -0
  23. data/app/assets/stylesheets/pinkman/lists.scss +58 -0
  24. data/app/assets/stylesheets/pinkman/loaders.scss +495 -0
  25. data/app/assets/stylesheets/pinkman/margins.scss +65 -0
  26. data/app/assets/stylesheets/pinkman/portfolio.scss +59 -0
  27. data/app/assets/stylesheets/pinkman/pygments.css.erb +1 -0
  28. data/app/assets/stylesheets/pinkman/reset.scss +51 -0
  29. data/app/assets/stylesheets/pinkman/sector.scss +10 -0
  30. data/app/assets/stylesheets/pinkman/tables.scss +62 -0
  31. data/app/assets/stylesheets/pinkman/typo.scss +104 -0
  32. data/app/assets/stylesheets/pinkman.css +17 -0
  33. data/app/controllers/pinkman/pinkman_controller.rb +6 -0
  34. data/app/helpers/pinkman/pinkman_helper.rb +14 -0
  35. data/app/views/pinkman/_error_for.html.slim +4 -0
  36. data/app/views/pinkman/pinkman/_form_input.html.slim +4 -0
  37. data/app/views/pinkman/pinkman/_form_select.html.slim +13 -0
  38. data/app/views/pinkman/pinkman/_form_textarea.html.slim +4 -0
  39. data/app/views/pinkman/pinkman/hello.html.erb +53 -0
  40. data/config/routes.rb +7 -0
  41. data/lib/generators/pinkman/USAGE +60 -14
  42. data/lib/generators/pinkman/app_base_generator.rb +16 -4
  43. data/lib/generators/pinkman/controller_generator.rb +29 -0
  44. data/lib/generators/pinkman/crud_generator.rb +24 -0
  45. data/lib/generators/pinkman/initializer_generator.rb +12 -0
  46. data/lib/generators/pinkman/install_generator.rb +29 -2
  47. data/lib/generators/pinkman/model_generator.rb +2 -2
  48. data/lib/generators/pinkman/page_generator.rb +15 -0
  49. data/lib/generators/pinkman/route_generator.rb +40 -0
  50. data/lib/generators/pinkman/route_resource_generator.rb +40 -0
  51. data/lib/generators/pinkman/template_generator.rb +47 -0
  52. data/lib/generators/pinkman/templates/api.rb.erb +6 -6
  53. data/lib/generators/pinkman/templates/api_controller.rb +22 -18
  54. data/lib/generators/pinkman/templates/app.coffee.erb +1 -0
  55. data/lib/generators/pinkman/templates/app_app.coffee.erb +1 -0
  56. data/lib/generators/pinkman/templates/app_collection.coffee.erb +1 -1
  57. data/lib/generators/pinkman/templates/app_object.coffee.erb +1 -1
  58. data/lib/generators/pinkman/templates/app_router.coffee.erb +1 -0
  59. data/lib/generators/pinkman/templates/app_routes.coffee.erb +34 -0
  60. data/lib/generators/pinkman/templates/controller.coffee.erb +4 -0
  61. data/lib/generators/pinkman/templates/example.mixin.coffee.erb +32 -0
  62. data/lib/generators/pinkman/templates/hello.controller.coffee.erb +98 -0
  63. data/lib/generators/pinkman/templates/initializer.rb.erb +6 -0
  64. data/lib/generators/pinkman/templates/my.pinkman.app.js +70 -0
  65. data/lib/generators/pinkman/templates/pink_template.html.erb.erb +4 -0
  66. data/lib/generators/pinkman/templates/pink_template.html.haml.erb +3 -0
  67. data/lib/generators/pinkman/templates/pink_template.html.slim.erb +3 -0
  68. data/lib/generators/pinkman/templates/serializer.rb.erb +6 -6
  69. data/lib/pinkman/base_helper.rb +15 -0
  70. data/lib/pinkman/form_helper/form_helpers.rb +65 -0
  71. data/lib/pinkman/form_helper.rb +36 -0
  72. data/lib/pinkman/serializer/base.rb +0 -1
  73. data/lib/pinkman/version.rb +1 -1
  74. data/lib/pinkman/views_helpers/collection_helper.rb +16 -0
  75. data/lib/pinkman/views_helpers/conditional_helper.rb +19 -0
  76. data/lib/pinkman/views_helpers/dispatcher.rb +27 -0
  77. data/lib/pinkman/views_helpers/form_helper.rb +63 -0
  78. data/lib/pinkman/views_helpers/template_helper.rb +65 -0
  79. data/lib/pinkman/views_helpers/writer_helper.rb +31 -0
  80. data/lib/pinkman/views_helpers.rb +71 -0
  81. data/lib/pinkman.rb +31 -5
  82. data/public/jquery.pinkman.min.js +4 -0
  83. data/public/pinkman.min.js +2 -29
  84. metadata +61 -4
  85. data/app/helpers/pinkman_helper.rb +0 -87
@@ -1,29 +1,2 @@
1
- /*!
2
-
3
- handlebars v4.0.5
4
-
5
- Copyright (C) 2011-2015 by Yehuda Katz
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
24
-
25
- @license
26
- */
27
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(){var t=y();return t.compile=function(e,n){return u.compile(e,n,t)},t.precompile=function(e,n){return u.precompile(e,n,t)},t.AST=l["default"],t.Compiler=u.Compiler,t.JavaScriptCompiler=h["default"],t.Parser=c.parser,t.parse=c.parse,t}var r=n(1)["default"];e.__esModule=!0;var o=n(2),s=r(o),a=n(21),l=r(a),c=n(22),u=n(27),p=n(28),h=r(p),f=n(25),d=r(f),m=n(20),g=r(m),y=s["default"].create,k=i();k.create=i,g["default"](k),k.Visitor=d["default"],k["default"]=k,e["default"]=k,t.exports=e["default"]},function(t,e){"use strict";e["default"]=function(t){return t&&t.__esModule?t:{"default":t}},e.__esModule=!0},function(t,e,n){"use strict";function i(){var t=new a.HandlebarsEnvironment;return f.extend(t,a),t.SafeString=c["default"],t.Exception=p["default"],t.Utils=f,t.escapeExpression=f.escapeExpression,t.VM=m,t.template=function(e){return m.template(e,t)},t}var r=n(3)["default"],o=n(1)["default"];e.__esModule=!0;var s=n(4),a=r(s),l=n(18),c=o(l),u=n(6),p=o(u),h=n(5),f=r(h),d=n(19),m=r(d),g=n(20),y=o(g),k=i();k.create=i,y["default"](k),k["default"]=k,e["default"]=k,t.exports=e["default"]},function(t,e){"use strict";e["default"]=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e},e.__esModule=!0},function(t,e,n){"use strict";function i(t,e,n){this.helpers=t||{},this.partials=e||{},this.decorators=n||{},l.registerDefaultHelpers(this),c.registerDefaultDecorators(this)}var r=n(1)["default"];e.__esModule=!0,e.HandlebarsEnvironment=i;var o=n(5),s=n(6),a=r(s),l=n(7),c=n(15),u=n(17),p=r(u);e.VERSION="4.0.5",e.COMPILER_REVISION=7;var h={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};e.REVISION_CHANGES=h;var f="[object Object]";i.prototype={constructor:i,logger:p["default"],log:p["default"].log,registerHelper:function(t,e){if(o.toString.call(t)===f){if(e)throw new a["default"]("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(o.toString.call(t)===f)o.extend(this.partials,t);else{if(void 0===e)throw new a["default"]('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,e){if(o.toString.call(t)===f){if(e)throw new a["default"]("Arg not supported with multiple decorators");o.extend(this.decorators,t)}else this.decorators[t]=e},unregisterDecorator:function(t){delete this.decorators[t]}};var d=p["default"].log;e.log=d,e.createFrame=o.createFrame,e.logger=p["default"]},function(t,e){"use strict";function n(t){return u[t]}function i(t){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],n)&&(t[n]=arguments[e][n]);return t}function r(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}function o(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return h.test(t)?t.replace(p,n):t}function s(t){return!t&&0!==t||!(!m(t)||0!==t.length)}function a(t){var e=i({},t);return e._parent=t,e}function l(t,e){return t.path=e,t}function c(t,e){return(t?t+".":"")+e}e.__esModule=!0,e.extend=i,e.indexOf=r,e.escapeExpression=o,e.isEmpty=s,e.createFrame=a,e.blockParams=l,e.appendContextPath=c;var u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},p=/[&<>"'`=]/g,h=/[&<>"'`=]/,f=Object.prototype.toString;e.toString=f;var d=function(t){return"function"==typeof t};d(/x/)&&(e.isFunction=d=function(t){return"function"==typeof t&&"[object Function]"===f.call(t)}),e.isFunction=d;var m=Array.isArray||function(t){return!(!t||"object"!=typeof t)&&"[object Array]"===f.call(t)};e.isArray=m},function(t,e){"use strict";function n(t,e){var r=e&&e.loc,o=undefined,s=undefined;r&&(o=r.start.line,s=r.start.column,t+=" - "+o+":"+s);for(var a=Error.prototype.constructor.call(this,t),l=0;l<i.length;l++)this[i[l]]=a[i[l]];Error.captureStackTrace&&Error.captureStackTrace(this,n),r&&(this.lineNumber=o,this.column=s)}e.__esModule=!0;var i=["description","fileName","lineNumber","message","name","number","stack"];n.prototype=new Error,e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function i(t){s["default"](t),l["default"](t),u["default"](t),h["default"](t),d["default"](t),g["default"](t),k["default"](t)}var r=n(1)["default"];e.__esModule=!0,e.registerDefaultHelpers=i;var o=n(8),s=r(o),a=n(9),l=r(a),c=n(10),u=r(c),p=n(11),h=r(p),f=n(12),d=r(f),m=n(13),g=r(m),y=n(14),k=r(y)},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e["default"]=function(t){t.registerHelper("blockHelperMissing",function(e,n){var r=n.inverse,o=n.fn;if(!0===e)return o(this);if(!1===e||null==e)return r(this);if(i.isArray(e))return e.length>0?(n.ids&&(n.ids=[n.name]),t.helpers.each(e,n)):r(this);if(n.data&&n.ids){var s=i.createFrame(n.data);s.contextPath=i.appendContextPath(n.data.contextPath,n.name),n={data:s}}return o(e,n)})},t.exports=e["default"]},function(t,e,n){"use strict";var i=n(1)["default"];e.__esModule=!0;var r=n(5),o=n(6),s=i(o);e["default"]=function(t){t.registerHelper("each",function(t,e){function n(e,n,o){c&&(c.key=e,c.index=n,c.first=0===n,c.last=!!o,u&&(c.contextPath=u+e)),l+=i(t[e],{data:c,blockParams:r.blockParams([t[e],e],[u+e,null])})}if(!e)throw new s["default"]("Must pass iterator to #each");var i=e.fn,o=e.inverse,a=0,l="",c=undefined,u=undefined;if(e.data&&e.ids&&(u=r.appendContextPath(e.data.contextPath,e.ids[0])+"."),r.isFunction(t)&&(t=t.call(this)),e.data&&(c=r.createFrame(e.data)),t&&"object"==typeof t)if(r.isArray(t))for(var p=t.length;a<p;a++)a in t&&n(a,a,a===t.length-1);else{var h=undefined;for(var f in t)t.hasOwnProperty(f)&&(h!==undefined&&n(h,a-1),h=f,a++);h!==undefined&&n(h,a-1,!0)}return 0===a&&(l=o(this)),l})},t.exports=e["default"]},function(t,e,n){"use strict";var i=n(1)["default"];e.__esModule=!0;var r=n(6),o=i(r);e["default"]=function(t){t.registerHelper("helperMissing",function(){if(1===arguments.length)return undefined;throw new o["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e["default"]},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e["default"]=function(t){t.registerHelper("if",function(t,e){return i.isFunction(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||i.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,n){return t.helpers["if"].call(this,e,{fn:n.inverse,inverse:n.fn,hash:n.hash})})},t.exports=e["default"]},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t){t.registerHelper("log",function(){for(var e=[undefined],n=arguments[arguments.length-1],i=0;i<arguments.length-1;i++)e.push(arguments[i]);var r=1;null!=n.hash.level?r=n.hash.level:n.data&&null!=n.data.level&&(r=n.data.level),e[0]=r,t.log.apply(t,e)})},t.exports=e["default"]},function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t){t.registerHelper("lookup",function(t,e){return t&&t[e]})},t.exports=e["default"]},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e["default"]=function(t){t.registerHelper("with",function(t,e){i.isFunction(t)&&(t=t.call(this));var n=e.fn;if(i.isEmpty(t))return e.inverse(this);var r=e.data;return e.data&&e.ids&&(r=i.createFrame(e.data),r.contextPath=i.appendContextPath(e.data.contextPath,e.ids[0])),n(t,{data:r,blockParams:i.blockParams([t],[r&&r.contextPath])})})},t.exports=e["default"]},function(t,e,n){"use strict";function i(t){s["default"](t)}var r=n(1)["default"];e.__esModule=!0,e.registerDefaultDecorators=i;var o=n(16),s=r(o)},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5);e["default"]=function(t){t.registerDecorator("inline",function(t,e,n,r){var o=t;return e.partials||(e.partials={},o=function(r,o){var s=n.partials;n.partials=i.extend({},s,e.partials);var a=t(r,o);return n.partials=s,a}),e.partials[r.args[0]]=r.fn,o})},t.exports=e["default"]},function(t,e,n){"use strict";e.__esModule=!0;var i=n(5),r={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if("string"==typeof t){var e=i.indexOf(r.methodMap,t.toLowerCase());t=e>=0?e:parseInt(t,10)}return t},log:function(t){if(t=r.lookupLevel(t),"undefined"!=typeof console&&r.lookupLevel(r.level)<=t){var e=r.methodMap[t];console[e]||(e="log");for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];console[e].apply(console,i)}}};e["default"]=r,t.exports=e["default"]},function(t,e){"use strict";function n(t){this.string=t}e.__esModule=!0,n.prototype.toString=n.prototype.toHTML=function(){return""+this.string},e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function i(t){var e=t&&t[0]||1,n=y.COMPILER_REVISION;if(e!==n){if(e<n){var i=y.REVISION_CHANGES[n],r=y.REVISION_CHANGES[e];throw new g["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+r+").")}throw new g["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function r(t,e){function n(n,i,r){r.hash&&(i=d.extend({},i,r.hash),r.ids&&(r.ids[0]=!0)),n=e.VM.resolvePartial.call(this,n,i,r);var o=e.VM.invokePartial.call(this,n,i,r);if(null==o&&e.compile&&(r.partials[r.name]=e.compile(n,t.compilerOptions,e),o=r.partials[r.name](i,r)),null!=o){if(r.indent){for(var s=o.split("\n"),a=0,l=s.length;a<l&&(s[a]||a+1!==l);a++)s[a]=r.indent+s[a];o=s.join("\n")}return o}throw new g["default"]("The partial "+r.name+" could not be compiled when running in runtime-only mode")}function i(e){function n(e){return""+t.main(r,e,r.helpers,r.partials,s,l,a)}var o=arguments.length<=1||arguments[1]===undefined?{}:arguments[1],s=o.data;i._setup(o),!o.partial&&t.useData&&(s=c(e,s));var a=undefined,l=t.useBlockParams?[]:undefined;return t.useDepths&&(a=o.depths?e!==o.depths[0]?[e].concat(o.depths):o.depths:[e]),(n=u(t.main,n,r,o.depths||[],s,l))(e,o)}if(!e)throw new g["default"]("No environment passed to template");if(!t||!t.main)throw new g["default"]("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r={strict:function(t,e){if(!(e in t))throw new g["default"]('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i]&&null!=t[i][e])return t[i][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:d.escapeExpression,invokePartial:n,fn:function(e){var n=t[e];return n.decorator=t[e+"_d"],n},programs:[],program:function(t,e,n,i,r){var s=this.programs[t],a=this.fn(t);return e||r||i||n?s=o(this,t,a,e,n,i,r):s||(s=this.programs[t]=o(this,t,a)),s},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var n=t||e;return t&&e&&t!==e&&(n=d.extend({},e,t)),n},noop:e.VM.noop,compilerInfo:t.compiler};return i.isTop=!0,i._setup=function(n){n.partial?(r.helpers=n.helpers,r.partials=n.partials,r.decorators=n.decorators):(r.helpers=r.merge(n.helpers,e.helpers),t.usePartial&&(r.partials=r.merge(n.partials,e.partials)),(t.usePartial||t.useDecorators)&&(r.decorators=r.merge(n.decorators,e.decorators)))},i._child=function(e,n,i,s){if(t.useBlockParams&&!i)throw new g["default"]("must pass block params");if(t.useDepths&&!s)throw new g["default"]("must pass parent depths");return o(r,e,t[e],n,0,i,s)},i}function o(t,e,n,i,r,o,s){function a(e){var r=arguments.length<=1||arguments[1]===undefined?{}:arguments[1],a=s;return s&&e!==s[0]&&(a=[e].concat(s)),n(t,e,t.helpers,t.partials,r.data||i,o&&[r.blockParams].concat(o),a)}return a=u(n,a,t,s,i,o),a.program=e,a.depth=s?s.length:0,a.blockParams=r||0,a}function s(t,e,n){return t?t.call||n.name||(n.name=t,t=n.partials[t]):t="@partial-block"===n.name?n.data["partial-block"]:n.partials[n.name],t}function a(t,e,n){n.partial=!0,n.ids&&(n.data.contextPath=n.ids[0]||n.data.contextPath);var i=undefined;if(n.fn&&n.fn!==l&&(n.data=y.createFrame(n.data),i=n.data["partial-block"]=n.fn,i.partials&&(n.partials=d.extend({},n.partials,i.partials))),t===undefined&&i&&(t=i),t===undefined)throw new g["default"]("The partial "+n.name+" could not be found");if(t instanceof Function)return t(e,n)}function l(){return""}function c(t,e){return e&&"root"in e||(e=e?y.createFrame(e):{},e.root=t),e}function u(t,e,n,i,r,o){if(t.decorator){var s={};e=t.decorator(e,s,n,i&&i[0],r,o,i),d.extend(e,s)}return e}var p=n(3)["default"],h=n(1)["default"];e.__esModule=!0,e.checkRevision=i,e.template=r,e.wrapProgram=o,e.resolvePartial=s,e.invokePartial=a,e.noop=l;var f=n(5),d=p(f),m=n(6),g=h(m),y=n(4)},function(t,e){(function(n){"use strict";e.__esModule=!0,e["default"]=function(t){var e=void 0!==n?n:window,i=e.Handlebars;t.noConflict=function(){return e.Handlebars===t&&(e.Handlebars=i),t}},t.exports=e["default"]}).call(e,function(){return this}())},function(t,e){"use strict";e.__esModule=!0;var n={helpers:{helperExpression:function(t){return"SubExpression"===t.type||("MustacheStatement"===t.type||"BlockStatement"===t.type)&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!n.helpers.scopedId(t)&&!t.depth}}};e["default"]=n,t.exports=e["default"]},function(t,e,n){"use strict";function i(t,e){return"Program"===t.type?t:(a["default"].yy=f,f.locInfo=function(t){return new f.SourceLocation(e&&e.srcName,t)},new c["default"](e).accept(a["default"].parse(t)))}var r=n(1)["default"],o=n(3)["default"];e.__esModule=!0,e.parse=i;var s=n(23),a=r(s),l=n(24),c=r(l),u=n(26),p=o(u),h=n(5);e.parser=a["default"];var f={};h.extend(f,p)},function(t,e){"use strict";var n=function(){function t(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_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},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,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]],performAction:function(t,e,n,i,r,o){var s=o.length-1;switch(r){case 1:return o[s-1];case 2:this.$=i.prepareProgram(o[s]);break;case 3:case 4:case 5:case 6:case 7:case 8:this.$=o[s];break;case 9:this.$={type:"CommentStatement",value:i.stripComment(o[s]),strip:i.stripFlags(o[s],o[s]),loc:i.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:o[s],value:o[s],loc:i.locInfo(this._$)};break;case 11:this.$=i.prepareRawBlock(o[s-2],o[s-1],o[s],this._$);break;case 12:this.$={path:o[s-3],params:o[s-2],hash:o[s-1]};break;case 13:this.$=i.prepareBlock(o[s-3],o[s-2],o[s-1],o[s],!1,this._$);break;case 14:this.$=i.prepareBlock(o[s-3],o[s-2],o[s-1],o[s],!0,this._$);break;case 15:this.$={open:o[s-5],path:o[s-4],params:o[s-3],hash:o[s-2],blockParams:o[s-1],strip:i.stripFlags(o[s-5],o[s])};break;case 16:case 17:this.$={path:o[s-4],params:o[s-3],hash:o[s-2],blockParams:o[s-1],strip:i.stripFlags(o[s-5],o[s])};break;case 18:this.$={strip:i.stripFlags(o[s-1],o[s-1]),program:o[s]};break;case 19:var a=i.prepareBlock(o[s-2],o[s-1],o[s],o[s],!1,this._$),l=i.prepareProgram([a],o[s-1].loc);l.chained=!0,this.$={strip:o[s-2].strip,program:l,chain:!0};break;case 20:this.$=o[s];break;case 21:this.$={path:o[s-1],strip:i.stripFlags(o[s-2],o[s])};break;case 22:case 23:this.$=i.prepareMustache(o[s-3],o[s-2],o[s-1],o[s-4],i.stripFlags(o[s-4],o[s]),this._$);break;case 24:this.$={type:"PartialStatement",name:o[s-3],params:o[s-2],hash:o[s-1],indent:"",strip:i.stripFlags(o[s-4],o[s]),loc:i.locInfo(this._$)};break;case 25:this.$=i.preparePartialBlock(o[s-2],o[s-1],o[s],this._$);break;case 26:this.$={path:o[s-3],params:o[s-2],hash:o[s-1],strip:i.stripFlags(o[s-4],o[s])};break;case 27:case 28:this.$=o[s];break;case 29:this.$={type:"SubExpression",path:o[s-3],params:o[s-2],hash:o[s-1],loc:i.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:o[s],loc:i.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:i.id(o[s-2]),value:o[s],loc:i.locInfo(this._$)};break;case 32:this.$=i.id(o[s-1]);break;case 33:case 34:this.$=o[s];break;case 35:this.$={type:"StringLiteral",value:o[s],original:o[s],loc:i.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(o[s]),original:Number(o[s]),loc:i.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===o[s],original:"true"===o[s],loc:i.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:undefined,value:undefined,loc:i.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:i.locInfo(this._$)};break;case 40:case 41:this.$=o[s];break;case 42:this.$=i.preparePath(!0,o[s],this._$);break;case 43:this.$=i.preparePath(!1,o[s],this._$);break;case 44:o[s-2].push({part:i.id(o[s]),original:o[s],separator:o[s-1]}),this.$=o[s-2];break;case 45:this.$=[{part:i.id(o[s]),original:o[s]}];break;case 46:this.$=[];break;case 47:o[s-1].push(o[s]);break;case 48:this.$=[o[s]];break;case 49:o[s-1].push(o[s]);break;case 50:this.$=[];break;case 51:o[s-1].push(o[s]);break;case 58:this.$=[];break;case 59:o[s-1].push(o[s]);break;case 64:this.$=[];break;case 65:o[s-1].push(o[s]);break;case 70:this.$=[];break;case 71:o[s-1].push(o[s]);break;case 78:this.$=[];break;case 79:o[s-1].push(o[s]);break;case 82:this.$=[];break;case 83:o[s-1].push(o[s]);break;case 86:this.$=[];break;case 87:o[s-1].push(o[s]);break;case 90:this.$=[];break;case 91:o[s-1].push(o[s]);break;case 94:this.$=[];break;case 95:o[s-1].push(o[s]);break;case 98:this.$=[o[s]];break;case 99:o[s-1].push(o[s]);break;case 100:this.$=[o[s]];break;case 101:o[s-1].push(o[s])}},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]}],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]},parseError:function(t){throw new Error(t)},parse:function(t){function e(){var t;return t=n.lexer.lex()||1,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,i=[0],r=[null],o=[],s=this.table,a="",l=0,c=0,u=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var p=this.lexer.yylloc;o.push(p);var h=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,d,m,g,y,k,v,b,P,_={};;){if(m=i[i.length-1],this.defaultActions[m]?g=this.defaultActions[m]:(null!==f&&void 0!==f||(f=e()),
28
- g=s[m]&&s[m][f]),void 0===g||!g.length||!g[0]){var S="";if(!u){P=[];for(k in s[m])this.terminals_[k]&&k>2&&P.push("'"+this.terminals_[k]+"'");S=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(S,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:p,expected:P})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(g[0]){case 1:i.push(f),r.push(this.lexer.yytext),o.push(this.lexer.yylloc),i.push(g[1]),f=null,d?(f=d,d=null):(c=this.lexer.yyleng,a=this.lexer.yytext,l=this.lexer.yylineno,p=this.lexer.yylloc,u>0&&u--);break;case 2:if(v=this.productions_[g[1]][1],_.$=r[r.length-v],_._$={first_line:o[o.length-(v||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(v||1)].first_column,last_column:o[o.length-1].last_column},h&&(_._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(y=this.performAction.call(_,a,c,l,this.yy,g[1],r,o)))return y;v&&(i=i.slice(0,-1*v*2),r=r.slice(0,-1*v),o=o.slice(0,-1*v)),i.push(this.productions_[g[1]][0]),r.push(_.$),o.push(_._$),b=s[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},n=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,i,r;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),s=0;s<o.length&&(!(n=this._input.match(this.rules[o[s]]))||e&&!(n[0].length>e[0].length)||(e=n,i=s,this.options.flex));s++);return e?(r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,o[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t||void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return void 0!==t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,n){function i(t,n){return e.yytext=e.yytext.substr(t,e.yyleng-n)}switch(n){case 0:if("\\\\"===e.yytext.slice(-2)?(i(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(i(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(e.yytext=e.yytext.substr(5,e.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(e.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return e.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return e.yytext=i(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return e.yytext=e.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},t.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],t.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:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},t}();return e.lexer=n,t.prototype=e,e.Parser=t,new t}();e.__esModule=!0,e["default"]=n},function(t,e,n){"use strict";function i(){var t=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];this.options=t}function r(t,e,n){e===undefined&&(e=t.length);var i=t[e-1],r=t[e-2];return i?"ContentStatement"===i.type?(r||!n?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(i.original):void 0:n}function o(t,e,n){e===undefined&&(e=-1);var i=t[e+1],r=t[e+2];return i?"ContentStatement"===i.type?(r||!n?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(i.original):void 0:n}function s(t,e,n){var i=t[null==e?0:e+1];if(i&&"ContentStatement"===i.type&&(n||!i.rightStripped)){var r=i.value;i.value=i.value.replace(n?/^\s+/:/^[ \t]*\r?\n?/,""),i.rightStripped=i.value!==r}}function a(t,e,n){var i=t[null==e?t.length-1:e-1];if(i&&"ContentStatement"===i.type&&(n||!i.leftStripped)){var r=i.value;return i.value=i.value.replace(n?/\s+$/:/[ \t]+$/,""),i.leftStripped=i.value!==r,i.leftStripped}}var l=n(1)["default"];e.__esModule=!0;var c=n(25),u=l(c);i.prototype=new u["default"],i.prototype.Program=function(t){var e=!this.options.ignoreStandalone,n=!this.isRootSeen;this.isRootSeen=!0;for(var i=t.body,l=0,c=i.length;l<c;l++){var u=i[l],p=this.accept(u);if(p){var h=r(i,l,n),f=o(i,l,n),d=p.openStandalone&&h,m=p.closeStandalone&&f,g=p.inlineStandalone&&h&&f;p.close&&s(i,l,!0),p.open&&a(i,l,!0),e&&g&&(s(i,l),a(i,l)&&"PartialStatement"===u.type&&(u.indent=/([ \t]+$)/.exec(i[l-1].original)[1])),e&&d&&(s((u.program||u.inverse).body),a(i,l)),e&&m&&(s(i,l),a((u.inverse||u.program).body))}}return t},i.prototype.BlockStatement=i.prototype.DecoratorBlock=i.prototype.PartialBlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,n=t.program&&t.inverse,i=n,l=n;if(n&&n.chained)for(i=n.body[0].program;l.chained;)l=l.body[l.body.length-1].program;var c={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:o(e.body),closeStandalone:r((i||e).body)};if(t.openStrip.close&&s(e.body,null,!0),n){var u=t.inverseStrip;u.open&&a(e.body,null,!0),u.close&&s(i.body,null,!0),t.closeStrip.open&&a(l.body,null,!0),!this.options.ignoreStandalone&&r(e.body)&&o(i.body)&&(a(e.body),s(i.body))}else t.closeStrip.open&&a(e.body,null,!0);return c},i.prototype.Decorator=i.prototype.MustacheStatement=function(t){return t.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e["default"]=i,t.exports=e["default"]},function(t,e,n){"use strict";function i(){this.parents=[]}function r(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")}function o(t){r.call(this,t),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")}function s(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")}var a=n(1)["default"];e.__esModule=!0;var l=n(6),c=a(l);i.prototype={constructor:i,mutating:!1,acceptKey:function(t,e){var n=this.accept(t[e]);if(this.mutating){if(n&&!i.prototype[n.type])throw new c["default"]('Unexpected node type "'+n.type+'" found when accepting '+e+" on "+t.type);t[e]=n}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new c["default"](t.type+" requires "+e)},acceptArray:function(t){for(var e=0,n=t.length;e<n;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,n--)},accept:function(t){if(t){if(!this[t.type])throw new c["default"]("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:!1!==e?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:r,Decorator:r,BlockStatement:o,DecoratorBlock:o,PartialStatement:s,PartialBlockStatement:function(t){s.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:r,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e["default"]=i,t.exports=e["default"]},function(t,e,n){"use strict";function i(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var n={loc:t.path.loc};throw new g["default"](t.path.original+" doesn't match "+e,n)}}function r(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function o(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t}function s(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}}function a(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function l(t,e,n){n=this.locInfo(n);for(var i=t?"@":"",r=[],o=0,s="",a=0,l=e.length;a<l;a++){var c=e[a].part,u=e[a].original!==c;if(i+=(e[a].separator||"")+c,u||".."!==c&&"."!==c&&"this"!==c)r.push(c);else{if(r.length>0)throw new g["default"]("Invalid path: "+i,{loc:n});".."===c&&(o++,s+="../")}}return{type:"PathExpression",data:t,depth:o,parts:r,original:i,loc:n}}function c(t,e,n,i,r,o){var s=i.charAt(3)||i.charAt(2),a="{"!==s&&"&"!==s;return{type:/\*/.test(i)?"Decorator":"MustacheStatement",path:t,params:e,hash:n,escaped:a,strip:r,loc:this.locInfo(o)}}function u(t,e,n,r){i(t,n),r=this.locInfo(r);var o={type:"Program",body:e,strip:{},loc:r};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function p(t,e,n,r,o,s){r&&r.path&&i(t,r);var a=/\*/.test(t.open);e.blockParams=t.blockParams;var l=undefined,c=undefined;if(n){if(a)throw new g["default"]("Unexpected inverse block on decorator",n);n.chain&&(n.program.body[0].closeStrip=r.strip),c=n.strip,l=n.program}return o&&(o=l,l=e,e=o),{type:a?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:l,openStrip:t.strip,inverseStrip:c,closeStrip:r&&r.strip,loc:this.locInfo(s)}}function h(t,e){if(!e&&t.length){var n=t[0].loc,i=t[t.length-1].loc;n&&i&&(e={source:n.source,start:{line:n.start.line,column:n.start.column},end:{line:i.end.line,column:i.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function f(t,e,n,r){return i(t,n),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:n&&n.strip,loc:this.locInfo(r)}}var d=n(1)["default"];e.__esModule=!0,e.SourceLocation=r,e.id=o,e.stripFlags=s,e.stripComment=a,e.preparePath=l,e.prepareMustache=c,e.prepareRawBlock=u,e.prepareBlock=p,e.prepareProgram=h,e.preparePartialBlock=f;var m=n(6),g=d(m)},function(t,e,n){"use strict";function i(){}function r(t,e,n){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new u["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var i=n.parse(t,e),r=(new n.Compiler).compile(i,e);return(new n.JavaScriptCompiler).compile(r,e)}function o(t,e,n){function i(){var i=n.parse(t,e),r=(new n.Compiler).compile(i,e),o=(new n.JavaScriptCompiler).compile(r,e,undefined,!0);return n.template(o)}function r(t,e){return o||(o=i()),o.call(this,t,e)}if(e===undefined&&(e={}),null==t||"string"!=typeof t&&"Program"!==t.type)throw new u["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var o=undefined;return r._setup=function(t){return o||(o=i()),o._setup(t)},r._child=function(t,e,n,r){return o||(o=i()),o._child(t,e,n,r)},r}function s(t,e){if(t===e)return!0;if(p.isArray(t)&&p.isArray(e)&&t.length===e.length){for(var n=0;n<t.length;n++)if(!s(t[n],e[n]))return!1;return!0}}function a(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}var l=n(1)["default"];e.__esModule=!0,e.Compiler=i,e.precompile=r,e.compile=o;var c=n(6),u=l(c),p=n(5),h=n(21),f=l(h),d=[].slice;i.prototype={compiler:i,equals:function(t){var e=this.opcodes.length;if(t.opcodes.length!==e)return!1;for(var n=0;n<e;n++){var i=this.opcodes[n],r=t.opcodes[n];if(i.opcode!==r.opcode||!s(i.args,r.args))return!1}e=this.children.length;for(var n=0;n<e;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var n=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},n)for(var i in n)i in n&&(e.knownHelpers[i]=n[i]);return this.accept(t)},compileProgram:function(t){var e=new this.compiler,n=e.compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[i]=n,this.useDepths=this.useDepths||n.useDepths,i},accept:function(t){if(!this[t.type])throw new u["default"]("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,n=e.length,i=0;i<n;i++)this.accept(e[i]);return this.options.blockParams.shift(),this.isSimple=1===n,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){a(t);var e=t.program,n=t.inverse;e=e&&this.compileProgram(e),n=n&&this.compileProgram(n);var i=this.classifySexpr(t);"helper"===i?this.helperSexpr(t,e,n):"simple"===i?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,n),this.opcode("pushProgram",e),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var e=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,e,undefined),i=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,i.original)},PartialStatement:function(t){this.usePartial=!0;var e=t.program;e&&(e=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new u["default"]("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var i=t.name.original,r="SubExpression"===t.name.type;r&&this.accept(t.name),this.setupFullMustacheParams(t,e,undefined,!0);var o=t.indent||"";this.options.preventIndent&&o&&(this.opcode("appendContent",o),o=""),this.opcode("invokePartial",r,i,o),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){a(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,n){var i=t.path,r=i.parts[0],o=null!=e||null!=n;this.opcode("getContext",i.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",n),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",r,o)},simpleSexpr:function(t){var e=t.path;e.strict=!0,this.accept(e),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,n){var i=this.setupFullMustacheParams(t,e,n),r=t.path,o=r.parts[0];if(this.options.knownHelpers[o])this.opcode("invokeKnownHelper",i.length,o);else{if(this.options.knownHelpersOnly)throw new u["default"]("You specified knownHelpersOnly, but used the unknown helper "+o,t);r.strict=!0,r.falsy=!0,this.accept(r),this.opcode("invokeHelper",i.length,r.original,f["default"].helpers.simpleId(r))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],n=f["default"].helpers.scopedId(t),i=!t.depth&&!n&&this.blockParamIndex(e);i?this.opcode("lookupBlockParam",i,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,n=0,i=e.length;for(this.opcode("pushHash");n<i;n++)this.pushParam(e[n].value);for(;n--;)this.opcode("assignToHash",e[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:d.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=f["default"].helpers.simpleId(t.path),n=e&&!!this.blockParamIndex(t.path.parts[0]),i=!n&&f["default"].helpers.helperExpression(t),r=!n&&(i||e);if(r&&!i){var o=t.path.parts[0],s=this.options;s.knownHelpers[o]?i=!0:s.knownHelpersOnly&&(r=!1)}return i?"helper":r?"ambiguous":"simple"},pushParams:function(t){for(var e=0,n=t.length;e<n;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var n=undefined;if(!t.parts||f["default"].helpers.scopedId(t)||t.depth||(n=this.blockParamIndex(t.parts[0])),n){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,i)}else e=t.original||e,e.replace&&(e=e.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,n,i){var r=t.params;return this.pushParams(r),this.opcode("pushProgram",e),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),r},blockParamIndex:function(t){for(var e=0,n=this.options.blockParams.length;e<n;e++){var i=this.options.blockParams[e],r=i&&p.indexOf(i,t);if(i&&r>=0)return[e,r]}}}},function(t,e,n){"use strict";function i(t){this.value=t}function r(){}function o(t,e,n,i){var r=e.popStack(),o=0,s=n.length;for(t&&s--;o<s;o++)r=e.nameLookup(r,n[o],i);return t?[e.aliasable("container.strict"),"(",r,", ",e.quotedString(n[o]),")"]:r}var s=n(1)["default"];e.__esModule=!0;var a=n(4),l=n(6),c=s(l),u=n(5),p=n(29),h=s(p);r.prototype={nameLookup:function(t,e){return r.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"[",JSON.stringify(e),"]"]},depthedLookup:function(t){return[this.aliasable("container.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=a.COMPILER_REVISION;return[t,a.REVISION_CHANGES[t]]},appendToBuffer:function(t,e,n){return u.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,n,i){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var r=t.opcodes,o=undefined,s=undefined,a=undefined,l=undefined;for(a=0,l=r.length;a<l;a++)o=r[a],this.source.currentLocation=o.loc,s=s||o.loc,this[o.opcode].apply(this,o.args);if(this.source.currentLocation=s,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new c["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=undefined:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),i?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var u=this.createFunctionContext(i);if(this.isChild)return u;var p={compiler:this.compilerInfo(),main:u};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var h=this.context,f=h.programs,d=h.decorators;for(a=0,l=f.length;a<l;a++)f[a]&&(p[a]=f[a],d[a]&&(p[a+"_d"]=d[a],p.useDecorators=!0));return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),i?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),e.srcName?(p=p.toStringWithSourceMap({file:e.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new h["default"](this.options.srcName),this.decorators=new h["default"](this.options.srcName)},createFunctionContext:function(t){var e="",n=this.stackVars.concat(this.registers.list);n.length>0&&(e+=", "+n.join(", "));var i=0;for(var r in this.aliases){var o=this.aliases[r];this.aliases.hasOwnProperty(r)&&o.children&&o.referenceCount>1&&(e+=", alias"+ ++i+"="+r,o.children[0]="alias"+i)}var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(e);return t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),") {\n ",a,"}"])},mergeSource:function(t){var e=this.environment.isSimple,n=!this.forceBuffer,i=undefined,r=undefined,o=undefined,s=undefined;return this.source.each(function(t){t.appendToBuffer?(o?t.prepend(" + "):o=t,s=t):(o&&(r?o.prepend("buffer += "):i=!0,s.add(";"),o=s=undefined),r=!0,e||(n=!1))}),n?o?(o.prepend("return "),s.add(";")):r||this.source.push('return "";'):(t+=", buffer = "+(i?"":this.initializeBuffer()),o?(o.prepend("return buffer + "),s.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(i?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var i=this.popStack();n.splice(1,0,i),this.push(this.source.functionCall(e,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var n=this.topStack();e.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,undefined,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",undefined,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,n,i){var r=0;i||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[r++])),this.resolvePath("context",t,r,e,n)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0,n)},resolvePath:function(t,e,n,i,r){var s=this;if(this.options.strict||this.options.assumeObjects)return void this.push(o(this.options.strict&&r,this,e,t));for(var a=e.length;n<a;n++)this.replaceStack(function(r){var o=s.nameLookup(r,e[n],t);return i?[" && ",o]:[" != null ? ",o," : ",r]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,e){var n=this.nameLookup("decorators",e,"decorator"),i=this.setupHelperArgs(e,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",i])," || fn;"])},invokeHelper:function(t,e,n){var i=this.popStack(),r=this.setupHelper(t,e),o=n?[r.name," || "]:"",s=["("].concat(o,i);this.options.strict||s.push(" || ",this.aliasable("helpers.helperMissing")),s.push(")"),this.push(this.source.functionCall(s,"call",r.callParams))},invokeKnownHelper:function(t,e){var n=this.setupHelper(t,e);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var n=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,e),r=this.lastHelper=this.nameLookup("helpers",t,"helper"),o=["(","(helper = ",r," || ",n,")"];this.options.strict||(o[0]="(helper = ",o.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",o,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(t,e,n){var i=[],r=this.setupParams(e,1,i);t&&(e=this.popStack(),delete r.name),n&&(r.indent=JSON.stringify(n)),r.helpers="helpers",r.partials="partials",r.decorators="container.decorators",t?i.unshift(e):i.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(r.depths="depths"),r=this.objectLiteral(r),i.push(r),this.push(this.source.functionCall("container.invokePartial","",i))},assignToHash:function(t){var e=this.popStack(),n=undefined,i=undefined,r=undefined;this.trackIds&&(r=this.popStack()),this.stringParams&&(i=this.popStack(),n=this.popStack());var o=this.hash;n&&(o.contexts[t]=n),i&&(o.types[t]=i),r&&(o.ids[t]=r),o.values[t]=e},pushId:function(t,e,n){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:r,compileChildren:function(t,e){for(var n=t.children,i=undefined,r=undefined,o=0,s=n.length;o<s;o++){i=n[o],r=new this.compiler;var a=this.matchExistingProgram(i);null==a?(this.context.programs.push(""),a=this.context.programs.length,i.index=a,i.name="program"+a,this.context.programs[a]=r.compile(i,e,this.context,!this.precompile),this.context.decorators[a]=r.decorators,this.context.environments[a]=i,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams):(i.index=a,i.name="program"+a,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams)}},matchExistingProgram:function(t){for(var e=0,n=this.context.environments.length;e<n;e++){var i=this.context.environments[e];if(i&&i.equals(t))return e}},programExpression:function(t){var e=this.environment.children[t],n=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof i||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new i(t))},
29
- pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=undefined),t&&this.source.push(t)},replaceStack:function(t){var e=["("],n=undefined,r=undefined,o=undefined;if(!this.isInline())throw new c["default"]("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof i)n=[s.value],e=["(",n],o=!0;else{r=!0;var a=this.incrStack();e=["((",this.push(a)," = ",s,")"],n=this.topStack()}var l=t.call(this,n);o||this.popStack(),r&&this.stackSlot--,this.push(e.concat(l,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var e=0,n=t.length;e<n;e++){var r=t[e];if(r instanceof i)this.compileStack.push(r);else{var o=this.incrStack();this.pushSource([o," = ",r,";"]),this.compileStack.push(o)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),n=(e?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof i)return n.value;if(!e){if(!this.stackSlot)throw new c["default"]("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof i?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):(e=this.aliases[t]=this.source.wrap(t),e.aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,n){var i=[];return{params:i,paramsInit:this.setupHelperArgs(e,t,i,n),name:this.nameLookup("helpers",e,"helper"),callParams:[this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}")].concat(i)}},setupParams:function(t,e,n){var i={},r=[],o=[],s=[],a=!n,l=undefined;a&&(n=[]),i.name=this.quotedString(t),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var c=this.popStack(),u=this.popStack();(u||c)&&(i.fn=u||"container.noop",i.inverse=c||"container.noop");for(var p=e;p--;)l=this.popStack(),n[p]=l,this.trackIds&&(s[p]=this.popStack()),this.stringParams&&(o[p]=this.popStack(),r[p]=this.popStack());return a&&(i.args=this.source.generateArray(n)),this.trackIds&&(i.ids=this.source.generateArray(s)),this.stringParams&&(i.types=this.source.generateArray(o),i.contexts=this.source.generateArray(r)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(t,e,n,i){var r=this.setupParams(t,e,n);return r=this.objectLiteral(r),i?(this.useRegister("options"),n.push("options"),["options=",r]):n?(n.push(r),""):r}},function(){for(var t="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(" "),e=r.RESERVED_WORDS={},n=0,i=t.length;n<i;n++)e[t[n]]=!0}(),r.isValidJavaScriptVariableName=function(t){return!r.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e["default"]=r,t.exports=e["default"]},function(t,e,n){"use strict";function i(t,e,n){if(o.isArray(t)){for(var i=[],r=0,s=t.length;r<s;r++)i.push(e.wrap(t[r],n));return i}return"boolean"==typeof t||"number"==typeof t?t+"":t}function r(t){this.srcFile=t,this.source=[]}e.__esModule=!0;var o=n(5),s=undefined;try{}catch(t){}s||(s=function(t,e,n,i){this.src="",i&&this.add(i)},s.prototype={add:function(t){o.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){o.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),r.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add([" ",e,"\n"])}),t},each:function(t){for(var e=0,n=this.source.length;e<n;e++)t(this.source[e])},empty:function(){var t=this.currentLocation||{start:{}};return new s(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=arguments.length<=1||arguments[1]===undefined?this.currentLocation||{start:{}}:arguments[1];return t instanceof s?t:(t=i(t,this,e),new s(e.start.line,e.start.column,this.srcFile,t))},functionCall:function(t,e,n){return n=this.generateList(n),this.wrap([t,e?"."+e+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var n in t)if(t.hasOwnProperty(n)){var r=i(t[n],this);"undefined"!==r&&e.push([this.quotedString(n),":",r])}var o=this.generateList(e);return o.prepend("{"),o.add("}"),o},generateList:function(t){for(var e=this.empty(),n=0,r=t.length;n<r;n++)n&&e.add(","),e.add(i(t[n],this));return e},generateArray:function(t){var e=this.generateList(t);return e.prepend("["),e.add("]"),e}},e["default"]=r,t.exports=e["default"]}])}),function(){window.sleep=function(t,e){var n;return n=1e3*t,window._sleeping=setTimeout(e,n)}}.call(this),function(){var t=[].slice;window.Pinkman=function(){function e(){}return e.collections=[],e.objects=[],e.all=[],e.get=function(t){return this.all[t]},e.count=function(){return this.all.length},e.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},e.isArray=function(t){return null!=t&&t.constructor===Array},e.isString=function(t){return null!=t&&"string"==typeof t},e.doAfter=function(t,e,n){return null==n&&(n="_pinkman_doAfter"),window[n]=window.setTimeout(e,100*t)},e.clearTimeout=function(t){return null==t&&(t="_pinkman_doAfter"),window.clearTimeout(window[t])},e.defineGlobalVar=function(t,e){return window[t]=e},e.onlyOnce=function(){var e,n,i;if(n=arguments[0],e=2<=arguments.length?t.call(arguments,1):[],"function"==typeof n&&(i=new Object,i.f=n.toString(),i.args=e,-1===this.calledFunctions.indexOf(i)))return this.calledFunctions.push(i),n.apply(null,e)},e.calledFunctions=[],e.ajax={request:function(t){var e;return null!=t.url&&(e=jQuery.ajax(t.url,{beforeSend:function(t){return t.setRequestHeader("X-CSRF-Token",$('meta[name="csrf-token"]').attr("content"))},type:t.type,dataType:"json",data:t.data}),e.done(function(e){return function(n){return null!=n.errors?(null!=t.error&&"function"==typeof t.error&&t.error(e),!1):(null!=t.success&&"function"==typeof t.success&&t.success(n),null!=t.complete&&"function"==typeof t.complete&&t.complete(n),!0)}}(this)))},get:function(t){return t.type="GET",this.request(t)},post:function(t){return t.type="POST",this.request(t)},put:function(t){return t.type="PUT",this.request(t)},patch:function(t){return t.type="PATCH",this.request(t)},"delete":function(t){return t.type="DELETE",this.request(t)},file:function(t){var e;return null!=t.url&&(e=jQuery.ajax(t.url,{beforeSend:function(t){return t.setRequestHeader("X-CSRF-Token",$('meta[name="csrf-token"]').attr("content"))},xhr:function(){var e;return e=$.ajaxSettings.xhr(),e.upload.addEventListener("progress",function(e){if(e.lengthComputable&&null!=t.progress)return t.progress(e.loaded/e.total)},!1),e.addEventListener("progress",function(e){if(e.lengthComputable&&null!=t.progress)return t.progress(e.loaded/e.total)},!1),e},type:"POST",dataType:"json",data:t.data,processData:!1,contentType:!1}),e.done(function(e){return function(n){return null!=n&&null!=n.errors?(null!=t.error&&"function"==typeof t.error&&t.error(e),!1):(null!=t.success&&"function"==typeof t.success&&t.success(n),null!=t.complete&&"function"==typeof t.complete?t.complete(n):void 0)}}(this)),this)},upload:function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],this.file.apply(this,e)}},e}(),$(document).ready(function(){if(null==Pinkman.pathname&&(Pinkman.pathname=window.location.pathname,"/"!==Pinkman.pathname.charAt([Pinkman.pathname.length]-1)))return Pinkman.pathname=Pinkman.pathname+"/"})}.call(this),function(){window.Pinkman.mixin=function(t,e){var n;if(null!=t&&"string"==typeof t&&null!=e&&"object"==typeof e)return null==Pinkman.mixins&&(Pinkman.mixins=new Pinkman.collection),n=new Pinkman.object,n.set("mix",e),n.set("name",t),Pinkman.mixins.push(n)},window.Pinkman.mixit=function(t,e){var n,i,r,o;if(null!=(i=Pinkman.mixins.getBy("name",e))){o=i.mix;for(r in o)n=o[r],n["super"]=t.prototype[r],t.prototype[r]=n;return!0}return!1}}.call(this),function(){var t=[].slice;window.PinkmanCommon=function(){function e(){}return e.privateAttributes=["isPink","isObject","isCollection","pinkey","config","pinkmanType","collections","renderQueue"],e.mixin=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],Pinkman.mixin.apply(Pinkman,e)},e.mixit=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],Pinkman.mixit.apply(Pinkman,[this].concat(t.call(e)))},e.isInstance=function(t){return t.constructor===this},e.prototype.api=function(){if(null!=this.config&&null!=this.config.api)return"/"===this.config.api.charAt(0)?this.config.api+"/":"/"+this.config.api+"/"},e.prototype.isInstanceOf=function(t){return this.constructor===t},e.prototype.className=function(){return this.constructor.name},e.prototype.set=function(t,e,n){if(null==n&&(n=""),null!=t&&null!=e)return this[t]=e,"function"==typeof n&&n(this),this._watching&&this.reRender(),!0},e.prototype.render=function(t){var e;return"object"==typeof t?(t.object=this,Pinkman.render(t)):"string"==typeof t?(e={object:this,target:t,template:t+"-template"},Pinkman.render(e)):void 0},e.prototype.reRender=function(){return Pinkman.reRender(this)},e.prototype.watch=function(){return this._watching=!0},e}()}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty;window.PinkmanObject=function(e){function n(t){this.isPink=!0,this.isObject=!0,this.pinkmanType="object",this.collections=new PinkmanCollection,this.pinkey=Pinkman.all.length,Pinkman.objects.push(this),Pinkman.all.push(this),this.initialize(t)}return t(n,e),n.pinkmanType="object",n.prototype.initialize=function(t){var e,i,r;if("object"==typeof t){i=[];for(e in t)r=t[e],-1===n.privateAttributes.indexOf(e)?i.push(this.set(e,r)):i.push(void 0);return i}},n.prototype.assign=function(t){var e,n;if("object"==typeof t){for(e in t)n=t[e],"object"!=typeof n||null==this[e]||null==this[e].isPink||n.isPink?this.set(e,n):this[e].assign(n);return!0}return!1},n.prototype.attributes=function(){var t,e,i,r;t=new Object,i=this;for(e in i)r=i[e],-1===n.privateAttributes.indexOf(e)&&"function"!=typeof r&&(r.isPink?t[e]=r.attributes():t[e]=r);return t},n.prototype.attributesKeys=function(){return Object.keys(this.attributes())},n.prototype.keys=function(){return this.attributesKeys()},n.prototype.toString=function(){var t,e,n,i,r;for(e=[],e.push("("+this.className()+")"),r=this.attributesKeys(),n=0,i=r.length;n<i;n++)t=r[n],e.push(t+": "+this[t]+";");return e.join(" ")},n.prototype.next=function(t){var e;if(null==t&&(t=""),t.isPink&&"collection"===t.pinkmanType)return t.next(this);if(Pinkman.isNumber(t)){if(null!=(e=this.collections.get(t)))return e.next(this)}else if((null==t||""===t)&&this.collections.any())return this.collections.first().next(this)},n.prototype.prev=function(t){var e;if(null==t&&(t=""),t.isPink&&"collection"===t.pinkmanType)return t.prev(this);if(Pinkman.isNumber(t)){if(null!=(e=this.collections.get(t)))return e.prev(this)}else if((null==t||""===t)&&this.collections.any())return this.collections.first().prev(this)},n.prototype.clearCollections=function(){var t,e,n,i,r;for(i=this.collections.collection,r=[],e=0,n=i.length;e<n;e++)t=i[e],r.push(t.remove(this));return r},n.prototype.removeFromCollections=function(){return this.clearCollections()},n.prototype.removeFromAllCollections=function(){return this.clearCollections()},n.prototype.removeAllCollections=function(){return this.clearCollections()},n.prototype.firstError=function(){var t;if(null!=this.errors)return(t=Object.keys(this.errors)[0])+" "+this.errors[t][0]},n.find=function(t,e){var n;return null==e&&(e=""),n=new this,Pinkman.ajax.get({url:n.api()+t,complete:function(t){if(n.assign(t),null!=n.error||null!=n.errors)throw new Error(n.firstError());if(null!=e&&"function"==typeof e)return e(n)}}),n},n.prototype.create=function(t){if(null==t&&(t=""),null==this.id)return Pinkman.ajax.post({url:this.api(),data:{pink_obj:this.attributes()},complete:function(e){return function(n){if(e.assign(n),null==n.errors&&delete e.errors,null!=t&&"function"==typeof t)return t(e)}}(this)}),this},n.prototype.update=function(t){if(null==t&&(t=""),console.log(this),null!=this.id)return Pinkman.ajax.patch({url:this.api()+this.id,data:{pink_obj:this.attributes()},complete:function(e){return function(n){if(e.assign(n),null==n.errors&&delete e.errors,null!=t&&"function"==typeof t)return t(e)}}(this)}),this},n.prototype.reload=function(t){return Pinkman.ajax.get({url:this.api()+this.id,complete:function(e){return function(n){if(e.assign(n),null!=e.error||null!=e.errors)throw new Error(e.firstError());if(null!=t&&"function"==typeof t)return t(e)}}(this)}),this},n.prototype.updateAttributes=function(t){return!!this.assign(t)&&this.save(function(t){return t})},n.prototype.save=function(t){return null==t&&(t=""),null!=this.id&&""!==this.id?this.update(t):this.create(t)},n.prototype.destroy=function(t){return null==t&&(t=""),null!=this.id&&(Pinkman.ajax["delete"]({url:this.api()+this.id,complete:function(e){return function(n){if(e.assign(n),null==n.errors&&delete e.errors,null!=e.errors)throw new Error(e.firstError());if(e.id=null,e.removeFromAllCollections(),"function"==typeof t)return t(e)}}(this)}),this)},n}(window.PinkmanCommon),window.Pinkman.object=window.PinkmanObject}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty,n=[].slice;window.PinkmanCollection=function(e){function i(){this.isPink=!0,this.isCollection=!0,this.pinkmanType="collection",this.collection=[],this.pinkey=Pinkman.all.length,Pinkman.collections.push(this),Pinkman.all.push(this)}return t(i,e),i.pinkmanType="collection",i.prototype.config={memberClass:PinkmanObject},i.prototype.attributes=function(){return this.collection},i.prototype.count=function(t){var e,n,i,r,o;if(null==t&&(t=""),null!=t&&"function"==typeof t){for(e=0,o=this.collection,n=0,i=o.length;n<i;n++)r=o[n],t(r)&&e++;return e}return this.collection.length},i.prototype.size=function(t){return null==t&&(t=""),this.count(t)},i.prototype.length=function(t){return null==t&&(t=""),this.count(t)},i.prototype.each=function(t){var e,n,i,r;if(null==t&&(t=""),null!=t&&"function"==typeof t)for(r=this.collection,e=0,n=r.length;e<n;e++)i=r[e],t(i);return this},i.prototype.select=function(t,e){var n;return null==e&&(e=""),n=new this.constructor,"function"==typeof t?this.each(function(e){if(t(e))return n.push(e)}):"object"==typeof t&&this.each(function(e){var i,r,o;o=!0;for(i in t)r=t[i],e[i]!==r&&(o=!1);if(o)return n.push(e)}),"function"==typeof e&&e(n),n},i.prototype.push=function(t){var e,n,i;if(Pinkman.isArray(t)){for(n=0,i=t.length;n<i;n++)e=t[n],this.pushIndividually(e);return this.include(t)}return this.pushIndividually(t)},i.prototype.unshift=function(t){var e,n,i;if(Pinkman.isArray(t)){for(n=0,i=t.length;n<i;n++)e=t[n],this.unshiftIndividually(e);return this.include(t)}return this.unshiftIndividually(t)},i.prototype.pushIndividually=function(t){return null!=t&&"object"==typeof t&&!this.include(t)&&this.beforeInsertionPrep(t,function(t){return function(e){return t.collection.push(e),e.isObject&&null!=e.collections&&e.collections.push(t),!0}}(this))},i.prototype.directPush=function(t){if(!this.include(t))return this.collection.push(t)},i.prototype.forcePush=function(t){return this.collection.push(t)},i.prototype.unshiftIndividually=function(t){return null!=t&&"object"==typeof t&&!this.include(t)&&this.beforeInsertionPrep(t,function(t){return function(e){return t.collection.unshift(e),e.isObject&&null!=e.collections&&e.collections.push(t),!0}}(this))},i.prototype.beforeInsertionPrep=function(t,e){var n;return null==e&&(e=""),t.isPink||(n=this["new"](),n.assign(t),t=n),"function"==typeof e&&e(t),t},i.prototype.pop=function(){return this.remove(this.last())},i.prototype.shift=function(){return this.remove(this.first())},i.prototype.remove=function(t){var e;if(null!=t)return e=this.collection.indexOf(t),this.collection.splice(e,1),t},i.prototype.removeBy=function(t,e){if(null!=t&&null!=e)return this.remove(this.getBy(t,e))},i.prototype.removeAll=function(){return!this.any()||(this.remove(this.first()),this.removeAll())},i.prototype.include=function(t){var e,n,i,r;if(null!=t&&Pinkman.isArray(t)){for(r=!0,n=0,i=t.length;n<i;n++)e=t[n],this.include(e)||(r=!1);return r}return null!=t&&"object"==typeof t&&(null!=t.id?this.any(function(e){return t.id===e.id}):-1!==this.collection.indexOf(t))},i.prototype.first=function(t){return null==t&&(t=1),1===t?this.collection[0]:this.collection.slice(0,+(t-1)+1||9e9)},i.prototype.last=function(t){return null==t&&(t=1),1===t?this.collection[this.collection.length-1]:this.collection.slice(this.collection.length-t-1)},i.prototype.any=function(t){return null==t&&(t=""),null!=t&&"function"==typeof t?this.select(t).count()>0:this.count()>0},i.prototype.getBy=function(t,e){var n;if(null!=t&&null!=e)return n=new Object,n[t]=e,this.getByAttributes(n)},i.prototype.getByAttributes=function(t){var e,n,i,r,o,s,a;if(null==t||"object"!=typeof t||!this.any())return null;for(s=this.collection,e=0,i=s.length;e<i;e++){o=s[e],r=!0;for(n in t)a=t[n],o[n]!==a&&(r=!1);if(r)return o}},i.prototype.getByPinkey=function(t){return this.getBy("pinkey",t)},i.prototype.get=function(){var t;if(t=1<=arguments.length?n.call(arguments,0):[],t.length>0){if(Pinkman.isNumber(t[0]))return this.getByPinkey(t[0]);if(2===t.length)return this.getBy.apply(this,t);if("object"==typeof t[0])return this.getByAttributes(t[0])}},i.prototype.find=function(t){if(null!=t)return this.getBy("id",t)},i.prototype.next=function(t){var e;return e=this.collection.indexOf(t),this.collection[e+1]},i.prototype.prev=function(t){var e;return e=this.collection.indexOf(t),this.collection[e-1]},i.prototype.logPinkeys=function(){return this.each(function(t){return console.log(t.pinkey)})},i.prototype.uniq=function(t){var e,n,i,r;for(null==t&&(t=""),n=[],this.each(function(t){return function(e){return t.each(function(t){if(null!=e.pinkey&&e.pinkey===t.pinkey&&e!==t&&n.push(t),null!=e.id&&e.id===t.id&&e!==t)return n.push(t)})}}(this)),i=0,r=n.length;i<r;i++)e=n[i],this.remove(e);return this},i.prototype.fetchFromArray=function(t){var e,n,i,r;for(n=0,i=t.length;n<i;n++)e=t[n],r=this.beforeInsertionPrep(e),null!=r&&null!=this.find(r.id)?this.find(r.id).assign(r.attributes()):this.push(r);return this},i.prototype.merge=function(t){return Pinkman.isArray(t)?this.fetchFromArray(t):"object"==typeof t&&t.isPink&&t.isCollection?this.fetchFromArray(t.collection):void 0},i.prototype["new"]=function(t){var e;return e=new this.config.memberClass,e.initialize(t),e},i.prototype.reload=function(t){if(null==t&&(t=""),this.any())return this.each(function(e){return function(n){if(null!=n.id)return n.reload(function(n){if(n.pinkey===e.last().pinkey&&"function"===t)return t(e)})}}(this))},i.prototype.makeIndex=function(){var t,e,n,i,r;if(this.any()){for(t=1,r=this.collection,e=0,n=r.length;e<n;e++)i=r[e],i.set("index",t),t++;return!0}return!1},i.prototype.shuffle=function(){var t,e,n,i;if(null!=this.any){for(t=this.collection.length,n=[];0!==t;)e=Math.floor(Math.random()*t),t-=1,i=this.collection[t],this.collection[t]=this.collection[e],n.push(this.collection[e]=i);return n}},i.prototype.filter=function(t,e,n){var i,r,o,s,a;if(null!=t&&null!=e&&""!==e&&"string"==typeof t){if(this.any())for(i=new this.constructor,a=this.collection,r=0,o=a.length;r<o;r++)s=a[r],s[t]===e?i.push(s):null!=s[t]&&"string"==typeof s[t]&&""!==s[t]&&"string"==typeof e&&""!==e&&s[field].toLowerCase().indexOf(e.toLowerCase())>-1&&i.push(s);return null!=n&&"function"==typeof n&&n(i),i}return!1},i.prototype.fetch=function(t){return null==t&&(t=""),this.fetchFromUrl({url:this.api(),callback:t})},i.prototype.fetchFrom=function(t,e,n){return null==n&&(n=""),null!=t&&null!=e&&this.fetchFromUrl(this.api()+(t+"/")+e,n)},i.prototype.fetchFromUrl=function(t){var e,n;if(null!=t&&"object"==typeof t&&null!=t.url)return e=null!=t.limit?t.limit:1e3,n=null!=t.offset?t.offset:0,this.fetchingFrom=t.url,Pinkman.ajax.get({url:t.url+"?limit="+e+"&offset="+n,complete:function(e){return function(n){var i;if(null!=n.errors||null!=n.error)throw i=[n.errors,n.error],e.errors=i[0],e.error=i[1],null!=n.errors?new Error('Oh no... I could not fetch your records, bitch. (jk... about the "bitch" part)'):new Error(n.error);if(e.fetchFromArray(n).emptyResponse=0===n.length,null!=t.callback&&"function"==typeof t.callback)return t.callback(e)}}(this)}),this},i.prototype.fetchMore=function(t,e){return null==t&&(t=10),null==e&&(e=""),null!=this.fetchingFrom?this.fetchFromUrl({url:this.fetchingFrom,limit:t,offset:this.count(),callback:e}):this.fetchFromUrl({url:this.api(),limit:t,offset:this.count(),callback:e})},i.prototype.fetchMoreFrom=function(t,e,n,i){return null==i&&(i=""),this.fetchFromUrl({url:this.api()+(e+"/")+n,limit:t,offset:this.count(),callback:i})},i.prototype.search=function(t,e){return null==e&&(e=""),this.removeAll(),this.fetchFromUrl({url:this.api()+"search?query="+t,callback:e})},i}(window.PinkmanCommon),window.Pinkman.collection=window.PinkmanCollection}.call(this),function(){var t=[].slice;PinkmanCollection.prototype.renderQueue=new PinkmanCollection,PinkmanObject.prototype.renderQueue=new PinkmanCollection,Pinkman.templates=new Pinkman.collection,Pinkman.template_engine="handlebars",Pinkman.template_engines={handlebars:function(t){var e,n;if(null!=t&&null!=t.template&&$("#"+t.template).length)return Pinkman.templates.include({template:t.template,engine:Pinkman.template_engine})?n=Pinkman.templates.get({template:t.template,engine:Pinkman.template_engine}):(n=new Pinkman.object({template:t.template,engine:Pinkman.template_engine}),n.handlebars=Handlebars.compile($("#"+t.template).html()),Pinkman.templates.push(n)),null!=t.context&&(t.object=t.context),e=n.handlebars(t.object),null!=t.target&&($("#"+t.target).html(e),null!=t.object&&"object"==typeof t.object&&t.object.isPink&&$("#"+t.target).attr("data-pinkey",t.object.pinkey)),null!=t.callback&&"function"==typeof t.callback&&t.callback(t.object,e),e},hogan:function(t){var e,n;if(null!=t&&null!=t.template&&$("#"+t.template).length)return Pinkman.templates.include({template:t.template,engine:Pinkman.template_engine})?n=Pinkman.templates.get({template:t.template,engine:Pinkman.template_engine}):(n=new Pinkman.object({template:t.template,engine:Pinkman.template_engine}),n.hogan=Hogan.compile($("#"+t.template).html()),Pinkman.templates.push(n)),null!=t.context&&(t.object=t.context),e=n.hogan.render(t.object),null!=t.target&&($("#"+t.target).html(e),null!=t.object&&"object"==typeof t.object&&t.object.isPink&&$("#"+t.target).attr("data-pinkey",t.object.pinkey)),null!=t.callback&&"function"==typeof t.callback&&t.callback(t.object,e),e},markup:function(e){var n,i;if(null!=e&&null!=e.template&&$("#"+e.template).length)return Pinkman.templates.include({template:e.template,engine:Pinkman.template_engine})?i=Pinkman.templates.get({template:e.template,engine:Pinkman.template_engine}):(i=new Pinkman.object({template:e.template,engine:Pinkman.template_engine}),i.markup=function(){var e;return e=1<=arguments.length?t.call(arguments,0):[],Mark.up.apply(Mark,e)},Pinkman.templates.push(i)),null!=e.context&&(e.object=e.context),n=i.markup($("#"+e.template).html(),e.object),null!=e.target&&($("#"+e.target).html(n),null!=e.object&&"object"==typeof e.object&&e.object.isPink&&$("#"+e.target).attr("data-pinkey",e.object.pinkey)),null!=e.callback&&"function"==typeof e.callback&&e.callback(e.object,n),n}},Pinkman.render=function(t){var e;if(null!=t.reRender&&!1===t.reRender||(t.reRender=!0),null!=t.collectionReRender&&!1===t.collectionReRender||(t.collectionReRender=!0),e=Pinkman.template_engines[Pinkman.template_engine],e(t),t.reRender&&null!=t.object&&t.object.isPink)return t.object.renderQueue.directPush(t)},Pinkman.reRender=function(t){var e,n,i,r,o,s,a,l,c;for(n=Pinkman.template_engines[Pinkman.template_engine],l=t.renderQueue.collection,i=0,o=l.length;i<o;i++)a=l[i],n(a);if(null!=t.collections&&a.collectionReRender)for(c=t.collections.collection,r=0,s=c.length;r<s;r++)e=c[r],Pinkman.reRender(e);return t.renderQueue.any()}}.call(this),function(){var t=function(t,n){function i(){this.constructor=t}for(var r in n)e.call(n,r)&&(t[r]=n[r]);return i.prototype=n.prototype,t.prototype=new i,t.__super__=n.prototype,t},e={}.hasOwnProperty,n=[].slice;Pinkman.maxSearchLevel=15,Pinkman.closest=function(t,e){var n;return null==e&&(e=0),t.is("[data-pinkey]")?(n=t.attr("data-pinkey"),Pinkman.get(n)):e<Pinkman.maxSearchLevel?Pinkman.closest(t.parent(),e+1):null},window.PinkmanController=function(e){function i(){var t;t=1<=arguments.length?n.call(arguments,0):[],this.actions=new PinkmanActions,i.__super__.constructor.apply(this,t)}return t(i,e),i.prototype.build=function(){return null!=this.builder&&"function"==typeof this.builder&&(this.builder(this),null!=this.main&&"function"==typeof this.main&&this.main(),!0)},i.prototype.action=function(){var t,e,i,r,o;return e=1<=arguments.length?n.call(arguments,0):[],1===e.length?this.actions.getBy("name",e[0]):(o=e[0],r=e[1],i=e[2],4<=e.length?n.call(e,3):[],t=new PinkmanAction({name:o,eventName:r,call:i,controller:this}),this.actions.push(t),null!=t.call&&"function"==typeof t.call&&t.listen(),t)},i.prototype.bind=function(t,e){var n,i,r,o;if(null==e&&(e=""),Pinkman.isArray(t)){for(o=[],i=0,r=t.length;i<r;i++)n=t[i],o.push(this.bindIndividually(n,e));return o}return this.bindIndividually(t,e)},i.prototype.bindIndividually=function(t,e){return null==e&&(e=""),this.action(t,["keyup","change"],function(){var i,r,o;if(o=arguments[0],r=arguments[1],i=3<=arguments.length?n.call(arguments,2):[],o[t]!==r.val()&&(o.set(t,r.val()),null!=e&&"function"==typeof e))return e.apply(null,[o,r].concat(n.call(i)))})},i.prototype.bindAll=function(){},i.prototype.bottom=function(t){return setTimeout(function(){return null==window._pinkman_lastEndOfPage&&(window._pinkman_lastEndOfPage=0),$(window).scroll(function(){var e,n;if(n=Date.now(),((e=$(document).height()-$(window).scrollTop()-document.body.offsetHeight)<800&&window._pinkman_lastEndOfPage<n||0===e)&&!window._pinkman_bottomTriggered)return window._pinkman_bottomTriggered=!0,window._pinkman_lastEndOfPage=n,t()})},50)},i.prototype.endBottom=function(){return window._pinkman_bottomTriggered=!1},i.prototype.drop=function(t,e){return this.action(t,"click",function(t,n,i){if(null!=e.click&&"function"==typeof e.click)return e.click(t,n,i)}),this.action(t,"dragenter",function(t,n,i){if(null!=e.enter&&"function"==typeof e.enter)return e.enter(t,n,i)}),this.action(t,"dragover",function(t,n,i){if(null!=e.over&&"function"==typeof e.over)return e.over(t,n,i)}),this.action(t,"dragleave",function(t,n,i){return e.leave(t,n,null!=e.leave&&"function"==typeof e.leave?i:void 0)}),this.action(t,"drop",function(t,n,i){if(null!=e.drop&&"function"==typeof e.drop&&e.drop(t,n,i),null!=e.files&&"function"==typeof e.files)return e.files(t,i.originalEvent.dataTransfer.files)})},i}(window.PinkmanObject),window.PinkmanControllers=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(window.PinkmanCollection),window.PinkmanAction=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return t(i,e),i.prototype.mirror=function(t,e){var i;return i=new PinkmanActions,Pinkman.controllers.select({id:t}).each(function(t){return t.actions.select({name:e}).each(function(t){return i.push(t)})}),this.controller.action(this.name,this.eventName,function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],i.each(function(e){return e.call.apply(e,t)})})},i.prototype.redirect=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.mirror.apply(this,t)},i.prototype.redirectTo=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.mirror.apply(this,t)},i.prototype.attach=function(t){var e;if(Pinkman.isString(t))return e=this,$("body").on(t,"#"+e.controller.id+" [data-action='"+e.name+"']",function(n){var i;return"keypress"!==t&&n.preventDefault(),i=window.Pinkman.closest($(this)),e.call(i,$(this),n)})},i.prototype.listen=function(){var t,e,n,i,r;if(Pinkman.isString(this.eventName))return this.attach(this.eventName);if(Pinkman.isArray(this.eventName)){for(i=this.eventName,r=[],e=0,n=i.length;e<n;e++)t=i[e],r.push(this.attach(t));return r}},i}(window.PinkmanObject),window.PinkmanActions=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(window.PinkmanCollection),Pinkman.controllers=new window.PinkmanControllers,Pinkman.controllers.isActive=function(t){return null!=this.find(t)},Pinkman.controllers.def=function(t,e){return $(document).ready(function(){var n;return null!=t&&null!=e&&$("#"+t).length>0&&(n=new PinkmanController({id:t,builder:e}),Pinkman.controllers.push(n),n.build())})},Pinkman.controller=function(){var t,e;return t=1<=arguments.length?n.call(arguments,0):[],1===t.length?Pinkman.controllers.find(t[0]):(e=Pinkman.controllers).def.apply(e,t)}}.call(this),function(){}.call(this);
1
+ (function(){window.sleep=function(n,t){var e;return e=1e3*n,window._sleeping=setTimeout(t,e)},Number.prototype.print=function(n,t,e){var i,r,o,l;return o=this,n=isNaN(n=Math.abs(n))?2:n,e=void 0===e?".":e,t=void 0===t?",":t,l=o<0?"-":"",i=String(parseInt(o=Math.abs(Number(o)||0).toFixed(n))),r=(r=i.length)>3?r%3:0,l+(r?i.substr(0,r)+t:"")+i.substr(r).replace(/(\d{3})(?=\d)/g,"$1"+t)+(n?e+Math.abs(o-i).toFixed(n).slice(2):"")}}).call(this),function(){var n=[].slice;window.Pinkman=function(){function t(){}return t.collections=[],t.objects=[],t.all=[],t.get=function(n){return this.all[n]},t.count=function(){return this.all.length},t.isNumber=function(n){return!isNaN(parseFloat(n))&&isFinite(n)},t.isArray=function(n){return null!=n&&n.constructor===Array},t.isString=function(n){return null!=n&&"string"==typeof n},t.isPrintable=function(n){return this.isString(n)||this.isNumber(n)},t.ctrl_c=function(n){var t,e;e=document.createElement("textarea"),e.style.position="fixed",e.style.top=0,e.style.left=0,e.style.width="2em",e.style.height="2em",e.style.padding=0,e.style.border="none",e.style.outline="none",e.style.boxShadow="none",e.style.background="transparent",e.value=n,document.body.appendChild(e),e.select();try{t=document.execCommand("copy"),this.ctrl_v=n}catch(n){}return document.body.removeChild(e),t},t.doAfter=function(n,t,e){return null==e&&(e="_pinkman_doAfter"),window[e]=window.setTimeout(t,100*n)},t.clearTimeout=function(n){return null==n&&(n="_pinkman_doAfter"),window.clearTimeout(window[n])},t.defineGlobalVar=function(n,t){return window[n]=t},t.onlyOnce=function(){var t,e,i;if(e=arguments[0],t=2<=arguments.length?n.call(arguments,1):[],"function"==typeof e&&(i=new Object,i.f=e.toString(),i.args=t,this.calledFunctions.indexOf(i)===-1))return this.calledFunctions.push(i),e.apply(null,t)},t.json2url=function(n,t){var e,i,r,o;if(null!=n){if(null!=t&&"object"==typeof t&&(r=[],i=Object.keys(t).length,i>=1)){for(e in t)o=t[e],r.push(e+"="+o);n+="?",n+=r.join("&")}return n}return""},t.objToArray=function(n){var t,e,i,r;e=0,t=[];for(i in n)r=n[i],t.push({index:e,key:i,value:r}),e+=1;return t},t.unescape=function(n){var e,i,r,o;if(t.isString(n)){r={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#x2F;":"/","&#x60;":"`","&#x3D;":"="},i=[];for(e in r)o=r[e],i.push("(?:"+e+")");return window.regexp=new RegExp(i.join("+|")+"+","gm"),n.replace(regexp,function(n){return r[n]})}return""},t.calledFunctions=[],t.scope=function(n){var t;if(null!=n)return t=this.getSelfScope(n),null==t&&(t=this.getClassScope(n)),null==t&&(t=this.getAppScope(n)),t},t.hasScope=function(n){return null!=n&&(this.hasSelfScope(n)||this.hasClassScope(n)||this.hasAppScope(n))},t.hasSelfScope=function(n){return null!=n&&null!=n.scope&&""!==n.scope},t.hasClassScope=function(n){return null!=n&&null!=n.constructor.scope&&""!==n.constructor.scope},t.hasAppScope=function(n){return null!=n&&("collection"===n.pinkmanType&&"undefined"!=typeof AppCollection&&null!==AppCollection&&null!=AppCollection.scope&&""!==AppCollection||"object"===n.pinkmanType&&"undefined"!=typeof AppObject&&null!==AppObject&&null!=AppObject.scope&&""!==AppObject.scope)},t.getSelfScope=function(n){if(this.hasSelfScope(n))return n.scope},t.getClassScope=function(n){if(this.hasClassScope(n))return n.constructor.scope},t.getAppScope=function(n){return"object"==typeof n&&"collection"===n.pinkmanType&&"undefined"!=typeof AppCollection&&null!==AppCollection&&null!=AppCollection.scope?AppCollection.scope:"object"==typeof n&&"object"===n.pinkmanType&&"undefined"!=typeof AppObject&&null!==AppObject&&null!=AppObject.scope?AppObject.scope:void 0},t.ready=function(n){return $(document).ready(n)},t.ajax={request:function(n){var t;return null!=n.url&&(t=jQuery.ajax(n.url,{beforeSend:function(n){return n.setRequestHeader("X-CSRF-Token",$('meta[name="csrf-token"]').attr("content"))},type:n.type,dataType:"json",data:n.data}),t.done(function(t){return function(e){return null!=e&&null!=e.errors?null!=n.error&&"function"==typeof n.error&&n.error(t):null!=n.success&&"function"==typeof n.success&&n.success(e),null!=n.complete&&"function"==typeof n.complete&&n.complete(e),!0}}(this)))},get:function(n){return n.type="GET",this.request(n)},post:function(n){return n.type="POST",this.request(n)},put:function(n){return n.type="PUT",this.request(n)},patch:function(n){return n.type="PATCH",this.request(n)},"delete":function(n){return n.type="DELETE",this.request(n)},file:function(n){var t;return null!=n.url&&(t=jQuery.ajax(n.url,{beforeSend:function(n){return n.setRequestHeader("X-CSRF-Token",$('meta[name="csrf-token"]').attr("content"))},xhr:function(){var t;return t=$.ajaxSettings.xhr(),t.upload.addEventListener("progress",function(t){if(t.lengthComputable&&null!=n.progress)return n.progress(t.loaded/t.total)},!1),t.addEventListener("progress",function(t){if(t.lengthComputable&&null!=n.progress)return n.progress(t.loaded/t.total)},!1),t},type:"POST",dataType:"json",data:n.data,processData:!1,contentType:!1}),t.done(function(t){return function(e){return null!=e&&null!=e.errors?(null!=n.error&&"function"==typeof n.error&&n.error(t),!1):(null!=n.success&&"function"==typeof n.success&&n.success(e),null!=n.complete&&"function"==typeof n.complete?n.complete(e):void 0)}}(this)),this)},upload:function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.file.apply(this,t)}},t}(),Pinkman.ready(function(){if(null==Pinkman.pathname&&(Pinkman.pathname=window.location.pathname,"/"!==Pinkman.pathname.charAt([Pinkman.pathname.length]-1)))return Pinkman.pathname=Pinkman.pathname+"/"})}.call(this),function(){window.Pinkman.mixin=function(n,t){var e;if(null!=n&&"string"==typeof n&&null!=t&&"object"==typeof t)return null==Pinkman.mixins&&(Pinkman.mixins=new Pinkman.collection),e=new Pinkman.object,e.set("mix",t),e.set("name",n),Pinkman.mixins.forcePush(e)},window.Pinkman.mixit=function(n,t){var e,i,r,o;if(i=Pinkman.mixins.getBy("name",t),null!=i){o=i.mix;for(r in o)e=o[r],e["super"]=n.prototype[r],n.prototype[r]=e;return!0}return!1}}.call(this),function(){var n=[].slice;window.PinkmanCommon=function(){function t(n){this._listening=!0,this.isPink=!0,this.pinkey=Pinkman.all.length,Pinkman.all.push(this),null!=n&&this.initialize(n)}return t.privateAttributes=["isPink","isObject","isCollection","pinkey","config","pinkmanType","collections","renderQueue","_listening"],t.mixin=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],Pinkman.mixin.apply(Pinkman,t)},t.mixit=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],Pinkman.mixit.apply(Pinkman,[this].concat(n.call(t)))},t.isInstance=function(n){return n.constructor===this},t.prototype.initialize=function(n){var t,e,i;if("object"==typeof n){e=[];for(t in n)i=n[t],PinkmanObject.privateAttributes.indexOf(t)===-1?e.push(this.set(t,i)):e.push(void 0);return e}},t.prototype.api=function(){if(null!=this.config&&null!=this.config.api)return"/"===this.config.api.charAt(0)?this.config.api+"/":"/"+this.config.api+"/"},t.prototype.isInstanceOf=function(n){return this.constructor===n},t.prototype.className=function(){return null!=this.config&&null!=this.config.className?this.config.className:this.constructor.name},t.prototype.set=function(n,t,e){var i;if(null==e&&(e=""),null!=n&&null!=t)return this[n]=t,"function"==typeof e&&e(this),null!=this.pinkey&&this._listening&&(i="__pSync__"+this.pinkey+"__",null!=window[i]&&clearTimeout(window[i]),window[i]=sleep(.005,function(t){return function(){if(t._listening)return t.sync(n)}}(this))),this},t.prototype.sync=function(n){var t,e,i,r,o,l,u;if(null!=this.constructor.__computed)for(o=this.constructor.__computed,e=0,r=o.length;e<r;e++)t=o[e],null!=this[t]&&"function"==typeof this[t]&&Pinkman.sync(this,t,this[t].call(this));if(null!=n&&""!==n)Pinkman.sync(this,n,this[n]);else{l=this.attributes();for(i in l)u=l[i],Pinkman.sync(this,i,u)}return!0},t.prototype.lazySync=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],sleep(.25,function(n){return function(){return n.sync.apply(n,t)}}(this))},t.prototype.stop=function(){return console.log("[deprecated] stop function deprecated. Use unwatch instead."),this._listening=!1},t.prototype.watch=function(){return this._listening=!0},t.prototype.unwatch=function(){return this._listening=!1},t.prototype.unset=function(n,t){return delete this[n],"function"==typeof t&&t(this),this},t.prototype.render=function(n){var t;return"object"==typeof n?(n.object=this,null!=n.template&&""!==n.template||(n.template=n.target+"-template"),Pinkman.render(n)):"string"==typeof n?(t={object:this,target:n,template:n+"-template"},Pinkman.render(t)):null==n?this.reRender():void 0},t.prototype.reRender=function(n){return null==n&&(n=""),Pinkman.reRender(this),"function"==typeof n&&n(this),this},t.prototype.renderFirst=function(){return Pinkman.render(this.renderQueue.first())},t.prototype.renderLast=function(){return Pinkman.render(this.renderQueue.last())},t.prototype.append=function(n){var t,e,i,r,o;if(null!=n&&"object"==typeof n&&null!=n.target){null!=n.template&&""!==n.template||(n.template=n.target+"-template"),e=new Object;for(t in n)r=n[t],"target"!==t&&"callback"!==t&&(e[t]=r);return e.reRender=!1,i=n.target,o=n.wrapIn,e.object=this,e.callback=function(t,e){if(null!=o?$("#"+i).append("<div class='"+o+"'>"+e+"</div>"):$("#"+i).append(e),null!=n.callback&&"function"==typeof n.callback)return n.callback(t,e)},Pinkman.render(e)}if(null!=n&&Pinkman.isString(n))return this.append({template:n+"-template",target:n})},t.prototype.queue=function(n){return n.id=n.template,null==this.renderQueue&&(this.renderQueue=new PinkmanCollection),this.renderQueue.directPush(n)},t.prototype.hasErrorOn=function(n){var t,e,i,r,o;if(null!=n&&(Pinkman.isArray(n)||Pinkman.isString(n))){if(e=Pinkman.isArray(n)?n:[n],o=!0,null!=this.errors)for(i=0,r=e.length;i<r;i++)t=e[i],null!=this.errors[t]&&(o=!1);return!o}},t.prototype.hasErrorsOn=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.hasErrorOn.apply(this,t)},t.prototype.anyErrorOn=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.hasErrorOn.apply(this,t)},t.prototype.anyErrorsOn=function(){var t;return t=1<=arguments.length?n.call(arguments,0):[],this.hasErrorOn.apply(this,t)},t.prototype._data=function(){return{pink_obj:this.json(),scope:Pinkman.scope(this)}},t.compute=function(n){return this.__computed||(this.__computed=[]),this.__computed.indexOf(n)!==-1?this.__computed.push(n):this.__computed.push(n)},t}()}.call(this),function(){var n=function(n,e){function i(){this.constructor=n}for(var r in e)t.call(e,r)&&(n[r]=e[r]);return i.prototype=e.prototype,n.prototype=new i,n.__super__=e.prototype,n},t={}.hasOwnProperty,e=[].slice;window.PinkmanObject=function(t){function i(){var n;n=1<=arguments.length?e.call(arguments,0):[],i.__super__.constructor.apply(this,n),this.isObject=!0,this.pinkmanType="object",this.collections=new PinkmanCollection,Pinkman.objects.push(this)}return n(i,t),i.pinkmanType="object",i.prototype.assign=function(n){var t,e;if("object"==typeof n){for(t in n)e=n[t],"object"==typeof e&&null!=e&&null!=this[t]&&this[t].isPink&&!e.isPink?this[t].assign(e):this.set(t,e);return!0}return!1},i.prototype.attributes=function(){var n,t,e;n=new Object;for(t in this)e=this[t],i.privateAttributes.indexOf(t)===-1&&"function"!=typeof e&&(null!=e&&"object"==typeof e&&e.isPink?n[t]=e.attributes():n[t]=e);return n},i.prototype.json=function(){var n,t,e;n=new Object;for(t in this)e=this[t],i.privateAttributes.indexOf(t)===-1&&"function"!=typeof e&&(null!=e&&"object"==typeof e&&e.isPink?e.isCollection||(n[t]=e.json()):n[t]=e);return n},i.prototype.attributesKeys=function(){return Object.keys(this.attributes())},i.prototype.keys=function(){return this.attributesKeys()},i.prototype.toString=function(){var n,t,e,i,r;for(t=[],t.push("("+this.className()+")"),r=this.attributesKeys(),e=0,i=r.length;e<i;e++)n=r[e],t.push(n+": "+this[n]+";");return t.join(" ")},i.prototype.next=function(n){var t;if(null==n&&(n=""),n.isPink&&"collection"===n.pinkmanType)return n.next(this);if(Pinkman.isNumber(n)){if(t=this.collections.get(n),null!=t)return t.next(this)}else if((null==n||""===n)&&this.collections.any())return this.collections.first().next(this)},i.prototype.prev=function(n){var t;if(null==n&&(n=""),n.isPink&&"collection"===n.pinkmanType)return n.prev(this);if(Pinkman.isNumber(n)){if(t=this.collections.get(n),null!=t)return t.prev(this)}else if((null==n||""===n)&&this.collections.any())return this.collections.first().prev(this)},i.prototype.clearCollections=function(){var n,t,e,i,r;for(i=this.collections.collection,r=[],t=0,e=i.length;t<e;t++)n=i[t],r.push(n.remove(this));return r},i.prototype.removeFromCollections=function(){return this.clearCollections()},i.prototype.removeFromAllCollections=function(){return this.clearCollections()},i.prototype.removeAllCollections=function(){return this.clearCollections()},i.prototype.firstError=function(){var n;if(null!=this.errors)return n=Object.keys(this.errors)[0],n+" "+this.errors[n][0]},i.find=function(n,t){var e,i;return null==t&&(t=""),e=new this,i=new Object,i.scope=Pinkman.scope(this),Pinkman.ajax.get({url:Pinkman.json2url(e.api()+n,i),complete:function(n){if(e.assign(n),null!=e.error||null!=e.errors)throw new Error(e.firstError());if(null!=t&&"function"==typeof t)return t(e)}}),e},i.prototype.create=function(n){if(null==n&&(n=""),null==this.id)return Pinkman.ajax.post({url:this.api(),data:this._data(),complete:function(t){return function(e){if(t.assign(e),null==e.errors&&delete t.errors,null!=n&&"function"==typeof n)return n(t)}}(this)}),this},i.prototype.update=function(n){if(null==n&&(n=""),null!=this.id)return Pinkman.ajax.patch({url:this.api()+this.id,data:this._data(),complete:function(t){return function(e){if(t.assign(e),null==e.errors&&delete t.errors,null!=n&&"function"==typeof n)return n(t)}}(this)}),this},i.prototype.reload=function(n){var t;return t=new Object,t.scope=Pinkman.scope(this),Pinkman.ajax.get({url:Pinkman.json2url(this.api()+this.id,t),complete:function(t){return function(e){if(t.assign(e),null!=t.error||null!=t.errors)throw new Error(t.firstError());if(null!=n&&"function"==typeof n)return n(t)}}(this)}),this},i.prototype.updateAttributes=function(n){return!!this.assign(n)&&this.save(function(n){return n})},i.prototype.save=function(n){return null==n&&(n=""),null!=this.id&&""!==this.id?this.update(n):this.create(n)},i.prototype.destroy=function(n){return null==n&&(n=""),null!=this.id&&(this.removeFromAllCollections(),Pinkman.ajax["delete"]({url:this.api()+this.id,data:{scope:Pinkman.scope(this)},complete:function(t){return function(e){if(t.assign(e),null==e.errors&&delete t.errors,null==t.errors&&(t.id=null),null!=n&&"function"==typeof n)return n(t)}}(this)}),this)},i.prototype["delete"]=function(n){return null==n&&(n=""),null!=this.id&&(Pinkman.ajax["delete"]({url:this.api()+this.id,data:{scope:Pinkman.scope(this)},complete:function(t){return function(e){if(t.assign(e),null==e.errors&&delete t.errors,null==t.errors&&(t.id=null),null!=n&&"function"==typeof n)return n(t)}}(this)}),this)},i}(window.PinkmanCommon),window.Pinkman.object=window.PinkmanObject}.call(this),function(){var n=function(n,e){function i(){this.constructor=n}for(var r in e)t.call(e,r)&&(n[r]=e[r]);return i.prototype=e.prototype,n.prototype=new i,n.__super__=e.prototype,n},t={}.hasOwnProperty,e=[].slice;window.PinkmanCollection=function(t){function i(){var n;n=1<=arguments.length?e.call(arguments,0):[],i.__super__.constructor.apply(this,n),this.isCollection=!0,this.pinkmanType="collection",this.collection=[],Pinkman.collections.push(this)}return n(i,t),i.pinkmanType="collection",i.prototype.config={memberClass:PinkmanObject},i.prototype.attributes=function(){return this.collection},i.prototype.json=function(){var n;return n=[],this.each(function(t){if(t.isPink&&null!=t.json&&"function"==typeof t.json)return n.push(t.json())}),n},i.prototype.sum=function(n,t){var e;return null!=n?(e=0,this.each(function(t){return Pinkman.isNumber(t[n])?e=Number(t[n])+e:null!=t[n]?e=t[n]+e:void 0},function(n){return function(){if("function"==typeof t)return t(n,e)}}(this)),e):("function"==typeof t&&t(this,0),0)},i.prototype.count=function(n){var t,e,i,r,o;if(null==n&&(n=""),null!=n&&"function"==typeof n){for(t=0,o=this.collection,e=0,i=o.length;e<i;e++)r=o[e],n(r)&&t++;return t}return this.collection.length},i.prototype.size=function(n){return null==n&&(n=""),this.count(n)},i.prototype.length=function(n){return null==n&&(n=""),this.count(n)},i.prototype.each=function(n,t){var e,i,r,o,l;if(null==n&&(n=""),null!=n&&"function"==typeof n)for(e=0,l=this.collection,i=0,r=l.length;i<r;i++)o=l[i],e+=1,n(o),e===this.count()&&"function"==typeof t&&t(this);return this},i.prototype.select=function(n,t){var e;return null==t&&(t=""),e=new this.constructor,"function"==typeof n?this.each(function(t){if(n(t))return e.push(t)}):"object"==typeof n&&this.each(function(t){var i,r,o;o=!0;for(i in n)r=n[i],t[i]!==r&&(o=!1);if(o)return PinkmanController.isInstance(t)||PinkmanAction.isInstance(t)?e.forcePush(t):e.push(t)}),"function"==typeof t&&t(e),e},i.prototype.absorb=function(n,t){if("object"==typeof n&&n.isPink&&n.isCollection)return this.each(function(t){return function(e){var i;if(i=n.find(e.id),null!=i)return t.remove(e,function(){return t.forceUnshift(i)})}}(this),t)},i.prototype.substitute=function(n,t,e){if(null!=n&&null!=t&&(this.remove(n),this.push(t),"function"==typeof e))return e()},i.prototype.push=function(n){var t,e,i;if(Pinkman.isArray(n)){for(e=0,i=n.length;e<i;e++)t=n[e],this.pushIndividually(t);return this.include(n)}return this.pushIndividually(n)},i.prototype.unshift=function(n){var t,e,i;if(Pinkman.isArray(n)){for(e=0,i=n.length;e<i;e++)t=n[e],this.unshiftIndividually(t);return this.include(n)}return this.unshiftIndividually(n)},i.prototype.pushIndividually=function(n){return null!=n&&"object"==typeof n&&!this.include(n)&&this.beforeInsertionPrep(n,function(n){return function(t){return n.collection.push(t),t.isObject&&null!=t.collections&&t.collections.push(n),!0}}(this))},i.prototype.directPush=function(n){if(!this.include(n))return this.collection.push(n)},i.prototype.forcePush=function(n){return this.collection.push(n)},i.prototype.directUnshift=function(n){if(!this.include(n))return this.collection.unshift(n)},i.prototype.forceUnshift=function(n){return this.collection.unshift(n)},i.prototype.unshiftIndividually=function(n){return null!=n&&"object"==typeof n&&!this.include(n)&&this.beforeInsertionPrep(n,function(n){return function(t){return n.collection.unshift(t),t.isObject&&null!=t.collections&&t.collections.push(n),!0}}(this))},i.prototype.beforeInsertionPrep=function(n,t){var e;return null==t&&(t=""),n.isPink||(e=this["new"](),e.assign(n),n=e),"function"==typeof t&&t(n),n},i.prototype.pop=function(){return this.remove(this.last())},i.prototype.shift=function(){return this.remove(this.first())},i.prototype.remove=function(n,t){var e,i,r;return"object"==typeof n&&null!=n.id&&null!=(e=this.find(n.id))?(i=this.collection.indexOf(e),this.collection.splice(i,1),r=e):(i=this.collection.indexOf(n),this.collection.splice(i,1),r=n),"function"==typeof t&&t(this),r},i.prototype.removeBy=function(n,t){if(null!=n&&null!=t)return this.remove(this.getBy(n,t))},i.prototype.removeAll=function(){return!this.any()||(this.remove(this.first()),this.removeAll())},i.prototype.include=function(n){var t,e,i,r;if(null!=n&&Pinkman.isArray(n)){for(r=!0,e=0,i=n.length;e<i;e++)t=n[e],this.include(t)||(r=!1);return r}return null!=n&&"object"==typeof n&&(null!=n.id?this.any(function(t){return n.id===t.id}):this.collection.indexOf(n)!==-1)},i.prototype.firstOrInitialize=function(){var n,t;return n=1<=arguments.length?e.call(arguments,0):[],t=this.select.apply(this,n),t.any()?t.first():this.forceNew.apply(this,n)},i.prototype.forceNew=function(){var n,t;return n=1<=arguments.length?e.call(arguments,0):[],t=new this.config.memberClass,t.initialize.apply(t,n),this.push(t),t},i.prototype.first=function(n){return null==n&&(n=1),1===n?this.collection[0]:this.collection.slice(0,+(n-1)+1||9e9)},i.prototype.last=function(n){return null==n&&(n=1),1===n?this.collection[this.collection.length-1]:this.collection.slice(this.collection.length-n-1)},i.prototype.any=function(n){return null==n&&(n=""),null==n||"function"!=typeof n&&"object"!=typeof n?this.count()>0:this.select(n).count()>0},i.prototype.empty=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],!this.any.apply(this,n)},i.prototype.getBy=function(n,t,e){var i;if(null!=n&&null!=t)return i=new Object,i[n]=t,this.getByAttributes(i,e)},i.prototype.getByAttributes=function(n,t){var e,i,r,o,l,u,c;if(null==n||"object"!=typeof n||!this.any())return null;for(u=this.collection,e=0,r=u.length;e<r;e++){l=u[e],o=!0;for(i in n)c=n[i],l[i]!==c&&(o=!1);if(o)return"function"==typeof t&&t(l),l}},i.prototype.getByPinkey=function(n){return this.getBy("pinkey",n)},i.prototype.get=function(){var n;if(n=1<=arguments.length?e.call(arguments,0):[],n.length>0){if(Pinkman.isNumber(n[0]))return this.getByPinkey(n[0]);if(2===n.length)return this.getBy.apply(this,n);if("object"==typeof n[0])return this.getByAttributes(n[0])}},i.prototype.find=function(n,t){var e;if(null!=n)return e=this.getBy("id",n,t)},i.prototype.next=function(n){var t;return t=this.collection.indexOf(n),this.collection[t+1]},i.prototype.prev=function(n){var t;return t=this.collection.indexOf(n),this.collection[t-1]},i.prototype.logPinkeys=function(){return this.each(function(n){return console.log(n.pinkey)})},i.prototype.uniq=function(n){var t,e,i,r;for(null==n&&(n=""),e=[],this.each(function(n){return function(t){return n.each(function(n){if(null!=t.pinkey&&t.pinkey===n.pinkey&&t!==n&&e.push(n),null!=t.id&&t.id===n.id&&t!==n)return e.push(n)})}}(this)),i=0,r=e.length;i<r;i++)t=e[i],this.remove(t);return this},i.prototype.fetchFromArray=function(n){var t,e,i,r;for(e=0,i=n.length;e<i;e++)t=n[e],r=this.beforeInsertionPrep(t),null!=r&&null!=this.find(r.id)?this.find(r.id).assign(r.attributes()):this.push(r);return this},i.prototype.assign=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],this.fetchFromArray.apply(this,n)},i.prototype.merge=function(n){return Pinkman.isArray(n)?this.fetchFromArray(n):"object"==typeof n&&n.isPink&&n.isCollection?this.fetchFromArray(n.collection):void 0},i.prototype["new"]=function(n){return null!=this._new&&null==this._new.id?this._new:(this._new=new this.config.memberClass,this._new.initialize(n),this._new)},i.prototype.reload=function(n){if(null==n&&(n=""),this.any())return this.each(function(t){return function(e){if(null!=e.id)return e.reload(function(e){if(e.pinkey===t.last().pinkey&&"function"===n)return n(t)})}}(this))},i.prototype.makeIndex=function(){var n,t,e,i,r;if(this.any()){for(n=1,r=this.collection,t=0,e=r.length;t<e;t++)i=r[t],i.set("index",n),n++;return!0}return!1},i.prototype.sortBy=function(n,t){var e;return null==t&&(t="asc"),e=this.collection.sort(function(t,e){return"string"==typeof t[n]&&"string"==typeof e[n]?t[n].toLowerCase()>=e[n].toLowerCase()?1:-1:t[n]>=e[n]?1:-1}),this.collection="asc"===t.toLowerCase()?e:e.reverse(),this},i.prototype.shuffle=function(){var n,t,e,i;if(this.any()){for(n=this.collection.length,e=[];0!==n;)t=Math.floor(Math.random()*n),n-=1,i=this.collection[n],this.collection[n]=this.collection[t],e.push(this.collection[t]=i);return e}},i.prototype.rand=function(n){var t,e,i;if(this.any()){for(e=new this.constructor,t=Math.min(n,this.count());0!==t;)i=Math.floor(Math.random()*this.count()),t-=1,e.forcePush(this.collection[i]);return 1===e.count()?e.first():e}},i.prototype.filter=function(n,t,e){var i,r,o,l,u;if(null!=n&&null!=t&&""!==t&&"string"==typeof n){if(this.any())for(i=new this.constructor,u=this.collection,r=0,o=u.length;r<o;r++)l=u[r],l[n]===t?i.push(l):null!=l[n]&&"string"==typeof l[n]&&""!==l[n]&&"string"==typeof t&&""!==t&&l[field].toLowerCase().indexOf(t.toLowerCase())>-1&&i.push(l);return null!=e&&"function"==typeof e&&e(i),i}return!1},i.prototype.fetch=function(n){return null==n&&(n=""),this.fetchFromUrl({url:this.api(),callback:n})},i.prototype.fetchFrom=function(n,t,e){return null!=n&&null!=t&&this.fetchFromUrl({url:this.api()+(n+"/"+t),callback:e})},i.prototype.fetchFromUrl=function(n){if(null!=n&&"object"==typeof n&&null!=n.url)return Pinkman.hasScope(this)&&(null==n.params&&(n.params=new Object),n.params.scope=Pinkman.scope(this)),this.doneFetching=null,this.fetchingFrom=n.url,Pinkman.ajax.get({url:Pinkman.json2url(n.url,n.params),complete:function(t){return function(e){var i;if(null!=e&&(null==e.errors&&null==e.error||(i=[e.errors,e.error],t.errors=i[0],t.error=i[1]),null!=n.params&&null!=n.params.limit?t.doneFetching=e.length<n.params.limit:t.doneFetching=0===e.length,t._recent=new t.constructor,e.length>0&&(t._recent.fetchFromArray(e),t.fetchFromArray(e))),null==e&&(t.doneFetching=!0),null!=n.callback&&"function"==typeof n.callback)return n.callback(t)}}(this)}),this},i.prototype.fetchMore=function(n,t){if(null==n&&(n=10),null==t&&(t=""),!this.doneFetching)return null!=this.fetchingFrom?this.fetchFromUrl({url:this.fetchingFrom,params:{limit:n,offset:this.count()},callback:t}):this.fetchFromUrl({url:this.api(),params:{limit:n,offset:this.count()},callback:t})},i.prototype.fetchMoreFrom=function(n,t,e,i){return null==i&&(i=""),this.fetchFromUrl({url:this.api()+(t+"/"+e),params:{limit:n,offset:this.count()},callback:i})},i.prototype.search=function(n,t){return null==t&&(t=""),this.removeAll(),this.fetchFromUrl({url:this.api()+"search",params:{query:n},callback:t})},i}(window.PinkmanCommon),window.Pinkman.collection=window.PinkmanCollection}.call(this),function(){Pinkman.templates=new Pinkman.collection,Pinkman.template_engine="handlebars",Pinkman.template_engines={handlebars:function(n,t){if("undefined"!=typeof Handlebars&&null!==Handlebars)return n.handlebars=Handlebars.compile(t),n.render=function(n){return this.handlebars(n)},n},hogan:function(n,t){if("undefined"!=typeof Hogan&&null!==Hogan)return n.hogan=Hogan.compile(t),n.render=function(n){return this.hogan.render(n)},n},markup:function(n,t){if("undefined"!=typeof Mark&&null!==Mark)return n.render=function(n){return Mark.up(t,n)},n},template:function(n){var t;return Pinkman.templates.include({template:n.template,engine:n.engine})?t=Pinkman.templates.get({template:n.template,engine:n.engine}):(t=new Pinkman.object({template:n.template,engine:n.engine}),this.compile(n.engine,t,this.templateModifier($("#"+n.template).html())),Pinkman.templates.push(t)),t},templateModifier:function(n){return Pinkman.unescape(this.templateAdapter(this.partialAdapter(n)))},attrAdapterHelper:function(n,t,e,i){var r,o,l;return r=e.split("."),o=r.pop(),r.push("pinkey"),l=r.join("."),t+'<pink data-pinkey="{{ '+l+' }}" data-attribute="'+o+'">{{ '+e+" }}</pink>"+i},templateAdapter:function(n){var t,e,i;return null!=n&&""!==n?(i=/([^'"]){{(?!\.)(?:\s)*([\w\d.]+)(?:\s)*}}([^'"])/gm,t=n.replace(i,this.attrAdapterHelper),e=/{{\./gm,t.replace(e,"{{")):""},partialAdapter:function(n){var t;return null!=n&&""!==n?(t=/{{(?:\s)*partial\((?:\s)*((?:\w|-)*)(?:\s)*\)(?:\s)*}}/gm,n.replace(t,this.partialInception)):""},partialInception:function(n,t){var e;return e=$("script#"+t+".p[type='text/p-partial']"),e.length?e.html():n},context:function(n){return null!=n.context&&(n.object=n.context),null!=n.object&&"object"==typeof n.object||(n.object=new Object),n.object},compile:function(n,t,e){var i;return i=Pinkman.template_engines[n],i(t,e),t},renderOntarget:function(n,t){if(null!=n.target)return $("#"+n.target).html(t),null!=n.object&&"object"==typeof n.object&&n.object.isPink&&$("#"+n.target).attr("data-pinkey",n.object.pinkey),$("#"+n.target+" select").each(function(n,t){var e;return e=Pinkman.get($(t).data("pinkey")),$(t).find("option[value='"+e[$(t).attr("name")]+"']").attr("selected","selected")})},render:function(n){var t,e,i,r,o,l;if(null!=n&&null!=n.template&&$("#"+n.template).length){if(l=this.template(n),t=l.render(this.context(n)),this.renderOntarget(n,t),n.freeze&&null!=Pinkman.scrolling)if("string"==typeof n.freeze)Pinkman.restoreElementScrollPosition(n.freeze);else if(Pinkman.isArray(n.freeze))for(o=n.freeze,e=0,i=o.length;e<i;e++)r=o[e],Pinkman.restoreElementScrollPosition(r);return null!=n.callback&&"function"==typeof n.callback&&n.callback(n.object,t),t}}},Pinkman.__syncing=new Object,Pinkman.sync=function(n,t,e){if("object"==typeof n&&null!=n.pinkey&&null!=n[t]&&(null!=e||Pinkman.isPrintable(n[t])))return null!=e&&""!==e||(e=n[t]),$("pink[data-pinkey='"+n.pinkey+"'][data-attribute='"+t+"']").html(e)},Pinkman.render=function(n){if(null!=n.reRender&&n.reRender===!1||(n.reRender=!0),null!=n.collectionReRender&&n.collectionReRender===!1||(n.collectionReRender=!0),null!=n.engine&&""!==n.engine||(n.engine=Pinkman.template_engine),Pinkman.template_engines.render(n),n.reRender&&null!=n.object&&n.object.isPink)return n.object.queue(n)},null==Pinkman.scrolling&&(Pinkman.scrolling=new PinkmanCollection),Pinkman.saveElementScrollPosition=function(n){var t,e;return t=Pinkman.scrolling.find(n),null==t&&(t=new Pinkman.object),t.set("id",n),e=document.getElementById(n)?document.getElementById(n).scrollTop:0,t.set("position",e),Pinkman.scrolling.push(t)},Pinkman.restoreElementScrollPosition=function(n){if(Pinkman.scrolling.include({id:n}))return document.getElementById(n).scrollTop=Pinkman.scrolling.find(n).position},Pinkman.reRender=function(n){var t,e,i,r,o,l,u,c,s,a,p,f,h;if(null!=n.renderQueue){for(e=!1,p=n.renderQueue.collection,i=0,l=p.length;i<l;i++){if(a=p[i],null!=a.freeze)if("string"==typeof a.freeze)Pinkman.saveElementScrollPosition(a.freeze);else if(Pinkman.isArray(a.freeze))for(f=a.freeze,r=0,u=f.length;r<u;r++)s=f[r],Pinkman.saveElementScrollPosition(s);Pinkman.template_engines.render(a),a.collectionReRender&&(e=!0)}if(e&&null!=n.collections)for(h=n.collections.collection,o=0,c=h.length;o<c;o++)t=h[o],t.reRender();return n.renderQueue.any()}return!0}}.call(this),function(){Pinkman.css=function(n,t,e){return $("style#pinkman-css-injector").append(n+" { "+t+": "+e+"; }")},$(document).ready(function(){if(!$("style#pinkman-css-injector").length&&($("head").append('<style id="pinkman-css-injector" type="text/css">pink{display: inline; margin: 0; padding: 0; color: inherit; background-color: inherit; font: inherit;} template, template *{ display: none !important;}</style>'),null!=document.createElement))return document.createElement("pink")})}.call(this),function(){var n=function(n,e){function i(){this.constructor=n}for(var r in e)t.call(e,r)&&(n[r]=e[r]);return i.prototype=e.prototype,n.prototype=new i,n.__super__=e.prototype,n},t={}.hasOwnProperty,e=[].slice;Pinkman.bottomDistance=800,Pinkman.maxSearchLevel=15,Pinkman.closest=function(n,t){var e;return null==t&&(t=0),n.is("[data-pinkey]")?(e=n.attr("data-pinkey"),Pinkman.get(e)):t<Pinkman.maxSearchLevel?Pinkman.closest(n.parent(),t+1):null},window.PinkmanController=function(t){function i(){var n;n=1<=arguments.length?e.call(arguments,0):[],this.actions=new PinkmanActions,i.__super__.constructor.apply(this,n)}return n(i,t),i.prototype.clear=function(){return this.actions.each(function(n){return n.clear()})},i.prototype.selector=function(){return"#"+this.id},i.prototype.setParams=function(n){var t,e,i;if(e=location.search.substring(1),null!=e&&""!==e?this.params=JSON.parse('{"'+decodeURI(e).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"')+'"}'):this.params=new Object,null!=n&&"object"==typeof n)for(t in n)i=n[t],this.params[t]=i;return this.params},i.prototype.title=function(n){if(Pinkman.isString(n))return $("title").html(n)},i.prototype.build=function(n){return null!=this.builder&&"function"==typeof this.builder&&(this.builder(this),null!=this.main&&(n||$("#"+this.id).length&&"function"==typeof this.main)&&this.main(),!0)},i.prototype.action=function(){var n,t,i,r,o,l,u;return t=1<=arguments.length?e.call(arguments,0):[],1===t.length?this.actions.getBy("name",t[0]):(l=t[0],r=t[1],i=t[2],u=4<=t.length?e.call(t,3):[],o=this.pinkey+"-"+l+"-"+r,n=new PinkmanAction({id:o,name:l,eventName:r,call:i,controller:this}),n.set("selector","#"+n.controller.id+" [data-action='"+n.name+"']"),Pinkman.actions.push(n),this.actions.push(n)&&null!=n.call&&"function"==typeof n.call&&n.listen(),n)},i.prototype.esc=function(n){var t;return t=new PinkmanAction({name:"esc",eventName:"keyup",controller:this}),t.call=function(t,e,i){if(27===i.keyCode)return n()},Pinkman.actions.push(t),this.actions.push(t),t.listen(),t},i.prototype.bind=function(n,t){var e,i,r,o;if(null==t&&(t=""),Pinkman.isArray(n)){for(o=[],i=0,r=n.length;i<r;i++)e=n[i],o.push(this.bindIndividually(e,t));
2
+ return o}return this.bindIndividually(n,t)},i.prototype.bindIndividually=function(n,t){if(null==t&&(t=""),$("#"+this.id).length)return this.action(n,["keyup","change"],function(){var i,r,o;if(o=arguments[0],r=arguments[1],i=3<=arguments.length?e.call(arguments,2):[],o[n]!==r.val()&&(o.set(n,r.val()),null!=t&&"function"==typeof t))return t.apply(null,[o,r].concat(e.call(i)))})},i.prototype.bottom=function(n){if($("#"+this.id).length)return setTimeout(function(){return null==Pinkman._lastEndOfPage&&(Pinkman._lastEndOfPage=0),$(window).scroll(function(){var t,e;if(e=Date.now(),t=$(document).height()-$(window).scrollTop()-document.body.offsetHeight,(t<Pinkman.bottomDistance&&Pinkman._lastEndOfPage<e||0===t)&&!Pinkman._bottomTriggered)return Pinkman._bottomTriggered=!0,Pinkman._lastEndOfPage=e,n()})},50)},i.prototype.endBottom=function(){return Pinkman._bottomTriggered=!1},i.prototype.subscribe=function(n,t){var e,i;if(null==Pinkman.cable)throw"ActionCable not found.";if(null==n||""===n)throw"Channel not specificied.";try{e="function"==typeof t?t:t.callback}catch(n){throw"Callback not found."}return i="object"==typeof t&&null!=t.params?t.params:new Object,i.channel=n,Pinkman.cable.subscriptions.create(i,{received:e})},i.prototype.scrolling=function(n){if($("#"+this.id).length)return $(window).scroll(function(){if(!Pinkman._stopScroll)return Pinkman._stopScroll=!0,n(window.scrollY)})},i.prototype.endScroll=function(){return Pinkman._stopScroll=!1},i.prototype.drop=function(n,t){return this.action(n,"click",function(n,e,i){if(null!=t.click&&"function"==typeof t.click)return t.click(n,e,i)}),this.action(n,"dragenter",function(n,e,i){if(null!=t.enter&&"function"==typeof t.enter)return t.enter(n,e,i)}),this.action(n,"dragover",function(n,e,i){if(null!=t.over&&"function"==typeof t.over)return t.over(n,e,i)}),this.action(n,"dragleave",function(n,e,i){return t.leave(n,e,null!=t.leave&&"function"==typeof t.leave?i:void 0)}),this.action(n,"drop",function(n,e,i){if(null!=Pinkman.dragged?null!=t.drop&&"function"==typeof t.drop&&t.drop(n,e,Pinkman.dragged.obj,Pinkman.dragged.j,i):null!=t.drop&&"function"==typeof t.drop&&t.drop(n,e,i),null!=t.files&&"function"==typeof t.files)return t.files(n,i.originalEvent.dataTransfer.files,e)})},i.prototype.drag=function(n){return this.action(n,"mousedown",function(n,t,e){return t.attr("draggable","true"),Pinkman.dragged=new Pinkman.object({obj:n,j:t,ev:e})})},i.prototype.isActive=function(){return $("#"+this.id).length>0},i}(window.PinkmanObject),window.PinkmanControllers=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.clear=function(n){return this.pinkey===Pinkman.controllers.pinkey&&this.unbindScrolling(),this.each(function(n){return n.clear()},n)},e.prototype.unbindScrolling=function(){return $(window).off("scroll")},e}(window.PinkmanCollection),window.PinkmanAction=function(t){function i(){var n;n=1<=arguments.length?e.call(arguments,0):[],i.__super__.constructor.apply(this,n),this.events=[]}return n(i,t),i.prototype.mirror=function(n,t){var i;return i=new PinkmanActions,Pinkman.controllers.select({id:n}).each(function(n){return n.actions.select({name:t}).each(function(n){return i.forcePush(n)})}),this.call=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],i.call.apply(i,n)},this.listen()},i.prototype.redirect=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],this.mirror.apply(this,n)},i.prototype.redirectTo=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],this.mirror.apply(this,n)},i.prototype.clear=function(){var n,t,e,i,r;for(i=this.events,r=[],t=0,e=i.length;t<e;t++)n=i[t],r.push($("body").off(n,this.selector));return r},i.prototype.attach=function(n){var t;if(Pinkman.isString(n))return t=this,this.events.push(n),$("body").on(n,t.selector,function(e){var i;return"keypress"!==n&&"mousedown"!==n&&e.preventDefault(),i=window.Pinkman.closest($(this)),t.call(i,$(this),e)})},i.prototype.listen=function(){var n,t,e,i,r;if(Pinkman.isString(this.eventName))return this.attach(this.eventName);if(Pinkman.isArray(this.eventName)){for(i=this.eventName,r=[],t=0,e=i.length;t<e;t++)n=i[t],r.push(this.attach(n));return r}},i}(window.PinkmanObject),window.PinkmanActions=function(t){function i(){return i.__super__.constructor.apply(this,arguments)}return n(i,t),i.prototype.call=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],this.each(function(t){return t.call.apply(t,n)})},i.prototype.find=function(n,t){return this.select({name:n},t)},i}(window.PinkmanCollection),Pinkman.controllers=new window.PinkmanControllers,Pinkman.controllers.isActive=function(n){return null!=this.find(n)},Pinkman.controllers.def=function(n,t){return $(document).ready(function(){var e;return null!=n&&null!=t&&(e=new PinkmanController({id:n,builder:t}),Pinkman.controllers.forcePush(e),e.build())})},Pinkman.controller=function(){var n,t;return n=1<=arguments.length?e.call(arguments,0):[],1===n.length?Pinkman.controllers.find(n[0]):(t=Pinkman.controllers).def.apply(t,n)},Pinkman.actions=new PinkmanActions,$(document).ready(function(){return sleep(.1,function(){var n,t;return n=[],Pinkman.actions.each(function(t){if("click"===t.eventName||Pinkman.isArray(t.eventName)&&t.eventName.indexOf("click")!==-1)return n.push(t.selector)}),t=n.join(", "),Pinkman.css(t,"cursor","pointer !important")})})}.call(this),function(){var n=function(n,e){function i(){this.constructor=n}for(var r in e)t.call(e,r)&&(n[r]=e[r]);return i.prototype=e.prototype,n.prototype=new i,n.__super__=e.prototype,n},t={}.hasOwnProperty;window.PinkmanStates=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.config={className:"PinkmanStates",memberClass:function(){return new PinkmanState}},e}(Pinkman.collection),Pinkman.states=new PinkmanStates,window.PinkmanState=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.config={className:"PinkmanState"},e.initialize=function(){var n;if(Pinkman.states.empty()&&"undefined"!=typeof window&&null!==window&&"undefined"!=typeof history&&null!==history&&null!=history.replaceState)return n=Pinkman.states.forceNew({path:window.location.pathname}),history.replaceState({pinkey:n.pinkey},"",n.path)},e.push=function(n){var t;if(Pinkman.isString(n)&&(n=this.normalizePath(n),t=Pinkman.states.forceNew({path:n}),"undefined"!=typeof window&&null!==window&&"undefined"!=typeof history&&null!==history&&null!=history.pushState))return history.pushState({pinkey:t.pinkey},"",n)},e.normalizePath=function(n){return n=n.replace(window.location.origin,""),"/"===n[0]?window.location.origin+n:window.location.origin+"/"+n},e.restore=function(n){var t;if("object"==typeof n&&null!=n.state&&null!=n.state.pinkey)return t=Pinkman.states.firstOrInitialize({pinkey:n.state.pinkey}),null==t.path&&t.set("path",window.location.pathname),t.restore()},e.prototype.restore=function(){return Pinkman.router.restore(this.path)},e}(Pinkman.object),Pinkman.state=PinkmanState,$(document).ready(function(){if("undefined"!=typeof window&&null!==window&&"undefined"!=typeof history&&null!==history)return window.onpopstate=function(n){return Pinkman.state.restore(n)}})}.call(this),function(n,t,e,i,r,o,l){n.GoogleAnalyticsObject=r,n[r]=n[r]||function(){(n[r].q=n[r].q||[]).push(arguments)},n[r].l=1*new Date,o=t.createElement(e),l=t.getElementsByTagName(e)[0],o.async=1,o.src=i,l.parentNode.insertBefore(o,l)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),function(){var n=function(n,e){function i(){this.constructor=n}for(var r in e)t.call(e,r)&&(n[r]=e[r]);return i.prototype=e.prototype,n.prototype=new i,n.__super__=e.prototype,n},t={}.hasOwnProperty,e=[].slice;window.PinkmanPath=function(t){function e(n){var t,i,r,o,l,u,c,s;if(this.levels=new Pinkman.collection,this["static"]=new Pinkman.collection,this.dynamic=new Pinkman.collection,this.params=new Object,e.__super__.constructor.call(this),Pinkman.isString(n)){for(e.isInternal(n)&&(n=n.replace(window.location.origin,"")),t=n.split("/"),""===t[0]&&t.shift(),""===t[t.length-1]&&t.pop(),r=0,s=0,i=0,o=0,u=t.length;o<u;o++)l=t[o],r+=1,c=new Pinkman.object({entry:l,index:r}),/:/.test(l[0])?(i+=1,c.set("dynamic",!0),c.set("static",!1),this.dynamic.push(c)):(s+=1,c.set("dynamic",!1),c.set("static",!0),this["static"].push(c)),this.levels.push(c);this.set("depth",r),this.set("staticDepth",s),this.set("dynamicDepth",i)}}return n(e,t),e.isExternal=function(n){var t,e;return e=new RegExp("^(?:[a-z]+:)?//","i"),t=new RegExp(window.location.origin,"i"),e.test(n)&&!t.test(n)},e.isInternal=function(n){return!this.isExternal(n)},e.prototype.level=function(n){return this.levels.getBy("index",n)},e.prototype.match=function(n){var t;return Pinkman.isString(n)&&(n=new e(n)),!(!e.isInstance(n)||n.depth!==this.depth)&&(t=!0,this["static"].each(function(e){if(e.entry!==n.level(e.index).entry)return t=!1}),t&&this.dynamic.each(function(t){return n.params[t.entry.replace(/:/g,"")]=n.level(t.index).entry}),t)},e}(Pinkman.object),window.PinkmanRouteMatcher=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.initialize=function(n){return null!=this.controllers.any()&&(Pinkman.controllers.unbindScrolling(),this.controllers.each(function(n){return function(t){return t.setParams(n.params()),t.build(!0)}}(this),function(t){return function(){if("function"==typeof n)return n(t.route,t.url)}}(this)))},e.prototype.match=function(n){var t,e,i,r;if(e=new PinkmanPath(n),null!=e){if(t=Pinkman.routes.select({depth:e.depth}),r=t.select(function(n){return n.path.match(e)}),i=r.sortBy("staticDepth","desc").first(),null!=i){if(this.set("url",n),this.set("path",e),this.set("route",i),this.set("controller",this.route.controller),this.set("controllers",Pinkman.controllers.select({id:this.controller})),this.controllers.any())return this;throw"(Pinkman Route) Controller '"+this.route.controller+"' not found."}return!1}},e.prototype.params=function(){if(this.path&&null!=this.path.params)return this.path.params},e}(Pinkman.object),window.PinkmanRoute=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.yieldIn=function(){return this["yield"]||this.container},e}(Pinkman.object),window.PinkmanRoutes=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.config={className:"PinkmanRoutes",memberClass:function(){return new PinkmanRoute}},e.prototype.match=function(n){var t;return t=new PinkmanRouteMatcher,t.match(n)},e}(Pinkman.collection),Pinkman.routes=new PinkmanRoutes,window.PinkmanRouter=function(){function n(){}return n.config=function(n){return $(document).ready(function(t){return function(){if(null==n||"object"!=typeof n||null==n["yield"])throw"(Pinkman Router) Config argument must be a object and must have yield attribute.";if(t._config=n,0===$(t._config["yield"]).length)throw"PinkmanRouter Config: yield must be a valid(present) selector"}}(this))},n.define=function(t){var e;return e=new n,"function"==typeof t&&t(e),e},n.scrolling=new PinkmanCollection,n.saveWindowScroll=function(n){return this.scrolling.firstOrInitialize({id:n}).set("position",window.scrollY)},n.restoreWindowScroll=function(n){var t;return t=this.scrolling.firstOrInitialize({id:n}),null==t.position&&(t.position=0),window.scrollTo(0,t.position)},n.analytics={create:function(n){return console.log("chamou"),console.log(n),ga("create",n,"auto"),ga("send","pageview")},send:function(n,t){var e;return null!=this.created&&this.created?(e=new RegExp(window.location.origin),t=e.test(t)?t.replace(e,""):t,ga("set","page",t),ga("send","pageview",t)):(console.log(this),this.create(Pinkman.router._config.analytics),this.created=!0)}},n.render=function(n,t){var i;return null!=Pinkman.routes.current&&this.saveWindowScroll(Pinkman.routes.current.controller),Pinkman.state.initialize(),i=n.route.yieldIn()||this._config["yield"],n.route.blank&&$(i).html("<div class='pink-yield' id='"+n.controller+"'></div>"),n.initialize(function(n){return function(){var i,r,o;if(i=1<=arguments.length?e.call(arguments,0):[],null!=n._config.analytics&&(r=n.analytics).send.apply(r,i),"function"==typeof t&&t(),"function"==typeof n._config.callback)return(o=n._config).callback.apply(o,i)}}(this)),Pinkman.routes.set("current",n.route),Pinkman.router._config.freeze||null!=n.options&&n.options.freeze?sleep(.15,function(t){return function(){return t.restoreWindowScroll(n.route.controller)}}(this)):window.scrollTo(0,0),!0},n.activate=function(n,t,e){var i;return i=Pinkman.routes.match(n),!(null==i||!i)&&(i.options=e,null!=this._config.transition&&"function"==typeof this._config.transition?this._config.transition(function(n){return function(){return n.render(i,t)}}(this)):this.render(i,t))},n.visit=function(n){return this.activate(n,function(){return Pinkman.state.push(n)})},n.force=function(n){if(!this.visit(n))return window.location=n},n.restore=function(n){if(!this.activate(n,null,{freeze:!0}))return window.location=n},n.redirect=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],this.force.apply(this,n)},n.redirectTo=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],this.force.apply(this,n)},n.go=function(){var n;return n=1<=arguments.length?e.call(arguments,0):[],this.force.apply(this,n)},n.forward=function(){if(null!=window.history)return window.history.forward()},n.back=function(){if(null!=window.history)return window.history.back()},n.start=function(){return Pinkman.ready(function(n){return function(){return Pinkman.router=n,n.activate(window.location.pathname),$("body").on("click","a",function(t){var e;if(t.preventDefault(),e=t.currentTarget.href,null==e||!n.visit(e))return window.location=e})}}(this))},n.prototype.get=function(n,t){var e,i;if(Pinkman.isString(n))return e=new PinkmanPath(n),i=new PinkmanRoute,i.set("id",n),i.set("url",n),i.set("path",e).set("depth",e.depth).set("staticDepth",e.staticDepth).set("dynamicDepth",e.dynamicDepth),i.set("blank",!0),i.set("controller",null!=t&&null!=t.controller?t.controller:e.level(1).entry),null!=t&&"object"==typeof t&&((null!=t.keep&&t.keep||null!=t.blank&&!t.blank)&&i.set("blank",!1),i.set("yield",t.container||t["yield"])),Pinkman.routes.push(i),i},n.prototype.root=function(n){return this.get("/",{controller:n})},n}()}.call(this),function(){"undefined"!=typeof ActionCable&&null!==ActionCable&&(Pinkman.cable=ActionCable.createConsumer())}.call(this);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinkman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.8
4
+ version: 0.9.9.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agilso Oliveira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2018-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -199,28 +199,85 @@ files:
199
199
  - app/assets/javascripts/pinkman_with_handlebars.js
200
200
  - app/assets/javascripts/pinkman_with_hogan.js
201
201
  - app/assets/javascripts/pinkman_with_markup.js
202
- - app/helpers/pinkman_helper.rb
202
+ - app/assets/stylesheets/_colors.scss
203
+ - app/assets/stylesheets/_custom_colors.scss
204
+ - app/assets/stylesheets/_mixins.scss
205
+ - app/assets/stylesheets/_settings.scss
206
+ - app/assets/stylesheets/pinkman.css
207
+ - app/assets/stylesheets/pinkman/buttons.scss
208
+ - app/assets/stylesheets/pinkman/colors.scss
209
+ - app/assets/stylesheets/pinkman/containers.scss
210
+ - app/assets/stylesheets/pinkman/elements.scss
211
+ - app/assets/stylesheets/pinkman/forms.scss
212
+ - app/assets/stylesheets/pinkman/grid.scss
213
+ - app/assets/stylesheets/pinkman/imgs.scss
214
+ - app/assets/stylesheets/pinkman/lists.scss
215
+ - app/assets/stylesheets/pinkman/loaders.scss
216
+ - app/assets/stylesheets/pinkman/margins.scss
217
+ - app/assets/stylesheets/pinkman/portfolio.scss
218
+ - app/assets/stylesheets/pinkman/pygments.css.erb
219
+ - app/assets/stylesheets/pinkman/reset.scss
220
+ - app/assets/stylesheets/pinkman/sector.scss
221
+ - app/assets/stylesheets/pinkman/tables.scss
222
+ - app/assets/stylesheets/pinkman/typo.scss
223
+ - app/controllers/pinkman/pinkman_controller.rb
224
+ - app/helpers/pinkman/pinkman_helper.rb
225
+ - app/views/pinkman/_error_for.html.slim
226
+ - app/views/pinkman/pinkman/_form_input.html.slim
227
+ - app/views/pinkman/pinkman/_form_select.html.slim
228
+ - app/views/pinkman/pinkman/_form_textarea.html.slim
229
+ - app/views/pinkman/pinkman/hello.html.erb
203
230
  - bin/console
204
231
  - bin/setup
232
+ - config/routes.rb
205
233
  - lib/generators/pinkman/USAGE
206
234
  - lib/generators/pinkman/api_generator.rb
207
235
  - lib/generators/pinkman/app_base_generator.rb
236
+ - lib/generators/pinkman/controller_generator.rb
237
+ - lib/generators/pinkman/crud_generator.rb
238
+ - lib/generators/pinkman/initializer_generator.rb
208
239
  - lib/generators/pinkman/install_generator.rb
209
240
  - lib/generators/pinkman/model_generator.rb
241
+ - lib/generators/pinkman/page_generator.rb
210
242
  - lib/generators/pinkman/resource_generator.rb
243
+ - lib/generators/pinkman/route_generator.rb
244
+ - lib/generators/pinkman/route_resource_generator.rb
211
245
  - lib/generators/pinkman/serializer_generator.rb
246
+ - lib/generators/pinkman/template_generator.rb
212
247
  - lib/generators/pinkman/templates/api.rb.erb
213
248
  - lib/generators/pinkman/templates/api_controller.rb
249
+ - lib/generators/pinkman/templates/app.coffee.erb
250
+ - lib/generators/pinkman/templates/app_app.coffee.erb
214
251
  - lib/generators/pinkman/templates/app_collection.coffee.erb
215
252
  - lib/generators/pinkman/templates/app_object.coffee.erb
253
+ - lib/generators/pinkman/templates/app_router.coffee.erb
254
+ - lib/generators/pinkman/templates/app_routes.coffee.erb
216
255
  - lib/generators/pinkman/templates/collection.coffee.erb
256
+ - lib/generators/pinkman/templates/controller.coffee.erb
257
+ - lib/generators/pinkman/templates/example.mixin.coffee.erb
258
+ - lib/generators/pinkman/templates/hello.controller.coffee.erb
259
+ - lib/generators/pinkman/templates/initializer.rb.erb
260
+ - lib/generators/pinkman/templates/my.pinkman.app.js
217
261
  - lib/generators/pinkman/templates/object.coffee.erb
262
+ - lib/generators/pinkman/templates/pink_template.html.erb.erb
263
+ - lib/generators/pinkman/templates/pink_template.html.haml.erb
264
+ - lib/generators/pinkman/templates/pink_template.html.slim.erb
218
265
  - lib/generators/pinkman/templates/serializer.rb.erb
219
266
  - lib/pinkman.rb
267
+ - lib/pinkman/base_helper.rb
268
+ - lib/pinkman/form_helper.rb
269
+ - lib/pinkman/form_helper/form_helpers.rb
220
270
  - lib/pinkman/serializer.rb
221
271
  - lib/pinkman/serializer/base.rb
222
272
  - lib/pinkman/serializer/scope.rb
223
273
  - lib/pinkman/version.rb
274
+ - lib/pinkman/views_helpers.rb
275
+ - lib/pinkman/views_helpers/collection_helper.rb
276
+ - lib/pinkman/views_helpers/conditional_helper.rb
277
+ - lib/pinkman/views_helpers/dispatcher.rb
278
+ - lib/pinkman/views_helpers/form_helper.rb
279
+ - lib/pinkman/views_helpers/template_helper.rb
280
+ - lib/pinkman/views_helpers/writer_helper.rb
224
281
  - pinkman.gemspec
225
282
  - public/javascripts/pinkman.min.js
226
283
  - public/jquery.pinkman.min.js
@@ -245,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
302
  version: '0'
246
303
  requirements: []
247
304
  rubyforge_project:
248
- rubygems_version: 2.5.1
305
+ rubygems_version: 2.7.3
249
306
  signing_key:
250
307
  specification_version: 4
251
308
  summary: Small Rails-js framework.
@@ -1,87 +0,0 @@
1
- module PinkmanHelper
2
-
3
- def input hash, *args, &block
4
- name = hash[:name]
5
- hash[:type] ||= 'text'
6
- tag('input',hash.merge(data: {pinkey: pinkey, action: name}, value: write(name)), *args, &block)
7
- end
8
-
9
- def textarea hash, *args
10
- name = hash[:name]
11
- content_tag('textarea',hash.merge(data: {pinkey: pinkey, action: name}, value: write(name)), *args) do
12
- write_and_escape_sync(name)
13
- end
14
- end
15
-
16
-
17
- def template path, &block
18
- # definition mode
19
- if block_given?
20
- name = path.to_s
21
- id = (/(?:-template)$/ =~ name) ? name : (name +'-template')
22
- content_tag('script',{id: id, type: 'text/p-template'}, &block)
23
- # rendering template partial mode
24
- else
25
- render partial: "pinkman/#{path}"
26
- end
27
- end
28
-
29
- def partial path, &block
30
- # definition mode
31
- name = path.to_s
32
- id = (/(?:-template)$/ =~ name) ? name : (name +'-template')
33
- if block_given?
34
- content_tag('script',{id: id, type: 'text/p-partial', class: 'p'}, &block)
35
- # rendering template partial mode
36
- else
37
- raw("{{ partial(#{id}) }}")
38
- end
39
- end
40
-
41
- def load_templates
42
- if Rails
43
- dir = Rails.root.join('app','views','pinkman')
44
- files = Dir.glob(dir.join('**/_*')).map do |f|
45
- f.sub(Regexp.new("#{dir.to_s}(?:[\\\/])"),'').sub(/_/,'')
46
- end
47
- raw(files.map{|f| template(f)}.join("\n"))
48
- else
49
- raise 'Rails application not found.'
50
- end
51
- end
52
-
53
- def wrap_in tag, &block
54
- raw "\n{{# #{tag} }}\n \t #{capture(&block)} \n{{/ #{tag} }}\n" if block_given?
55
- end
56
-
57
- def collection &block
58
- wrap_in('collection',&block)
59
- end
60
-
61
- def each &block
62
- collection(&block)
63
- end
64
-
65
- def write string
66
- raw("{{#{string}}}")
67
- end
68
- alias w write
69
-
70
- def write_and_escape_sync string
71
- raw("{{. #{string} }}")
72
- end
73
- alias _w write_and_escape_sync
74
-
75
- def pinkey
76
- w('pinkey')
77
- end
78
-
79
- def _if condition, &block
80
- wrap_in(condition,&block)
81
- end
82
-
83
- def _unless condition, &block
84
- raw "\n{{^ #{condition} }}\n \t #{capture(&block)} \n{{/ #{condition} }}\n" if block_given?
85
- end
86
-
87
- end