vasp-cli 0.3.1 → 0.9.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 (140) hide show
  1. package/dist/vasp +80 -31
  2. package/package.json +2 -2
  3. package/starters/minimal.vasp +1 -1
  4. package/starters/recipe.vasp +70 -0
  5. package/starters/todo-auth-ssr.vasp +33 -20
  6. package/starters/todo.vasp +15 -8
  7. package/templates/shared/.gitignore.hbs +1 -0
  8. package/templates/shared/README.md.hbs +53 -0
  9. package/templates/shared/auth/client/Login.vue.hbs +1 -1
  10. package/templates/shared/auth/client/Register.vue.hbs +1 -1
  11. package/templates/shared/auth/server/index.hbs +4 -8
  12. package/templates/shared/auth/server/middleware.hbs +33 -15
  13. package/templates/shared/auth/server/plugin.hbs +7 -0
  14. package/templates/shared/auth/server/providers/github.hbs +1 -1
  15. package/templates/shared/auth/server/providers/google.hbs +1 -1
  16. package/templates/shared/auth/server/providers/usernameAndPassword.hbs +3 -6
  17. package/templates/shared/bunfig.toml.hbs +3 -0
  18. package/templates/shared/drizzle/schema.hbs +39 -9
  19. package/templates/shared/jobs/_job.hbs +12 -2
  20. package/templates/shared/package.json.hbs +14 -4
  21. package/templates/shared/server/db/client.hbs +19 -1
  22. package/templates/shared/server/db/seed.hbs +16 -0
  23. package/templates/shared/server/index.hbs +48 -0
  24. package/templates/shared/server/middleware/errorHandler.hbs +75 -0
  25. package/templates/shared/server/middleware/logger.hbs +74 -0
  26. package/templates/{templates/shared → shared}/server/middleware/rateLimit.hbs +2 -2
  27. package/templates/shared/server/routes/_vasp.hbs +37 -0
  28. package/templates/shared/server/routes/actions/_action.hbs +5 -1
  29. package/templates/shared/server/routes/api/_api.hbs +24 -0
  30. package/templates/shared/server/routes/crud/_crud.hbs +103 -11
  31. package/templates/shared/server/routes/queries/_query.hbs +5 -1
  32. package/templates/shared/server/routes/realtime/_channel.hbs +58 -10
  33. package/templates/shared/shared/types.hbs +58 -0
  34. package/templates/shared/shared/validation.hbs +20 -0
  35. package/templates/shared/tests/actions/_action.test.js.hbs +7 -0
  36. package/templates/shared/tests/actions/_action.test.ts.hbs +7 -0
  37. package/templates/shared/tests/auth/login.test.js.hbs +7 -0
  38. package/templates/shared/tests/auth/login.test.ts.hbs +7 -0
  39. package/templates/shared/tests/crud/_entity.test.js.hbs +7 -0
  40. package/templates/shared/tests/crud/_entity.test.ts.hbs +7 -0
  41. package/templates/shared/tests/queries/_query.test.js.hbs +7 -0
  42. package/templates/shared/tests/queries/_query.test.ts.hbs +7 -0
  43. package/templates/shared/tests/setup.js.hbs +5 -0
  44. package/templates/shared/tests/setup.ts.hbs +5 -0
  45. package/templates/shared/tests/vitest.config.js.hbs +8 -0
  46. package/templates/shared/tests/vitest.config.ts.hbs +8 -0
  47. package/templates/shared/tsconfig.json.hbs +2 -1
  48. package/templates/spa/js/src/App.vue.hbs +9 -1
  49. package/templates/spa/js/src/components/VaspErrorBoundary.vue.hbs +33 -0
  50. package/templates/spa/js/src/components/VaspNotifications.vue.hbs +60 -0
  51. package/templates/spa/js/src/vasp/auth.js.hbs +31 -15
  52. package/templates/spa/js/src/vasp/client/actions.js.hbs +7 -1
  53. package/templates/spa/js/src/vasp/client/crud.js.hbs +94 -5
  54. package/templates/spa/js/src/vasp/useVaspNotifications.js.hbs +35 -0
  55. package/templates/spa/js/vite.config.js.hbs +1 -0
  56. package/templates/spa/ts/src/App.vue.hbs +9 -1
  57. package/templates/spa/ts/src/components/VaspErrorBoundary.vue.hbs +33 -0
  58. package/templates/spa/ts/src/components/VaspNotifications.vue.hbs +60 -0
  59. package/templates/spa/ts/src/vasp/auth.ts.hbs +31 -15
  60. package/templates/spa/ts/src/vasp/client/actions.ts.hbs +7 -1
  61. package/templates/spa/ts/src/vasp/client/crud.ts.hbs +96 -10
  62. package/templates/spa/ts/src/vasp/client/types.ts.hbs +14 -28
  63. package/templates/spa/ts/src/vasp/useVaspNotifications.ts.hbs +41 -0
  64. package/templates/spa/ts/vite.config.ts.hbs +1 -0
  65. package/templates/ssr/js/error.vue.hbs +23 -0
  66. package/templates/ssr/js/nuxt.config.js.hbs +1 -0
  67. package/templates/ssr/js/plugins/vasp.client.js.hbs +11 -1
  68. package/templates/ssr/ts/error.vue.hbs +26 -0
  69. package/templates/ssr/ts/nuxt.config.ts.hbs +1 -0
  70. package/templates/ssr/ts/plugins/vasp.client.ts.hbs +11 -1
  71. package/templates/starters/minimal.vasp +15 -0
  72. package/templates/starters/recipe.vasp +70 -0
  73. package/templates/starters/todo-auth-ssr.vasp +65 -0
  74. package/templates/starters/todo.vasp +42 -0
  75. package/templates/templates/shared/.gitignore.hbs +0 -8
  76. package/templates/templates/shared/auth/client/Login.vue.hbs +0 -46
  77. package/templates/templates/shared/auth/client/Register.vue.hbs +0 -42
  78. package/templates/templates/shared/auth/server/index.hbs +0 -51
  79. package/templates/templates/shared/auth/server/middleware.hbs +0 -33
  80. package/templates/templates/shared/auth/server/providers/github.hbs +0 -48
  81. package/templates/templates/shared/auth/server/providers/google.hbs +0 -53
  82. package/templates/templates/shared/auth/server/providers/usernameAndPassword.hbs +0 -69
  83. package/templates/templates/shared/bunfig.toml.hbs +0 -2
  84. package/templates/templates/shared/drizzle/schema.hbs +0 -48
  85. package/templates/templates/shared/jobs/_job.hbs +0 -34
  86. package/templates/templates/shared/jobs/boss.hbs +0 -15
  87. package/templates/templates/shared/package.json.hbs +0 -35
  88. package/templates/templates/shared/server/db/client.hbs +0 -12
  89. package/templates/templates/shared/server/index.hbs +0 -60
  90. package/templates/templates/shared/server/routes/actions/_action.hbs +0 -20
  91. package/templates/templates/shared/server/routes/crud/_crud.hbs +0 -86
  92. package/templates/templates/shared/server/routes/jobs/_schedule.hbs +0 -12
  93. package/templates/templates/shared/server/routes/queries/_query.hbs +0 -20
  94. package/templates/templates/shared/server/routes/realtime/_channel.hbs +0 -78
  95. package/templates/templates/shared/server/routes/realtime/index.hbs +0 -9
  96. package/templates/templates/shared/tsconfig.json.hbs +0 -21
  97. package/templates/templates/spa/js/index.html.hbs +0 -12
  98. package/templates/templates/spa/js/src/App.vue.hbs +0 -3
  99. package/templates/templates/spa/js/src/main.js.hbs +0 -9
  100. package/templates/templates/spa/js/src/router/index.js.hbs +0 -41
  101. package/templates/templates/spa/js/src/vasp/auth.js.hbs +0 -45
  102. package/templates/templates/spa/js/src/vasp/client/actions.js.hbs +0 -15
  103. package/templates/templates/spa/js/src/vasp/client/crud.js.hbs +0 -30
  104. package/templates/templates/spa/js/src/vasp/client/index.js.hbs +0 -16
  105. package/templates/templates/spa/js/src/vasp/client/queries.js.hbs +0 -15
  106. package/templates/templates/spa/js/src/vasp/client/realtime.js.hbs +0 -51
  107. package/templates/templates/spa/js/src/vasp/plugin.js.hbs +0 -11
  108. package/templates/templates/spa/js/vite.config.js.hbs +0 -26
  109. package/templates/templates/spa/ts/index.html.hbs +0 -12
  110. package/templates/templates/spa/ts/src/App.vue.hbs +0 -3
  111. package/templates/templates/spa/ts/src/main.ts.hbs +0 -9
  112. package/templates/templates/spa/ts/src/router/index.ts.hbs +0 -41
  113. package/templates/templates/spa/ts/src/vasp/auth.ts.hbs +0 -53
  114. package/templates/templates/spa/ts/src/vasp/client/actions.ts.hbs +0 -19
  115. package/templates/templates/spa/ts/src/vasp/client/crud.ts.hbs +0 -37
  116. package/templates/templates/spa/ts/src/vasp/client/index.ts.hbs +0 -17
  117. package/templates/templates/spa/ts/src/vasp/client/queries.ts.hbs +0 -19
  118. package/templates/templates/spa/ts/src/vasp/client/realtime.ts.hbs +0 -56
  119. package/templates/templates/spa/ts/src/vasp/client/types.ts.hbs +0 -33
  120. package/templates/templates/spa/ts/src/vasp/plugin.ts.hbs +0 -12
  121. package/templates/templates/spa/ts/vite.config.ts.hbs +0 -26
  122. package/templates/templates/ssr/js/_page.vue.hbs +0 -10
  123. package/templates/templates/ssr/js/app.vue.hbs +0 -3
  124. package/templates/templates/ssr/js/composables/useAuth.js.hbs +0 -52
  125. package/templates/templates/ssr/js/composables/useVasp.js.hbs +0 -6
  126. package/templates/templates/ssr/js/middleware/auth.js.hbs +0 -8
  127. package/templates/templates/ssr/js/nuxt.config.js.hbs +0 -15
  128. package/templates/templates/ssr/js/plugins/vasp.client.js.hbs +0 -27
  129. package/templates/templates/ssr/js/plugins/vasp.server.js.hbs +0 -33
  130. package/templates/templates/ssr/ts/_page.vue.hbs +0 -10
  131. package/templates/templates/ssr/ts/app.vue.hbs +0 -3
  132. package/templates/templates/ssr/ts/composables/useAuth.ts.hbs +0 -56
  133. package/templates/templates/ssr/ts/composables/useVasp.ts.hbs +0 -10
  134. package/templates/templates/ssr/ts/middleware/auth.ts.hbs +0 -8
  135. package/templates/templates/ssr/ts/nuxt.config.ts.hbs +0 -19
  136. package/templates/templates/ssr/ts/plugins/vasp.client.ts.hbs +0 -27
  137. package/templates/templates/ssr/ts/plugins/vasp.server.ts.hbs +0 -33
  138. /package/templates/{templates/shared/.env.example.hbs → shared/.env.hbs} +0 -0
  139. /package/templates/{templates/shared → shared}/drizzle/drizzle.config.hbs +0 -0
  140. /package/templates/{templates/shared → shared}/server/middleware/csrf.hbs +0 -0
