vasp-cli 0.4.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/README.md +57 -2
  2. package/dist/vasp +201 -35
  3. package/package.json +2 -2
  4. package/starters/minimal.vasp +1 -1
  5. package/starters/recipe.vasp +11 -20
  6. package/starters/todo-auth-ssr.vasp +33 -20
  7. package/starters/todo.vasp +15 -8
  8. package/templates/shared/.gitignore.hbs +1 -0
  9. package/templates/shared/auth/server/index.hbs +4 -8
  10. package/templates/shared/auth/server/middleware.hbs +33 -15
  11. package/templates/{templates/shared → shared}/auth/server/plugin.hbs +0 -2
  12. package/templates/shared/auth/server/providers/github.hbs +1 -1
  13. package/templates/shared/auth/server/providers/google.hbs +1 -1
  14. package/templates/shared/auth/server/providers/usernameAndPassword.hbs +3 -6
  15. package/templates/shared/bunfig.toml.hbs +3 -0
  16. package/templates/shared/drizzle/schema.hbs +38 -19
  17. package/templates/shared/package.json.hbs +11 -3
  18. package/templates/shared/server/db/client.hbs +19 -1
  19. package/templates/shared/server/db/seed.hbs +16 -0
  20. package/templates/shared/server/index.hbs +47 -0
  21. package/templates/shared/server/middleware/errorHandler.hbs +75 -0
  22. package/templates/shared/server/middleware/logger.hbs +74 -0
  23. package/templates/shared/server/middleware/rateLimit.hbs +2 -2
  24. package/templates/shared/server/routes/_vasp.hbs +37 -0
  25. package/templates/shared/server/routes/actions/_action.hbs +5 -1
  26. package/templates/shared/server/routes/api/_api.hbs +24 -0
  27. package/templates/shared/server/routes/crud/_crud.hbs +58 -10
  28. package/templates/shared/server/routes/queries/_query.hbs +5 -1
  29. package/templates/shared/shared/types.hbs +58 -0
  30. package/templates/shared/shared/validation.hbs +20 -0
  31. package/templates/shared/tests/actions/_action.test.js.hbs +7 -0
  32. package/templates/shared/tests/actions/_action.test.ts.hbs +7 -0
  33. package/templates/shared/tests/auth/login.test.js.hbs +7 -0
  34. package/templates/shared/tests/auth/login.test.ts.hbs +7 -0
  35. package/templates/shared/tests/crud/_entity.test.js.hbs +7 -0
  36. package/templates/shared/tests/crud/_entity.test.ts.hbs +7 -0
  37. package/templates/shared/tests/queries/_query.test.js.hbs +7 -0
  38. package/templates/shared/tests/queries/_query.test.ts.hbs +7 -0
  39. package/templates/shared/tests/setup.js.hbs +5 -0
  40. package/templates/shared/tests/setup.ts.hbs +5 -0
  41. package/templates/shared/tests/vitest.config.js.hbs +8 -0
  42. package/templates/shared/tests/vitest.config.ts.hbs +8 -0
  43. package/templates/shared/tsconfig.json.hbs +2 -1
  44. package/templates/spa/js/src/App.vue.hbs +9 -1
  45. package/templates/spa/js/src/components/VaspErrorBoundary.vue.hbs +33 -0
  46. package/templates/spa/js/src/components/VaspNotifications.vue.hbs +60 -0
  47. package/templates/spa/js/src/vasp/auth.js.hbs +31 -15
  48. package/templates/spa/js/src/vasp/client/actions.js.hbs +7 -1
  49. package/templates/spa/js/src/vasp/client/crud.js.hbs +94 -5
  50. package/templates/spa/js/src/vasp/useVaspNotifications.js.hbs +35 -0
  51. package/templates/spa/js/vite.config.js.hbs +1 -0
  52. package/templates/spa/ts/src/App.vue.hbs +9 -1
  53. package/templates/spa/ts/src/components/VaspErrorBoundary.vue.hbs +33 -0
  54. package/templates/spa/ts/src/components/VaspNotifications.vue.hbs +60 -0
  55. package/templates/spa/ts/src/vasp/auth.ts.hbs +31 -15
  56. package/templates/spa/ts/src/vasp/client/actions.ts.hbs +7 -1
  57. package/templates/spa/ts/src/vasp/client/crud.ts.hbs +96 -10
  58. package/templates/spa/ts/src/vasp/client/types.ts.hbs +14 -28
  59. package/templates/spa/ts/src/vasp/useVaspNotifications.ts.hbs +41 -0
  60. package/templates/spa/ts/vite.config.ts.hbs +1 -0
  61. package/templates/ssr/js/error.vue.hbs +23 -0
  62. package/templates/ssr/js/nuxt.config.js.hbs +1 -0
  63. package/templates/ssr/ts/error.vue.hbs +26 -0
  64. package/templates/ssr/ts/nuxt.config.ts.hbs +1 -0
  65. package/templates/starters/minimal.vasp +15 -0
  66. package/templates/starters/recipe.vasp +70 -0
  67. package/templates/starters/todo-auth-ssr.vasp +65 -0
  68. package/templates/starters/todo.vasp +42 -0
  69. package/templates/templates/shared/.env.example.hbs +0 -14
  70. package/templates/templates/shared/.gitignore.hbs +0 -8
  71. package/templates/templates/shared/auth/client/Login.vue.hbs +0 -46
  72. package/templates/templates/shared/auth/client/Register.vue.hbs +0 -42
  73. package/templates/templates/shared/auth/server/index.hbs +0 -46
  74. package/templates/templates/shared/auth/server/middleware.hbs +0 -33
  75. package/templates/templates/shared/auth/server/providers/github.hbs +0 -48
  76. package/templates/templates/shared/auth/server/providers/google.hbs +0 -53
  77. package/templates/templates/shared/auth/server/providers/usernameAndPassword.hbs +0 -66
  78. package/templates/templates/shared/bunfig.toml.hbs +0 -5
  79. package/templates/templates/shared/drizzle/drizzle.config.hbs +0 -10
  80. package/templates/templates/shared/drizzle/schema.hbs +0 -48
  81. package/templates/templates/shared/jobs/_job.hbs +0 -34
  82. package/templates/templates/shared/jobs/boss.hbs +0 -15
  83. package/templates/templates/shared/package.json.hbs +0 -38
  84. package/templates/templates/shared/server/db/client.hbs +0 -12
  85. package/templates/templates/shared/server/index.hbs +0 -73
  86. package/templates/templates/shared/server/middleware/csrf.hbs +0 -34
  87. package/templates/templates/shared/server/middleware/rateLimit.hbs +0 -44
  88. package/templates/templates/shared/server/routes/actions/_action.hbs +0 -20
  89. package/templates/templates/shared/server/routes/crud/_crud.hbs +0 -86
  90. package/templates/templates/shared/server/routes/jobs/_schedule.hbs +0 -12
  91. package/templates/templates/shared/server/routes/queries/_query.hbs +0 -20
  92. package/templates/templates/shared/server/routes/realtime/_channel.hbs +0 -78
  93. package/templates/templates/shared/server/routes/realtime/index.hbs +0 -9
  94. package/templates/templates/shared/tsconfig.json.hbs +0 -21
  95. package/templates/templates/spa/js/index.html.hbs +0 -12
  96. package/templates/templates/spa/js/src/App.vue.hbs +0 -3
  97. package/templates/templates/spa/js/src/main.js.hbs +0 -9
  98. package/templates/templates/spa/js/src/router/index.js.hbs +0 -41
  99. package/templates/templates/spa/js/src/vasp/auth.js.hbs +0 -45
  100. package/templates/templates/spa/js/src/vasp/client/actions.js.hbs +0 -15
  101. package/templates/templates/spa/js/src/vasp/client/crud.js.hbs +0 -30
  102. package/templates/templates/spa/js/src/vasp/client/index.js.hbs +0 -16
  103. package/templates/templates/spa/js/src/vasp/client/queries.js.hbs +0 -15
  104. package/templates/templates/spa/js/src/vasp/client/realtime.js.hbs +0 -51
  105. package/templates/templates/spa/js/src/vasp/plugin.js.hbs +0 -11
  106. package/templates/templates/spa/js/vite.config.js.hbs +0 -26
  107. package/templates/templates/spa/ts/index.html.hbs +0 -12
  108. package/templates/templates/spa/ts/src/App.vue.hbs +0 -3
  109. package/templates/templates/spa/ts/src/main.ts.hbs +0 -9
  110. package/templates/templates/spa/ts/src/router/index.ts.hbs +0 -41
  111. package/templates/templates/spa/ts/src/vasp/auth.ts.hbs +0 -53
  112. package/templates/templates/spa/ts/src/vasp/client/actions.ts.hbs +0 -19
  113. package/templates/templates/spa/ts/src/vasp/client/crud.ts.hbs +0 -37
  114. package/templates/templates/spa/ts/src/vasp/client/index.ts.hbs +0 -17
  115. package/templates/templates/spa/ts/src/vasp/client/queries.ts.hbs +0 -19
  116. package/templates/templates/spa/ts/src/vasp/client/realtime.ts.hbs +0 -56
  117. package/templates/templates/spa/ts/src/vasp/client/types.ts.hbs +0 -33
  118. package/templates/templates/spa/ts/src/vasp/plugin.ts.hbs +0 -12
  119. package/templates/templates/spa/ts/vite.config.ts.hbs +0 -26
  120. package/templates/templates/ssr/js/_page.vue.hbs +0 -10
  121. package/templates/templates/ssr/js/app.vue.hbs +0 -3
  122. package/templates/templates/ssr/js/composables/useAuth.js.hbs +0 -52
  123. package/templates/templates/ssr/js/composables/useVasp.js.hbs +0 -6
  124. package/templates/templates/ssr/js/middleware/auth.js.hbs +0 -8
  125. package/templates/templates/ssr/js/nuxt.config.js.hbs +0 -15
  126. package/templates/templates/ssr/js/plugins/vasp.client.js.hbs +0 -27
  127. package/templates/templates/ssr/js/plugins/vasp.server.js.hbs +0 -33
  128. package/templates/templates/ssr/ts/_page.vue.hbs +0 -10
  129. package/templates/templates/ssr/ts/app.vue.hbs +0 -3
  130. package/templates/templates/ssr/ts/composables/useAuth.ts.hbs +0 -56
  131. package/templates/templates/ssr/ts/composables/useVasp.ts.hbs +0 -10
  132. package/templates/templates/ssr/ts/middleware/auth.ts.hbs +0 -8
  133. package/templates/templates/ssr/ts/nuxt.config.ts.hbs +0 -19
  134. package/templates/templates/ssr/ts/plugins/vasp.client.ts.hbs +0 -27
  135. package/templates/templates/ssr/ts/plugins/vasp.server.ts.hbs +0 -33
  136. /package/templates/{templates/shared → shared}/.env.hbs +0 -0
  137. /package/templates/{templates/shared → shared}/README.md.hbs +0 -0
package/dist/vasp CHANGED
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- var U8=Object.create;var{getPrototypeOf:F8,defineProperty:w$,getOwnPropertyNames:Q8}=Object;var qf=Object.prototype.hasOwnProperty;function _f(_){return this[_]}var $f,ff,q_=(_,q,$)=>{var f=_!=null&&typeof _==="object";if(f){var K=q?$f??=new WeakMap:ff??=new WeakMap,P=K.get(_);if(P)return P}$=_!=null?U8(F8(_)):{};let j=q||!_||!_.__esModule?w$($,"default",{value:_,enumerable:!0}):$;for(let v of Q8(_))if(!qf.call(j,v))w$(j,v,{get:_f.bind(_,v),enumerable:!0});if(f)K.set(_,j);return j};var H=(_,q)=>()=>(q||_((q={exports:{}}).exports,q),q.exports);var $q=import.meta.require;var $_=H((b7,__)=>{var Gq=process||{},O$=Gq.argv||[],tq=Gq.env||{},Kf=!(!!tq.NO_COLOR||O$.includes("--no-color"))&&(!!tq.FORCE_COLOR||O$.includes("--color")||Gq.platform==="win32"||(Gq.stdout||{}).isTTY&&tq.TERM!=="dumb"||!!tq.CI),Pf=(_,q,$=_)=>(f)=>{let K=""+f,P=K.indexOf(q,_.length);return~P?_+jf(K,q,$,P)+q:_+K+q},jf=(_,q,$,f)=>{let K="",P=0;do K+=_.substring(P,f)+$,P=f+q.length,f=_.indexOf(q,P);while(~f);return K+_.substring(P)},Y$=(_=Kf)=>{let q=_?Pf:()=>String;return{isColorSupported:_,reset:q("\x1B[0m","\x1B[0m"),bold:q("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:q("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:q("\x1B[3m","\x1B[23m"),underline:q("\x1B[4m","\x1B[24m"),inverse:q("\x1B[7m","\x1B[27m"),hidden:q("\x1B[8m","\x1B[28m"),strikethrough:q("\x1B[9m","\x1B[29m"),black:q("\x1B[30m","\x1B[39m"),red:q("\x1B[31m","\x1B[39m"),green:q("\x1B[32m","\x1B[39m"),yellow:q("\x1B[33m","\x1B[39m"),blue:q("\x1B[34m","\x1B[39m"),magenta:q("\x1B[35m","\x1B[39m"),cyan:q("\x1B[36m","\x1B[39m"),white:q("\x1B[37m","\x1B[39m"),gray:q("\x1B[90m","\x1B[39m"),bgBlack:q("\x1B[40m","\x1B[49m"),bgRed:q("\x1B[41m","\x1B[49m"),bgGreen:q("\x1B[42m","\x1B[49m"),bgYellow:q("\x1B[43m","\x1B[49m"),bgBlue:q("\x1B[44m","\x1B[49m"),bgMagenta:q("\x1B[45m","\x1B[49m"),bgCyan:q("\x1B[46m","\x1B[49m"),bgWhite:q("\x1B[47m","\x1B[49m"),blackBright:q("\x1B[90m","\x1B[39m"),redBright:q("\x1B[91m","\x1B[39m"),greenBright:q("\x1B[92m","\x1B[39m"),yellowBright:q("\x1B[93m","\x1B[39m"),blueBright:q("\x1B[94m","\x1B[39m"),magentaBright:q("\x1B[95m","\x1B[39m"),cyanBright:q("\x1B[96m","\x1B[39m"),whiteBright:q("\x1B[97m","\x1B[39m"),bgBlackBright:q("\x1B[100m","\x1B[49m"),bgRedBright:q("\x1B[101m","\x1B[49m"),bgGreenBright:q("\x1B[102m","\x1B[49m"),bgYellowBright:q("\x1B[103m","\x1B[49m"),bgBlueBright:q("\x1B[104m","\x1B[49m"),bgMagentaBright:q("\x1B[105m","\x1B[49m"),bgCyanBright:q("\x1B[106m","\x1B[49m"),bgWhiteBright:q("\x1B[107m","\x1B[49m")}};__.exports=Y$();__.exports.createColors=Y$});var p=H((uf)=>{uf.__esModule=!0;uf.extend=J$;uf.indexOf=zf;uf.escapeExpression=Hf;uf.isEmpty=Wf;uf.createFrame=Jf;uf.blockParams=Zf;uf.appendContextPath=mf;var hf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},Tf=/[&<>"'`=]/g,kf=/[&<>"'`=]/;function rf(_){return hf[_]}function J$(_){for(var q=1;q<arguments.length;q++)for(var $ in arguments[q])if(Object.prototype.hasOwnProperty.call(arguments[q],$))_[$]=arguments[q][$];return _}var Y_=Object.prototype.toString;uf.toString=Y_;var O_=function(q){return typeof q==="function"};if(O_(/x/))uf.isFunction=O_=function(_){return typeof _==="function"&&Y_.call(_)==="[object Function]"};uf.isFunction=O_;var Z$=Array.isArray||function(_){return _&&typeof _==="object"?Y_.call(_)==="[object Array]":!1};uf.isArray=Z$;function zf(_,q){for(var $=0,f=_.length;$<f;$++)if(_[$]===q)return $;return-1}function Hf(_){if(typeof _!=="string"){if(_&&_.toHTML)return _.toHTML();else if(_==null)return"";else if(!_)return _+"";_=""+_}if(!kf.test(_))return _;return _.replace(Tf,rf)}function Wf(_){if(!_&&_!==0)return!0;else if(Z$(_)&&_.length===0)return!0;else return!1}function Jf(_){var q=J$({},_);return q._parent=_,q}function Zf(_,q){return _.path=q,_}function mf(_,q){return(_?_+".":"")+q}});var t=H((m$,u$)=>{m$.__esModule=!0;var h_=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function T_(_,q){var $=q&&q.loc,f=void 0,K=void 0,P=void 0,j=void 0;if($)f=$.start.line,K=$.end.line,P=$.start.column,j=$.end.column,_+=" - "+f+":"+P;var v=Error.prototype.constructor.call(this,_);for(var O=0;O<h_.length;O++)this[h_[O]]=v[h_[O]];if(Error.captureStackTrace)Error.captureStackTrace(this,T_);try{if($)if(this.lineNumber=f,this.endLineNumber=K,Object.defineProperty)Object.defineProperty(this,"column",{value:P,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0});else this.column=P,this.endColumn=j}catch(w){}}T_.prototype=Error();m$.default=T_;u$.exports=m$.default});var A$=H((n$,o$)=>{n$.__esModule=!0;var k_=p();n$.default=function(_){_.registerHelper("blockHelperMissing",function(q,$){var{inverse:f,fn:K}=$;if(q===!0)return K(this);else if(q===!1||q==null)return f(this);else if(k_.isArray(q))if(q.length>0){if($.ids)$.ids=[$.name];return _.helpers.each(q,$)}else return f(this);else{if($.data&&$.ids){var P=k_.createFrame($.data);P.contextPath=k_.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(q,$)}})};o$.exports=n$.default});var e$=H((X$,p$)=>{X$.__esModule=!0;function Mf(_){return _&&_.__esModule?_:{default:_}}var zq=p(),Nf=t(),cf=Mf(Nf);X$.default=function(_){_.registerHelper("each",function(q,$){if(!$)throw new cf.default("Must pass iterator to #each");var{fn:f,inverse:K}=$,P=0,j="",v=void 0,O=void 0;if($.data&&$.ids)O=zq.appendContextPath($.data.contextPath,$.ids[0])+".";if(zq.isFunction(q))q=q.call(this);if($.data)v=zq.createFrame($.data);function w(W,m,b){if(v){if(v.key=W,v.index=m,v.first=m===0,v.last=!!b,O)v.contextPath=O+W}j=j+f(q[W],{data:v,blockParams:zq.blockParams([q[W],W],[O+W,null])})}if(q&&typeof q==="object")if(zq.isArray(q)){for(var h=q.length;P<h;P++)if(P in q)w(P,P,P===q.length-1)}else if(typeof Symbol==="function"&&q[Symbol.iterator]){var Y=[],k=q[Symbol.iterator]();for(var z=k.next();!z.done;z=k.next())Y.push(z.value);q=Y;for(var h=q.length;P<h;P++)w(P,P,P===q.length-1)}else(function(){var W=void 0;if(Object.keys(q).forEach(function(m){if(W!==void 0)w(W,P-1);W=m,P++}),W!==void 0)w(W,P-1,!0)})();if(P===0)j=K(this);return j})};p$.exports=X$.default});var G$=H((d$,t$)=>{d$.__esModule=!0;function gf(_){return _&&_.__esModule?_:{default:_}}var If=t(),yf=gf(If);d$.default=function(_){_.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new yf.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};t$.exports=d$.default});var C$=H((b$,S$)=>{b$.__esModule=!0;function Lf(_){return _&&_.__esModule?_:{default:_}}var i$=p(),sf=t(),a$=Lf(sf);b$.default=function(_){_.registerHelper("if",function(q,$){if(arguments.length!=2)throw new a$.default("#if requires exactly one argument");if(i$.isFunction(q))q=q.call(this);if(!$.hash.includeZero&&!q||i$.isEmpty(q))return $.inverse(this);else return $.fn(this)}),_.registerHelper("unless",function(q,$){if(arguments.length!=2)throw new a$.default("#unless requires exactly one argument");return _.helpers.if.call(this,q,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};S$.exports=b$.default});var M$=H((V$,l$)=>{V$.__esModule=!0;V$.default=function(_){_.registerHelper("log",function(){var q=[void 0],$=arguments[arguments.length-1];for(var f=0;f<arguments.length-1;f++)q.push(arguments[f]);var K=1;if($.hash.level!=null)K=$.hash.level;else if($.data&&$.data.level!=null)K=$.data.level;q[0]=K,_.log.apply(_,q)})};l$.exports=V$.default});var E$=H((N$,c$)=>{N$.__esModule=!0;N$.default=function(_){_.registerHelper("lookup",function(q,$,f){if(!q)return q;return f.lookupProperty(q,$)})};c$.exports=N$.default});var I$=H((R$,g$)=>{R$.__esModule=!0;function $K(_){return _&&_.__esModule?_:{default:_}}var Hq=p(),fK=t(),KK=$K(fK);R$.default=function(_){_.registerHelper("with",function(q,$){if(arguments.length!=2)throw new KK.default("#with requires exactly one argument");if(Hq.isFunction(q))q=q.call(this);var f=$.fn;if(!Hq.isEmpty(q)){var K=$.data;if($.data&&$.ids)K=Hq.createFrame($.data),K.contextPath=Hq.appendContextPath($.data.contextPath,$.ids[0]);return f(q,{data:K,blockParams:Hq.blockParams([q],[K&&K.contextPath])})}else return $.inverse(this)})};g$.exports=R$.default});var r_=H((oK)=>{oK.__esModule=!0;oK.registerDefaultHelpers=uK;oK.moveHelperToHooks=nK;function L(_){return _&&_.__esModule?_:{default:_}}var vK=A$(),wK=L(vK),OK=e$(),YK=L(OK),hK=G$(),TK=L(hK),kK=C$(),rK=L(kK),zK=M$(),HK=L(zK),WK=E$(),JK=L(WK),ZK=I$(),mK=L(ZK);function uK(_){wK.default(_),YK.default(_),TK.default(_),rK.default(_),HK.default(_),JK.default(_),mK.default(_)}function nK(_,q,$){if(_.helpers[q]){if(_.hooks[q]=_.helpers[q],!$)delete _.helpers[q]}}});var x$=H((y$,D$)=>{y$.__esModule=!0;var eK=p();y$.default=function(_){_.registerDecorator("inline",function(q,$,f,K){var P=q;if(!$.partials)$.partials={},P=function(j,v){var O=f.partials;f.partials=eK.extend({},O,$.partials);var w=q(j,v);return f.partials=O,w};return $.partials[K.args[0]]=K.fn,P})};D$.exports=y$.default});var L$=H((SK)=>{SK.__esModule=!0;SK.registerDefaultDecorators=bK;function GK(_){return _&&_.__esModule?_:{default:_}}var iK=x$(),aK=GK(iK);function bK(_){aK.default(_)}});var z_=H((s$,B$)=>{s$.__esModule=!0;var lK=p(),Kq={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(q){if(typeof q==="string"){var $=lK.indexOf(Kq.methodMap,q.toLowerCase());if($>=0)q=$;else q=parseInt(q,10)}return q},log:function(q){if(q=Kq.lookupLevel(q),typeof console<"u"&&Kq.lookupLevel(Kq.level)<=q){var $=Kq.methodMap[q];if(!console[$])$="log";for(var f=arguments.length,K=Array(f>1?f-1:0),P=1;P<f;P++)K[P-1]=arguments[P];console[$].apply(console,K)}}};s$.default=Kq;B$.exports=s$.default});var U$=H((RK)=>{RK.__esModule=!0;RK.createNewLookupObject=EK;var cK=p();function EK(){for(var _=arguments.length,q=Array(_),$=0;$<_;$++)q[$]=arguments[$];return cK.extend.apply(void 0,[Object.create(null)].concat(q))}});var H_=H((FK)=>{FK.__esModule=!0;FK.createProtoAccessControl=LK;FK.resultIsAllowed=sK;FK.resetLoggedProperties=UK;function yK(_){return _&&_.__esModule?_:{default:_}}var F$=U$(),DK=z_(),xK=yK(DK),aq=Object.create(null);function LK(_){var q=Object.create(null);q.constructor=!1,q.__defineGetter__=!1,q.__defineSetter__=!1,q.__lookupGetter__=!1;var $=Object.create(null);return $.__proto__=!1,{properties:{whitelist:F$.createNewLookupObject($,_.allowedProtoProperties),defaultValue:_.allowProtoPropertiesByDefault},methods:{whitelist:F$.createNewLookupObject(q,_.allowedProtoMethods),defaultValue:_.allowProtoMethodsByDefault}}}function sK(_,q,$){if(typeof _==="function")return Q$(q.methods,$);else return Q$(q.properties,$)}function Q$(_,q){if(_.whitelist[q]!==void 0)return _.whitelist[q]===!0;if(_.defaultValue!==void 0)return _.defaultValue;return BK(q),!1}function BK(_){if(aq[_]!==!0)aq[_]=!0,xK.default.log("error",'Handlebars: Access has been denied to resolve the property "'+_+`" because it is not an "own property" of its parent.
3
+ var cf=Object.create;var{getPrototypeOf:Rf,defineProperty:V$,getOwnPropertyNames:Ef}=Object;var gf=Object.prototype.hasOwnProperty;function If(q){return this[q]}var yf,Df,r_=(q,_,$)=>{var f=q!=null&&typeof q==="object";if(f){var K=_?yf??=new WeakMap:Df??=new WeakMap,P=K.get(q);if(P)return P}$=q!=null?cf(Rf(q)):{};let j=_||!q||!q.__esModule?V$($,"default",{value:q,enumerable:!0}):$;for(let v of Ef(q))if(!gf.call(j,v))V$(j,v,{get:If.bind(q,v),enumerable:!0});if(f)K.set(q,j);return j};var J=(q,_)=>()=>(_||q((_={exports:{}}).exports,_),_.exports);var vq=import.meta.require;var u_=J((W9,m_)=>{var Iq=process||{},N$=Iq.argv||[],gq=Iq.env||{},xf=!(!!gq.NO_COLOR||N$.includes("--no-color"))&&(!!gq.FORCE_COLOR||N$.includes("--color")||Iq.platform==="win32"||(Iq.stdout||{}).isTTY&&gq.TERM!=="dumb"||!!gq.CI),Lf=(q,_,$=q)=>(f)=>{let K=""+f,P=K.indexOf(_,q.length);return~P?q+sf(K,_,$,P)+_:q+K+_},sf=(q,_,$,f)=>{let K="",P=0;do K+=q.substring(P,f)+$,P=f+_.length,f=q.indexOf(_,P);while(~f);return K+q.substring(P)},l$=(q=xf)=>{let _=q?Lf:()=>String;return{isColorSupported:q,reset:_("\x1B[0m","\x1B[0m"),bold:_("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:_("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:_("\x1B[3m","\x1B[23m"),underline:_("\x1B[4m","\x1B[24m"),inverse:_("\x1B[7m","\x1B[27m"),hidden:_("\x1B[8m","\x1B[28m"),strikethrough:_("\x1B[9m","\x1B[29m"),black:_("\x1B[30m","\x1B[39m"),red:_("\x1B[31m","\x1B[39m"),green:_("\x1B[32m","\x1B[39m"),yellow:_("\x1B[33m","\x1B[39m"),blue:_("\x1B[34m","\x1B[39m"),magenta:_("\x1B[35m","\x1B[39m"),cyan:_("\x1B[36m","\x1B[39m"),white:_("\x1B[37m","\x1B[39m"),gray:_("\x1B[90m","\x1B[39m"),bgBlack:_("\x1B[40m","\x1B[49m"),bgRed:_("\x1B[41m","\x1B[49m"),bgGreen:_("\x1B[42m","\x1B[49m"),bgYellow:_("\x1B[43m","\x1B[49m"),bgBlue:_("\x1B[44m","\x1B[49m"),bgMagenta:_("\x1B[45m","\x1B[49m"),bgCyan:_("\x1B[46m","\x1B[49m"),bgWhite:_("\x1B[47m","\x1B[49m"),blackBright:_("\x1B[90m","\x1B[39m"),redBright:_("\x1B[91m","\x1B[39m"),greenBright:_("\x1B[92m","\x1B[39m"),yellowBright:_("\x1B[93m","\x1B[39m"),blueBright:_("\x1B[94m","\x1B[39m"),magentaBright:_("\x1B[95m","\x1B[39m"),cyanBright:_("\x1B[96m","\x1B[39m"),whiteBright:_("\x1B[97m","\x1B[39m"),bgBlackBright:_("\x1B[100m","\x1B[49m"),bgRedBright:_("\x1B[101m","\x1B[49m"),bgGreenBright:_("\x1B[102m","\x1B[49m"),bgYellowBright:_("\x1B[103m","\x1B[49m"),bgBlueBright:_("\x1B[104m","\x1B[49m"),bgMagentaBright:_("\x1B[105m","\x1B[49m"),bgCyanBright:_("\x1B[106m","\x1B[49m"),bgWhiteBright:_("\x1B[107m","\x1B[49m")}};m_.exports=l$();m_.exports.createColors=l$});var b=J((WK)=>{WK.__esModule=!0;WK.extend=B$;WK.indexOf=YK;WK.escapeExpression=hK;WK.isEmpty=TK;WK.createFrame=kK;WK.blockParams=zK;WK.appendContextPath=HK;var jK={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},vK=/[&<>"'`=]/g,wK=/[&<>"'`=]/;function OK(q){return jK[q]}function B$(q){for(var _=1;_<arguments.length;_++)for(var $ in arguments[_])if(Object.prototype.hasOwnProperty.call(arguments[_],$))q[$]=arguments[_][$];return q}var C_=Object.prototype.toString;WK.toString=C_;var i_=function(_){return typeof _==="function"};if(i_(/x/))WK.isFunction=i_=function(q){return typeof q==="function"&&C_.call(q)==="[object Function]"};WK.isFunction=i_;var U$=Array.isArray||function(q){return q&&typeof q==="object"?C_.call(q)==="[object Array]":!1};WK.isArray=U$;function YK(q,_){for(var $=0,f=q.length;$<f;$++)if(q[$]===_)return $;return-1}function hK(q){if(typeof q!=="string"){if(q&&q.toHTML)return q.toHTML();else if(q==null)return"";else if(!q)return q+"";q=""+q}if(!wK.test(q))return q;return q.replace(vK,OK)}function TK(q){if(!q&&q!==0)return!0;else if(U$(q)&&q.length===0)return!0;else return!1}function kK(q){var _=B$({},q);return _._parent=q,_}function zK(q,_){return q.path=_,q}function HK(q,_){return(q?q+".":"")+_}});var S=J((F$,Q$)=>{F$.__esModule=!0;var a_=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function S_(q,_){var $=_&&_.loc,f=void 0,K=void 0,P=void 0,j=void 0;if($)f=$.start.line,K=$.end.line,P=$.start.column,j=$.end.column,q+=" - "+f+":"+P;var v=Error.prototype.constructor.call(this,q);for(var O=0;O<a_.length;O++)this[a_[O]]=v[a_[O]];if(Error.captureStackTrace)Error.captureStackTrace(this,S_);try{if($)if(this.lineNumber=f,this.endLineNumber=K,Object.defineProperty)Object.defineProperty(this,"column",{value:P,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:j,enumerable:!0});else this.column=P,this.endColumn=j}catch(w){}}S_.prototype=Error();F$.default=S_;Q$.exports=F$.default});var $6=J((q6,_6)=>{q6.__esModule=!0;var M_=b();q6.default=function(q){q.registerHelper("blockHelperMissing",function(_,$){var{inverse:f,fn:K}=$;if(_===!0)return K(this);else if(_===!1||_==null)return f(this);else if(M_.isArray(_))if(_.length>0){if($.ids)$.ids=[$.name];return q.helpers.each(_,$)}else return f(this);else{if($.data&&$.ids){var P=M_.createFrame($.data);P.contextPath=M_.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(_,$)}})};_6.exports=q6.default});var P6=J((f6,K6)=>{f6.__esModule=!0;function iK(q){return q&&q.__esModule?q:{default:q}}var Gq=b(),CK=S(),aK=iK(CK);f6.default=function(q){q.registerHelper("each",function(_,$){if(!$)throw new aK.default("Must pass iterator to #each");var{fn:f,inverse:K}=$,P=0,j="",v=void 0,O=void 0;if($.data&&$.ids)O=Gq.appendContextPath($.data.contextPath,$.ids[0])+".";if(Gq.isFunction(_))_=_.call(this);if($.data)v=Gq.createFrame($.data);function w(Z,r,W){if(v){if(v.key=Z,v.index=r,v.first=r===0,v.last=!!W,O)v.contextPath=O+Z}j=j+f(_[Z],{data:v,blockParams:Gq.blockParams([_[Z],Z],[O+Z,null])})}if(_&&typeof _==="object")if(Gq.isArray(_)){for(var T=_.length;P<T;P++)if(P in _)w(P,P,P===_.length-1)}else if(typeof Symbol==="function"&&_[Symbol.iterator]){var Y=[],k=_[Symbol.iterator]();for(var z=k.next();!z.done;z=k.next())Y.push(z.value);_=Y;for(var T=_.length;P<T;P++)w(P,P,P===_.length-1)}else(function(){var Z=void 0;if(Object.keys(_).forEach(function(r){if(Z!==void 0)w(Z,P-1);Z=r,P++}),Z!==void 0)w(Z,P-1,!0)})();if(P===0)j=K(this);return j})};K6.exports=f6.default});var w6=J((j6,v6)=>{j6.__esModule=!0;function VK(q){return q&&q.__esModule?q:{default:q}}var NK=S(),lK=VK(NK);j6.default=function(q){q.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new lK.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};v6.exports=j6.default});var k6=J((h6,T6)=>{h6.__esModule=!0;function EK(q){return q&&q.__esModule?q:{default:q}}var O6=b(),gK=S(),Y6=EK(gK);h6.default=function(q){q.registerHelper("if",function(_,$){if(arguments.length!=2)throw new Y6.default("#if requires exactly one argument");if(O6.isFunction(_))_=_.call(this);if(!$.hash.includeZero&&!_||O6.isEmpty(_))return $.inverse(this);else return $.fn(this)}),q.registerHelper("unless",function(_,$){if(arguments.length!=2)throw new Y6.default("#unless requires exactly one argument");return q.helpers.if.call(this,_,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};T6.exports=h6.default});var W6=J((z6,H6)=>{z6.__esModule=!0;z6.default=function(q){q.registerHelper("log",function(){var _=[void 0],$=arguments[arguments.length-1];for(var f=0;f<arguments.length-1;f++)_.push(arguments[f]);var K=1;if($.hash.level!=null)K=$.hash.level;else if($.data&&$.data.level!=null)K=$.data.level;_[0]=K,q.log.apply(q,_)})};H6.exports=z6.default});var r6=J((J6,Z6)=>{J6.__esModule=!0;J6.default=function(q){q.registerHelper("lookup",function(_,$,f){if(!_)return _;return f.lookupProperty(_,$)})};Z6.exports=J6.default});var A6=J((m6,u6)=>{m6.__esModule=!0;function BK(q){return q&&q.__esModule?q:{default:q}}var bq=b(),UK=S(),FK=BK(UK);m6.default=function(q){q.registerHelper("with",function(_,$){if(arguments.length!=2)throw new FK.default("#with requires exactly one argument");if(bq.isFunction(_))_=_.call(this);var f=$.fn;if(!bq.isEmpty(_)){var K=$.data;if($.data&&$.ids)K=bq.createFrame($.data),K.contextPath=bq.appendContextPath($.data.contextPath,$.ids[0]);return f(_,{data:K,blockParams:bq.blockParams([_],[K&&K.contextPath])})}else return $.inverse(this)})};u6.exports=m6.default});var V_=J((JP)=>{JP.__esModule=!0;JP.registerDefaultHelpers=HP;JP.moveHelperToHooks=WP;function wq(q){return q&&q.__esModule?q:{default:q}}var _P=$6(),$P=wq(_P),fP=P6(),KP=wq(fP),PP=w6(),jP=wq(PP),vP=k6(),wP=wq(vP),OP=W6(),YP=wq(OP),hP=r6(),TP=wq(hP),kP=A6(),zP=wq(kP);function HP(q){$P.default(q),KP.default(q),jP.default(q),wP.default(q),YP.default(q),TP.default(q),zP.default(q)}function WP(q,_,$){if(q.helpers[_]){if(q.hooks[_]=q.helpers[_],!$)delete q.helpers[_]}}});var n6=J((X6,p6)=>{X6.__esModule=!0;var uP=b();X6.default=function(q){q.registerDecorator("inline",function(_,$,f,K){var P=_;if(!$.partials)$.partials={},P=function(j,v){var O=f.partials;f.partials=uP.extend({},O,$.partials);var w=_(j,v);return f.partials=O,w};return $.partials[K.args[0]]=K.fn,P})};p6.exports=X6.default});var o6=J((GP)=>{GP.__esModule=!0;GP.registerDefaultDecorators=dP;function pP(q){return q&&q.__esModule?q:{default:q}}var nP=n6(),oP=pP(nP);function dP(q){oP.default(q)}});var N_=J((d6,G6)=>{d6.__esModule=!0;var eP=b(),Wq={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(_){if(typeof _==="string"){var $=eP.indexOf(Wq.methodMap,_.toLowerCase());if($>=0)_=$;else _=parseInt(_,10)}return _},log:function(_){if(_=Wq.lookupLevel(_),typeof console<"u"&&Wq.lookupLevel(Wq.level)<=_){var $=Wq.methodMap[_];if(!console[$])$="log";for(var f=arguments.length,K=Array(f>1?f-1:0),P=1;P<f;P++)K[P-1]=arguments[P];console[$].apply(console,K)}}};d6.default=Wq;G6.exports=d6.default});var b6=J((MP)=>{MP.__esModule=!0;MP.createNewLookupObject=SP;var aP=b();function SP(){for(var q=arguments.length,_=Array(q),$=0;$<q;$++)_[$]=arguments[$];return aP.extend.apply(void 0,[Object.create(null)].concat(_))}});var l_=J((DP)=>{DP.__esModule=!0;DP.createProtoAccessControl=EP;DP.resultIsAllowed=gP;DP.resetLoggedProperties=yP;function lP(q){return q&&q.__esModule?q:{default:q}}var t6=b6(),cP=N_(),RP=lP(cP),sq=Object.create(null);function EP(q){var _=Object.create(null);_.constructor=!1,_.__defineGetter__=!1,_.__defineSetter__=!1,_.__lookupGetter__=!1;var $=Object.create(null);return $.__proto__=!1,{properties:{whitelist:t6.createNewLookupObject($,q.allowedProtoProperties),defaultValue:q.allowProtoPropertiesByDefault},methods:{whitelist:t6.createNewLookupObject(_,q.allowedProtoMethods),defaultValue:q.allowProtoMethodsByDefault}}}function gP(q,_,$){if(typeof q==="function")return e6(_.methods,$);else return e6(_.properties,$)}function e6(q,_){if(q.whitelist[_]!==void 0)return q.whitelist[_]===!0;if(q.defaultValue!==void 0)return q.defaultValue;return IP(_),!1}function IP(q){if(sq[q]!==!0)sq[q]=!0,RP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+q+`" because it is not an "own property" of its parent.
4
4
  You can add a runtime option to disable the check or this warning:
5
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function UK(){Object.keys(aq).forEach(function(_){delete aq[_]})}});var Sq=H((kP)=>{kP.__esModule=!0;kP.HandlebarsEnvironment=Z_;function q6(_){return _&&_.__esModule?_:{default:_}}var s=p(),fP=t(),W_=q6(fP),KP=r_(),PP=L$(),jP=z_(),bq=q6(jP),vP=H_(),wP="4.7.8";kP.VERSION=wP;var OP=8;kP.COMPILER_REVISION=OP;var YP=7;kP.LAST_COMPATIBLE_COMPILER_REVISION=YP;var hP={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 <4.3.0",8:">= 4.3.0"};kP.REVISION_CHANGES=hP;var J_="[object Object]";function Z_(_,q,$){this.helpers=_||{},this.partials=q||{},this.decorators=$||{},KP.registerDefaultHelpers(this),PP.registerDefaultDecorators(this)}Z_.prototype={constructor:Z_,logger:bq.default,log:bq.default.log,registerHelper:function(q,$){if(s.toString.call(q)===J_){if($)throw new W_.default("Arg not supported with multiple helpers");s.extend(this.helpers,q)}else this.helpers[q]=$},unregisterHelper:function(q){delete this.helpers[q]},registerPartial:function(q,$){if(s.toString.call(q)===J_)s.extend(this.partials,q);else{if(typeof $>"u")throw new W_.default('Attempting to register a partial called "'+q+'" as undefined');this.partials[q]=$}},unregisterPartial:function(q){delete this.partials[q]},registerDecorator:function(q,$){if(s.toString.call(q)===J_){if($)throw new W_.default("Arg not supported with multiple decorators");s.extend(this.decorators,q)}else this.decorators[q]=$},unregisterDecorator:function(q){delete this.decorators[q]},resetLoggedPropertyAccesses:function(){vP.resetLoggedProperties()}};var TP=bq.default.log;kP.log=TP;kP.createFrame=s.createFrame;kP.logger=bq.default});var f6=H((_6,$6)=>{_6.__esModule=!0;function m_(_){this.string=_}m_.prototype.toString=m_.prototype.toHTML=function(){return""+this.string};_6.default=m_;$6.exports=_6.default});var K6=H((pP)=>{pP.__esModule=!0;pP.wrapHelper=XP;function XP(_,q){if(typeof _!=="function")return _;var $=function(){var K=arguments[arguments.length-1];return arguments[arguments.length-1]=q(K),_.apply(this,arguments)};return $}});var O6=H((EP)=>{EP.__esModule=!0;EP.checkRevision=SP;EP.template=CP;EP.wrapProgram=Cq;EP.resolvePartial=VP;EP.invokePartial=lP;EP.noop=v6;function tP(_){return _&&_.__esModule?_:{default:_}}function GP(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$))q[$]=_[$]}return q.default=_,q}}var iP=p(),N=GP(iP),aP=t(),c=tP(aP),E=Sq(),P6=r_(),bP=K6(),j6=H_();function SP(_){var q=_&&_[0]||1,$=E.COMPILER_REVISION;if(q>=E.LAST_COMPATIBLE_COMPILER_REVISION&&q<=E.COMPILER_REVISION)return;if(q<E.LAST_COMPATIBLE_COMPILER_REVISION){var f=E.REVISION_CHANGES[$],K=E.REVISION_CHANGES[q];throw new c.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+f+") or downgrade your runtime to an older version ("+K+").")}else throw new c.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+_[1]+").")}function CP(_,q){if(!q)throw new c.default("No environment passed to template");if(!_||!_.main)throw new c.default("Unknown template object: "+typeof _);_.main.decorator=_.main_d,q.VM.checkRevision(_.compiler);var $=_.compiler&&_.compiler[0]===7;function f(j,v,O){if(O.hash){if(v=N.extend({},v,O.hash),O.ids)O.ids[0]=!0}j=q.VM.resolvePartial.call(this,j,v,O);var w=N.extend({},O,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),h=q.VM.invokePartial.call(this,j,v,w);if(h==null&&q.compile)O.partials[O.name]=q.compile(j,_.compilerOptions,q),h=O.partials[O.name](v,w);if(h!=null){if(O.indent){var Y=h.split(`
6
- `);for(var k=0,z=Y.length;k<z;k++){if(!Y[k]&&k+1===z)break;Y[k]=O.indent+Y[k]}h=Y.join(`
7
- `)}return h}else throw new c.default("The partial "+O.name+" could not be compiled when running in runtime-only mode")}var K={strict:function(v,O,w){if(!v||!(O in v))throw new c.default('"'+O+'" not defined in '+v,{loc:w});return K.lookupProperty(v,O)},lookupProperty:function(v,O){var w=v[O];if(w==null)return w;if(Object.prototype.hasOwnProperty.call(v,O))return w;if(j6.resultIsAllowed(w,K.protoAccessControl,O))return w;return},lookup:function(v,O){var w=v.length;for(var h=0;h<w;h++){var Y=v[h]&&K.lookupProperty(v[h],O);if(Y!=null)return v[h][O]}},lambda:function(v,O){return typeof v==="function"?v.call(O):v},escapeExpression:N.escapeExpression,invokePartial:f,fn:function(v){var O=_[v];return O.decorator=_[v+"_d"],O},programs:[],program:function(v,O,w,h,Y){var k=this.programs[v],z=this.fn(v);if(O||Y||h||w)k=Cq(this,v,z,O,w,h,Y);else if(!k)k=this.programs[v]=Cq(this,v,z);return k},data:function(v,O){while(v&&O--)v=v._parent;return v},mergeIfNeeded:function(v,O){var w=v||O;if(v&&O&&v!==O)w=N.extend({},O,v);return w},nullContext:Object.seal({}),noop:q.VM.noop,compilerInfo:_.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],O=v.data;if(P._setup(v),!v.partial&&_.useData)O=MP(j,O);var w=void 0,h=_.useBlockParams?[]:void 0;if(_.useDepths)if(v.depths)w=j!=v.depths[0]?[j].concat(v.depths):v.depths;else w=[j];function Y(k){return""+_.main(K,k,K.helpers,K.partials,O,h,w)}return Y=w6(_.main,Y,K,v.depths||[],O,h),Y(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=N.extend({},q.helpers,j.helpers);if(NP(v,K),K.helpers=v,_.usePartial)K.partials=K.mergeIfNeeded(j.partials,q.partials);if(_.usePartial||_.useDecorators)K.decorators=N.extend({},q.decorators,j.decorators);K.hooks={},K.protoAccessControl=j6.createProtoAccessControl(j);var O=j.allowCallsToHelperMissing||$;P6.moveHelperToHooks(K,"helperMissing",O),P6.moveHelperToHooks(K,"blockHelperMissing",O)}else K.protoAccessControl=j.protoAccessControl,K.helpers=j.helpers,K.partials=j.partials,K.decorators=j.decorators,K.hooks=j.hooks},P._child=function(j,v,O,w){if(_.useBlockParams&&!O)throw new c.default("must pass block params");if(_.useDepths&&!w)throw new c.default("must pass parent depths");return Cq(K,j,_[j],v,0,O,w)},P}function Cq(_,q,$,f,K,P,j){function v(O){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],h=j;if(j&&O!=j[0]&&!(O===_.nullContext&&j[0]===null))h=[O].concat(j);return $(_,O,_.helpers,_.partials,w.data||f,P&&[w.blockParams].concat(P),h)}return v=w6($,v,_,j,f,P),v.program=q,v.depth=j?j.length:0,v.blockParams=K||0,v}function VP(_,q,$){if(!_)if($.name==="@partial-block")_=$.data["partial-block"];else _=$.partials[$.name];else if(!_.call&&!$.name)$.name=_,_=$.partials[_];return _}function lP(_,q,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==v6)(function(){$.data=E.createFrame($.data);var P=$.fn;if(K=$.data["partial-block"]=function(v){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return O.data=E.createFrame(O.data),O.data["partial-block"]=f,P(v,O)},P.partials)$.partials=N.extend({},$.partials,P.partials)})();if(_===void 0&&K)_=K;if(_===void 0)throw new c.default("The partial "+$.name+" could not be found");else if(_ instanceof Function)return _(q,$)}function v6(){return""}function MP(_,q){if(!q||!("root"in q))q=q?E.createFrame(q):{},q.root=_;return q}function w6(_,q,$,f,K,P){if(_.decorator){var j={};q=_.decorator(q,j,$,f&&f[0],K,P,f),N.extend(q,j)}return q}function NP(_,q){Object.keys(_).forEach(function($){var f=_[$];_[$]=cP(f,q)})}function cP(_,q){var $=q.lookupProperty;return bP.wrapHelper(_,function(f){return N.extend({lookupProperty:$},f)})}});var u_=H((Y6,h6)=>{Y6.__esModule=!0;Y6.default=function(_){(function(){if(typeof globalThis==="object")return;Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__})();var q=globalThis.Handlebars;_.noConflict=function(){if(globalThis.Handlebars===_)globalThis.Handlebars=q;return _}};h6.exports=Y6.default});var W6=H((z6,H6)=>{z6.__esModule=!0;function o_(_){return _&&_.__esModule?_:{default:_}}function A_(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$))q[$]=_[$]}return q.default=_,q}}var UP=Sq(),T6=A_(UP),FP=f6(),QP=o_(FP),qj=t(),_j=o_(qj),$j=p(),n_=A_($j),fj=O6(),k6=A_(fj),Kj=u_(),Pj=o_(Kj);function r6(){var _=new T6.HandlebarsEnvironment;return n_.extend(_,T6),_.SafeString=QP.default,_.Exception=_j.default,_.Utils=n_,_.escapeExpression=n_.escapeExpression,_.VM=k6,_.template=function(q){return k6.template(q,_)},_}var Wq=r6();Wq.create=r6;Pj.default(Wq);Wq.default=Wq;z6.default=Wq;H6.exports=z6.default});var X_=H((Z6,m6)=>{Z6.__esModule=!0;var J6={helpers:{helperExpression:function(q){return q.type==="SubExpression"||(q.type==="MustacheStatement"||q.type==="BlockStatement")&&!!(q.params&&q.params.length||q.hash)},scopedId:function(q){return/^\.|this\b/.test(q.original)},simpleId:function(q){return q.parts.length===1&&!J6.helpers.scopedId(q)&&!q.depth}}};Z6.default=J6;m6.exports=Z6.default});var o6=H((u6,n6)=>{u6.__esModule=!0;var Yj=function(){var _={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_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(K,P,j,v,O,w,h){var Y=w.length-1;switch(O){case 1:return w[Y-1];case 2:this.$=v.prepareProgram(w[Y]);break;case 3:this.$=w[Y];break;case 4:this.$=w[Y];break;case 5:this.$=w[Y];break;case 6:this.$=w[Y];break;case 7:this.$=w[Y];break;case 8:this.$=w[Y];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(w[Y]),strip:v.stripFlags(w[Y],w[Y]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:w[Y],value:w[Y],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(w[Y-2],w[Y-1],w[Y],this._$);break;case 12:this.$={path:w[Y-3],params:w[Y-2],hash:w[Y-1]};break;case 13:this.$=v.prepareBlock(w[Y-3],w[Y-2],w[Y-1],w[Y],!1,this._$);break;case 14:this.$=v.prepareBlock(w[Y-3],w[Y-2],w[Y-1],w[Y],!0,this._$);break;case 15:this.$={open:w[Y-5],path:w[Y-4],params:w[Y-3],hash:w[Y-2],blockParams:w[Y-1],strip:v.stripFlags(w[Y-5],w[Y])};break;case 16:this.$={path:w[Y-4],params:w[Y-3],hash:w[Y-2],blockParams:w[Y-1],strip:v.stripFlags(w[Y-5],w[Y])};break;case 17:this.$={path:w[Y-4],params:w[Y-3],hash:w[Y-2],blockParams:w[Y-1],strip:v.stripFlags(w[Y-5],w[Y])};break;case 18:this.$={strip:v.stripFlags(w[Y-1],w[Y-1]),program:w[Y]};break;case 19:var k=v.prepareBlock(w[Y-2],w[Y-1],w[Y],w[Y],!1,this._$),z=v.prepareProgram([k],w[Y-1].loc);z.chained=!0,this.$={strip:w[Y-2].strip,program:z,chain:!0};break;case 20:this.$=w[Y];break;case 21:this.$={path:w[Y-1],strip:v.stripFlags(w[Y-2],w[Y])};break;case 22:this.$=v.prepareMustache(w[Y-3],w[Y-2],w[Y-1],w[Y-4],v.stripFlags(w[Y-4],w[Y]),this._$);break;case 23:this.$=v.prepareMustache(w[Y-3],w[Y-2],w[Y-1],w[Y-4],v.stripFlags(w[Y-4],w[Y]),this._$);break;case 24:this.$={type:"PartialStatement",name:w[Y-3],params:w[Y-2],hash:w[Y-1],indent:"",strip:v.stripFlags(w[Y-4],w[Y]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(w[Y-2],w[Y-1],w[Y],this._$);break;case 26:this.$={path:w[Y-3],params:w[Y-2],hash:w[Y-1],strip:v.stripFlags(w[Y-4],w[Y])};break;case 27:this.$=w[Y];break;case 28:this.$=w[Y];break;case 29:this.$={type:"SubExpression",path:w[Y-3],params:w[Y-2],hash:w[Y-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:w[Y],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(w[Y-2]),value:w[Y],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(w[Y-1]);break;case 33:this.$=w[Y];break;case 34:this.$=w[Y];break;case 35:this.$={type:"StringLiteral",value:w[Y],original:w[Y],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(w[Y]),original:Number(w[Y]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:w[Y]==="true",original:w[Y]==="true",loc:v.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:v.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:v.locInfo(this._$)};break;case 40:this.$=w[Y];break;case 41:this.$=w[Y];break;case 42:this.$=v.preparePath(!0,w[Y],this._$);break;case 43:this.$=v.preparePath(!1,w[Y],this._$);break;case 44:w[Y-2].push({part:v.id(w[Y]),original:w[Y],separator:w[Y-1]}),this.$=w[Y-2];break;case 45:this.$=[{part:v.id(w[Y]),original:w[Y]}];break;case 46:this.$=[];break;case 47:w[Y-1].push(w[Y]);break;case 48:this.$=[];break;case 49:w[Y-1].push(w[Y]);break;case 50:this.$=[];break;case 51:w[Y-1].push(w[Y]);break;case 58:this.$=[];break;case 59:w[Y-1].push(w[Y]);break;case 64:this.$=[];break;case 65:w[Y-1].push(w[Y]);break;case 70:this.$=[];break;case 71:w[Y-1].push(w[Y]);break;case 78:this.$=[];break;case 79:w[Y-1].push(w[Y]);break;case 82:this.$=[];break;case 83:w[Y-1].push(w[Y]);break;case 86:this.$=[];break;case 87:w[Y-1].push(w[Y]);break;case 90:this.$=[];break;case 91:w[Y-1].push(w[Y]);break;case 94:this.$=[];break;case 95:w[Y-1].push(w[Y]);break;case 98:this.$=[w[Y]];break;case 99:w[Y-1].push(w[Y]);break;case 100:this.$=[w[Y]];break;case 101:w[Y-1].push(w[Y]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(K,P){throw Error(K)},parse:function(K){var P=this,j=[0],v=[null],O=[],w=this.table,h="",Y=0,k=0,z=0,W=2,m=1;if(this.lexer.setInput(K),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u")this.lexer.yylloc={};var b=this.lexer.yylloc;O.push(b);var o=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function D(M){j.length=j.length-2*M,v.length=v.length-M,O.length=O.length-M}function pq(){var M=P.lexer.lex()||1;if(typeof M!=="number")M=P.symbols_[M]||M;return M}var X,Uq,x,d,i7,Fq,_q={},eq,l,v$,dq;while(!0){if(x=j[j.length-1],this.defaultActions[x])d=this.defaultActions[x];else{if(X===null||typeof X>"u")X=pq();d=w[x]&&w[x][X]}if(typeof d>"u"||!d.length||!d[0]){var Qq="";if(!z){dq=[];for(eq in w[x])if(this.terminals_[eq]&&eq>2)dq.push("'"+this.terminals_[eq]+"'");if(this.lexer.showPosition)Qq="Parse error on line "+(Y+1)+`:
5
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function yP(){Object.keys(sq).forEach(function(q){delete sq[q]})}});var Uq=J((v3)=>{v3.__esModule=!0;v3.HandlebarsEnvironment=E_;function i6(q){return q&&q.__esModule?q:{default:q}}var Oq=b(),UP=S(),c_=i6(UP),FP=V_(),QP=o6(),q3=N_(),Bq=i6(q3),_3=l_(),$3="4.7.8";v3.VERSION=$3;var f3=8;v3.COMPILER_REVISION=f3;var K3=7;v3.LAST_COMPATIBLE_COMPILER_REVISION=K3;var P3={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 <4.3.0",8:">= 4.3.0"};v3.REVISION_CHANGES=P3;var R_="[object Object]";function E_(q,_,$){this.helpers=q||{},this.partials=_||{},this.decorators=$||{},FP.registerDefaultHelpers(this),QP.registerDefaultDecorators(this)}E_.prototype={constructor:E_,logger:Bq.default,log:Bq.default.log,registerHelper:function(_,$){if(Oq.toString.call(_)===R_){if($)throw new c_.default("Arg not supported with multiple helpers");Oq.extend(this.helpers,_)}else this.helpers[_]=$},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,$){if(Oq.toString.call(_)===R_)Oq.extend(this.partials,_);else{if(typeof $>"u")throw new c_.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=$}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,$){if(Oq.toString.call(_)===R_){if($)throw new c_.default("Arg not supported with multiple decorators");Oq.extend(this.decorators,_)}else this.decorators[_]=$},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){_3.resetLoggedProperties()}};var j3=Bq.default.log;v3.log=j3;v3.createFrame=Oq.createFrame;v3.logger=Bq.default});var S6=J((C6,a6)=>{C6.__esModule=!0;function g_(q){this.string=q}g_.prototype.toString=g_.prototype.toHTML=function(){return""+this.string};C6.default=g_;a6.exports=C6.default});var M6=J((m3)=>{m3.__esModule=!0;m3.wrapHelper=r3;function r3(q,_){if(typeof q!=="function")return q;var $=function(){var K=arguments[arguments.length-1];return arguments[arguments.length-1]=_(K),q.apply(this,arguments)};return $}});var R6=J((S3)=>{S3.__esModule=!0;S3.checkRevision=G3;S3.template=b3;S3.wrapProgram=Fq;S3.resolvePartial=t3;S3.invokePartial=e3;S3.noop=l6;function X3(q){return q&&q.__esModule?q:{default:q}}function p3(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}var n3=b(),x=p3(n3),o3=S(),L=X3(o3),s=Uq(),V6=V_(),d3=M6(),N6=l_();function G3(q){var _=q&&q[0]||1,$=s.COMPILER_REVISION;if(_>=s.LAST_COMPATIBLE_COMPILER_REVISION&&_<=s.COMPILER_REVISION)return;if(_<s.LAST_COMPATIBLE_COMPILER_REVISION){var f=s.REVISION_CHANGES[$],K=s.REVISION_CHANGES[_];throw new L.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+f+") or downgrade your runtime to an older version ("+K+").")}else throw new L.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+q[1]+").")}function b3(q,_){if(!_)throw new L.default("No environment passed to template");if(!q||!q.main)throw new L.default("Unknown template object: "+typeof q);q.main.decorator=q.main_d,_.VM.checkRevision(q.compiler);var $=q.compiler&&q.compiler[0]===7;function f(j,v,O){if(O.hash){if(v=x.extend({},v,O.hash),O.ids)O.ids[0]=!0}j=_.VM.resolvePartial.call(this,j,v,O);var w=x.extend({},O,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),T=_.VM.invokePartial.call(this,j,v,w);if(T==null&&_.compile)O.partials[O.name]=_.compile(j,q.compilerOptions,_),T=O.partials[O.name](v,w);if(T!=null){if(O.indent){var Y=T.split(`
6
+ `);for(var k=0,z=Y.length;k<z;k++){if(!Y[k]&&k+1===z)break;Y[k]=O.indent+Y[k]}T=Y.join(`
7
+ `)}return T}else throw new L.default("The partial "+O.name+" could not be compiled when running in runtime-only mode")}var K={strict:function(v,O,w){if(!v||!(O in v))throw new L.default('"'+O+'" not defined in '+v,{loc:w});return K.lookupProperty(v,O)},lookupProperty:function(v,O){var w=v[O];if(w==null)return w;if(Object.prototype.hasOwnProperty.call(v,O))return w;if(N6.resultIsAllowed(w,K.protoAccessControl,O))return w;return},lookup:function(v,O){var w=v.length;for(var T=0;T<w;T++){var Y=v[T]&&K.lookupProperty(v[T],O);if(Y!=null)return v[T][O]}},lambda:function(v,O){return typeof v==="function"?v.call(O):v},escapeExpression:x.escapeExpression,invokePartial:f,fn:function(v){var O=q[v];return O.decorator=q[v+"_d"],O},programs:[],program:function(v,O,w,T,Y){var k=this.programs[v],z=this.fn(v);if(O||Y||T||w)k=Fq(this,v,z,O,w,T,Y);else if(!k)k=this.programs[v]=Fq(this,v,z);return k},data:function(v,O){while(v&&O--)v=v._parent;return v},mergeIfNeeded:function(v,O){var w=v||O;if(v&&O&&v!==O)w=x.extend({},O,v);return w},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:q.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],O=v.data;if(P._setup(v),!v.partial&&q.useData)O=i3(j,O);var w=void 0,T=q.useBlockParams?[]:void 0;if(q.useDepths)if(v.depths)w=j!=v.depths[0]?[j].concat(v.depths):v.depths;else w=[j];function Y(k){return""+q.main(K,k,K.helpers,K.partials,O,T,w)}return Y=c6(q.main,Y,K,v.depths||[],O,T),Y(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=x.extend({},_.helpers,j.helpers);if(C3(v,K),K.helpers=v,q.usePartial)K.partials=K.mergeIfNeeded(j.partials,_.partials);if(q.usePartial||q.useDecorators)K.decorators=x.extend({},_.decorators,j.decorators);K.hooks={},K.protoAccessControl=N6.createProtoAccessControl(j);var O=j.allowCallsToHelperMissing||$;V6.moveHelperToHooks(K,"helperMissing",O),V6.moveHelperToHooks(K,"blockHelperMissing",O)}else K.protoAccessControl=j.protoAccessControl,K.helpers=j.helpers,K.partials=j.partials,K.decorators=j.decorators,K.hooks=j.hooks},P._child=function(j,v,O,w){if(q.useBlockParams&&!O)throw new L.default("must pass block params");if(q.useDepths&&!w)throw new L.default("must pass parent depths");return Fq(K,j,q[j],v,0,O,w)},P}function Fq(q,_,$,f,K,P,j){function v(O){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],T=j;if(j&&O!=j[0]&&!(O===q.nullContext&&j[0]===null))T=[O].concat(j);return $(q,O,q.helpers,q.partials,w.data||f,P&&[w.blockParams].concat(P),T)}return v=c6($,v,q,j,f,P),v.program=_,v.depth=j?j.length:0,v.blockParams=K||0,v}function t3(q,_,$){if(!q)if($.name==="@partial-block")q=$.data["partial-block"];else q=$.partials[$.name];else if(!q.call&&!$.name)$.name=q,q=$.partials[q];return q}function e3(q,_,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==l6)(function(){$.data=s.createFrame($.data);var P=$.fn;if(K=$.data["partial-block"]=function(v){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return O.data=s.createFrame(O.data),O.data["partial-block"]=f,P(v,O)},P.partials)$.partials=x.extend({},$.partials,P.partials)})();if(q===void 0&&K)q=K;if(q===void 0)throw new L.default("The partial "+$.name+" could not be found");else if(q instanceof Function)return q(_,$)}function l6(){return""}function i3(q,_){if(!_||!("root"in _))_=_?s.createFrame(_):{},_.root=q;return _}function c6(q,_,$,f,K,P){if(q.decorator){var j={};_=q.decorator(_,j,$,f&&f[0],K,P,f),x.extend(_,j)}return _}function C3(q,_){Object.keys(q).forEach(function($){var f=q[$];q[$]=a3(f,_)})}function a3(q,_){var $=_.lookupProperty;return d3.wrapHelper(q,function(f){return x.extend({lookupProperty:$},f)})}});var I_=J((E6,g6)=>{E6.__esModule=!0;E6.default=function(q){(function(){if(typeof globalThis==="object")return;Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__})();var _=globalThis.Handlebars;q.noConflict=function(){if(globalThis.Handlebars===q)globalThis.Handlebars=_;return q}};g6.exports=E6.default});var s6=J((x6,L6)=>{x6.__esModule=!0;function D_(q){return q&&q.__esModule?q:{default:q}}function x_(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}var y3=Uq(),I6=x_(y3),D3=S6(),x3=D_(D3),L3=S(),s3=D_(L3),B3=b(),y_=x_(B3),U3=R6(),y6=x_(U3),F3=I_(),Q3=D_(F3);function D6(){var q=new I6.HandlebarsEnvironment;return y_.extend(q,I6),q.SafeString=x3.default,q.Exception=s3.default,q.Utils=y_,q.escapeExpression=y_.escapeExpression,q.VM=y6,q.template=function(_){return y6.template(_,q)},q}var tq=D6();tq.create=D6;Q3.default(tq);tq.default=tq;x6.default=tq;L6.exports=x6.default});var L_=J((U6,F6)=>{U6.__esModule=!0;var B6={helpers:{helperExpression:function(_){return _.type==="SubExpression"||(_.type==="MustacheStatement"||_.type==="BlockStatement")&&!!(_.params&&_.params.length||_.hash)},scopedId:function(_){return/^\.|this\b/.test(_.original)},simpleId:function(_){return _.parts.length===1&&!B6.helpers.scopedId(_)&&!_.depth}}};U6.default=B6;F6.exports=U6.default});var _8=J((Q6,q8)=>{Q6.__esModule=!0;var K4=function(){var q={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_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(K,P,j,v,O,w,T){var Y=w.length-1;switch(O){case 1:return w[Y-1];case 2:this.$=v.prepareProgram(w[Y]);break;case 3:this.$=w[Y];break;case 4:this.$=w[Y];break;case 5:this.$=w[Y];break;case 6:this.$=w[Y];break;case 7:this.$=w[Y];break;case 8:this.$=w[Y];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(w[Y]),strip:v.stripFlags(w[Y],w[Y]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:w[Y],value:w[Y],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(w[Y-2],w[Y-1],w[Y],this._$);break;case 12:this.$={path:w[Y-3],params:w[Y-2],hash:w[Y-1]};break;case 13:this.$=v.prepareBlock(w[Y-3],w[Y-2],w[Y-1],w[Y],!1,this._$);break;case 14:this.$=v.prepareBlock(w[Y-3],w[Y-2],w[Y-1],w[Y],!0,this._$);break;case 15:this.$={open:w[Y-5],path:w[Y-4],params:w[Y-3],hash:w[Y-2],blockParams:w[Y-1],strip:v.stripFlags(w[Y-5],w[Y])};break;case 16:this.$={path:w[Y-4],params:w[Y-3],hash:w[Y-2],blockParams:w[Y-1],strip:v.stripFlags(w[Y-5],w[Y])};break;case 17:this.$={path:w[Y-4],params:w[Y-3],hash:w[Y-2],blockParams:w[Y-1],strip:v.stripFlags(w[Y-5],w[Y])};break;case 18:this.$={strip:v.stripFlags(w[Y-1],w[Y-1]),program:w[Y]};break;case 19:var k=v.prepareBlock(w[Y-2],w[Y-1],w[Y],w[Y],!1,this._$),z=v.prepareProgram([k],w[Y-1].loc);z.chained=!0,this.$={strip:w[Y-2].strip,program:z,chain:!0};break;case 20:this.$=w[Y];break;case 21:this.$={path:w[Y-1],strip:v.stripFlags(w[Y-2],w[Y])};break;case 22:this.$=v.prepareMustache(w[Y-3],w[Y-2],w[Y-1],w[Y-4],v.stripFlags(w[Y-4],w[Y]),this._$);break;case 23:this.$=v.prepareMustache(w[Y-3],w[Y-2],w[Y-1],w[Y-4],v.stripFlags(w[Y-4],w[Y]),this._$);break;case 24:this.$={type:"PartialStatement",name:w[Y-3],params:w[Y-2],hash:w[Y-1],indent:"",strip:v.stripFlags(w[Y-4],w[Y]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(w[Y-2],w[Y-1],w[Y],this._$);break;case 26:this.$={path:w[Y-3],params:w[Y-2],hash:w[Y-1],strip:v.stripFlags(w[Y-4],w[Y])};break;case 27:this.$=w[Y];break;case 28:this.$=w[Y];break;case 29:this.$={type:"SubExpression",path:w[Y-3],params:w[Y-2],hash:w[Y-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:w[Y],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(w[Y-2]),value:w[Y],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(w[Y-1]);break;case 33:this.$=w[Y];break;case 34:this.$=w[Y];break;case 35:this.$={type:"StringLiteral",value:w[Y],original:w[Y],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(w[Y]),original:Number(w[Y]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:w[Y]==="true",original:w[Y]==="true",loc:v.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:v.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:v.locInfo(this._$)};break;case 40:this.$=w[Y];break;case 41:this.$=w[Y];break;case 42:this.$=v.preparePath(!0,w[Y],this._$);break;case 43:this.$=v.preparePath(!1,w[Y],this._$);break;case 44:w[Y-2].push({part:v.id(w[Y]),original:w[Y],separator:w[Y-1]}),this.$=w[Y-2];break;case 45:this.$=[{part:v.id(w[Y]),original:w[Y]}];break;case 46:this.$=[];break;case 47:w[Y-1].push(w[Y]);break;case 48:this.$=[];break;case 49:w[Y-1].push(w[Y]);break;case 50:this.$=[];break;case 51:w[Y-1].push(w[Y]);break;case 58:this.$=[];break;case 59:w[Y-1].push(w[Y]);break;case 64:this.$=[];break;case 65:w[Y-1].push(w[Y]);break;case 70:this.$=[];break;case 71:w[Y-1].push(w[Y]);break;case 78:this.$=[];break;case 79:w[Y-1].push(w[Y]);break;case 82:this.$=[];break;case 83:w[Y-1].push(w[Y]);break;case 86:this.$=[];break;case 87:w[Y-1].push(w[Y]);break;case 90:this.$=[];break;case 91:w[Y-1].push(w[Y]);break;case 94:this.$=[];break;case 95:w[Y-1].push(w[Y]);break;case 98:this.$=[w[Y]];break;case 99:w[Y-1].push(w[Y]);break;case 100:this.$=[w[Y]];break;case 101:w[Y-1].push(w[Y]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(K,P){throw Error(K)},parse:function(K){var P=this,j=[0],v=[null],O=[],w=this.table,T="",Y=0,k=0,z=0,Z=2,r=1;if(this.lexer.setInput(K),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u")this.lexer.yylloc={};var W=this.lexer.yylloc;O.push(W);var m=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function C(D){j.length=j.length-2*D,v.length=v.length-D,O.length=O.length-D}function kq(){var D=P.lexer.lex()||1;if(typeof D!=="number")D=P.symbols_[D]||D;return D}var o,W_,jq,a,z9,J_,zq={},Rq,y,M$,Eq;while(!0){if(jq=j[j.length-1],this.defaultActions[jq])a=this.defaultActions[jq];else{if(o===null||typeof o>"u")o=kq();a=w[jq]&&w[jq][o]}if(typeof a>"u"||!a.length||!a[0]){var Z_="";if(!z){Eq=[];for(Rq in w[jq])if(this.terminals_[Rq]&&Rq>2)Eq.push("'"+this.terminals_[Rq]+"'");if(this.lexer.showPosition)Z_="Parse error on line "+(Y+1)+`:
8
8
  `+this.lexer.showPosition()+`
9
- Expecting `+dq.join(", ")+", got '"+(this.terminals_[X]||X)+"'";else Qq="Parse error on line "+(Y+1)+": Unexpected "+(X==1?"end of input":"'"+(this.terminals_[X]||X)+"'");this.parseError(Qq,{text:this.lexer.match,token:this.terminals_[X]||X,line:this.lexer.yylineno,loc:b,expected:dq})}}if(d[0]instanceof Array&&d.length>1)throw Error("Parse Error: multiple actions possible at state: "+x+", token: "+X);switch(d[0]){case 1:if(j.push(X),v.push(this.lexer.yytext),O.push(this.lexer.yylloc),j.push(d[1]),X=null,!Uq){if(k=this.lexer.yyleng,h=this.lexer.yytext,Y=this.lexer.yylineno,b=this.lexer.yylloc,z>0)z--}else X=Uq,Uq=null;break;case 2:if(l=this.productions_[d[1]][1],_q.$=v[v.length-l],_q._$={first_line:O[O.length-(l||1)].first_line,last_line:O[O.length-1].last_line,first_column:O[O.length-(l||1)].first_column,last_column:O[O.length-1].last_column},o)_q._$.range=[O[O.length-(l||1)].range[0],O[O.length-1].range[1]];if(Fq=this.performAction.call(_q,h,k,Y,this.yy,d[1],v,O),typeof Fq<"u")return Fq;if(l)j=j.slice(0,-1*l*2),v=v.slice(0,-1*l),O=O.slice(0,-1*l);j.push(this.productions_[d[1]][0]),v.push(_q.$),O.push(_q._$),v$=w[j[j.length-2]][j[j.length-1]],j.push(v$);break;case 3:return!0}}return!0}},q=function(){var f={EOF:1,parseError:function(P,j){if(this.yy.parser)this.yy.parser.parseError(P,j);else throw Error(P)},setInput:function(P){if(this._input=P,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];return this.offset=0,this},input:function(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var j=P.match(/(?:\r\n?|\n).*/g);if(j)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),P},unput:function(P){var j=P.length,v=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-j-1),this.offset-=j;var O=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1)this.yylineno-=v.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===O.length?this.yylloc.first_column:0)+O[O.length-v.length].length-v[0].length:this.yylloc.first_column-j},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-j];return this},more:function(){return this._more=!0,this},less:function(P){this.unput(this.match.slice(P))},pastInput:function(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var P=this.match;if(P.length<20)P+=this._input.substr(0,20-P.length);return(P.substr(0,20)+(P.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var P=this.pastInput(),j=Array(P.length+1).join("-");return P+this.upcomingInput()+`
10
- `+j+"^"},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var P,j,v,O,w,h;if(!this._more)this.yytext="",this.match="";var Y=this._currentRules();for(var k=0;k<Y.length;k++)if(v=this._input.match(this.rules[Y[k]]),v&&(!j||v[0].length>j[0].length)){if(j=v,O=k,!this.options.flex)break}if(j){if(h=j[0].match(/(?:\r\n?|\n).*/g),h)this.yylineno+=h.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],P=this.performAction.call(this,this.yy,this,Y[O],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(P)return P;else return}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
11
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var P=this.next();if(typeof P<"u")return P;else return this.lex()},begin:function(P){this.conditionStack.push(P)},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(P){this.begin(P)}};return f.options={},f.performAction=function(P,j,v,O){function w(Y,k){return j.yytext=j.yytext.substring(Y,j.yyleng-k+Y)}var h=O;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")w(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")w(0,1),this.begin("emu");else this.begin("mu");if(j.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:if(this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw")return 15;else return w(5,9),"END_RAW_BLOCK";break;case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(j.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return j.yytext=w(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=w(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;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 j.yytext=j.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},f.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],f.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}},f}();_.lexer=q;function $(){this.yy={}}return $.prototype=_,_.Parser=$,new $}();u6.default=Yj;n6.exports=u6.default});var Mq=H((p6,e6)=>{p6.__esModule=!0;function kj(_){return _&&_.__esModule?_:{default:_}}var rj=t(),p_=kj(rj);function Vq(){this.parents=[]}Vq.prototype={constructor:Vq,mutating:!1,acceptKey:function(q,$){var f=this.accept(q[$]);if(this.mutating){if(f&&!Vq.prototype[f.type])throw new p_.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+q.type);q[$]=f}},acceptRequired:function(q,$){if(this.acceptKey(q,$),!q[$])throw new p_.default(q.type+" requires "+$)},acceptArray:function(q){for(var $=0,f=q.length;$<f;$++)if(this.acceptKey(q,$),!q[$])q.splice($,1),$--,f--},accept:function(q){if(!q)return;if(!this[q.type])throw new p_.default("Unknown type: "+q.type,q);if(this.current)this.parents.unshift(this.current);this.current=q;var $=this[q.type](q);if(this.current=this.parents.shift(),!this.mutating||$)return $;else if($!==!1)return q},Program:function(q){this.acceptArray(q.body)},MustacheStatement:lq,Decorator:lq,BlockStatement:A6,DecoratorBlock:A6,PartialStatement:X6,PartialBlockStatement:function(q){X6.call(this,q),this.acceptKey(q,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:lq,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(q){this.acceptArray(q.pairs)},HashPair:function(q){this.acceptRequired(q,"value")}};function lq(_){this.acceptRequired(_,"path"),this.acceptArray(_.params),this.acceptKey(_,"hash")}function A6(_){lq.call(this,_),this.acceptKey(_,"program"),this.acceptKey(_,"inverse")}function X6(_){this.acceptRequired(_,"name"),this.acceptArray(_.params),this.acceptKey(_,"hash")}p6.default=Vq;e6.exports=p6.default});var G6=H((d6,t6)=>{d6.__esModule=!0;function Wj(_){return _&&_.__esModule?_:{default:_}}var Jj=Mq(),Zj=Wj(Jj);function C(){var _=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=_}C.prototype=new Zj.default;C.prototype.Program=function(_){var q=!this.options.ignoreStandalone,$=!this.isRootSeen;this.isRootSeen=!0;var f=_.body;for(var K=0,P=f.length;K<P;K++){var j=f[K],v=this.accept(j);if(!v)continue;var O=e_(f,K,$),w=d_(f,K,$),h=v.openStandalone&&O,Y=v.closeStandalone&&w,k=v.inlineStandalone&&O&&w;if(v.close)B(f,K,!0);if(v.open)y(f,K,!0);if(q&&k){if(B(f,K),y(f,K)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(f[K-1].original)[1]}}if(q&&h)B((j.program||j.inverse).body),y(f,K);if(q&&Y)B(f,K),y((j.inverse||j.program).body)}return _};C.prototype.BlockStatement=C.prototype.DecoratorBlock=C.prototype.PartialBlockStatement=function(_){this.accept(_.program),this.accept(_.inverse);var q=_.program||_.inverse,$=_.program&&_.inverse,f=$,K=$;if($&&$.chained){f=$.body[0].program;while(K.chained)K=K.body[K.body.length-1].program}var P={open:_.openStrip.open,close:_.closeStrip.close,openStandalone:d_(q.body),closeStandalone:e_((f||q).body)};if(_.openStrip.close)B(q.body,null,!0);if($){var j=_.inverseStrip;if(j.open)y(q.body,null,!0);if(j.close)B(f.body,null,!0);if(_.closeStrip.open)y(K.body,null,!0);if(!this.options.ignoreStandalone&&e_(q.body)&&d_(f.body))y(q.body),B(f.body)}else if(_.closeStrip.open)y(q.body,null,!0);return P};C.prototype.Decorator=C.prototype.MustacheStatement=function(_){return _.strip};C.prototype.PartialStatement=C.prototype.CommentStatement=function(_){var q=_.strip||{};return{inlineStandalone:!0,open:q.open,close:q.close}};function e_(_,q,$){if(q===void 0)q=_.length;var f=_[q-1],K=_[q-2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(f.original)}function d_(_,q,$){if(q===void 0)q=-1;var f=_[q+1],K=_[q+2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(f.original)}function B(_,q,$){var f=_[q==null?0:q+1];if(!f||f.type!=="ContentStatement"||!$&&f.rightStripped)return;var K=f.value;f.value=f.value.replace($?/^\s+/:/^[ \t]*\r?\n?/,""),f.rightStripped=f.value!==K}function y(_,q,$){var f=_[q==null?_.length-1:q-1];if(!f||f.type!=="ContentStatement"||!$&&f.leftStripped)return;var K=f.value;return f.value=f.value.replace($?/\s+$/:/[ \t]+$/,""),f.leftStripped=f.value!==K,f.leftStripped}d6.default=C;t6.exports=d6.default});var i6=H((Sj)=>{Sj.__esModule=!0;Sj.SourceLocation=Aj;Sj.id=Xj;Sj.stripFlags=pj;Sj.stripComment=ej;Sj.preparePath=dj;Sj.prepareMustache=tj;Sj.prepareRawBlock=Gj;Sj.prepareBlock=ij;Sj.prepareProgram=aj;Sj.preparePartialBlock=bj;function nj(_){return _&&_.__esModule?_:{default:_}}var oj=t(),t_=nj(oj);function G_(_,q){if(q=q.path?q.path.original:q,_.path.original!==q){var $={loc:_.path.loc};throw new t_.default(_.path.original+" doesn't match "+q,$)}}function Aj(_,q){this.source=_,this.start={line:q.first_line,column:q.first_column},this.end={line:q.last_line,column:q.last_column}}function Xj(_){if(/^\[.*\]$/.test(_))return _.substring(1,_.length-1);else return _}function pj(_,q){return{open:_.charAt(2)==="~",close:q.charAt(q.length-3)==="~"}}function ej(_){return _.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function dj(_,q,$){$=this.locInfo($);var f=_?"@":"",K=[],P=0;for(var j=0,v=q.length;j<v;j++){var O=q[j].part,w=q[j].original!==O;if(f+=(q[j].separator||"")+O,!w&&(O===".."||O==="."||O==="this")){if(K.length>0)throw new t_.default("Invalid path: "+f,{loc:$});else if(O==="..")P++}else K.push(O)}return{type:"PathExpression",data:_,depth:P,parts:K,original:f,loc:$}}function tj(_,q,$,f,K,P){var j=f.charAt(3)||f.charAt(2),v=j!=="{"&&j!=="&",O=/\*/.test(f);return{type:O?"Decorator":"MustacheStatement",path:_,params:q,hash:$,escaped:v,strip:K,loc:this.locInfo(P)}}function Gj(_,q,$,f){G_(_,$),f=this.locInfo(f);var K={type:"Program",body:q,strip:{},loc:f};return{type:"BlockStatement",path:_.path,params:_.params,hash:_.hash,program:K,openStrip:{},inverseStrip:{},closeStrip:{},loc:f}}function ij(_,q,$,f,K,P){if(f&&f.path)G_(_,f);var j=/\*/.test(_.open);q.blockParams=_.blockParams;var v=void 0,O=void 0;if($){if(j)throw new t_.default("Unexpected inverse block on decorator",$);if($.chain)$.program.body[0].closeStrip=f.strip;O=$.strip,v=$.program}if(K)K=v,v=q,q=K;return{type:j?"DecoratorBlock":"BlockStatement",path:_.path,params:_.params,hash:_.hash,program:q,inverse:v,openStrip:_.strip,inverseStrip:O,closeStrip:f&&f.strip,loc:this.locInfo(P)}}function aj(_,q){if(!q&&_.length){var $=_[0].loc,f=_[_.length-1].loc;if($&&f)q={source:$.source,start:{line:$.start.line,column:$.start.column},end:{line:f.end.line,column:f.end.column}}}return{type:"Program",body:_,strip:{},loc:q}}function bj(_,q,$,f){return G_(_,$),{type:"PartialBlockStatement",name:_.path,params:_.params,hash:_.hash,program:q,openStrip:_.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var S6=H((q3)=>{q3.__esModule=!0;q3.parseWithoutProcessing=b6;q3.parse=Qj;function Dj(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$))q[$]=_[$]}return q.default=_,q}}function a6(_){return _&&_.__esModule?_:{default:_}}var xj=o6(),i_=a6(xj),Lj=G6(),sj=a6(Lj),Bj=i6(),Uj=Dj(Bj),Fj=p();q3.parser=i_.default;var Nq={};Fj.extend(Nq,Uj);function b6(_,q){if(_.type==="Program")return _;i_.default.yy=Nq,Nq.locInfo=function(f){return new Nq.SourceLocation(q&&q.srcName,f)};var $=i_.default.parse(_);return $}function Qj(_,q){var $=b6(_,q),f=new sj.default(q);return f.accept($)}});var M6=H((Y3)=>{Y3.__esModule=!0;Y3.Compiler=a_;Y3.precompile=w3;Y3.compile=O3;function V6(_){return _&&_.__esModule?_:{default:_}}var P3=t(),Zq=V6(P3),mq=p(),j3=X_(),Jq=V6(j3),v3=[].slice;function a_(){}a_.prototype={compiler:a_,equals:function(q){var $=this.opcodes.length;if(q.opcodes.length!==$)return!1;for(var f=0;f<$;f++){var K=this.opcodes[f],P=q.opcodes[f];if(K.opcode!==P.opcode||!l6(K.args,P.args))return!1}$=this.children.length;for(var f=0;f<$;f++)if(!this.children[f].equals(q.children[f]))return!1;return!0},guid:0,compile:function(q,$){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=$,this.stringParams=$.stringParams,this.trackIds=$.trackIds,$.blockParams=$.blockParams||[],$.knownHelpers=mq.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},$.knownHelpers),this.accept(q)},compileProgram:function(q){var $=new this.compiler,f=$.compile(q,this.options),K=this.guid++;return this.usePartial=this.usePartial||f.usePartial,this.children[K]=f,this.useDepths=this.useDepths||f.useDepths,K},accept:function(q){if(!this[q.type])throw new Zq.default("Unknown type: "+q.type,q);this.sourceNode.unshift(q);var $=this[q.type](q);return this.sourceNode.shift(),$},Program:function(q){this.options.blockParams.unshift(q.blockParams);var $=q.body,f=$.length;for(var K=0;K<f;K++)this.accept($[K]);return this.options.blockParams.shift(),this.isSimple=f===1,this.blockParams=q.blockParams?q.blockParams.length:0,this},BlockStatement:function(q){C6(q);var{program:$,inverse:f}=q;$=$&&this.compileProgram($),f=f&&this.compileProgram(f);var K=this.classifySexpr(q);if(K==="helper")this.helperSexpr(q,$,f);else if(K==="simple")this.simpleSexpr(q),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("blockValue",q.path.original);else this.ambiguousSexpr(q,$,f),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue");this.opcode("append")},DecoratorBlock:function(q){var $=q.program&&this.compileProgram(q.program),f=this.setupFullMustacheParams(q,$,void 0),K=q.path;this.useDecorators=!0,this.opcode("registerDecorator",f.length,K.original)},PartialStatement:function(q){this.usePartial=!0;var $=q.program;if($)$=this.compileProgram(q.program);var f=q.params;if(f.length>1)throw new Zq.default("Unsupported number of partial arguments: "+f.length,q);else if(!f.length)if(this.options.explicitPartialContext)this.opcode("pushLiteral","undefined");else f.push({type:"PathExpression",parts:[],depth:0});var K=q.name.original,P=q.name.type==="SubExpression";if(P)this.accept(q.name);this.setupFullMustacheParams(q,$,void 0,!0);var j=q.indent||"";if(this.options.preventIndent&&j)this.opcode("appendContent",j),j="";this.opcode("invokePartial",P,K,j),this.opcode("append")},PartialBlockStatement:function(q){this.PartialStatement(q)},MustacheStatement:function(q){if(this.SubExpression(q),q.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},Decorator:function(q){this.DecoratorBlock(q)},ContentStatement:function(q){if(q.value)this.opcode("appendContent",q.value)},CommentStatement:function(){},SubExpression:function(q){C6(q);var $=this.classifySexpr(q);if($==="simple")this.simpleSexpr(q);else if($==="helper")this.helperSexpr(q);else this.ambiguousSexpr(q)},ambiguousSexpr:function(q,$,f){var K=q.path,P=K.parts[0],j=$!=null||f!=null;this.opcode("getContext",K.depth),this.opcode("pushProgram",$),this.opcode("pushProgram",f),K.strict=!0,this.accept(K),this.opcode("invokeAmbiguous",P,j)},simpleSexpr:function(q){var $=q.path;$.strict=!0,this.accept($),this.opcode("resolvePossibleLambda")},helperSexpr:function(q,$,f){var K=this.setupFullMustacheParams(q,$,f),P=q.path,j=P.parts[0];if(this.options.knownHelpers[j])this.opcode("invokeKnownHelper",K.length,j);else if(this.options.knownHelpersOnly)throw new Zq.default("You specified knownHelpersOnly, but used the unknown helper "+j,q);else P.strict=!0,P.falsy=!0,this.accept(P),this.opcode("invokeHelper",K.length,P.original,Jq.default.helpers.simpleId(P))},PathExpression:function(q){this.addDepth(q.depth),this.opcode("getContext",q.depth);var $=q.parts[0],f=Jq.default.helpers.scopedId(q),K=!q.depth&&!f&&this.blockParamIndex($);if(K)this.opcode("lookupBlockParam",K,q.parts);else if(!$)this.opcode("pushContext");else if(q.data)this.options.data=!0,this.opcode("lookupData",q.depth,q.parts,q.strict);else this.opcode("lookupOnContext",q.parts,q.falsy,q.strict,f)},StringLiteral:function(q){this.opcode("pushString",q.value)},NumberLiteral:function(q){this.opcode("pushLiteral",q.value)},BooleanLiteral:function(q){this.opcode("pushLiteral",q.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(q){var $=q.pairs,f=0,K=$.length;this.opcode("pushHash");for(;f<K;f++)this.pushParam($[f].value);while(f--)this.opcode("assignToHash",$[f].key);this.opcode("popHash")},opcode:function(q){this.opcodes.push({opcode:q,args:v3.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(q){if(!q)return;this.useDepths=!0},classifySexpr:function(q){var $=Jq.default.helpers.simpleId(q.path),f=$&&!!this.blockParamIndex(q.path.parts[0]),K=!f&&Jq.default.helpers.helperExpression(q),P=!f&&(K||$);if(P&&!K){var j=q.path.parts[0],v=this.options;if(v.knownHelpers[j])K=!0;else if(v.knownHelpersOnly)P=!1}if(K)return"helper";else if(P)return"ambiguous";else return"simple"},pushParams:function(q){for(var $=0,f=q.length;$<f;$++)this.pushParam(q[$])},pushParam:function(q){var $=q.value!=null?q.value:q.original||"";if(this.stringParams){if($.replace)$=$.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".");if(q.depth)this.addDepth(q.depth);if(this.opcode("getContext",q.depth||0),this.opcode("pushStringParam",$,q.type),q.type==="SubExpression")this.accept(q)}else{if(this.trackIds){var f=void 0;if(q.parts&&!Jq.default.helpers.scopedId(q)&&!q.depth)f=this.blockParamIndex(q.parts[0]);if(f){var K=q.parts.slice(1).join(".");this.opcode("pushId","BlockParam",f,K)}else{if($=q.original||$,$.replace)$=$.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"");this.opcode("pushId",q.type,$)}}this.accept(q)}},setupFullMustacheParams:function(q,$,f,K){var P=q.params;if(this.pushParams(P),this.opcode("pushProgram",$),this.opcode("pushProgram",f),q.hash)this.accept(q.hash);else this.opcode("emptyHash",K);return P},blockParamIndex:function(q){for(var $=0,f=this.options.blockParams.length;$<f;$++){var K=this.options.blockParams[$],P=K&&mq.indexOf(K,q);if(K&&P>=0)return[$,P]}}};function w3(_,q,$){if(_==null||typeof _!=="string"&&_.type!=="Program")throw new Zq.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+_);if(q=q||{},!("data"in q))q.data=!0;if(q.compat)q.useDepths=!0;var f=$.parse(_,q),K=new $.Compiler().compile(f,q);return new $.JavaScriptCompiler().compile(K,q)}function O3(_,q,$){if(q===void 0)q={};if(_==null||typeof _!=="string"&&_.type!=="Program")throw new Zq.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+_);if(q=mq.extend({},q),!("data"in q))q.data=!0;if(q.compat)q.useDepths=!0;var f=void 0;function K(){var j=$.parse(_,q),v=new $.Compiler().compile(j,q),O=new $.JavaScriptCompiler().compile(v,q,void 0,!0);return $.template(O)}function P(j,v){if(!f)f=K();return f.call(this,j,v)}return P._setup=function(j){if(!f)f=K();return f._setup(j)},P._child=function(j,v,O,w){if(!f)f=K();return f._child(j,v,O,w)},P}function l6(_,q){if(_===q)return!0;if(mq.isArray(_)&&mq.isArray(q)&&_.length===q.length){for(var $=0;$<_.length;$++)if(!l6(_[$],q[$]))return!1;return!0}}function C6(_){if(!_.path.parts){var q=_.path;_.path={type:"PathExpression",data:!1,depth:0,parts:[q.original+""],original:q.original+"",loc:q.loc}}}});var c6=H((z3)=>{var N6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");z3.encode=function(_){if(0<=_&&_<N6.length)return N6[_];throw TypeError("Must be between 0 and 63: "+_)};z3.decode=function(_){var q=65,$=90,f=97,K=122,P=48,j=57,v=43,O=47,w=26,h=52;if(q<=_&&_<=$)return _-q;if(f<=_&&_<=K)return _-f+w;if(P<=_&&_<=j)return _-P+h;if(_==v)return 62;if(_==O)return 63;return-1}});var S_=H((m3)=>{var E6=c6(),b_=5,R6=1<<b_,g6=R6-1,I6=R6;function J3(_){return _<0?(-_<<1)+1:(_<<1)+0}function Z3(_){var q=(_&1)===1,$=_>>1;return q?-$:$}m3.encode=function(q){var $="",f,K=J3(q);do{if(f=K&g6,K>>>=b_,K>0)f|=I6;$+=E6.encode(f)}while(K>0);return $};m3.decode=function(q,$,f){var K=q.length,P=0,j=0,v,O;do{if($>=K)throw Error("Expected more digits in base 64 VLQ value.");if(O=E6.decode(q.charCodeAt($++)),O===-1)throw Error("Invalid base64 digit: "+q.charAt($-1));v=!!(O&I6),O&=g6,P=P+(O<<j),j+=b_}while(v);f.value=Z3(P),f.rest=$}});var vq=H((b3)=>{function o3(_,q,$){if(q in _)return _[q];else if(arguments.length===3)return $;else throw Error('"'+q+'" is a required argument.')}b3.getArg=o3;var y6=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,A3=/^data:.+\,.+$/;function uq(_){var q=_.match(y6);if(!q)return null;return{scheme:q[1],auth:q[2],host:q[3],port:q[4],path:q[5]}}b3.urlParse=uq;function Pq(_){var q="";if(_.scheme)q+=_.scheme+":";if(q+="//",_.auth)q+=_.auth+"@";if(_.host)q+=_.host;if(_.port)q+=":"+_.port;if(_.path)q+=_.path;return q}b3.urlGenerate=Pq;function C_(_){var q=_,$=uq(_);if($){if(!$.path)return _;q=$.path}var f=b3.isAbsolute(q),K=q.split(/\/+/);for(var P,j=0,v=K.length-1;v>=0;v--)if(P=K[v],P===".")K.splice(v,1);else if(P==="..")j++;else if(j>0)if(P==="")K.splice(v+1,j),j=0;else K.splice(v,2),j--;if(q=K.join("/"),q==="")q=f?"/":".";if($)return $.path=q,Pq($);return q}b3.normalize=C_;function D6(_,q){if(_==="")_=".";if(q==="")q=".";var $=uq(q),f=uq(_);if(f)_=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return Pq($)}if($||q.match(A3))return q;if(f&&!f.host&&!f.path)return f.host=q,Pq(f);var K=q.charAt(0)==="/"?q:C_(_.replace(/\/+$/,"")+"/"+q);if(f)return f.path=K,Pq(f);return K}b3.join=D6;b3.isAbsolute=function(_){return _.charAt(0)==="/"||y6.test(_)};function X3(_,q){if(_==="")_=".";_=_.replace(/\/$/,"");var $=0;while(q.indexOf(_+"/")!==0){var f=_.lastIndexOf("/");if(f<0)return q;if(_=_.slice(0,f),_.match(/^([^\/]+:\/)?\/*$/))return q;++$}return Array($+1).join("../")+q.substr(_.length+1)}b3.relative=X3;var x6=function(){var _=Object.create(null);return!("__proto__"in _)}();function L6(_){return _}function p3(_){if(s6(_))return"$"+_;return _}b3.toSetString=x6?L6:p3;function e3(_){if(s6(_))return _.slice(1);return _}b3.fromSetString=x6?L6:e3;function s6(_){if(!_)return!1;var q=_.length;if(q<9)return!1;if(_.charCodeAt(q-1)!==95||_.charCodeAt(q-2)!==95||_.charCodeAt(q-3)!==111||_.charCodeAt(q-4)!==116||_.charCodeAt(q-5)!==111||_.charCodeAt(q-6)!==114||_.charCodeAt(q-7)!==112||_.charCodeAt(q-8)!==95||_.charCodeAt(q-9)!==95)return!1;for(var $=q-10;$>=0;$--)if(_.charCodeAt($)!==36)return!1;return!0}function d3(_,q,$){var f=jq(_.source,q.source);if(f!==0)return f;if(f=_.originalLine-q.originalLine,f!==0)return f;if(f=_.originalColumn-q.originalColumn,f!==0||$)return f;if(f=_.generatedColumn-q.generatedColumn,f!==0)return f;if(f=_.generatedLine-q.generatedLine,f!==0)return f;return jq(_.name,q.name)}b3.compareByOriginalPositions=d3;function t3(_,q,$){var f=_.generatedLine-q.generatedLine;if(f!==0)return f;if(f=_.generatedColumn-q.generatedColumn,f!==0||$)return f;if(f=jq(_.source,q.source),f!==0)return f;if(f=_.originalLine-q.originalLine,f!==0)return f;if(f=_.originalColumn-q.originalColumn,f!==0)return f;return jq(_.name,q.name)}b3.compareByGeneratedPositionsDeflated=t3;function jq(_,q){if(_===q)return 0;if(_===null)return 1;if(q===null)return-1;if(_>q)return 1;return-1}function G3(_,q){var $=_.generatedLine-q.generatedLine;if($!==0)return $;if($=_.generatedColumn-q.generatedColumn,$!==0)return $;if($=jq(_.source,q.source),$!==0)return $;if($=_.originalLine-q.originalLine,$!==0)return $;if($=_.originalColumn-q.originalColumn,$!==0)return $;return jq(_.name,q.name)}b3.compareByGeneratedPositionsInflated=G3;function i3(_){return JSON.parse(_.replace(/^\)]}'[^\n]*\n/,""))}b3.parseSourceMapInput=i3;function a3(_,q,$){if(q=q||"",_){if(_[_.length-1]!=="/"&&q[0]!=="/")_+="/";q=_+q}if($){var f=uq($);if(!f)throw Error("sourceMapURL could not be parsed");if(f.path){var K=f.path.lastIndexOf("/");if(K>=0)f.path=f.path.substring(0,K+1)}q=D6(Pq(f),q)}return C_(q)}b3.computeSourceURL=a3});var M_=H((L3)=>{var V_=vq(),l_=Object.prototype.hasOwnProperty,U=typeof Map<"u";function R(){this._array=[],this._set=U?new Map:Object.create(null)}R.fromArray=function(q,$){var f=new R;for(var K=0,P=q.length;K<P;K++)f.add(q[K],$);return f};R.prototype.size=function(){return U?this._set.size:Object.getOwnPropertyNames(this._set).length};R.prototype.add=function(q,$){var f=U?q:V_.toSetString(q),K=U?this.has(q):l_.call(this._set,f),P=this._array.length;if(!K||$)this._array.push(q);if(!K)if(U)this._set.set(q,P);else this._set[f]=P};R.prototype.has=function(q){if(U)return this._set.has(q);else{var $=V_.toSetString(q);return l_.call(this._set,$)}};R.prototype.indexOf=function(q){if(U){var $=this._set.get(q);if($>=0)return $}else{var f=V_.toSetString(q);if(l_.call(this._set,f))return this._set[f]}throw Error('"'+q+'" is not in the set.')};R.prototype.at=function(q){if(q>=0&&q<this._array.length)return this._array[q];throw Error("No element indexed by "+q)};R.prototype.toArray=function(){return this._array.slice()};L3.ArraySet=R});var U6=H((U3)=>{var B6=vq();function B3(_,q){var $=_.generatedLine,f=q.generatedLine,K=_.generatedColumn,P=q.generatedColumn;return f>$||f==$&&P>=K||B6.compareByGeneratedPositionsInflated(_,q)<=0}function cq(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}cq.prototype.unsortedForEach=function(q,$){this._array.forEach(q,$)};cq.prototype.add=function(q){if(B3(this._last,q))this._last=q,this._array.push(q);else this._sorted=!1,this._array.push(q)};cq.prototype.toArray=function(){if(!this._sorted)this._array.sort(B6.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};U3.MappingList=cq});var N_=H((q4)=>{var nq=S_(),u=vq(),Eq=M_().ArraySet,Q3=U6().MappingList;function G(_){if(!_)_={};this._file=u.getArg(_,"file",null),this._sourceRoot=u.getArg(_,"sourceRoot",null),this._skipValidation=u.getArg(_,"skipValidation",!1),this._sources=new Eq,this._names=new Eq,this._mappings=new Q3,this._sourcesContents=null}G.prototype._version=3;G.fromSourceMap=function(q){var $=q.sourceRoot,f=new G({file:q.file,sourceRoot:$});return q.eachMapping(function(K){var P={generated:{line:K.generatedLine,column:K.generatedColumn}};if(K.source!=null){if(P.source=K.source,$!=null)P.source=u.relative($,P.source);if(P.original={line:K.originalLine,column:K.originalColumn},K.name!=null)P.name=K.name}f.addMapping(P)}),q.sources.forEach(function(K){var P=K;if($!==null)P=u.relative($,K);if(!f._sources.has(P))f._sources.add(P);var j=q.sourceContentFor(K);if(j!=null)f.setSourceContent(K,j)}),f};G.prototype.addMapping=function(q){var $=u.getArg(q,"generated"),f=u.getArg(q,"original",null),K=u.getArg(q,"source",null),P=u.getArg(q,"name",null);if(!this._skipValidation)this._validateMapping($,f,K,P);if(K!=null){if(K=String(K),!this._sources.has(K))this._sources.add(K)}if(P!=null){if(P=String(P),!this._names.has(P))this._names.add(P)}this._mappings.add({generatedLine:$.line,generatedColumn:$.column,originalLine:f!=null&&f.line,originalColumn:f!=null&&f.column,source:K,name:P})};G.prototype.setSourceContent=function(q,$){var f=q;if(this._sourceRoot!=null)f=u.relative(this._sourceRoot,f);if($!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[u.toSetString(f)]=$}else if(this._sourcesContents){if(delete this._sourcesContents[u.toSetString(f)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};G.prototype.applySourceMap=function(q,$,f){var K=$;if($==null){if(q.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);K=q.file}var P=this._sourceRoot;if(P!=null)K=u.relative(P,K);var j=new Eq,v=new Eq;this._mappings.unsortedForEach(function(O){if(O.source===K&&O.originalLine!=null){var w=q.originalPositionFor({line:O.originalLine,column:O.originalColumn});if(w.source!=null){if(O.source=w.source,f!=null)O.source=u.join(f,O.source);if(P!=null)O.source=u.relative(P,O.source);if(O.originalLine=w.line,O.originalColumn=w.column,w.name!=null)O.name=w.name}}var h=O.source;if(h!=null&&!j.has(h))j.add(h);var Y=O.name;if(Y!=null&&!v.has(Y))v.add(Y)},this),this._sources=j,this._names=v,q.sources.forEach(function(O){var w=q.sourceContentFor(O);if(w!=null){if(f!=null)O=u.join(f,O);if(P!=null)O=u.relative(P,O);this.setSourceContent(O,w)}},this)};G.prototype._validateMapping=function(q,$,f,K){if($&&typeof $.line!=="number"&&typeof $.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(q&&"line"in q&&"column"in q&&q.line>0&&q.column>=0&&!$&&!f&&!K)return;else if(q&&"line"in q&&"column"in q&&$&&"line"in $&&"column"in $&&q.line>0&&q.column>=0&&$.line>0&&$.column>=0&&f)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:q,source:f,original:$,name:K}))};G.prototype._serializeMappings=function(){var q=0,$=1,f=0,K=0,P=0,j=0,v="",O,w,h,Y,k=this._mappings.toArray();for(var z=0,W=k.length;z<W;z++){if(w=k[z],O="",w.generatedLine!==$){q=0;while(w.generatedLine!==$)O+=";",$++}else if(z>0){if(!u.compareByGeneratedPositionsInflated(w,k[z-1]))continue;O+=","}if(O+=nq.encode(w.generatedColumn-q),q=w.generatedColumn,w.source!=null){if(Y=this._sources.indexOf(w.source),O+=nq.encode(Y-j),j=Y,O+=nq.encode(w.originalLine-1-K),K=w.originalLine-1,O+=nq.encode(w.originalColumn-f),f=w.originalColumn,w.name!=null)h=this._names.indexOf(w.name),O+=nq.encode(h-P),P=h}v+=O}return v};G.prototype._generateSourcesContent=function(q,$){return q.map(function(f){if(!this._sourcesContents)return null;if($!=null)f=u.relative($,f);var K=u.toSetString(f);return Object.prototype.hasOwnProperty.call(this._sourcesContents,K)?this._sourcesContents[K]:null},this)};G.prototype.toJSON=function(){var q={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)q.file=this._file;if(this._sourceRoot!=null)q.sourceRoot=this._sourceRoot;if(this._sourcesContents)q.sourcesContent=this._generateSourcesContent(q.sources,q.sourceRoot);return q};G.prototype.toString=function(){return JSON.stringify(this.toJSON())};q4.SourceMapGenerator=G});var Q6=H(($4)=>{$4.GREATEST_LOWER_BOUND=1;$4.LEAST_UPPER_BOUND=2;function c_(_,q,$,f,K,P){var j=Math.floor((q-_)/2)+_,v=K($,f[j],!0);if(v===0)return j;else if(v>0){if(q-j>1)return c_(j,q,$,f,K,P);if(P==$4.LEAST_UPPER_BOUND)return q<f.length?q:-1;else return j}else{if(j-_>1)return c_(_,j,$,f,K,P);if(P==$4.LEAST_UPPER_BOUND)return j;else return _<0?-1:_}}$4.search=function(q,$,f,K){if($.length===0)return-1;var P=c_(-1,$.length,q,$,f,K||$4.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var q8=H((P4)=>{function R_(_,q,$){var f=_[q];_[q]=_[$],_[$]=f}function K4(_,q){return Math.round(_+Math.random()*(q-_))}function g_(_,q,$,f){if($<f){var K=K4($,f),P=$-1;R_(_,K,f);var j=_[f];for(var v=$;v<f;v++)if(q(_[v],j)<=0)P+=1,R_(_,P,v);R_(_,P+1,v);var O=P+1;g_(_,q,$,O-1),g_(_,q,O+1,f)}}P4.quickSort=function(_,q){g_(_,q,0,_.length-1)}});var $8=H((w4)=>{var r=vq(),I_=Q6(),wq=M_().ArraySet,v4=S_(),oq=q8().quickSort;function J(_,q){var $=_;if(typeof _==="string")$=r.parseSourceMapInput(_);return $.sections!=null?new a($,q):new A($,q)}J.fromSourceMap=function(_,q){return A.fromSourceMap(_,q)};J.prototype._version=3;J.prototype.__generatedMappings=null;Object.defineProperty(J.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});J.prototype.__originalMappings=null;Object.defineProperty(J.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});J.prototype._charIsMappingSeparator=function(q,$){var f=q.charAt($);return f===";"||f===","};J.prototype._parseMappings=function(q,$){throw Error("Subclasses must implement _parseMappings")};J.GENERATED_ORDER=1;J.ORIGINAL_ORDER=2;J.GREATEST_LOWER_BOUND=1;J.LEAST_UPPER_BOUND=2;J.prototype.eachMapping=function(q,$,f){var K=$||null,P=f||J.GENERATED_ORDER,j;switch(P){case J.GENERATED_ORDER:j=this._generatedMappings;break;case J.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(O){var w=O.source===null?null:this._sources.at(O.source);return w=r.computeSourceURL(v,w,this._sourceMapURL),{source:w,generatedLine:O.generatedLine,generatedColumn:O.generatedColumn,originalLine:O.originalLine,originalColumn:O.originalColumn,name:O.name===null?null:this._names.at(O.name)}},this).forEach(q,K)};J.prototype.allGeneratedPositionsFor=function(q){var $=r.getArg(q,"line"),f={source:r.getArg(q,"source"),originalLine:$,originalColumn:r.getArg(q,"column",0)};if(f.source=this._findSourceIndex(f.source),f.source<0)return[];var K=[],P=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,I_.LEAST_UPPER_BOUND);if(P>=0){var j=this._originalMappings[P];if(q.column===void 0){var v=j.originalLine;while(j&&j.originalLine===v)K.push({line:r.getArg(j,"generatedLine",null),column:r.getArg(j,"generatedColumn",null),lastColumn:r.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var O=j.originalColumn;while(j&&j.originalLine===$&&j.originalColumn==O)K.push({line:r.getArg(j,"generatedLine",null),column:r.getArg(j,"generatedColumn",null),lastColumn:r.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return K};w4.SourceMapConsumer=J;function A(_,q){var $=_;if(typeof _==="string")$=r.parseSourceMapInput(_);var f=r.getArg($,"version"),K=r.getArg($,"sources"),P=r.getArg($,"names",[]),j=r.getArg($,"sourceRoot",null),v=r.getArg($,"sourcesContent",null),O=r.getArg($,"mappings"),w=r.getArg($,"file",null);if(f!=this._version)throw Error("Unsupported version: "+f);if(j)j=r.normalize(j);K=K.map(String).map(r.normalize).map(function(h){return j&&r.isAbsolute(j)&&r.isAbsolute(h)?r.relative(j,h):h}),this._names=wq.fromArray(P.map(String),!0),this._sources=wq.fromArray(K,!0),this._absoluteSources=this._sources.toArray().map(function(h){return r.computeSourceURL(j,h,q)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=O,this._sourceMapURL=q,this.file=w}A.prototype=Object.create(J.prototype);A.prototype.consumer=J;A.prototype._findSourceIndex=function(_){var q=_;if(this.sourceRoot!=null)q=r.relative(this.sourceRoot,q);if(this._sources.has(q))return this._sources.indexOf(q);var $;for($=0;$<this._absoluteSources.length;++$)if(this._absoluteSources[$]==_)return $;return-1};A.fromSourceMap=function(q,$){var f=Object.create(A.prototype),K=f._names=wq.fromArray(q._names.toArray(),!0),P=f._sources=wq.fromArray(q._sources.toArray(),!0);f.sourceRoot=q._sourceRoot,f.sourcesContent=q._generateSourcesContent(f._sources.toArray(),f.sourceRoot),f.file=q._file,f._sourceMapURL=$,f._absoluteSources=f._sources.toArray().map(function(z){return r.computeSourceURL(f.sourceRoot,z,$)});var j=q._mappings.toArray().slice(),v=f.__generatedMappings=[],O=f.__originalMappings=[];for(var w=0,h=j.length;w<h;w++){var Y=j[w],k=new _8;if(k.generatedLine=Y.generatedLine,k.generatedColumn=Y.generatedColumn,Y.source){if(k.source=P.indexOf(Y.source),k.originalLine=Y.originalLine,k.originalColumn=Y.originalColumn,Y.name)k.name=K.indexOf(Y.name);O.push(k)}v.push(k)}return oq(f.__originalMappings,r.compareByOriginalPositions),f};A.prototype._version=3;Object.defineProperty(A.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function _8(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}A.prototype._parseMappings=function(q,$){var f=1,K=0,P=0,j=0,v=0,O=0,w=q.length,h=0,Y={},k={},z=[],W=[],m,b,o,D,pq;while(h<w)if(q.charAt(h)===";")f++,h++,K=0;else if(q.charAt(h)===",")h++;else{m=new _8,m.generatedLine=f;for(D=h;D<w;D++)if(this._charIsMappingSeparator(q,D))break;if(b=q.slice(h,D),o=Y[b],o)h+=b.length;else{o=[];while(h<D)v4.decode(q,h,k),pq=k.value,h=k.rest,o.push(pq);if(o.length===2)throw Error("Found a source, but no line and column");if(o.length===3)throw Error("Found a source and line, but no column");Y[b]=o}if(m.generatedColumn=K+o[0],K=m.generatedColumn,o.length>1){if(m.source=v+o[1],v+=o[1],m.originalLine=P+o[2],P=m.originalLine,m.originalLine+=1,m.originalColumn=j+o[3],j=m.originalColumn,o.length>4)m.name=O+o[4],O+=o[4]}if(W.push(m),typeof m.originalLine==="number")z.push(m)}oq(W,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=W,oq(z,r.compareByOriginalPositions),this.__originalMappings=z};A.prototype._findMapping=function(q,$,f,K,P,j){if(q[f]<=0)throw TypeError("Line must be greater than or equal to 1, got "+q[f]);if(q[K]<0)throw TypeError("Column must be greater than or equal to 0, got "+q[K]);return I_.search(q,$,P,j)};A.prototype.computeColumnSpans=function(){for(var q=0;q<this._generatedMappings.length;++q){var $=this._generatedMappings[q];if(q+1<this._generatedMappings.length){var f=this._generatedMappings[q+1];if($.generatedLine===f.generatedLine){$.lastGeneratedColumn=f.generatedColumn-1;continue}}$.lastGeneratedColumn=1/0}};A.prototype.originalPositionFor=function(q){var $={generatedLine:r.getArg(q,"line"),generatedColumn:r.getArg(q,"column")},f=this._findMapping($,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositionsDeflated,r.getArg(q,"bias",J.GREATEST_LOWER_BOUND));if(f>=0){var K=this._generatedMappings[f];if(K.generatedLine===$.generatedLine){var P=r.getArg(K,"source",null);if(P!==null)P=this._sources.at(P),P=r.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=r.getArg(K,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:r.getArg(K,"originalLine",null),column:r.getArg(K,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};A.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(q){return q==null})};A.prototype.sourceContentFor=function(q,$){if(!this.sourcesContent)return null;var f=this._findSourceIndex(q);if(f>=0)return this.sourcesContent[f];var K=q;if(this.sourceRoot!=null)K=r.relative(this.sourceRoot,K);var P;if(this.sourceRoot!=null&&(P=r.urlParse(this.sourceRoot))){var j=K.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+K))return this.sourcesContent[this._sources.indexOf("/"+K)]}if($)return null;else throw Error('"'+K+'" is not in the SourceMap.')};A.prototype.generatedPositionFor=function(q){var $=r.getArg(q,"source");if($=this._findSourceIndex($),$<0)return{line:null,column:null,lastColumn:null};var f={source:$,originalLine:r.getArg(q,"line"),originalColumn:r.getArg(q,"column")},K=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(q,"bias",J.GREATEST_LOWER_BOUND));if(K>=0){var P=this._originalMappings[K];if(P.source===f.source)return{line:r.getArg(P,"generatedLine",null),column:r.getArg(P,"generatedColumn",null),lastColumn:r.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};w4.BasicSourceMapConsumer=A;function a(_,q){var $=_;if(typeof _==="string")$=r.parseSourceMapInput(_);var f=r.getArg($,"version"),K=r.getArg($,"sections");if(f!=this._version)throw Error("Unsupported version: "+f);this._sources=new wq,this._names=new wq;var P={line:-1,column:0};this._sections=K.map(function(j){if(j.url)throw Error("Support for url field in sections not implemented.");var v=r.getArg(j,"offset"),O=r.getArg(v,"line"),w=r.getArg(v,"column");if(O<P.line||O===P.line&&w<P.column)throw Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:O+1,generatedColumn:w+1},consumer:new J(r.getArg(j,"map"),q)}})}a.prototype=Object.create(J.prototype);a.prototype.constructor=J;a.prototype._version=3;Object.defineProperty(a.prototype,"sources",{get:function(){var _=[];for(var q=0;q<this._sections.length;q++)for(var $=0;$<this._sections[q].consumer.sources.length;$++)_.push(this._sections[q].consumer.sources[$]);return _}});a.prototype.originalPositionFor=function(q){var $={generatedLine:r.getArg(q,"line"),generatedColumn:r.getArg(q,"column")},f=I_.search($,this._sections,function(P,j){var v=P.generatedLine-j.generatedOffset.generatedLine;if(v)return v;return P.generatedColumn-j.generatedOffset.generatedColumn}),K=this._sections[f];if(!K)return{source:null,line:null,column:null,name:null};return K.consumer.originalPositionFor({line:$.generatedLine-(K.generatedOffset.generatedLine-1),column:$.generatedColumn-(K.generatedOffset.generatedLine===$.generatedLine?K.generatedOffset.generatedColumn-1:0),bias:q.bias})};a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(q){return q.consumer.hasContentsOfAllSources()})};a.prototype.sourceContentFor=function(q,$){for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer.sourceContentFor(q,!0);if(P)return P}if($)return null;else throw Error('"'+q+'" is not in the SourceMap.')};a.prototype.generatedPositionFor=function(q){for(var $=0;$<this._sections.length;$++){var f=this._sections[$];if(f.consumer._findSourceIndex(r.getArg(q,"source"))===-1)continue;var K=f.consumer.generatedPositionFor(q);if(K){var P={line:K.line+(f.generatedOffset.generatedLine-1),column:K.column+(f.generatedOffset.generatedLine===K.line?f.generatedOffset.generatedColumn-1:0)};return P}}return{line:null,column:null}};a.prototype._parseMappings=function(q,$){this.__generatedMappings=[],this.__originalMappings=[];for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer._generatedMappings;for(var j=0;j<P.length;j++){var v=P[j],O=K.consumer._sources.at(v.source);O=r.computeSourceURL(K.consumer.sourceRoot,O,this._sourceMapURL),this._sources.add(O),O=this._sources.indexOf(O);var w=null;if(v.name)w=K.consumer._names.at(v.name),this._names.add(w),w=this._names.indexOf(w);var h={source:O,generatedLine:v.generatedLine+(K.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+(K.generatedOffset.generatedLine===v.generatedLine?K.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:w};if(this.__generatedMappings.push(h),typeof h.originalLine==="number")this.__originalMappings.push(h)}}oq(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),oq(this.__originalMappings,r.compareByOriginalPositions)};w4.IndexedSourceMapConsumer=a});var f8=H((z4)=>{var T4=N_().SourceMapGenerator,Rq=vq(),k4=/(\r?\n)/,r4=10,Oq="$$$isSourceNode$$$";function e(_,q,$,f,K){if(this.children=[],this.sourceContents={},this.line=_==null?null:_,this.column=q==null?null:q,this.source=$==null?null:$,this.name=K==null?null:K,this[Oq]=!0,f!=null)this.add(f)}e.fromStringWithSourceMap=function(q,$,f){var K=new e,P=q.split(k4),j=0,v=function(){var k=W(),z=W()||"";return k+z;function W(){return j<P.length?P[j++]:void 0}},O=1,w=0,h=null;if($.eachMapping(function(k){if(h!==null)if(O<k.generatedLine)Y(h,v()),O++,w=0;else{var z=P[j]||"",W=z.substr(0,k.generatedColumn-w);P[j]=z.substr(k.generatedColumn-w),w=k.generatedColumn,Y(h,W),h=k;return}while(O<k.generatedLine)K.add(v()),O++;if(w<k.generatedColumn){var z=P[j]||"";K.add(z.substr(0,k.generatedColumn)),P[j]=z.substr(k.generatedColumn),w=k.generatedColumn}h=k},this),j<P.length){if(h)Y(h,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(k){var z=$.sourceContentFor(k);if(z!=null){if(f!=null)k=Rq.join(f,k);K.setSourceContent(k,z)}}),K;function Y(k,z){if(k===null||k.source===void 0)K.add(z);else{var W=f?Rq.join(f,k.source):k.source;K.add(new e(k.originalLine,k.originalColumn,W,z,k.name))}}};e.prototype.add=function(q){if(Array.isArray(q))q.forEach(function($){this.add($)},this);else if(q[Oq]||typeof q==="string"){if(q)this.children.push(q)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+q);return this};e.prototype.prepend=function(q){if(Array.isArray(q))for(var $=q.length-1;$>=0;$--)this.prepend(q[$]);else if(q[Oq]||typeof q==="string")this.children.unshift(q);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+q);return this};e.prototype.walk=function(q){var $;for(var f=0,K=this.children.length;f<K;f++)if($=this.children[f],$[Oq])$.walk(q);else if($!=="")q($,{source:this.source,line:this.line,column:this.column,name:this.name})};e.prototype.join=function(q){var $,f,K=this.children.length;if(K>0){$=[];for(f=0;f<K-1;f++)$.push(this.children[f]),$.push(q);$.push(this.children[f]),this.children=$}return this};e.prototype.replaceRight=function(q,$){var f=this.children[this.children.length-1];if(f[Oq])f.replaceRight(q,$);else if(typeof f==="string")this.children[this.children.length-1]=f.replace(q,$);else this.children.push("".replace(q,$));return this};e.prototype.setSourceContent=function(q,$){this.sourceContents[Rq.toSetString(q)]=$};e.prototype.walkSourceContents=function(q){for(var $=0,f=this.children.length;$<f;$++)if(this.children[$][Oq])this.children[$].walkSourceContents(q);var K=Object.keys(this.sourceContents);for(var $=0,f=K.length;$<f;$++)q(Rq.fromSetString(K[$]),this.sourceContents[K[$]])};e.prototype.toString=function(){var q="";return this.walk(function($){q+=$}),q};e.prototype.toStringWithSourceMap=function(q){var $={code:"",line:1,column:0},f=new T4(q),K=!1,P=null,j=null,v=null,O=null;return this.walk(function(w,h){if($.code+=w,h.source!==null&&h.line!==null&&h.column!==null){if(P!==h.source||j!==h.line||v!==h.column||O!==h.name)f.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:$.line,column:$.column},name:h.name});P=h.source,j=h.line,v=h.column,O=h.name,K=!0}else if(K)f.addMapping({generated:{line:$.line,column:$.column}}),P=null,K=!1;for(var Y=0,k=w.length;Y<k;Y++)if(w.charCodeAt(Y)===r4){if($.line++,$.column=0,Y+1===k)P=null,K=!1;else if(K)f.addMapping({source:h.source,original:{line:h.line,column:h.column},generated:{line:$.line,column:$.column},name:h.name})}else $.column++}),this.walkSourceContents(function(w,h){f.setSourceContent(w,h)}),{code:$.code,map:f}};z4.SourceNode=e});var K8=H((W4)=>{W4.SourceMapGenerator=N_().SourceMapGenerator;W4.SourceMapConsumer=$8().SourceMapConsumer;W4.SourceNode=f8().SourceNode});var w8=H((j8,v8)=>{j8.__esModule=!0;var D_=p(),F=void 0;try{if(typeof define!=="function"||!define.amd)x_=K8(),F=x_.SourceNode}catch(_){}var x_;if(!F)F=function(_,q,$,f){if(this.src="",f)this.add(f)},F.prototype={add:function(q){if(D_.isArray(q))q=q.join("");this.src+=q},prepend:function(q){if(D_.isArray(q))q=q.join("");this.src=q+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function y_(_,q,$){if(D_.isArray(_)){var f=[];for(var K=0,P=_.length;K<P;K++)f.push(q.wrap(_[K],$));return f}else if(typeof _==="boolean"||typeof _==="number")return _+"";return _}function P8(_){this.srcFile=_,this.source=[]}P8.prototype={isEmpty:function(){return!this.source.length},prepend:function(q,$){this.source.unshift(this.wrap(q,$))},push:function(q,$){this.source.push(this.wrap(q,$))},merge:function(){var q=this.empty();return this.each(function($){q.add([" ",$,`
12
- `])}),q},each:function(q){for(var $=0,f=this.source.length;$<f;$++)q(this.source[$])},empty:function(){var q=this.currentLocation||{start:{}};return new F(q.start.line,q.start.column,this.srcFile)},wrap:function(q){var $=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(q instanceof F)return q;return q=y_(q,this,$),new F($.start.line,$.start.column,this.srcFile,q)},functionCall:function(q,$,f){return f=this.generateList(f),this.wrap([q,$?"."+$+"(":"(",f,")"])},quotedString:function(q){return'"'+(q+"").replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(q){var $=this,f=[];Object.keys(q).forEach(function(P){var j=y_(q[P],$);if(j!=="undefined")f.push([$.quotedString(P),":",j])});var K=this.generateList(f);return K.prepend("{"),K.add("}"),K},generateList:function(q){var $=this.empty();for(var f=0,K=q.length;f<K;f++){if(f)$.add(",");$.add(y_(q[f],this))}return $},generateArray:function(q){var $=this.generateList(q);return $.prepend("["),$.add("]"),$}};j8.default=P8;v8.exports=j8.default});var r8=H((T8,k8)=>{T8.__esModule=!0;function h8(_){return _&&_.__esModule?_:{default:_}}var O8=Sq(),o4=t(),L_=h8(o4),A4=p(),X4=w8(),Y8=h8(X4);function Yq(_){this.value=_}function hq(){}hq.prototype={nameLookup:function(q,$){return this.internalNameLookup(q,$)},depthedLookup:function(q){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(q),")"]},compilerInfo:function(){var q=O8.COMPILER_REVISION,$=O8.REVISION_CHANGES[q];return[q,$]},appendToBuffer:function(q,$,f){if(!A4.isArray(q))q=[q];if(q=this.source.wrap(q,$),this.environment.isSimple)return["return ",q,";"];else if(f)return["buffer += ",q,";"];else return q.appendToBuffer=!0,q},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(q,$){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",q,",",JSON.stringify($),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(q,$,f,K){this.environment=q,this.options=$,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!K,this.name=this.environment.name,this.isChild=!!f,this.context=f||{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(q,$),this.useDepths=this.useDepths||q.useDepths||q.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||q.useBlockParams;var P=q.opcodes,j=void 0,v=void 0,O=void 0,w=void 0;for(O=0,w=P.length;O<w;O++)j=P[O],this.source.currentLocation=j.loc,v=v||j.loc,this[j.opcode].apply(this,j.args);if(this.source.currentLocation=v,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new L_.default("Compile completed with content left on stack");if(!this.decorators.isEmpty())if(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
9
+ Expecting `+Eq.join(", ")+", got '"+(this.terminals_[o]||o)+"'";else Z_="Parse error on line "+(Y+1)+": Unexpected "+(o==1?"end of input":"'"+(this.terminals_[o]||o)+"'");this.parseError(Z_,{text:this.lexer.match,token:this.terminals_[o]||o,line:this.lexer.yylineno,loc:W,expected:Eq})}}if(a[0]instanceof Array&&a.length>1)throw Error("Parse Error: multiple actions possible at state: "+jq+", token: "+o);switch(a[0]){case 1:if(j.push(o),v.push(this.lexer.yytext),O.push(this.lexer.yylloc),j.push(a[1]),o=null,!W_){if(k=this.lexer.yyleng,T=this.lexer.yytext,Y=this.lexer.yylineno,W=this.lexer.yylloc,z>0)z--}else o=W_,W_=null;break;case 2:if(y=this.productions_[a[1]][1],zq.$=v[v.length-y],zq._$={first_line:O[O.length-(y||1)].first_line,last_line:O[O.length-1].last_line,first_column:O[O.length-(y||1)].first_column,last_column:O[O.length-1].last_column},m)zq._$.range=[O[O.length-(y||1)].range[0],O[O.length-1].range[1]];if(J_=this.performAction.call(zq,T,k,Y,this.yy,a[1],v,O),typeof J_<"u")return J_;if(y)j=j.slice(0,-1*y*2),v=v.slice(0,-1*y),O=O.slice(0,-1*y);j.push(this.productions_[a[1]][0]),v.push(zq.$),O.push(zq._$),M$=w[j[j.length-2]][j[j.length-1]],j.push(M$);break;case 3:return!0}}return!0}},_=function(){var f={EOF:1,parseError:function(P,j){if(this.yy.parser)this.yy.parser.parseError(P,j);else throw Error(P)},setInput:function(P){if(this._input=P,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];return this.offset=0,this},input:function(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var j=P.match(/(?:\r\n?|\n).*/g);if(j)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),P},unput:function(P){var j=P.length,v=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-j-1),this.offset-=j;var O=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1)this.yylineno-=v.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===O.length?this.yylloc.first_column:0)+O[O.length-v.length].length-v[0].length:this.yylloc.first_column-j},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-j];return this},more:function(){return this._more=!0,this},less:function(P){this.unput(this.match.slice(P))},pastInput:function(){var P=this.matched.substr(0,this.matched.length-this.match.length);return(P.length>20?"...":"")+P.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var P=this.match;if(P.length<20)P+=this._input.substr(0,20-P.length);return(P.substr(0,20)+(P.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var P=this.pastInput(),j=Array(P.length+1).join("-");return P+this.upcomingInput()+`
10
+ `+j+"^"},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var P,j,v,O,w,T;if(!this._more)this.yytext="",this.match="";var Y=this._currentRules();for(var k=0;k<Y.length;k++)if(v=this._input.match(this.rules[Y[k]]),v&&(!j||v[0].length>j[0].length)){if(j=v,O=k,!this.options.flex)break}if(j){if(T=j[0].match(/(?:\r\n?|\n).*/g),T)this.yylineno+=T.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._input=this._input.slice(j[0].length),this.matched+=j[0],P=this.performAction.call(this,this.yy,this,Y[O],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(P)return P;else return}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
11
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var P=this.next();if(typeof P<"u")return P;else return this.lex()},begin:function(P){this.conditionStack.push(P)},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(P){this.begin(P)}};return f.options={},f.performAction=function(P,j,v,O){function w(Y,k){return j.yytext=j.yytext.substring(Y,j.yyleng-k+Y)}var T=O;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")w(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")w(0,1),this.begin("emu");else this.begin("mu");if(j.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:if(this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw")return 15;else return w(5,9),"END_RAW_BLOCK";break;case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(j.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return j.yytext=w(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=w(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;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 j.yytext=j.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},f.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],f.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}},f}();q.lexer=_;function $(){this.yy={}}return $.prototype=q,q.Parser=$,new $}();Q6.default=K4;q8.exports=Q6.default});var __=J((K8,P8)=>{K8.__esModule=!0;function v4(q){return q&&q.__esModule?q:{default:q}}var w4=S(),s_=v4(w4);function Qq(){this.parents=[]}Qq.prototype={constructor:Qq,mutating:!1,acceptKey:function(_,$){var f=this.accept(_[$]);if(this.mutating){if(f&&!Qq.prototype[f.type])throw new s_.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+_.type);_[$]=f}},acceptRequired:function(_,$){if(this.acceptKey(_,$),!_[$])throw new s_.default(_.type+" requires "+$)},acceptArray:function(_){for(var $=0,f=_.length;$<f;$++)if(this.acceptKey(_,$),!_[$])_.splice($,1),$--,f--},accept:function(_){if(!_)return;if(!this[_.type])throw new s_.default("Unknown type: "+_.type,_);if(this.current)this.parents.unshift(this.current);this.current=_;var $=this[_.type](_);if(this.current=this.parents.shift(),!this.mutating||$)return $;else if($!==!1)return _},Program:function(_){this.acceptArray(_.body)},MustacheStatement:q_,Decorator:q_,BlockStatement:$8,DecoratorBlock:$8,PartialStatement:f8,PartialBlockStatement:function(_){f8.call(this,_),this.acceptKey(_,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:q_,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(_){this.acceptArray(_.pairs)},HashPair:function(_){this.acceptRequired(_,"value")}};function q_(q){this.acceptRequired(q,"path"),this.acceptArray(q.params),this.acceptKey(q,"hash")}function $8(q){q_.call(this,q),this.acceptKey(q,"program"),this.acceptKey(q,"inverse")}function f8(q){this.acceptRequired(q,"name"),this.acceptArray(q.params),this.acceptKey(q,"hash")}K8.default=Qq;P8.exports=K8.default});var w8=J((j8,v8)=>{j8.__esModule=!0;function h4(q){return q&&q.__esModule?q:{default:q}}var T4=__(),k4=h4(T4);function c(){var q=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=q}c.prototype=new k4.default;c.prototype.Program=function(q){var _=!this.options.ignoreStandalone,$=!this.isRootSeen;this.isRootSeen=!0;var f=q.body;for(var K=0,P=f.length;K<P;K++){var j=f[K],v=this.accept(j);if(!v)continue;var O=B_(f,K,$),w=U_(f,K,$),T=v.openStandalone&&O,Y=v.closeStandalone&&w,k=v.inlineStandalone&&O&&w;if(v.close)Yq(f,K,!0);if(v.open)$q(f,K,!0);if(_&&k){if(Yq(f,K),$q(f,K)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(f[K-1].original)[1]}}if(_&&T)Yq((j.program||j.inverse).body),$q(f,K);if(_&&Y)Yq(f,K),$q((j.inverse||j.program).body)}return q};c.prototype.BlockStatement=c.prototype.DecoratorBlock=c.prototype.PartialBlockStatement=function(q){this.accept(q.program),this.accept(q.inverse);var _=q.program||q.inverse,$=q.program&&q.inverse,f=$,K=$;if($&&$.chained){f=$.body[0].program;while(K.chained)K=K.body[K.body.length-1].program}var P={open:q.openStrip.open,close:q.closeStrip.close,openStandalone:U_(_.body),closeStandalone:B_((f||_).body)};if(q.openStrip.close)Yq(_.body,null,!0);if($){var j=q.inverseStrip;if(j.open)$q(_.body,null,!0);if(j.close)Yq(f.body,null,!0);if(q.closeStrip.open)$q(K.body,null,!0);if(!this.options.ignoreStandalone&&B_(_.body)&&U_(f.body))$q(_.body),Yq(f.body)}else if(q.closeStrip.open)$q(_.body,null,!0);return P};c.prototype.Decorator=c.prototype.MustacheStatement=function(q){return q.strip};c.prototype.PartialStatement=c.prototype.CommentStatement=function(q){var _=q.strip||{};return{inlineStandalone:!0,open:_.open,close:_.close}};function B_(q,_,$){if(_===void 0)_=q.length;var f=q[_-1],K=q[_-2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(f.original)}function U_(q,_,$){if(_===void 0)_=-1;var f=q[_+1],K=q[_+2];if(!f)return $;if(f.type==="ContentStatement")return(K||!$?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(f.original)}function Yq(q,_,$){var f=q[_==null?0:_+1];if(!f||f.type!=="ContentStatement"||!$&&f.rightStripped)return;var K=f.value;f.value=f.value.replace($?/^\s+/:/^[ \t]*\r?\n?/,""),f.rightStripped=f.value!==K}function $q(q,_,$){var f=q[_==null?q.length-1:_-1];if(!f||f.type!=="ContentStatement"||!$&&f.leftStripped)return;var K=f.value;return f.value=f.value.replace($?/\s+$/:/[ \t]+$/,""),f.leftStripped=f.value!==K,f.leftStripped}j8.default=c;v8.exports=j8.default});var O8=J((G4)=>{G4.__esModule=!0;G4.SourceLocation=Z4;G4.id=r4;G4.stripFlags=m4;G4.stripComment=u4;G4.preparePath=A4;G4.prepareMustache=X4;G4.prepareRawBlock=p4;G4.prepareBlock=n4;G4.prepareProgram=o4;G4.preparePartialBlock=d4;function W4(q){return q&&q.__esModule?q:{default:q}}var J4=S(),F_=W4(J4);function Q_(q,_){if(_=_.path?_.path.original:_,q.path.original!==_){var $={loc:q.path.loc};throw new F_.default(q.path.original+" doesn't match "+_,$)}}function Z4(q,_){this.source=q,this.start={line:_.first_line,column:_.first_column},this.end={line:_.last_line,column:_.last_column}}function r4(q){if(/^\[.*\]$/.test(q))return q.substring(1,q.length-1);else return q}function m4(q,_){return{open:q.charAt(2)==="~",close:_.charAt(_.length-3)==="~"}}function u4(q){return q.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function A4(q,_,$){$=this.locInfo($);var f=q?"@":"",K=[],P=0;for(var j=0,v=_.length;j<v;j++){var O=_[j].part,w=_[j].original!==O;if(f+=(_[j].separator||"")+O,!w&&(O===".."||O==="."||O==="this")){if(K.length>0)throw new F_.default("Invalid path: "+f,{loc:$});else if(O==="..")P++}else K.push(O)}return{type:"PathExpression",data:q,depth:P,parts:K,original:f,loc:$}}function X4(q,_,$,f,K,P){var j=f.charAt(3)||f.charAt(2),v=j!=="{"&&j!=="&",O=/\*/.test(f);return{type:O?"Decorator":"MustacheStatement",path:q,params:_,hash:$,escaped:v,strip:K,loc:this.locInfo(P)}}function p4(q,_,$,f){Q_(q,$),f=this.locInfo(f);var K={type:"Program",body:_,strip:{},loc:f};return{type:"BlockStatement",path:q.path,params:q.params,hash:q.hash,program:K,openStrip:{},inverseStrip:{},closeStrip:{},loc:f}}function n4(q,_,$,f,K,P){if(f&&f.path)Q_(q,f);var j=/\*/.test(q.open);_.blockParams=q.blockParams;var v=void 0,O=void 0;if($){if(j)throw new F_.default("Unexpected inverse block on decorator",$);if($.chain)$.program.body[0].closeStrip=f.strip;O=$.strip,v=$.program}if(K)K=v,v=_,_=K;return{type:j?"DecoratorBlock":"BlockStatement",path:q.path,params:q.params,hash:q.hash,program:_,inverse:v,openStrip:q.strip,inverseStrip:O,closeStrip:f&&f.strip,loc:this.locInfo(P)}}function o4(q,_){if(!_&&q.length){var $=q[0].loc,f=q[q.length-1].loc;if($&&f)_={source:$.source,start:{line:$.start.line,column:$.start.column},end:{line:f.end.line,column:f.end.column}}}return{type:"Program",body:q,strip:{},loc:_}}function d4(q,_,$,f){return Q_(q,$),{type:"PartialBlockStatement",name:q.path,params:q.params,hash:q.hash,program:_,openStrip:q.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var T8=J((L4)=>{L4.__esModule=!0;L4.parseWithoutProcessing=h8;L4.parse=x4;function c4(q){if(q&&q.__esModule)return q;else{var _={};if(q!=null){for(var $ in q)if(Object.prototype.hasOwnProperty.call(q,$))_[$]=q[$]}return _.default=q,_}}function Y8(q){return q&&q.__esModule?q:{default:q}}var R4=_8(),q$=Y8(R4),E4=w8(),g4=Y8(E4),I4=O8(),y4=c4(I4),D4=b();L4.parser=q$.default;var $_={};D4.extend($_,y4);function h8(q,_){if(q.type==="Program")return q;q$.default.yy=$_,$_.locInfo=function(f){return new $_.SourceLocation(_&&_.srcName,f)};var $=q$.default.parse(q);return $}function x4(q,_){var $=h8(q,_),f=new g4.default(_);return f.accept($)}});var W8=J((Kj)=>{Kj.__esModule=!0;Kj.Compiler=_$;Kj.precompile=$j;Kj.compile=fj;function z8(q){return q&&q.__esModule?q:{default:q}}var Q4=S(),iq=z8(Q4),Cq=b(),qj=L_(),eq=z8(qj),_j=[].slice;function _$(){}_$.prototype={compiler:_$,equals:function(_){var $=this.opcodes.length;if(_.opcodes.length!==$)return!1;for(var f=0;f<$;f++){var K=this.opcodes[f],P=_.opcodes[f];if(K.opcode!==P.opcode||!H8(K.args,P.args))return!1}$=this.children.length;for(var f=0;f<$;f++)if(!this.children[f].equals(_.children[f]))return!1;return!0},guid:0,compile:function(_,$){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=$,this.stringParams=$.stringParams,this.trackIds=$.trackIds,$.blockParams=$.blockParams||[],$.knownHelpers=Cq.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},$.knownHelpers),this.accept(_)},compileProgram:function(_){var $=new this.compiler,f=$.compile(_,this.options),K=this.guid++;return this.usePartial=this.usePartial||f.usePartial,this.children[K]=f,this.useDepths=this.useDepths||f.useDepths,K},accept:function(_){if(!this[_.type])throw new iq.default("Unknown type: "+_.type,_);this.sourceNode.unshift(_);var $=this[_.type](_);return this.sourceNode.shift(),$},Program:function(_){this.options.blockParams.unshift(_.blockParams);var $=_.body,f=$.length;for(var K=0;K<f;K++)this.accept($[K]);return this.options.blockParams.shift(),this.isSimple=f===1,this.blockParams=_.blockParams?_.blockParams.length:0,this},BlockStatement:function(_){k8(_);var{program:$,inverse:f}=_;$=$&&this.compileProgram($),f=f&&this.compileProgram(f);var K=this.classifySexpr(_);if(K==="helper")this.helperSexpr(_,$,f);else if(K==="simple")this.simpleSexpr(_),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("blockValue",_.path.original);else this.ambiguousSexpr(_,$,f),this.opcode("pushProgram",$),this.opcode("pushProgram",f),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue");this.opcode("append")},DecoratorBlock:function(_){var $=_.program&&this.compileProgram(_.program),f=this.setupFullMustacheParams(_,$,void 0),K=_.path;this.useDecorators=!0,this.opcode("registerDecorator",f.length,K.original)},PartialStatement:function(_){this.usePartial=!0;var $=_.program;if($)$=this.compileProgram(_.program);var f=_.params;if(f.length>1)throw new iq.default("Unsupported number of partial arguments: "+f.length,_);else if(!f.length)if(this.options.explicitPartialContext)this.opcode("pushLiteral","undefined");else f.push({type:"PathExpression",parts:[],depth:0});var K=_.name.original,P=_.name.type==="SubExpression";if(P)this.accept(_.name);this.setupFullMustacheParams(_,$,void 0,!0);var j=_.indent||"";if(this.options.preventIndent&&j)this.opcode("appendContent",j),j="";this.opcode("invokePartial",P,K,j),this.opcode("append")},PartialBlockStatement:function(_){this.PartialStatement(_)},MustacheStatement:function(_){if(this.SubExpression(_),_.escaped&&!this.options.noEscape)this.opcode("appendEscaped");else this.opcode("append")},Decorator:function(_){this.DecoratorBlock(_)},ContentStatement:function(_){if(_.value)this.opcode("appendContent",_.value)},CommentStatement:function(){},SubExpression:function(_){k8(_);var $=this.classifySexpr(_);if($==="simple")this.simpleSexpr(_);else if($==="helper")this.helperSexpr(_);else this.ambiguousSexpr(_)},ambiguousSexpr:function(_,$,f){var K=_.path,P=K.parts[0],j=$!=null||f!=null;this.opcode("getContext",K.depth),this.opcode("pushProgram",$),this.opcode("pushProgram",f),K.strict=!0,this.accept(K),this.opcode("invokeAmbiguous",P,j)},simpleSexpr:function(_){var $=_.path;$.strict=!0,this.accept($),this.opcode("resolvePossibleLambda")},helperSexpr:function(_,$,f){var K=this.setupFullMustacheParams(_,$,f),P=_.path,j=P.parts[0];if(this.options.knownHelpers[j])this.opcode("invokeKnownHelper",K.length,j);else if(this.options.knownHelpersOnly)throw new iq.default("You specified knownHelpersOnly, but used the unknown helper "+j,_);else P.strict=!0,P.falsy=!0,this.accept(P),this.opcode("invokeHelper",K.length,P.original,eq.default.helpers.simpleId(P))},PathExpression:function(_){this.addDepth(_.depth),this.opcode("getContext",_.depth);var $=_.parts[0],f=eq.default.helpers.scopedId(_),K=!_.depth&&!f&&this.blockParamIndex($);if(K)this.opcode("lookupBlockParam",K,_.parts);else if(!$)this.opcode("pushContext");else if(_.data)this.options.data=!0,this.opcode("lookupData",_.depth,_.parts,_.strict);else this.opcode("lookupOnContext",_.parts,_.falsy,_.strict,f)},StringLiteral:function(_){this.opcode("pushString",_.value)},NumberLiteral:function(_){this.opcode("pushLiteral",_.value)},BooleanLiteral:function(_){this.opcode("pushLiteral",_.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(_){var $=_.pairs,f=0,K=$.length;this.opcode("pushHash");for(;f<K;f++)this.pushParam($[f].value);while(f--)this.opcode("assignToHash",$[f].key);this.opcode("popHash")},opcode:function(_){this.opcodes.push({opcode:_,args:_j.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(_){if(!_)return;this.useDepths=!0},classifySexpr:function(_){var $=eq.default.helpers.simpleId(_.path),f=$&&!!this.blockParamIndex(_.path.parts[0]),K=!f&&eq.default.helpers.helperExpression(_),P=!f&&(K||$);if(P&&!K){var j=_.path.parts[0],v=this.options;if(v.knownHelpers[j])K=!0;else if(v.knownHelpersOnly)P=!1}if(K)return"helper";else if(P)return"ambiguous";else return"simple"},pushParams:function(_){for(var $=0,f=_.length;$<f;$++)this.pushParam(_[$])},pushParam:function(_){var $=_.value!=null?_.value:_.original||"";if(this.stringParams){if($.replace)$=$.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".");if(_.depth)this.addDepth(_.depth);if(this.opcode("getContext",_.depth||0),this.opcode("pushStringParam",$,_.type),_.type==="SubExpression")this.accept(_)}else{if(this.trackIds){var f=void 0;if(_.parts&&!eq.default.helpers.scopedId(_)&&!_.depth)f=this.blockParamIndex(_.parts[0]);if(f){var K=_.parts.slice(1).join(".");this.opcode("pushId","BlockParam",f,K)}else{if($=_.original||$,$.replace)$=$.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"");this.opcode("pushId",_.type,$)}}this.accept(_)}},setupFullMustacheParams:function(_,$,f,K){var P=_.params;if(this.pushParams(P),this.opcode("pushProgram",$),this.opcode("pushProgram",f),_.hash)this.accept(_.hash);else this.opcode("emptyHash",K);return P},blockParamIndex:function(_){for(var $=0,f=this.options.blockParams.length;$<f;$++){var K=this.options.blockParams[$],P=K&&Cq.indexOf(K,_);if(K&&P>=0)return[$,P]}}};function $j(q,_,$){if(q==null||typeof q!=="string"&&q.type!=="Program")throw new iq.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+q);if(_=_||{},!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=$.parse(q,_),K=new $.Compiler().compile(f,_);return new $.JavaScriptCompiler().compile(K,_)}function fj(q,_,$){if(_===void 0)_={};if(q==null||typeof q!=="string"&&q.type!=="Program")throw new iq.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+q);if(_=Cq.extend({},_),!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=void 0;function K(){var j=$.parse(q,_),v=new $.Compiler().compile(j,_),O=new $.JavaScriptCompiler().compile(v,_,void 0,!0);return $.template(O)}function P(j,v){if(!f)f=K();return f.call(this,j,v)}return P._setup=function(j){if(!f)f=K();return f._setup(j)},P._child=function(j,v,O,w){if(!f)f=K();return f._child(j,v,O,w)},P}function H8(q,_){if(q===_)return!0;if(Cq.isArray(q)&&Cq.isArray(_)&&q.length===_.length){for(var $=0;$<q.length;$++)if(!H8(q[$],_[$]))return!1;return!0}}function k8(q){if(!q.path.parts){var _=q.path;q.path={type:"PathExpression",data:!1,depth:0,parts:[_.original+""],original:_.original+"",loc:_.loc}}}});var Z8=J((Oj)=>{var J8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Oj.encode=function(q){if(0<=q&&q<J8.length)return J8[q];throw TypeError("Must be between 0 and 63: "+q)};Oj.decode=function(q){var _=65,$=90,f=97,K=122,P=48,j=57,v=43,O=47,w=26,T=52;if(_<=q&&q<=$)return q-_;if(f<=q&&q<=K)return q-f+w;if(P<=q&&q<=j)return q-P+T;if(q==v)return 62;if(q==O)return 63;return-1}});var f$=J((zj)=>{var r8=Z8(),$$=5,m8=1<<$$,u8=m8-1,A8=m8;function Tj(q){return q<0?(-q<<1)+1:(q<<1)+0}function kj(q){var _=(q&1)===1,$=q>>1;return _?-$:$}zj.encode=function(_){var $="",f,K=Tj(_);do{if(f=K&u8,K>>>=$$,K>0)f|=A8;$+=r8.encode(f)}while(K>0);return $};zj.decode=function(_,$,f){var K=_.length,P=0,j=0,v,O;do{if($>=K)throw Error("Expected more digits in base 64 VLQ value.");if(O=r8.decode(_.charCodeAt($++)),O===-1)throw Error("Invalid base64 digit: "+_.charAt($-1));v=!!(O&A8),O&=u8,P=P+(O<<j),j+=$$}while(v);f.value=kj(P),f.rest=$}});var rq=J((dj)=>{function Jj(q,_,$){if(_ in q)return q[_];else if(arguments.length===3)return $;else throw Error('"'+_+'" is a required argument.')}dj.getArg=Jj;var X8=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Zj=/^data:.+\,.+$/;function aq(q){var _=q.match(X8);if(!_)return null;return{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}}dj.urlParse=aq;function Jq(q){var _="";if(q.scheme)_+=q.scheme+":";if(_+="//",q.auth)_+=q.auth+"@";if(q.host)_+=q.host;if(q.port)_+=":"+q.port;if(q.path)_+=q.path;return _}dj.urlGenerate=Jq;function K$(q){var _=q,$=aq(q);if($){if(!$.path)return q;_=$.path}var f=dj.isAbsolute(_),K=_.split(/\/+/);for(var P,j=0,v=K.length-1;v>=0;v--)if(P=K[v],P===".")K.splice(v,1);else if(P==="..")j++;else if(j>0)if(P==="")K.splice(v+1,j),j=0;else K.splice(v,2),j--;if(_=K.join("/"),_==="")_=f?"/":".";if($)return $.path=_,Jq($);return _}dj.normalize=K$;function p8(q,_){if(q==="")q=".";if(_==="")_=".";var $=aq(_),f=aq(q);if(f)q=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return Jq($)}if($||_.match(Zj))return _;if(f&&!f.host&&!f.path)return f.host=_,Jq(f);var K=_.charAt(0)==="/"?_:K$(q.replace(/\/+$/,"")+"/"+_);if(f)return f.path=K,Jq(f);return K}dj.join=p8;dj.isAbsolute=function(q){return q.charAt(0)==="/"||X8.test(q)};function rj(q,_){if(q==="")q=".";q=q.replace(/\/$/,"");var $=0;while(_.indexOf(q+"/")!==0){var f=q.lastIndexOf("/");if(f<0)return _;if(q=q.slice(0,f),q.match(/^([^\/]+:\/)?\/*$/))return _;++$}return Array($+1).join("../")+_.substr(q.length+1)}dj.relative=rj;var n8=function(){var q=Object.create(null);return!("__proto__"in q)}();function o8(q){return q}function mj(q){if(d8(q))return"$"+q;return q}dj.toSetString=n8?o8:mj;function uj(q){if(d8(q))return q.slice(1);return q}dj.fromSetString=n8?o8:uj;function d8(q){if(!q)return!1;var _=q.length;if(_<9)return!1;if(q.charCodeAt(_-1)!==95||q.charCodeAt(_-2)!==95||q.charCodeAt(_-3)!==111||q.charCodeAt(_-4)!==116||q.charCodeAt(_-5)!==111||q.charCodeAt(_-6)!==114||q.charCodeAt(_-7)!==112||q.charCodeAt(_-8)!==95||q.charCodeAt(_-9)!==95)return!1;for(var $=_-10;$>=0;$--)if(q.charCodeAt($)!==36)return!1;return!0}function Aj(q,_,$){var f=Zq(q.source,_.source);if(f!==0)return f;if(f=q.originalLine-_.originalLine,f!==0)return f;if(f=q.originalColumn-_.originalColumn,f!==0||$)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0)return f;if(f=q.generatedLine-_.generatedLine,f!==0)return f;return Zq(q.name,_.name)}dj.compareByOriginalPositions=Aj;function Xj(q,_,$){var f=q.generatedLine-_.generatedLine;if(f!==0)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0||$)return f;if(f=Zq(q.source,_.source),f!==0)return f;if(f=q.originalLine-_.originalLine,f!==0)return f;if(f=q.originalColumn-_.originalColumn,f!==0)return f;return Zq(q.name,_.name)}dj.compareByGeneratedPositionsDeflated=Xj;function Zq(q,_){if(q===_)return 0;if(q===null)return 1;if(_===null)return-1;if(q>_)return 1;return-1}function pj(q,_){var $=q.generatedLine-_.generatedLine;if($!==0)return $;if($=q.generatedColumn-_.generatedColumn,$!==0)return $;if($=Zq(q.source,_.source),$!==0)return $;if($=q.originalLine-_.originalLine,$!==0)return $;if($=q.originalColumn-_.originalColumn,$!==0)return $;return Zq(q.name,_.name)}dj.compareByGeneratedPositionsInflated=pj;function nj(q){return JSON.parse(q.replace(/^\)]}'[^\n]*\n/,""))}dj.parseSourceMapInput=nj;function oj(q,_,$){if(_=_||"",q){if(q[q.length-1]!=="/"&&_[0]!=="/")q+="/";_=q+_}if($){var f=aq($);if(!f)throw Error("sourceMapURL could not be parsed");if(f.path){var K=f.path.lastIndexOf("/");if(K>=0)f.path=f.path.substring(0,K+1)}_=p8(Jq(f),_)}return K$(_)}dj.computeSourceURL=oj});var v$=J((Ej)=>{var P$=rq(),j$=Object.prototype.hasOwnProperty,hq=typeof Map<"u";function B(){this._array=[],this._set=hq?new Map:Object.create(null)}B.fromArray=function(_,$){var f=new B;for(var K=0,P=_.length;K<P;K++)f.add(_[K],$);return f};B.prototype.size=function(){return hq?this._set.size:Object.getOwnPropertyNames(this._set).length};B.prototype.add=function(_,$){var f=hq?_:P$.toSetString(_),K=hq?this.has(_):j$.call(this._set,f),P=this._array.length;if(!K||$)this._array.push(_);if(!K)if(hq)this._set.set(_,P);else this._set[f]=P};B.prototype.has=function(_){if(hq)return this._set.has(_);else{var $=P$.toSetString(_);return j$.call(this._set,$)}};B.prototype.indexOf=function(_){if(hq){var $=this._set.get(_);if($>=0)return $}else{var f=P$.toSetString(_);if(j$.call(this._set,f))return this._set[f]}throw Error('"'+_+'" is not in the set.')};B.prototype.at=function(_){if(_>=0&&_<this._array.length)return this._array[_];throw Error("No element indexed by "+_)};B.prototype.toArray=function(){return this._array.slice()};Ej.ArraySet=B});var b8=J((yj)=>{var G8=rq();function Ij(q,_){var $=q.generatedLine,f=_.generatedLine,K=q.generatedColumn,P=_.generatedColumn;return f>$||f==$&&P>=K||G8.compareByGeneratedPositionsInflated(q,_)<=0}function f_(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}f_.prototype.unsortedForEach=function(_,$){this._array.forEach(_,$)};f_.prototype.add=function(_){if(Ij(this._last,_))this._last=_,this._array.push(_);else this._sorted=!1,this._array.push(_)};f_.prototype.toArray=function(){if(!this._sorted)this._array.sort(G8.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};yj.MappingList=f_});var w$=J((Lj)=>{var Sq=f$(),n=rq(),K_=v$().ArraySet,xj=b8().MappingList;function M(q){if(!q)q={};this._file=n.getArg(q,"file",null),this._sourceRoot=n.getArg(q,"sourceRoot",null),this._skipValidation=n.getArg(q,"skipValidation",!1),this._sources=new K_,this._names=new K_,this._mappings=new xj,this._sourcesContents=null}M.prototype._version=3;M.fromSourceMap=function(_){var $=_.sourceRoot,f=new M({file:_.file,sourceRoot:$});return _.eachMapping(function(K){var P={generated:{line:K.generatedLine,column:K.generatedColumn}};if(K.source!=null){if(P.source=K.source,$!=null)P.source=n.relative($,P.source);if(P.original={line:K.originalLine,column:K.originalColumn},K.name!=null)P.name=K.name}f.addMapping(P)}),_.sources.forEach(function(K){var P=K;if($!==null)P=n.relative($,K);if(!f._sources.has(P))f._sources.add(P);var j=_.sourceContentFor(K);if(j!=null)f.setSourceContent(K,j)}),f};M.prototype.addMapping=function(_){var $=n.getArg(_,"generated"),f=n.getArg(_,"original",null),K=n.getArg(_,"source",null),P=n.getArg(_,"name",null);if(!this._skipValidation)this._validateMapping($,f,K,P);if(K!=null){if(K=String(K),!this._sources.has(K))this._sources.add(K)}if(P!=null){if(P=String(P),!this._names.has(P))this._names.add(P)}this._mappings.add({generatedLine:$.line,generatedColumn:$.column,originalLine:f!=null&&f.line,originalColumn:f!=null&&f.column,source:K,name:P})};M.prototype.setSourceContent=function(_,$){var f=_;if(this._sourceRoot!=null)f=n.relative(this._sourceRoot,f);if($!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[n.toSetString(f)]=$}else if(this._sourcesContents){if(delete this._sourcesContents[n.toSetString(f)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};M.prototype.applySourceMap=function(_,$,f){var K=$;if($==null){if(_.file==null)throw Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);K=_.file}var P=this._sourceRoot;if(P!=null)K=n.relative(P,K);var j=new K_,v=new K_;this._mappings.unsortedForEach(function(O){if(O.source===K&&O.originalLine!=null){var w=_.originalPositionFor({line:O.originalLine,column:O.originalColumn});if(w.source!=null){if(O.source=w.source,f!=null)O.source=n.join(f,O.source);if(P!=null)O.source=n.relative(P,O.source);if(O.originalLine=w.line,O.originalColumn=w.column,w.name!=null)O.name=w.name}}var T=O.source;if(T!=null&&!j.has(T))j.add(T);var Y=O.name;if(Y!=null&&!v.has(Y))v.add(Y)},this),this._sources=j,this._names=v,_.sources.forEach(function(O){var w=_.sourceContentFor(O);if(w!=null){if(f!=null)O=n.join(f,O);if(P!=null)O=n.relative(P,O);this.setSourceContent(O,w)}},this)};M.prototype._validateMapping=function(_,$,f,K){if($&&typeof $.line!=="number"&&typeof $.column!=="number")throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(_&&"line"in _&&"column"in _&&_.line>0&&_.column>=0&&!$&&!f&&!K)return;else if(_&&"line"in _&&"column"in _&&$&&"line"in $&&"column"in $&&_.line>0&&_.column>=0&&$.line>0&&$.column>=0&&f)return;else throw Error("Invalid mapping: "+JSON.stringify({generated:_,source:f,original:$,name:K}))};M.prototype._serializeMappings=function(){var _=0,$=1,f=0,K=0,P=0,j=0,v="",O,w,T,Y,k=this._mappings.toArray();for(var z=0,Z=k.length;z<Z;z++){if(w=k[z],O="",w.generatedLine!==$){_=0;while(w.generatedLine!==$)O+=";",$++}else if(z>0){if(!n.compareByGeneratedPositionsInflated(w,k[z-1]))continue;O+=","}if(O+=Sq.encode(w.generatedColumn-_),_=w.generatedColumn,w.source!=null){if(Y=this._sources.indexOf(w.source),O+=Sq.encode(Y-j),j=Y,O+=Sq.encode(w.originalLine-1-K),K=w.originalLine-1,O+=Sq.encode(w.originalColumn-f),f=w.originalColumn,w.name!=null)T=this._names.indexOf(w.name),O+=Sq.encode(T-P),P=T}v+=O}return v};M.prototype._generateSourcesContent=function(_,$){return _.map(function(f){if(!this._sourcesContents)return null;if($!=null)f=n.relative($,f);var K=n.toSetString(f);return Object.prototype.hasOwnProperty.call(this._sourcesContents,K)?this._sourcesContents[K]:null},this)};M.prototype.toJSON=function(){var _={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null)_.file=this._file;if(this._sourceRoot!=null)_.sourceRoot=this._sourceRoot;if(this._sourcesContents)_.sourcesContent=this._generateSourcesContent(_.sources,_.sourceRoot);return _};M.prototype.toString=function(){return JSON.stringify(this.toJSON())};Lj.SourceMapGenerator=M});var e8=J((Bj)=>{Bj.GREATEST_LOWER_BOUND=1;Bj.LEAST_UPPER_BOUND=2;function O$(q,_,$,f,K,P){var j=Math.floor((_-q)/2)+q,v=K($,f[j],!0);if(v===0)return j;else if(v>0){if(_-j>1)return O$(j,_,$,f,K,P);if(P==Bj.LEAST_UPPER_BOUND)return _<f.length?_:-1;else return j}else{if(j-q>1)return O$(q,j,$,f,K,P);if(P==Bj.LEAST_UPPER_BOUND)return j;else return q<0?-1:q}}Bj.search=function(_,$,f,K){if($.length===0)return-1;var P=O$(-1,$.length,_,$,f,K||Bj.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var i8=J((Qj)=>{function h$(q,_,$){var f=q[_];q[_]=q[$],q[$]=f}function Fj(q,_){return Math.round(q+Math.random()*(_-q))}function T$(q,_,$,f){if($<f){var K=Fj($,f),P=$-1;h$(q,K,f);var j=q[f];for(var v=$;v<f;v++)if(_(q[v],j)<=0)P+=1,h$(q,P,v);h$(q,P+1,v);var O=P+1;T$(q,_,$,O-1),T$(q,_,O+1,f)}}Qj.quickSort=function(q,_){T$(q,_,0,q.length-1)}});var a8=J(($7)=>{var H=rq(),k$=e8(),mq=v$().ArraySet,_7=f$(),Mq=i8().quickSort;function A(q,_){var $=q;if(typeof q==="string")$=H.parseSourceMapInput(q);return $.sections!=null?new N($,_):new G($,_)}A.fromSourceMap=function(q,_){return G.fromSourceMap(q,_)};A.prototype._version=3;A.prototype.__generatedMappings=null;Object.defineProperty(A.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});A.prototype.__originalMappings=null;Object.defineProperty(A.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});A.prototype._charIsMappingSeparator=function(_,$){var f=_.charAt($);return f===";"||f===","};A.prototype._parseMappings=function(_,$){throw Error("Subclasses must implement _parseMappings")};A.GENERATED_ORDER=1;A.ORIGINAL_ORDER=2;A.GREATEST_LOWER_BOUND=1;A.LEAST_UPPER_BOUND=2;A.prototype.eachMapping=function(_,$,f){var K=$||null,P=f||A.GENERATED_ORDER,j;switch(P){case A.GENERATED_ORDER:j=this._generatedMappings;break;case A.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(O){var w=O.source===null?null:this._sources.at(O.source);return w=H.computeSourceURL(v,w,this._sourceMapURL),{source:w,generatedLine:O.generatedLine,generatedColumn:O.generatedColumn,originalLine:O.originalLine,originalColumn:O.originalColumn,name:O.name===null?null:this._names.at(O.name)}},this).forEach(_,K)};A.prototype.allGeneratedPositionsFor=function(_){var $=H.getArg(_,"line"),f={source:H.getArg(_,"source"),originalLine:$,originalColumn:H.getArg(_,"column",0)};if(f.source=this._findSourceIndex(f.source),f.source<0)return[];var K=[],P=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,k$.LEAST_UPPER_BOUND);if(P>=0){var j=this._originalMappings[P];if(_.column===void 0){var v=j.originalLine;while(j&&j.originalLine===v)K.push({line:H.getArg(j,"generatedLine",null),column:H.getArg(j,"generatedColumn",null),lastColumn:H.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var O=j.originalColumn;while(j&&j.originalLine===$&&j.originalColumn==O)K.push({line:H.getArg(j,"generatedLine",null),column:H.getArg(j,"generatedColumn",null),lastColumn:H.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return K};$7.SourceMapConsumer=A;function G(q,_){var $=q;if(typeof q==="string")$=H.parseSourceMapInput(q);var f=H.getArg($,"version"),K=H.getArg($,"sources"),P=H.getArg($,"names",[]),j=H.getArg($,"sourceRoot",null),v=H.getArg($,"sourcesContent",null),O=H.getArg($,"mappings"),w=H.getArg($,"file",null);if(f!=this._version)throw Error("Unsupported version: "+f);if(j)j=H.normalize(j);K=K.map(String).map(H.normalize).map(function(T){return j&&H.isAbsolute(j)&&H.isAbsolute(T)?H.relative(j,T):T}),this._names=mq.fromArray(P.map(String),!0),this._sources=mq.fromArray(K,!0),this._absoluteSources=this._sources.toArray().map(function(T){return H.computeSourceURL(j,T,_)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=O,this._sourceMapURL=_,this.file=w}G.prototype=Object.create(A.prototype);G.prototype.consumer=A;G.prototype._findSourceIndex=function(q){var _=q;if(this.sourceRoot!=null)_=H.relative(this.sourceRoot,_);if(this._sources.has(_))return this._sources.indexOf(_);var $;for($=0;$<this._absoluteSources.length;++$)if(this._absoluteSources[$]==q)return $;return-1};G.fromSourceMap=function(_,$){var f=Object.create(G.prototype),K=f._names=mq.fromArray(_._names.toArray(),!0),P=f._sources=mq.fromArray(_._sources.toArray(),!0);f.sourceRoot=_._sourceRoot,f.sourcesContent=_._generateSourcesContent(f._sources.toArray(),f.sourceRoot),f.file=_._file,f._sourceMapURL=$,f._absoluteSources=f._sources.toArray().map(function(z){return H.computeSourceURL(f.sourceRoot,z,$)});var j=_._mappings.toArray().slice(),v=f.__generatedMappings=[],O=f.__originalMappings=[];for(var w=0,T=j.length;w<T;w++){var Y=j[w],k=new C8;if(k.generatedLine=Y.generatedLine,k.generatedColumn=Y.generatedColumn,Y.source){if(k.source=P.indexOf(Y.source),k.originalLine=Y.originalLine,k.originalColumn=Y.originalColumn,Y.name)k.name=K.indexOf(Y.name);O.push(k)}v.push(k)}return Mq(f.__originalMappings,H.compareByOriginalPositions),f};G.prototype._version=3;Object.defineProperty(G.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function C8(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}G.prototype._parseMappings=function(_,$){var f=1,K=0,P=0,j=0,v=0,O=0,w=_.length,T=0,Y={},k={},z=[],Z=[],r,W,m,C,kq;while(T<w)if(_.charAt(T)===";")f++,T++,K=0;else if(_.charAt(T)===",")T++;else{r=new C8,r.generatedLine=f;for(C=T;C<w;C++)if(this._charIsMappingSeparator(_,C))break;if(W=_.slice(T,C),m=Y[W],m)T+=W.length;else{m=[];while(T<C)_7.decode(_,T,k),kq=k.value,T=k.rest,m.push(kq);if(m.length===2)throw Error("Found a source, but no line and column");if(m.length===3)throw Error("Found a source and line, but no column");Y[W]=m}if(r.generatedColumn=K+m[0],K=r.generatedColumn,m.length>1){if(r.source=v+m[1],v+=m[1],r.originalLine=P+m[2],P=r.originalLine,r.originalLine+=1,r.originalColumn=j+m[3],j=r.originalColumn,m.length>4)r.name=O+m[4],O+=m[4]}if(Z.push(r),typeof r.originalLine==="number")z.push(r)}Mq(Z,H.compareByGeneratedPositionsDeflated),this.__generatedMappings=Z,Mq(z,H.compareByOriginalPositions),this.__originalMappings=z};G.prototype._findMapping=function(_,$,f,K,P,j){if(_[f]<=0)throw TypeError("Line must be greater than or equal to 1, got "+_[f]);if(_[K]<0)throw TypeError("Column must be greater than or equal to 0, got "+_[K]);return k$.search(_,$,P,j)};G.prototype.computeColumnSpans=function(){for(var _=0;_<this._generatedMappings.length;++_){var $=this._generatedMappings[_];if(_+1<this._generatedMappings.length){var f=this._generatedMappings[_+1];if($.generatedLine===f.generatedLine){$.lastGeneratedColumn=f.generatedColumn-1;continue}}$.lastGeneratedColumn=1/0}};G.prototype.originalPositionFor=function(_){var $={generatedLine:H.getArg(_,"line"),generatedColumn:H.getArg(_,"column")},f=this._findMapping($,this._generatedMappings,"generatedLine","generatedColumn",H.compareByGeneratedPositionsDeflated,H.getArg(_,"bias",A.GREATEST_LOWER_BOUND));if(f>=0){var K=this._generatedMappings[f];if(K.generatedLine===$.generatedLine){var P=H.getArg(K,"source",null);if(P!==null)P=this._sources.at(P),P=H.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=H.getArg(K,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:H.getArg(K,"originalLine",null),column:H.getArg(K,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};G.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(_){return _==null})};G.prototype.sourceContentFor=function(_,$){if(!this.sourcesContent)return null;var f=this._findSourceIndex(_);if(f>=0)return this.sourcesContent[f];var K=_;if(this.sourceRoot!=null)K=H.relative(this.sourceRoot,K);var P;if(this.sourceRoot!=null&&(P=H.urlParse(this.sourceRoot))){var j=K.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+K))return this.sourcesContent[this._sources.indexOf("/"+K)]}if($)return null;else throw Error('"'+K+'" is not in the SourceMap.')};G.prototype.generatedPositionFor=function(_){var $=H.getArg(_,"source");if($=this._findSourceIndex($),$<0)return{line:null,column:null,lastColumn:null};var f={source:$,originalLine:H.getArg(_,"line"),originalColumn:H.getArg(_,"column")},K=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",H.compareByOriginalPositions,H.getArg(_,"bias",A.GREATEST_LOWER_BOUND));if(K>=0){var P=this._originalMappings[K];if(P.source===f.source)return{line:H.getArg(P,"generatedLine",null),column:H.getArg(P,"generatedColumn",null),lastColumn:H.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};$7.BasicSourceMapConsumer=G;function N(q,_){var $=q;if(typeof q==="string")$=H.parseSourceMapInput(q);var f=H.getArg($,"version"),K=H.getArg($,"sections");if(f!=this._version)throw Error("Unsupported version: "+f);this._sources=new mq,this._names=new mq;var P={line:-1,column:0};this._sections=K.map(function(j){if(j.url)throw Error("Support for url field in sections not implemented.");var v=H.getArg(j,"offset"),O=H.getArg(v,"line"),w=H.getArg(v,"column");if(O<P.line||O===P.line&&w<P.column)throw Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:O+1,generatedColumn:w+1},consumer:new A(H.getArg(j,"map"),_)}})}N.prototype=Object.create(A.prototype);N.prototype.constructor=A;N.prototype._version=3;Object.defineProperty(N.prototype,"sources",{get:function(){var q=[];for(var _=0;_<this._sections.length;_++)for(var $=0;$<this._sections[_].consumer.sources.length;$++)q.push(this._sections[_].consumer.sources[$]);return q}});N.prototype.originalPositionFor=function(_){var $={generatedLine:H.getArg(_,"line"),generatedColumn:H.getArg(_,"column")},f=k$.search($,this._sections,function(P,j){var v=P.generatedLine-j.generatedOffset.generatedLine;if(v)return v;return P.generatedColumn-j.generatedOffset.generatedColumn}),K=this._sections[f];if(!K)return{source:null,line:null,column:null,name:null};return K.consumer.originalPositionFor({line:$.generatedLine-(K.generatedOffset.generatedLine-1),column:$.generatedColumn-(K.generatedOffset.generatedLine===$.generatedLine?K.generatedOffset.generatedColumn-1:0),bias:_.bias})};N.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(_){return _.consumer.hasContentsOfAllSources()})};N.prototype.sourceContentFor=function(_,$){for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer.sourceContentFor(_,!0);if(P)return P}if($)return null;else throw Error('"'+_+'" is not in the SourceMap.')};N.prototype.generatedPositionFor=function(_){for(var $=0;$<this._sections.length;$++){var f=this._sections[$];if(f.consumer._findSourceIndex(H.getArg(_,"source"))===-1)continue;var K=f.consumer.generatedPositionFor(_);if(K){var P={line:K.line+(f.generatedOffset.generatedLine-1),column:K.column+(f.generatedOffset.generatedLine===K.line?f.generatedOffset.generatedColumn-1:0)};return P}}return{line:null,column:null}};N.prototype._parseMappings=function(_,$){this.__generatedMappings=[],this.__originalMappings=[];for(var f=0;f<this._sections.length;f++){var K=this._sections[f],P=K.consumer._generatedMappings;for(var j=0;j<P.length;j++){var v=P[j],O=K.consumer._sources.at(v.source);O=H.computeSourceURL(K.consumer.sourceRoot,O,this._sourceMapURL),this._sources.add(O),O=this._sources.indexOf(O);var w=null;if(v.name)w=K.consumer._names.at(v.name),this._names.add(w),w=this._names.indexOf(w);var T={source:O,generatedLine:v.generatedLine+(K.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+(K.generatedOffset.generatedLine===v.generatedLine?K.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:w};if(this.__generatedMappings.push(T),typeof T.originalLine==="number")this.__originalMappings.push(T)}}Mq(this.__generatedMappings,H.compareByGeneratedPositionsDeflated),Mq(this.__originalMappings,H.compareByOriginalPositions)};$7.IndexedSourceMapConsumer=N});var S8=J((O7)=>{var j7=w$().SourceMapGenerator,P_=rq(),v7=/(\r?\n)/,w7=10,uq="$$$isSourceNode$$$";function e(q,_,$,f,K){if(this.children=[],this.sourceContents={},this.line=q==null?null:q,this.column=_==null?null:_,this.source=$==null?null:$,this.name=K==null?null:K,this[uq]=!0,f!=null)this.add(f)}e.fromStringWithSourceMap=function(_,$,f){var K=new e,P=_.split(v7),j=0,v=function(){var k=Z(),z=Z()||"";return k+z;function Z(){return j<P.length?P[j++]:void 0}},O=1,w=0,T=null;if($.eachMapping(function(k){if(T!==null)if(O<k.generatedLine)Y(T,v()),O++,w=0;else{var z=P[j]||"",Z=z.substr(0,k.generatedColumn-w);P[j]=z.substr(k.generatedColumn-w),w=k.generatedColumn,Y(T,Z),T=k;return}while(O<k.generatedLine)K.add(v()),O++;if(w<k.generatedColumn){var z=P[j]||"";K.add(z.substr(0,k.generatedColumn)),P[j]=z.substr(k.generatedColumn),w=k.generatedColumn}T=k},this),j<P.length){if(T)Y(T,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(k){var z=$.sourceContentFor(k);if(z!=null){if(f!=null)k=P_.join(f,k);K.setSourceContent(k,z)}}),K;function Y(k,z){if(k===null||k.source===void 0)K.add(z);else{var Z=f?P_.join(f,k.source):k.source;K.add(new e(k.originalLine,k.originalColumn,Z,z,k.name))}}};e.prototype.add=function(_){if(Array.isArray(_))_.forEach(function($){this.add($)},this);else if(_[uq]||typeof _==="string"){if(_)this.children.push(_)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};e.prototype.prepend=function(_){if(Array.isArray(_))for(var $=_.length-1;$>=0;$--)this.prepend(_[$]);else if(_[uq]||typeof _==="string")this.children.unshift(_);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};e.prototype.walk=function(_){var $;for(var f=0,K=this.children.length;f<K;f++)if($=this.children[f],$[uq])$.walk(_);else if($!=="")_($,{source:this.source,line:this.line,column:this.column,name:this.name})};e.prototype.join=function(_){var $,f,K=this.children.length;if(K>0){$=[];for(f=0;f<K-1;f++)$.push(this.children[f]),$.push(_);$.push(this.children[f]),this.children=$}return this};e.prototype.replaceRight=function(_,$){var f=this.children[this.children.length-1];if(f[uq])f.replaceRight(_,$);else if(typeof f==="string")this.children[this.children.length-1]=f.replace(_,$);else this.children.push("".replace(_,$));return this};e.prototype.setSourceContent=function(_,$){this.sourceContents[P_.toSetString(_)]=$};e.prototype.walkSourceContents=function(_){for(var $=0,f=this.children.length;$<f;$++)if(this.children[$][uq])this.children[$].walkSourceContents(_);var K=Object.keys(this.sourceContents);for(var $=0,f=K.length;$<f;$++)_(P_.fromSetString(K[$]),this.sourceContents[K[$]])};e.prototype.toString=function(){var _="";return this.walk(function($){_+=$}),_};e.prototype.toStringWithSourceMap=function(_){var $={code:"",line:1,column:0},f=new j7(_),K=!1,P=null,j=null,v=null,O=null;return this.walk(function(w,T){if($.code+=w,T.source!==null&&T.line!==null&&T.column!==null){if(P!==T.source||j!==T.line||v!==T.column||O!==T.name)f.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:$.line,column:$.column},name:T.name});P=T.source,j=T.line,v=T.column,O=T.name,K=!0}else if(K)f.addMapping({generated:{line:$.line,column:$.column}}),P=null,K=!1;for(var Y=0,k=w.length;Y<k;Y++)if(w.charCodeAt(Y)===w7){if($.line++,$.column=0,Y+1===k)P=null,K=!1;else if(K)f.addMapping({source:T.source,original:{line:T.line,column:T.column},generated:{line:$.line,column:$.column},name:T.name})}else $.column++}),this.walkSourceContents(function(w,T){f.setSourceContent(w,T)}),{code:$.code,map:f}};O7.SourceNode=e});var M8=J((h7)=>{h7.SourceMapGenerator=w$().SourceMapGenerator;h7.SourceMapConsumer=a8().SourceMapConsumer;h7.SourceNode=S8().SourceNode});var c8=J((N8,l8)=>{N8.__esModule=!0;var H$=b(),Tq=void 0;try{if(typeof define!=="function"||!define.amd)W$=M8(),Tq=W$.SourceNode}catch(q){}var W$;if(!Tq)Tq=function(q,_,$,f){if(this.src="",f)this.add(f)},Tq.prototype={add:function(_){if(H$.isArray(_))_=_.join("");this.src+=_},prepend:function(_){if(H$.isArray(_))_=_.join("");this.src=_+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function z$(q,_,$){if(H$.isArray(q)){var f=[];for(var K=0,P=q.length;K<P;K++)f.push(_.wrap(q[K],$));return f}else if(typeof q==="boolean"||typeof q==="number")return q+"";return q}function V8(q){this.srcFile=q,this.source=[]}V8.prototype={isEmpty:function(){return!this.source.length},prepend:function(_,$){this.source.unshift(this.wrap(_,$))},push:function(_,$){this.source.push(this.wrap(_,$))},merge:function(){var _=this.empty();return this.each(function($){_.add([" ",$,`
12
+ `])}),_},each:function(_){for(var $=0,f=this.source.length;$<f;$++)_(this.source[$])},empty:function(){var _=this.currentLocation||{start:{}};return new Tq(_.start.line,_.start.column,this.srcFile)},wrap:function(_){var $=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(_ instanceof Tq)return _;return _=z$(_,this,$),new Tq($.start.line,$.start.column,this.srcFile,_)},functionCall:function(_,$,f){return f=this.generateList(f),this.wrap([_,$?"."+$+"(":"(",f,")"])},quotedString:function(_){return'"'+(_+"").replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(_){var $=this,f=[];Object.keys(_).forEach(function(P){var j=z$(_[P],$);if(j!=="undefined")f.push([$.quotedString(P),":",j])});var K=this.generateList(f);return K.prepend("{"),K.add("}"),K},generateList:function(_){var $=this.empty();for(var f=0,K=_.length;f<K;f++){if(f)$.add(",");$.add(z$(_[f],this))}return $},generateArray:function(_){var $=this.generateList(_);return $.prepend("["),$.add("]"),$}};N8.default=V8;l8.exports=N8.default});var D8=J((I8,y8)=>{I8.__esModule=!0;function g8(q){return q&&q.__esModule?q:{default:q}}var R8=Uq(),J7=S(),J$=g8(J7),Z7=b(),r7=c8(),E8=g8(r7);function Aq(q){this.value=q}function Xq(){}Xq.prototype={nameLookup:function(_,$){return this.internalNameLookup(_,$)},depthedLookup:function(_){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(_),")"]},compilerInfo:function(){var _=R8.COMPILER_REVISION,$=R8.REVISION_CHANGES[_];return[_,$]},appendToBuffer:function(_,$,f){if(!Z7.isArray(_))_=[_];if(_=this.source.wrap(_,$),this.environment.isSimple)return["return ",_,";"];else if(f)return["buffer += ",_,";"];else return _.appendToBuffer=!0,_},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(_,$){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",_,",",JSON.stringify($),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(_,$,f,K){this.environment=_,this.options=$,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!K,this.name=this.environment.name,this.isChild=!!f,this.context=f||{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(_,$),this.useDepths=this.useDepths||_.useDepths||_.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||_.useBlockParams;var P=_.opcodes,j=void 0,v=void 0,O=void 0,w=void 0;for(O=0,w=P.length;O<w;O++)j=P[O],this.source.currentLocation=j.loc,v=v||j.loc,this[j.opcode].apply(this,j.args);if(this.source.currentLocation=v,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new J$.default("Compile completed with content left on stack");if(!this.decorators.isEmpty())if(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
13
13
  `]),this.decorators.push("return fn;"),K)this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]);else this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
14
14
  `),this.decorators.push(`}
15
- `),this.decorators=this.decorators.merge();else this.decorators=void 0;var h=this.createFunctionContext(K);if(!this.isChild){var Y={compiler:this.compilerInfo(),main:h};if(this.decorators)Y.main_d=this.decorators,Y.useDecorators=!0;var k=this.context,z=k.programs,W=k.decorators;for(O=0,w=z.length;O<w;O++)if(z[O]){if(Y[O]=z[O],W[O])Y[O+"_d"]=W[O],Y.useDecorators=!0}if(this.environment.usePartial)Y.usePartial=!0;if(this.options.data)Y.useData=!0;if(this.useDepths)Y.useDepths=!0;if(this.useBlockParams)Y.useBlockParams=!0;if(this.options.compat)Y.compat=!0;if(!K)if(Y.compiler=JSON.stringify(Y.compiler),this.source.currentLocation={start:{line:1,column:0}},Y=this.objectLiteral(Y),$.srcName)Y=Y.toStringWithSourceMap({file:$.destName}),Y.map=Y.map&&Y.map.toString();else Y=Y.toString();else Y.compilerOptions=this.options;return Y}else return h},preamble:function(){this.lastContext=0,this.source=new Y8.default(this.options.srcName),this.decorators=new Y8.default(this.options.srcName)},createFunctionContext:function(q){var $=this,f="",K=this.stackVars.concat(this.registers.list);if(K.length>0)f+=", "+K.join(", ");var P=0;if(Object.keys(this.aliases).forEach(function(O){var w=$.aliases[O];if(w.children&&w.referenceCount>1)f+=", alias"+ ++P+"="+O,w.children[0]="alias"+P}),this.lookupPropertyFunctionIsUsed)f+=", "+this.lookupPropertyFunctionVarDeclaration();var j=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths)j.push("blockParams");if(this.useDepths)j.push("depths");var v=this.mergeSource(f);if(q)return j.push(v),Function.apply(this,j);else return this.source.wrap(["function(",j.join(","),`) {
16
- `,v,"}"])},mergeSource:function(q){var $=this.environment.isSimple,f=!this.forceBuffer,K=void 0,P=void 0,j=void 0,v=void 0;if(this.source.each(function(O){if(O.appendToBuffer){if(j)O.prepend(" + ");else j=O;v=O}else{if(j){if(!P)K=!0;else j.prepend("buffer += ");v.add(";"),j=v=void 0}if(P=!0,!$)f=!1}}),f){if(j)j.prepend("return "),v.add(";");else if(!P)this.source.push('return "";')}else if(q+=", buffer = "+(K?"":this.initializeBuffer()),j)j.prepend("return buffer + "),v.add(";");else this.source.push("return buffer;");if(q)this.source.prepend("var "+q.substring(2)+(K?"":`;
15
+ `),this.decorators=this.decorators.merge();else this.decorators=void 0;var T=this.createFunctionContext(K);if(!this.isChild){var Y={compiler:this.compilerInfo(),main:T};if(this.decorators)Y.main_d=this.decorators,Y.useDecorators=!0;var k=this.context,z=k.programs,Z=k.decorators;for(O=0,w=z.length;O<w;O++)if(z[O]){if(Y[O]=z[O],Z[O])Y[O+"_d"]=Z[O],Y.useDecorators=!0}if(this.environment.usePartial)Y.usePartial=!0;if(this.options.data)Y.useData=!0;if(this.useDepths)Y.useDepths=!0;if(this.useBlockParams)Y.useBlockParams=!0;if(this.options.compat)Y.compat=!0;if(!K)if(Y.compiler=JSON.stringify(Y.compiler),this.source.currentLocation={start:{line:1,column:0}},Y=this.objectLiteral(Y),$.srcName)Y=Y.toStringWithSourceMap({file:$.destName}),Y.map=Y.map&&Y.map.toString();else Y=Y.toString();else Y.compilerOptions=this.options;return Y}else return T},preamble:function(){this.lastContext=0,this.source=new E8.default(this.options.srcName),this.decorators=new E8.default(this.options.srcName)},createFunctionContext:function(_){var $=this,f="",K=this.stackVars.concat(this.registers.list);if(K.length>0)f+=", "+K.join(", ");var P=0;if(Object.keys(this.aliases).forEach(function(O){var w=$.aliases[O];if(w.children&&w.referenceCount>1)f+=", alias"+ ++P+"="+O,w.children[0]="alias"+P}),this.lookupPropertyFunctionIsUsed)f+=", "+this.lookupPropertyFunctionVarDeclaration();var j=["container","depth0","helpers","partials","data"];if(this.useBlockParams||this.useDepths)j.push("blockParams");if(this.useDepths)j.push("depths");var v=this.mergeSource(f);if(_)return j.push(v),Function.apply(this,j);else return this.source.wrap(["function(",j.join(","),`) {
16
+ `,v,"}"])},mergeSource:function(_){var $=this.environment.isSimple,f=!this.forceBuffer,K=void 0,P=void 0,j=void 0,v=void 0;if(this.source.each(function(O){if(O.appendToBuffer){if(j)O.prepend(" + ");else j=O;v=O}else{if(j){if(!P)K=!0;else j.prepend("buffer += ");v.add(";"),j=v=void 0}if(P=!0,!$)f=!1}}),f){if(j)j.prepend("return "),v.add(";");else if(!P)this.source.push('return "";')}else if(_+=", buffer = "+(K?"":this.initializeBuffer()),j)j.prepend("return buffer + "),v.add(";");else this.source.push("return buffer;");if(_)this.source.prepend("var "+_.substring(2)+(K?"":`;
17
17
  `));return this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
18
18
  lookupProperty = container.lookupProperty || function(parent, propertyName) {
19
19
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -21,33 +21,66 @@ Expecting `+dq.join(", ")+", got '"+(this.terminals_[X]||X)+"'";else Qq="Parse e
21
21
  }
22
22
  return undefined
23
23
  }
24
- `.trim()},blockValue:function(q){var $=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs(q,0,f);var K=this.popStack();f.splice(1,0,K),this.push(this.source.functionCall($,"call",f))},ambiguousBlockValue:function(){var q=this.aliasable("container.hooks.blockHelperMissing"),$=[this.contextName(0)];this.setupHelperArgs("",0,$,!0),this.flushInline();var f=this.topStack();$.splice(1,0,f),this.pushSource(["if (!",this.lastHelper,") { ",f," = ",this.source.functionCall(q,"call",$),"}"])},appendContent:function(q){if(this.pendingContent)q=this.pendingContent+q;else this.pendingLocation=this.source.currentLocation;this.pendingContent=q},append:function(){if(this.isInline())this.replaceStack(function($){return[" != null ? ",$,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var q=this.popStack();if(this.pushSource(["if (",q," != null) { ",this.appendToBuffer(q,void 0,!0)," }"]),this.environment.isSimple)this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(q){this.lastContext=q},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(q,$,f,K){var P=0;if(!K&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(q[P++]));else this.pushContext();this.resolvePath("context",q,P,$,f)},lookupBlockParam:function(q,$){this.useBlockParams=!0,this.push(["blockParams[",q[0],"][",q[1],"]"]),this.resolvePath("context",$,1)},lookupData:function(q,$,f){if(!q)this.pushStackLiteral("data");else this.pushStackLiteral("container.data(data, "+q+")");this.resolvePath("data",$,0,!0,f)},resolvePath:function(q,$,f,K,P){var j=this;if(this.options.strict||this.options.assumeObjects){this.push(p4(this.options.strict&&P,this,$,f,q));return}var v=$.length;for(;f<v;f++)this.replaceStack(function(O){var w=j.nameLookup(O,$[f],q);if(!K)return[" != null ? ",w," : ",O];else return[" && ",w]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(q,$){if(this.pushContext(),this.pushString($),$!=="SubExpression")if(typeof q==="string")this.pushString(q);else this.pushStackLiteral(q)},emptyHash:function(q){if(this.trackIds)this.push("{}");if(this.stringParams)this.push("{}"),this.push("{}");this.pushStackLiteral(q?"undefined":"{}")},pushHash:function(){if(this.hash)this.hashes.push(this.hash);this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var q=this.hash;if(this.hash=this.hashes.pop(),this.trackIds)this.push(this.objectLiteral(q.ids));if(this.stringParams)this.push(this.objectLiteral(q.contexts)),this.push(this.objectLiteral(q.types));this.push(this.objectLiteral(q.values))},pushString:function(q){this.pushStackLiteral(this.quotedString(q))},pushLiteral:function(q){this.pushStackLiteral(q)},pushProgram:function(q){if(q!=null)this.pushStackLiteral(this.programExpression(q));else this.pushStackLiteral(null)},registerDecorator:function(q,$){var f=this.nameLookup("decorators",$,"decorator"),K=this.setupHelperArgs($,q);this.decorators.push(["fn = ",this.decorators.functionCall(f,"",["fn","props","container",K])," || fn;"])},invokeHelper:function(q,$,f){var K=this.popStack(),P=this.setupHelper(q,$),j=[];if(f)j.push(P.name);if(j.push(K),!this.options.strict)j.push(this.aliasable("container.hooks.helperMissing"));var v=["(",this.itemsSeparatedBy(j,"||"),")"],O=this.source.functionCall(v,"call",P.callParams);this.push(O)},itemsSeparatedBy:function(q,$){var f=[];f.push(q[0]);for(var K=1;K<q.length;K++)f.push($,q[K]);return f},invokeKnownHelper:function(q,$){var f=this.setupHelper(q,$);this.push(this.source.functionCall(f.name,"call",f.callParams))},invokeAmbiguous:function(q,$){this.useRegister("helper");var f=this.popStack();this.emptyHash();var K=this.setupHelper(0,q,$),P=this.lastHelper=this.nameLookup("helpers",q,"helper"),j=["(","(helper = ",P," || ",f,")"];if(!this.options.strict)j[0]="(helper = ",j.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"));this.push(["(",j,K.paramsInit?["),(",K.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",K.callParams)," : helper))"])},invokePartial:function(q,$,f){var K=[],P=this.setupParams($,1,K);if(q)$=this.popStack(),delete P.name;if(f)P.indent=JSON.stringify(f);if(P.helpers="helpers",P.partials="partials",P.decorators="container.decorators",!q)K.unshift(this.nameLookup("partials",$,"partial"));else K.unshift($);if(this.options.compat)P.depths="depths";P=this.objectLiteral(P),K.push(P),this.push(this.source.functionCall("container.invokePartial","",K))},assignToHash:function(q){var $=this.popStack(),f=void 0,K=void 0,P=void 0;if(this.trackIds)P=this.popStack();if(this.stringParams)K=this.popStack(),f=this.popStack();var j=this.hash;if(f)j.contexts[q]=f;if(K)j.types[q]=K;if(P)j.ids[q]=P;j.values[q]=$},pushId:function(q,$,f){if(q==="BlockParam")this.pushStackLiteral("blockParams["+$[0]+"].path["+$[1]+"]"+(f?" + "+JSON.stringify("."+f):""));else if(q==="PathExpression")this.pushString($);else if(q==="SubExpression")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:hq,compileChildren:function(q,$){var f=q.children,K=void 0,P=void 0;for(var j=0,v=f.length;j<v;j++){K=f[j],P=new this.compiler;var O=this.matchExistingProgram(K);if(O==null){this.context.programs.push("");var w=this.context.programs.length;K.index=w,K.name="program"+w,this.context.programs[w]=P.compile(K,$,this.context,!this.precompile),this.context.decorators[w]=P.decorators,this.context.environments[w]=K,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,K.useDepths=this.useDepths,K.useBlockParams=this.useBlockParams}else K.index=O.index,K.name="program"+O.index,this.useDepths=this.useDepths||O.useDepths,this.useBlockParams=this.useBlockParams||O.useBlockParams}},matchExistingProgram:function(q){for(var $=0,f=this.context.environments.length;$<f;$++){var K=this.context.environments[$];if(K&&K.equals(q))return K}},programExpression:function(q){var $=this.environment.children[q],f=[$.index,"data",$.blockParams];if(this.useBlockParams||this.useDepths)f.push("blockParams");if(this.useDepths)f.push("depths");return"container.program("+f.join(", ")+")"},useRegister:function(q){if(!this.registers[q])this.registers[q]=!0,this.registers.list.push(q)},push:function(q){if(!(q instanceof Yq))q=this.source.wrap(q);return this.inlineStack.push(q),q},pushStackLiteral:function(q){this.push(new Yq(q))},pushSource:function(q){if(this.pendingContent)this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0;if(q)this.source.push(q)},replaceStack:function(q){var $=["("],f=void 0,K=void 0,P=void 0;if(!this.isInline())throw new L_.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof Yq)f=[j.value],$=["(",f],P=!0;else{K=!0;var v=this.incrStack();$=["((",this.push(v)," = ",j,")"],f=this.topStack()}var O=q.call(this,f);if(!P)this.popStack();if(K)this.stackSlot--;this.push($.concat(O,")"))},incrStack:function(){if(this.stackSlot++,this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var q=this.inlineStack;this.inlineStack=[];for(var $=0,f=q.length;$<f;$++){var K=q[$];if(K instanceof Yq)this.compileStack.push(K);else{var P=this.incrStack();this.pushSource([P," = ",K,";"]),this.compileStack.push(P)}}},isInline:function(){return this.inlineStack.length},popStack:function(q){var $=this.isInline(),f=($?this.inlineStack:this.compileStack).pop();if(!q&&f instanceof Yq)return f.value;else{if(!$){if(!this.stackSlot)throw new L_.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var q=this.isInline()?this.inlineStack:this.compileStack,$=q[q.length-1];if($ instanceof Yq)return $.value;else return $},contextName:function(q){if(this.useDepths&&q)return"depths["+q+"]";else return"depth"+q},quotedString:function(q){return this.source.quotedString(q)},objectLiteral:function(q){return this.source.objectLiteral(q)},aliasable:function(q){var $=this.aliases[q];if($)return $.referenceCount++,$;return $=this.aliases[q]=this.source.wrap(q),$.aliasable=!0,$.referenceCount=1,$},setupHelper:function(q,$,f){var K=[],P=this.setupHelperArgs($,q,K,f),j=this.nameLookup("helpers",$,"helper"),v=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:K,paramsInit:P,name:j,callParams:[v].concat(K)}},setupParams:function(q,$,f){var K={},P=[],j=[],v=[],O=!f,w=void 0;if(O)f=[];if(K.name=this.quotedString(q),K.hash=this.popStack(),this.trackIds)K.hashIds=this.popStack();if(this.stringParams)K.hashTypes=this.popStack(),K.hashContexts=this.popStack();var h=this.popStack(),Y=this.popStack();if(Y||h)K.fn=Y||"container.noop",K.inverse=h||"container.noop";var k=$;while(k--){if(w=this.popStack(),f[k]=w,this.trackIds)v[k]=this.popStack();if(this.stringParams)j[k]=this.popStack(),P[k]=this.popStack()}if(O)K.args=this.source.generateArray(f);if(this.trackIds)K.ids=this.source.generateArray(v);if(this.stringParams)K.types=this.source.generateArray(j),K.contexts=this.source.generateArray(P);if(this.options.data)K.data="data";if(this.useBlockParams)K.blockParams="blockParams";return K},setupHelperArgs:function(q,$,f,K){var P=this.setupParams(q,$,f);if(P.loc=JSON.stringify(this.source.currentLocation),P=this.objectLiteral(P),K)return this.useRegister("options"),f.push("options"),["options=",P];else if(f)return f.push(P),"";else return P}};(function(){var _="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(" "),q=hq.RESERVED_WORDS={};for(var $=0,f=_.length;$<f;$++)q[_[$]]=!0})();hq.isValidJavaScriptVariableName=function(_){return!hq.RESERVED_WORDS[_]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(_)};function p4(_,q,$,f,K){var P=q.popStack(),j=$.length;if(_)j--;for(;f<j;f++)P=q.nameLookup(P,$[f],K);if(_)return[q.aliasable("container.strict"),"(",P,", ",q.quotedString($[f]),", ",JSON.stringify(q.source.currentLocation)," )"];else return P}T8.default=hq;k8.exports=T8.default});var J8=H((H8,W8)=>{H8.__esModule=!0;function Aq(_){return _&&_.__esModule?_:{default:_}}var t4=W6(),G4=Aq(t4),i4=X_(),a4=Aq(i4),s_=S6(),B_=M6(),b4=r8(),S4=Aq(b4),C4=Mq(),V4=Aq(C4),l4=u_(),M4=Aq(l4),N4=G4.default.create;function z8(){var _=N4();return _.compile=function(q,$){return B_.compile(q,$,_)},_.precompile=function(q,$){return B_.precompile(q,$,_)},_.AST=a4.default,_.Compiler=B_.Compiler,_.JavaScriptCompiler=S4.default,_.Parser=s_.parser,_.parse=s_.parse,_.parseWithoutProcessing=s_.parseWithoutProcessing,_}var Tq=z8();Tq.create=z8;M4.default(Tq);Tq.Visitor=V4.default;Tq.default=Tq;H8.default=Tq;W8.exports=H8.default});var Z8=H((D4)=>{D4.__esModule=!0;D4.print=y4;D4.PrintVisitor=Z;function R4(_){return _&&_.__esModule?_:{default:_}}var g4=Mq(),I4=R4(g4);function y4(_){return new Z().accept(_)}function Z(){this.padding=0}Z.prototype=new I4.default;Z.prototype.pad=function(_){var q="";for(var $=0,f=this.padding;$<f;$++)q+=" ";return q+=_+`
25
- `,q};Z.prototype.Program=function(_){var q="",$=_.body,f=void 0,K=void 0;if(_.blockParams){var P="BLOCK PARAMS: [";for(f=0,K=_.blockParams.length;f<K;f++)P+=" "+_.blockParams[f];P+=" ]",q+=this.pad(P)}for(f=0,K=$.length;f<K;f++)q+=this.accept($[f]);return this.padding--,q};Z.prototype.MustacheStatement=function(_){return this.pad("{{ "+this.SubExpression(_)+" }}")};Z.prototype.Decorator=function(_){return this.pad("{{ DIRECTIVE "+this.SubExpression(_)+" }}")};Z.prototype.BlockStatement=Z.prototype.DecoratorBlock=function(_){var q="";if(q+=this.pad((_.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,q+=this.pad(this.SubExpression(_)),_.program)q+=this.pad("PROGRAM:"),this.padding++,q+=this.accept(_.program),this.padding--;if(_.inverse){if(_.program)this.padding++;if(q+=this.pad("{{^}}"),this.padding++,q+=this.accept(_.inverse),this.padding--,_.program)this.padding--}return this.padding--,q};Z.prototype.PartialStatement=function(_){var q="PARTIAL:"+_.name.original;if(_.params[0])q+=" "+this.accept(_.params[0]);if(_.hash)q+=" "+this.accept(_.hash);return this.pad("{{> "+q+" }}")};Z.prototype.PartialBlockStatement=function(_){var q="PARTIAL BLOCK:"+_.name.original;if(_.params[0])q+=" "+this.accept(_.params[0]);if(_.hash)q+=" "+this.accept(_.hash);return q+=" "+this.pad("PROGRAM:"),this.padding++,q+=this.accept(_.program),this.padding--,this.pad("{{> "+q+" }}")};Z.prototype.ContentStatement=function(_){return this.pad("CONTENT[ '"+_.value+"' ]")};Z.prototype.CommentStatement=function(_){return this.pad("{{! '"+_.value+"' }}")};Z.prototype.SubExpression=function(_){var q=_.params,$=[],f=void 0;for(var K=0,P=q.length;K<P;K++)$.push(this.accept(q[K]));return q="["+$.join(", ")+"]",f=_.hash?" "+this.accept(_.hash):"",this.accept(_.path)+" "+q+f};Z.prototype.PathExpression=function(_){var q=_.parts.join("/");return(_.data?"@":"")+"PATH:"+q};Z.prototype.StringLiteral=function(_){return'"'+_.value+'"'};Z.prototype.NumberLiteral=function(_){return"NUMBER{"+_.value+"}"};Z.prototype.BooleanLiteral=function(_){return"BOOLEAN{"+_.value+"}"};Z.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Z.prototype.NullLiteral=function(){return"NULL"};Z.prototype.Hash=function(_){var q=_.pairs,$=[];for(var f=0,K=q.length;f<K;f++)$.push(this.accept(q[f]));return"HASH{"+$.join(", ")+"}"};Z.prototype.HashPair=function(_){return _.key+"="+this.accept(_.value)}});var o8=H((iv,n8)=>{var gq=J8().default,u8=Z8();gq.PrintVisitor=u8.PrintVisitor;gq.print=u8.print;n8.exports=gq;function m8(_,q){var $=$q("fs"),f=$.readFileSync(q,"utf8");_.exports=gq.compile(f)}if($q.extensions)$q.extensions[".handlebars"]=m8,$q.extensions[".hbs"]=m8});var g=q_($_(),1),T={info:(_)=>console.log(g.default.cyan(" \u25B8"),_),success:(_)=>console.log(g.default.green(" \u2713"),_),warn:(_)=>console.warn(g.default.yellow(" \u26A0"),_),error:(_)=>console.error(g.default.red(" \u2717"),_),step:(_)=>console.log(g.default.bold(g.default.white(`
26
- ${_}`))),dim:(_)=>console.log(g.default.dim(` ${_}`))};import{join as vf}from"path";var h$={info:()=>{},verbose:()=>{},warn:()=>{},error:()=>{}};function T$(_="info"){if(_==="silent")return h$;return{info:(q)=>console.log(` ${q}`),verbose:(q)=>_==="verbose"?console.log(` ${q}`):void 0,warn:(q)=>console.warn(` \u26A0 ${q}`),error:(q)=>console.error(` \u2717 ${q}`)}}function k$(_,q,$={}){let f=_.app.typescript,K=_.app.ssr===!0,P=_.app.ssr==="ssg",j=!K&&!P,v=$.templateDir??vf(import.meta.dirname,"..","..","..","templates");return{ast:_,outputDir:q,templateDir:v,isTypeScript:f,isSsr:K,isSsg:P,isSpa:j,mode:j?"spa":"ssr",ext:f?"ts":"js",logger:$.logger??h$}}class rq extends Error{code;constructor(_,q){super(_);this.code=q;this.name="VaspError"}}class S extends rq{diagnostics;constructor(_){let q=_[0],$=q?.loc,f=$?` (line ${$.line}, col ${$.col})`:"",K=q?.code??"E000_UNKNOWN";super(`[${K}]${f}: ${q?.message??"Unknown error"}`,K);this.name="ParseError",this.diagnostics=_}format(){return this.diagnostics.map((_)=>{let q=_.loc?` at line ${_.loc.line}:${_.loc.col}`:"";return`[${_.code}]${q} ${_.message}
27
- Hint: ${_.hint}`}).join(`
24
+ `.trim()},blockValue:function(_){var $=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs(_,0,f);var K=this.popStack();f.splice(1,0,K),this.push(this.source.functionCall($,"call",f))},ambiguousBlockValue:function(){var _=this.aliasable("container.hooks.blockHelperMissing"),$=[this.contextName(0)];this.setupHelperArgs("",0,$,!0),this.flushInline();var f=this.topStack();$.splice(1,0,f),this.pushSource(["if (!",this.lastHelper,") { ",f," = ",this.source.functionCall(_,"call",$),"}"])},appendContent:function(_){if(this.pendingContent)_=this.pendingContent+_;else this.pendingLocation=this.source.currentLocation;this.pendingContent=_},append:function(){if(this.isInline())this.replaceStack(function($){return[" != null ? ",$,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var _=this.popStack();if(this.pushSource(["if (",_," != null) { ",this.appendToBuffer(_,void 0,!0)," }"]),this.environment.isSimple)this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(_){this.lastContext=_},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(_,$,f,K){var P=0;if(!K&&this.options.compat&&!this.lastContext)this.push(this.depthedLookup(_[P++]));else this.pushContext();this.resolvePath("context",_,P,$,f)},lookupBlockParam:function(_,$){this.useBlockParams=!0,this.push(["blockParams[",_[0],"][",_[1],"]"]),this.resolvePath("context",$,1)},lookupData:function(_,$,f){if(!_)this.pushStackLiteral("data");else this.pushStackLiteral("container.data(data, "+_+")");this.resolvePath("data",$,0,!0,f)},resolvePath:function(_,$,f,K,P){var j=this;if(this.options.strict||this.options.assumeObjects){this.push(m7(this.options.strict&&P,this,$,f,_));return}var v=$.length;for(;f<v;f++)this.replaceStack(function(O){var w=j.nameLookup(O,$[f],_);if(!K)return[" != null ? ",w," : ",O];else return[" && ",w]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(_,$){if(this.pushContext(),this.pushString($),$!=="SubExpression")if(typeof _==="string")this.pushString(_);else this.pushStackLiteral(_)},emptyHash:function(_){if(this.trackIds)this.push("{}");if(this.stringParams)this.push("{}"),this.push("{}");this.pushStackLiteral(_?"undefined":"{}")},pushHash:function(){if(this.hash)this.hashes.push(this.hash);this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var _=this.hash;if(this.hash=this.hashes.pop(),this.trackIds)this.push(this.objectLiteral(_.ids));if(this.stringParams)this.push(this.objectLiteral(_.contexts)),this.push(this.objectLiteral(_.types));this.push(this.objectLiteral(_.values))},pushString:function(_){this.pushStackLiteral(this.quotedString(_))},pushLiteral:function(_){this.pushStackLiteral(_)},pushProgram:function(_){if(_!=null)this.pushStackLiteral(this.programExpression(_));else this.pushStackLiteral(null)},registerDecorator:function(_,$){var f=this.nameLookup("decorators",$,"decorator"),K=this.setupHelperArgs($,_);this.decorators.push(["fn = ",this.decorators.functionCall(f,"",["fn","props","container",K])," || fn;"])},invokeHelper:function(_,$,f){var K=this.popStack(),P=this.setupHelper(_,$),j=[];if(f)j.push(P.name);if(j.push(K),!this.options.strict)j.push(this.aliasable("container.hooks.helperMissing"));var v=["(",this.itemsSeparatedBy(j,"||"),")"],O=this.source.functionCall(v,"call",P.callParams);this.push(O)},itemsSeparatedBy:function(_,$){var f=[];f.push(_[0]);for(var K=1;K<_.length;K++)f.push($,_[K]);return f},invokeKnownHelper:function(_,$){var f=this.setupHelper(_,$);this.push(this.source.functionCall(f.name,"call",f.callParams))},invokeAmbiguous:function(_,$){this.useRegister("helper");var f=this.popStack();this.emptyHash();var K=this.setupHelper(0,_,$),P=this.lastHelper=this.nameLookup("helpers",_,"helper"),j=["(","(helper = ",P," || ",f,")"];if(!this.options.strict)j[0]="(helper = ",j.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"));this.push(["(",j,K.paramsInit?["),(",K.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",K.callParams)," : helper))"])},invokePartial:function(_,$,f){var K=[],P=this.setupParams($,1,K);if(_)$=this.popStack(),delete P.name;if(f)P.indent=JSON.stringify(f);if(P.helpers="helpers",P.partials="partials",P.decorators="container.decorators",!_)K.unshift(this.nameLookup("partials",$,"partial"));else K.unshift($);if(this.options.compat)P.depths="depths";P=this.objectLiteral(P),K.push(P),this.push(this.source.functionCall("container.invokePartial","",K))},assignToHash:function(_){var $=this.popStack(),f=void 0,K=void 0,P=void 0;if(this.trackIds)P=this.popStack();if(this.stringParams)K=this.popStack(),f=this.popStack();var j=this.hash;if(f)j.contexts[_]=f;if(K)j.types[_]=K;if(P)j.ids[_]=P;j.values[_]=$},pushId:function(_,$,f){if(_==="BlockParam")this.pushStackLiteral("blockParams["+$[0]+"].path["+$[1]+"]"+(f?" + "+JSON.stringify("."+f):""));else if(_==="PathExpression")this.pushString($);else if(_==="SubExpression")this.pushStackLiteral("true");else this.pushStackLiteral("null")},compiler:Xq,compileChildren:function(_,$){var f=_.children,K=void 0,P=void 0;for(var j=0,v=f.length;j<v;j++){K=f[j],P=new this.compiler;var O=this.matchExistingProgram(K);if(O==null){this.context.programs.push("");var w=this.context.programs.length;K.index=w,K.name="program"+w,this.context.programs[w]=P.compile(K,$,this.context,!this.precompile),this.context.decorators[w]=P.decorators,this.context.environments[w]=K,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,K.useDepths=this.useDepths,K.useBlockParams=this.useBlockParams}else K.index=O.index,K.name="program"+O.index,this.useDepths=this.useDepths||O.useDepths,this.useBlockParams=this.useBlockParams||O.useBlockParams}},matchExistingProgram:function(_){for(var $=0,f=this.context.environments.length;$<f;$++){var K=this.context.environments[$];if(K&&K.equals(_))return K}},programExpression:function(_){var $=this.environment.children[_],f=[$.index,"data",$.blockParams];if(this.useBlockParams||this.useDepths)f.push("blockParams");if(this.useDepths)f.push("depths");return"container.program("+f.join(", ")+")"},useRegister:function(_){if(!this.registers[_])this.registers[_]=!0,this.registers.list.push(_)},push:function(_){if(!(_ instanceof Aq))_=this.source.wrap(_);return this.inlineStack.push(_),_},pushStackLiteral:function(_){this.push(new Aq(_))},pushSource:function(_){if(this.pendingContent)this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0;if(_)this.source.push(_)},replaceStack:function(_){var $=["("],f=void 0,K=void 0,P=void 0;if(!this.isInline())throw new J$.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof Aq)f=[j.value],$=["(",f],P=!0;else{K=!0;var v=this.incrStack();$=["((",this.push(v)," = ",j,")"],f=this.topStack()}var O=_.call(this,f);if(!P)this.popStack();if(K)this.stackSlot--;this.push($.concat(O,")"))},incrStack:function(){if(this.stackSlot++,this.stackSlot>this.stackVars.length)this.stackVars.push("stack"+this.stackSlot);return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var _=this.inlineStack;this.inlineStack=[];for(var $=0,f=_.length;$<f;$++){var K=_[$];if(K instanceof Aq)this.compileStack.push(K);else{var P=this.incrStack();this.pushSource([P," = ",K,";"]),this.compileStack.push(P)}}},isInline:function(){return this.inlineStack.length},popStack:function(_){var $=this.isInline(),f=($?this.inlineStack:this.compileStack).pop();if(!_&&f instanceof Aq)return f.value;else{if(!$){if(!this.stackSlot)throw new J$.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var _=this.isInline()?this.inlineStack:this.compileStack,$=_[_.length-1];if($ instanceof Aq)return $.value;else return $},contextName:function(_){if(this.useDepths&&_)return"depths["+_+"]";else return"depth"+_},quotedString:function(_){return this.source.quotedString(_)},objectLiteral:function(_){return this.source.objectLiteral(_)},aliasable:function(_){var $=this.aliases[_];if($)return $.referenceCount++,$;return $=this.aliases[_]=this.source.wrap(_),$.aliasable=!0,$.referenceCount=1,$},setupHelper:function(_,$,f){var K=[],P=this.setupHelperArgs($,_,K,f),j=this.nameLookup("helpers",$,"helper"),v=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:K,paramsInit:P,name:j,callParams:[v].concat(K)}},setupParams:function(_,$,f){var K={},P=[],j=[],v=[],O=!f,w=void 0;if(O)f=[];if(K.name=this.quotedString(_),K.hash=this.popStack(),this.trackIds)K.hashIds=this.popStack();if(this.stringParams)K.hashTypes=this.popStack(),K.hashContexts=this.popStack();var T=this.popStack(),Y=this.popStack();if(Y||T)K.fn=Y||"container.noop",K.inverse=T||"container.noop";var k=$;while(k--){if(w=this.popStack(),f[k]=w,this.trackIds)v[k]=this.popStack();if(this.stringParams)j[k]=this.popStack(),P[k]=this.popStack()}if(O)K.args=this.source.generateArray(f);if(this.trackIds)K.ids=this.source.generateArray(v);if(this.stringParams)K.types=this.source.generateArray(j),K.contexts=this.source.generateArray(P);if(this.options.data)K.data="data";if(this.useBlockParams)K.blockParams="blockParams";return K},setupHelperArgs:function(_,$,f,K){var P=this.setupParams(_,$,f);if(P.loc=JSON.stringify(this.source.currentLocation),P=this.objectLiteral(P),K)return this.useRegister("options"),f.push("options"),["options=",P];else if(f)return f.push(P),"";else return P}};(function(){var q="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(" "),_=Xq.RESERVED_WORDS={};for(var $=0,f=q.length;$<f;$++)_[q[$]]=!0})();Xq.isValidJavaScriptVariableName=function(q){return!Xq.RESERVED_WORDS[q]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(q)};function m7(q,_,$,f,K){var P=_.popStack(),j=$.length;if(q)j--;for(;f<j;f++)P=_.nameLookup(P,$[f],K);if(q)return[_.aliasable("container.strict"),"(",P,", ",_.quotedString($[f]),", ",JSON.stringify(_.source.currentLocation)," )"];else return P}I8.default=Xq;y8.exports=I8.default});var B8=J((L8,s8)=>{L8.__esModule=!0;function Vq(q){return q&&q.__esModule?q:{default:q}}var X7=s6(),p7=Vq(X7),n7=L_(),o7=Vq(n7),Z$=T8(),r$=W8(),d7=D8(),G7=Vq(d7),b7=__(),t7=Vq(b7),e7=I_(),i7=Vq(e7),C7=p7.default.create;function x8(){var q=C7();return q.compile=function(_,$){return r$.compile(_,$,q)},q.precompile=function(_,$){return r$.precompile(_,$,q)},q.AST=o7.default,q.Compiler=r$.Compiler,q.JavaScriptCompiler=G7.default,q.Parser=Z$.parser,q.parse=Z$.parse,q.parseWithoutProcessing=Z$.parseWithoutProcessing,q}var pq=x8();pq.create=x8;i7.default(pq);pq.Visitor=t7.default;pq.default=pq;L8.default=pq;s8.exports=L8.default});var U8=J((c7)=>{c7.__esModule=!0;c7.print=l7;c7.PrintVisitor=X;function M7(q){return q&&q.__esModule?q:{default:q}}var V7=__(),N7=M7(V7);function l7(q){return new X().accept(q)}function X(){this.padding=0}X.prototype=new N7.default;X.prototype.pad=function(q){var _="";for(var $=0,f=this.padding;$<f;$++)_+=" ";return _+=q+`
25
+ `,_};X.prototype.Program=function(q){var _="",$=q.body,f=void 0,K=void 0;if(q.blockParams){var P="BLOCK PARAMS: [";for(f=0,K=q.blockParams.length;f<K;f++)P+=" "+q.blockParams[f];P+=" ]",_+=this.pad(P)}for(f=0,K=$.length;f<K;f++)_+=this.accept($[f]);return this.padding--,_};X.prototype.MustacheStatement=function(q){return this.pad("{{ "+this.SubExpression(q)+" }}")};X.prototype.Decorator=function(q){return this.pad("{{ DIRECTIVE "+this.SubExpression(q)+" }}")};X.prototype.BlockStatement=X.prototype.DecoratorBlock=function(q){var _="";if(_+=this.pad((q.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,_+=this.pad(this.SubExpression(q)),q.program)_+=this.pad("PROGRAM:"),this.padding++,_+=this.accept(q.program),this.padding--;if(q.inverse){if(q.program)this.padding++;if(_+=this.pad("{{^}}"),this.padding++,_+=this.accept(q.inverse),this.padding--,q.program)this.padding--}return this.padding--,_};X.prototype.PartialStatement=function(q){var _="PARTIAL:"+q.name.original;if(q.params[0])_+=" "+this.accept(q.params[0]);if(q.hash)_+=" "+this.accept(q.hash);return this.pad("{{> "+_+" }}")};X.prototype.PartialBlockStatement=function(q){var _="PARTIAL BLOCK:"+q.name.original;if(q.params[0])_+=" "+this.accept(q.params[0]);if(q.hash)_+=" "+this.accept(q.hash);return _+=" "+this.pad("PROGRAM:"),this.padding++,_+=this.accept(q.program),this.padding--,this.pad("{{> "+_+" }}")};X.prototype.ContentStatement=function(q){return this.pad("CONTENT[ '"+q.value+"' ]")};X.prototype.CommentStatement=function(q){return this.pad("{{! '"+q.value+"' }}")};X.prototype.SubExpression=function(q){var _=q.params,$=[],f=void 0;for(var K=0,P=_.length;K<P;K++)$.push(this.accept(_[K]));return _="["+$.join(", ")+"]",f=q.hash?" "+this.accept(q.hash):"",this.accept(q.path)+" "+_+f};X.prototype.PathExpression=function(q){var _=q.parts.join("/");return(q.data?"@":"")+"PATH:"+_};X.prototype.StringLiteral=function(q){return'"'+q.value+'"'};X.prototype.NumberLiteral=function(q){return"NUMBER{"+q.value+"}"};X.prototype.BooleanLiteral=function(q){return"BOOLEAN{"+q.value+"}"};X.prototype.UndefinedLiteral=function(){return"UNDEFINED"};X.prototype.NullLiteral=function(){return"NULL"};X.prototype.Hash=function(q){var _=q.pairs,$=[];for(var f=0,K=_.length;f<K;f++)$.push(this.accept(_[f]));return"HASH{"+$.join(", ")+"}"};X.prototype.HashPair=function(q){return q.key+"="+this.accept(q.value)}});var _f=J((Z5,qf)=>{var j_=B8().default,Q8=U8();j_.PrintVisitor=Q8.PrintVisitor;j_.print=Q8.print;qf.exports=j_;function F8(q,_){var $=vq("fs"),f=$.readFileSync(_,"utf8");q.exports=j_.compile(f)}if(vq.extensions)vq.extensions[".handlebars"]=F8,vq.extensions[".hbs"]=F8});var _q=r_(u_(),1),h={info:(q)=>console.log(_q.default.cyan(" \u25B8"),q),success:(q)=>console.log(_q.default.green(" \u2713"),q),warn:(q)=>console.warn(_q.default.yellow(" \u26A0"),q),error:(q)=>console.error(_q.default.red(" \u2717"),q),step:(q)=>console.log(_q.default.bold(_q.default.white(`
26
+ ${q}`))),dim:(q)=>console.log(_q.default.dim(` ${q}`))};class oq extends Error{code;constructor(q,_){super(q);this.code=_;this.name="VaspError"}}class t extends oq{diagnostics;constructor(q){let _=q[0],$=_?.loc,f=$?` (line ${$.line}, col ${$.col})`:"",K=_?.code??"E000_UNKNOWN";super(`[${K}]${f}: ${_?.message??"Unknown error"}`,K);this.name="ParseError",this.diagnostics=q}format(){return this.diagnostics.map((q)=>{let _=q.loc?` at line ${q.loc.line}:${q.loc.col}`:"";return`[${q.code}]${_} ${q.message}
27
+ Hint: ${q.hint}`}).join(`
28
28
 
29
- `)}}class iq extends rq{generatorName;cause;constructor(_,q,$){super(_,"GENERATOR_ERROR");this.generatorName=q;this.cause=$;this.name="GeneratorError"}}var I="0.4.0";var f_=["usernameAndPassword","google","github"],K_=["list","create","update","delete"],P_=["created","updated","deleted"];var j_=["String","Int","Boolean","DateTime","Float"],i=3001,fq=5173,r$=3000;import{join as Yf}from"path";import{mkdirSync as z$,writeFileSync as wf}from"fs";import{dirname as Of}from"path";function H$(_,q){z$(Of(_),{recursive:!0}),wf(_,q,"utf8")}function W$(_){z$(_,{recursive:!0})}class n{ctx;engine;filesWritten;constructor(_,q,$){this.ctx=_;this.engine=q;this.filesWritten=$}write(_,q){let $=Yf(this.ctx.outputDir,_);H$($,q),this.filesWritten.push(_),this.ctx.logger.verbose(` write ${_}`)}render(_,q={}){return this.engine.render(_,{...this.baseData(),...q})}baseData(){let{ast:_,isTypeScript:q,isSsr:$,isSsg:f,isSpa:K,ext:P,mode:j}=this.ctx;return{appName:_.app.name,appTitle:_.app.title,isTypeScript:q,isSsr:$,isSsg:f,isSpa:K,ext:P,mode:j,hasAuth:!!_.auth,hasRealtime:_.realtimes.length>0,hasJobs:_.jobs.length>0,routes:_.routes,pages:_.pages,queries:_.queries,actions:_.actions,cruds:_.cruds,realtimes:_.realtimes,jobs:_.jobs,auth:_.auth}}resolveServerImport(_,q){if(!_.startsWith("@src/"))return _;let $=q.replace(/\/$/,"").split("/").length;return"../".repeat($)+_.slice(1)}}class v_ extends n{run(){if(!this.ctx.ast.auth)return;this.ctx.logger.info("Generating auth system...");let{ext:_,ast:q}=this.ctx,$=q.auth.methods,f={authMethods:$,backendPort:i};if(this.write(`server/auth/plugin.${_}`,this.render("shared/auth/server/plugin.hbs",f)),this.write(`server/auth/index.${_}`,this.render("shared/auth/server/index.hbs",f)),this.write(`server/auth/middleware.${_}`,this.render("shared/auth/server/middleware.hbs",f)),$.includes("usernameAndPassword"))this.write(`server/auth/providers/usernameAndPassword.${_}`,this.render("shared/auth/server/providers/usernameAndPassword.hbs",f));if($.includes("google"))this.write(`server/auth/providers/google.${_}`,this.render("shared/auth/server/providers/google.hbs",f));if($.includes("github"))this.write(`server/auth/providers/github.${_}`,this.render("shared/auth/server/providers/github.hbs",f));if(this.ctx.isSpa)this.write(`src/vasp/auth.${_}`,this.render(`spa/${_}/src/vasp/auth.${_}.hbs`,f));this.write("src/pages/Login.vue",this.render("shared/auth/client/Login.vue.hbs",f)),this.write("src/pages/Register.vue",this.render("shared/auth/client/Register.vue.hbs",f))}}class w_ extends n{run(){this.ctx.logger.info("Generating Elysia backend...");let _={backendPort:i,frontendPort:fq,vaspVersion:I};if(this.write(`server/index.${this.ctx.ext}`,this.render("shared/server/index.hbs",_)),this.write(`server/db/client.${this.ctx.ext}`,this.render("shared/server/db/client.hbs",_)),this.write(`server/middleware/rateLimit.${this.ctx.ext}`,this.render("shared/server/middleware/rateLimit.hbs",_)),this.ctx.isSsr||this.ctx.isSsg)this.write(`server/middleware/csrf.${this.ctx.ext}`,this.render("shared/server/middleware/csrf.hbs",_))}}var A8=q_(o8(),1);import{readFileSync as B4,readdirSync as U4,statSync as F4}from"fs";import{extname as Q4,join as q7,relative as _7}from"path";class U_{cache=new Map;hbs;constructor(){this.hbs=A8.default.create(),this.registerHelpers()}loadDirectory(_){this.walkHbs(_,(q)=>{let $=_7(_,q),f=B4(q,"utf8");try{this.cache.set($,this.hbs.compile(f))}catch(K){throw new iq(`Failed to compile template ${$}: ${String(K)}`,"TemplateEngine")}})}render(_,q){let $=this.cache.get(_);if(!$)throw new iq(`Template not found: '${_}'`,"TemplateEngine");return $(q)}renderString(_,q){return this.hbs.compile(_)(q)}has(_){return this.cache.has(_)}keys(){return[...this.cache.keys()]}registerHelpers(){this.hbs.registerHelper("camelCase",(_)=>V(_)),this.hbs.registerHelper("pascalCase",(_)=>$7(_)),this.hbs.registerHelper("kebabCase",(_)=>f7(_)),this.hbs.registerHelper("lowerCase",(_)=>_.toLowerCase()),this.hbs.registerHelper("upperCase",(_)=>_.toUpperCase()),this.hbs.registerHelper("join",(_,q)=>{if(!Array.isArray(_))return"";return _.join(typeof q==="string"?q:", ")}),this.hbs.registerHelper("importPath",(_,q)=>{if(q==="ts"&&_.endsWith(".js"))return _.slice(0,-3)+".ts";return _}),this.hbs.registerHelper("eq",(_,q)=>_===q),this.hbs.registerHelper("includes",(_,q)=>Array.isArray(_)&&_.includes(q)),this.hbs.registerHelper("importName",(_)=>{return _.kind==="default"?_.defaultExport??"":_.namedExport??""}),this.hbs.registerHelper("drizzleColumn",(_,q,$)=>{let P=`${{String:"text",Int:"integer",Boolean:"boolean",DateTime:"timestamp",Float:"doublePrecision"}[q]??"text"}('${V(_)}')`;if(Array.isArray($)){if($.includes("id"))P+=".primaryKey()";if($.includes("unique"))P+=".unique()";if($.includes("default_now"))P+=".defaultNow()"}return P})}walkHbs(_,q){let $;try{$=U4(_)}catch{return}for(let f of $){let K=q7(_,f);if(F4(K).isDirectory())this.walkHbs(K,q);else if(Q4(K)===".hbs")q(K)}}}function V(_){return _.replace(/[-_\s]+(.)/g,(q,$)=>$.toUpperCase()).replace(/^./,(q)=>q.toLowerCase())}function $7(_){let q=V(_);return q.charAt(0).toUpperCase()+q.slice(1)}function f7(_){return _.replace(/([A-Z])/g,"-$1").replace(/[\s_]+/g,"-").toLowerCase().replace(/^-/,"")}class F_ extends n{run(){let{ast:_,ext:q}=this.ctx;if(_.cruds.length===0)return;this.ctx.logger.info("Generating CRUD endpoints...");let $=new Map(_.realtimes.map((f)=>[f.entity,f.name]));for(let f of _.cruds){let K=$.get(f.entity);this.write(`server/routes/crud/${V(f.entity)}.${q}`,this.render("shared/server/routes/crud/_crud.hbs",{entity:f.entity,operations:f.operations,hasRealtime:!!K,realtimeName:K??""}))}if(this.ctx.isSpa)this.write(`src/vasp/client/crud.${q}`,this.render(`spa/${q}/src/vasp/client/crud.${q}.hbs`))}}class Q_ extends n{run(){this.ctx.logger.info("Generating Drizzle schema...");let _=new Map(this.ctx.ast.entities.map(($)=>[$.name,$.fields])),q=this.ctx.ast.cruds.map(($)=>({...$,fields:_.get($.entity)??[],hasEntity:_.has($.entity)}));this.write(`drizzle/schema.${this.ctx.ext}`,this.render("shared/drizzle/schema.hbs",{crudsWithFields:q})),this.write(`drizzle.config.${this.ctx.ext}`,this.render("shared/drizzle/drizzle.config.hbs"))}}import{existsSync as X8}from"fs";import{join as p8}from"path";class q$ extends n{run(){if(this.ctx.logger.info(`Generating frontend (${this.ctx.mode} / ${this.ctx.ext})...`),this.ctx.isSpa)this.generateSpa();else this.generateSsr()}generateSpa(){let{ext:_,ast:q}=this.ctx,$={backendPort:i,frontendPort:fq};this.write("index.html",this.render(`spa/${_}/index.html.hbs`)),this.write(`vite.config.${_}`,this.render(`spa/${_}/vite.config.${_}.hbs`,$)),this.write(`src/main.${_}`,this.render(`spa/${_}/src/main.${_}.hbs`)),this.write("src/App.vue",this.render(`spa/${_}/src/App.vue.hbs`));let f=this.buildPagesMap();if(this.write(`src/router/index.${_}`,this.render(`spa/${_}/src/router/index.${_}.hbs`,{pagesMap:f})),this.write(`src/vasp/plugin.${_}`,this.render(`spa/${_}/src/vasp/plugin.${_}.hbs`)),this.write(`src/vasp/client/index.${_}`,this.render(`spa/${_}/src/vasp/client/index.${_}.hbs`)),q.queries.length>0)this.write(`src/vasp/client/queries.${_}`,this.render(`spa/${_}/src/vasp/client/queries.${_}.hbs`));if(q.actions.length>0)this.write(`src/vasp/client/actions.${_}`,this.render(`spa/${_}/src/vasp/client/actions.${_}.hbs`));if(this.ctx.isTypeScript&&(q.queries.length>0||q.actions.length>0||q.cruds.length>0))this.write("src/vasp/client/types.ts",this.render("spa/ts/src/vasp/client/types.ts.hbs"));for(let K of q.pages){let P=K.component,v=(P.kind==="default"?P.source:P.source).replace("@src/","src/"),O=p8(this.ctx.outputDir,v);if(!X8(O)){let w=P.kind==="default"?P.defaultExport:P.namedExport;this.write(v,this.scaffoldVuePage(w))}}}generateSsr(){let{ext:_,ast:q}=this.ctx,f={backendPort:i};if(this.write(`nuxt.config.${_}`,this.render(`ssr/${_}/nuxt.config.${_}.hbs`,f)),this.write("app.vue",this.render(`ssr/${_}/app.vue.hbs`)),this.write(`plugins/vasp.server.${_}`,this.render(`ssr/${_}/plugins/vasp.server.${_}.hbs`)),this.write(`plugins/vasp.client.${_}`,this.render(`ssr/${_}/plugins/vasp.client.${_}.hbs`)),this.write(`composables/useVasp.${_}`,this.render(`ssr/${_}/composables/useVasp.${_}.hbs`)),q.auth)this.write(`composables/useAuth.${_}`,this.render(`ssr/${_}/composables/useAuth.${_}.hbs`)),this.write(`middleware/auth.${_}`,this.render(`ssr/${_}/middleware/auth.${_}.hbs`));let K=this.buildPagesMap();for(let P of q.routes){let j=this.routePathToNuxtFile(P.path),v=K[P.to];if(!v)continue;let O=this.extractComponentName(v);this.write(`pages/${j}`,this.render(`ssr/${_}/_page.vue.hbs`,{componentName:O,componentSource:v}))}if(q.auth)this.write("pages/login.vue",this.render(`ssr/${_}/_page.vue.hbs`,{componentName:"LoginPage",componentSource:"@src/pages/Login.vue"})),this.write("pages/register.vue",this.render(`ssr/${_}/_page.vue.hbs`,{componentName:"RegisterPage",componentSource:"@src/pages/Register.vue"}));for(let P of q.pages){let j=P.component,O=(j.kind==="default"?j.source:j.source).replace("@src/","src/"),w=p8(this.ctx.outputDir,O);if(!X8(w)){let h=j.kind==="default"?j.defaultExport:j.namedExport;this.write(O,this.scaffoldVuePage(h))}}}routePathToNuxtFile(_){if(_==="/")return"index.vue";return`${_.replace(/^\//,"").replace(/:([^/]+)/g,"[$1]")}.vue`}buildPagesMap(){let _={};for(let q of this.ctx.ast.pages){let $=q.component.kind==="default"?q.component.source:q.component.source;_[q.name]=$}return _}extractComponentName(_){return(_.split("/").pop()??_).replace(/\.vue$/,"")}scaffoldVuePage(_){return`<template>
29
+ `)}}class yq extends oq{generatorName;cause;constructor(q,_,$){super(q,"GENERATOR_ERROR");this.generatorName=_;this.cause=$;this.name="GeneratorError"}}var l="1.0.0";var A_=["usernameAndPassword","google","github"],X_=["GET","POST","PUT","PATCH","DELETE"],p_=["global","route"],n_=["list","create","update","delete"],o_=["created","updated","deleted"];var Dq=["String","Int","Boolean","DateTime","Float","Text","Json","Enum"],V=3001,Hq=5173,c$=3000;import{join as Bf}from"path";var R$={info:()=>{},verbose:()=>{},warn:()=>{},error:()=>{}};function E$(q="info"){if(q==="silent")return R$;return{info:(_)=>console.log(` ${_}`),verbose:(_)=>q==="verbose"?console.log(` ${_}`):void 0,warn:(_)=>console.warn(` \u26A0 ${_}`),error:(_)=>console.error(` \u2717 ${_}`)}}function g$(q,_,$={}){let f=q.app.typescript,K=q.app.ssr===!0,P=q.app.ssr==="ssg",j=!K&&!P,v=$.templateDir??Bf(import.meta.dirname,"..","..","..","templates");return{ast:q,outputDir:_,templateDir:v,isTypeScript:f,isSsr:K,isSsg:P,isSpa:j,mode:j?"spa":"ssr",ext:f?"ts":"js",logger:$.logger??R$}}import{join as fK}from"path";import{copyFileSync as Uf,existsSync as I$,mkdirSync as xq,readFileSync as Ff,readdirSync as Qf,rmSync as qK,writeFileSync as _K}from"fs";import{dirname as y$,join as d_,relative as $K}from"path";function D$(q,_){xq(y$(q),{recursive:!0}),_K(q,_,"utf8")}function x$(q){xq(q,{recursive:!0})}function Lq(q){let _={};for(let $ of q.split(`
30
+ `)){let f=$.trim();if(!f||f.startsWith("#"))continue;let K=f.indexOf("=");if(K===-1)continue;_[f.slice(0,K).trim()]=f.slice(K+1).trim()}return _}function dq(q){let _=q.trim();if(!_)return!0;return[/^postgres:\/\/user:password@localhost/,/^change-me/i,/^your[_-]/i,/^placeholder/i,/^CHANGE_ME/,/^<.+>$/,/^changeme$/i,/^secret$/i,/^password$/i].some((f)=>f.test(_))}function L$(q,_,$={}){let f=new Set;if($.preserveEnv){let K=d_(_,".env");if(I$(K)){let j=Lq(Ff(K,"utf8")).DATABASE_URL;if(j&&!dq(j))f.add(".env")}}s$(q,_,q,f)}function s$(q,_,$,f){xq(_,{recursive:!0});for(let K of Qf(q,{withFileTypes:!0})){let P=d_(q,K.name),j=d_(_,K.name);if(K.isDirectory())s$(P,j,$,f);else{let v=$K($,P);if(f.has(v))continue;xq(y$(j),{recursive:!0}),Uf(P,j)}}}function G_(q){if(I$(q))qK(q,{recursive:!0,force:!0})}class u{ctx;engine;filesWritten;manifest;constructor(q,_,$,f){this.ctx=q;this.engine=_;this.filesWritten=$;this.manifest=f}write(q,_){let $=fK(this.ctx.outputDir,q);D$($,_),this.filesWritten.push(q),this.manifest.record(q,_,this.constructor.name),this.ctx.logger.verbose(` write ${q}`)}render(q,_={}){return this.engine.render(q,{...this.baseData(),..._})}baseData(){let{ast:q,isTypeScript:_,isSsr:$,isSsg:f,isSpa:K,ext:P,mode:j}=this.ctx;return{appName:q.app.name,appTitle:q.app.title,isTypeScript:_,isSsr:$,isSsg:f,isSpa:K,ext:P,mode:j,hasAuth:!!q.auth,hasRealtime:q.realtimes.length>0,hasJobs:q.jobs.length>0,routes:q.routes,pages:q.pages,queries:q.queries,actions:q.actions,apis:q.apis??[],middlewares:q.middlewares??[],cruds:q.cruds,realtimes:q.realtimes,jobs:q.jobs,seed:q.seed,auth:q.auth}}resolveServerImport(q,_){if(!q.startsWith("@src/"))return q;let $=_.replace(/\/$/,"").split("/").length;return"../".repeat($)+q.slice(1)}}class b_ extends u{run(){if(!this.ctx.ast.auth)return;this.ctx.logger.info("Generating auth system...");let{ext:q,ast:_}=this.ctx,$=_.auth.methods,f={authMethods:$,backendPort:V};if(this.write(`server/auth/plugin.${q}`,this.render("shared/auth/server/plugin.hbs",f)),this.write(`server/auth/index.${q}`,this.render("shared/auth/server/index.hbs",f)),this.write(`server/auth/middleware.${q}`,this.render("shared/auth/server/middleware.hbs",f)),$.includes("usernameAndPassword"))this.write(`server/auth/providers/usernameAndPassword.${q}`,this.render("shared/auth/server/providers/usernameAndPassword.hbs",f));if($.includes("google"))this.write(`server/auth/providers/google.${q}`,this.render("shared/auth/server/providers/google.hbs",f));if($.includes("github"))this.write(`server/auth/providers/github.${q}`,this.render("shared/auth/server/providers/github.hbs",f));if(this.ctx.isSpa)this.write(`src/vasp/auth.${q}`,this.render(`spa/${q}/src/vasp/auth.${q}.hbs`,f));this.write("src/pages/Login.vue",this.render("shared/auth/client/Login.vue.hbs",f)),this.write("src/pages/Register.vue",this.render("shared/auth/client/Register.vue.hbs",f))}}import{existsSync as KK}from"fs";import{join as PK}from"path";class t_ extends u{run(){let{ast:q,ext:_}=this.ctx,$=q.apis??[];if($.length>0)this.ctx.logger.info("Generating custom API routes...");for(let f of $){let K=f.fn,P=K.kind==="named"?K.namedExport:K.defaultExport,j=this.resolveServerImport(K.source,"server/routes/api/");this.write(`server/routes/api/${this.camel(f.name)}.${_}`,this.render("shared/server/routes/api/_api.hbs",{name:f.name,method:f.method,path:f.path,namedExport:P,fnSource:j,requiresAuth:f.auth,hasRoles:(f.roles??[]).length>0,roles:f.roles??[]}))}this.generateSrcStubs($)}generateSrcStubs(q){let _=new Map;for(let $ of q){let{fn:f}=$;if(!f.source.startsWith("@src/"))continue;let K=f.kind==="named"?f.namedExport:f.defaultExport;if(!_.has(f.source))_.set(f.source,[]);_.get(f.source).push(K)}for(let[$,f]of _){let K=$.replace("@src/","src/");if(KK(PK(this.ctx.outputDir,K)))continue;let P=f.map((j)=>`export async function ${j}({ db, user, args }) {
31
+ // TODO: implement
32
+ return { success: true }
33
+ }`).join(`
34
+
35
+ `)+`
36
+ `;this.write(K,P)}}camel(q){return q.replace(/[-_\s]+(.)/g,(_,$)=>$.toUpperCase()).replace(/^./,(_)=>_.toLowerCase())}}class e_ extends u{run(){this.ctx.logger.info("Generating Elysia backend...");let q=(this.ctx.ast.middlewares??[]).map((f)=>({...f,fnSource:this.resolveServerImport(f.fn.source,"server/"),importAlias:`${this.camel(f.name)}Middleware`})),_=Object.entries(this.ctx.ast.app.env??{}).filter(([,f])=>f==="required").map(([f])=>f),$={backendPort:V,frontendPort:Hq,vaspVersion:l,middlewares:q,requiredEnvVars:_};if(this.write(`server/index.${this.ctx.ext}`,this.render("shared/server/index.hbs",$)),this.write(`server/db/client.${this.ctx.ext}`,this.render("shared/server/db/client.hbs",$)),this.write(`server/middleware/rateLimit.${this.ctx.ext}`,this.render("shared/server/middleware/rateLimit.hbs",$)),this.write(`server/middleware/errorHandler.${this.ctx.ext}`,this.render("shared/server/middleware/errorHandler.hbs",$)),this.write(`server/middleware/logger.${this.ctx.ext}`,this.render("shared/server/middleware/logger.hbs",$)),this.write(`server/routes/_vasp.${this.ctx.ext}`,this.render("shared/server/routes/_vasp.hbs",$)),this.ctx.isSsr||this.ctx.isSsg)this.write(`server/middleware/csrf.${this.ctx.ext}`,this.render("shared/server/middleware/csrf.hbs",$))}camel(q){return q.replace(/[-_\s]+(.)/g,(_,$)=>$.toUpperCase()).replace(/^./,(_)=>_.toLowerCase())}}var $f=r_(_f(),1);import{readFileSync as I7,readdirSync as y7,statSync as D7}from"fs";import{extname as x7,join as L7,relative as s7}from"path";class m${cache=new Map;hbs;constructor(){this.hbs=$f.default.create(),this.registerHelpers()}loadDirectory(q){this.walkHbs(q,(_)=>{let $=s7(q,_),f=I7(_,"utf8");try{this.cache.set($,this.hbs.compile(f))}catch(K){throw new yq(`Failed to compile template ${$}: ${String(K)}`,"TemplateEngine")}})}render(q,_){let $=this.cache.get(q);if(!$)throw new yq(`Template not found: '${q}'`,"TemplateEngine");return $(_)}renderString(q,_){return this.hbs.compile(q)(_)}has(q){return this.cache.has(q)}keys(){return[...this.cache.keys()]}registerHelpers(){this.hbs.registerHelper("camelCase",(q)=>p(q)),this.hbs.registerHelper("pascalCase",(q)=>v_(q)),this.hbs.registerHelper("kebabCase",(q)=>B7(q)),this.hbs.registerHelper("lowerCase",(q)=>q.toLowerCase()),this.hbs.registerHelper("upperCase",(q)=>q.toUpperCase()),this.hbs.registerHelper("join",(q,_)=>{if(!Array.isArray(q))return"";return q.join(typeof _==="string"?_:", ")}),this.hbs.registerHelper("importPath",(q,_)=>{if(_==="ts"&&q.endsWith(".js"))return q.slice(0,-3)+".ts";return q}),this.hbs.registerHelper("eq",(q,_)=>q===_),this.hbs.registerHelper("includes",(q,_)=>Array.isArray(q)&&q.includes(_)),this.hbs.registerHelper("importName",(q)=>{return q.kind==="default"?q.defaultExport??"":q.namedExport??""}),this.hbs.registerHelper("tsFieldType",(q,_)=>{if(q==="Enum"&&Array.isArray(_)&&_.length>0)return _.map((f)=>`'${f}'`).join(" | ");return{String:"string",Text:"string",Int:"number",Float:"number",Boolean:"boolean",DateTime:"Date",Json:"unknown"}[q]??q}),this.hbs.registerHelper("valibotSchema",(q,_,$,f)=>{let K;if(q==="Enum"&&Array.isArray(f)&&f.length>0)K=`v.picklist([${f.map((v)=>`'${v}'`).join(", ")}])`;else K={String:"v.pipe(v.string(), v.minLength(1))",Text:"v.pipe(v.string(), v.minLength(1))",Int:"v.number()",Float:"v.number()",Boolean:"v.boolean()",DateTime:"v.string()",Json:"v.unknown()"}[q]??"v.unknown()";let P=$===!0||$==="true";if(_)return P?`v.optional(v.nullable(${K}))`:`v.nullable(${K})`;return P?`v.optional(${K})`:K}),this.hbs.registerHelper("drizzleColumn",(q,_,$,f,K,P)=>{let O=`${{String:"text",Text:"text",Int:"integer",Boolean:"boolean",DateTime:"timestamp",Float:"doublePrecision",Json:"jsonb"}[_]??"text"}('${p(q)}')`;if(Array.isArray($))if($.includes("id"))if(_==="Int")O=`integer('${p(q)}').primaryKey().generatedByDefaultAsIdentity()`;else O+=".primaryKey()";else{if(!f&&!$.includes("nullable"))O+=".notNull()";if($.includes("unique"))O+=".unique()";if($.includes("default_now")||K==="now")O+=".defaultNow()";else if(K!==void 0&&K!=="now")O+=_==="String"||_==="Text"?`.default('${K}')`:`.default(${K})`;if(P||$.includes("updatedAt"))O+=".$onUpdate(() => new Date())"}return O})}walkHbs(q,_){let $;try{$=y7(q)}catch{return}for(let f of $){let K=L7(q,f);if(D7(K).isDirectory())this.walkHbs(K,_);else if(x7(K)===".hbs")_(K)}}}function p(q){return q.replace(/[-_\s]+(.)/g,(_,$)=>$.toUpperCase()).replace(/^./,(_)=>_.toLowerCase())}function v_(q){let _=p(q);return _.charAt(0).toUpperCase()+_.slice(1)}function B7(q){return q.replace(/([A-Z])/g,"-$1").replace(/[\s_]+/g,"-").toLowerCase().replace(/^-/,"")}class u$ extends u{run(){let{ast:q,ext:_}=this.ctx;if(q.cruds.length===0)return;this.ctx.logger.info("Generating CRUD endpoints...");let $=new Map(q.realtimes.map((K)=>[K.entity,K.name])),f=new Map(q.entities.map((K)=>[K.name,K]));for(let K of q.cruds){let P=$.get(K.entity),v=(f.get(K.entity)?.fields??[]).filter((w)=>w.isRelation&&!w.isArray).map((w)=>({name:w.name,relatedEntity:w.relatedEntity,relatedTable:`${p(w.relatedEntity)}s`})),O=v.length>0;this.write(`server/routes/crud/${p(K.entity)}.${_}`,this.render("shared/server/routes/crud/_crud.hbs",{entity:K.entity,operations:K.operations,hasRealtime:!!P,realtimeName:P??"",hasRelations:O,withRelations:v}))}if(this.ctx.isSpa)this.write(`src/vasp/client/crud.${_}`,this.render(`spa/${_}/src/vasp/client/crud.${_}.hbs`))}}class A$ extends u{run(){this.ctx.logger.info("Generating Drizzle schema...");let{ast:q}=this.ctx,_=new Set(["createdAt","updatedAt"]),$=new Set(q.entities.map((k)=>k.name)),f=[];for(let k of q.entities)for(let z of k.fields)if(z.type==="Enum"&&z.enumValues)f.push({fnName:`${p(k.name)}${v_(z.name)}Enum`,dbName:`${p(k.name)}_${p(z.name)}`,values:z.enumValues});let K=f.length>0,P=q.entities.map((k)=>{let z=k.fields.filter((W)=>!_.has(W.name)&&!(W.isRelation&&W.isArray)).map((W)=>{if(!W.isRelation){let m=W.type==="Enum";return{name:W.name,type:W.type,modifiers:W.modifiers,nullable:W.nullable,defaultValue:W.defaultValue,isUpdatedAt:W.isUpdatedAt,isForeignKey:!1,isEnum:m,enumFnName:m?`${p(k.name)}${v_(W.name)}Enum`:void 0}}return{name:`${W.name}Id`,type:"Int",modifiers:[],nullable:W.nullable,defaultValue:void 0,isUpdatedAt:!1,isForeignKey:!0,referencedTable:`${p(W.relatedEntity)}s`,onDelete:W.onDelete??"cascade"}}),Z=k.fields.filter((W)=>W.isRelation&&!W.isArray&&$.has(W.relatedEntity)).map((W)=>({name:W.name,relatedEntity:W.relatedEntity,relatedTable:`${p(W.relatedEntity)}s`,localField:`${p(W.name)}Id`,onDelete:W.onDelete??"cascade"})),r=k.fields.filter((W)=>W.isRelation&&W.isArray&&$.has(W.relatedEntity)).map((W)=>({fieldName:W.name,relatedEntity:W.relatedEntity,relatedTable:`${p(W.relatedEntity)}s`}));return{name:k.name,scalarFields:z,manyToOne:Z,oneToMany:r,hasRelations:Z.length>0||r.length>0}}),j=q.auth?.userEntity,v=[];if(j){let k=new Set(["id","username","email","createdAt","updatedAt"]),z=P.findIndex((Z)=>Z.name===j);if(z!==-1)v=P[z].scalarFields.filter((Z)=>!k.has(Z.name)),P.splice(z,1)}let O=new Set(q.entities.map((k)=>k.name));for(let k of q.cruds)if(!O.has(k.entity))P.push({name:k.entity,scalarFields:[],manyToOne:[],oneToMany:[],hasRelations:!1});let w=new Map(q.entities.map((k)=>[k.name,k.fields])),T=q.cruds.map((k)=>({...k,fields:(w.get(k.entity)??[]).filter((z)=>!_.has(z.name)&&!z.isRelation),hasEntity:w.has(k.entity)})),Y=P.some((k)=>k.hasRelations);this.write(`drizzle/schema.${this.ctx.ext}`,this.render("shared/drizzle/schema.hbs",{entitiesWithSchema:P,crudsWithFields:T,hasAnyRelations:Y,authUserExtraFields:v,enumDeclarations:f,hasEnums:K})),this.write(`drizzle.config.${this.ctx.ext}`,this.render("shared/drizzle/drizzle.config.hbs"))}}import{existsSync as ff}from"fs";import{join as Kf}from"path";class X$ extends u{run(){if(this.ctx.logger.info(`Generating frontend (${this.ctx.mode} / ${this.ctx.ext})...`),this.ctx.isSpa)this.generateSpa();else this.generateSsr()}generateSpa(){let{ext:q,ast:_}=this.ctx,$={backendPort:V,frontendPort:Hq};this.write("index.html",this.render(`spa/${q}/index.html.hbs`)),this.write(`vite.config.${q}`,this.render(`spa/${q}/vite.config.${q}.hbs`,$)),this.write(`src/main.${q}`,this.render(`spa/${q}/src/main.${q}.hbs`)),this.write("src/App.vue",this.render(`spa/${q}/src/App.vue.hbs`)),this.write("src/components/VaspErrorBoundary.vue",this.render(`spa/${q}/src/components/VaspErrorBoundary.vue.hbs`)),this.write("src/components/VaspNotifications.vue",this.render(`spa/${q}/src/components/VaspNotifications.vue.hbs`)),this.write(`src/vasp/useVaspNotifications.${q}`,this.render(`spa/${q}/src/vasp/useVaspNotifications.${q}.hbs`));let f=this.buildPagesMap();if(this.write(`src/router/index.${q}`,this.render(`spa/${q}/src/router/index.${q}.hbs`,{pagesMap:f})),this.write(`src/vasp/plugin.${q}`,this.render(`spa/${q}/src/vasp/plugin.${q}.hbs`)),this.write(`src/vasp/client/index.${q}`,this.render(`spa/${q}/src/vasp/client/index.${q}.hbs`)),_.queries.length>0)this.write(`src/vasp/client/queries.${q}`,this.render(`spa/${q}/src/vasp/client/queries.${q}.hbs`));if(_.actions.length>0)this.write(`src/vasp/client/actions.${q}`,this.render(`spa/${q}/src/vasp/client/actions.${q}.hbs`));if(this.ctx.isTypeScript&&(_.queries.length>0||_.actions.length>0||_.cruds.length>0||_.entities.length>0))this.write("src/vasp/client/types.ts",this.render("spa/ts/src/vasp/client/types.ts.hbs",{entities:_.entities}));for(let K of _.pages){let P=K.component,v=(P.kind==="default"?P.source:P.source).replace("@src/","src/"),O=Kf(this.ctx.outputDir,v);if(!ff(O)){let w=P.kind==="default"?P.defaultExport:P.namedExport;this.write(v,this.scaffoldVuePage(w))}}}generateSsr(){let{ext:q,ast:_}=this.ctx,f={backendPort:V};if(this.write(`nuxt.config.${q}`,this.render(`ssr/${q}/nuxt.config.${q}.hbs`,f)),this.write("app.vue",this.render(`ssr/${q}/app.vue.hbs`)),this.write("error.vue",this.render(`ssr/${q}/error.vue.hbs`)),this.write(`plugins/vasp.server.${q}`,this.render(`ssr/${q}/plugins/vasp.server.${q}.hbs`)),this.write(`plugins/vasp.client.${q}`,this.render(`ssr/${q}/plugins/vasp.client.${q}.hbs`)),this.write(`composables/useVasp.${q}`,this.render(`ssr/${q}/composables/useVasp.${q}.hbs`)),_.auth)this.write(`composables/useAuth.${q}`,this.render(`ssr/${q}/composables/useAuth.${q}.hbs`)),this.write(`middleware/auth.${q}`,this.render(`ssr/${q}/middleware/auth.${q}.hbs`));let K=this.buildPagesMap();for(let P of _.routes){let j=this.routePathToNuxtFile(P.path),v=K[P.to];if(!v)continue;let O=this.extractComponentName(v);this.write(`pages/${j}`,this.render(`ssr/${q}/_page.vue.hbs`,{componentName:O,componentSource:v}))}if(_.auth)this.write("pages/login.vue",this.render(`ssr/${q}/_page.vue.hbs`,{componentName:"LoginPage",componentSource:"@src/pages/Login.vue"})),this.write("pages/register.vue",this.render(`ssr/${q}/_page.vue.hbs`,{componentName:"RegisterPage",componentSource:"@src/pages/Register.vue"}));for(let P of _.pages){let j=P.component,O=(j.kind==="default"?j.source:j.source).replace("@src/","src/"),w=Kf(this.ctx.outputDir,O);if(!ff(w)){let T=j.kind==="default"?j.defaultExport:j.namedExport;this.write(O,this.scaffoldVuePage(T))}}}routePathToNuxtFile(q){if(q==="/")return"index.vue";return`${q.replace(/^\//,"").replace(/:([^/]+)/g,"[$1]")}.vue`}buildPagesMap(){let q={};for(let _ of this.ctx.ast.pages){let $=_.component.kind==="default"?_.component.source:_.component.source;q[_.name]=$}return q}extractComponentName(q){return(q.split("/").pop()??q).replace(/\.vue$/,"")}scaffoldVuePage(q){return`<template>
30
37
  <div>
31
- <h1>${_}</h1>
38
+ <h1>${q}</h1>
32
39
  <p>Edit this page in src/pages/</p>
33
40
  </div>
34
41
  </template>
35
- `}}class _$ extends n{run(){let{ast:_,ext:q}=this.ctx;if(_.jobs.length===0)return;this.ctx.logger.info("Generating background jobs..."),this.write(`server/jobs/boss.${q}`,this.render("shared/jobs/boss.hbs"));for(let $ of _.jobs){let f=$.perform.fn,K=f.kind==="named"?f.namedExport:f.defaultExport;this.write(`server/jobs/${V($.name)}.${q}`,this.render("shared/jobs/_job.hbs",{name:$.name,namedExport:K,fnSource:this.resolveServerImport(f.source,"server/jobs/"),schedule:$.schedule,hasSchedule:!!$.schedule})),this.write(`server/routes/jobs/${V($.name)}Schedule.${q}`,this.render("shared/server/routes/jobs/_schedule.hbs",{name:$.name}))}}}class $$ extends n{run(){let{ast:_,ext:q}=this.ctx;if(_.queries.length>0||_.actions.length>0)this.ctx.logger.info("Generating query/action routes...");for(let $ of _.queries){let f=$.fn,K=f.kind==="named"?f.namedExport:f.defaultExport,P=this.resolveServerImport(f.source,"server/routes/queries/");this.write(`server/routes/queries/${this.camel($.name)}.${q}`,this.render("shared/server/routes/queries/_query.hbs",{name:$.name,namedExport:K,fnSource:P,requiresAuth:$.auth}))}for(let $ of _.actions){let f=$.fn,K=f.kind==="named"?f.namedExport:f.defaultExport,P=this.resolveServerImport(f.source,"server/routes/actions/");this.write(`server/routes/actions/${this.camel($.name)}.${q}`,this.render("shared/server/routes/actions/_action.hbs",{name:$.name,namedExport:K,fnSource:P,requiresAuth:$.auth}))}}camel(_){return _.replace(/[-_\s]+(.)/g,(q,$)=>$.toUpperCase()).replace(/^./,(q)=>q.toLowerCase())}}class f$ extends n{run(){let{ast:_,ext:q}=this.ctx;if(_.realtimes.length===0)return;this.ctx.logger.info("Generating realtime WebSocket channels...");for(let $ of _.realtimes)this.write(`server/routes/realtime/${V($.name)}.${q}`,this.render("shared/server/routes/realtime/_channel.hbs",{name:$.name,entity:$.entity,events:$.events}));if(this.write(`server/routes/realtime/index.${q}`,this.render("shared/server/routes/realtime/index.hbs")),this.ctx.isSpa)this.write(`src/vasp/client/realtime.${q}`,this.render(`spa/${q}/src/vasp/client/realtime.${q}.hbs`))}}import{join as K7}from"path";class K$ extends n{run(){this.ctx.logger.info("Scaffolding project structure...");let _=["src/pages","src/components","src/lib","drizzle","drizzle/migrations","server/routes/queries","server/routes/actions","server/middleware","server/db","tests",...this.ctx.isSpa?["src/vasp/client"]:["composables","plugins","pages","middleware"]];for(let K of _)W$(K7(this.ctx.outputDir,K));let q=this.ctx.isSpa?fq:r$,$=this.render("shared/package.json.hbs",{vaspVersion:I,backendPort:i,frontendPort:q,authMethods:this.ctx.ast.auth?.methods??[]});this.write("package.json",$),this.write("bunfig.toml",this.render("shared/bunfig.toml.hbs")),this.write(".gitignore",this.render("shared/.gitignore.hbs"));let f={backendPort:i,frontendPort:q,authMethods:this.ctx.ast.auth?.methods??[]};if(this.write(".env.example",this.render("shared/.env.example.hbs",f)),this.write(".env",this.render("shared/.env.hbs",f)),this.write("README.md",this.render("shared/README.md.hbs",{backendPort:i})),this.ctx.isTypeScript)this.write("tsconfig.json",this.render("shared/tsconfig.json.hbs"));this.write("main.vasp",this.generateMainVasp())}generateMainVasp(){let{ast:_}=this.ctx,q=this.ctx.ext,$=[`app ${_.app.name} {`,` title: "${_.app.title}"`,` db: ${_.app.db}`,` ssr: ${typeof _.app.ssr==="string"?`"${_.app.ssr}"`:_.app.ssr}`,` typescript: ${_.app.typescript}`,"}",""];if(_.auth)$.push(`auth ${_.auth.name} {`,` userEntity: ${_.auth.userEntity}`,` methods: [ ${_.auth.methods.join(", ")} ]`,"}","");for(let f of _.routes)$.push(`route ${f.name} {`,` path: "${f.path}"`,` to: ${f.to}`,"}","");for(let f of _.pages){let K=f.component,P=K.kind==="default"?`import ${K.defaultExport} from "${K.source}"`:`import { ${K.namedExport} } from "${K.source}"`;$.push(`page ${f.name} {`,` component: ${P}`,"}","")}for(let f of _.queries){let K=f.fn,P=K.kind==="named"?`import { ${K.namedExport} } from "${K.source}"`:`import ${K.defaultExport} from "${K.source}"`;$.push(`query ${f.name} {`,` fn: ${P}`,` entities: [${f.entities.join(", ")}]`,"}","")}for(let f of _.actions){let K=f.fn,P=K.kind==="named"?`import { ${K.namedExport} } from "${K.source}"`:`import ${K.defaultExport} from "${K.source}"`;$.push(`action ${f.name} {`,` fn: ${P}`,` entities: [${f.entities.join(", ")}]`,"}","")}for(let f of _.cruds)$.push(`crud ${f.name} {`,` entity: ${f.entity}`,` operations: [${f.operations.join(", ")}]`,"}","");return $.join(`
36
- `)}}function Q(_,q){let $=T$(q.logLevel??"info"),f=k$(_,q.outputDir,{...q.templateDir!==void 0?{templateDir:q.templateDir}:{},logger:$}),K=new U_;K.loadDirectory(f.templateDir);let P=[],j=[];try{return new K$(f,K,P).run(),new Q_(f,K,P).run(),new w_(f,K,P).run(),new v_(f,K,P).run(),new $$(f,K,P).run(),new F_(f,K,P).run(),new f$(f,K,P).run(),new _$(f,K,P).run(),new q$(f,K,P).run(),$.info(`\u2713 Generated ${P.length} files`),{success:!0,filesWritten:P,errors:[],warnings:j}}catch(v){let O=v instanceof Error?v.message:String(v);return $.error(O),{success:!1,filesWritten:P,errors:[O],warnings:j}}}var Xq=new Set(["app","auth","entity","route","page","query","action","crud","realtime","job"]),e8=new Set([...Xq,"import","from"]);class Iq{source;filename;pos=0;line=1;col=1;tokens=[];constructor(_,q="main.vasp"){this.source=_;this.filename=q}tokenize(){while(this.pos<this.source.length){if(this.skipWhitespaceAndComments(),this.pos>=this.source.length)break;this.scanToken()}return this.tokens.push({type:"EOF",value:"",loc:{line:this.line,col:this.col,offset:this.pos,file:this.filename}}),this.tokens}loc(){return{line:this.line,col:this.col,offset:this.pos,file:this.filename}}peek(_=0){return this.source[this.pos+_]??""}advance(){let _=this.source[this.pos++]??"";if(_===`
37
- `)this.line++,this.col=1;else this.col++;return _}skipWhitespaceAndComments(){while(this.pos<this.source.length){let _=this.peek();if(_===" "||_==="\t"||_==="\r"||_===`
38
- `){this.advance();continue}if(_==="/"&&this.peek(1)==="/"){while(this.pos<this.source.length&&this.peek()!==`
39
- `)this.advance();continue}if(_==="/"&&this.peek(1)==="*"){let q=this.loc();this.advance(),this.advance();let $=!1;while(this.pos<this.source.length){if(this.peek()==="*"&&this.peek(1)==="/"){this.advance(),this.advance(),$=!0;break}this.advance()}if(!$)throw new S([{code:"E001_UNCLOSED_BLOCK_COMMENT",message:"Unclosed block comment",hint:"Add */ to close the block comment",loc:q}]);continue}break}}scanToken(){let _=this.peek(),$={"{":"{","}":"}","[":"[","]":"]",":":":",",":","}[_];if($!==void 0){let f=this.loc();this.advance(),this.tokens.push({type:$,value:_,loc:f});return}if(_==="@"){this.scanModifier();return}if(_==='"'||_==="'"){this.scanString(_);return}if(_>="0"&&_<="9"){this.scanNumber();return}if(_==="_"||_>="a"&&_<="z"||_>="A"&&_<="Z"){this.scanIdentifierOrKeyword();return}throw new S([{code:"E002_UNEXPECTED_CHAR",message:`Unexpected character: '${_}'`,hint:"Check for typos or unsupported syntax in your .vasp file",loc:this.loc()}])}scanModifier(){let _=this.loc();this.advance();let q="";while(this.pos<this.source.length){let f=this.peek();if(f>="a"&&f<="z"||f>="A"&&f<="Z"||f==="_")q+=this.advance();else break}let $=q;if(q==="default"&&this.peek()==="("){this.advance();let f="";while(this.pos<this.source.length&&this.peek()!==")")f+=this.advance();if(this.peek()===")")this.advance();$=f.trim()==="now"?"default_now":`default_${f.trim()}`}this.tokens.push({type:"AT_MODIFIER",value:$,loc:_})}scanString(_){let q=this.loc();this.advance();let $="";while(this.pos<this.source.length&&this.peek()!==_){if(this.peek()===`
40
- `)throw new S([{code:"E003_UNTERMINATED_STRING",message:"Unterminated string literal",hint:"Close the string with a matching quote on the same line",loc:q}]);if(this.peek()==="\\"){this.advance();let f=this.advance();$+=this.unescape(f)}else $+=this.advance()}if(this.pos>=this.source.length)throw new S([{code:"E003_UNTERMINATED_STRING",message:"Unterminated string literal",hint:"Close the string with a matching quote",loc:q}]);this.advance(),this.tokens.push({type:"STRING",value:$,loc:q})}unescape(_){return{n:`
41
- `,t:"\t",r:"\r",'"':'"',"'":"'","\\":"\\"}[_]??_}scanNumber(){let _=this.loc(),q="";while(this.pos<this.source.length&&this.peek()>="0"&&this.peek()<="9")q+=this.advance();if(this.peek()==="."&&this.peek(1)>="0"&&this.peek(1)<="9"){q+=this.advance();while(this.pos<this.source.length&&this.peek()>="0"&&this.peek()<="9")q+=this.advance()}this.tokens.push({type:"NUMBER",value:q,loc:_})}scanIdentifierOrKeyword(){let _=this.loc(),q="";while(this.pos<this.source.length){let $=this.peek();if($>="a"&&$<="z"||$>="A"&&$<="Z"||$>="0"&&$<="9"||$==="_"||$==="-")q+=this.advance();else break}if(e8.has(q)){if(Xq.has(q))this.tokens.push({type:q,value:q,loc:_});else if(q==="import")this.tokens.push({type:"import",value:q,loc:_});else if(q==="from")this.tokens.push({type:"from",value:q,loc:_});else this.tokens.push({type:"IDENTIFIER",value:q,loc:_});return}if(q==="true"||q==="false"){this.tokens.push({type:"BOOLEAN",value:q,loc:_});return}this.tokens.push({type:"IDENTIFIER",value:q,loc:_})}}function t8(_,q="main.vasp"){let $=new Iq(_,q).tokenize();return new G8($,q).parse()}function P7(_){let q=_.match(/:([^/]+)/g);return q?q.map(($)=>$.slice(1)):[]}class G8{tokens;filename;pos=0;constructor(_,q){this.tokens=_;this.filename=q}parse(){let _={app:null,entities:[],routes:[],pages:[],queries:[],actions:[],cruds:[],realtimes:[],jobs:[]};while(!this.isEOF()){let q=this.peek();switch(q.type){case"app":_.app=this.parseApp();break;case"auth":_.auth=this.parseAuth();break;case"entity":_.entities.push(this.parseEntity());break;case"route":_.routes.push(this.parseRoute());break;case"page":_.pages.push(this.parsePage());break;case"query":_.queries.push(this.parseQuery());break;case"action":_.actions.push(this.parseAction());break;case"crud":_.cruds.push(this.parseCrud());break;case"realtime":_.realtimes.push(this.parseRealtime());break;case"job":_.jobs.push(this.parseJob());break;default:throw this.error("E010_UNEXPECTED_TOKEN",`Unexpected token '${q.value}' at top level`,"Expected a declaration keyword: app, auth, entity, route, page, query, action, crud, realtime, or job",q.loc)}}return _}parseApp(){let _=this.consume("app").loc,q=this.consumeIdentifier();this.consume("{");let $="",f="Drizzle",K=!1,P=!1;while(!this.check("}")){let j=this.consumeIdentifier();switch(this.consume(":"),j.value){case"title":$=this.consumeString();break;case"db":f=this.consumeIdentifier().value;break;case"ssr":{let v=this.peek();if(v.type==="BOOLEAN")K=this.consume("BOOLEAN").value==="true";else if(v.type==="STRING"){let O=this.consumeString();if(O!=="ssg")throw this.error("E011_INVALID_SSR",`Invalid ssr value "${O}"`,'Use: false, true, or "ssg"',v.loc);K="ssg"}else throw this.error("E011_INVALID_SSR","Invalid ssr value",'Use: false, true, or "ssg"',v.loc);break}case"typescript":P=this.consume("BOOLEAN").value==="true";break;default:throw this.error("E012_UNKNOWN_PROP",`Unknown app property '${j.value}'`,"Valid properties: title, db, ssr, typescript",j.loc)}}return this.consume("}"),{type:"App",name:q.value,loc:_,title:$,db:f,ssr:K,typescript:P}}parseAuth(){let _=this.consume("auth").loc,q=this.consumeIdentifier();this.consume("{");let $="",f=[];while(!this.check("}")){let K=this.consumeIdentifier();switch(this.consume(":"),K.value){case"userEntity":$=this.consumeIdentifier().value;break;case"methods":f=this.parseIdentifierArray();break;default:throw this.error("E013_UNKNOWN_PROP",`Unknown auth property '${K.value}'`,"Valid properties: userEntity, methods",K.loc)}}return this.consume("}"),{type:"Auth",name:q.value,loc:_,userEntity:$,methods:f}}parseEntity(){let _=this.consume("entity").loc,q=this.consumeIdentifier();this.consume("{");let $=[],f=["String","Int","Boolean","DateTime","Float"];while(!this.check("}")){let K=this.consumeIdentifier();this.consume(":");let P=this.consumeIdentifier();if(!f.includes(P.value))throw this.error("E026_INVALID_FIELD_TYPE",`Invalid field type '${P.value}' in entity '${q.value}'`,`Valid types: ${f.join(", ")}`,P.loc);let j=[];while(this.check("AT_MODIFIER")){let v=this.consume("AT_MODIFIER");j.push(v.value)}$.push({name:K.value,type:P.value,modifiers:j})}return this.consume("}"),{type:"Entity",name:q.value,loc:_,fields:$}}parseRoute(){let _=this.consume("route").loc,q=this.consumeIdentifier();this.consume("{");let $="",f="";while(!this.check("}")){let P=this.consumeIdentifier();switch(this.consume(":"),P.value){case"path":$=this.consumeString();break;case"to":f=this.consumeIdentifier().value;break;default:throw this.error("E014_UNKNOWN_PROP",`Unknown route property '${P.value}'`,"Valid properties: path, to",P.loc)}}this.consume("}");let K=P7($);return{type:"Route",name:q.value,loc:_,path:$,to:f,params:K}}parsePage(){let _=this.consume("page").loc,q=this.consumeIdentifier();this.consume("{");let $=null;while(!this.check("}")){let f=this.consumeIdentifier();switch(this.consume(":"),f.value){case"component":$=this.parseImportExpression();break;default:throw this.error("E015_UNKNOWN_PROP",`Unknown page property '${f.value}'`,"Valid properties: component",f.loc)}}if(this.consume("}"),!$)throw this.error("E016_MISSING_COMPONENT",`Page '${q.value}' is missing a component`,'Add: component: import Foo from "@src/pages/Foo.vue"',_);return{type:"Page",name:q.value,loc:_,component:$}}parseQuery(){let _=this.consume("query").loc,q=this.consumeIdentifier();this.consume("{");let $=null,f=[],K=!1;while(!this.check("}")){let P=this.consumeIdentifier();switch(this.consume(":"),P.value){case"fn":$=this.parseImportExpression();break;case"entities":f=this.parseIdentifierArray();break;case"auth":K=this.consume("BOOLEAN").value==="true";break;default:throw this.error("E017_UNKNOWN_PROP",`Unknown query property '${P.value}'`,"Valid properties: fn, entities, auth",P.loc)}}if(this.consume("}"),!$)throw this.error("E018_MISSING_FN",`Query '${q.value}' is missing fn`,'Add: fn: import { myFn } from "@src/queries.js"',_);return{type:"Query",name:q.value,loc:_,fn:$,entities:f,auth:K}}parseAction(){let _=this.consume("action").loc,q=this.consumeIdentifier();this.consume("{");let $=null,f=[],K=!1;while(!this.check("}")){let P=this.consumeIdentifier();switch(this.consume(":"),P.value){case"fn":$=this.parseImportExpression();break;case"entities":f=this.parseIdentifierArray();break;case"auth":K=this.consume("BOOLEAN").value==="true";break;default:throw this.error("E019_UNKNOWN_PROP",`Unknown action property '${P.value}'`,"Valid properties: fn, entities, auth",P.loc)}}if(this.consume("}"),!$)throw this.error("E020_MISSING_FN",`Action '${q.value}' is missing fn`,'Add: fn: import { myFn } from "@src/actions.js"',_);return{type:"Action",name:q.value,loc:_,fn:$,entities:f,auth:K}}parseCrud(){let _=this.consume("crud").loc,q=this.consumeIdentifier();this.consume("{");let $="",f=[];while(!this.check("}")){let K=this.consumeIdentifier();switch(this.consume(":"),K.value){case"entity":$=this.consumeIdentifier().value;break;case"operations":f=this.parseIdentifierArray();break;default:throw this.error("E021_UNKNOWN_PROP",`Unknown crud property '${K.value}'`,"Valid properties: entity, operations",K.loc)}}return this.consume("}"),{type:"Crud",name:q.value,loc:_,entity:$,operations:f}}parseRealtime(){let _=this.consume("realtime").loc,q=this.consumeIdentifier();this.consume("{");let $="",f=[];while(!this.check("}")){let K=this.consumeIdentifier();switch(this.consume(":"),K.value){case"entity":$=this.consumeIdentifier().value;break;case"events":f=this.parseIdentifierArray();break;default:throw this.error("E022_UNKNOWN_PROP",`Unknown realtime property '${K.value}'`,"Valid properties: entity, events",K.loc)}}return this.consume("}"),{type:"Realtime",name:q.value,loc:_,entity:$,events:f}}parseJob(){let _=this.consume("job").loc,q=this.consumeIdentifier();this.consume("{");let $="PgBoss",f=null,K;while(!this.check("}")){let P=this.consumeIdentifier();switch(this.consume(":"),P.value){case"executor":$=this.consumeIdentifier().value;break;case"perform":{this.consume("{");while(!this.check("}")){let j=this.consumeIdentifier();if(this.consume(":"),j.value==="fn")f=this.parseImportExpression();else throw this.error("E023_UNKNOWN_PROP",`Unknown perform property '${j.value}'`,"Valid properties: fn",j.loc)}this.consume("}");break}case"schedule":K=this.consumeString();break;default:throw this.error("E024_UNKNOWN_PROP",`Unknown job property '${P.value}'`,"Valid properties: executor, perform, schedule",P.loc)}}if(this.consume("}"),!f)throw this.error("E025_MISSING_PERFORM",`Job '${q.value}' is missing perform.fn`,'Add: perform: { fn: import { myJob } from "@src/jobs.js" }',_);return{type:"Job",name:q.value,loc:_,executor:$,perform:{fn:f},...K!==void 0?{schedule:K}:{}}}parseImportExpression(){let _=this.consume("import").loc;if(this.check("{")){this.consume("{");let f=this.consumeIdentifier().value;this.consume("}"),this.consume("from");let K=this.consumeString();return{kind:"named",namedExport:f,source:K}}let q=this.consumeIdentifier().value;this.consume("from");let $=this.consumeString();return{kind:"default",defaultExport:q,source:$}}parseIdentifierArray(){this.consume("[");let _=[];while(!this.check("]"))if(_.push(this.consumeIdentifier().value),this.check(","))this.consume(",");return this.consume("]"),_}peek(){return this.tokens[this.pos]??{type:"EOF",value:"",loc:{line:0,col:0,offset:0}}}check(_){return this.peek().type===_}isEOF(){return this.check("EOF")}consume(_){let q=this.peek();if(q.type!==_)throw this.error("E030_EXPECTED_TOKEN",`Expected '${_}' but got '${q.value||q.type}'`,`Add the missing '${_}'`,q.loc);return this.pos++,q}consumeIdentifier(){let _=this.peek();if(_.type!=="IDENTIFIER"&&!Xq.has(_.type))throw this.error("E031_EXPECTED_IDENTIFIER",`Expected an identifier but got '${_.value||_.type}'`,"Provide a valid name (letters, digits, underscores)",_.loc);return this.pos++,_}consumeString(){let _=this.peek();if(_.type!=="STRING")throw this.error("E032_EXPECTED_STRING",`Expected a string but got '${_.value||_.type}'`,'Wrap the value in double quotes: "value"',_.loc);return this.pos++,_.value}error(_,q,$,f){return new S([{code:_,message:q,hint:$,...f!==void 0?{loc:f}:{}}])}}class yq{diagnostics=[];validate(_){if(this.checkAppExists(_),this.checkRouteTargets(_),this.checkCrudEntities(_),this.checkCrudOperations(_),this.checkRealtimeEntities(_),this.checkAuthMethods(_),this.checkQueryActionEntities(_),this.checkJobExecutors(_),this.checkDuplicateEntities(_),this.checkDuplicateRoutes(_),this.checkFieldTypes(_),this.diagnostics.length>0)throw new S(this.diagnostics)}checkAppExists(_){if(!_.app)this.diagnostics.push({code:"E100_MISSING_APP_BLOCK",message:"No app block found in main.vasp",hint:"Every Vasp project requires exactly one app { } block"})}checkRouteTargets(_){let q=new Set(_.pages.map(($)=>$.name));for(let $ of _.routes)if(!q.has($.to))this.diagnostics.push({code:"E101_UNKNOWN_PAGE_REF",message:`Route '${$.name}' references unknown page '${$.to}'`,hint:`Add a page block named '${$.to}', or fix the 'to' value in route '${$.name}'`,loc:$.loc})}checkCrudEntities(_){if(_.entities.length===0)return;let q=new Set(_.entities.map(($)=>$.name));for(let $ of _.cruds)if(!q.has($.entity))this.diagnostics.push({code:"E111_CRUD_ENTITY_NOT_DECLARED",message:`crud '${$.name}' references entity '${$.entity}' which has no entity block`,hint:`Add an entity block for '${$.entity}', or remove the crud block`,loc:$.loc})}checkCrudOperations(_){for(let q of _.cruds){if(q.operations.length===0)this.diagnostics.push({code:"E102_EMPTY_CRUD_OPERATIONS",message:`crud '${q.name}' has no operations`,hint:"Add at least one operation: operations: [list, create, update, delete]",loc:q.loc});for(let $ of q.operations)if(!K_.includes($))this.diagnostics.push({code:"E103_UNKNOWN_CRUD_OPERATION",message:`Unknown crud operation '${$}' in '${q.name}'`,hint:`Supported operations: ${K_.join(", ")}`,loc:q.loc})}}checkRealtimeEntities(_){let q=new Set(_.cruds.map(($)=>$.entity));for(let $ of _.realtimes){if(!q.has($.entity))this.diagnostics.push({code:"E104_REALTIME_ENTITY_NOT_CRUD",message:`realtime '${$.name}' references entity '${$.entity}' which has no crud block`,hint:`Add a crud block for entity '${$.entity}', or remove the realtime block`,loc:$.loc});for(let f of $.events)if(!P_.includes(f))this.diagnostics.push({code:"E105_UNKNOWN_REALTIME_EVENT",message:`Unknown realtime event '${f}' in '${$.name}'`,hint:`Supported events: ${P_.join(", ")}`,loc:$.loc})}}checkAuthMethods(_){if(!_.auth)return;if(_.auth.methods.length===0)this.diagnostics.push({code:"E106_EMPTY_AUTH_METHODS",message:`auth '${_.auth.name}' has no methods`,hint:"Add at least one method: methods: [usernameAndPassword]",loc:_.auth.loc});for(let q of _.auth.methods)if(!f_.includes(q))this.diagnostics.push({code:"E107_UNKNOWN_AUTH_METHOD",message:`Unknown auth method '${q}'`,hint:`Supported methods: ${f_.join(", ")}`,loc:_.auth.loc})}checkQueryActionEntities(_){let q=new Set([..._.cruds.map(($)=>$.entity),..._.entities.map(($)=>$.name)]);for(let $ of _.queries)for(let f of $.entities)if(!q.has(f))this.diagnostics.push({code:"E108_UNKNOWN_ENTITY_REF",message:`Query '${$.name}' references unknown entity '${f}'`,hint:`Add an entity or crud block for '${f}', or remove it from the entities list`,loc:$.loc});for(let $ of _.actions)for(let f of $.entities)if(!q.has(f))this.diagnostics.push({code:"E109_UNKNOWN_ENTITY_REF",message:`Action '${$.name}' references unknown entity '${f}'`,hint:`Add an entity or crud block for '${f}', or remove it from the entities list`,loc:$.loc})}checkJobExecutors(_){for(let q of _.jobs)if(q.executor!=="PgBoss")this.diagnostics.push({code:"E110_UNKNOWN_JOB_EXECUTOR",message:`Unknown job executor '${q.executor}' in '${q.name}'`,hint:"Supported executors: PgBoss",loc:q.loc})}checkDuplicateEntities(_){let q=new Set;for(let $ of _.entities){if(q.has($.name))this.diagnostics.push({code:"E112_DUPLICATE_ENTITY",message:`Duplicate entity '${$.name}'`,hint:"Each entity name must be unique",loc:$.loc});q.add($.name)}}checkDuplicateRoutes(_){let q=new Set;for(let $ of _.routes){if(q.has($.path))this.diagnostics.push({code:"E113_DUPLICATE_ROUTE_PATH",message:`Duplicate route path '${$.path}' in '${$.name}'`,hint:"Each route path must be unique",loc:$.loc});q.add($.path)}}checkFieldTypes(_){for(let q of _.entities)for(let $ of q.fields)if(!j_.includes($.type))this.diagnostics.push({code:"E114_INVALID_FIELD_TYPE",message:`Invalid field type '${$.type}' for field '${$.name}' in entity '${q.name}'`,hint:`Supported types: ${j_.join(", ")}`,loc:q.loc})}}function qq(_,q="main.vasp"){let $=t8(_,q);return new yq().validate($),$}import{join as j7,resolve as v7}from"path";import{existsSync as a8,mkdirSync as w7,readFileSync as O7}from"fs";import{join as Dq}from"path";import{existsSync as xq}from"fs";function kq(_){let q=Dq(_,"..","templates");if(xq(q))return q;let $=Dq(_,"..","..","..","..","templates");if(xq($))return $;throw Error(`Templates directory not found. Searched:
42
- ${q}
42
+ `}}class p$ extends u{run(){let{ast:q,ext:_}=this.ctx;if(q.jobs.length===0)return;this.ctx.logger.info("Generating background jobs..."),this.write(`server/jobs/boss.${_}`,this.render("shared/jobs/boss.hbs"));for(let $ of q.jobs){let f=$.perform.fn,K=f.kind==="named"?f.namedExport:f.defaultExport;this.write(`server/jobs/${p($.name)}.${_}`,this.render("shared/jobs/_job.hbs",{name:$.name,namedExport:K,fnSource:this.resolveServerImport(f.source,"server/jobs/"),schedule:$.schedule,hasSchedule:!!$.schedule})),this.write(`server/routes/jobs/${p($.name)}Schedule.${_}`,this.render("shared/server/routes/jobs/_schedule.hbs",{name:$.name}))}}}import{existsSync as U7}from"fs";import{join as F7}from"path";class n$ extends u{run(){let q=this.ctx.ast.middlewares??[];if(q.length===0)return;this.ctx.logger.info("Generating middleware stubs..."),this.generateSrcStubs(q.map((_)=>_.fn))}generateSrcStubs(q){for(let _ of q){if(!_.source.startsWith("@src/"))continue;let $=_.source.replace("@src/","src/");if(U7(F7(this.ctx.outputDir,$)))continue;let f=_.kind==="default"?`import { Elysia } from 'elysia'
43
+
44
+ export default new Elysia()
45
+ `:`import { Elysia } from 'elysia'
46
+
47
+ export const ${_.namedExport} = new Elysia()
48
+ `;this.write($,f)}}}import{existsSync as Q7}from"fs";import{join as qv}from"path";class o$ extends u{run(){let{ast:q,ext:_}=this.ctx;if(q.queries.length>0||q.actions.length>0)this.ctx.logger.info("Generating query/action routes...");for(let $ of q.queries){let f=$.fn,K=f.kind==="named"?f.namedExport:f.defaultExport,P=this.resolveServerImport(f.source,"server/routes/queries/");this.write(`server/routes/queries/${this.camel($.name)}.${_}`,this.render("shared/server/routes/queries/_query.hbs",{name:$.name,namedExport:K,fnSource:P,requiresAuth:$.auth,hasRoles:($.roles??[]).length>0,roles:$.roles??[]}))}for(let $ of q.actions){let f=$.fn,K=f.kind==="named"?f.namedExport:f.defaultExport,P=this.resolveServerImport(f.source,"server/routes/actions/");this.write(`server/routes/actions/${this.camel($.name)}.${_}`,this.render("shared/server/routes/actions/_action.hbs",{name:$.name,namedExport:K,fnSource:P,requiresAuth:$.auth,hasRoles:($.roles??[]).length>0,roles:$.roles??[]}))}this.generateSrcStubs(q.queries,"[]"),this.generateSrcStubs(q.actions,"{ success: true }")}generateSrcStubs(q,_){let $=new Map;for(let f of q){let{fn:K}=f;if(!K.source.startsWith("@src/"))continue;let P=K.kind==="named"?K.namedExport:K.defaultExport;if(!$.has(K.source))$.set(K.source,[]);$.get(K.source).push(P)}for(let[f,K]of $){let P=f.replace("@src/","src/");if(Q7(qv(this.ctx.outputDir,P)))continue;let j=K.map((v)=>`export async function ${v}({ db, user, args }) {
49
+ // TODO: implement
50
+ return ${_}
51
+ }`).join(`
52
+
53
+ `)+`
54
+ `;this.write(P,j)}}camel(q){return q.replace(/[-_\s]+(.)/g,(_,$)=>$.toUpperCase()).replace(/^./,(_)=>_.toLowerCase())}}class d$ extends u{run(){let{ast:q,ext:_}=this.ctx;if(q.realtimes.length===0)return;this.ctx.logger.info("Generating realtime WebSocket channels...");for(let $ of q.realtimes)this.write(`server/routes/realtime/${p($.name)}.${_}`,this.render("shared/server/routes/realtime/_channel.hbs",{name:$.name,entity:$.entity,events:$.events}));if(this.write(`server/routes/realtime/index.${_}`,this.render("shared/server/routes/realtime/index.hbs")),this.ctx.isSpa)this.write(`src/vasp/client/realtime.${_}`,this.render(`spa/${_}/src/vasp/client/realtime.${_}.hbs`))}}import{join as _v}from"path";class G$ extends u{run(){this.ctx.logger.info("Scaffolding project structure...");let q=["src/pages","src/components","src/lib","shared","drizzle","drizzle/migrations","server/routes/queries","server/routes/actions","server/middleware","server/db","tests","tests/crud","tests/auth","tests/queries","tests/actions",...this.ctx.isSpa?["src/vasp/client"]:["composables","plugins","pages","middleware"]];for(let K of q)x$(_v(this.ctx.outputDir,K));let _=this.ctx.isSpa?Hq:c$,$=this.render("shared/package.json.hbs",{vaspVersion:l,backendPort:V,frontendPort:_,authMethods:this.ctx.ast.auth?.methods??[]});this.write("package.json",$),this.write("bunfig.toml",this.render("shared/bunfig.toml.hbs")),this.write(".gitignore",this.render("shared/.gitignore.hbs"));let f={backendPort:V,frontendPort:_,authMethods:this.ctx.ast.auth?.methods??[]};if(this.write(".env.example",this.render("shared/.env.example.hbs",f)),this.write(".env",this.render("shared/.env.hbs",f)),this.write("README.md",this.render("shared/README.md.hbs",{backendPort:V})),this.ctx.isTypeScript)this.write("tsconfig.json",this.render("shared/tsconfig.json.hbs"));if(this.ctx.isTypeScript&&this.ctx.ast.entities.length>0)this.write("shared/types.ts",this.render("shared/shared/types.hbs",{entities:this.ctx.ast.entities}));if(this.ctx.ast.entities.length>0)this.write(`shared/validation.${this.ctx.ext}`,this.render("shared/shared/validation.hbs",{entities:this.ctx.ast.entities}));this.write(`vitest.config.${this.ctx.ext}`,this.render(`shared/tests/vitest.config.${this.ctx.ext}.hbs`)),this.write(`tests/setup.${this.ctx.ext}`,this.render(`shared/tests/setup.${this.ctx.ext}.hbs`));for(let K of this.ctx.ast.cruds)this.write(`tests/crud/${K.entity.toLowerCase()}.test.${this.ctx.ext}`,this.render(`shared/tests/crud/_entity.test.${this.ctx.ext}.hbs`,{entity:K.entity}));for(let K of this.ctx.ast.queries)this.write(`tests/queries/${K.name}.test.${this.ctx.ext}`,this.render(`shared/tests/queries/_query.test.${this.ctx.ext}.hbs`,{name:K.name}));for(let K of this.ctx.ast.actions)this.write(`tests/actions/${K.name}.test.${this.ctx.ext}`,this.render(`shared/tests/actions/_action.test.${this.ctx.ext}.hbs`,{name:K.name}));if(this.ctx.ast.auth)this.write(`tests/auth/login.test.${this.ctx.ext}`,this.render(`shared/tests/auth/login.test.${this.ctx.ext}.hbs`));this.write("main.vasp",this.generateMainVasp())}generateMainVasp(){let{ast:q}=this.ctx,_=this.ctx.ext,$=[`app ${q.app.name} {`,` title: "${q.app.title}"`,` db: ${q.app.db}`,` ssr: ${typeof q.app.ssr==="string"?`"${q.app.ssr}"`:q.app.ssr}`,` typescript: ${q.app.typescript}`,...q.app.env&&Object.keys(q.app.env).length>0?[" env: {",...Object.entries(q.app.env).map(([f,K])=>` ${f}: ${K}`)," }"]:[],"}",""];if(q.auth)$.push(`auth ${q.auth.name} {`,` userEntity: ${q.auth.userEntity}`,` methods: [ ${q.auth.methods.join(", ")} ]`,...q.auth.roles&&q.auth.roles.length>0?[` roles: [ ${q.auth.roles.join(", ")} ]`]:[],"}","");for(let f of q.routes)$.push(`route ${f.name} {`,` path: "${f.path}"`,` to: ${f.to}`,"}","");for(let f of q.pages){let K=f.component,P=K.kind==="default"?`import ${K.defaultExport} from "${K.source}"`:`import { ${K.namedExport} } from "${K.source}"`;$.push(`page ${f.name} {`,` component: ${P}`,"}","")}for(let f of q.entities){$.push(`entity ${f.name} {`);for(let K of f.fields){let P=K.modifiers.map((j)=>`@${j.replace("_","(").replace("default_now","default(now)")}`).join(" ");$.push(` ${K.name}: ${K.type}${P?" "+P:""}`)}$.push("}","")}for(let f of q.queries){let K=f.fn,P=K.kind==="named"?`import { ${K.namedExport} } from "${K.source}"`:`import ${K.defaultExport} from "${K.source}"`;$.push(`query ${f.name} {`,` fn: ${P}`,` entities: [${f.entities.join(", ")}]`,...f.auth?[" auth: true"]:[],...f.roles&&f.roles.length>0?[` roles: [${f.roles.join(", ")}]`]:[],"}","")}for(let f of q.actions){let K=f.fn,P=K.kind==="named"?`import { ${K.namedExport} } from "${K.source}"`:`import ${K.defaultExport} from "${K.source}"`;$.push(`action ${f.name} {`,` fn: ${P}`,` entities: [${f.entities.join(", ")}]`,...f.auth?[" auth: true"]:[],...f.roles&&f.roles.length>0?[` roles: [${f.roles.join(", ")}]`]:[],"}","")}for(let f of q.middlewares??[]){let K=f.fn,P=K.kind==="named"?`import { ${K.namedExport} } from "${K.source}"`:`import ${K.defaultExport} from "${K.source}"`;$.push(`middleware ${f.name} {`,` fn: ${P}`,` scope: ${f.scope}`,"}","")}for(let f of q.apis??[]){let K=f.fn,P=K.kind==="named"?`import { ${K.namedExport} } from "${K.source}"`:`import ${K.defaultExport} from "${K.source}"`;$.push(`api ${f.name} {`,` method: ${f.method}`,` path: "${f.path}"`,` fn: ${P}`,...f.auth?[" auth: true"]:[],...f.roles&&f.roles.length>0?[` roles: [${f.roles.join(", ")}]`]:[],"}","")}for(let f of q.cruds)$.push(`crud ${f.name} {`,` entity: ${f.entity}`,` operations: [${f.operations.join(", ")}]`,"}","");if(q.seed){let f=q.seed.fn,K=f.kind==="named"?`import { ${f.namedExport} } from "${f.source}"`:`import ${f.defaultExport} from "${f.source}"`;$.push("seed {",` fn: ${K}`,"}","")}return $.join(`
55
+ `)}}import{existsSync as $v}from"fs";import{join as fv}from"path";class b$ extends u{run(){let{seed:q,app:_}=this.ctx.ast;if(!q)return;this.ctx.logger.info("Generating seed runner...");let $=this.ctx.ext,f=q.fn,K=f.kind==="named"?f.namedExport:f.defaultExport,P=this.resolveServerImport(f.source,"server/db/");this.write(`server/db/seed.${$}`,this.render("shared/server/db/seed.hbs",{seedImportKind:f.kind,seedImportName:K,fnSource:P})),this.generateSeedStubIfMissing(f.source,K)}generateSeedStubIfMissing(q,_){if(!q.startsWith("@src/"))return;let $=q.replace("@src/","src/"),f=fv(this.ctx.outputDir,$);if($v(f))return;let K=this.ctx.isTypeScript?`export default async function ${_}(context: { db: unknown }): Promise<void> {
56
+ void context
57
+ }
58
+ `:`export default async function ${_}(context) {
59
+ void context
60
+ }
61
+ `;this.write($,K)}}import{createHash as Kv}from"crypto";import{existsSync as Pv,mkdirSync as jv,readFileSync as vv,writeFileSync as wv}from"fs";import{join as t$}from"path";var Pf=".vasp",jf="manifest.json";class fq{data;constructor(q){this.data={version:q,generatedAt:new Date().toISOString(),files:{}}}record(q,_,$){this.data.files[q]={hash:Nq(_),generator:$}}getEntry(q){return this.data.files[q]}hasFile(q){return q in this.data.files}get files(){return this.data.files}get version(){return this.data.version}save(q){let _=t$(q,Pf);jv(_,{recursive:!0}),wv(t$(_,jf),JSON.stringify(this.data,null,2),"utf8")}static load(q){let _=t$(q,Pf,jf);if(!Pv(_))return null;let $=vv(_,"utf8"),f=JSON.parse($),K=new fq(f.version);return K.data=f,K}}function Nq(q){return Kv("sha256").update(q,"utf8").digest("hex")}import{dirname as Ov,join as Yv}from"path";import{mkdirSync as hv}from"fs";function R(q,_){let $=E$(_.logLevel??"info"),f=_.outputDir,K=Yv(Ov(f),`.vasp-staging-${Date.now()}`);hv(K,{recursive:!0});let P=g$(q,K,{..._.templateDir!==void 0?{templateDir:_.templateDir}:{},logger:$}),j=new m$;j.loadDirectory(P.templateDir);let v=[],O=[],w=new fq(l);try{return new G$(P,j,v,w).run(),new A$(P,j,v,w).run(),new e_(P,j,v,w).run(),new b_(P,j,v,w).run(),new n$(P,j,v,w).run(),new o$(P,j,v,w).run(),new t_(P,j,v,w).run(),new u$(P,j,v,w).run(),new d$(P,j,v,w).run(),new p$(P,j,v,w).run(),new b$(P,j,v,w).run(),new X$(P,j,v,w).run(),L$(K,f,{preserveEnv:!0}),w.save(f),G_(K),$.info(`\u2713 Generated ${v.length} files`),{success:!0,filesWritten:v,errors:[],warnings:O}}catch(T){G_(K);let Y=T instanceof Error?T.message:String(T);return $.error(Y),{success:!1,filesWritten:v,errors:[Y],warnings:O}}}var lq=new Set(["app","auth","entity","route","page","query","action","api","middleware","crud","realtime","job","seed"]),vf=new Set([...lq,"import","from"]);class w_{source;filename;pos=0;line=1;col=1;tokens=[];constructor(q,_="main.vasp"){this.source=q;this.filename=_}tokenize(){while(this.pos<this.source.length){if(this.skipWhitespaceAndComments(),this.pos>=this.source.length)break;this.scanToken()}return this.tokens.push({type:"EOF",value:"",loc:{line:this.line,col:this.col,offset:this.pos,file:this.filename}}),this.tokens}loc(){return{line:this.line,col:this.col,offset:this.pos,file:this.filename}}peek(q=0){return this.source[this.pos+q]??""}advance(){let q=this.source[this.pos++]??"";if(q===`
62
+ `)this.line++,this.col=1;else this.col++;return q}skipWhitespaceAndComments(){while(this.pos<this.source.length){let q=this.peek();if(q===" "||q==="\t"||q==="\r"||q===`
63
+ `){this.advance();continue}if(q==="/"&&this.peek(1)==="/"){while(this.pos<this.source.length&&this.peek()!==`
64
+ `)this.advance();continue}if(q==="/"&&this.peek(1)==="*"){let _=this.loc();this.advance(),this.advance();let $=!1;while(this.pos<this.source.length){if(this.peek()==="*"&&this.peek(1)==="/"){this.advance(),this.advance(),$=!0;break}this.advance()}if(!$)throw new t([{code:"E001_UNCLOSED_BLOCK_COMMENT",message:"Unclosed block comment",hint:"Add */ to close the block comment",loc:_}]);continue}break}}scanToken(){let q=this.peek(),$={"{":"{","}":"}","[":"[","]":"]","(":"(",")":")",":":":",",":","}[q];if($!==void 0){let f=this.loc();this.advance(),this.tokens.push({type:$,value:q,loc:f});return}if(q==="@"){this.scanModifier();return}if(q==='"'||q==="'"){this.scanString(q);return}if(q>="0"&&q<="9"){this.scanNumber();return}if(q==="_"||q>="a"&&q<="z"||q>="A"&&q<="Z"){this.scanIdentifierOrKeyword();return}throw new t([{code:"E002_UNEXPECTED_CHAR",message:`Unexpected character: '${q}'`,hint:"Check for typos or unsupported syntax in your .vasp file",loc:this.loc()}])}scanModifier(){let q=this.loc();this.advance();let _="";while(this.pos<this.source.length){let f=this.peek();if(f>="a"&&f<="z"||f>="A"&&f<="Z"||f==="_")_+=this.advance();else break}let $=_;if((_==="default"||_==="onDelete")&&this.peek()==="("){let f=this.loc();this.advance();let K="";while(this.pos<this.source.length&&this.peek()!==")"){let j=this.peek();if(j==='"'||j==="'"){this.advance();while(this.pos<this.source.length&&this.peek()!==j&&this.peek()!==")")K+=this.advance();if(this.peek()===j)this.advance()}else K+=this.advance()}if(this.peek()!==")")throw new t([{code:"E004_UNCLOSED_MODIFIER_ARG",message:`Unclosed '(' in @${_} modifier \u2014 expected ')'`,hint:`Add a closing ')' to complete the @${_}(...) modifier`,loc:f}]);this.advance();let P=K.trim();if(_==="default")$=P==="now"?"default_now":`default_${P}`;else $=`onDelete_${P}`}this.tokens.push({type:"AT_MODIFIER",value:$,loc:q})}scanString(q){let _=this.loc();this.advance();let $="";while(this.pos<this.source.length&&this.peek()!==q){if(this.peek()===`
65
+ `)throw new t([{code:"E003_UNTERMINATED_STRING",message:"Unterminated string literal",hint:"Close the string with a matching quote on the same line",loc:_}]);if(this.peek()==="\\"){this.advance();let f=this.advance();$+=this.unescape(f)}else $+=this.advance()}if(this.pos>=this.source.length)throw new t([{code:"E003_UNTERMINATED_STRING",message:"Unterminated string literal",hint:"Close the string with a matching quote",loc:_}]);this.advance(),this.tokens.push({type:"STRING",value:$,loc:_})}unescape(q){return{n:`
66
+ `,t:"\t",r:"\r",'"':'"',"'":"'","\\":"\\"}[q]??q}scanNumber(){let q=this.loc(),_="";while(this.pos<this.source.length&&this.peek()>="0"&&this.peek()<="9")_+=this.advance();if(this.peek()==="."&&this.peek(1)>="0"&&this.peek(1)<="9"){_+=this.advance();while(this.pos<this.source.length&&this.peek()>="0"&&this.peek()<="9")_+=this.advance()}this.tokens.push({type:"NUMBER",value:_,loc:q})}scanIdentifierOrKeyword(){let q=this.loc(),_="";while(this.pos<this.source.length){let $=this.peek();if($>="a"&&$<="z"||$>="A"&&$<="Z"||$>="0"&&$<="9"||$==="_"||$==="-")_+=this.advance();else break}if(vf.has(_)){if(lq.has(_))this.tokens.push({type:_,value:_,loc:q});else if(_==="import")this.tokens.push({type:"import",value:_,loc:q});else if(_==="from")this.tokens.push({type:"from",value:_,loc:q});else this.tokens.push({type:"IDENTIFIER",value:_,loc:q});return}if(_==="true"||_==="false"){this.tokens.push({type:"BOOLEAN",value:_,loc:q});return}this.tokens.push({type:"IDENTIFIER",value:_,loc:q})}}function Of(q,_="main.vasp"){let $=new w_(q,_).tokenize();return new Yf($,_).parse()}function Tv(q){let _=q.match(/:([^/]+)/g);return _?_.map(($)=>$.slice(1)):[]}class Yf{tokens;filename;pos=0;constructor(q,_){this.tokens=q;this.filename=_}parse(){let q={app:null,entities:[],routes:[],pages:[],queries:[],actions:[],cruds:[],realtimes:[],jobs:[]};while(!this.isEOF()){let _=this.peek();switch(_.type){case"app":q.app=this.parseApp();break;case"auth":q.auth=this.parseAuth();break;case"entity":q.entities.push(this.parseEntity());break;case"route":q.routes.push(this.parseRoute());break;case"page":q.pages.push(this.parsePage());break;case"query":q.queries.push(this.parseQuery());break;case"action":q.actions.push(this.parseAction());break;case"middleware":(q.middlewares??=[]).push(this.parseMiddleware());break;case"api":(q.apis??=[]).push(this.parseApi());break;case"crud":q.cruds.push(this.parseCrud());break;case"realtime":q.realtimes.push(this.parseRealtime());break;case"job":q.jobs.push(this.parseJob());break;case"seed":if(q.seed)throw this.error("E040_DUPLICATE_SEED_BLOCK","Duplicate seed block found","Only one seed block is allowed in main.vasp",_.loc);q.seed=this.parseSeed();break;default:throw this.error("E010_UNEXPECTED_TOKEN",`Unexpected token '${_.value}' at top level`,"Expected a declaration keyword: app, auth, entity, route, page, query, action, api, middleware, crud, realtime, job, or seed",_.loc)}}return q}parseApp(){let q=this.consume("app").loc,_=this.consumeIdentifier();this.consume("{");let $="",f="Drizzle",K=!1,P=!1,j={};while(!this.check("}")){let v=this.consumeIdentifier();switch(this.consume(":"),v.value){case"title":$=this.consumeString();break;case"db":f=this.consumeIdentifier().value;break;case"ssr":{let O=this.peek();if(O.type==="BOOLEAN")K=this.consume("BOOLEAN").value==="true";else if(O.type==="STRING"){let w=this.consumeString();if(w!=="ssg")throw this.error("E011_INVALID_SSR",`Invalid ssr value "${w}"`,'Use: false, true, or "ssg"',O.loc);K="ssg"}else throw this.error("E011_INVALID_SSR","Invalid ssr value",'Use: false, true, or "ssg"',O.loc);break}case"typescript":P=this.consume("BOOLEAN").value==="true";break;case"env":{this.consume("{");while(!this.check("}")){let O=this.consumeIdentifier().value;this.consume(":");let w=this.consumeIdentifier().value;if(w!=="required"&&w!=="optional")throw this.error("E038_INVALID_ENV_REQUIREMENT",`Invalid env requirement '${w}' for '${O}'`,"Use required or optional",this.peek().loc);if(O in j)throw this.error("E039_DUPLICATE_ENV_KEY",`Duplicate env key '${O}' in app.env`,"Each env key must be declared once",this.peek().loc);if(j[O]=w,this.check(","))this.consume(",")}this.consume("}");break}default:throw this.error("E012_UNKNOWN_PROP",`Unknown app property '${v.value}'`,"Valid properties: title, db, ssr, typescript, env",v.loc)}}return this.consume("}"),{type:"App",name:_.value,loc:q,title:$,db:f,ssr:K,typescript:P,...Object.keys(j).length>0?{env:j}:{}}}parseAuth(){let q=this.consume("auth").loc,_=this.consumeIdentifier();this.consume("{");let $="",f=[],K=[];while(!this.check("}")){let P=this.consumeIdentifier();switch(this.consume(":"),P.value){case"userEntity":$=this.consumeIdentifier().value;break;case"methods":f=this.parseIdentifierArray();break;case"roles":K=this.parseIdentifierArray();break;default:throw this.error("E013_UNKNOWN_PROP",`Unknown auth property '${P.value}'`,"Valid properties: userEntity, methods, roles",P.loc)}}return this.consume("}"),{type:"Auth",name:_.value,loc:q,userEntity:$,methods:f,...K.length>0?{roles:K}:{}}}parseEntity(){let q=this.consume("entity").loc,_=this.consumeIdentifier();this.consume("{");let $=new Set(["String","Int","Boolean","DateTime","Float","Text","Json","Enum"]),f=[];while(!this.check("}")){let K=this.consumeIdentifier();this.consume(":");let P=this.consumeIdentifier(),j=P.value,v;if(j==="Enum"){this.consume("("),v=[];while(!this.check(")"))if(v.push(this.consumeIdentifier().value),this.check(","))this.consume(",");if(this.consume(")"),v.length===0)throw this.error("E116_EMPTY_ENUM",`Enum field '${K.value}' must have at least one variant`,"Example: status: Enum(active, inactive, archived)",P.loc)}let O=!1;if(this.check("["))this.consume("["),this.consume("]"),O=!0;let w=!$.has(j),T=[],Y=!1,k,z,Z=!1;while(this.check("AT_MODIFIER")){let m=this.consume("AT_MODIFIER").value;if(m==="id")T.push("id");else if(m==="unique")T.push("unique");else if(m==="default_now")T.push("default_now"),k="now";else if(m==="nullable")Y=!0,T.push("nullable");else if(m==="updatedAt")Z=!0,T.push("updatedAt");else if(m.startsWith("default_"))k=m.slice(8);else if(m.startsWith("onDelete_"))z=m.slice(9)}let r={name:K.value,type:j,modifiers:T,isRelation:w,isArray:O,nullable:Y,isUpdatedAt:Z};if(w)r.relatedEntity=j;if(k!==void 0)r.defaultValue=k;if(z!==void 0)r.onDelete=z;if(v!==void 0)r.enumValues=v;f.push(r)}return this.consume("}"),{type:"Entity",name:_.value,loc:q,fields:f}}parseRoute(){let q=this.consume("route").loc,_=this.consumeIdentifier();this.consume("{");let $="",f="";while(!this.check("}")){let P=this.consumeIdentifier();switch(this.consume(":"),P.value){case"path":$=this.consumeString();break;case"to":f=this.consumeIdentifier().value;break;default:throw this.error("E014_UNKNOWN_PROP",`Unknown route property '${P.value}'`,"Valid properties: path, to",P.loc)}}this.consume("}");let K=Tv($);return{type:"Route",name:_.value,loc:q,path:$,to:f,params:K}}parsePage(){let q=this.consume("page").loc,_=this.consumeIdentifier();this.consume("{");let $=null;while(!this.check("}")){let f=this.consumeIdentifier();switch(this.consume(":"),f.value){case"component":$=this.parseImportExpression();break;default:throw this.error("E015_UNKNOWN_PROP",`Unknown page property '${f.value}'`,"Valid properties: component",f.loc)}}if(this.consume("}"),!$)throw this.error("E016_MISSING_COMPONENT",`Page '${_.value}' is missing a component`,'Add: component: import Foo from "@src/pages/Foo.vue"',q);return{type:"Page",name:_.value,loc:q,component:$}}parseQuery(){let q=this.consume("query").loc,_=this.consumeIdentifier();this.consume("{");let $=null,f=[],K=!1,P=[];while(!this.check("}")){let j=this.consumeIdentifier();switch(this.consume(":"),j.value){case"fn":$=this.parseImportExpression();break;case"entities":f=this.parseIdentifierArray();break;case"auth":K=this.consume("BOOLEAN").value==="true";break;case"roles":P=this.parseIdentifierArray();break;default:throw this.error("E017_UNKNOWN_PROP",`Unknown query property '${j.value}'`,"Valid properties: fn, entities, auth, roles",j.loc)}}if(this.consume("}"),!$)throw this.error("E018_MISSING_FN",`Query '${_.value}' is missing fn`,'Add: fn: import { myFn } from "@src/queries.js"',q);return{type:"Query",name:_.value,loc:q,fn:$,entities:f,auth:K,...P.length>0?{roles:P}:{}}}parseAction(){let q=this.consume("action").loc,_=this.consumeIdentifier();this.consume("{");let $=null,f=[],K=!1,P=[];while(!this.check("}")){let j=this.consumeIdentifier();switch(this.consume(":"),j.value){case"fn":$=this.parseImportExpression();break;case"entities":f=this.parseIdentifierArray();break;case"auth":K=this.consume("BOOLEAN").value==="true";break;case"roles":P=this.parseIdentifierArray();break;default:throw this.error("E019_UNKNOWN_PROP",`Unknown action property '${j.value}'`,"Valid properties: fn, entities, auth, roles",j.loc)}}if(this.consume("}"),!$)throw this.error("E020_MISSING_FN",`Action '${_.value}' is missing fn`,'Add: fn: import { myFn } from "@src/actions.js"',q);return{type:"Action",name:_.value,loc:q,fn:$,entities:f,auth:K,...P.length>0?{roles:P}:{}}}parseCrud(){let q=this.consume("crud").loc,_=this.consumeIdentifier();this.consume("{");let $="",f=[];while(!this.check("}")){let K=this.consumeIdentifier();switch(this.consume(":"),K.value){case"entity":$=this.consumeIdentifier().value;break;case"operations":f=this.parseIdentifierArray();break;default:throw this.error("E021_UNKNOWN_PROP",`Unknown crud property '${K.value}'`,"Valid properties: entity, operations",K.loc)}}return this.consume("}"),{type:"Crud",name:_.value,loc:q,entity:$,operations:f}}parseApi(){let q=this.consume("api").loc,_=this.consumeIdentifier();this.consume("{");let $="GET",f="",K=null,P=!1,j=[];while(!this.check("}")){let v=this.consumeIdentifier();switch(this.consume(":"),v.value){case"method":$=this.consumeIdentifier().value.toUpperCase();break;case"path":f=this.consumeString();break;case"fn":K=this.parseImportExpression();break;case"auth":P=this.consume("BOOLEAN").value==="true";break;case"roles":j=this.parseIdentifierArray();break;default:throw this.error("E033_UNKNOWN_PROP",`Unknown api property '${v.value}'`,"Valid properties: method, path, fn, auth, roles",v.loc)}}if(this.consume("}"),!K)throw this.error("E034_MISSING_FN",`Api '${_.value}' is missing fn`,'Add: fn: import { myHandler } from "@src/api.js"',q);if(!f)throw this.error("E035_MISSING_PATH",`Api '${_.value}' is missing path`,'Add: path: "/api/my-endpoint"',q);return{type:"Api",name:_.value,loc:q,method:$,path:f,fn:K,auth:P,...j.length>0?{roles:j}:{}}}parseMiddleware(){let q=this.consume("middleware").loc,_=this.consumeIdentifier();this.consume("{");let $=null,f="global";while(!this.check("}")){let K=this.consumeIdentifier();switch(this.consume(":"),K.value){case"fn":$=this.parseImportExpression();break;case"scope":f=this.consumeIdentifier().value;break;default:throw this.error("E036_UNKNOWN_PROP",`Unknown middleware property '${K.value}'`,"Valid properties: fn, scope",K.loc)}}if(this.consume("}"),!$)throw this.error("E037_MISSING_FN",`Middleware '${_.value}' is missing fn`,'Add: fn: import logger from "@src/middleware/logger.js"',q);return{type:"Middleware",name:_.value,loc:q,fn:$,scope:f}}parseRealtime(){let q=this.consume("realtime").loc,_=this.consumeIdentifier();this.consume("{");let $="",f=[];while(!this.check("}")){let K=this.consumeIdentifier();switch(this.consume(":"),K.value){case"entity":$=this.consumeIdentifier().value;break;case"events":f=this.parseIdentifierArray();break;default:throw this.error("E022_UNKNOWN_PROP",`Unknown realtime property '${K.value}'`,"Valid properties: entity, events",K.loc)}}return this.consume("}"),{type:"Realtime",name:_.value,loc:q,entity:$,events:f}}parseJob(){let q=this.consume("job").loc,_=this.consumeIdentifier();this.consume("{");let $="PgBoss",f=null,K;while(!this.check("}")){let P=this.consumeIdentifier();switch(this.consume(":"),P.value){case"executor":$=this.consumeIdentifier().value;break;case"perform":{this.consume("{");while(!this.check("}")){let j=this.consumeIdentifier();if(this.consume(":"),j.value==="fn")f=this.parseImportExpression();else throw this.error("E023_UNKNOWN_PROP",`Unknown perform property '${j.value}'`,"Valid properties: fn",j.loc)}this.consume("}");break}case"schedule":K=this.consumeString();break;default:throw this.error("E024_UNKNOWN_PROP",`Unknown job property '${P.value}'`,"Valid properties: executor, perform, schedule",P.loc)}}if(this.consume("}"),!f)throw this.error("E025_MISSING_PERFORM",`Job '${_.value}' is missing perform.fn`,'Add: perform: { fn: import { myJob } from "@src/jobs.js" }',q);return{type:"Job",name:_.value,loc:q,executor:$,perform:{fn:f},...K!==void 0?{schedule:K}:{}}}parseSeed(){let q=this.consume("seed").loc;this.consume("{");let _=null;while(!this.check("}")){let $=this.consumeIdentifier();switch(this.consume(":"),$.value){case"fn":_=this.parseImportExpression();break;default:throw this.error("E041_UNKNOWN_PROP",`Unknown seed property '${$.value}'`,"Valid properties: fn",$.loc)}}if(this.consume("}"),!_)throw this.error("E042_MISSING_FN","Seed block is missing fn",'Add: fn: import seedData from "@src/seed.js"',q);return{type:"Seed",fn:_,loc:q}}parseImportExpression(){let q=this.consume("import").loc;if(this.check("{")){this.consume("{");let f=this.consumeIdentifier().value;this.consume("}"),this.consume("from");let K=this.consumeString();return{kind:"named",namedExport:f,source:K}}let _=this.consumeIdentifier().value;this.consume("from");let $=this.consumeString();return{kind:"default",defaultExport:_,source:$}}parseIdentifierArray(){this.consume("[");let q=[];while(!this.check("]"))if(q.push(this.consumeIdentifier().value),this.check(","))this.consume(",");return this.consume("]"),q}peek(){return this.tokens[this.pos]??{type:"EOF",value:"",loc:{line:0,col:0,offset:0}}}check(q){return this.peek().type===q}isEOF(){return this.check("EOF")}consume(q){let _=this.peek();if(_.type!==q)throw this.error("E030_EXPECTED_TOKEN",`Expected '${q}' but got '${_.value||_.type}'`,`Add the missing '${q}'`,_.loc);return this.pos++,_}consumeIdentifier(){let q=this.peek();if(q.type!=="IDENTIFIER"&&!lq.has(q.type))throw this.error("E031_EXPECTED_IDENTIFIER",`Expected an identifier but got '${q.value||q.type}'`,"Provide a valid name (letters, digits, underscores)",q.loc);return this.pos++,q}consumeString(){let q=this.peek();if(q.type!=="STRING")throw this.error("E032_EXPECTED_STRING",`Expected a string but got '${q.value||q.type}'`,'Wrap the value in double quotes: "value"',q.loc);return this.pos++,q.value}error(q,_,$,f){return new t([{code:q,message:_,hint:$,...f!==void 0?{loc:f}:{}}])}}class O_{diagnostics=[];validate(q){if(this.checkAppExists(q),this.checkRouteTargets(q),this.checkCrudEntities(q),this.checkCrudOperations(q),this.checkRealtimeEntities(q),this.checkAuthMethods(q),this.checkRoleConfiguration(q),this.checkQueryActionEntities(q),this.checkApiMethods(q),this.checkMiddlewareScopes(q),this.checkEnvSchema(q),this.checkJobExecutors(q),this.checkDuplicateEntities(q),this.checkDuplicateRoutes(q),this.checkFieldTypes(q),this.diagnostics.length>0)throw new t(this.diagnostics)}checkAppExists(q){if(!q.app)this.diagnostics.push({code:"E100_MISSING_APP_BLOCK",message:"No app block found in main.vasp",hint:"Every Vasp project requires exactly one app { } block"})}checkRouteTargets(q){let _=new Set(q.pages.map(($)=>$.name));for(let $ of q.routes)if(!_.has($.to))this.diagnostics.push({code:"E101_UNKNOWN_PAGE_REF",message:`Route '${$.name}' references unknown page '${$.to}'`,hint:`Add a page block named '${$.to}', or fix the 'to' value in route '${$.name}'`,loc:$.loc})}checkCrudEntities(q){if(q.entities.length===0)return;let _=new Set(q.entities.map(($)=>$.name));for(let $ of q.cruds)if(!_.has($.entity))this.diagnostics.push({code:"E111_CRUD_ENTITY_NOT_DECLARED",message:`crud '${$.name}' references entity '${$.entity}' which has no entity block`,hint:`Add an entity block for '${$.entity}', or remove the crud block`,loc:$.loc})}checkCrudOperations(q){for(let _ of q.cruds){if(_.operations.length===0)this.diagnostics.push({code:"E102_EMPTY_CRUD_OPERATIONS",message:`crud '${_.name}' has no operations`,hint:"Add at least one operation: operations: [list, create, update, delete]",loc:_.loc});for(let $ of _.operations)if(!n_.includes($))this.diagnostics.push({code:"E103_UNKNOWN_CRUD_OPERATION",message:`Unknown crud operation '${$}' in '${_.name}'`,hint:`Supported operations: ${n_.join(", ")}`,loc:_.loc})}}checkRealtimeEntities(q){let _=new Set(q.cruds.map(($)=>$.entity));for(let $ of q.realtimes){if(!_.has($.entity))this.diagnostics.push({code:"E104_REALTIME_ENTITY_NOT_CRUD",message:`realtime '${$.name}' references entity '${$.entity}' which has no crud block`,hint:`Add a crud block for entity '${$.entity}', or remove the realtime block`,loc:$.loc});for(let f of $.events)if(!o_.includes(f))this.diagnostics.push({code:"E105_UNKNOWN_REALTIME_EVENT",message:`Unknown realtime event '${f}' in '${$.name}'`,hint:`Supported events: ${o_.join(", ")}`,loc:$.loc})}}checkAuthMethods(q){if(!q.auth)return;if(q.auth.methods.length===0)this.diagnostics.push({code:"E106_EMPTY_AUTH_METHODS",message:`auth '${q.auth.name}' has no methods`,hint:"Add at least one method: methods: [usernameAndPassword]",loc:q.auth.loc});for(let _ of q.auth.methods)if(!A_.includes(_))this.diagnostics.push({code:"E107_UNKNOWN_AUTH_METHOD",message:`Unknown auth method '${_}'`,hint:`Supported methods: ${A_.join(", ")}`,loc:q.auth.loc})}checkRoleConfiguration(q){let _=new Set(q.auth?.roles??[]);if((q.auth?.roles??[]).length===0){for(let $ of q.queries)if(($.roles??[]).length>0)this.diagnostics.push({code:"E118_ROLES_WITHOUT_AUTH_CONFIG",message:`Query '${$.name}' declares roles but auth.roles is not configured`,hint:"Define roles in auth block: roles: [admin, ...]",loc:$.loc});for(let $ of q.actions)if(($.roles??[]).length>0)this.diagnostics.push({code:"E118_ROLES_WITHOUT_AUTH_CONFIG",message:`Action '${$.name}' declares roles but auth.roles is not configured`,hint:"Define roles in auth block: roles: [admin, ...]",loc:$.loc});for(let $ of q.apis??[])if(($.roles??[]).length>0)this.diagnostics.push({code:"E118_ROLES_WITHOUT_AUTH_CONFIG",message:`Api '${$.name}' declares roles but auth.roles is not configured`,hint:"Define roles in auth block: roles: [admin, ...]",loc:$.loc})}for(let $ of q.queries){if(($.roles??[]).length>0&&!$.auth)this.diagnostics.push({code:"E119_ROLES_REQUIRE_AUTH",message:`Query '${$.name}' declares roles but auth is false`,hint:"Set auth: true when using roles",loc:$.loc});for(let f of $.roles??[])if(!_.has(f))this.diagnostics.push({code:"E120_UNKNOWN_ROLE_REF",message:`Query '${$.name}' references unknown role '${f}'`,hint:`Define '${f}' in auth.roles`,loc:$.loc})}for(let $ of q.actions){if(($.roles??[]).length>0&&!$.auth)this.diagnostics.push({code:"E119_ROLES_REQUIRE_AUTH",message:`Action '${$.name}' declares roles but auth is false`,hint:"Set auth: true when using roles",loc:$.loc});for(let f of $.roles??[])if(!_.has(f))this.diagnostics.push({code:"E120_UNKNOWN_ROLE_REF",message:`Action '${$.name}' references unknown role '${f}'`,hint:`Define '${f}' in auth.roles`,loc:$.loc})}for(let $ of q.apis??[]){if(($.roles??[]).length>0&&!$.auth)this.diagnostics.push({code:"E119_ROLES_REQUIRE_AUTH",message:`Api '${$.name}' declares roles but auth is false`,hint:"Set auth: true when using roles",loc:$.loc});for(let f of $.roles??[])if(!_.has(f))this.diagnostics.push({code:"E120_UNKNOWN_ROLE_REF",message:`Api '${$.name}' references unknown role '${f}'`,hint:`Define '${f}' in auth.roles`,loc:$.loc})}}checkQueryActionEntities(q){let _=new Set([...q.cruds.map(($)=>$.entity),...q.entities.map(($)=>$.name)]);for(let $ of q.queries)for(let f of $.entities)if(!_.has(f))this.diagnostics.push({code:"E108_UNKNOWN_ENTITY_REF",message:`Query '${$.name}' references unknown entity '${f}'`,hint:`Add an entity or crud block for '${f}', or remove it from the entities list`,loc:$.loc});for(let $ of q.actions)for(let f of $.entities)if(!_.has(f))this.diagnostics.push({code:"E109_UNKNOWN_ENTITY_REF",message:`Action '${$.name}' references unknown entity '${f}'`,hint:`Add an entity or crud block for '${f}', or remove it from the entities list`,loc:$.loc})}checkJobExecutors(q){for(let _ of q.jobs)if(_.executor!=="PgBoss")this.diagnostics.push({code:"E110_UNKNOWN_JOB_EXECUTOR",message:`Unknown job executor '${_.executor}' in '${_.name}'`,hint:"Supported executors: PgBoss",loc:_.loc})}checkApiMethods(q){let _=new Set;for(let $ of q.apis??[]){if(!X_.includes($.method))this.diagnostics.push({code:"E116_UNKNOWN_API_METHOD",message:`Unknown API method '${$.method}' in '${$.name}'`,hint:`Supported methods: ${X_.join(", ")}`,loc:$.loc});let f=`${$.method} ${$.path}`;if(_.has(f))this.diagnostics.push({code:"E117_DUPLICATE_API_ENDPOINT",message:`Duplicate api endpoint '${f}' in '${$.name}'`,hint:"Each API endpoint must have a unique method + path combination",loc:$.loc});_.add(f)}}checkMiddlewareScopes(q){for(let _ of q.middlewares??[])if(!p_.includes(_.scope))this.diagnostics.push({code:"E121_UNKNOWN_MIDDLEWARE_SCOPE",message:`Unknown middleware scope '${_.scope}' in '${_.name}'`,hint:`Supported scopes: ${p_.join(", ")}`,loc:_.loc})}checkEnvSchema(q){let _=q.app?.env??{},$=/^[A-Z][A-Z0-9_]*$/;for(let f of Object.keys(_))if(!$.test(f))this.diagnostics.push({code:"E122_INVALID_ENV_KEY",message:`Invalid env key '${f}' in app.env`,hint:"Use uppercase env names like DATABASE_URL or JWT_SECRET",loc:q.app.loc})}checkDuplicateEntities(q){let _=new Set;for(let $ of q.entities){if(_.has($.name))this.diagnostics.push({code:"E112_DUPLICATE_ENTITY",message:`Duplicate entity '${$.name}'`,hint:"Each entity name must be unique",loc:$.loc});_.add($.name)}}checkDuplicateRoutes(q){let _=new Set;for(let $ of q.routes){if(_.has($.path))this.diagnostics.push({code:"E113_DUPLICATE_ROUTE_PATH",message:`Duplicate route path '${$.path}' in '${$.name}'`,hint:"Each route path must be unique",loc:$.loc});_.add($.path)}}checkFieldTypes(q){let _=new Set(q.entities.map(($)=>$.name));for(let $ of q.entities)for(let f of $.fields)if(f.isRelation){if(f.relatedEntity&&!_.has(f.relatedEntity))this.diagnostics.push({code:"E115_UNDEFINED_RELATION_ENTITY",message:`Field '${f.name}' in entity '${$.name}' references undefined entity '${f.relatedEntity}'`,hint:`Add an entity block for '${f.relatedEntity}', or use a primitive type: ${Dq.join(", ")}`,loc:$.loc})}else if(!Dq.includes(f.type))this.diagnostics.push({code:"E114_INVALID_FIELD_TYPE",message:`Invalid field type '${f.type}' for field '${f.name}' in entity '${$.name}'`,hint:`Supported types: ${Dq.join(", ")}`,loc:$.loc})}}var i={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",yellow:"\x1B[33m",cyan:"\x1B[36m",white:"\x1B[37m",bgRed:"\x1B[41m"},hf=globalThis.process,kv=hf?.env?.NO_COLOR!==void 0||!hf?.stdout?.isTTY;function E(q,_){return kv?_:`${q}${_}${i.reset}`}function e$(q,_,$="main.vasp"){let f=_.split(`
67
+ `);return q.map((K)=>zv(K,f,$)).join(`
68
+
69
+ `)}function zv(q,_,$){let f=E(i.red+i.bold,`error[${q.code}]`)+E(i.bold,`: ${q.message}`);if(!q.loc||q.loc.line===0){let o=` ${E(i.cyan,"= hint:")} ${q.hint}`;return`${f}
70
+ ${o}`}let{line:K,col:P}=q.loc,j=K,v=P,O=_[j-1]??"",w=j>1?_[j-2]:null,T=_[j]??null,Y=String(j+(T?1:0)).length,k=(o)=>String(o).padStart(Y," "),z=E(i.cyan,"|"),Z=` ${E(i.cyan,"-->")} ${$}:${j}:${v}`,r=`${k("")} ${z}`,W=[f,Z,` ${r}`];if(w!==null)W.push(` ${E(i.dim,`${k(j-1)} |`)} ${w}`);W.push(` ${E(i.cyan,`${k(j)} |`)} ${O}`);let m=Math.max(0,v-1),C=Hv(O,m),kq=" ".repeat(m)+E(i.red+i.bold,"^".repeat(C));if(W.push(` ${k("")} ${z} ${kq}`),T!==null&&T.trim()!=="")W.push(` ${E(i.dim,`${k(j+1)} |`)} ${T}`);return W.push(` ${r}`),W.push(` ${E(i.cyan,"= hint:")} ${q.hint}`),W.join(`
71
+ `)}function Hv(q,_){let $=q.slice(_),f=$.match(/^[A-Za-z_][\w]*/);if(f)return f[0].length;let K=$.match(/^["'][^"']*["']/);if(K)return K[0].length;return Math.max(1,$.match(/^\S+/)?.[0].length??1)}function g(q,_="main.vasp"){let $=Of(q,_);return new O_().validate($),$}import{join as Wv,resolve as Jv}from"path";import{existsSync as kf,mkdirSync as Zv,readFileSync as rv}from"fs";function Kq(q,_,$="main.vasp"){if(q instanceof t){let f=e$(q.diagnostics,_,$);console.error(`
72
+ `+f+`
73
+ `),console.error(`\x1B[31m\x1B[1mAborted:\x1B[0m Found ${q.diagnostics.length} error${q.diagnostics.length===1?"":"s"} in ${$}
74
+ `)}else h.error(`Failed to parse ${$}: ${String(q)}`);process.exit(1)}import{join as Y_}from"path";import{existsSync as h_}from"fs";function U(q){let _=Y_(q,"..","templates");if(h_(_))return _;let $=Y_(q,"..","..","..","..","templates");if(h_($))return $;throw Error(`Templates directory not found. Searched:
75
+ ${_}
43
76
  ${$}
44
- Run 'bun run build' inside packages/cli to copy templates.`)}function i8(_){let q=Dq(_,"..","starters");if(xq(q))return q;let $=Dq(_,"..","..","starters");if(xq($))return $;throw Error(`Starters directory not found. Searched:
45
- ${q}
46
- ${$}`)}var Y7=i8(import.meta.dirname),b8=["minimal","todo","todo-auth-ssr","recipe"];async function S8(_){let q=_[0];if(!q)T.error("Please provide a project name: vasp new <project-name>"),process.exit(1);let $=h7(_.slice(1)),f=v7(process.cwd(),q);if(a8(f))T.error(`Directory '${q}' already exists`),process.exit(1);T.step(`Creating Vasp app: ${q}`),T.info(`Version: ${I}`);let K;if($.starter){if(!b8.includes($.starter))T.error(`Unknown starter '${$.starter}'. Available: ${b8.join(", ")}`),process.exit(1);let O=j7(Y7,`${$.starter}.vasp`);if(!a8(O))T.error(`Starter file not found: ${O}`),process.exit(1);K=O7(O,"utf8"),K=K.replace(/^app \w+/m,`app ${C8(q)}`),T.info(`Starter: ${$.starter}`)}else T.info(`Mode: ${$.ssg?"SSG":$.ssr?"SSR":"SPA"} | Language: ${$.typescript?"TypeScript":"JavaScript"}`),K=T7(q,$);let P;try{P=qq(K,"main.vasp")}catch(O){T.error(`Internal error generating initial config: ${String(O)}`),process.exit(1)}let j=kq(import.meta.dirname);w7(f,{recursive:!0});let v=Q(P,{outputDir:f,templateDir:j,logLevel:"info"});if(!v.success){T.error("Generation failed:");for(let O of v.errors)T.error(O);process.exit(1)}if(T.success(`Created ${v.filesWritten.length} files`),!$.noInstall){T.step("Installing dependencies...");let O=Bun.spawn(["bun","install"],{cwd:f,stdout:"inherit",stderr:"inherit"});if(await O.exited,O.exitCode!==0)T.warn("bun install failed \u2014 run it manually inside your project");else T.success("Dependencies installed")}T.step("\uD83D\uDE80 Your Vasp app is ready!"),T.dim(""),T.dim(` cd ${q}`),T.dim(""),T.dim(" # Make sure PostgreSQL is running, then push the schema:"),T.dim(" bun run db:push"),T.dim(""),T.dim(" # Start the dev server:"),T.dim(" vasp start"),T.dim(""),T.dim(" Edit .env to configure your database connection.")}function h7(_){let q=_.find(($)=>$.startsWith("--starter="))?.split("=")[1];return{typescript:_.includes("--typescript")||_.includes("--ts"),ssr:_.includes("--ssr"),ssg:_.includes("--ssg"),noInstall:_.includes("--no-install"),...q!==void 0&&{starter:q}}}function T7(_,q){let $=q.ssg?'"ssg"':q.ssr?"true":"false";return`app ${C8(_)} {
47
- title: "${k7(_)}"
77
+ Run 'bun run build' inside packages/cli to copy templates.`)}function Tf(q){let _=Y_(q,"..","starters");if(h_(_))return _;let $=Y_(q,"..","..","starters");if(h_($))return $;throw Error(`Starters directory not found. Searched:
78
+ ${_}
79
+ ${$}`)}var mv=Tf(import.meta.dirname),zf=["minimal","todo","todo-auth-ssr","recipe"];async function Hf(q){let _=q[0];if(!_)h.error("Please provide a project name: vasp new <project-name>"),process.exit(1);let $=uv(q.slice(1)),f=Jv(process.cwd(),_);if(kf(f))h.error(`Directory '${_}' already exists`),process.exit(1);h.step(`Creating Vasp app: ${_}`),h.info(`Version: ${l}`);let K;if($.starter){if(!zf.includes($.starter))h.error(`Unknown starter '${$.starter}'. Available: ${zf.join(", ")}`),process.exit(1);let O=Wv(mv,`${$.starter}.vasp`);if(!kf(O))h.error(`Starter file not found: ${O}`),process.exit(1);K=rv(O,"utf8"),K=K.replace(/^app \w+/m,`app ${Wf(_)}`),h.info(`Starter: ${$.starter}`)}else h.info(`Mode: ${$.ssg?"SSG":$.ssr?"SSR":"SPA"} | Language: ${$.typescript?"TypeScript":"JavaScript"}`),K=Av(_,$);let P;try{P=g(K,"main.vasp")}catch(O){Kq(O,K,"main.vasp")}let j=U(import.meta.dirname);Zv(f,{recursive:!0});let v=R(P,{outputDir:f,templateDir:j,logLevel:"info"});if(!v.success){h.error("Generation failed:");for(let O of v.errors)h.error(O);process.exit(1)}if(h.success(`Created ${v.filesWritten.length} files`),!$.noInstall){h.step("Installing dependencies...");let O=Bun.spawn(["bun","install"],{cwd:f,stdout:"inherit",stderr:"inherit"});if(await O.exited,O.exitCode!==0)h.warn("bun install failed \u2014 run it manually inside your project");else h.success("Dependencies installed")}h.step("\uD83D\uDE80 Your Vasp app is ready!"),h.dim(""),h.dim(` cd ${_}`),h.dim(""),h.dim(" # Make sure PostgreSQL is running, then push the schema:"),h.dim(" bun run db:push"),h.dim(""),h.dim(" # Start the dev server:"),h.dim(" vasp start"),h.dim(""),h.dim(" Edit .env to configure your database connection.")}function uv(q){let _=q.find(($)=>$.startsWith("--starter="))?.split("=")[1];return{typescript:q.includes("--typescript")||q.includes("--ts"),ssr:q.includes("--ssr"),ssg:q.includes("--ssg"),noInstall:q.includes("--no-install"),..._!==void 0&&{starter:_}}}function Av(q,_){let $=_.ssg?'"ssg"':_.ssr?"true":"false";return`app ${Wf(q)} {
80
+ title: "${Xv(q)}"
48
81
  db: Drizzle
49
82
  ssr: ${$}
50
- typescript: ${q.typescript}
83
+ typescript: ${_.typescript}
51
84
  }
52
85
 
53
86
  route HomeRoute {
@@ -58,20 +91,146 @@ route HomeRoute {
58
91
  page HomePage {
59
92
  component: import Home from "@src/pages/Home.vue"
60
93
  }
61
- `}function C8(_){return _.replace(/[-_\s]+(.)/g,(q,$)=>$.toUpperCase()).replace(/^./,(q)=>q.toUpperCase())}function k7(_){return _.replace(/[-_]+/g," ").replace(/\b\w/g,(q)=>q.toUpperCase())}import{join as Lq}from"path";import{existsSync as l8,readFileSync as V8,renameSync as r7,writeFileSync as z7}from"fs";import{readdirSync as H7,statSync as W7}from"fs";async function M8(){let _=process.cwd(),q=Lq(_,"main.vasp");if(!l8(q))T.error("No main.vasp found. Run this command from your Vasp project root."),process.exit(1);let $=V8(q,"utf8");if(qq($,"main.vasp").app.typescript){T.warn("Project is already using TypeScript (typescript: true in main.vasp)");return}T.step("Migrating project to TypeScript...");let K=$.replace(/typescript:\s*false/,"typescript: true");z7(q,K,"utf8"),T.success("Updated main.vasp: typescript: true");let P=P$(Lq(_,"src"));if(P$(Lq(_,"server")),P.length>0)T.success(`Renamed ${P.length} .js files to .ts`);let j=V8(q,"utf8"),v=qq(j,"main.vasp"),O=kq(import.meta.dirname),w=Q(v,{outputDir:_,templateDir:O,logLevel:"info"});if(!w.success){T.error("Regeneration failed:");for(let h of w.errors)T.error(h);process.exit(1)}T.step("\u2713 Migration complete!"),T.dim("Run: bun install (to add TypeScript devDependencies)"),T.dim("Run: bun run typecheck (to verify zero type errors)")}function P$(_){let q=[];if(!l8(_))return q;let $=H7(_);for(let f of $){let K=Lq(_,f);if(W7(K).isDirectory())q.push(...P$(K));else if(f.endsWith(".js")&&!f.endsWith(".config.js")){let j=K.slice(0,-3)+".ts";r7(K,j),q.push(j)}}return q}import{join as J7,resolve as Z7}from"path";import{existsSync as m7,readFileSync as u7,writeFileSync as n7}from"fs";async function N8(){let _=Z7(process.cwd()),q=J7(_,"main.vasp");if(!m7(q))T.error(`No main.vasp found in ${_}. Run this command inside a Vasp project.`),process.exit(1);let $=u7(q,"utf8");if(/ssr:\s*true/.test($)||/ssr:\s*"ssg"/.test($)){T.warn("SSR is already enabled in main.vasp \u2014 nothing to do.");return}if(!/ssr:\s*false/.test($))T.error("Could not find 'ssr: false' in main.vasp. Please update it manually."),process.exit(1);$=$.replace(/ssr:\s*false/,"ssr: true"),n7(q,$,"utf8"),T.step("Patched main.vasp: ssr: false \u2192 ssr: true");let f;try{f=qq($,"main.vasp")}catch(j){T.error(`Failed to parse updated main.vasp: ${String(j)}`),process.exit(1)}let K=kq(import.meta.dirname),P=Q(f,{outputDir:_,templateDir:K,logLevel:"info"});if(!P.success){T.error("Regeneration failed:");for(let j of P.errors)T.error(j);process.exit(1)}T.success(`SSR enabled \u2014 ${P.filesWritten.length} files regenerated`),T.dim(" Run: bun install (if you have new deps)"),T.dim(" Run: vasp start")}import{join as sq,resolve as o7}from"path";import{existsSync as Bq,readFileSync as A7}from"fs";var j$=q_($_(),1);async function R8(){let _=o7(process.cwd()),q=sq(_,"package.json");if(!Bq(q))T.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let $=JSON.parse(A7(q,"utf8")),f=$.scripts?.["dev:server"],K=$.scripts?.["dev:client"];if(!f||!K)T.error("Missing 'dev:server' or 'dev:client' scripts in package.json."),process.exit(1);let P=sq(_,".env");if(!Bq(P)){T.warn("No .env file found. Copying from .env.example...");let Y=sq(_,".env.example");if(Bq(Y)){let{copyFileSync:k}=await import("fs");k(Y,P),T.info("Created .env from .env.example \u2014 edit it to configure your database.")}else T.warn("No .env.example found either. Database connection may fail.")}let j=sq(_,"node_modules");if(!Bq(j)){T.warn("node_modules not found. Running bun install...");let Y=Bun.spawn(["bun","install"],{cwd:_,stdout:"inherit",stderr:"inherit"});if(await Y.exited,Y.exitCode!==0)T.error("bun install failed. Please install dependencies manually."),process.exit(1)}T.step("Starting Vasp dev servers..."),T.dim(` server: ${f}`),T.dim(` client: ${K}`),console.log();let[v,O]=await Promise.all([c8("server",j$.default.cyan,f,_),c8("client",j$.default.magenta,K,_)]);process.on("SIGINT",()=>{v.kill(),O.kill(),process.exit(0)}),process.on("SIGTERM",()=>{v.kill(),O.kill(),process.exit(0)});let[w,h]=await Promise.all([v.exited,O.exited]);if(w!==0||h!==0)process.exit(1)}async function c8(_,q,$,f){let K=q(`[${_}]`),[P,...j]=$.split(" "),v=Bun.spawn([P,...j],{cwd:f,stdout:"pipe",stderr:"pipe"});return E8(v.stdout,K,process.stdout),E8(v.stderr,K,process.stderr),v}async function E8(_,q,$){if(!_)return;let f=new TextDecoder,K=_.getReader(),P="";while(!0){let{done:j,value:v}=await K.read();if(j){if(P)$.write(`${q} ${P}
94
+ `}function Wf(q){return q.replace(/[-_\s]+(.)/g,(_,$)=>$.toUpperCase()).replace(/^./,(_)=>_.toUpperCase())}function Xv(q){return q.replace(/[-_]+/g," ").replace(/\b\w/g,(_)=>_.toUpperCase())}import{join as nq,resolve as pv}from"path";import{existsSync as T_,readFileSync as k_}from"fs";async function i$(q,_=!1){let $=nq(q,"main.vasp");if(!T_($))return{success:!1,added:0,updated:0,skipped:0,errors:["main.vasp not found"]};let f=k_($,"utf8"),K;try{K=g(f,"main.vasp")}catch(w){return{success:!1,added:0,updated:0,skipped:0,errors:[w instanceof Error?w.message:String(w)]}}let P=fq.load(q),j=U(import.meta.dirname),v=R(K,{outputDir:q,templateDir:j,logLevel:_?"info":"silent"});if(!v.success)return{success:!1,added:0,updated:0,skipped:0,errors:v.errors};let O=ov(P,v.filesWritten,q);return{success:!0,errors:[],...O}}async function Jf(q){let _=Gv(q),$=pv(process.cwd()),f=nq($,"main.vasp");if(!T_(f))h.error(`No main.vasp found in ${$}. Run 'vasp generate' from your project root.`),process.exit(1);let K=k_(f,"utf8"),P;try{P=g(K,"main.vasp")}catch(O){Kq(O,K,"main.vasp")}let j=fq.load($);if(!j)h.warn("No manifest found \u2014 this looks like a fresh app. Use vasp new instead."),h.warn("Running full generation anyway...");if(_.dryRun){h.step("[dry-run] vasp generate \u2014 showing what would change"),await dv(P,$,j,_);return}if(j&&!_.force){let O=nv($,j);if(O.length>0){h.step("Skipping user-modified files (run with --force to overwrite):");for(let w of O)h.dim(` skip ${w}`)}}h.step("Regenerating app...");let v=await i$($,_.force);if(!v.success){h.error("Generation failed:");for(let O of v.errors)h.error(O);process.exit(1)}if(h.success(`Done: ${v.added} added, ${v.updated} updated, ${v.skipped} skipped`),v.skipped>0&&!_.force)h.dim(` ${v.skipped} user-modified file(s) preserved \u2014 use --force to overwrite`)}function nv(q,_){let $=[];for(let[f,K]of Object.entries(_.files)){if(f.startsWith("src/"))continue;let P=nq(q,f);if(!T_(P))continue;let j=k_(P,"utf8");if(Nq(j)!==K.hash)$.push(f)}return $}function ov(q,_,$){let f=0,K=0;for(let v of _)if(!q?.hasFile(v))f++;else K++;let P=q?Object.keys(q.files).length:0,j=Math.max(0,P-_.length);return{added:f,updated:K,skipped:j}}async function dv(q,_,$,f){let K=U(import.meta.dirname),P=R(q,{outputDir:nq(_,".vasp","dry-run"),templateDir:K,logLevel:"silent"});if(!P.success)h.error("Dry-run failed"),process.exit(1);let j=0,v=0,O=0;for(let w of P.filesWritten)if(!$?.hasFile(w))h.info(` + ${w}`),j++;else{let T=nq(_,w);if(T_(T)){let Y=k_(T,"utf8"),k=Nq(Y),z=$.getEntry(w)?.hash;if(k!==z)h.warn(` ~ ${w} (user-modified \u2014 would skip)`),O++;else h.dim(` = ${w}`),v++}else h.info(` + ${w}`),j++}h.step(`[dry-run] ${j} would be added, ${v} unchanged, ${O} preserved`);try{let{rmSync:w}=await import("fs");w(nq(_,".vasp","dry-run"),{recursive:!0,force:!0})}catch{}}function Gv(q){return{force:q.includes("--force")||q.includes("-f"),dryRun:q.includes("--dry-run")}}import{join as z_}from"path";import{existsSync as rf,readFileSync as Zf,renameSync as bv,writeFileSync as tv}from"fs";import{readdirSync as ev,statSync as iv}from"fs";async function mf(){let q=process.cwd(),_=z_(q,"main.vasp");if(!rf(_))h.error("No main.vasp found. Run this command from your Vasp project root."),process.exit(1);let $=Zf(_,"utf8"),f;try{f=g($,"main.vasp")}catch(T){Kq(T,$,"main.vasp")}if(f.app.typescript){h.warn("Project is already using TypeScript (typescript: true in main.vasp)");return}h.step("Migrating project to TypeScript...");let K=$.replace(/typescript:\s*false/,"typescript: true");tv(_,K,"utf8"),h.success("Updated main.vasp: typescript: true");let P=C$(z_(q,"src"));if(C$(z_(q,"server")),P.length>0)h.success(`Renamed ${P.length} .js files to .ts`);let j=Zf(_,"utf8"),v=g(j,"main.vasp"),O=U(import.meta.dirname),w=R(v,{outputDir:q,templateDir:O,logLevel:"info"});if(!w.success){h.error("Regeneration failed:");for(let T of w.errors)h.error(T);process.exit(1)}h.step("\u2713 Migration complete!"),h.dim("Run: bun install (to add TypeScript devDependencies)"),h.dim("Run: bun run typecheck (to verify zero type errors)")}function C$(q){let _=[];if(!rf(q))return _;let $=ev(q);for(let f of $){let K=z_(q,f);if(iv(K).isDirectory())_.push(...C$(K));else if(f.endsWith(".js")&&!f.endsWith(".config.js")){let j=K.slice(0,-3)+".ts";bv(K,j),_.push(j)}}return _}import{join as Cv,resolve as av}from"path";import{existsSync as Sv,readFileSync as Mv,writeFileSync as Vv}from"fs";async function uf(){let q=av(process.cwd()),_=Cv(q,"main.vasp");if(!Sv(_))h.error(`No main.vasp found in ${q}. Run this command inside a Vasp project.`),process.exit(1);let $=Mv(_,"utf8");if(/ssr:\s*true/.test($)||/ssr:\s*"ssg"/.test($)){h.warn("SSR is already enabled in main.vasp \u2014 nothing to do.");return}if(!/ssr:\s*false/.test($))h.error("Could not find 'ssr: false' in main.vasp. Please update it manually."),process.exit(1);$=$.replace(/ssr:\s*false/,"ssr: true"),Vv(_,$,"utf8"),h.step("Patched main.vasp: ssr: false \u2192 ssr: true");let f;try{f=g($,"main.vasp")}catch(j){Kq(j,$,"main.vasp")}let K=U(import.meta.dirname),P=R(f,{outputDir:q,templateDir:K,logLevel:"info"});if(!P.success){h.error("Regeneration failed:");for(let j of P.errors)h.error(j);process.exit(1)}h.success(`SSR enabled \u2014 ${P.filesWritten.length} files regenerated`),h.dim(" Run: bun install (if you have new deps)"),h.dim(" Run: vasp start")}import{join as Q,resolve as Nv}from"path";import{existsSync as F,readFileSync as H_,writeFileSync as lv,mkdirSync as cv,watch as Rv}from"fs";import{createHash as Ev}from"crypto";var d=r_(u_(),1);async function pf(){let q=Nv(process.cwd()),_=Q(q,"package.json");if(!F(_))h.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let $=JSON.parse(H_(_,"utf8")),f=$.scripts?.["dev:server"],K=$.scripts?.["dev:client"];if(!f||!K)h.error("Missing 'dev:server' or 'dev:client' scripts in package.json."),process.exit(1);let P=Q(q,".env");if(!F(P)){h.warn("No .env file found. Copying from .env.example...");let k=Q(q,".env.example");if(F(k)){let{copyFileSync:z}=await import("fs");z(k,P),h.info("Created .env from .env.example \u2014 edit it to configure your database.")}else h.warn("No .env.example found either. Database connection may fail.")}if(F(P)){let k=H_(P,"utf8"),z=Lq(k);if(z.DATABASE_URL&&dq(z.DATABASE_URL))h.warn(d.default.bold("DATABASE_URL looks like a placeholder \u2014 edit .env before running the app"));if(z.JWT_SECRET&&dq(z.JWT_SECRET))h.warn(d.default.bold("JWT_SECRET is still a placeholder \u2014 set a real secret in .env"))}let j=Q(q,"node_modules");if(!F(j)){h.warn("node_modules not found. Running bun install...");let k=Bun.spawn(["bun","install"],{cwd:q,stdout:"inherit",stderr:"inherit"});if(await k.exited,k.exitCode!==0)h.error("bun install failed. Please install dependencies manually."),process.exit(1)}await gv(q),h.step("Starting Vasp dev servers..."),h.dim(` server: ${f}`),h.dim(` client: ${K}`),console.log();let[v,O]=await Promise.all([Af("server",d.default.cyan,"dev:server",q),Af("client",d.default.magenta,"dev:client",q)]),w=Q(q,"main.vasp");if(F(w))h.dim(" Watching main.vasp for changes..."),Iv(w,q);process.on("SIGINT",()=>{v.kill(),O.kill(),process.exit(0)}),process.on("SIGTERM",()=>{v.kill(),O.kill(),process.exit(0)});let[T,Y]=await Promise.all([v.exited,O.exited]);if(T!==0||Y!==0)process.exit(1)}async function gv(q){let _=Q(q,"drizzle","schema.ts"),$=Q(q,"drizzle","schema.js"),f=F(_)?_:F($)?$:null;if(!f)return;let K=H_(f,"utf8"),P=Ev("sha256").update(K,"utf8").digest("hex"),j=Q(q,".vasp"),v=Q(j,"schema-hash"),O=F(v)?H_(v,"utf8").trim():null;if(O===P)return;let w=d.default.yellow("[vasp]");if(O===null)process.stdout.write(`${w} First run \u2014 pushing schema to database...
95
+ `);else process.stdout.write(`${w} Schema changed \u2014 running db push...
96
+ `);if(await Bun.spawn(["bunx","drizzle-kit","push","--accept-data-loss"],{cwd:q,stdout:"inherit",stderr:"inherit"}).exited===0)cv(j,{recursive:!0}),lv(v,P,"utf8"),process.stdout.write(`${w} ${d.default.green("Schema pushed successfully")}
97
+ `);else process.stdout.write(`${w} ${d.default.yellow("db push failed \u2014 continuing anyway. Fix your DATABASE_URL and retry.")}
98
+ `);console.log()}async function Af(q,_,$,f){let K=_(`[${q}]`),P=Bun.spawn(["bun","run",$],{cwd:f,stdout:"pipe",stderr:"pipe"});return Xf(P.stdout,K,process.stdout),Xf(P.stderr,K,process.stderr),P}async function Xf(q,_,$){if(!q)return;let f=new TextDecoder,K=q.getReader(),P="";while(!0){let{done:j,value:v}=await K.read();if(j){if(P)$.write(`${_} ${P}
62
99
  `);break}P+=f.decode(v,{stream:!0});let O=P.split(`
63
- `);P=O.pop()??"";for(let w of O)$.write(`${q} ${w}
64
- `)}}import{join as g8,resolve as X7}from"path";import{existsSync as I8,readFileSync as p7}from"fs";async function y8(){let _=X7(process.cwd()),q=g8(_,"package.json");if(!I8(q))T.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let f=!!JSON.parse(p7(q,"utf8")).dependencies?.nuxt;T.step("Building Vasp app for production..."),T.info("Building backend...");let K=I8(g8(_,"server/index.ts"))?"server/index.ts":"server/index.js";if(await Bun.spawn(["bun","build",K,"--target","bun","--outdir","dist/server"],{cwd:_,stdout:"inherit",stderr:"inherit"}).exited!==0)T.error("Backend build failed."),process.exit(1);T.success("Backend built \u2192 dist/server/"),T.info(`Building frontend (${f?"Nuxt SSR":"Vite SPA"})...`);let v=f?["nuxt","build"]:["vite","build"];if(await Bun.spawn(v,{cwd:_,stdout:"inherit",stderr:"inherit"}).exited!==0)T.error("Frontend build failed."),process.exit(1);if(T.success(`Frontend built \u2192 ${f?".output/":"dist/"}`),T.step("Build complete!"),T.dim(" Run: node dist/server/index.js (backend)"),f)T.dim(" Run: node .output/server/index.mjs (Nuxt SSR)")}async function D8(){T.info("vasp deploy is not yet available."),T.info(""),T.info("Planned deployment targets:"),T.info(" \u2022 Fly.io"),T.info(" \u2022 Railway"),T.info(" \u2022 Docker"),T.info(""),T.info("For now, build your project with `vasp build` and deploy the output manually."),process.exit(0)}import{resolve as e7,join as d7}from"path";import{existsSync as t7,readFileSync as G7}from"fs";var x8=["push","generate","migrate","studio"];async function L8(_){let q=_[0],$=e7(process.cwd()),f=d7($,"package.json");if(!t7(f))T.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);if(!q||!x8.includes(q)){if(T.error(`Usage: vasp db <${x8.join("|")}>`),q)T.error(`Unknown subcommand: ${q}`);process.exit(1)}let K=`db:${q}`,j=JSON.parse(G7(f,"utf8")).scripts?.[K];if(!j)T.error(`No '${K}' script found in package.json.`),process.exit(1);T.step(`Running ${K}...`);let[v,...O]=j.split(" "),h=await Bun.spawn([v,...O],{cwd:$,stdout:"inherit",stderr:"inherit"}).exited;if(h!==0)T.error(`${K} failed with exit code ${h}`),process.exit(h);T.success(`${K} completed`)}async function B8(_){let q=_[0];switch(q){case"new":await S8(_.slice(1));break;case"--version":case"-v":console.log(I);break;case"--help":case"-h":case void 0:s8();break;case"start":await R8();break;case"build":await y8();break;case"migrate-to-ts":await M8();break;case"enable-ssr":await N8();break;case"deploy":await D8();break;case"db":await L8(_.slice(1));break;default:T.error(`Unknown command: ${q}`),s8(),process.exit(1)}}function s8(){console.log(`
100
+ `);P=O.pop()??"";for(let w of O)$.write(`${_} ${w}
101
+ `)}}function Iv(q,_){let $=null,f=!1;Rv(q,{persistent:!1},(K)=>{if($)clearTimeout($);$=setTimeout(async()=>{if(f)return;f=!0;let P=d.default.yellow("[vasp]");process.stdout.write(`${P} main.vasp changed \u2014 regenerating...
102
+ `);try{let j=await i$(_);if(j.success){let v=[];if(j.added>0)v.push(d.default.green(`+${j.added} added`));if(j.updated>0)v.push(d.default.cyan(`~${j.updated} updated`));if(j.skipped>0)v.push(d.default.dim(`${j.skipped} preserved`));let O=v.length>0?v.join(", "):"no changes";if(process.stdout.write(`${P} ${d.default.bold("Done")} \u2014 ${O}
103
+ `),j.skipped>0)process.stdout.write(`${P} ${d.default.dim("User-modified files preserved. Use `vasp generate --force` to overwrite.")}
104
+ `)}else{process.stdout.write(`${P} ${d.default.red("Generation failed:")}
105
+ `);for(let v of j.errors)process.stdout.write(`${P} ${d.default.red(v)}
106
+ `);process.stdout.write(`${P} ${d.default.dim("Fix the error in main.vasp and save again.")}
107
+ `)}}catch(j){process.stdout.write(`${P} ${d.default.red(`Unexpected error: ${String(j)}`)}
108
+ `)}finally{f=!1}},300)})}import{join as nf,resolve as yv}from"path";import{existsSync as of,readFileSync as Dv}from"fs";async function df(){let q=yv(process.cwd()),_=nf(q,"package.json");if(!of(_))h.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let f=!!JSON.parse(Dv(_,"utf8")).dependencies?.nuxt;h.step("Building Vasp app for production..."),h.info("Building backend...");let K=of(nf(q,"server/index.ts"))?"server/index.ts":"server/index.js";if(await Bun.spawn(["bun","build",K,"--target","bun","--outdir","dist/server"],{cwd:q,stdout:"inherit",stderr:"inherit"}).exited!==0)h.error("Backend build failed."),process.exit(1);h.success("Backend built \u2192 dist/server/"),h.info(`Building frontend (${f?"Nuxt SSR":"Vite SPA"})...`);let v=f?["nuxt","build"]:["vite","build"];if(await Bun.spawn(v,{cwd:q,stdout:"inherit",stderr:"inherit"}).exited!==0)h.error("Frontend build failed."),process.exit(1);if(h.success(`Frontend built \u2192 ${f?".output/":"dist/"}`),h.step("Build complete!"),h.dim(" Run: node dist/server/index.js (backend)"),f)h.dim(" Run: node .output/server/index.mjs (Nuxt SSR)")}import{join as I,resolve as xv}from"path";import{existsSync as Gf,readFileSync as Lv,writeFileSync as sv}from"fs";function Bv(q){let _,$=!1;for(let K of q)if(K==="--force"||K==="-f")$=!0;else if(K.startsWith("--target="))_=K.slice(9);if(!_)h.error("Missing --target. Usage: vasp deploy --target=<docker|fly|railway>"),h.info(""),h.info("Available targets:"),h.info(" --target=docker Generate Dockerfile + docker-compose.yml"),h.info(" --target=fly Generate fly.toml + Dockerfile for Fly.io"),h.info(" --target=railway Generate railway.json + Dockerfile for Railway"),process.exit(1);if(!["docker","fly","railway"].includes(_))h.error(`Unknown target: ${_}. Valid targets: docker, fly, railway`),process.exit(1);return{target:_,force:$}}function Uv(q){let _=I(q,"package.json");if(!Gf(_))h.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let $=JSON.parse(Lv(_,"utf8"));return{appName:$.name??"vasp-app",isSsr:!!$.dependencies?.nuxt,backendPort:3001,frontendPort:3000}}function qq(q,_,$){if(Gf(q)&&!$)return h.warn(` ${q} already exists \u2014 skipping (use --force to overwrite)`),!1;return sv(q,_,"utf8"),h.success(` Created ${q}`),!0}function a$(q){let _=q.isSsr?"COPY --from=builder /app/.output ./.output":"COPY --from=builder /app/dist ./dist",$=q.isSsr?'CMD ["bun", "dist/server/index.js"]':'CMD ["bun", "dist/server/index.js"]';return`# Multi-stage Dockerfile generated by Vasp
109
+ # Stage 1: Builder \u2014 install deps and build the app
110
+ FROM oven/bun:1 AS builder
111
+ WORKDIR /app
112
+
113
+ COPY package.json bun.lockb* ./
114
+ RUN bun install --frozen-lockfile
115
+
116
+ COPY . .
117
+ RUN bun run build
118
+
119
+ # Stage 2: Runner \u2014 lean production image
120
+ FROM oven/bun:1-alpine AS runner
121
+ WORKDIR /app
122
+ ENV NODE_ENV=production
123
+
124
+ COPY --from=builder /app/package.json ./
125
+ COPY --from=builder /app/node_modules ./node_modules
126
+ COPY --from=builder /app/dist/server ./dist/server
127
+ ${_}
128
+
129
+ EXPOSE ${q.backendPort}
130
+
131
+ ${$}
132
+ `}function Fv(q){return`# docker-compose.yml generated by Vasp
133
+ # Usage: docker-compose up --build
134
+ services:
135
+ ${q.isSsr?` app:
136
+ build: .
137
+ ports:
138
+ - "${q.backendPort}:${q.backendPort}"
139
+ environment:
140
+ - DATABASE_URL=postgresql://postgres:password@db:5432/${q.appName}
141
+ - NODE_ENV=production
142
+ - PORT=${q.backendPort}
143
+ depends_on:
144
+ db:
145
+ condition: service_healthy
146
+
147
+ nuxt:
148
+ image: node:20-alpine
149
+ working_dir: /app
150
+ command: node .output/server/index.mjs
151
+ volumes:
152
+ - ./.output:/app/.output
153
+ ports:
154
+ - "${q.frontendPort}:3000"
155
+ environment:
156
+ - NODE_ENV=production
157
+ depends_on:
158
+ - app`:` app:
159
+ build: .
160
+ ports:
161
+ - "${q.backendPort}:${q.backendPort}"
162
+ environment:
163
+ - DATABASE_URL=postgresql://postgres:password@db:5432/${q.appName}
164
+ - NODE_ENV=production
165
+ - PORT=${q.backendPort}
166
+ depends_on:
167
+ db:
168
+ condition: service_healthy`}
169
+
170
+ db:
171
+ image: postgres:16-alpine
172
+ environment:
173
+ POSTGRES_DB: ${q.appName}
174
+ POSTGRES_USER: postgres
175
+ POSTGRES_PASSWORD: password
176
+ volumes:
177
+ - postgres_data:/var/lib/postgresql/data
178
+ healthcheck:
179
+ test: ["CMD-SHELL", "pg_isready -U postgres"]
180
+ interval: 5s
181
+ timeout: 5s
182
+ retries: 5
183
+
184
+ volumes:
185
+ postgres_data:
186
+ `}function S$(){return`node_modules
187
+ .env
188
+ .git
189
+ .vasp
190
+ .vasp-staging-*
191
+ dist
192
+ .output
193
+ *.log
194
+ *.md
195
+ tests
196
+ `}function Qv(q){return`# fly.toml generated by Vasp
197
+ # Docs: https://fly.io/docs/reference/configuration/
198
+ app = "${q.appName}"
199
+ primary_region = "iad"
200
+
201
+ [build]
202
+
203
+ [http_service]
204
+ internal_port = ${q.backendPort}
205
+ force_https = true
206
+ auto_stop_machines = "stop"
207
+ auto_start_machines = true
208
+ min_machines_running = 0
209
+ processes = ["app"]
210
+
211
+ [[vm]]
212
+ memory = "256mb"
213
+ cpu_kind = "shared"
214
+ cpus = 1
215
+
216
+ [env]
217
+ PORT = "${q.backendPort}"
218
+ NODE_ENV = "production"
219
+ `}function q9(q){return JSON.stringify({$schema:"https://railway.app/railway.schema.json",build:{builder:"DOCKERFILE",dockerfilePath:"./Dockerfile"},deploy:{startCommand:"bun dist/server/index.js",healthcheckPath:"/api/health",healthcheckTimeout:300,restartPolicyType:"ON_FAILURE",restartPolicyMaxRetries:10}},null,2)+`
220
+ `}async function bf(q=[]){let _=Bv(q),$=xv(process.cwd()),f=Uv($);switch(h.step(`Generating deployment files for target: ${_.target}`),h.dim(` App: ${f.appName} | Mode: ${f.isSsr?"SSR (Nuxt)":"SPA (Vite)"}`),console.log(),_.target){case"docker":{qq(I($,"Dockerfile"),a$(f),_.force),qq(I($,"docker-compose.yml"),Fv(f),_.force),qq(I($,".dockerignore"),S$(),_.force),console.log(),h.info("Next steps:"),h.dim(" 1. Edit DATABASE_URL in docker-compose.yml (or use a secrets manager)"),h.dim(" 2. docker-compose up --build"),h.dim(` 3. Visit http://localhost:${f.backendPort}/api/health to verify`);break}case"fly":{qq(I($,"Dockerfile"),a$(f),_.force),qq(I($,".dockerignore"),S$(),_.force),qq(I($,"fly.toml"),Qv(f),_.force),console.log(),h.info("Next steps:"),h.dim(" 1. fly launch --no-deploy (if not already initialized)"),h.dim(" 2. fly secrets set DATABASE_URL=<your-postgres-url>"),h.dim(" 3. fly deploy"),h.dim(" Docs: https://fly.io/docs/languages-and-frameworks/node/");break}case"railway":{qq(I($,"Dockerfile"),a$(f),_.force),qq(I($,".dockerignore"),S$(),_.force),qq(I($,"railway.json"),q9(f),_.force),console.log(),h.info("Next steps:"),h.dim(" 1. Push your code to GitHub"),h.dim(" 2. railway init && railway up"),h.dim(" 3. Set DATABASE_URL in Railway dashboard \u2192 Variables"),h.dim(" Docs: https://docs.railway.app/deploy/dockerfiles");break}}console.log(),h.info("Run `vasp build` first to produce the production build artifacts.")}import{join as Pq,resolve as _9,relative as Cf,dirname as $9}from"path";import{existsSync as cq,readFileSync as tf,writeFileSync as ef,mkdirSync as f9,readdirSync as K9,statSync as P9,cpSync as j9,rmSync as v9}from"fs";function w9(q){return{confirm:q.includes("--confirm")}}function af(q){if(!cq(q))return[];let _=[];for(let $ of K9(q)){let f=Pq(q,$);if(P9(f).isDirectory())_.push(...af(f));else _.push(f)}return _}function O9(q,_,$){let f=Pq($,"index.js"),K=Cf(_,f).replace(/\\/g,"/"),P=K.startsWith(".")?K:`./${K}`;if(!/(['"])@vasp-framework\/runtime\1/g.test(q))return null;return q.replace(/(['"])@vasp-framework\/runtime\1/g,`'${P}'`)}async function Sf(q=[]){let{confirm:_}=w9(q),$=_9(process.cwd()),f=Pq($,"package.json");if(!cq(f))h.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);if(!_)h.warn("vasp eject \u2014 this is a one-way operation."),console.log(),h.info("What this does:"),h.dim(" 1. Copies @vasp-framework/runtime source into src/vasp/runtime/"),h.dim(' 2. Rewrites all imports from "@vasp-framework/runtime" to a local path'),h.dim(" 3. Removes @vasp-framework/runtime from package.json"),h.dim(" 4. Deletes the .vasp/ metadata directory"),h.dim(" 5. Runs bun install to clean the lockfile"),console.log(),h.info("After ejecting, main.vasp is preserved but `vasp generate` will no longer work."),h.info("Your app becomes a standard Vue/Nuxt + Elysia project."),console.log(),h.warn("Run with --confirm to proceed: vasp eject --confirm"),process.exit(0);h.step("Ejecting from Vasp framework..."),console.log();let K=Pq($,"node_modules","@vasp-framework","runtime");if(!cq(K))h.error("Could not find @vasp-framework/runtime in node_modules."),h.info("Run `bun install` first, then retry."),process.exit(1);let P=Pq(K,"dist");if(!cq(P))h.error("Runtime dist not found. The package may be corrupted."),process.exit(1);let j=Pq($,"src","vasp","runtime");h.info("Copying runtime source into src/vasp/runtime/..."),f9(j,{recursive:!0}),j9(P,j,{recursive:!0}),h.success(" Copied runtime to src/vasp/runtime/"),h.info("Rewriting @vasp-framework/runtime imports...");let v=0,O=["src","server"].map((z)=>Pq($,z));for(let z of O){let Z=af(z).filter((r)=>/\.(ts|js|vue)$/.test(r));for(let r of Z){let W=tf(r,"utf8"),m=$9(r),C=O9(W,m,j);if(C!==null)ef(r,C,"utf8"),h.dim(` Rewrote imports in ${Cf($,r)}`),v++}}if(v===0)h.dim(" No files imported @vasp-framework/runtime directly.");else h.success(` Rewrote ${v} file(s)`);h.info("Removing @vasp-framework/runtime from package.json...");let w=JSON.parse(tf(f,"utf8"));if(w.dependencies?.["@vasp-framework/runtime"])delete w.dependencies["@vasp-framework/runtime"],ef(f,JSON.stringify(w,null,2)+`
221
+ `,"utf8"),h.success(" Removed @vasp-framework/runtime from dependencies");else h.dim(" @vasp-framework/runtime was not in dependencies \u2014 skipping");let T=Pq($,".vasp");if(cq(T))h.info("Removing .vasp/ metadata directory..."),v9(T,{recursive:!0,force:!0}),h.success(" Deleted .vasp/");if(h.info("Running bun install to update lockfile..."),await Bun.spawn(["bun","install"],{cwd:$,stdout:"inherit",stderr:"inherit"}).exited!==0)h.warn("bun install exited with a non-zero code \u2014 review output above.");else h.success(" lockfile updated");console.log(),h.step("Eject complete!"),h.info("Your app is now a standard Vue/Nuxt + Elysia project."),h.dim(" main.vasp is preserved for reference but `vasp generate` will no longer work."),h.dim(" Runtime composables are in src/vasp/runtime/ \u2014 feel free to customize them.")}import{resolve as Y9,join as h9}from"path";import{existsSync as T9,readFileSync as k9}from"fs";var Mf=["push","generate","migrate","studio","seed"];async function Vf(q){let _=q[0],$=Y9(process.cwd()),f=h9($,"package.json");if(!T9(f))h.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);if(!_||!Mf.includes(_)){if(h.error(`Usage: vasp db <${Mf.join("|")}>`),_)h.error(`Unknown subcommand: ${_}`);process.exit(1)}let K=`db:${_}`,j=JSON.parse(k9(f,"utf8")).scripts?.[K];if(!j)h.error(`No '${K}' script found in package.json.`),process.exit(1);h.step(`Running ${K}...`);let[v,...O]=j.split(" "),T=await Bun.spawn([v,...O],{cwd:$,stdout:"inherit",stderr:"inherit"}).exited;if(T!==0)h.error(`${K} failed with exit code ${T}`),process.exit(T);h.success(`${K} completed`)}async function lf(q){let _=q[0];switch(_){case"new":await Hf(q.slice(1));break;case"generate":case"gen":await Jf(q.slice(1));break;case"--version":case"-v":console.log(l);break;case"--help":case"-h":case void 0:Nf();break;case"start":await pf();break;case"build":await df();break;case"migrate-to-ts":await mf();break;case"enable-ssr":await uf();break;case"deploy":await bf(q.slice(1));break;case"eject":await Sf(q.slice(1));break;case"db":await Vf(q.slice(1));break;default:h.error(`Unknown command: ${_}`),Nf(),process.exit(1)}}function Nf(){console.log(`
65
222
  vasp \u2014 declarative full-stack framework for Vue
66
223
 
67
224
  Usage:
68
225
  vasp new <project-name> [options] Create a new Vasp project
226
+ vasp generate [options] Regenerate from main.vasp (preserves user changes)
69
227
  vasp enable-ssr Convert existing SPA project to SSR (Nuxt 4)
70
228
  vasp migrate-to-ts Convert existing JS project to TypeScript
71
229
  vasp start Start the dev server
72
230
  vasp build Build for production
73
- vasp db <push|generate|migrate|studio> Run database commands
74
- vasp deploy Deploy your app (planned)
231
+ vasp db <push|generate|migrate|studio|seed> Run database commands
232
+ vasp deploy --target=<docker|fly|railway> Generate deployment config files
233
+ vasp eject Remove Vasp framework dependency
75
234
 
76
235
  Options for 'vasp new':
77
236
  --typescript, --ts Enable TypeScript (default: JavaScript)
@@ -79,9 +238,16 @@ page HomePage {
79
238
  --ssg Enable Static Site Generation via Nuxt 4
80
239
  --no-install Skip bun install
81
240
 
241
+ Options for 'vasp generate':
242
+ --force, -f Overwrite user-modified files
243
+ --dry-run Preview what would change without writing files
244
+
82
245
  Examples:
83
246
  vasp new my-app
84
247
  vasp new my-app --typescript
85
248
  vasp new my-app --ssr --typescript
86
249
  vasp new my-app --ssg
87
- `)}await B8(process.argv.slice(2));
250
+ vasp generate
251
+ vasp generate --dry-run
252
+ vasp generate --force
253
+ `)}await lf(process.argv.slice(2));