package/dist/vasp CHANGED
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- var D8=Object.create;var{getPrototypeOf:x8,defineProperty:P$,getOwnPropertyNames:L8}=Object;var s8=Object.prototype.hasOwnProperty;function B8(_){return this[_]}var U8,F8,Fq=(_,q,$)=>{var f=_!=null&&typeof _==="object";if(f){var K=q?U8??=new WeakMap:F8??=new WeakMap,P=K.get(_);if(P)return P}$=_!=null?D8(x8(_)):{};let j=q||!_||!_.__esModule?P$($,"default",{value:_,enumerable:!0}):$;for(let v of L8(_))if(!s8.call(j,v))P$(j,v,{get:B8.bind(_,v),enumerable:!0});if(f)K.set(_,j);return j};var H=(_,q)=>()=>(q||_((q={exports:{}}).exports,q),q.exports);var kq=import.meta.require;var q_=H((p7,Qq)=>{var Gq=process||{},j$=Gq.argv||[],tq=Gq.env||{},Q8=!(!!tq.NO_COLOR||j$.includes("--no-color"))&&(!!tq.FORCE_COLOR||j$.includes("--color")||Gq.platform==="win32"||(Gq.stdout||{}).isTTY&&tq.TERM!=="dumb"||!!tq.CI),qf=(_,q,$=_)=>(f)=>{let K=""+f,P=K.indexOf(q,_.length);return~P?_+_f(K,q,$,P)+q:_+K+q},_f=(_,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)},v$=(_=Q8)=>{let q=_?qf:()=>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")}};Qq.exports=v$();Qq.exports.createColors=v$});var p=H((Hf)=>{Hf.__esModule=!0;Hf.extend=z$;Hf.indexOf=Yf;Hf.escapeExpression=hf;Hf.isEmpty=Tf;Hf.createFrame=kf;Hf.blockParams=rf;Hf.appendContextPath=zf;var jf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},vf=/[&<>"'`=]/g,wf=/[&<>"'`=]/;function Of(_){return jf[_]}function z$(_){for(var q=1;q<arguments.length;q++)for(var $ in arguments[q])if(Object.prototype.hasOwnProperty.call(arguments[q],$))_[$]=arguments[q][$];return _}var v_=Object.prototype.toString;Hf.toString=v_;var j_=function(q){return typeof q==="function"};if(j_(/x/))Hf.isFunction=j_=function(_){return typeof _==="function"&&v_.call(_)==="[object Function]"};Hf.isFunction=j_;var H$=Array.isArray||function(_){return _&&typeof _==="object"?v_.call(_)==="[object Array]":!1};Hf.isArray=H$;function Yf(_,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(!wf.test(_))return _;return _.replace(vf,Of)}function Tf(_){if(!_&&_!==0)return!0;else if(H$(_)&&_.length===0)return!0;else return!1}function kf(_){var q=z$({},_);return q._parent=_,q}function rf(_,q){return _.path=q,_}function zf(_,q){return(_?_+".":"")+q}});var t=H((W$,J$)=>{W$.__esModule=!0;var w_=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function O_(_,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<w_.length;O++)this[w_[O]]=v[w_[O]];if(Error.captureStackTrace)Error.captureStackTrace(this,O_);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){}}O_.prototype=Error();W$.default=O_;J$.exports=W$.default});var u$=H((Z$,m$)=>{Z$.__esModule=!0;var Y_=p();Z$.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(Y_.isArray(q))if(q.length>0){if($.ids)$.ids=[$.name];return _.helpers.each(q,$)}else return f(this);else{if($.data&&$.ids){var P=Y_.createFrame($.data);P.contextPath=Y_.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(q,$)}})};m$.exports=Z$.default});var A$=H((n$,o$)=>{n$.__esModule=!0;function bf(_){return _&&_.__esModule?_:{default:_}}var zq=p(),Sf=t(),Cf=bf(Sf);n$.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,a){if(v){if(v.key=W,v.index=m,v.first=m===0,v.last=!!a,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=[],T=q[Symbol.iterator]();for(var z=T.next();!z.done;z=T.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})};o$.exports=n$.default});var e$=H((X$,p$)=>{X$.__esModule=!0;function Mf(_){return _&&_.__esModule?_:{default:_}}var Nf=t(),cf=Mf(Nf);X$.default=function(_){_.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new cf.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};p$.exports=X$.default});var a$=H((G$,i$)=>{G$.__esModule=!0;function gf(_){return _&&_.__esModule?_:{default:_}}var d$=p(),If=t(),t$=gf(If);G$.default=function(_){_.registerHelper("if",function(q,$){if(arguments.length!=2)throw new t$.default("#if requires exactly one argument");if(d$.isFunction(q))q=q.call(this);if(!$.hash.includeZero&&!q||d$.isEmpty(q))return $.inverse(this);else return $.fn(this)}),_.registerHelper("unless",function(q,$){if(arguments.length!=2)throw new t$.default("#unless requires exactly one argument");return _.helpers.if.call(this,q,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};i$.exports=G$.default});var C$=H((b$,S$)=>{b$.__esModule=!0;b$.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)})};S$.exports=b$.default});var M$=H((l$,V$)=>{l$.__esModule=!0;l$.default=function(_){_.registerHelper("lookup",function(q,$,f){if(!q)return q;return f.lookupProperty(q,$)})};V$.exports=l$.default});var E$=H((N$,c$)=>{N$.__esModule=!0;function Uf(_){return _&&_.__esModule?_:{default:_}}var Hq=p(),Ff=t(),Qf=Uf(Ff);N$.default=function(_){_.registerHelper("with",function(q,$){if(arguments.length!=2)throw new Qf.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)})};c$.exports=N$.default});var h_=H((JK)=>{JK.__esModule=!0;JK.registerDefaultHelpers=HK;JK.moveHelperToHooks=WK;function L(_){return _&&_.__esModule?_:{default:_}}var $K=u$(),fK=L($K),KK=A$(),PK=L(KK),jK=e$(),vK=L(jK),wK=a$(),OK=L(wK),YK=C$(),hK=L(YK),TK=M$(),kK=L(TK),rK=E$(),zK=L(rK);function HK(_){fK.default(_),PK.default(_),vK.default(_),OK.default(_),hK.default(_),kK.default(_),zK.default(_)}function WK(_,q,$){if(_.helpers[q]){if(_.hooks[q]=_.helpers[q],!$)delete _.helpers[q]}}});var I$=H((R$,g$)=>{R$.__esModule=!0;var nK=p();R$.default=function(_){_.registerDecorator("inline",function(q,$,f,K){var P=q;if(!$.partials)$.partials={},P=function(j,v){var O=f.partials;f.partials=nK.extend({},O,$.partials);var w=q(j,v);return f.partials=O,w};return $.partials[K.args[0]]=K.fn,P})};g$.exports=R$.default});var y$=H((tK)=>{tK.__esModule=!0;tK.registerDefaultDecorators=dK;function XK(_){return _&&_.__esModule?_:{default:_}}var pK=I$(),eK=XK(pK);function dK(_){eK.default(_)}});var T_=H((D$,x$)=>{D$.__esModule=!0;var aK=p(),fq={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(q){if(typeof q==="string"){var $=aK.indexOf(fq.methodMap,q.toLowerCase());if($>=0)q=$;else q=parseInt(q,10)}return q},log:function(q){if(q=fq.lookupLevel(q),typeof console<"u"&&fq.lookupLevel(fq.level)<=q){var $=fq.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)}}};D$.default=fq;x$.exports=D$.default});var L$=H((VK)=>{VK.__esModule=!0;VK.createNewLookupObject=lK;var CK=p();function lK(){for(var _=arguments.length,q=Array(_),$=0;$<_;$++)q[$]=arguments[$];return CK.extend.apply(void 0,[Object.create(null)].concat(q))}});var k_=H((xK)=>{xK.__esModule=!0;xK.createProtoAccessControl=gK;xK.resultIsAllowed=IK;xK.resetLoggedProperties=DK;function cK(_){return _&&_.__esModule?_:{default:_}}var s$=L$(),EK=T_(),RK=cK(EK),aq=Object.create(null);function gK(_){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:s$.createNewLookupObject($,_.allowedProtoProperties),defaultValue:_.allowProtoPropertiesByDefault},methods:{whitelist:s$.createNewLookupObject(q,_.allowedProtoMethods),defaultValue:_.allowProtoMethodsByDefault}}}function IK(_,q,$){if(typeof _==="function")return B$(q.methods,$);else return B$(q.properties,$)}function B$(_,q){if(_.whitelist[q]!==void 0)return _.whitelist[q]===!0;if(_.defaultValue!==void 0)return _.defaultValue;return yK(q),!1}function yK(_){if(aq[_]!==!0)aq[_]=!0,RK.default.log("error",'Handlebars: Access has been denied to resolve the property "'+_+`" because it is not an "own property" of its parent.
3
+ var df=Object.create;var{getPrototypeOf:Gf,defineProperty:e$,getOwnPropertyNames:bf}=Object;var ef=Object.prototype.hasOwnProperty;function tf(q){return this[q]}var af,Cf,z_=(q,_,$)=>{var f=q!=null&&typeof q==="object";if(f){var K=_?af??=new WeakMap:Cf??=new WeakMap,P=K.get(q);if(P)return P}$=q!=null?df(Gf(q)):{};let j=_||!q||!q.__esModule?e$($,"default",{value:q,enumerable:!0}):$;for(let v of bf(q))if(!ef.call(j,v))e$(j,v,{get:tf.bind(q,v),enumerable:!0});if(f)K.set(q,j);return j};var r=(q,_)=>()=>(_||q((_={exports:{}}).exports,_),_.exports);var $q=import.meta.require;var W_=r((Vv,H_)=>{var cq=process||{},t$=cq.argv||[],lq=cq.env||{},Sf=!(!!lq.NO_COLOR||t$.includes("--no-color"))&&(!!lq.FORCE_COLOR||t$.includes("--color")||cq.platform==="win32"||(cq.stdout||{}).isTTY&&lq.TERM!=="dumb"||!!lq.CI),Mf=(q,_,$=q)=>(f)=>{let K=""+f,P=K.indexOf(_,q.length);return~P?q+Vf(K,_,$,P)+_:q+K+_},Vf=(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)},i$=(q=Sf)=>{let _=q?Mf:()=>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")}};H_.exports=i$();H_.exports.createColors=i$});var G=r((KK)=>{KK.__esModule=!0;KK.extend=g$;KK.indexOf=Ff;KK.escapeExpression=Qf;KK.isEmpty=qK;KK.createFrame=_K;KK.blockParams=$K;KK.appendContextPath=fK;var Lf={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},sf=/[&<>"'`=]/g,Bf=/[&<>"'`=]/;function Uf(q){return Lf[q]}function g$(q){for(var _=1;_<arguments.length;_++)for(var $ in arguments[_])if(Object.prototype.hasOwnProperty.call(arguments[_],$))q[$]=arguments[_][$];return q}var G_=Object.prototype.toString;KK.toString=G_;var d_=function(_){return typeof _==="function"};if(d_(/x/))KK.isFunction=d_=function(q){return typeof q==="function"&&G_.call(q)==="[object Function]"};KK.isFunction=d_;var I$=Array.isArray||function(q){return q&&typeof q==="object"?G_.call(q)==="[object Array]":!1};KK.isArray=I$;function Ff(q,_){for(var $=0,f=q.length;$<f;$++)if(q[$]===_)return $;return-1}function Qf(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(!Bf.test(q))return q;return q.replace(sf,Uf)}function qK(q){if(!q&&q!==0)return!0;else if(I$(q)&&q.length===0)return!0;else return!1}function _K(q){var _=g$({},q);return _._parent=q,_}function $K(q,_){return q.path=_,q}function fK(q,_){return(q?q+".":"")+_}});var C=r((y$,D$)=>{y$.__esModule=!0;var b_=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function e_(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<b_.length;O++)this[b_[O]]=v[b_[O]];if(Error.captureStackTrace)Error.captureStackTrace(this,e_);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){}}e_.prototype=Error();y$.default=e_;D$.exports=y$.default});var s$=r((x$,L$)=>{x$.__esModule=!0;var t_=G();x$.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(t_.isArray(_))if(_.length>0){if($.ids)$.ids=[$.name];return q.helpers.each(_,$)}else return f(this);else{if($.data&&$.ids){var P=t_.createFrame($.data);P.contextPath=t_.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(_,$)}})};L$.exports=x$.default});var F$=r((B$,U$)=>{B$.__esModule=!0;function mK(q){return q&&q.__esModule?q:{default:q}}var oq=G(),uK=C(),AK=mK(uK);B$.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=oq.appendContextPath($.data.contextPath,$.ids[0])+".";if(oq.isFunction(_))_=_.call(this);if($.data)v=oq.createFrame($.data);function w(J,m,W){if(v){if(v.key=J,v.index=m,v.first=m===0,v.last=!!W,O)v.contextPath=O+J}j=j+f(_[J],{data:v,blockParams:oq.blockParams([_[J],J],[O+J,null])})}if(_&&typeof _==="object")if(oq.isArray(_)){for(var h=_.length;P<h;P++)if(P in _)w(P,P,P===_.length-1)}else if(typeof Symbol==="function"&&_[Symbol.iterator]){var Y=[],T=_[Symbol.iterator]();for(var z=T.next();!z.done;z=T.next())Y.push(z.value);_=Y;for(var h=_.length;P<h;P++)w(P,P,P===_.length-1)}else(function(){var J=void 0;if(Object.keys(_).forEach(function(m){if(J!==void 0)w(J,P-1);J=m,P++}),J!==void 0)w(J,P-1,!0)})();if(P===0)j=K(this);return j})};U$.exports=B$.default});var _6=r((Q$,q6)=>{Q$.__esModule=!0;function nK(q){return q&&q.__esModule?q:{default:q}}var pK=C(),dK=nK(pK);Q$.default=function(q){q.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new dK.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};q6.exports=Q$.default});var j6=r((K6,P6)=>{K6.__esModule=!0;function eK(q){return q&&q.__esModule?q:{default:q}}var $6=G(),tK=C(),f6=eK(tK);K6.default=function(q){q.registerHelper("if",function(_,$){if(arguments.length!=2)throw new f6.default("#if requires exactly one argument");if($6.isFunction(_))_=_.call(this);if(!$.hash.includeZero&&!_||$6.isEmpty(_))return $.inverse(this);else return $.fn(this)}),q.registerHelper("unless",function(_,$){if(arguments.length!=2)throw new f6.default("#unless requires exactly one argument");return q.helpers.if.call(this,_,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};P6.exports=K6.default});var O6=r((v6,w6)=>{v6.__esModule=!0;v6.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,_)})};w6.exports=v6.default});var T6=r((Y6,h6)=>{Y6.__esModule=!0;Y6.default=function(q){q.registerHelper("lookup",function(_,$,f){if(!_)return _;return f.lookupProperty(_,$)})};h6.exports=Y6.default});var H6=r((k6,z6)=>{k6.__esModule=!0;function NK(q){return q&&q.__esModule?q:{default:q}}var nq=G(),lK=C(),cK=NK(lK);k6.default=function(q){q.registerHelper("with",function(_,$){if(arguments.length!=2)throw new cK.default("#with requires exactly one argument");if(nq.isFunction(_))_=_.call(this);var f=$.fn;if(!nq.isEmpty(_)){var K=$.data;if($.data&&$.ids)K=nq.createFrame($.data),K.contextPath=nq.appendContextPath($.data.contextPath,$.ids[0]);return f(_,{data:K,blockParams:nq.blockParams([_],[K&&K.contextPath])})}else return $.inverse(this)})};z6.exports=k6.default});var i_=r((PP)=>{PP.__esModule=!0;PP.registerDefaultHelpers=fP;PP.moveHelperToHooks=KP;function fq(q){return q&&q.__esModule?q:{default:q}}var gK=s$(),IK=fq(gK),yK=F$(),DK=fq(yK),xK=_6(),LK=fq(xK),sK=j6(),BK=fq(sK),UK=O6(),FK=fq(UK),QK=T6(),qP=fq(QK),_P=H6(),$P=fq(_P);function fP(q){IK.default(q),DK.default(q),LK.default(q),BK.default(q),FK.default(q),qP.default(q),$P.default(q)}function KP(q,_,$){if(q.helpers[_]){if(q.hooks[_]=q.helpers[_],!$)delete q.helpers[_]}}});var J6=r((W6,r6)=>{W6.__esModule=!0;var OP=G();W6.default=function(q){q.registerDecorator("inline",function(_,$,f,K){var P=_;if(!$.partials)$.partials={},P=function(j,v){var O=f.partials;f.partials=OP.extend({},O,$.partials);var w=_(j,v);return f.partials=O,w};return $.partials[K.args[0]]=K.fn,P})};r6.exports=W6.default});var Z6=r((WP)=>{WP.__esModule=!0;WP.registerDefaultDecorators=HP;function TP(q){return q&&q.__esModule?q:{default:q}}var kP=J6(),zP=TP(kP);function HP(q){zP.default(q)}});var a_=r((m6,u6)=>{m6.__esModule=!0;var ZP=G(),hq={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(_){if(typeof _==="string"){var $=ZP.indexOf(hq.methodMap,_.toLowerCase());if($>=0)_=$;else _=parseInt(_,10)}return _},log:function(_){if(_=hq.lookupLevel(_),typeof console<"u"&&hq.lookupLevel(hq.level)<=_){var $=hq.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)}}};m6.default=hq;u6.exports=m6.default});var A6=r((oP)=>{oP.__esModule=!0;oP.createNewLookupObject=XP;var AP=G();function XP(){for(var q=arguments.length,_=Array(q),$=0;$<q;$++)_[$]=arguments[$];return AP.extend.apply(void 0,[Object.create(null)].concat(_))}});var C_=r((CP)=>{CP.__esModule=!0;CP.createProtoAccessControl=eP;CP.resultIsAllowed=tP;CP.resetLoggedProperties=aP;function dP(q){return q&&q.__esModule?q:{default:q}}var X6=A6(),GP=a_(),bP=dP(GP),yq=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:X6.createNewLookupObject($,q.allowedProtoProperties),defaultValue:q.allowProtoPropertiesByDefault},methods:{whitelist:X6.createNewLookupObject(_,q.allowedProtoMethods),defaultValue:q.allowProtoMethodsByDefault}}}function tP(q,_,$){if(typeof q==="function")return o6(_.methods,$);else return o6(_.properties,$)}function o6(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(yq[q]!==!0)yq[q]=!0,bP.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 DK(){Object.keys(aq).forEach(function(_){delete aq[_]})}});var Sq=H((wP)=>{wP.__esModule=!0;wP.HandlebarsEnvironment=H_;function U$(_){return _&&_.__esModule?_:{default:_}}var s=p(),FK=t(),r_=U$(FK),QK=h_(),qP=y$(),_P=T_(),bq=U$(_P),$P=k_(),fP="4.7.8";wP.VERSION=fP;var KP=8;wP.COMPILER_REVISION=KP;var PP=7;wP.LAST_COMPATIBLE_COMPILER_REVISION=PP;var jP={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"};wP.REVISION_CHANGES=jP;var z_="[object Object]";function H_(_,q,$){this.helpers=_||{},this.partials=q||{},this.decorators=$||{},QK.registerDefaultHelpers(this),qP.registerDefaultDecorators(this)}H_.prototype={constructor:H_,logger:bq.default,log:bq.default.log,registerHelper:function(q,$){if(s.toString.call(q)===z_){if($)throw new r_.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)===z_)s.extend(this.partials,q);else{if(typeof $>"u")throw new r_.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)===z_){if($)throw new r_.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(){$P.resetLoggedProperties()}};var vP=bq.default.log;wP.log=vP;wP.createFrame=s.createFrame;wP.logger=bq.default});var q6=H((F$,Q$)=>{F$.__esModule=!0;function W_(_){this.string=_}W_.prototype.toString=W_.prototype.toHTML=function(){return""+this.string};F$.default=W_;Q$.exports=F$.default});var _6=H((uP)=>{uP.__esModule=!0;uP.wrapHelper=mP;function mP(_,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 j6=H((lP)=>{lP.__esModule=!0;lP.checkRevision=tP;lP.template=GP;lP.wrapProgram=Cq;lP.resolvePartial=iP;lP.invokePartial=aP;lP.noop=K6;function AP(_){return _&&_.__esModule?_:{default:_}}function XP(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$))q[$]=_[$]}return q.default=_,q}}var pP=p(),N=XP(pP),eP=t(),c=AP(eP),E=Sq(),$6=h_(),dP=_6(),f6=k_();function tP(_){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 GP(_,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(`
5
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function aP(){Object.keys(yq).forEach(function(q){delete yq[q]})}});var xq=r((sP)=>{sP.__esModule=!0;sP.HandlebarsEnvironment=V_;function n6(q){return q&&q.__esModule?q:{default:q}}var Kq=G(),lP=C(),S_=n6(lP),cP=i_(),RP=Z6(),EP=a_(),Dq=n6(EP),gP=C_(),IP="4.7.8";sP.VERSION=IP;var yP=8;sP.COMPILER_REVISION=yP;var DP=7;sP.LAST_COMPATIBLE_COMPILER_REVISION=DP;var xP={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"};sP.REVISION_CHANGES=xP;var M_="[object Object]";function V_(q,_,$){this.helpers=q||{},this.partials=_||{},this.decorators=$||{},cP.registerDefaultHelpers(this),RP.registerDefaultDecorators(this)}V_.prototype={constructor:V_,logger:Dq.default,log:Dq.default.log,registerHelper:function(_,$){if(Kq.toString.call(_)===M_){if($)throw new S_.default("Arg not supported with multiple helpers");Kq.extend(this.helpers,_)}else this.helpers[_]=$},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,$){if(Kq.toString.call(_)===M_)Kq.extend(this.partials,_);else{if(typeof $>"u")throw new S_.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=$}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,$){if(Kq.toString.call(_)===M_){if($)throw new S_.default("Arg not supported with multiple decorators");Kq.extend(this.decorators,_)}else this.decorators[_]=$},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){gP.resetLoggedProperties()}};var LP=Dq.default.log;sP.log=LP;sP.createFrame=Kq.createFrame;sP.logger=Dq.default});var G6=r((p6,d6)=>{p6.__esModule=!0;function N_(q){this.string=q}N_.prototype.toString=N_.prototype.toHTML=function(){return""+this.string};p6.default=N_;d6.exports=p6.default});var b6=r((w3)=>{w3.__esModule=!0;w3.wrapHelper=v3;function v3(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 C6=r((X3)=>{X3.__esModule=!0;X3.checkRevision=W3;X3.template=r3;X3.wrapProgram=Lq;X3.resolvePartial=J3;X3.invokePartial=Z3;X3.noop=i6;function h3(q){return q&&q.__esModule?q:{default:q}}function T3(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 k3=G(),D=T3(k3),z3=C(),x=h3(z3),L=xq(),e6=i_(),H3=b6(),t6=C_();function W3(q){var _=q&&q[0]||1,$=L.COMPILER_REVISION;if(_>=L.LAST_COMPATIBLE_COMPILER_REVISION&&_<=L.COMPILER_REVISION)return;if(_<L.LAST_COMPATIBLE_COMPILER_REVISION){var f=L.REVISION_CHANGES[$],K=L.REVISION_CHANGES[_];throw new x.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 x.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 r3(q,_){if(!_)throw new x.default("No environment passed to template");if(!q||!q.main)throw new x.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=D.extend({},v,O.hash),O.ids)O.ids[0]=!0}j=_.VM.resolvePartial.call(this,j,v,O);var w=D.extend({},O,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),h=_.VM.invokePartial.call(this,j,v,w);if(h==null&&_.compile)O.partials[O.name]=_.compile(j,q.compilerOptions,_),h=O.partials[O.name](v,w);if(h!=null){if(O.indent){var Y=h.split(`
6
6
  `);for(var T=0,z=Y.length;T<z;T++){if(!Y[T]&&T+1===z)break;Y[T]=O.indent+Y[T]}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(f6.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 T=this.programs[v],z=this.fn(v);if(O||Y||h||w)T=Cq(this,v,z,O,w,h,Y);else if(!T)T=this.programs[v]=Cq(this,v,z);return T},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=bP(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(T){return""+_.main(K,T,K.helpers,K.partials,O,h,w)}return Y=P6(_.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(SP(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=f6.createProtoAccessControl(j);var O=j.allowCallsToHelperMissing||$;$6.moveHelperToHooks(K,"helperMissing",O),$6.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=P6($,v,_,j,f,P),v.program=q,v.depth=j?j.length:0,v.blockParams=K||0,v}function iP(_,q,$){if(!_)if($.name==="@partial-block")_=$.data["partial-block"];else _=$.partials[$.name];else if(!_.call&&!$.name)$.name=_,_=$.partials[_];return _}function aP(_,q,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==K6)(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 K6(){return""}function bP(_,q){if(!q||!("root"in q))q=q?E.createFrame(q):{},q.root=_;return q}function P6(_,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 SP(_,q){Object.keys(_).forEach(function($){var f=_[$];_[$]=CP(f,q)})}function CP(_,q){var $=q.lookupProperty;return dP.wrapHelper(_,function(f){return N.extend({lookupProperty:$},f)})}});var J_=H((v6,w6)=>{v6.__esModule=!0;v6.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 _}};w6.exports=v6.default});var r6=H((T6,k6)=>{T6.__esModule=!0;function m_(_){return _&&_.__esModule?_:{default:_}}function u_(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$))q[$]=_[$]}return q.default=_,q}}var DP=Sq(),O6=u_(DP),xP=q6(),LP=m_(xP),sP=t(),BP=m_(sP),UP=p(),Z_=u_(UP),FP=j6(),Y6=u_(FP),QP=J_(),qj=m_(QP);function h6(){var _=new O6.HandlebarsEnvironment;return Z_.extend(_,O6),_.SafeString=LP.default,_.Exception=BP.default,_.Utils=Z_,_.escapeExpression=Z_.escapeExpression,_.VM=Y6,_.template=function(q){return Y6.template(q,_)},_}var Wq=h6();Wq.create=h6;qj.default(Wq);Wq.default=Wq;T6.default=Wq;k6.exports=T6.default});var n_=H((H6,W6)=>{H6.__esModule=!0;var z6={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&&!z6.helpers.scopedId(q)&&!q.depth}}};H6.default=z6;W6.exports=H6.default});var m6=H((J6,Z6)=>{J6.__esModule=!0;var Pj=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 T=v.prepareBlock(w[Y-2],w[Y-1],w[Y],w[Y],!1,this._$),z=v.prepareProgram([T],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,T=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 a=this.lexer.yylloc;O.push(a);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,sq,x,d,A7,Bq,_q={},eq,V,K$,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 Uq="";if(!z){dq=[];for(eq in w[x])if(this.terminals_[eq]&&eq>2)dq.push("'"+this.terminals_[eq]+"'");if(this.lexer.showPosition)Uq="Parse error on line "+(Y+1)+`:
7
+ `)}return h}else throw new x.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 x.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(t6.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:D.escapeExpression,invokePartial:f,fn:function(v){var O=q[v];return O.decorator=q[v+"_d"],O},programs:[],program:function(v,O,w,h,Y){var T=this.programs[v],z=this.fn(v);if(O||Y||h||w)T=Lq(this,v,z,O,w,h,Y);else if(!T)T=this.programs[v]=Lq(this,v,z);return T},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=D.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=m3(j,O);var w=void 0,h=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(T){return""+q.main(K,T,K.helpers,K.partials,O,h,w)}return Y=a6(q.main,Y,K,v.depths||[],O,h),Y(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=D.extend({},_.helpers,j.helpers);if(u3(v,K),K.helpers=v,q.usePartial)K.partials=K.mergeIfNeeded(j.partials,_.partials);if(q.usePartial||q.useDecorators)K.decorators=D.extend({},_.decorators,j.decorators);K.hooks={},K.protoAccessControl=t6.createProtoAccessControl(j);var O=j.allowCallsToHelperMissing||$;e6.moveHelperToHooks(K,"helperMissing",O),e6.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 x.default("must pass block params");if(q.useDepths&&!w)throw new x.default("must pass parent depths");return Lq(K,j,q[j],v,0,O,w)},P}function Lq(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===q.nullContext&&j[0]===null))h=[O].concat(j);return $(q,O,q.helpers,q.partials,w.data||f,P&&[w.blockParams].concat(P),h)}return v=a6($,v,q,j,f,P),v.program=_,v.depth=j?j.length:0,v.blockParams=K||0,v}function J3(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 Z3(q,_,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==i6)(function(){$.data=L.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=L.createFrame(O.data),O.data["partial-block"]=f,P(v,O)},P.partials)$.partials=D.extend({},$.partials,P.partials)})();if(q===void 0&&K)q=K;if(q===void 0)throw new x.default("The partial "+$.name+" could not be found");else if(q instanceof Function)return q(_,$)}function i6(){return""}function m3(q,_){if(!_||!("root"in _))_=_?L.createFrame(_):{},_.root=q;return _}function a6(q,_,$,f,K,P){if(q.decorator){var j={};_=q.decorator(_,j,$,f&&f[0],K,P,f),D.extend(_,j)}return _}function u3(q,_){Object.keys(q).forEach(function($){var f=q[$];q[$]=A3(f,_)})}function A3(q,_){var $=_.lookupProperty;return H3.wrapHelper(q,function(f){return D.extend({lookupProperty:$},f)})}});var l_=r((S6,M6)=>{S6.__esModule=!0;S6.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}};M6.exports=S6.default});var E6=r((c6,R6)=>{c6.__esModule=!0;function R_(q){return q&&q.__esModule?q:{default:q}}function E_(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 a3=xq(),V6=E_(a3),C3=G6(),S3=R_(C3),M3=C(),V3=R_(M3),N3=G(),c_=E_(N3),l3=C6(),N6=E_(l3),c3=l_(),R3=R_(c3);function l6(){var q=new V6.HandlebarsEnvironment;return c_.extend(q,V6),q.SafeString=S3.default,q.Exception=V3.default,q.Utils=c_,q.escapeExpression=c_.escapeExpression,q.VM=N6,q.template=function(_){return N6.template(_,q)},q}var pq=l6();pq.create=l6;R3.default(pq);pq.default=pq;c6.default=pq;R6.exports=c6.default});var g_=r((I6,y6)=>{I6.__esModule=!0;var g6={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&&!g6.helpers.scopedId(_)&&!_.depth}}};I6.default=g6;y6.exports=I6.default});var L6=r((D6,x6)=>{D6.__esModule=!0;var D3=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,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 T=v.prepareBlock(w[Y-2],w[Y-1],w[Y],w[Y],!1,this._$),z=v.prepareProgram([T],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,T=0,z=0,J=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 W=this.lexer.yylloc;O.push(W);var Z=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function g(y){j.length=j.length-2*y,v.length=v.length-y,O.length=O.length-y}function wq(){var y=P.lexer.lex()||1;if(typeof y!=="number")y=P.symbols_[y]||y;return y}var p,h_,_q,a,Sv,T_,Oq={},Vq,I,b$,Nq;while(!0){if(_q=j[j.length-1],this.defaultActions[_q])a=this.defaultActions[_q];else{if(p===null||typeof p>"u")p=wq();a=w[_q]&&w[_q][p]}if(typeof a>"u"||!a.length||!a[0]){var k_="";if(!z){Nq=[];for(Vq in w[_q])if(this.terminals_[Vq]&&Vq>2)Nq.push("'"+this.terminals_[Vq]+"'");if(this.lexer.showPosition)k_="Parse error on line "+(Y+1)+`:
8
8
  `+this.lexer.showPosition()+`
9
- Expecting `+dq.join(", ")+", got '"+(this.terminals_[X]||X)+"'";else Uq="Parse error on line "+(Y+1)+": Unexpected "+(X==1?"end of input":"'"+(this.terminals_[X]||X)+"'");this.parseError(Uq,{text:this.lexer.match,token:this.terminals_[X]||X,line:this.lexer.yylineno,loc:a,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,!sq){if(T=this.lexer.yyleng,h=this.lexer.yytext,Y=this.lexer.yylineno,a=this.lexer.yylloc,z>0)z--}else X=sq,sq=null;break;case 2:if(V=this.productions_[d[1]][1],_q.$=v[v.length-V],_q._$={first_line:O[O.length-(V||1)].first_line,last_line:O[O.length-1].last_line,first_column:O[O.length-(V||1)].first_column,last_column:O[O.length-1].last_column},o)_q._$.range=[O[O.length-(V||1)].range[0],O[O.length-1].range[1]];if(Bq=this.performAction.call(_q,h,T,Y,this.yy,d[1],v,O),typeof Bq<"u")return Bq;if(V)j=j.slice(0,-1*V*2),v=v.slice(0,-1*V),O=O.slice(0,-1*V);j.push(this.productions_[d[1]][0]),v.push(_q.$),O.push(_q._$),K$=w[j[j.length-2]][j[j.length-1]],j.push(K$);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()+`
9
+ Expecting `+Nq.join(", ")+", got '"+(this.terminals_[p]||p)+"'";else k_="Parse error on line "+(Y+1)+": Unexpected "+(p==1?"end of input":"'"+(this.terminals_[p]||p)+"'");this.parseError(k_,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:W,expected:Nq})}}if(a[0]instanceof Array&&a.length>1)throw Error("Parse Error: multiple actions possible at state: "+_q+", token: "+p);switch(a[0]){case 1:if(j.push(p),v.push(this.lexer.yytext),O.push(this.lexer.yylloc),j.push(a[1]),p=null,!h_){if(T=this.lexer.yyleng,h=this.lexer.yytext,Y=this.lexer.yylineno,W=this.lexer.yylloc,z>0)z--}else p=h_,h_=null;break;case 2:if(I=this.productions_[a[1]][1],Oq.$=v[v.length-I],Oq._$={first_line:O[O.length-(I||1)].first_line,last_line:O[O.length-1].last_line,first_column:O[O.length-(I||1)].first_column,last_column:O[O.length-1].last_column},Z)Oq._$.range=[O[O.length-(I||1)].range[0],O[O.length-1].range[1]];if(T_=this.performAction.call(Oq,h,T,Y,this.yy,a[1],v,O),typeof T_<"u")return T_;if(I)j=j.slice(0,-1*I*2),v=v.slice(0,-1*I),O=O.slice(0,-1*I);j.push(this.productions_[a[1]][0]),v.push(Oq.$),O.push(Oq._$),b$=w[j[j.length-2]][j[j.length-1]],j.push(b$);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
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 T=0;T<Y.length;T++)if(v=this._input.match(this.rules[Y[T]]),v&&(!j||v[0].length>j[0].length)){if(j=v,O=T,!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,T){return j.yytext=j.yytext.substring(Y,j.yyleng-T+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 $}();J6.default=Pj;Z6.exports=J6.default});var Mq=H((o6,A6)=>{o6.__esModule=!0;function wj(_){return _&&_.__esModule?_:{default:_}}var Oj=t(),o_=wj(Oj);function lq(){this.parents=[]}lq.prototype={constructor:lq,mutating:!1,acceptKey:function(q,$){var f=this.accept(q[$]);if(this.mutating){if(f&&!lq.prototype[f.type])throw new o_.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+q.type);q[$]=f}},acceptRequired:function(q,$){if(this.acceptKey(q,$),!q[$])throw new o_.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 o_.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:Vq,Decorator:Vq,BlockStatement:u6,DecoratorBlock:u6,PartialStatement:n6,PartialBlockStatement:function(q){n6.call(this,q),this.acceptKey(q,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Vq,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 Vq(_){this.acceptRequired(_,"path"),this.acceptArray(_.params),this.acceptKey(_,"hash")}function u6(_){Vq.call(this,_),this.acceptKey(_,"program"),this.acceptKey(_,"inverse")}function n6(_){this.acceptRequired(_,"name"),this.acceptArray(_.params),this.acceptKey(_,"hash")}o6.default=lq;A6.exports=o6.default});var e6=H((X6,p6)=>{X6.__esModule=!0;function Tj(_){return _&&_.__esModule?_:{default:_}}var kj=Mq(),rj=Tj(kj);function C(){var _=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=_}C.prototype=new rj.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=A_(f,K,$),w=X_(f,K,$),h=v.openStandalone&&O,Y=v.closeStandalone&&w,T=v.inlineStandalone&&O&&w;if(v.close)B(f,K,!0);if(v.open)y(f,K,!0);if(q&&T){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:X_(q.body),closeStandalone:A_((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&&A_(q.body)&&X_(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 A_(_,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 X_(_,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}X6.default=C;p6.exports=X6.default});var d6=H((tj)=>{tj.__esModule=!0;tj.SourceLocation=Zj;tj.id=mj;tj.stripFlags=uj;tj.stripComment=nj;tj.preparePath=oj;tj.prepareMustache=Aj;tj.prepareRawBlock=Xj;tj.prepareBlock=pj;tj.prepareProgram=ej;tj.preparePartialBlock=dj;function Wj(_){return _&&_.__esModule?_:{default:_}}var Jj=t(),p_=Wj(Jj);function e_(_,q){if(q=q.path?q.path.original:q,_.path.original!==q){var $={loc:_.path.loc};throw new p_.default(_.path.original+" doesn't match "+q,$)}}function Zj(_,q){this.source=_,this.start={line:q.first_line,column:q.first_column},this.end={line:q.last_line,column:q.last_column}}function mj(_){if(/^\[.*\]$/.test(_))return _.substring(1,_.length-1);else return _}function uj(_,q){return{open:_.charAt(2)==="~",close:q.charAt(q.length-3)==="~"}}function nj(_){return _.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function oj(_,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 p_.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 Aj(_,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 Xj(_,q,$,f){e_(_,$),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 pj(_,q,$,f,K,P){if(f&&f.path)e_(_,f);var j=/\*/.test(_.open);q.blockParams=_.blockParams;var v=void 0,O=void 0;if($){if(j)throw new p_.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 ej(_,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 dj(_,q,$,f){return e_(_,$),{type:"PartialBlockStatement",name:_.path,params:_.params,hash:_.hash,program:q,openStrip:_.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var i6=H((sj)=>{sj.__esModule=!0;sj.parseWithoutProcessing=G6;sj.parse=Lj;function Ej(_){if(_&&_.__esModule)return _;else{var q={};if(_!=null){for(var $ in _)if(Object.prototype.hasOwnProperty.call(_,$))q[$]=_[$]}return q.default=_,q}}function t6(_){return _&&_.__esModule?_:{default:_}}var Rj=m6(),d_=t6(Rj),gj=e6(),Ij=t6(gj),yj=d6(),Dj=Ej(yj),xj=p();sj.parser=d_.default;var Nq={};xj.extend(Nq,Dj);function G6(_,q){if(_.type==="Program")return _;d_.default.yy=Nq,Nq.locInfo=function(f){return new Nq.SourceLocation(q&&q.srcName,f)};var $=d_.default.parse(_);return $}function Lj(_,q){var $=G6(_,q),f=new Ij.default(q);return f.accept($)}});var C6=H((P3)=>{P3.__esModule=!0;P3.Compiler=t_;P3.precompile=f3;P3.compile=K3;function b6(_){return _&&_.__esModule?_:{default:_}}var q3=t(),Zq=b6(q3),mq=p(),_3=n_(),Jq=b6(_3),$3=[].slice;function t_(){}t_.prototype={compiler:t_,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||!S6(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){a6(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){a6(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:$3.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 f3(_,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 K3(_,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 S6(_,q){if(_===q)return!0;if(mq.isArray(_)&&mq.isArray(q)&&_.length===q.length){for(var $=0;$<_.length;$++)if(!S6(_[$],q[$]))return!1;return!0}}function a6(_){if(!_.path.parts){var q=_.path;_.path={type:"PathExpression",data:!1,depth:0,parts:[q.original+""],original:q.original+"",loc:q.loc}}}});var V6=H((Y3)=>{var l6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Y3.encode=function(_){if(0<=_&&_<l6.length)return l6[_];throw TypeError("Must be between 0 and 63: "+_)};Y3.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 i_=H((z3)=>{var M6=V6(),G_=5,N6=1<<G_,c6=N6-1,E6=N6;function k3(_){return _<0?(-_<<1)+1:(_<<1)+0}function r3(_){var q=(_&1)===1,$=_>>1;return q?-$:$}z3.encode=function(q){var $="",f,K=k3(q);do{if(f=K&c6,K>>>=G_,K>0)f|=E6;$+=M6.encode(f)}while(K>0);return $};z3.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=M6.decode(q.charCodeAt($++)),O===-1)throw Error("Invalid base64 digit: "+q.charAt($-1));v=!!(O&E6),O&=c6,P=P+(O<<j),j+=G_}while(v);f.value=r3(P),f.rest=$}});var jq=H((d3)=>{function J3(_,q,$){if(q in _)return _[q];else if(arguments.length===3)return $;else throw Error('"'+q+'" is a required argument.')}d3.getArg=J3;var R6=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Z3=/^data:.+\,.+$/;function uq(_){var q=_.match(R6);if(!q)return null;return{scheme:q[1],auth:q[2],host:q[3],port:q[4],path:q[5]}}d3.urlParse=uq;function Kq(_){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}d3.urlGenerate=Kq;function a_(_){var q=_,$=uq(_);if($){if(!$.path)return _;q=$.path}var f=d3.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,Kq($);return q}d3.normalize=a_;function g6(_,q){if(_==="")_=".";if(q==="")q=".";var $=uq(q),f=uq(_);if(f)_=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return Kq($)}if($||q.match(Z3))return q;if(f&&!f.host&&!f.path)return f.host=q,Kq(f);var K=q.charAt(0)==="/"?q:a_(_.replace(/\/+$/,"")+"/"+q);if(f)return f.path=K,Kq(f);return K}d3.join=g6;d3.isAbsolute=function(_){return _.charAt(0)==="/"||R6.test(_)};function m3(_,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)}d3.relative=m3;var I6=function(){var _=Object.create(null);return!("__proto__"in _)}();function y6(_){return _}function u3(_){if(D6(_))return"$"+_;return _}d3.toSetString=I6?y6:u3;function n3(_){if(D6(_))return _.slice(1);return _}d3.fromSetString=I6?y6:n3;function D6(_){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 o3(_,q,$){var f=Pq(_.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 Pq(_.name,q.name)}d3.compareByOriginalPositions=o3;function A3(_,q,$){var f=_.generatedLine-q.generatedLine;if(f!==0)return f;if(f=_.generatedColumn-q.generatedColumn,f!==0||$)return f;if(f=Pq(_.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 Pq(_.name,q.name)}d3.compareByGeneratedPositionsDeflated=A3;function Pq(_,q){if(_===q)return 0;if(_===null)return 1;if(q===null)return-1;if(_>q)return 1;return-1}function X3(_,q){var $=_.generatedLine-q.generatedLine;if($!==0)return $;if($=_.generatedColumn-q.generatedColumn,$!==0)return $;if($=Pq(_.source,q.source),$!==0)return $;if($=_.originalLine-q.originalLine,$!==0)return $;if($=_.originalColumn-q.originalColumn,$!==0)return $;return Pq(_.name,q.name)}d3.compareByGeneratedPositionsInflated=X3;function p3(_){return JSON.parse(_.replace(/^\)]}'[^\n]*\n/,""))}d3.parseSourceMapInput=p3;function e3(_,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=g6(Kq(f),q)}return a_(q)}d3.computeSourceURL=e3});var C_=H((g3)=>{var b_=jq(),S_=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:b_.toSetString(q),K=U?this.has(q):S_.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 $=b_.toSetString(q);return S_.call(this._set,$)}};R.prototype.indexOf=function(q){if(U){var $=this._set.get(q);if($>=0)return $}else{var f=b_.toSetString(q);if(S_.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()};g3.ArraySet=R});var L6=H((D3)=>{var x6=jq();function y3(_,q){var $=_.generatedLine,f=q.generatedLine,K=_.generatedColumn,P=q.generatedColumn;return f>$||f==$&&P>=K||x6.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(y3(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(x6.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};D3.MappingList=cq});var l_=H((s3)=>{var nq=i_(),u=jq(),Eq=C_().ArraySet,L3=L6().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 L3,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,T=this._mappings.toArray();for(var z=0,W=T.length;z<W;z++){if(w=T[z],O="",w.generatedLine!==$){q=0;while(w.generatedLine!==$)O+=";",$++}else if(z>0){if(!u.compareByGeneratedPositionsInflated(w,T[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())};s3.SourceMapGenerator=G});var B6=H((U3)=>{U3.GREATEST_LOWER_BOUND=1;U3.LEAST_UPPER_BOUND=2;function V_(_,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 V_(j,q,$,f,K,P);if(P==U3.LEAST_UPPER_BOUND)return q<f.length?q:-1;else return j}else{if(j-_>1)return V_(_,j,$,f,K,P);if(P==U3.LEAST_UPPER_BOUND)return j;else return _<0?-1:_}}U3.search=function(q,$,f,K){if($.length===0)return-1;var P=V_(-1,$.length,q,$,f,K||U3.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var U6=H((q4)=>{function N_(_,q,$){var f=_[q];_[q]=_[$],_[$]=f}function Q3(_,q){return Math.round(_+Math.random()*(q-_))}function c_(_,q,$,f){if($<f){var K=Q3($,f),P=$-1;N_(_,K,f);var j=_[f];for(var v=$;v<f;v++)if(q(_[v],j)<=0)P+=1,N_(_,P,v);N_(_,P+1,v);var O=P+1;c_(_,q,$,O-1),c_(_,q,O+1,f)}}q4.quickSort=function(_,q){c_(_,q,0,_.length-1)}});var Q6=H((f4)=>{var r=jq(),E_=B6(),vq=C_().ArraySet,$4=i_(),oq=U6().quickSort;function J(_,q){var $=_;if(typeof _==="string")$=r.parseSourceMapInput(_);return $.sections!=null?new i($,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,E_.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};f4.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=vq.fromArray(P.map(String),!0),this._sources=vq.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=vq.fromArray(q._names.toArray(),!0),P=f._sources=vq.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],T=new F6;if(T.generatedLine=Y.generatedLine,T.generatedColumn=Y.generatedColumn,Y.source){if(T.source=P.indexOf(Y.source),T.originalLine=Y.originalLine,T.originalColumn=Y.originalColumn,Y.name)T.name=K.indexOf(Y.name);O.push(T)}v.push(T)}return oq(f.__originalMappings,r.compareByOriginalPositions),f};A.prototype._version=3;Object.defineProperty(A.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function F6(){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={},T={},z=[],W=[],m,a,o,D,pq;while(h<w)if(q.charAt(h)===";")f++,h++,K=0;else if(q.charAt(h)===",")h++;else{m=new F6,m.generatedLine=f;for(D=h;D<w;D++)if(this._charIsMappingSeparator(q,D))break;if(a=q.slice(h,D),o=Y[a],o)h+=a.length;else{o=[];while(h<D)$4.decode(q,h,T),pq=T.value,h=T.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[a]=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 E_.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}};f4.BasicSourceMapConsumer=A;function i(_,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 vq,this._names=new vq;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)}})}i.prototype=Object.create(J.prototype);i.prototype.constructor=J;i.prototype._version=3;Object.defineProperty(i.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 _}});i.prototype.originalPositionFor=function(q){var $={generatedLine:r.getArg(q,"line"),generatedColumn:r.getArg(q,"column")},f=E_.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})};i.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(q){return q.consumer.hasContentsOfAllSources()})};i.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.')};i.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}};i.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)};f4.IndexedSourceMapConsumer=i});var q8=H((Y4)=>{var v4=l_().SourceMapGenerator,Rq=jq(),w4=/(\r?\n)/,O4=10,wq="$$$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[wq]=!0,f!=null)this.add(f)}e.fromStringWithSourceMap=function(q,$,f){var K=new e,P=q.split(w4),j=0,v=function(){var T=W(),z=W()||"";return T+z;function W(){return j<P.length?P[j++]:void 0}},O=1,w=0,h=null;if($.eachMapping(function(T){if(h!==null)if(O<T.generatedLine)Y(h,v()),O++,w=0;else{var z=P[j]||"",W=z.substr(0,T.generatedColumn-w);P[j]=z.substr(T.generatedColumn-w),w=T.generatedColumn,Y(h,W),h=T;return}while(O<T.generatedLine)K.add(v()),O++;if(w<T.generatedColumn){var z=P[j]||"";K.add(z.substr(0,T.generatedColumn)),P[j]=z.substr(T.generatedColumn),w=T.generatedColumn}h=T},this),j<P.length){if(h)Y(h,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(T){var z=$.sourceContentFor(T);if(z!=null){if(f!=null)T=Rq.join(f,T);K.setSourceContent(T,z)}}),K;function Y(T,z){if(T===null||T.source===void 0)K.add(z);else{var W=f?Rq.join(f,T.source):T.source;K.add(new e(T.originalLine,T.originalColumn,W,z,T.name))}}};e.prototype.add=function(q){if(Array.isArray(q))q.forEach(function($){this.add($)},this);else if(q[wq]||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[wq]||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],$[wq])$.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[wq])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[$][wq])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 v4(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,T=w.length;Y<T;Y++)if(w.charCodeAt(Y)===O4){if($.line++,$.column=0,Y+1===T)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}};Y4.SourceNode=e});var _8=H((T4)=>{T4.SourceMapGenerator=l_().SourceMapGenerator;T4.SourceMapConsumer=Q6().SourceMapConsumer;T4.SourceNode=q8().SourceNode});var P8=H((f8,K8)=>{f8.__esModule=!0;var g_=p(),F=void 0;try{if(typeof define!=="function"||!define.amd)I_=_8(),F=I_.SourceNode}catch(_){}var I_;if(!F)F=function(_,q,$,f){if(this.src="",f)this.add(f)},F.prototype={add:function(q){if(g_.isArray(q))q=q.join("");this.src+=q},prepend:function(q){if(g_.isArray(q))q=q.join("");this.src=q+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function R_(_,q,$){if(g_.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 $8(_){this.srcFile=_,this.source=[]}$8.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=R_(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=R_(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(R_(q[f],this))}return $},generateArray:function(q){var $=this.generateList(q);return $.prepend("["),$.add("]"),$}};f8.default=$8;K8.exports=f8.default});var h8=H((O8,Y8)=>{O8.__esModule=!0;function w8(_){return _&&_.__esModule?_:{default:_}}var j8=Sq(),J4=t(),y_=w8(J4),Z4=p(),m4=P8(),v8=w8(m4);function Oq(_){this.value=_}function Yq(){}Yq.prototype={nameLookup:function(q,$){return this.internalNameLookup(q,$)},depthedLookup:function(q){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(q),")"]},compilerInfo:function(){var q=j8.COMPILER_REVISION,$=j8.REVISION_CHANGES[q];return[q,$]},appendToBuffer:function(q,$,f){if(!Z4.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 y_.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(),`;
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,T){return j.yytext=j.yytext.substring(Y,j.yyleng-T+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}();q.lexer=_;function $(){this.yy={}}return $.prototype=q,q.Parser=$,new $}();D6.default=D3;x6.exports=D6.default});var Uq=r((U6,F6)=>{U6.__esModule=!0;function s3(q){return q&&q.__esModule?q:{default:q}}var B3=C(),I_=s3(B3);function sq(){this.parents=[]}sq.prototype={constructor:sq,mutating:!1,acceptKey:function(_,$){var f=this.accept(_[$]);if(this.mutating){if(f&&!sq.prototype[f.type])throw new I_.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+_.type);_[$]=f}},acceptRequired:function(_,$){if(this.acceptKey(_,$),!_[$])throw new I_.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 I_.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:Bq,Decorator:Bq,BlockStatement:s6,DecoratorBlock:s6,PartialStatement:B6,PartialBlockStatement:function(_){B6.call(this,_),this.acceptKey(_,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:Bq,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(_){this.acceptArray(_.pairs)},HashPair:function(_){this.acceptRequired(_,"value")}};function Bq(q){this.acceptRequired(q,"path"),this.acceptArray(q.params),this.acceptKey(q,"hash")}function s6(q){Bq.call(this,q),this.acceptKey(q,"program"),this.acceptKey(q,"inverse")}function B6(q){this.acceptRequired(q,"name"),this.acceptArray(q.params),this.acceptKey(q,"hash")}U6.default=sq;F6.exports=U6.default});var _8=r((Q6,q8)=>{Q6.__esModule=!0;function Q3(q){return q&&q.__esModule?q:{default:q}}var qj=Uq(),_j=Q3(qj);function l(){var q=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=q}l.prototype=new _j.default;l.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=y_(f,K,$),w=D_(f,K,$),h=v.openStandalone&&O,Y=v.closeStandalone&&w,T=v.inlineStandalone&&O&&w;if(v.close)Pq(f,K,!0);if(v.open)F(f,K,!0);if(_&&T){if(Pq(f,K),F(f,K)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(f[K-1].original)[1]}}if(_&&h)Pq((j.program||j.inverse).body),F(f,K);if(_&&Y)Pq(f,K),F((j.inverse||j.program).body)}return q};l.prototype.BlockStatement=l.prototype.DecoratorBlock=l.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:D_(_.body),closeStandalone:y_((f||_).body)};if(q.openStrip.close)Pq(_.body,null,!0);if($){var j=q.inverseStrip;if(j.open)F(_.body,null,!0);if(j.close)Pq(f.body,null,!0);if(q.closeStrip.open)F(K.body,null,!0);if(!this.options.ignoreStandalone&&y_(_.body)&&D_(f.body))F(_.body),Pq(f.body)}else if(q.closeStrip.open)F(_.body,null,!0);return P};l.prototype.Decorator=l.prototype.MustacheStatement=function(q){return q.strip};l.prototype.PartialStatement=l.prototype.CommentStatement=function(q){var _=q.strip||{};return{inlineStandalone:!0,open:_.open,close:_.close}};function y_(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 D_(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 Pq(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 F(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}Q6.default=l;q8.exports=Q6.default});var $8=r((Wj)=>{Wj.__esModule=!0;Wj.SourceLocation=jj;Wj.id=vj;Wj.stripFlags=wj;Wj.stripComment=Oj;Wj.preparePath=Yj;Wj.prepareMustache=hj;Wj.prepareRawBlock=Tj;Wj.prepareBlock=kj;Wj.prepareProgram=zj;Wj.preparePartialBlock=Hj;function Kj(q){return q&&q.__esModule?q:{default:q}}var Pj=C(),x_=Kj(Pj);function L_(q,_){if(_=_.path?_.path.original:_,q.path.original!==_){var $={loc:q.path.loc};throw new x_.default(q.path.original+" doesn't match "+_,$)}}function jj(q,_){this.source=q,this.start={line:_.first_line,column:_.first_column},this.end={line:_.last_line,column:_.last_column}}function vj(q){if(/^\[.*\]$/.test(q))return q.substring(1,q.length-1);else return q}function wj(q,_){return{open:q.charAt(2)==="~",close:_.charAt(_.length-3)==="~"}}function Oj(q){return q.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function Yj(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 x_.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 hj(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 Tj(q,_,$,f){L_(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 kj(q,_,$,f,K,P){if(f&&f.path)L_(q,f);var j=/\*/.test(q.open);_.blockParams=q.blockParams;var v=void 0,O=void 0;if($){if(j)throw new x_.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 zj(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 Hj(q,_,$,f){return L_(q,$),{type:"PartialBlockStatement",name:q.path,params:q.params,hash:q.hash,program:_,openStrip:q.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var P8=r((Mj)=>{Mj.__esModule=!0;Mj.parseWithoutProcessing=K8;Mj.parse=Sj;function Gj(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 f8(q){return q&&q.__esModule?q:{default:q}}var bj=L6(),s_=f8(bj),ej=_8(),tj=f8(ej),ij=$8(),aj=Gj(ij),Cj=G();Mj.parser=s_.default;var Fq={};Cj.extend(Fq,aj);function K8(q,_){if(q.type==="Program")return q;s_.default.yy=Fq,Fq.locInfo=function(f){return new Fq.SourceLocation(_&&_.srcName,f)};var $=s_.default.parse(q);return $}function Sj(q,_){var $=K8(q,_),f=new tj.default(_);return f.accept($)}});var O8=r((Dj)=>{Dj.__esModule=!0;Dj.Compiler=B_;Dj.precompile=Ij;Dj.compile=yj;function v8(q){return q&&q.__esModule?q:{default:q}}var Rj=C(),Gq=v8(Rj),bq=G(),Ej=g_(),dq=v8(Ej),gj=[].slice;function B_(){}B_.prototype={compiler:B_,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||!w8(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=bq.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 Gq.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(_){j8(_);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 Gq.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(_){j8(_);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 Gq.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,dq.default.helpers.simpleId(P))},PathExpression:function(_){this.addDepth(_.depth),this.opcode("getContext",_.depth);var $=_.parts[0],f=dq.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:gj.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(_){if(!_)return;this.useDepths=!0},classifySexpr:function(_){var $=dq.default.helpers.simpleId(_.path),f=$&&!!this.blockParamIndex(_.path.parts[0]),K=!f&&dq.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&&!dq.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&&bq.indexOf(K,_);if(K&&P>=0)return[$,P]}}};function Ij(q,_,$){if(q==null||typeof q!=="string"&&q.type!=="Program")throw new Gq.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 yj(q,_,$){if(_===void 0)_={};if(q==null||typeof q!=="string"&&q.type!=="Program")throw new Gq.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+q);if(_=bq.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 w8(q,_){if(q===_)return!0;if(bq.isArray(q)&&bq.isArray(_)&&q.length===_.length){for(var $=0;$<q.length;$++)if(!w8(q[$],_[$]))return!1;return!0}}function j8(q){if(!q.path.parts){var _=q.path;q.path={type:"PathExpression",data:!1,depth:0,parts:[_.original+""],original:_.original+"",loc:_.loc}}}});var h8=r((Uj)=>{var Y8="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Uj.encode=function(q){if(0<=q&&q<Y8.length)return Y8[q];throw TypeError("Must be between 0 and 63: "+q)};Uj.decode=function(q){var _=65,$=90,f=97,K=122,P=48,j=57,v=43,O=47,w=26,h=52;if(_<=q&&q<=$)return q-_;if(f<=q&&q<=K)return q-f+w;if(P<=q&&q<=j)return q-P+h;if(q==v)return 62;if(q==O)return 63;return-1}});var F_=r(($4)=>{var T8=h8(),U_=5,k8=1<<U_,z8=k8-1,H8=k8;function q4(q){return q<0?(-q<<1)+1:(q<<1)+0}function _4(q){var _=(q&1)===1,$=q>>1;return _?-$:$}$4.encode=function(_){var $="",f,K=q4(_);do{if(f=K&z8,K>>>=U_,K>0)f|=H8;$+=T8.encode(f)}while(K>0);return $};$4.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=T8.decode(_.charCodeAt($++)),O===-1)throw Error("Invalid base64 digit: "+_.charAt($-1));v=!!(O&H8),O&=z8,P=P+(O<<j),j+=U_}while(v);f.value=_4(P),f.rest=$}});var zq=r((H4)=>{function P4(q,_,$){if(_ in q)return q[_];else if(arguments.length===3)return $;else throw Error('"'+_+'" is a required argument.')}H4.getArg=P4;var W8=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,j4=/^data:.+\,.+$/;function eq(q){var _=q.match(W8);if(!_)return null;return{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}}H4.urlParse=eq;function Tq(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 _}H4.urlGenerate=Tq;function Q_(q){var _=q,$=eq(q);if($){if(!$.path)return q;_=$.path}var f=H4.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=_,Tq($);return _}H4.normalize=Q_;function r8(q,_){if(q==="")q=".";if(_==="")_=".";var $=eq(_),f=eq(q);if(f)q=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return Tq($)}if($||_.match(j4))return _;if(f&&!f.host&&!f.path)return f.host=_,Tq(f);var K=_.charAt(0)==="/"?_:Q_(q.replace(/\/+$/,"")+"/"+_);if(f)return f.path=K,Tq(f);return K}H4.join=r8;H4.isAbsolute=function(q){return q.charAt(0)==="/"||W8.test(q)};function v4(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)}H4.relative=v4;var J8=function(){var q=Object.create(null);return!("__proto__"in q)}();function Z8(q){return q}function w4(q){if(m8(q))return"$"+q;return q}H4.toSetString=J8?Z8:w4;function O4(q){if(m8(q))return q.slice(1);return q}H4.fromSetString=J8?Z8:O4;function m8(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 Y4(q,_,$){var f=kq(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 kq(q.name,_.name)}H4.compareByOriginalPositions=Y4;function h4(q,_,$){var f=q.generatedLine-_.generatedLine;if(f!==0)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0||$)return f;if(f=kq(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 kq(q.name,_.name)}H4.compareByGeneratedPositionsDeflated=h4;function kq(q,_){if(q===_)return 0;if(q===null)return 1;if(_===null)return-1;if(q>_)return 1;return-1}function T4(q,_){var $=q.generatedLine-_.generatedLine;if($!==0)return $;if($=q.generatedColumn-_.generatedColumn,$!==0)return $;if($=kq(q.source,_.source),$!==0)return $;if($=q.originalLine-_.originalLine,$!==0)return $;if($=q.originalColumn-_.originalColumn,$!==0)return $;return kq(q.name,_.name)}H4.compareByGeneratedPositionsInflated=T4;function k4(q){return JSON.parse(q.replace(/^\)]}'[^\n]*\n/,""))}H4.parseSourceMapInput=k4;function z4(q,_,$){if(_=_||"",q){if(q[q.length-1]!=="/"&&_[0]!=="/")q+="/";_=q+_}if($){var f=eq($);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)}_=r8(Tq(f),_)}return Q_(_)}H4.computeSourceURL=z4});var $$=r((e4)=>{var q$=zq(),_$=Object.prototype.hasOwnProperty,jq=typeof Map<"u";function s(){this._array=[],this._set=jq?new Map:Object.create(null)}s.fromArray=function(_,$){var f=new s;for(var K=0,P=_.length;K<P;K++)f.add(_[K],$);return f};s.prototype.size=function(){return jq?this._set.size:Object.getOwnPropertyNames(this._set).length};s.prototype.add=function(_,$){var f=jq?_:q$.toSetString(_),K=jq?this.has(_):_$.call(this._set,f),P=this._array.length;if(!K||$)this._array.push(_);if(!K)if(jq)this._set.set(_,P);else this._set[f]=P};s.prototype.has=function(_){if(jq)return this._set.has(_);else{var $=q$.toSetString(_);return _$.call(this._set,$)}};s.prototype.indexOf=function(_){if(jq){var $=this._set.get(_);if($>=0)return $}else{var f=q$.toSetString(_);if(_$.call(this._set,f))return this._set[f]}throw Error('"'+_+'" is not in the set.')};s.prototype.at=function(_){if(_>=0&&_<this._array.length)return this._array[_];throw Error("No element indexed by "+_)};s.prototype.toArray=function(){return this._array.slice()};e4.ArraySet=s});var A8=r((a4)=>{var u8=zq();function i4(q,_){var $=q.generatedLine,f=_.generatedLine,K=q.generatedColumn,P=_.generatedColumn;return f>$||f==$&&P>=K||u8.compareByGeneratedPositionsInflated(q,_)<=0}function Qq(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Qq.prototype.unsortedForEach=function(_,$){this._array.forEach(_,$)};Qq.prototype.add=function(_){if(i4(this._last,_))this._last=_,this._array.push(_);else this._sorted=!1,this._array.push(_)};Qq.prototype.toArray=function(){if(!this._sorted)this._array.sort(u8.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};a4.MappingList=Qq});var f$=r((M4)=>{var tq=F_(),n=zq(),q_=$$().ArraySet,S4=A8().MappingList;function S(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 q_,this._names=new q_,this._mappings=new S4,this._sourcesContents=null}S.prototype._version=3;S.fromSourceMap=function(_){var $=_.sourceRoot,f=new S({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};S.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})};S.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}};S.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 q_,v=new q_;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 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,_.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)};S.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}))};S.prototype._serializeMappings=function(){var _=0,$=1,f=0,K=0,P=0,j=0,v="",O,w,h,Y,T=this._mappings.toArray();for(var z=0,J=T.length;z<J;z++){if(w=T[z],O="",w.generatedLine!==$){_=0;while(w.generatedLine!==$)O+=";",$++}else if(z>0){if(!n.compareByGeneratedPositionsInflated(w,T[z-1]))continue;O+=","}if(O+=tq.encode(w.generatedColumn-_),_=w.generatedColumn,w.source!=null){if(Y=this._sources.indexOf(w.source),O+=tq.encode(Y-j),j=Y,O+=tq.encode(w.originalLine-1-K),K=w.originalLine-1,O+=tq.encode(w.originalColumn-f),f=w.originalColumn,w.name!=null)h=this._names.indexOf(w.name),O+=tq.encode(h-P),P=h}v+=O}return v};S.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)};S.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 _};S.prototype.toString=function(){return JSON.stringify(this.toJSON())};M4.SourceMapGenerator=S});var o8=r((N4)=>{N4.GREATEST_LOWER_BOUND=1;N4.LEAST_UPPER_BOUND=2;function K$(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 K$(j,_,$,f,K,P);if(P==N4.LEAST_UPPER_BOUND)return _<f.length?_:-1;else return j}else{if(j-q>1)return K$(q,j,$,f,K,P);if(P==N4.LEAST_UPPER_BOUND)return j;else return q<0?-1:q}}N4.search=function(_,$,f,K){if($.length===0)return-1;var P=K$(-1,$.length,_,$,f,K||N4.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var n8=r((R4)=>{function j$(q,_,$){var f=q[_];q[_]=q[$],q[$]=f}function c4(q,_){return Math.round(q+Math.random()*(_-q))}function v$(q,_,$,f){if($<f){var K=c4($,f),P=$-1;j$(q,K,f);var j=q[f];for(var v=$;v<f;v++)if(_(q[v],j)<=0)P+=1,j$(q,P,v);j$(q,P+1,v);var O=P+1;v$(q,_,$,O-1),v$(q,_,O+1,f)}}R4.quickSort=function(q,_){v$(q,_,0,q.length-1)}});var d8=r((I4)=>{var H=zq(),w$=o8(),Hq=$$().ArraySet,g4=F_(),iq=n8().quickSort;function A(q,_){var $=q;if(typeof q==="string")$=H.parseSourceMapInput(q);return $.sections!=null?new V($,_):new d($,_)}A.fromSourceMap=function(q,_){return d.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,w$.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};I4.SourceMapConsumer=A;function d(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(h){return j&&H.isAbsolute(j)&&H.isAbsolute(h)?H.relative(j,h):h}),this._names=Hq.fromArray(P.map(String),!0),this._sources=Hq.fromArray(K,!0),this._absoluteSources=this._sources.toArray().map(function(h){return H.computeSourceURL(j,h,_)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=O,this._sourceMapURL=_,this.file=w}d.prototype=Object.create(A.prototype);d.prototype.consumer=A;d.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};d.fromSourceMap=function(_,$){var f=Object.create(d.prototype),K=f._names=Hq.fromArray(_._names.toArray(),!0),P=f._sources=Hq.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,h=j.length;w<h;w++){var Y=j[w],T=new p8;if(T.generatedLine=Y.generatedLine,T.generatedColumn=Y.generatedColumn,Y.source){if(T.source=P.indexOf(Y.source),T.originalLine=Y.originalLine,T.originalColumn=Y.originalColumn,Y.name)T.name=K.indexOf(Y.name);O.push(T)}v.push(T)}return iq(f.__originalMappings,H.compareByOriginalPositions),f};d.prototype._version=3;Object.defineProperty(d.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function p8(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}d.prototype._parseMappings=function(_,$){var f=1,K=0,P=0,j=0,v=0,O=0,w=_.length,h=0,Y={},T={},z=[],J=[],m,W,Z,g,wq;while(h<w)if(_.charAt(h)===";")f++,h++,K=0;else if(_.charAt(h)===",")h++;else{m=new p8,m.generatedLine=f;for(g=h;g<w;g++)if(this._charIsMappingSeparator(_,g))break;if(W=_.slice(h,g),Z=Y[W],Z)h+=W.length;else{Z=[];while(h<g)g4.decode(_,h,T),wq=T.value,h=T.rest,Z.push(wq);if(Z.length===2)throw Error("Found a source, but no line and column");if(Z.length===3)throw Error("Found a source and line, but no column");Y[W]=Z}if(m.generatedColumn=K+Z[0],K=m.generatedColumn,Z.length>1){if(m.source=v+Z[1],v+=Z[1],m.originalLine=P+Z[2],P=m.originalLine,m.originalLine+=1,m.originalColumn=j+Z[3],j=m.originalColumn,Z.length>4)m.name=O+Z[4],O+=Z[4]}if(J.push(m),typeof m.originalLine==="number")z.push(m)}iq(J,H.compareByGeneratedPositionsDeflated),this.__generatedMappings=J,iq(z,H.compareByOriginalPositions),this.__originalMappings=z};d.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 w$.search(_,$,P,j)};d.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}};d.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}};d.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(_){return _==null})};d.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.')};d.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}};I4.BasicSourceMapConsumer=d;function V(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 Hq,this._names=new Hq;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"),_)}})}V.prototype=Object.create(A.prototype);V.prototype.constructor=A;V.prototype._version=3;Object.defineProperty(V.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}});V.prototype.originalPositionFor=function(_){var $={generatedLine:H.getArg(_,"line"),generatedColumn:H.getArg(_,"column")},f=w$.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})};V.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(_){return _.consumer.hasContentsOfAllSources()})};V.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.')};V.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}};V.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 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)}}iq(this.__generatedMappings,H.compareByGeneratedPositionsDeflated),iq(this.__originalMappings,H.compareByOriginalPositions)};I4.IndexedSourceMapConsumer=V});var G8=r((U4)=>{var L4=f$().SourceMapGenerator,__=zq(),s4=/(\r?\n)/,B4=10,Wq="$$$isSourceNode$$$";function t(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[Wq]=!0,f!=null)this.add(f)}t.fromStringWithSourceMap=function(_,$,f){var K=new t,P=_.split(s4),j=0,v=function(){var T=J(),z=J()||"";return T+z;function J(){return j<P.length?P[j++]:void 0}},O=1,w=0,h=null;if($.eachMapping(function(T){if(h!==null)if(O<T.generatedLine)Y(h,v()),O++,w=0;else{var z=P[j]||"",J=z.substr(0,T.generatedColumn-w);P[j]=z.substr(T.generatedColumn-w),w=T.generatedColumn,Y(h,J),h=T;return}while(O<T.generatedLine)K.add(v()),O++;if(w<T.generatedColumn){var z=P[j]||"";K.add(z.substr(0,T.generatedColumn)),P[j]=z.substr(T.generatedColumn),w=T.generatedColumn}h=T},this),j<P.length){if(h)Y(h,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(T){var z=$.sourceContentFor(T);if(z!=null){if(f!=null)T=__.join(f,T);K.setSourceContent(T,z)}}),K;function Y(T,z){if(T===null||T.source===void 0)K.add(z);else{var J=f?__.join(f,T.source):T.source;K.add(new t(T.originalLine,T.originalColumn,J,z,T.name))}}};t.prototype.add=function(_){if(Array.isArray(_))_.forEach(function($){this.add($)},this);else if(_[Wq]||typeof _==="string"){if(_)this.children.push(_)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};t.prototype.prepend=function(_){if(Array.isArray(_))for(var $=_.length-1;$>=0;$--)this.prepend(_[$]);else if(_[Wq]||typeof _==="string")this.children.unshift(_);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};t.prototype.walk=function(_){var $;for(var f=0,K=this.children.length;f<K;f++)if($=this.children[f],$[Wq])$.walk(_);else if($!=="")_($,{source:this.source,line:this.line,column:this.column,name:this.name})};t.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};t.prototype.replaceRight=function(_,$){var f=this.children[this.children.length-1];if(f[Wq])f.replaceRight(_,$);else if(typeof f==="string")this.children[this.children.length-1]=f.replace(_,$);else this.children.push("".replace(_,$));return this};t.prototype.setSourceContent=function(_,$){this.sourceContents[__.toSetString(_)]=$};t.prototype.walkSourceContents=function(_){for(var $=0,f=this.children.length;$<f;$++)if(this.children[$][Wq])this.children[$].walkSourceContents(_);var K=Object.keys(this.sourceContents);for(var $=0,f=K.length;$<f;$++)_(__.fromSetString(K[$]),this.sourceContents[K[$]])};t.prototype.toString=function(){var _="";return this.walk(function($){_+=$}),_};t.prototype.toStringWithSourceMap=function(_){var $={code:"",line:1,column:0},f=new L4(_),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,T=w.length;Y<T;Y++)if(w.charCodeAt(Y)===B4){if($.line++,$.column=0,Y+1===T)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}};U4.SourceNode=t});var b8=r((Q4)=>{Q4.SourceMapGenerator=f$().SourceMapGenerator;Q4.SourceMapConsumer=d8().SourceMapConsumer;Q4.SourceNode=G8().SourceNode});var a8=r((t8,i8)=>{t8.__esModule=!0;var Y$=G(),vq=void 0;try{if(typeof define!=="function"||!define.amd)h$=b8(),vq=h$.SourceNode}catch(q){}var h$;if(!vq)vq=function(q,_,$,f){if(this.src="",f)this.add(f)},vq.prototype={add:function(_){if(Y$.isArray(_))_=_.join("");this.src+=_},prepend:function(_){if(Y$.isArray(_))_=_.join("");this.src=_+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function O$(q,_,$){if(Y$.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 e8(q){this.srcFile=q,this.source=[]}e8.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 vq(_.start.line,_.start.column,this.srcFile)},wrap:function(_){var $=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(_ instanceof vq)return _;return _=O$(_,this,$),new vq($.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=O$(_[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(O$(_[f],this))}return $},generateArray:function(_){var $=this.generateList(_);return $.prepend("["),$.add("]"),$}};t8.default=e8;i8.exports=t8.default});var l8=r((V8,N8)=>{V8.__esModule=!0;function M8(q){return q&&q.__esModule?q:{default:q}}var C8=xq(),P7=C(),T$=M8(P7),j7=G(),v7=a8(),S8=M8(v7);function rq(q){this.value=q}function Jq(){}Jq.prototype={nameLookup:function(_,$){return this.internalNameLookup(_,$)},depthedLookup:function(_){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(_),")"]},compilerInfo:function(){var _=C8.COMPILER_REVISION,$=C8.REVISION_CHANGES[_];return[_,$]},appendToBuffer:function(_,$,f){if(!j7.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 T$.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 T=this.context,z=T.programs,W=T.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 v8.default(this.options.srcName),this.decorators=new v8.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 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 T=this.context,z=T.programs,J=T.decorators;for(O=0,w=z.length;O<w;O++)if(z[O]){if(Y[O]=z[O],J[O])Y[O+"_d"]=J[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 S8.default(this.options.srcName),this.decorators=new S8.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 Uq="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(u4(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:Yq,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 Oq))q=this.source.wrap(q);return this.inlineStack.push(q),q},pushStackLiteral:function(q){this.push(new Oq(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 y_.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof Oq)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 Oq)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 Oq)return f.value;else{if(!$){if(!this.stackSlot)throw new y_.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var q=this.isInline()?this.inlineStack:this.compileStack,$=q[q.length-1];if($ instanceof Oq)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 T=$;while(T--){if(w=this.popStack(),f[T]=w,this.trackIds)v[T]=this.popStack();if(this.stringParams)j[T]=this.popStack(),P[T]=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=Yq.RESERVED_WORDS={};for(var $=0,f=_.length;$<f;$++)q[_[$]]=!0})();Yq.isValidJavaScriptVariableName=function(_){return!Yq.RESERVED_WORDS[_]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(_)};function u4(_,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}O8.default=Yq;Y8.exports=O8.default});var z8=H((k8,r8)=>{k8.__esModule=!0;function Aq(_){return _&&_.__esModule?_:{default:_}}var A4=r6(),X4=Aq(A4),p4=n_(),e4=Aq(p4),D_=i6(),x_=C6(),d4=h8(),t4=Aq(d4),G4=Mq(),i4=Aq(G4),a4=J_(),b4=Aq(a4),S4=X4.default.create;function T8(){var _=S4();return _.compile=function(q,$){return x_.compile(q,$,_)},_.precompile=function(q,$){return x_.precompile(q,$,_)},_.AST=e4.default,_.Compiler=x_.Compiler,_.JavaScriptCompiler=t4.default,_.Parser=D_.parser,_.parse=D_.parse,_.parseWithoutProcessing=D_.parseWithoutProcessing,_}var hq=T8();hq.create=T8;b4.default(hq);hq.Visitor=i4.default;hq.default=hq;k8.default=hq;r8.exports=k8.default});var H8=H((E4)=>{E4.__esModule=!0;E4.print=c4;E4.PrintVisitor=Z;function V4(_){return _&&_.__esModule?_:{default:_}}var M4=Mq(),N4=V4(M4);function c4(_){return new Z().accept(_)}function Z(){this.padding=0}Z.prototype=new N4.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 m8=H((Av,Z8)=>{var gq=z8().default,J8=H8();gq.PrintVisitor=J8.PrintVisitor;gq.print=J8.print;Z8.exports=gq;function W8(_,q){var $=kq("fs"),f=$.readFileSync(q,"utf8");_.exports=gq.compile(f)}if(kq.extensions)kq.extensions[".handlebars"]=W8,kq.extensions[".hbs"]=W8});var g=Fq(q_(),1),k={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 $f}from"path";var w$={info:()=>{},verbose:()=>{},warn:()=>{},error:()=>{}};function O$(_="info"){if(_==="silent")return w$;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 Y$(_,q,$={}){let f=_.app.typescript,K=_.app.ssr===!0,P=_.app.ssr==="ssg",j=!K&&!P,v=$.templateDir??$f(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??w$}}class rq extends Error{code;constructor(_,q){super(_);this.code=q;this.name="VaspError"}}class b 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(w7(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:Jq,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 rq))_=this.source.wrap(_);return this.inlineStack.push(_),_},pushStackLiteral:function(_){this.push(new rq(_))},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 T$.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof rq)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 rq)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 rq)return f.value;else{if(!$){if(!this.stackSlot)throw new T$.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var _=this.isInline()?this.inlineStack:this.compileStack,$=_[_.length-1];if($ instanceof rq)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 h=this.popStack(),Y=this.popStack();if(Y||h)K.fn=Y||"container.noop",K.inverse=h||"container.noop";var T=$;while(T--){if(w=this.popStack(),f[T]=w,this.trackIds)v[T]=this.popStack();if(this.stringParams)j[T]=this.popStack(),P[T]=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(" "),_=Jq.RESERVED_WORDS={};for(var $=0,f=q.length;$<f;$++)_[q[$]]=!0})();Jq.isValidJavaScriptVariableName=function(q){return!Jq.RESERVED_WORDS[q]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(q)};function w7(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}V8.default=Jq;N8.exports=V8.default});var g8=r((R8,E8)=>{R8.__esModule=!0;function aq(q){return q&&q.__esModule?q:{default:q}}var h7=E6(),T7=aq(h7),k7=g_(),z7=aq(k7),k$=P8(),z$=O8(),H7=l8(),W7=aq(H7),r7=Uq(),J7=aq(r7),Z7=l_(),m7=aq(Z7),u7=T7.default.create;function c8(){var q=u7();return q.compile=function(_,$){return z$.compile(_,$,q)},q.precompile=function(_,$){return z$.precompile(_,$,q)},q.AST=z7.default,q.Compiler=z$.Compiler,q.JavaScriptCompiler=W7.default,q.Parser=k$.parser,q.parse=k$.parse,q.parseWithoutProcessing=k$.parseWithoutProcessing,q}var Zq=c8();Zq.create=c8;m7.default(Zq);Zq.Visitor=J7.default;Zq.default=Zq;R8.default=Zq;E8.exports=R8.default});var I8=r((G7)=>{G7.__esModule=!0;G7.print=d7;G7.PrintVisitor=X;function o7(q){return q&&q.__esModule?q:{default:q}}var n7=Uq(),p7=o7(n7);function d7(q){return new X().accept(q)}function X(){this.padding=0}X.prototype=new p7.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 L8=r((l9,x8)=>{var $_=g8().default,D8=I8();$_.PrintVisitor=D8.PrintVisitor;$_.print=D8.print;x8.exports=$_;function y8(q,_){var $=$q("fs"),f=$.readFileSync(_,"utf8");q.exports=$_.compile(f)}if($q.extensions)$q.extensions[".handlebars"]=y8,$q.extensions[".hbs"]=y8});var U=z_(W_(),1),k={info:(q)=>console.log(U.default.cyan(" \u25B8"),q),success:(q)=>console.log(U.default.green(" \u2713"),q),warn:(q)=>console.warn(U.default.yellow(" \u26A0"),q),error:(q)=>console.error(U.default.red(" \u2717"),q),step:(q)=>console.log(U.default.bold(U.default.white(`
26
+ ${q}`))),dim:(q)=>console.log(U.default.dim(` ${q}`))};class Aq extends Error{code;constructor(q,_){super(q);this.code=_;this.name="VaspError"}}class e extends Aq{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.3.0";var __=["usernameAndPassword","google","github"],$_=["list","create","update","delete"],f_=["created","updated","deleted"];var S=3001,$q=5173,h$=3000;import{join as Pf}from"path";import{mkdirSync as T$,writeFileSync as ff}from"fs";import{dirname as Kf}from"path";function k$(_,q){T$(Kf(_),{recursive:!0}),ff(_,q,"utf8")}function r$(_){T$(_,{recursive:!0})}class n{ctx;engine;filesWritten;constructor(_,q,$){this.ctx=_;this.engine=q;this.filesWritten=$}write(_,q){let $=Pf(this.ctx.outputDir,_);k$($,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}}}class K_ 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:S};if(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 P_ extends n{run(){this.ctx.logger.info("Generating Elysia backend...");let _={backendPort:S,frontendPort:$q,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 u8=Fq(m8(),1);import{readFileSync as y4,readdirSync as D4,statSync as x4}from"fs";import{extname as L4,join as s4,relative as B4}from"path";class L_{cache=new Map;hbs;constructor(){this.hbs=u8.default.create(),this.registerHelpers()}loadDirectory(_){this.walkHbs(_,(q)=>{let $=B4(_,q),f=y4(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",(_)=>l(_)),this.hbs.registerHelper("pascalCase",(_)=>U4(_)),this.hbs.registerHelper("kebabCase",(_)=>F4(_)),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"}('${l(_)}')`;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{$=D4(_)}catch{return}for(let f of $){let K=s4(_,f);if(x4(K).isDirectory())this.walkHbs(K,q);else if(L4(K)===".hbs")q(K)}}}function l(_){return _.replace(/[-_\s]+(.)/g,(q,$)=>$.toUpperCase()).replace(/^./,(q)=>q.toLowerCase())}function U4(_){let q=l(_);return q.charAt(0).toUpperCase()+q.slice(1)}function F4(_){return _.replace(/([A-Z])/g,"-$1").replace(/[\s_]+/g,"-").toLowerCase().replace(/^-/,"")}class s_ 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/${l(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 B_ 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 n8}from"fs";import{join as o8}from"path";class U_ 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:S,frontendPort:$q};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=o8(this.ctx.outputDir,v);if(!n8(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:S};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=o8(this.ctx.outputDir,O);if(!n8(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 Rq extends Aq{generatorName;cause;constructor(q,_,$){super(q,"GENERATOR_ERROR");this.generatorName=_;this.cause=$;this.name="GeneratorError"}}var N="0.9.0";var r_=["usernameAndPassword","google","github"],J_=["GET","POST","PUT","PATCH","DELETE"],Z_=["global","route"],m_=["list","create","update","delete"],u_=["created","updated","deleted"];var Eq=["String","Int","Boolean","DateTime","Float","Text","Json","Enum"],M=3001,Yq=5173,a$=3000;import{join as Nf}from"path";var C$={info:()=>{},verbose:()=>{},warn:()=>{},error:()=>{}};function S$(q="info"){if(q==="silent")return C$;return{info:(_)=>console.log(` ${_}`),verbose:(_)=>q==="verbose"?console.log(` ${_}`):void 0,warn:(_)=>console.warn(` \u26A0 ${_}`),error:(_)=>console.error(` \u2717 ${_}`)}}function M$(q,_,$={}){let f=q.app.typescript,K=q.app.ssr===!0,P=q.app.ssr==="ssg",j=!K&&!P,v=$.templateDir??Nf(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??C$}}import{join as yf}from"path";import{copyFileSync as lf,existsSync as V$,mkdirSync as gq,readFileSync as cf,readdirSync as Rf,rmSync as Ef,writeFileSync as gf}from"fs";import{dirname as N$,join as A_,relative as If}from"path";function l$(q,_){gq(N$(q),{recursive:!0}),gf(q,_,"utf8")}function c$(q){gq(q,{recursive:!0})}function Iq(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 Xq(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 R$(q,_,$={}){let f=new Set;if($.preserveEnv){let K=A_(_,".env");if(V$(K)){let j=Iq(cf(K,"utf8")).DATABASE_URL;if(j&&!Xq(j))f.add(".env")}}E$(q,_,q,f)}function E$(q,_,$,f){gq(_,{recursive:!0});for(let K of Rf(q,{withFileTypes:!0})){let P=A_(q,K.name),j=A_(_,K.name);if(K.isDirectory())E$(P,j,$,f);else{let v=If($,P);if(f.has(v))continue;gq(N$(j),{recursive:!0}),lf(P,j)}}}function X_(q){if(V$(q))Ef(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 $=yf(this.ctx.outputDir,q);l$($,_),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 o_ 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:M};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 Df}from"fs";import{join as xf}from"path";class n_ 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(Df(xf(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 p_ 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:M,frontendPort:Yq,vaspVersion:N,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 s8=z_(L8(),1);import{readFileSync as i7,readdirSync as a7,statSync as C7}from"fs";import{extname as S7,join as M7,relative as V7}from"path";class H${cache=new Map;hbs;constructor(){this.hbs=s8.default.create(),this.registerHelpers()}loadDirectory(q){this.walkHbs(q,(_)=>{let $=V7(q,_),f=i7(_,"utf8");try{this.cache.set($,this.hbs.compile(f))}catch(K){throw new Rq(`Failed to compile template ${$}: ${String(K)}`,"TemplateEngine")}})}render(q,_){let $=this.cache.get(q);if(!$)throw new Rq(`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)=>o(q)),this.hbs.registerHelper("pascalCase",(q)=>f_(q)),this.hbs.registerHelper("kebabCase",(q)=>N7(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"}('${o(q)}')`;if(Array.isArray($))if($.includes("id"))if(_==="Int")O=`integer('${o(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{$=a7(q)}catch{return}for(let f of $){let K=M7(q,f);if(C7(K).isDirectory())this.walkHbs(K,_);else if(S7(K)===".hbs")_(K)}}}function o(q){return q.replace(/[-_\s]+(.)/g,(_,$)=>$.toUpperCase()).replace(/^./,(_)=>_.toLowerCase())}function f_(q){let _=o(q);return _.charAt(0).toUpperCase()+_.slice(1)}function N7(q){return q.replace(/([A-Z])/g,"-$1").replace(/[\s_]+/g,"-").toLowerCase().replace(/^-/,"")}class W$ 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:`${o(w.relatedEntity)}s`})),O=v.length>0;this.write(`server/routes/crud/${o(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 r$ extends u{run(){this.ctx.logger.info("Generating Drizzle schema...");let{ast:q}=this.ctx,_=new Set(["createdAt","updatedAt"]),$=new Set(q.entities.map((T)=>T.name)),f=[];for(let T of q.entities)for(let z of T.fields)if(z.type==="Enum"&&z.enumValues)f.push({fnName:`${o(T.name)}${f_(z.name)}Enum`,dbName:`${o(T.name)}_${o(z.name)}`,values:z.enumValues});let K=f.length>0,P=q.entities.map((T)=>{let z=T.fields.filter((W)=>!_.has(W.name)&&!(W.isRelation&&W.isArray)).map((W)=>{if(!W.isRelation){let Z=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:Z,enumFnName:Z?`${o(T.name)}${f_(W.name)}Enum`:void 0}}return{name:`${W.name}Id`,type:"Int",modifiers:[],nullable:W.nullable,defaultValue:void 0,isUpdatedAt:!1,isForeignKey:!0,referencedTable:`${o(W.relatedEntity)}s`,onDelete:W.onDelete??"cascade"}}),J=T.fields.filter((W)=>W.isRelation&&!W.isArray&&$.has(W.relatedEntity)).map((W)=>({name:W.name,relatedEntity:W.relatedEntity,relatedTable:`${o(W.relatedEntity)}s`,localField:`${o(W.name)}Id`,onDelete:W.onDelete??"cascade"})),m=T.fields.filter((W)=>W.isRelation&&W.isArray&&$.has(W.relatedEntity)).map((W)=>({fieldName:W.name,relatedEntity:W.relatedEntity,relatedTable:`${o(W.relatedEntity)}s`}));return{name:T.name,scalarFields:z,manyToOne:J,oneToMany:m,hasRelations:J.length>0||m.length>0}}),j=q.auth?.userEntity,v=[];if(j){let T=new Set(["id","username","email","createdAt","updatedAt"]),z=P.findIndex((J)=>J.name===j);if(z!==-1)v=P[z].scalarFields.filter((J)=>!T.has(J.name)),P.splice(z,1)}let O=new Set(q.entities.map((T)=>T.name));for(let T of q.cruds)if(!O.has(T.entity))P.push({name:T.entity,scalarFields:[],manyToOne:[],oneToMany:[],hasRelations:!1});let w=new Map(q.entities.map((T)=>[T.name,T.fields])),h=q.cruds.map((T)=>({...T,fields:(w.get(T.entity)??[]).filter((z)=>!_.has(z.name)&&!z.isRelation),hasEntity:w.has(T.entity)})),Y=P.some((T)=>T.hasRelations);this.write(`drizzle/schema.${this.ctx.ext}`,this.render("shared/drizzle/schema.hbs",{entitiesWithSchema:P,crudsWithFields:h,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 B8}from"fs";import{join as U8}from"path";class J$ 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:M,frontendPort:Yq};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=U8(this.ctx.outputDir,v);if(!B8(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:M};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=U8(this.ctx.outputDir,O);if(!B8(w)){let h=j.kind==="default"?j.defaultExport:j.namedExport;this.write(O,this.scaffoldVuePage(h))}}}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 F_ 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/${l($.name)}.${q}`,this.render("shared/jobs/_job.hbs",{name:$.name,namedExport:K,fnSource:f.source,schedule:$.schedule,hasSchedule:!!$.schedule})),this.write(`server/routes/jobs/${l($.name)}Schedule.${q}`,this.render("shared/server/routes/jobs/_schedule.hbs",{name:$.name}))}}}class Q_ 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=f.source;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=f.source;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 q$ 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/${l($.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 Q4}from"path";class _$ 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 f of _)r$(Q4(this.ctx.outputDir,f));let q=this.ctx.isSpa?$q:h$,$=this.render("shared/package.json.hbs",{vaspVersion:I,backendPort:S,frontendPort:q,authMethods:this.ctx.ast.auth?.methods??[]});if(this.write("package.json",$),this.write("bunfig.toml",this.render("shared/bunfig.toml.hbs")),this.write(".gitignore",this.render("shared/.gitignore.hbs")),this.write(".env.example",this.render("shared/.env.example.hbs",{backendPort:S,frontendPort:q,authMethods:this.ctx.ast.auth?.methods??[]})),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 $=O$(q.logLevel??"info"),f=Y$(_,q.outputDir,{...q.templateDir!==void 0?{templateDir:q.templateDir}:{},logger:$}),K=new L_;K.loadDirectory(f.templateDir);let P=[],j=[];try{return new _$(f,K,P).run(),new B_(f,K,P).run(),new P_(f,K,P).run(),new K_(f,K,P).run(),new Q_(f,K,P).run(),new s_(f,K,P).run(),new q$(f,K,P).run(),new F_(f,K,P).run(),new U_(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"]),A8=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 b([{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 b([{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 b([{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 b([{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(A8.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 p8(_,q="main.vasp"){let $=new Iq(_,q).tokenize();return new e8($,q).parse()}function q7(_){let q=_.match(/:([^/]+)/g);return q?q.map(($)=>$.slice(1)):[]}class e8{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=q7($);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 b([{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.diagnostics.length>0)throw new b(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(!$_.includes($))this.diagnostics.push({code:"E103_UNKNOWN_CRUD_OPERATION",message:`Unknown crud operation '${$}' in '${q.name}'`,hint:`Supported operations: ${$_.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(!f_.includes(f))this.diagnostics.push({code:"E105_UNKNOWN_REALTIME_EVENT",message:`Unknown realtime event '${f}' in '${$.name}'`,hint:`Supported events: ${f_.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(!__.includes(q))this.diagnostics.push({code:"E107_UNKNOWN_AUTH_METHOD",message:`Unknown auth method '${q}'`,hint:`Supported methods: ${__.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})}}function qq(_,q="main.vasp"){let $=p8(_,q);return new yq().validate($),$}import{join as _7,resolve as $7}from"path";import{existsSync as t8,mkdirSync as f7,readFileSync as K7}from"fs";import{join as Dq}from"path";import{existsSync as xq}from"fs";function Tq(_){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 Z$ 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/${o($.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/${o($.name)}Schedule.${_}`,this.render("shared/server/routes/jobs/_schedule.hbs",{name:$.name}))}}}import{existsSync as l7}from"fs";import{join as c7}from"path";class m$ 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(l7(c7(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 R7}from"fs";import{join as E7}from"path";class u$ 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(R7(E7(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 A$ 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/${o($.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 g7}from"path";class X$ 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)c$(g7(this.ctx.outputDir,K));let _=this.ctx.isSpa?Yq:a$,$=this.render("shared/package.json.hbs",{vaspVersion:N,backendPort:M,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:M,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:M})),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 I7}from"fs";import{join as y7}from"path";class o$ 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=y7(this.ctx.outputDir,$);if(I7(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 D7}from"crypto";import{existsSync as x7,mkdirSync as L7,readFileSync as s7,writeFileSync as B7}from"fs";import{join as n$}from"path";var F8=".vasp",Q8="manifest.json";class Q{data;constructor(q){this.data={version:q,generatedAt:new Date().toISOString(),files:{}}}record(q,_,$){this.data.files[q]={hash:Cq(_),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 _=n$(q,F8);L7(_,{recursive:!0}),B7(n$(_,Q8),JSON.stringify(this.data,null,2),"utf8")}static load(q){let _=n$(q,F8,Q8);if(!x7(_))return null;let $=s7(_,"utf8"),f=JSON.parse($),K=new Q(f.version);return K.data=f,K}}function Cq(q){return D7("sha256").update(q,"utf8").digest("hex")}import{dirname as U7,join as F7}from"path";import{mkdirSync as Q7}from"fs";function c(q,_){let $=S$(_.logLevel??"info"),f=_.outputDir,K=F7(U7(f),`.vasp-staging-${Date.now()}`);Q7(K,{recursive:!0});let P=M$(q,K,{..._.templateDir!==void 0?{templateDir:_.templateDir}:{},logger:$}),j=new H$;j.loadDirectory(P.templateDir);let v=[],O=[],w=new Q(N);try{return new X$(P,j,v,w).run(),new r$(P,j,v,w).run(),new p_(P,j,v,w).run(),new o_(P,j,v,w).run(),new m$(P,j,v,w).run(),new u$(P,j,v,w).run(),new n_(P,j,v,w).run(),new W$(P,j,v,w).run(),new A$(P,j,v,w).run(),new Z$(P,j,v,w).run(),new o$(P,j,v,w).run(),new J$(P,j,v,w).run(),R$(K,f,{preserveEnv:!0}),w.save(f),X_(K),$.info(`\u2713 Generated ${v.length} files`),{success:!0,filesWritten:v,errors:[],warnings:O}}catch(h){X_(K);let Y=h instanceof Error?h.message:String(h);return $.error(Y),{success:!1,filesWritten:v,errors:[Y],warnings:O}}}var Sq=new Set(["app","auth","entity","route","page","query","action","api","middleware","crud","realtime","job","seed"]),qf=new Set([...Sq,"import","from"]);class K_{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 e([{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 e([{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 e([{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 e([{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 e([{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(qf.has(_)){if(Sq.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 $f(q,_="main.vasp"){let $=new K_(q,_).tokenize();return new ff($,_).parse()}function qv(q){let _=q.match(/:([^/]+)/g);return _?_.map(($)=>$.slice(1)):[]}class ff{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),h=[],Y=!1,T,z,J=!1;while(this.check("AT_MODIFIER")){let Z=this.consume("AT_MODIFIER").value;if(Z==="id")h.push("id");else if(Z==="unique")h.push("unique");else if(Z==="default_now")h.push("default_now"),T="now";else if(Z==="nullable")Y=!0,h.push("nullable");else if(Z==="updatedAt")J=!0,h.push("updatedAt");else if(Z.startsWith("default_"))T=Z.slice(8);else if(Z.startsWith("onDelete_"))z=Z.slice(9)}let m={name:K.value,type:j,modifiers:h,isRelation:w,isArray:O,nullable:Y,isUpdatedAt:J};if(w)m.relatedEntity=j;if(T!==void 0)m.defaultValue=T;if(z!==void 0)m.onDelete=z;if(v!==void 0)m.enumValues=v;f.push(m)}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=qv($);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"&&!Sq.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 e([{code:q,message:_,hint:$,...f!==void 0?{loc:f}:{}}])}}class P_{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 e(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(!m_.includes($))this.diagnostics.push({code:"E103_UNKNOWN_CRUD_OPERATION",message:`Unknown crud operation '${$}' in '${_.name}'`,hint:`Supported operations: ${m_.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(!u_.includes(f))this.diagnostics.push({code:"E105_UNKNOWN_REALTIME_EVENT",message:`Unknown realtime event '${f}' in '${$.name}'`,hint:`Supported events: ${u_.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(!r_.includes(_))this.diagnostics.push({code:"E107_UNKNOWN_AUTH_METHOD",message:`Unknown auth method '${_}'`,hint:`Supported methods: ${r_.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(!J_.includes($.method))this.diagnostics.push({code:"E116_UNKNOWN_API_METHOD",message:`Unknown API method '${$.method}' in '${$.name}'`,hint:`Supported methods: ${J_.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(!Z_.includes(_.scope))this.diagnostics.push({code:"E121_UNKNOWN_MIDDLEWARE_SCOPE",message:`Unknown middleware scope '${_.scope}' in '${_.name}'`,hint:`Supported scopes: ${Z_.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: ${Eq.join(", ")}`,loc:$.loc})}else if(!Eq.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: ${Eq.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"},Kf=globalThis.process,_v=Kf?.env?.NO_COLOR!==void 0||!Kf?.stdout?.isTTY;function R(q,_){return _v?_:`${q}${_}${i.reset}`}function p$(q,_,$="main.vasp"){let f=_.split(`
67
+ `);return q.map((K)=>$v(K,f,$)).join(`
68
+
69
+ `)}function $v(q,_,$){let f=R(i.red+i.bold,`error[${q.code}]`)+R(i.bold,`: ${q.message}`);if(!q.loc||q.loc.line===0){let p=` ${R(i.cyan,"= hint:")} ${q.hint}`;return`${f}
70
+ ${p}`}let{line:K,col:P}=q.loc,j=K,v=P,O=_[j-1]??"",w=j>1?_[j-2]:null,h=_[j]??null,Y=String(j+(h?1:0)).length,T=(p)=>String(p).padStart(Y," "),z=R(i.cyan,"|"),J=` ${R(i.cyan,"-->")} ${$}:${j}:${v}`,m=`${T("")} ${z}`,W=[f,J,` ${m}`];if(w!==null)W.push(` ${R(i.dim,`${T(j-1)} |`)} ${w}`);W.push(` ${R(i.cyan,`${T(j)} |`)} ${O}`);let Z=Math.max(0,v-1),g=fv(O,Z),wq=" ".repeat(Z)+R(i.red+i.bold,"^".repeat(g));if(W.push(` ${T("")} ${z} ${wq}`),h!==null&&h.trim()!=="")W.push(` ${R(i.dim,`${T(j+1)} |`)} ${h}`);return W.push(` ${m}`),W.push(` ${R(i.cyan,"= hint:")} ${q.hint}`),W.join(`
71
+ `)}function fv(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 E(q,_="main.vasp"){let $=$f(q,_);return new P_().validate($),$}import{join as Kv,resolve as Pv}from"path";import{existsSync as jf,mkdirSync as jv,readFileSync as vv}from"fs";function qq(q,_,$="main.vasp"){if(q instanceof e){let f=p$(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 k.error(`Failed to parse ${$}: ${String(q)}`);process.exit(1)}import{join as j_}from"path";import{existsSync as v_}from"fs";function B(q){let _=j_(q,"..","templates");if(v_(_))return _;let $=j_(q,"..","..","..","..","templates");if(v_($))return $;throw Error(`Templates directory not found. Searched:
75
+ ${_}
43
76
  ${$}
44
- Run 'bun run build' inside packages/cli to copy templates.`)}function d8(_){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 P7=d8(import.meta.dirname),G8=["minimal","todo","todo-auth-ssr"];async function i8(_){let q=_[0];if(!q)k.error("Please provide a project name: vasp new <project-name>"),process.exit(1);let $=j7(_.slice(1)),f=$7(process.cwd(),q);if(t8(f))k.error(`Directory '${q}' already exists`),process.exit(1);k.step(`Creating Vasp app: ${q}`),k.info(`Version: ${I}`);let K;if($.starter){if(!G8.includes($.starter))k.error(`Unknown starter '${$.starter}'. Available: ${G8.join(", ")}`),process.exit(1);let O=_7(P7,`${$.starter}.vasp`);if(!t8(O))k.error(`Starter file not found: ${O}`),process.exit(1);K=K7(O,"utf8"),K=K.replace(/^app \w+/m,`app ${a8(q)}`),k.info(`Starter: ${$.starter}`)}else k.info(`Mode: ${$.ssg?"SSG":$.ssr?"SSR":"SPA"} | Language: ${$.typescript?"TypeScript":"JavaScript"}`),K=v7(q,$);let P;try{P=qq(K,"main.vasp")}catch(O){k.error(`Internal error generating initial config: ${String(O)}`),process.exit(1)}let j=Tq(import.meta.dirname);f7(f,{recursive:!0});let v=Q(P,{outputDir:f,templateDir:j,logLevel:"info"});if(!v.success){k.error("Generation failed:");for(let O of v.errors)k.error(O);process.exit(1)}if(k.success(`Created ${v.filesWritten.length} files`),!$.noInstall){k.step("Installing dependencies...");let O=Bun.spawn(["bun","install"],{cwd:f,stdout:"inherit",stderr:"inherit"});if(await O.exited,O.exitCode!==0)k.warn("bun install failed \u2014 run it manually inside your project");else k.success("Dependencies installed")}k.step("\uD83D\uDE80 Your Vasp app is ready!"),k.dim(` cd ${q}`),k.dim(" vasp start")}function j7(_){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 v7(_,q){let $=q.ssg?'"ssg"':q.ssr?"true":"false";return`app ${a8(_)} {
47
- title: "${w7(_)}"
77
+ Run 'bun run build' inside packages/cli to copy templates.`)}function Pf(q){let _=j_(q,"..","starters");if(v_(_))return _;let $=j_(q,"..","..","starters");if(v_($))return $;throw Error(`Starters directory not found. Searched:
78
+ ${_}
79
+ ${$}`)}var wv=Pf(import.meta.dirname),vf=["minimal","todo","todo-auth-ssr","recipe"];async function wf(q){let _=q[0];if(!_)k.error("Please provide a project name: vasp new <project-name>"),process.exit(1);let $=Ov(q.slice(1)),f=Pv(process.cwd(),_);if(jf(f))k.error(`Directory '${_}' already exists`),process.exit(1);k.step(`Creating Vasp app: ${_}`),k.info(`Version: ${N}`);let K;if($.starter){if(!vf.includes($.starter))k.error(`Unknown starter '${$.starter}'. Available: ${vf.join(", ")}`),process.exit(1);let O=Kv(wv,`${$.starter}.vasp`);if(!jf(O))k.error(`Starter file not found: ${O}`),process.exit(1);K=vv(O,"utf8"),K=K.replace(/^app \w+/m,`app ${Of(_)}`),k.info(`Starter: ${$.starter}`)}else k.info(`Mode: ${$.ssg?"SSG":$.ssr?"SSR":"SPA"} | Language: ${$.typescript?"TypeScript":"JavaScript"}`),K=Yv(_,$);let P;try{P=E(K,"main.vasp")}catch(O){qq(O,K,"main.vasp")}let j=B(import.meta.dirname);jv(f,{recursive:!0});let v=c(P,{outputDir:f,templateDir:j,logLevel:"info"});if(!v.success){k.error("Generation failed:");for(let O of v.errors)k.error(O);process.exit(1)}if(k.success(`Created ${v.filesWritten.length} files`),!$.noInstall){k.step("Installing dependencies...");let O=Bun.spawn(["bun","install"],{cwd:f,stdout:"inherit",stderr:"inherit"});if(await O.exited,O.exitCode!==0)k.warn("bun install failed \u2014 run it manually inside your project");else k.success("Dependencies installed")}k.step("\uD83D\uDE80 Your Vasp app is ready!"),k.dim(""),k.dim(` cd ${_}`),k.dim(""),k.dim(" # Make sure PostgreSQL is running, then push the schema:"),k.dim(" bun run db:push"),k.dim(""),k.dim(" # Start the dev server:"),k.dim(" vasp start"),k.dim(""),k.dim(" Edit .env to configure your database connection.")}function Ov(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 Yv(q,_){let $=_.ssg?'"ssg"':_.ssr?"true":"false";return`app ${Of(q)} {
80
+ title: "${hv(q)}"
48
81
  db: Drizzle
49
82
  ssr: ${$}
50
- typescript: ${q.typescript}
83
+ typescript: ${_.typescript}
51
84
  }
52
85
 
53
86
  route HomeRoute {
@@ -58,18 +91,27 @@ route HomeRoute {
58
91
  page HomePage {
59
92
  component: import Home from "@src/pages/Home.vue"
60
93
  }
61
- `}function a8(_){return _.replace(/[-_\s]+(.)/g,(q,$)=>$.toUpperCase()).replace(/^./,(q)=>q.toUpperCase())}function w7(_){return _.replace(/[-_]+/g," ").replace(/\b\w/g,(q)=>q.toUpperCase())}import{join as Lq}from"path";import{existsSync as S8,readFileSync as b8,renameSync as O7,writeFileSync as Y7}from"fs";import{readdirSync as h7,statSync as T7}from"fs";async function C8(){let _=process.cwd(),q=Lq(_,"main.vasp");if(!S8(q))k.error("No main.vasp found. Run this command from your Vasp project root."),process.exit(1);let $=b8(q,"utf8");if(qq($,"main.vasp").app.typescript){k.warn("Project is already using TypeScript (typescript: true in main.vasp)");return}k.step("Migrating project to TypeScript...");let K=$.replace(/typescript:\s*false/,"typescript: true");Y7(q,K,"utf8"),k.success("Updated main.vasp: typescript: true");let P=$$(Lq(_,"src"));if($$(Lq(_,"server")),P.length>0)k.success(`Renamed ${P.length} .js files to .ts`);let j=b8(q,"utf8"),v=qq(j,"main.vasp"),O=Tq(import.meta.dirname),w=Q(v,{outputDir:_,templateDir:O,logLevel:"info"});if(!w.success){k.error("Regeneration failed:");for(let h of w.errors)k.error(h);process.exit(1)}k.step("\u2713 Migration complete!"),k.dim("Run: bun install (to add TypeScript devDependencies)"),k.dim("Run: bun run typecheck (to verify zero type errors)")}function $$(_){let q=[];if(!S8(_))return q;let $=h7(_);for(let f of $){let K=Lq(_,f);if(T7(K).isDirectory())q.push(...$$(K));else if(f.endsWith(".js")&&!f.endsWith(".config.js")){let j=K.slice(0,-3)+".ts";O7(K,j),q.push(j)}}return q}import{join as k7,resolve as r7}from"path";import{existsSync as z7,readFileSync as H7,writeFileSync as W7}from"fs";async function l8(){let _=r7(process.cwd()),q=k7(_,"main.vasp");if(!z7(q))k.error(`No main.vasp found in ${_}. Run this command inside a Vasp project.`),process.exit(1);let $=H7(q,"utf8");if(/ssr:\s*true/.test($)||/ssr:\s*"ssg"/.test($)){k.warn("SSR is already enabled in main.vasp \u2014 nothing to do.");return}if(!/ssr:\s*false/.test($))k.error("Could not find 'ssr: false' in main.vasp. Please update it manually."),process.exit(1);$=$.replace(/ssr:\s*false/,"ssr: true"),W7(q,$,"utf8"),k.step("Patched main.vasp: ssr: false \u2192 ssr: true");let f;try{f=qq($,"main.vasp")}catch(j){k.error(`Failed to parse updated main.vasp: ${String(j)}`),process.exit(1)}let K=Tq(import.meta.dirname),P=Q(f,{outputDir:_,templateDir:K,logLevel:"info"});if(!P.success){k.error("Regeneration failed:");for(let j of P.errors)k.error(j);process.exit(1)}k.success(`SSR enabled \u2014 ${P.filesWritten.length} files regenerated`),k.dim(" Run: bun install (if you have new deps)"),k.dim(" Run: vasp start")}import{join as J7,resolve as Z7}from"path";import{existsSync as m7,readFileSync as u7}from"fs";var f$=Fq(q_(),1);async function N8(){let _=Z7(process.cwd()),q=J7(_,"package.json");if(!m7(q))k.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let $=JSON.parse(u7(q,"utf8")),f=$.scripts?.["dev:server"],K=$.scripts?.["dev:client"];if(!f||!K)k.error("Missing 'dev:server' or 'dev:client' scripts in package.json."),process.exit(1);k.step("Starting Vasp dev servers..."),k.dim(` server: ${f}`),k.dim(` client: ${K}`),console.log();let[P,j]=await Promise.all([V8("server",f$.default.cyan,f,_),V8("client",f$.default.magenta,K,_)]);process.on("SIGINT",()=>{P.kill(),j.kill(),process.exit(0)}),process.on("SIGTERM",()=>{P.kill(),j.kill(),process.exit(0)});let[v,O]=await Promise.all([P.exited,j.exited]);if(v!==0||O!==0)process.exit(1)}async function V8(_,q,$,f){let K=q(`[${_}]`),[P,...j]=$.split(" "),v=Bun.spawn([P,...j],{cwd:f,stdout:"pipe",stderr:"pipe"});return M8(v.stdout,K,process.stdout),M8(v.stderr,K,process.stderr),v}async function M8(_,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 Of(q){return q.replace(/[-_\s]+(.)/g,(_,$)=>$.toUpperCase()).replace(/^./,(_)=>_.toUpperCase())}function hv(q){return q.replace(/[-_]+/g," ").replace(/\b\w/g,(_)=>_.toUpperCase())}import{join as mq,resolve as Tv}from"path";import{existsSync as w_,readFileSync as O_}from"fs";async function d$(q,_=!1){let $=mq(q,"main.vasp");if(!w_($))return{success:!1,added:0,updated:0,skipped:0,errors:["main.vasp not found"]};let f=O_($,"utf8"),K;try{K=E(f,"main.vasp")}catch(w){return{success:!1,added:0,updated:0,skipped:0,errors:[w instanceof Error?w.message:String(w)]}}let P=Q.load(q),j=B(import.meta.dirname),v=c(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=zv(P,v.filesWritten,q);return{success:!0,errors:[],...O}}async function Yf(q){let _=Wv(q),$=Tv(process.cwd()),f=mq($,"main.vasp");if(!w_(f))k.error(`No main.vasp found in ${$}. Run 'vasp generate' from your project root.`),process.exit(1);let K=O_(f,"utf8"),P;try{P=E(K,"main.vasp")}catch(O){qq(O,K,"main.vasp")}let j=Q.load($);if(!j)k.warn("No manifest found \u2014 this looks like a fresh app. Use vasp new instead."),k.warn("Running full generation anyway...");if(_.dryRun){k.step("[dry-run] vasp generate \u2014 showing what would change"),await Hv(P,$,j,_);return}if(j&&!_.force){let O=kv($,j);if(O.length>0){k.step("Skipping user-modified files (run with --force to overwrite):");for(let w of O)k.dim(` skip ${w}`)}}k.step("Regenerating app...");let v=await d$($,_.force);if(!v.success){k.error("Generation failed:");for(let O of v.errors)k.error(O);process.exit(1)}if(k.success(`Done: ${v.added} added, ${v.updated} updated, ${v.skipped} skipped`),v.skipped>0&&!_.force)k.dim(` ${v.skipped} user-modified file(s) preserved \u2014 use --force to overwrite`)}function kv(q,_){let $=[];for(let[f,K]of Object.entries(_.files)){if(f.startsWith("src/"))continue;let P=mq(q,f);if(!w_(P))continue;let j=O_(P,"utf8");if(Cq(j)!==K.hash)$.push(f)}return $}function zv(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 Hv(q,_,$,f){let K=B(import.meta.dirname),P=c(q,{outputDir:mq(_,".vasp","dry-run"),templateDir:K,logLevel:"silent"});if(!P.success)k.error("Dry-run failed"),process.exit(1);let j=0,v=0,O=0;for(let w of P.filesWritten)if(!$?.hasFile(w))k.info(` + ${w}`),j++;else{let h=mq(_,w);if(w_(h)){let Y=O_(h,"utf8"),T=Cq(Y),z=$.getEntry(w)?.hash;if(T!==z)k.warn(` ~ ${w} (user-modified \u2014 would skip)`),O++;else k.dim(` = ${w}`),v++}else k.info(` + ${w}`),j++}k.step(`[dry-run] ${j} would be added, ${v} unchanged, ${O} preserved`);try{let{rmSync:w}=await import("fs");w(mq(_,".vasp","dry-run"),{recursive:!0,force:!0})}catch{}}function Wv(q){return{force:q.includes("--force")||q.includes("-f"),dryRun:q.includes("--dry-run")}}import{join as Y_}from"path";import{existsSync as Tf,readFileSync as hf,renameSync as rv,writeFileSync as Jv}from"fs";import{readdirSync as Zv,statSync as mv}from"fs";async function kf(){let q=process.cwd(),_=Y_(q,"main.vasp");if(!Tf(_))k.error("No main.vasp found. Run this command from your Vasp project root."),process.exit(1);let $=hf(_,"utf8"),f;try{f=E($,"main.vasp")}catch(h){qq(h,$,"main.vasp")}if(f.app.typescript){k.warn("Project is already using TypeScript (typescript: true in main.vasp)");return}k.step("Migrating project to TypeScript...");let K=$.replace(/typescript:\s*false/,"typescript: true");Jv(_,K,"utf8"),k.success("Updated main.vasp: typescript: true");let P=G$(Y_(q,"src"));if(G$(Y_(q,"server")),P.length>0)k.success(`Renamed ${P.length} .js files to .ts`);let j=hf(_,"utf8"),v=E(j,"main.vasp"),O=B(import.meta.dirname),w=c(v,{outputDir:q,templateDir:O,logLevel:"info"});if(!w.success){k.error("Regeneration failed:");for(let h of w.errors)k.error(h);process.exit(1)}k.step("\u2713 Migration complete!"),k.dim("Run: bun install (to add TypeScript devDependencies)"),k.dim("Run: bun run typecheck (to verify zero type errors)")}function G$(q){let _=[];if(!Tf(q))return _;let $=Zv(q);for(let f of $){let K=Y_(q,f);if(mv(K).isDirectory())_.push(...G$(K));else if(f.endsWith(".js")&&!f.endsWith(".config.js")){let j=K.slice(0,-3)+".ts";rv(K,j),_.push(j)}}return _}import{join as uv,resolve as Av}from"path";import{existsSync as Xv,readFileSync as ov,writeFileSync as nv}from"fs";async function zf(){let q=Av(process.cwd()),_=uv(q,"main.vasp");if(!Xv(_))k.error(`No main.vasp found in ${q}. Run this command inside a Vasp project.`),process.exit(1);let $=ov(_,"utf8");if(/ssr:\s*true/.test($)||/ssr:\s*"ssg"/.test($)){k.warn("SSR is already enabled in main.vasp \u2014 nothing to do.");return}if(!/ssr:\s*false/.test($))k.error("Could not find 'ssr: false' in main.vasp. Please update it manually."),process.exit(1);$=$.replace(/ssr:\s*false/,"ssr: true"),nv(_,$,"utf8"),k.step("Patched main.vasp: ssr: false \u2192 ssr: true");let f;try{f=E($,"main.vasp")}catch(j){qq(j,$,"main.vasp")}let K=B(import.meta.dirname),P=c(f,{outputDir:q,templateDir:K,logLevel:"info"});if(!P.success){k.error("Regeneration failed:");for(let j of P.errors)k.error(j);process.exit(1)}k.success(`SSR enabled \u2014 ${P.filesWritten.length} files regenerated`),k.dim(" Run: bun install (if you have new deps)"),k.dim(" Run: vasp start")}import{join as Mq,resolve as pv}from"path";import{existsSync as uq,readFileSync as Hf,watch as dv}from"fs";var b=z_(W_(),1);async function Jf(){let q=pv(process.cwd()),_=Mq(q,"package.json");if(!uq(_))k.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let $=JSON.parse(Hf(_,"utf8")),f=$.scripts?.["dev:server"],K=$.scripts?.["dev:client"];if(!f||!K)k.error("Missing 'dev:server' or 'dev:client' scripts in package.json."),process.exit(1);let P=Mq(q,".env");if(!uq(P)){k.warn("No .env file found. Copying from .env.example...");let T=Mq(q,".env.example");if(uq(T)){let{copyFileSync:z}=await import("fs");z(T,P),k.info("Created .env from .env.example \u2014 edit it to configure your database.")}else k.warn("No .env.example found either. Database connection may fail.")}if(uq(P)){let T=Hf(P,"utf8"),z=Iq(T);if(z.DATABASE_URL&&Xq(z.DATABASE_URL))k.warn(b.default.bold("DATABASE_URL looks like a placeholder \u2014 edit .env before running the app"));if(z.JWT_SECRET&&Xq(z.JWT_SECRET))k.warn(b.default.bold("JWT_SECRET is still a placeholder \u2014 set a real secret in .env"))}let j=Mq(q,"node_modules");if(!uq(j)){k.warn("node_modules not found. Running bun install...");let T=Bun.spawn(["bun","install"],{cwd:q,stdout:"inherit",stderr:"inherit"});if(await T.exited,T.exitCode!==0)k.error("bun install failed. Please install dependencies manually."),process.exit(1)}k.step("Starting Vasp dev servers..."),k.dim(` server: ${f}`),k.dim(` client: ${K}`),console.log();let[v,O]=await Promise.all([Wf("server",b.default.cyan,"dev:server",q),Wf("client",b.default.magenta,"dev:client",q)]),w=Mq(q,"main.vasp");if(uq(w))k.dim(" Watching main.vasp for changes..."),Gv(w,q);process.on("SIGINT",()=>{v.kill(),O.kill(),process.exit(0)}),process.on("SIGTERM",()=>{v.kill(),O.kill(),process.exit(0)});let[h,Y]=await Promise.all([v.exited,O.exited]);if(h!==0||Y!==0)process.exit(1)}async function Wf(q,_,$,f){let K=_(`[${q}]`),P=Bun.spawn(["bun","run",$],{cwd:f,stdout:"pipe",stderr:"pipe"});return rf(P.stdout,K,process.stdout),rf(P.stderr,K,process.stderr),P}async function rf(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
95
  `);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 c8,resolve as n7}from"path";import{existsSync as E8,readFileSync as o7}from"fs";async function R8(){let _=n7(process.cwd()),q=c8(_,"package.json");if(!E8(q))k.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let f=!!JSON.parse(o7(q,"utf8")).dependencies?.nuxt;k.step("Building Vasp app for production..."),k.info("Building backend...");let K=E8(c8(_,"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)k.error("Backend build failed."),process.exit(1);k.success("Backend built \u2192 dist/server/"),k.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)k.error("Frontend build failed."),process.exit(1);if(k.success(`Frontend built \u2192 ${f?".output/":"dist/"}`),k.step("Build complete!"),k.dim(" Run: node dist/server/index.js (backend)"),f)k.dim(" Run: node .output/server/index.mjs (Nuxt SSR)")}async function g8(){k.info("vasp deploy is not yet available."),k.info(""),k.info("Planned deployment targets:"),k.info(" \u2022 Fly.io"),k.info(" \u2022 Railway"),k.info(" \u2022 Docker"),k.info(""),k.info("For now, build your project with `vasp build` and deploy the output manually."),process.exit(0)}async function y8(_){let q=_[0];switch(q){case"new":await i8(_.slice(1));break;case"--version":case"-v":console.log(I);break;case"--help":case"-h":case void 0:I8();break;case"start":await N8();break;case"build":await R8();break;case"migrate-to-ts":await C8();break;case"enable-ssr":await l8();break;case"deploy":await g8();break;default:k.error(`Unknown command: ${q}`),I8(),process.exit(1)}}function I8(){console.log(`
96
+ `);P=O.pop()??"";for(let w of O)$.write(`${_} ${w}
97
+ `)}}function Gv(q,_){let $=null,f=!1;dv(q,{persistent:!1},(K)=>{if($)clearTimeout($);$=setTimeout(async()=>{if(f)return;f=!0;let P=b.default.yellow("[vasp]");process.stdout.write(`${P} main.vasp changed \u2014 regenerating...
98
+ `);try{let j=await d$(_);if(j.success){let v=[];if(j.added>0)v.push(b.default.green(`+${j.added} added`));if(j.updated>0)v.push(b.default.cyan(`~${j.updated} updated`));if(j.skipped>0)v.push(b.default.dim(`${j.skipped} preserved`));let O=v.length>0?v.join(", "):"no changes";if(process.stdout.write(`${P} ${b.default.bold("Done")} \u2014 ${O}
99
+ `),j.skipped>0)process.stdout.write(`${P} ${b.default.dim("User-modified files preserved. Use `vasp generate --force` to overwrite.")}
100
+ `)}else{process.stdout.write(`${P} ${b.default.red("Generation failed:")}
101
+ `);for(let v of j.errors)process.stdout.write(`${P} ${b.default.red(v)}
102
+ `);process.stdout.write(`${P} ${b.default.dim("Fix the error in main.vasp and save again.")}
103
+ `)}}catch(j){process.stdout.write(`${P} ${b.default.red(`Unexpected error: ${String(j)}`)}
104
+ `)}finally{f=!1}},300)})}import{join as Zf,resolve as bv}from"path";import{existsSync as mf,readFileSync as ev}from"fs";async function uf(){let q=bv(process.cwd()),_=Zf(q,"package.json");if(!mf(_))k.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);let f=!!JSON.parse(ev(_,"utf8")).dependencies?.nuxt;k.step("Building Vasp app for production..."),k.info("Building backend...");let K=mf(Zf(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)k.error("Backend build failed."),process.exit(1);k.success("Backend built \u2192 dist/server/"),k.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)k.error("Frontend build failed."),process.exit(1);if(k.success(`Frontend built \u2192 ${f?".output/":"dist/"}`),k.step("Build complete!"),k.dim(" Run: node dist/server/index.js (backend)"),f)k.dim(" Run: node .output/server/index.mjs (Nuxt SSR)")}async function Af(){k.info("vasp deploy is not yet available."),k.info(""),k.info("Planned deployment targets:"),k.info(" \u2022 Fly.io"),k.info(" \u2022 Railway"),k.info(" \u2022 Docker"),k.info(""),k.info("For now, build your project with `vasp build` and deploy the output manually."),process.exit(0)}import{resolve as tv,join as iv}from"path";import{existsSync as av,readFileSync as Cv}from"fs";var Xf=["push","generate","migrate","studio","seed"];async function of(q){let _=q[0],$=tv(process.cwd()),f=iv($,"package.json");if(!av(f))k.error("No package.json found. Run this command inside a Vasp project."),process.exit(1);if(!_||!Xf.includes(_)){if(k.error(`Usage: vasp db <${Xf.join("|")}>`),_)k.error(`Unknown subcommand: ${_}`);process.exit(1)}let K=`db:${_}`,j=JSON.parse(Cv(f,"utf8")).scripts?.[K];if(!j)k.error(`No '${K}' script found in package.json.`),process.exit(1);k.step(`Running ${K}...`);let[v,...O]=j.split(" "),h=await Bun.spawn([v,...O],{cwd:$,stdout:"inherit",stderr:"inherit"}).exited;if(h!==0)k.error(`${K} failed with exit code ${h}`),process.exit(h);k.success(`${K} completed`)}async function pf(q){let _=q[0];switch(_){case"new":await wf(q.slice(1));break;case"generate":case"gen":await Yf(q.slice(1));break;case"--version":case"-v":console.log(N);break;case"--help":case"-h":case void 0:nf();break;case"start":await Jf();break;case"build":await uf();break;case"migrate-to-ts":await kf();break;case"enable-ssr":await zf();break;case"deploy":await Af();break;case"db":await of(q.slice(1));break;default:k.error(`Unknown command: ${_}`),nf(),process.exit(1)}}function nf(){console.log(`
65
105
  vasp \u2014 declarative full-stack framework for Vue
66
106
 
67
107
  Usage:
68
108
  vasp new <project-name> [options] Create a new Vasp project
109
+ vasp generate [options] Regenerate from main.vasp (preserves user changes)
69
110
  vasp enable-ssr Convert existing SPA project to SSR (Nuxt 4)
70
111
  vasp migrate-to-ts Convert existing JS project to TypeScript
71
112
  vasp start Start the dev server
72
113
  vasp build Build for production
114
+ vasp db <push|generate|migrate|studio|seed> Run database commands
73
115
  vasp deploy Deploy your app (planned)
74
116
 
75
117
  Options for 'vasp new':
@@ -78,9 +120,16 @@ page HomePage {
78
120
  --ssg Enable Static Site Generation via Nuxt 4
79
121
  --no-install Skip bun install
80
122
 
123
+ Options for 'vasp generate':
124
+ --force, -f Overwrite user-modified files
125
+ --dry-run Preview what would change without writing files
126
+
81
127
  Examples:
82
128
  vasp new my-app
83
129
  vasp new my-app --typescript
84
130
  vasp new my-app --ssr --typescript
85
131
  vasp new my-app --ssg
86
- `)}await y8(process.argv.slice(2));
132
+ vasp generate
133
+ vasp generate --dry-run
134
+ vasp generate --force
135
+ `)}await pf(process.argv.slice(2));