chipctx 0.1.18 → 0.1.20

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.
@@ -120,7 +120,7 @@ var Bun = globalThis.Bun ?? (() => {
120
120
  };
121
121
  })();
122
122
 
123
- import{createRequire as Yf}from"node:module";var _f=Object.create;var{getPrototypeOf:qf,defineProperty:Oq,getOwnPropertyNames:$f}=Object;var ff=Object.prototype.hasOwnProperty;function Kf(q){return this[q]}var Pf,jf,r$=(q,_,$)=>{var f=q!=null&&typeof q==="object";if(f){var K=_?Pf??=new WeakMap:jf??=new WeakMap,P=K.get(q);if(P)return P}$=q!=null?_f(qf(q)):{};let j=_||!q||!q.__esModule?Oq($,"default",{value:q,enumerable:!0}):$;for(let v of $f(q))if(!ff.call(j,v))Oq(j,v,{get:Kf.bind(q,v),enumerable:!0});if(f)K.set(q,j);return j};var J=(q,_)=>()=>(_||q((_={exports:{}}).exports,_),_.exports);var vf=(q)=>q;function wf(q,_){this[q]=vf.bind(null,_)}var Of=(q,_)=>{for(var $ in _)Oq(q,$,{get:_[$],enumerable:!0,configurable:!0,set:wf.bind(_,$)})};var Tf=(q,_)=>()=>(q&&(_=q(q=0)),_);var u_=Yf(import.meta.url);var Tq={};Of(Tq,{assets:()=>kf});var kf;var Yq=Tf(()=>{kf={"templates/import/csolution.yml.hbs":`solution:
123
+ import{createRequire as jf}from"node:module";var _f=Object.create;var{getPrototypeOf:qf,defineProperty:Oq,getOwnPropertyNames:$f}=Object;var ff=Object.prototype.hasOwnProperty;var r$=(q,_,$)=>{$=q!=null?_f(qf(q)):{};let f=_||!q||!q.__esModule?Oq($,"default",{value:q,enumerable:!0}):$;for(let K of $f(q))if(!ff.call(f,K))Oq(f,K,{get:()=>q[K],enumerable:!0});return f};var J=(q,_)=>()=>(_||q((_={exports:{}}).exports,_),_.exports);var Kf=(q,_)=>{for(var $ in _)Oq(q,$,{get:_[$],enumerable:!0,configurable:!0,set:(f)=>_[$]=()=>f})};var Pf=(q,_)=>()=>(q&&(_=q(q=0)),_);var u_=jf(import.meta.url);var Tq={};Kf(Tq,{assets:()=>vf});var vf;var Yq=Pf(()=>{vf={"templates/import/csolution.yml.hbs":`solution:
124
124
  created-for: CMSIS-Toolbox@2.6.0
125
125
  description: {{project_name}} imported by chipctx CLI
126
126
 
@@ -188,6 +188,65 @@ import{createRequire as Yf}from"node:module";var _f=Object.create;var{getPrototy
188
188
  - file: {{this}}
189
189
  {{/each}}
190
190
  {{/each}}
191
+ `,"templates/blinky/csolution.yml.hbs":`solution:
192
+ created-for: CMSIS-Toolbox@2.4.0
193
+ description: {{project_name}} generated by chipctx CLI
194
+
195
+ {{#if has_packs}}
196
+ packs:
197
+ {{#each packs_yaml}}
198
+ - pack: {{this.pack}}
199
+ {{/each}}
200
+ {{/if}}
201
+
202
+ target-types:
203
+ - type: {{project_name}}
204
+ {{#if has_board}}
205
+ board: {{board_csolution}}
206
+ {{/if}}
207
+ device: {{device_csolution}}
208
+
209
+ build-types:
210
+ - type: Debug
211
+ optimize: debug
212
+ debug: on
213
+ - type: Release
214
+ optimize: speed
215
+ debug: off
216
+
217
+ projects:
218
+ - project: ./{{project_name}}.cproject.yml
219
+ `,"templates/blinky/cproject.yml.hbs":`project:
220
+ output:
221
+ type:
222
+ - elf
223
+ - hex
224
+
225
+ components:
226
+ - component: CMSIS:CORE
227
+ {{#if is_bsp}}
228
+ - component: Device:Startup
229
+ - component: Board:LED
230
+ {{else if is_dfp_v1}}
231
+ - component: Device:Startup
232
+ {{else if is_dfp_v2}}
233
+ - component: Device:CubeMX
234
+ {{/if}}
235
+ {{#each components_yaml}}
236
+ - component: {{this.component}}
237
+ {{/each}}
238
+
239
+ {{#if has_additional_include_paths}}
240
+ add-path:
241
+ {{#each additional_include_paths_yaml}}
242
+ - {{this}}
243
+ {{/each}}
244
+
245
+ {{/if}}
246
+ groups:
247
+ - group: Source
248
+ files:
249
+ - file: main.c
191
250
  `,"templates/blinky/main.c.hbs":`/**
192
251
  * {{project_name}} - Blinky LED Example
193
252
  * Generated by chipctx CLI
@@ -270,65 +329,6 @@ int main(void) {
270
329
  }
271
330
  }
272
331
  {{/if}}
273
- `,"templates/blinky/csolution.yml.hbs":`solution:
274
- created-for: CMSIS-Toolbox@2.4.0
275
- description: {{project_name}} generated by chipctx CLI
276
-
277
- {{#if has_packs}}
278
- packs:
279
- {{#each packs_yaml}}
280
- - pack: {{this.pack}}
281
- {{/each}}
282
- {{/if}}
283
-
284
- target-types:
285
- - type: {{project_name}}
286
- {{#if has_board}}
287
- board: {{board_csolution}}
288
- {{/if}}
289
- device: {{device_csolution}}
290
-
291
- build-types:
292
- - type: Debug
293
- optimize: debug
294
- debug: on
295
- - type: Release
296
- optimize: speed
297
- debug: off
298
-
299
- projects:
300
- - project: ./{{project_name}}.cproject.yml
301
- `,"templates/blinky/cproject.yml.hbs":`project:
302
- output:
303
- type:
304
- - elf
305
- - hex
306
-
307
- components:
308
- - component: CMSIS:CORE
309
- {{#if is_bsp}}
310
- - component: Device:Startup
311
- - component: Board:LED
312
- {{else if is_dfp_v1}}
313
- - component: Device:Startup
314
- {{else if is_dfp_v2}}
315
- - component: Device:CubeMX
316
- {{/if}}
317
- {{#each components_yaml}}
318
- - component: {{this.component}}
319
- {{/each}}
320
-
321
- {{#if has_additional_include_paths}}
322
- add-path:
323
- {{#each additional_include_paths_yaml}}
324
- - {{this}}
325
- {{/each}}
326
-
327
- {{/if}}
328
- groups:
329
- - group: Source
330
- files:
331
- - file: main.c
332
332
  `,"assets/arduino-templates/bare.ino.hbs":`// Generated by chipctx - Bare Project
333
333
 
334
334
  void setup() {
@@ -533,16 +533,16 @@ SECTIONS
533
533
  }]
534
534
  }
535
535
  }
536
- `}});var e=J((pK)=>{pK.__esModule=!0;pK.extend=i$;pK.indexOf=rK;pK.escapeExpression=uK;pK.isEmpty=AK;pK.createFrame=XK;pK.blockParams=mK;pK.appendContextPath=nK;var HK={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},WK=/[&<>"'`=]/g,JK=/[&<>"'`=]/;function ZK(q){return HK[q]}function i$(q){for(var _=1;_<arguments.length;_++)for(var $ in arguments[_])if(Object.prototype.hasOwnProperty.call(arguments[_],$))q[$]=arguments[_][$];return q}var Gq=Object.prototype.toString;pK.toString=Gq;var oq=function(_){return typeof _==="function"};if(oq(/x/))pK.isFunction=oq=function(q){return typeof q==="function"&&Gq.call(q)==="[object Function]"};pK.isFunction=oq;var N$=Array.isArray||function(q){return q&&typeof q==="object"?Gq.call(q)==="[object Array]":!1};pK.isArray=N$;function rK(q,_){for(var $=0,f=q.length;$<f;$++)if(q[$]===_)return $;return-1}function uK(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(!JK.test(q))return q;return q.replace(WK,ZK)}function AK(q){if(!q&&q!==0)return!0;else if(N$(q)&&q.length===0)return!0;else return!1}function XK(q){var _=i$({},q);return _._parent=q,_}function mK(q,_){return q.path=_,q}function nK(q,_){return(q?q+".":"")+_}});var N=J((l$,t$)=>{l$.__esModule=!0;var dq=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function eq(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 w=0;w<dq.length;w++)this[dq[w]]=v[dq[w]];if(Error.captureStackTrace)Error.captureStackTrace(this,eq);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(O){}}eq.prototype=Error();l$.default=eq;t$.exports=l$.default});var R$=J((c$,a$)=>{c$.__esModule=!0;var bq=e();c$.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(bq.isArray(_))if(_.length>0){if($.ids)$.ids=[$.name];return q.helpers.each(_,$)}else return f(this);else{if($.data&&$.ids){var P=bq.createFrame($.data);P.contextPath=bq.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(_,$)}})};a$.exports=c$.default});var g$=J((E$,I$)=>{E$.__esModule=!0;function RK(q){return q&&q.__esModule?q:{default:q}}var o_=e(),EK=N(),IK=RK(EK);E$.default=function(q){q.registerHelper("each",function(_,$){if(!$)throw new IK.default("Must pass iterator to #each");var{fn:f,inverse:K}=$,P=0,j="",v=void 0,w=void 0;if($.data&&$.ids)w=o_.appendContextPath($.data.contextPath,$.ids[0])+".";if(o_.isFunction(_))_=_.call(this);if($.data)v=o_.createFrame($.data);function O(W,H,u){if(v){if(v.key=W,v.index=H,v.first=H===0,v.last=!!u,w)v.contextPath=w+W}j=j+f(_[W],{data:v,blockParams:o_.blockParams([_[W],W],[w+W,null])})}if(_&&typeof _==="object")if(o_.isArray(_)){for(var Y=_.length;P<Y;P++)if(P in _)O(P,P,P===_.length-1)}else if(typeof Symbol==="function"&&_[Symbol.iterator]){var T=[],k=_[Symbol.iterator]();for(var h=k.next();!h.done;h=k.next())T.push(h.value);_=T;for(var Y=_.length;P<Y;P++)O(P,P,P===_.length-1)}else(function(){var W=void 0;if(Object.keys(_).forEach(function(H){if(W!==void 0)O(W,P-1);W=H,P++}),W!==void 0)O(W,P-1,!0)})();if(P===0)j=K(this);return j})};I$.exports=E$.default});var L$=J((y$,D$)=>{y$.__esModule=!0;function DK(q){return q&&q.__esModule?q:{default:q}}var LK=N(),xK=DK(LK);y$.default=function(q){q.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new xK.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};D$.exports=y$.default});var F$=J((B$,U$)=>{B$.__esModule=!0;function UK(q){return q&&q.__esModule?q:{default:q}}var x$=e(),FK=N(),s$=UK(FK);B$.default=function(q){q.registerHelper("if",function(_,$){if(arguments.length!=2)throw new s$.default("#if requires exactly one argument");if(x$.isFunction(_))_=_.call(this);if(!$.hash.includeZero&&!_||x$.isEmpty(_))return $.inverse(this);else return $.fn(this)}),q.registerHelper("unless",function(_,$){if(arguments.length!=2)throw new s$.default("#unless requires exactly one argument");return q.helpers.if.call(this,_,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};U$.exports=B$.default});var q8=J((Q$,_8)=>{Q$.__esModule=!0;Q$.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,_)})};_8.exports=Q$.default});var K8=J(($8,f8)=>{$8.__esModule=!0;$8.default=function(q){q.registerHelper("lookup",function(_,$,f){if(!_)return _;return f.lookupProperty(_,$)})};f8.exports=$8.default});var v8=J((P8,j8)=>{P8.__esModule=!0;function PP(q){return q&&q.__esModule?q:{default:q}}var G_=e(),jP=N(),vP=PP(jP);P8.default=function(q){q.registerHelper("with",function(_,$){if(arguments.length!=2)throw new vP.default("#with requires exactly one argument");if(G_.isFunction(_))_=_.call(this);var f=$.fn;if(!G_.isEmpty(_)){var K=$.data;if($.data&&$.ids)K=G_.createFrame($.data),K.contextPath=G_.appendContextPath($.data.contextPath,$.ids[0]);return f(_,{data:K,blockParams:G_.blockParams([_],[K&&K.contextPath])})}else return $.inverse(this)})};j8.exports=P8.default});var Sq=J((oP)=>{oP.__esModule=!0;oP.registerDefaultHelpers=nP;oP.moveHelperToHooks=pP;function Q(q){return q&&q.__esModule?q:{default:q}}var TP=R$(),YP=Q(TP),kP=g$(),hP=Q(kP),zP=L$(),HP=Q(zP),WP=F$(),JP=Q(WP),ZP=q8(),rP=Q(ZP),uP=K8(),AP=Q(uP),XP=v8(),mP=Q(XP);function nP(q){YP.default(q),hP.default(q),HP.default(q),JP.default(q),rP.default(q),AP.default(q),mP.default(q)}function pP(q,_,$){if(q.helpers[_]){if(q.hooks[_]=q.helpers[_],!$)delete q.helpers[_]}}});var T8=J((w8,O8)=>{w8.__esModule=!0;var bP=e();w8.default=function(q){q.registerDecorator("inline",function(_,$,f,K){var P=_;if(!$.partials)$.partials={},P=function(j,v){var w=f.partials;f.partials=bP.extend({},w,$.partials);var O=_(j,v);return f.partials=w,O};return $.partials[K.args[0]]=K.fn,P})};O8.exports=w8.default});var Y8=J((lP)=>{lP.__esModule=!0;lP.registerDefaultDecorators=NP;function MP(q){return q&&q.__esModule?q:{default:q}}var VP=T8(),iP=MP(VP);function NP(q){iP.default(q)}});var Cq=J((k8,h8)=>{k8.__esModule=!0;var aP=e(),Y_={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(_){if(typeof _==="string"){var $=aP.indexOf(Y_.methodMap,_.toLowerCase());if($>=0)_=$;else _=parseInt(_,10)}return _},log:function(_){if(_=Y_.lookupLevel(_),typeof console<"u"&&Y_.lookupLevel(Y_.level)<=_){var $=Y_.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)}}};k8.default=Y_;h8.exports=k8.default});var z8=J((yP)=>{yP.__esModule=!0;yP.createNewLookupObject=gP;var IP=e();function gP(){for(var q=arguments.length,_=Array(q),$=0;$<q;$++)_[$]=arguments[$];return IP.extend.apply(void 0,[Object.create(null)].concat(_))}});var Mq=J((q3)=>{q3.__esModule=!0;q3.createProtoAccessControl=UP;q3.resultIsAllowed=FP;q3.resetLoggedProperties=_3;function xP(q){return q&&q.__esModule?q:{default:q}}var H8=z8(),sP=Cq(),BP=xP(sP),y_=Object.create(null);function UP(q){var _=Object.create(null);_.constructor=!1,_.__defineGetter__=!1,_.__defineSetter__=!1,_.__lookupGetter__=!1;var $=Object.create(null);return $.__proto__=!1,{properties:{whitelist:H8.createNewLookupObject($,q.allowedProtoProperties),defaultValue:q.allowProtoPropertiesByDefault},methods:{whitelist:H8.createNewLookupObject(_,q.allowedProtoMethods),defaultValue:q.allowProtoMethodsByDefault}}}function FP(q,_,$){if(typeof q==="function")return W8(_.methods,$);else return W8(_.properties,$)}function W8(q,_){if(q.whitelist[_]!==void 0)return q.whitelist[_]===!0;if(q.defaultValue!==void 0)return q.defaultValue;return QP(_),!1}function QP(q){if(y_[q]!==!0)y_[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.
536
+ `}});var e=J((uK)=>{uK.__esModule=!0;uK.extend=i$;uK.indexOf=zK;uK.escapeExpression=HK;uK.isEmpty=WK;uK.createFrame=JK;uK.blockParams=ZK;uK.appendContextPath=rK;var TK={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},YK=/[&<>"'`=]/g,kK=/[&<>"'`=]/;function hK(q){return TK[q]}function i$(q){for(var _=1;_<arguments.length;_++)for(var $ in arguments[_])if(Object.prototype.hasOwnProperty.call(arguments[_],$))q[$]=arguments[_][$];return q}var Gq=Object.prototype.toString;uK.toString=Gq;var oq=function(_){return typeof _==="function"};if(oq(/x/))uK.isFunction=oq=function(q){return typeof q==="function"&&Gq.call(q)==="[object Function]"};uK.isFunction=oq;var N$=Array.isArray||function(q){return q&&typeof q==="object"?Gq.call(q)==="[object Array]":!1};uK.isArray=N$;function zK(q,_){for(var $=0,f=q.length;$<f;$++)if(q[$]===_)return $;return-1}function HK(q){if(typeof q!=="string"){if(q&&q.toHTML)return q.toHTML();else if(q==null)return"";else if(!q)return q+"";q=""+q}if(!kK.test(q))return q;return q.replace(YK,hK)}function WK(q){if(!q&&q!==0)return!0;else if(N$(q)&&q.length===0)return!0;else return!1}function JK(q){var _=i$({},q);return _._parent=q,_}function ZK(q,_){return q.path=_,q}function rK(q,_){return(q?q+".":"")+_}});var N=J((l$,t$)=>{l$.__esModule=!0;var dq=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function eq(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 w=0;w<dq.length;w++)this[dq[w]]=v[dq[w]];if(Error.captureStackTrace)Error.captureStackTrace(this,eq);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(O){}}eq.prototype=Error();l$.default=eq;t$.exports=l$.default});var R$=J((c$,a$)=>{c$.__esModule=!0;var bq=e();c$.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(bq.isArray(_))if(_.length>0){if($.ids)$.ids=[$.name];return q.helpers.each(_,$)}else return f(this);else{if($.data&&$.ids){var P=bq.createFrame($.data);P.contextPath=bq.appendContextPath($.data.contextPath,$.name),$={data:P}}return K(_,$)}})};a$.exports=c$.default});var g$=J((E$,I$)=>{E$.__esModule=!0;function NK(q){return q&&q.__esModule?q:{default:q}}var o_=e(),lK=N(),tK=NK(lK);E$.default=function(q){q.registerHelper("each",function(_,$){if(!$)throw new tK.default("Must pass iterator to #each");var{fn:f,inverse:K}=$,P=0,j="",v=void 0,w=void 0;if($.data&&$.ids)w=o_.appendContextPath($.data.contextPath,$.ids[0])+".";if(o_.isFunction(_))_=_.call(this);if($.data)v=o_.createFrame($.data);function O(W,H,u){if(v){if(v.key=W,v.index=H,v.first=H===0,v.last=!!u,w)v.contextPath=w+W}j=j+f(_[W],{data:v,blockParams:o_.blockParams([_[W],W],[w+W,null])})}if(_&&typeof _==="object")if(o_.isArray(_)){for(var Y=_.length;P<Y;P++)if(P in _)O(P,P,P===_.length-1)}else if(typeof Symbol==="function"&&_[Symbol.iterator]){var T=[],k=_[Symbol.iterator]();for(var h=k.next();!h.done;h=k.next())T.push(h.value);_=T;for(var Y=_.length;P<Y;P++)O(P,P,P===_.length-1)}else(function(){var W=void 0;if(Object.keys(_).forEach(function(H){if(W!==void 0)O(W,P-1);W=H,P++}),W!==void 0)O(W,P-1,!0)})();if(P===0)j=K(this);return j})};I$.exports=E$.default});var L$=J((y$,D$)=>{y$.__esModule=!0;function RK(q){return q&&q.__esModule?q:{default:q}}var EK=N(),IK=RK(EK);y$.default=function(q){q.registerHelper("helperMissing",function(){if(arguments.length===1)return;else throw new IK.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};D$.exports=y$.default});var F$=J((B$,U$)=>{B$.__esModule=!0;function DK(q){return q&&q.__esModule?q:{default:q}}var x$=e(),LK=N(),s$=DK(LK);B$.default=function(q){q.registerHelper("if",function(_,$){if(arguments.length!=2)throw new s$.default("#if requires exactly one argument");if(x$.isFunction(_))_=_.call(this);if(!$.hash.includeZero&&!_||x$.isEmpty(_))return $.inverse(this);else return $.fn(this)}),q.registerHelper("unless",function(_,$){if(arguments.length!=2)throw new s$.default("#unless requires exactly one argument");return q.helpers.if.call(this,_,{fn:$.inverse,inverse:$.fn,hash:$.hash})})};U$.exports=B$.default});var q8=J((Q$,_8)=>{Q$.__esModule=!0;Q$.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,_)})};_8.exports=Q$.default});var K8=J(($8,f8)=>{$8.__esModule=!0;$8.default=function(q){q.registerHelper("lookup",function(_,$,f){if(!_)return _;return f.lookupProperty(_,$)})};f8.exports=$8.default});var v8=J((P8,j8)=>{P8.__esModule=!0;function _P(q){return q&&q.__esModule?q:{default:q}}var G_=e(),qP=N(),$P=_P(qP);P8.default=function(q){q.registerHelper("with",function(_,$){if(arguments.length!=2)throw new $P.default("#with requires exactly one argument");if(G_.isFunction(_))_=_.call(this);var f=$.fn;if(!G_.isEmpty(_)){var K=$.data;if($.data&&$.ids)K=G_.createFrame($.data),K.contextPath=G_.appendContextPath($.data.contextPath,$.ids[0]);return f(_,{data:K,blockParams:G_.blockParams([_],[K&&K.contextPath])})}else return $.inverse(this)})};j8.exports=P8.default});var Sq=J((AP)=>{AP.__esModule=!0;AP.registerDefaultHelpers=rP;AP.moveHelperToHooks=uP;function Q(q){return q&&q.__esModule?q:{default:q}}var PP=R$(),jP=Q(PP),vP=g$(),wP=Q(vP),OP=L$(),TP=Q(OP),YP=F$(),kP=Q(YP),hP=q8(),zP=Q(hP),HP=K8(),WP=Q(HP),JP=v8(),ZP=Q(JP);function rP(q){jP.default(q),wP.default(q),TP.default(q),kP.default(q),zP.default(q),WP.default(q),ZP.default(q)}function uP(q,_,$){if(q.helpers[_]){if(q.hooks[_]=q.helpers[_],!$)delete q.helpers[_]}}});var T8=J((w8,O8)=>{w8.__esModule=!0;var pP=e();w8.default=function(q){q.registerDecorator("inline",function(_,$,f,K){var P=_;if(!$.partials)$.partials={},P=function(j,v){var w=f.partials;f.partials=pP.extend({},w,$.partials);var O=_(j,v);return f.partials=w,O};return $.partials[K.args[0]]=K.fn,P})};O8.exports=w8.default});var Y8=J((CP)=>{CP.__esModule=!0;CP.registerDefaultDecorators=SP;function dP(q){return q&&q.__esModule?q:{default:q}}var eP=T8(),bP=dP(eP);function SP(q){bP.default(q)}});var Cq=J((k8,h8)=>{k8.__esModule=!0;var iP=e(),Y_={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(_){if(typeof _==="string"){var $=iP.indexOf(Y_.methodMap,_.toLowerCase());if($>=0)_=$;else _=parseInt(_,10)}return _},log:function(_){if(_=Y_.lookupLevel(_),typeof console<"u"&&Y_.lookupLevel(Y_.level)<=_){var $=Y_.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)}}};k8.default=Y_;h8.exports=k8.default});var z8=J((aP)=>{aP.__esModule=!0;aP.createNewLookupObject=cP;var tP=e();function cP(){for(var q=arguments.length,_=Array(q),$=0;$<q;$++)_[$]=arguments[$];return tP.extend.apply(void 0,[Object.create(null)].concat(_))}});var Mq=J((BP)=>{BP.__esModule=!0;BP.createProtoAccessControl=DP;BP.resultIsAllowed=LP;BP.resetLoggedProperties=sP;function IP(q){return q&&q.__esModule?q:{default:q}}var H8=z8(),gP=Cq(),yP=IP(gP),y_=Object.create(null);function DP(q){var _=Object.create(null);_.constructor=!1,_.__defineGetter__=!1,_.__defineSetter__=!1,_.__lookupGetter__=!1;var $=Object.create(null);return $.__proto__=!1,{properties:{whitelist:H8.createNewLookupObject($,q.allowedProtoProperties),defaultValue:q.allowProtoPropertiesByDefault},methods:{whitelist:H8.createNewLookupObject(_,q.allowedProtoMethods),defaultValue:q.allowProtoMethodsByDefault}}}function LP(q,_,$){if(typeof q==="function")return W8(_.methods,$);else return W8(_.properties,$)}function W8(q,_){if(q.whitelist[_]!==void 0)return q.whitelist[_]===!0;if(q.defaultValue!==void 0)return q.defaultValue;return xP(_),!1}function xP(q){if(y_[q]!==!0)y_[q]=!0,yP.default.log("error",'Handlebars: Access has been denied to resolve the property "'+q+`" because it is not an "own property" of its parent.
537
537
  You can add a runtime option to disable the check or this warning:
538
- See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function _3(){Object.keys(y_).forEach(function(q){delete y_[q]})}});var L_=J((W3)=>{W3.__esModule=!0;W3.HandlebarsEnvironment=Nq;function J8(q){return q&&q.__esModule?q:{default:q}}var __=e(),j3=N(),Vq=J8(j3),v3=Sq(),w3=Y8(),O3=Cq(),D_=J8(O3),T3=Mq(),Y3="4.7.8";W3.VERSION=Y3;var k3=8;W3.COMPILER_REVISION=k3;var h3=7;W3.LAST_COMPATIBLE_COMPILER_REVISION=h3;var z3={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"};W3.REVISION_CHANGES=z3;var iq="[object Object]";function Nq(q,_,$){this.helpers=q||{},this.partials=_||{},this.decorators=$||{},v3.registerDefaultHelpers(this),w3.registerDefaultDecorators(this)}Nq.prototype={constructor:Nq,logger:D_.default,log:D_.default.log,registerHelper:function(_,$){if(__.toString.call(_)===iq){if($)throw new Vq.default("Arg not supported with multiple helpers");__.extend(this.helpers,_)}else this.helpers[_]=$},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,$){if(__.toString.call(_)===iq)__.extend(this.partials,_);else{if(typeof $>"u")throw new Vq.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=$}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,$){if(__.toString.call(_)===iq){if($)throw new Vq.default("Arg not supported with multiple decorators");__.extend(this.decorators,_)}else this.decorators[_]=$},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){T3.resetLoggedProperties()}};var H3=D_.default.log;W3.log=H3;W3.createFrame=__.createFrame;W3.logger=D_.default});var u8=J((Z8,r8)=>{Z8.__esModule=!0;function lq(q){this.string=q}lq.prototype.toString=lq.prototype.toHTML=function(){return""+this.string};Z8.default=lq;r8.exports=Z8.default});var A8=J((e3)=>{e3.__esModule=!0;e3.wrapHelper=d3;function d3(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 o8=J((g3)=>{g3.__esModule=!0;g3.checkRevision=l3;g3.template=t3;g3.wrapProgram=x_;g3.resolvePartial=c3;g3.invokePartial=a3;g3.noop=n8;function C3(q){return q&&q.__esModule?q:{default:q}}function M3(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 V3=e(),y=M3(V3),i3=N(),D=C3(i3),L=L_(),X8=Sq(),N3=A8(),m8=Mq();function l3(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 D.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 D.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 t3(q,_){if(!_)throw new D.default("No environment passed to template");if(!q||!q.main)throw new D.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,w){if(w.hash){if(v=y.extend({},v,w.hash),w.ids)w.ids[0]=!0}j=_.VM.resolvePartial.call(this,j,v,w);var O=y.extend({},w,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),Y=_.VM.invokePartial.call(this,j,v,O);if(Y==null&&_.compile)w.partials[w.name]=_.compile(j,q.compilerOptions,_),Y=w.partials[w.name](v,O);if(Y!=null){if(w.indent){var T=Y.split(`
538
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`)}function sP(){Object.keys(y_).forEach(function(q){delete y_[q]})}});var L_=J((Y3)=>{Y3.__esModule=!0;Y3.HandlebarsEnvironment=Nq;function J8(q){return q&&q.__esModule?q:{default:q}}var __=e(),q3=N(),Vq=J8(q3),$3=Sq(),f3=Y8(),K3=Cq(),D_=J8(K3),P3=Mq(),j3="4.7.8";Y3.VERSION=j3;var v3=8;Y3.COMPILER_REVISION=v3;var w3=7;Y3.LAST_COMPATIBLE_COMPILER_REVISION=w3;var O3={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"};Y3.REVISION_CHANGES=O3;var iq="[object Object]";function Nq(q,_,$){this.helpers=q||{},this.partials=_||{},this.decorators=$||{},$3.registerDefaultHelpers(this),f3.registerDefaultDecorators(this)}Nq.prototype={constructor:Nq,logger:D_.default,log:D_.default.log,registerHelper:function(_,$){if(__.toString.call(_)===iq){if($)throw new Vq.default("Arg not supported with multiple helpers");__.extend(this.helpers,_)}else this.helpers[_]=$},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,$){if(__.toString.call(_)===iq)__.extend(this.partials,_);else{if(typeof $>"u")throw new Vq.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=$}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,$){if(__.toString.call(_)===iq){if($)throw new Vq.default("Arg not supported with multiple decorators");__.extend(this.decorators,_)}else this.decorators[_]=$},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){P3.resetLoggedProperties()}};var T3=D_.default.log;Y3.log=T3;Y3.createFrame=__.createFrame;Y3.logger=D_.default});var u8=J((Z8,r8)=>{Z8.__esModule=!0;function lq(q){this.string=q}lq.prototype.toString=lq.prototype.toHTML=function(){return""+this.string};Z8.default=lq;r8.exports=Z8.default});var A8=J((n3)=>{n3.__esModule=!0;n3.wrapHelper=m3;function m3(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 o8=J((c3)=>{c3.__esModule=!0;c3.checkRevision=C3;c3.template=M3;c3.wrapProgram=x_;c3.resolvePartial=V3;c3.invokePartial=i3;c3.noop=n8;function G3(q){return q&&q.__esModule?q:{default:q}}function d3(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 e3=e(),y=d3(e3),b3=N(),D=G3(b3),L=L_(),X8=Sq(),S3=A8(),m8=Mq();function C3(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 D.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 D.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 M3(q,_){if(!_)throw new D.default("No environment passed to template");if(!q||!q.main)throw new D.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,w){if(w.hash){if(v=y.extend({},v,w.hash),w.ids)w.ids[0]=!0}j=_.VM.resolvePartial.call(this,j,v,w);var O=y.extend({},w,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),Y=_.VM.invokePartial.call(this,j,v,O);if(Y==null&&_.compile)w.partials[w.name]=_.compile(j,q.compilerOptions,_),Y=w.partials[w.name](v,O);if(Y!=null){if(w.indent){var T=Y.split(`
539
539
  `);for(var k=0,h=T.length;k<h;k++){if(!T[k]&&k+1===h)break;T[k]=w.indent+T[k]}Y=T.join(`
540
- `)}return Y}else throw new D.default("The partial "+w.name+" could not be compiled when running in runtime-only mode")}var K={strict:function(v,w,O){if(!v||!(w in v))throw new D.default('"'+w+'" not defined in '+v,{loc:O});return K.lookupProperty(v,w)},lookupProperty:function(v,w){var O=v[w];if(O==null)return O;if(Object.prototype.hasOwnProperty.call(v,w))return O;if(m8.resultIsAllowed(O,K.protoAccessControl,w))return O;return},lookup:function(v,w){var O=v.length;for(var Y=0;Y<O;Y++){var T=v[Y]&&K.lookupProperty(v[Y],w);if(T!=null)return v[Y][w]}},lambda:function(v,w){return typeof v==="function"?v.call(w):v},escapeExpression:y.escapeExpression,invokePartial:f,fn:function(v){var w=q[v];return w.decorator=q[v+"_d"],w},programs:[],program:function(v,w,O,Y,T){var k=this.programs[v],h=this.fn(v);if(w||T||Y||O)k=x_(this,v,h,w,O,Y,T);else if(!k)k=this.programs[v]=x_(this,v,h);return k},data:function(v,w){while(v&&w--)v=v._parent;return v},mergeIfNeeded:function(v,w){var O=v||w;if(v&&w&&v!==w)O=y.extend({},w,v);return O},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:q.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],w=v.data;if(P._setup(v),!v.partial&&q.useData)w=R3(j,w);var O=void 0,Y=q.useBlockParams?[]:void 0;if(q.useDepths)if(v.depths)O=j!=v.depths[0]?[j].concat(v.depths):v.depths;else O=[j];function T(k){return""+q.main(K,k,K.helpers,K.partials,w,Y,O)}return T=p8(q.main,T,K,v.depths||[],w,Y),T(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=y.extend({},_.helpers,j.helpers);if(E3(v,K),K.helpers=v,q.usePartial)K.partials=K.mergeIfNeeded(j.partials,_.partials);if(q.usePartial||q.useDecorators)K.decorators=y.extend({},_.decorators,j.decorators);K.hooks={},K.protoAccessControl=m8.createProtoAccessControl(j);var w=j.allowCallsToHelperMissing||$;X8.moveHelperToHooks(K,"helperMissing",w),X8.moveHelperToHooks(K,"blockHelperMissing",w)}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,w,O){if(q.useBlockParams&&!w)throw new D.default("must pass block params");if(q.useDepths&&!O)throw new D.default("must pass parent depths");return x_(K,j,q[j],v,0,w,O)},P}function x_(q,_,$,f,K,P,j){function v(w){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Y=j;if(j&&w!=j[0]&&!(w===q.nullContext&&j[0]===null))Y=[w].concat(j);return $(q,w,q.helpers,q.partials,O.data||f,P&&[O.blockParams].concat(P),Y)}return v=p8($,v,q,j,f,P),v.program=_,v.depth=j?j.length:0,v.blockParams=K||0,v}function c3(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 a3(q,_,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==n8)(function(){$.data=L.createFrame($.data);var P=$.fn;if(K=$.data["partial-block"]=function(v){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return w.data=L.createFrame(w.data),w.data["partial-block"]=f,P(v,w)},P.partials)$.partials=y.extend({},$.partials,P.partials)})();if(q===void 0&&K)q=K;if(q===void 0)throw new D.default("The partial "+$.name+" could not be found");else if(q instanceof Function)return q(_,$)}function n8(){return""}function R3(q,_){if(!_||!("root"in _))_=_?L.createFrame(_):{},_.root=q;return _}function p8(q,_,$,f,K,P){if(q.decorator){var j={};_=q.decorator(_,j,$,f&&f[0],K,P,f),y.extend(_,j)}return _}function E3(q,_){Object.keys(q).forEach(function($){var f=q[$];q[$]=I3(f,_)})}function I3(q,_){var $=_.lookupProperty;return N3.wrapHelper(q,function(f){return y.extend({lookupProperty:$},f)})}});var tq=J((G8,d8)=>{G8.__esModule=!0;G8.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}};d8.exports=G8.default});var V8=J((C8,M8)=>{C8.__esModule=!0;function aq(q){return q&&q.__esModule?q:{default:q}}function Rq(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 _4=L_(),e8=Rq(_4),q4=u8(),$4=aq(q4),f4=N(),K4=aq(f4),P4=e(),cq=Rq(P4),j4=o8(),b8=Rq(j4),v4=tq(),w4=aq(v4);function S8(){var q=new e8.HandlebarsEnvironment;return cq.extend(q,e8),q.SafeString=$4.default,q.Exception=K4.default,q.Utils=cq,q.escapeExpression=cq.escapeExpression,q.VM=b8,q.template=function(_){return b8.template(_,q)},q}var d_=S8();d_.create=S8;w4.default(d_);d_.default=d_;C8.default=d_;M8.exports=C8.default});var Eq=J((N8,l8)=>{N8.__esModule=!0;var i8={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&&!i8.helpers.scopedId(_)&&!_.depth}}};N8.default=i8;l8.exports=N8.default});var a8=J((t8,c8)=>{t8.__esModule=!0;var h4=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,w,O,Y){var T=O.length-1;switch(w){case 1:return O[T-1];case 2:this.$=v.prepareProgram(O[T]);break;case 3:this.$=O[T];break;case 4:this.$=O[T];break;case 5:this.$=O[T];break;case 6:this.$=O[T];break;case 7:this.$=O[T];break;case 8:this.$=O[T];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(O[T]),strip:v.stripFlags(O[T],O[T]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:O[T],value:O[T],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(O[T-2],O[T-1],O[T],this._$);break;case 12:this.$={path:O[T-3],params:O[T-2],hash:O[T-1]};break;case 13:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!1,this._$);break;case 14:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!0,this._$);break;case 15:this.$={open:O[T-5],path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 16:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 17:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 18:this.$={strip:v.stripFlags(O[T-1],O[T-1]),program:O[T]};break;case 19:var k=v.prepareBlock(O[T-2],O[T-1],O[T],O[T],!1,this._$),h=v.prepareProgram([k],O[T-1].loc);h.chained=!0,this.$={strip:O[T-2].strip,program:h,chain:!0};break;case 20:this.$=O[T];break;case 21:this.$={path:O[T-1],strip:v.stripFlags(O[T-2],O[T])};break;case 22:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 23:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 24:this.$={type:"PartialStatement",name:O[T-3],params:O[T-2],hash:O[T-1],indent:"",strip:v.stripFlags(O[T-4],O[T]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(O[T-2],O[T-1],O[T],this._$);break;case 26:this.$={path:O[T-3],params:O[T-2],hash:O[T-1],strip:v.stripFlags(O[T-4],O[T])};break;case 27:this.$=O[T];break;case 28:this.$=O[T];break;case 29:this.$={type:"SubExpression",path:O[T-3],params:O[T-2],hash:O[T-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:O[T],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(O[T-2]),value:O[T],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(O[T-1]);break;case 33:this.$=O[T];break;case 34:this.$=O[T];break;case 35:this.$={type:"StringLiteral",value:O[T],original:O[T],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(O[T]),original:Number(O[T]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:O[T]==="true",original:O[T]==="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.$=O[T];break;case 41:this.$=O[T];break;case 42:this.$=v.preparePath(!0,O[T],this._$);break;case 43:this.$=v.preparePath(!1,O[T],this._$);break;case 44:O[T-2].push({part:v.id(O[T]),original:O[T],separator:O[T-1]}),this.$=O[T-2];break;case 45:this.$=[{part:v.id(O[T]),original:O[T]}];break;case 46:this.$=[];break;case 47:O[T-1].push(O[T]);break;case 48:this.$=[];break;case 49:O[T-1].push(O[T]);break;case 50:this.$=[];break;case 51:O[T-1].push(O[T]);break;case 58:this.$=[];break;case 59:O[T-1].push(O[T]);break;case 64:this.$=[];break;case 65:O[T-1].push(O[T]);break;case 70:this.$=[];break;case 71:O[T-1].push(O[T]);break;case 78:this.$=[];break;case 79:O[T-1].push(O[T]);break;case 82:this.$=[];break;case 83:O[T-1].push(O[T]);break;case 86:this.$=[];break;case 87:O[T-1].push(O[T]);break;case 90:this.$=[];break;case 91:O[T-1].push(O[T]);break;case 94:this.$=[];break;case 95:O[T-1].push(O[T]);break;case 98:this.$=[O[T]];break;case 99:O[T-1].push(O[T]);break;case 100:this.$=[O[T]];break;case 101:O[T-1].push(O[T]);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],w=[],O=this.table,Y="",T=0,k=0,h=0,W=2,H=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 u=this.lexer.yylloc;w.push(u);var Z=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function X(g){j.length=j.length-2*g,v.length=v.length-g,w.length=w.length-g}function r(){var g=P.lexer.lex()||1;if(typeof g!=="number")g=P.symbols_[g]||g;return g}var A,t,V,i,Pv,vq,K_={},N_,I,Z$,l_;while(!0){if(V=j[j.length-1],this.defaultActions[V])i=this.defaultActions[V];else{if(A===null||typeof A>"u")A=r();i=O[V]&&O[V][A]}if(typeof i>"u"||!i.length||!i[0]){var wq="";if(!h){l_=[];for(N_ in O[V])if(this.terminals_[N_]&&N_>2)l_.push("'"+this.terminals_[N_]+"'");if(this.lexer.showPosition)wq="Parse error on line "+(T+1)+`:
540
+ `)}return Y}else throw new D.default("The partial "+w.name+" could not be compiled when running in runtime-only mode")}var K={strict:function(v,w,O){if(!v||!(w in v))throw new D.default('"'+w+'" not defined in '+v,{loc:O});return K.lookupProperty(v,w)},lookupProperty:function(v,w){var O=v[w];if(O==null)return O;if(Object.prototype.hasOwnProperty.call(v,w))return O;if(m8.resultIsAllowed(O,K.protoAccessControl,w))return O;return},lookup:function(v,w){var O=v.length;for(var Y=0;Y<O;Y++){var T=v[Y]&&K.lookupProperty(v[Y],w);if(T!=null)return v[Y][w]}},lambda:function(v,w){return typeof v==="function"?v.call(w):v},escapeExpression:y.escapeExpression,invokePartial:f,fn:function(v){var w=q[v];return w.decorator=q[v+"_d"],w},programs:[],program:function(v,w,O,Y,T){var k=this.programs[v],h=this.fn(v);if(w||T||Y||O)k=x_(this,v,h,w,O,Y,T);else if(!k)k=this.programs[v]=x_(this,v,h);return k},data:function(v,w){while(v&&w--)v=v._parent;return v},mergeIfNeeded:function(v,w){var O=v||w;if(v&&w&&v!==w)O=y.extend({},w,v);return O},nullContext:Object.seal({}),noop:_.VM.noop,compilerInfo:q.compiler};function P(j){var v=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],w=v.data;if(P._setup(v),!v.partial&&q.useData)w=N3(j,w);var O=void 0,Y=q.useBlockParams?[]:void 0;if(q.useDepths)if(v.depths)O=j!=v.depths[0]?[j].concat(v.depths):v.depths;else O=[j];function T(k){return""+q.main(K,k,K.helpers,K.partials,w,Y,O)}return T=p8(q.main,T,K,v.depths||[],w,Y),T(j,v)}return P.isTop=!0,P._setup=function(j){if(!j.partial){var v=y.extend({},_.helpers,j.helpers);if(l3(v,K),K.helpers=v,q.usePartial)K.partials=K.mergeIfNeeded(j.partials,_.partials);if(q.usePartial||q.useDecorators)K.decorators=y.extend({},_.decorators,j.decorators);K.hooks={},K.protoAccessControl=m8.createProtoAccessControl(j);var w=j.allowCallsToHelperMissing||$;X8.moveHelperToHooks(K,"helperMissing",w),X8.moveHelperToHooks(K,"blockHelperMissing",w)}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,w,O){if(q.useBlockParams&&!w)throw new D.default("must pass block params");if(q.useDepths&&!O)throw new D.default("must pass parent depths");return x_(K,j,q[j],v,0,w,O)},P}function x_(q,_,$,f,K,P,j){function v(w){var O=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Y=j;if(j&&w!=j[0]&&!(w===q.nullContext&&j[0]===null))Y=[w].concat(j);return $(q,w,q.helpers,q.partials,O.data||f,P&&[O.blockParams].concat(P),Y)}return v=p8($,v,q,j,f,P),v.program=_,v.depth=j?j.length:0,v.blockParams=K||0,v}function V3(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 i3(q,_,$){var f=$.data&&$.data["partial-block"];if($.partial=!0,$.ids)$.data.contextPath=$.ids[0]||$.data.contextPath;var K=void 0;if($.fn&&$.fn!==n8)(function(){$.data=L.createFrame($.data);var P=$.fn;if(K=$.data["partial-block"]=function(v){var w=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return w.data=L.createFrame(w.data),w.data["partial-block"]=f,P(v,w)},P.partials)$.partials=y.extend({},$.partials,P.partials)})();if(q===void 0&&K)q=K;if(q===void 0)throw new D.default("The partial "+$.name+" could not be found");else if(q instanceof Function)return q(_,$)}function n8(){return""}function N3(q,_){if(!_||!("root"in _))_=_?L.createFrame(_):{},_.root=q;return _}function p8(q,_,$,f,K,P){if(q.decorator){var j={};_=q.decorator(_,j,$,f&&f[0],K,P,f),y.extend(_,j)}return _}function l3(q,_){Object.keys(q).forEach(function($){var f=q[$];q[$]=t3(f,_)})}function t3(q,_){var $=_.lookupProperty;return S3.wrapHelper(q,function(f){return y.extend({lookupProperty:$},f)})}});var tq=J((G8,d8)=>{G8.__esModule=!0;G8.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}};d8.exports=G8.default});var V8=J((C8,M8)=>{C8.__esModule=!0;function aq(q){return q&&q.__esModule?q:{default:q}}function Rq(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 s3=L_(),e8=Rq(s3),B3=u8(),U3=aq(B3),F3=N(),Q3=aq(F3),_4=e(),cq=Rq(_4),q4=o8(),b8=Rq(q4),$4=tq(),f4=aq($4);function S8(){var q=new e8.HandlebarsEnvironment;return cq.extend(q,e8),q.SafeString=U3.default,q.Exception=Q3.default,q.Utils=cq,q.escapeExpression=cq.escapeExpression,q.VM=b8,q.template=function(_){return b8.template(_,q)},q}var d_=S8();d_.create=S8;f4.default(d_);d_.default=d_;C8.default=d_;M8.exports=C8.default});var Eq=J((N8,l8)=>{N8.__esModule=!0;var i8={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&&!i8.helpers.scopedId(_)&&!_.depth}}};N8.default=i8;l8.exports=N8.default});var a8=J((t8,c8)=>{t8.__esModule=!0;var w4=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,w,O,Y){var T=O.length-1;switch(w){case 1:return O[T-1];case 2:this.$=v.prepareProgram(O[T]);break;case 3:this.$=O[T];break;case 4:this.$=O[T];break;case 5:this.$=O[T];break;case 6:this.$=O[T];break;case 7:this.$=O[T];break;case 8:this.$=O[T];break;case 9:this.$={type:"CommentStatement",value:v.stripComment(O[T]),strip:v.stripFlags(O[T],O[T]),loc:v.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:O[T],value:O[T],loc:v.locInfo(this._$)};break;case 11:this.$=v.prepareRawBlock(O[T-2],O[T-1],O[T],this._$);break;case 12:this.$={path:O[T-3],params:O[T-2],hash:O[T-1]};break;case 13:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!1,this._$);break;case 14:this.$=v.prepareBlock(O[T-3],O[T-2],O[T-1],O[T],!0,this._$);break;case 15:this.$={open:O[T-5],path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 16:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 17:this.$={path:O[T-4],params:O[T-3],hash:O[T-2],blockParams:O[T-1],strip:v.stripFlags(O[T-5],O[T])};break;case 18:this.$={strip:v.stripFlags(O[T-1],O[T-1]),program:O[T]};break;case 19:var k=v.prepareBlock(O[T-2],O[T-1],O[T],O[T],!1,this._$),h=v.prepareProgram([k],O[T-1].loc);h.chained=!0,this.$={strip:O[T-2].strip,program:h,chain:!0};break;case 20:this.$=O[T];break;case 21:this.$={path:O[T-1],strip:v.stripFlags(O[T-2],O[T])};break;case 22:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 23:this.$=v.prepareMustache(O[T-3],O[T-2],O[T-1],O[T-4],v.stripFlags(O[T-4],O[T]),this._$);break;case 24:this.$={type:"PartialStatement",name:O[T-3],params:O[T-2],hash:O[T-1],indent:"",strip:v.stripFlags(O[T-4],O[T]),loc:v.locInfo(this._$)};break;case 25:this.$=v.preparePartialBlock(O[T-2],O[T-1],O[T],this._$);break;case 26:this.$={path:O[T-3],params:O[T-2],hash:O[T-1],strip:v.stripFlags(O[T-4],O[T])};break;case 27:this.$=O[T];break;case 28:this.$=O[T];break;case 29:this.$={type:"SubExpression",path:O[T-3],params:O[T-2],hash:O[T-1],loc:v.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:O[T],loc:v.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:v.id(O[T-2]),value:O[T],loc:v.locInfo(this._$)};break;case 32:this.$=v.id(O[T-1]);break;case 33:this.$=O[T];break;case 34:this.$=O[T];break;case 35:this.$={type:"StringLiteral",value:O[T],original:O[T],loc:v.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(O[T]),original:Number(O[T]),loc:v.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:O[T]==="true",original:O[T]==="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.$=O[T];break;case 41:this.$=O[T];break;case 42:this.$=v.preparePath(!0,O[T],this._$);break;case 43:this.$=v.preparePath(!1,O[T],this._$);break;case 44:O[T-2].push({part:v.id(O[T]),original:O[T],separator:O[T-1]}),this.$=O[T-2];break;case 45:this.$=[{part:v.id(O[T]),original:O[T]}];break;case 46:this.$=[];break;case 47:O[T-1].push(O[T]);break;case 48:this.$=[];break;case 49:O[T-1].push(O[T]);break;case 50:this.$=[];break;case 51:O[T-1].push(O[T]);break;case 58:this.$=[];break;case 59:O[T-1].push(O[T]);break;case 64:this.$=[];break;case 65:O[T-1].push(O[T]);break;case 70:this.$=[];break;case 71:O[T-1].push(O[T]);break;case 78:this.$=[];break;case 79:O[T-1].push(O[T]);break;case 82:this.$=[];break;case 83:O[T-1].push(O[T]);break;case 86:this.$=[];break;case 87:O[T-1].push(O[T]);break;case 90:this.$=[];break;case 91:O[T-1].push(O[T]);break;case 94:this.$=[];break;case 95:O[T-1].push(O[T]);break;case 98:this.$=[O[T]];break;case 99:O[T-1].push(O[T]);break;case 100:this.$=[O[T]];break;case 101:O[T-1].push(O[T]);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],w=[],O=this.table,Y="",T=0,k=0,h=0,W=2,H=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 u=this.lexer.yylloc;w.push(u);var Z=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function X(g){j.length=j.length-2*g,v.length=v.length-g,w.length=w.length-g}function r(){var g=P.lexer.lex()||1;if(typeof g!=="number")g=P.symbols_[g]||g;return g}var A,t,V,i,_v,vq,K_={},N_,I,Z$,l_;while(!0){if(V=j[j.length-1],this.defaultActions[V])i=this.defaultActions[V];else{if(A===null||typeof A>"u")A=r();i=O[V]&&O[V][A]}if(typeof i>"u"||!i.length||!i[0]){var wq="";if(!h){l_=[];for(N_ in O[V])if(this.terminals_[N_]&&N_>2)l_.push("'"+this.terminals_[N_]+"'");if(this.lexer.showPosition)wq="Parse error on line "+(T+1)+`:
541
541
  `+this.lexer.showPosition()+`
542
542
  Expecting `+l_.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else wq="Parse error on line "+(T+1)+": Unexpected "+(A==1?"end of input":"'"+(this.terminals_[A]||A)+"'");this.parseError(wq,{text:this.lexer.match,token:this.terminals_[A]||A,line:this.lexer.yylineno,loc:u,expected:l_})}}if(i[0]instanceof Array&&i.length>1)throw Error("Parse Error: multiple actions possible at state: "+V+", token: "+A);switch(i[0]){case 1:if(j.push(A),v.push(this.lexer.yytext),w.push(this.lexer.yylloc),j.push(i[1]),A=null,!t){if(k=this.lexer.yyleng,Y=this.lexer.yytext,T=this.lexer.yylineno,u=this.lexer.yylloc,h>0)h--}else A=t,t=null;break;case 2:if(I=this.productions_[i[1]][1],K_.$=v[v.length-I],K_._$={first_line:w[w.length-(I||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(I||1)].first_column,last_column:w[w.length-1].last_column},Z)K_._$.range=[w[w.length-(I||1)].range[0],w[w.length-1].range[1]];if(vq=this.performAction.call(K_,Y,k,T,this.yy,i[1],v,w),typeof vq<"u")return vq;if(I)j=j.slice(0,-1*I*2),v=v.slice(0,-1*I),w=w.slice(0,-1*I);j.push(this.productions_[i[1]][0]),v.push(K_.$),w.push(K_._$),Z$=O[j[j.length-2]][j[j.length-1]],j.push(Z$);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 w=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 O=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===w.length?this.yylloc.first_column:0)+w[w.length-v.length].length-v[0].length:this.yylloc.first_column-j},this.options.ranges)this.yylloc.range=[O[0],O[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()+`
543
543
  `+j+"^"},next:function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var P,j,v,w,O,Y;if(!this._more)this.yytext="",this.match="";var T=this._currentRules();for(var k=0;k<T.length;k++)if(v=this._input.match(this.rules[T[k]]),v&&(!j||v[0].length>j[0].length)){if(j=v,w=k,!this.options.flex)break}if(j){if(Y=j[0].match(/(?:\r\n?|\n).*/g),Y)this.yylineno+=Y.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Y?Y[Y.length-1].length-Y[Y.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,T[w],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.
544
- `+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,w){function O(T,k){return j.yytext=j.yytext.substring(T,j.yyleng-k+T)}var Y=w;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")O(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")O(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 O(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=O(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=O(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 $}();t8.default=h4;c8.exports=t8.default});var U_=J((I8,g8)=>{I8.__esModule=!0;function W4(q){return q&&q.__esModule?q:{default:q}}var J4=N(),Iq=W4(J4);function s_(){this.parents=[]}s_.prototype={constructor:s_,mutating:!1,acceptKey:function(_,$){var f=this.accept(_[$]);if(this.mutating){if(f&&!s_.prototype[f.type])throw new Iq.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+_.type);_[$]=f}},acceptRequired:function(_,$){if(this.acceptKey(_,$),!_[$])throw new Iq.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 Iq.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:B_,Decorator:B_,BlockStatement:R8,DecoratorBlock:R8,PartialStatement:E8,PartialBlockStatement:function(_){E8.call(this,_),this.acceptKey(_,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:B_,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(_){this.acceptArray(_.pairs)},HashPair:function(_){this.acceptRequired(_,"value")}};function B_(q){this.acceptRequired(q,"path"),this.acceptArray(q.params),this.acceptKey(q,"hash")}function R8(q){B_.call(this,q),this.acceptKey(q,"program"),this.acceptKey(q,"inverse")}function E8(q){this.acceptRequired(q,"name"),this.acceptArray(q.params),this.acceptKey(q,"hash")}I8.default=s_;g8.exports=I8.default});var L8=J((y8,D8)=>{y8.__esModule=!0;function u4(q){return q&&q.__esModule?q:{default:q}}var A4=U_(),X4=u4(A4);function E(){var q=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=q}E.prototype=new X4.default;E.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 w=gq(f,K,$),O=yq(f,K,$),Y=v.openStandalone&&w,T=v.closeStandalone&&O,k=v.inlineStandalone&&w&&O;if(v.close)q_(f,K,!0);if(v.open)s(f,K,!0);if(_&&k){if(q_(f,K),s(f,K)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(f[K-1].original)[1]}}if(_&&Y)q_((j.program||j.inverse).body),s(f,K);if(_&&T)q_(f,K),s((j.inverse||j.program).body)}return q};E.prototype.BlockStatement=E.prototype.DecoratorBlock=E.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:yq(_.body),closeStandalone:gq((f||_).body)};if(q.openStrip.close)q_(_.body,null,!0);if($){var j=q.inverseStrip;if(j.open)s(_.body,null,!0);if(j.close)q_(f.body,null,!0);if(q.closeStrip.open)s(K.body,null,!0);if(!this.options.ignoreStandalone&&gq(_.body)&&yq(f.body))s(_.body),q_(f.body)}else if(q.closeStrip.open)s(_.body,null,!0);return P};E.prototype.Decorator=E.prototype.MustacheStatement=function(q){return q.strip};E.prototype.PartialStatement=E.prototype.CommentStatement=function(q){var _=q.strip||{};return{inlineStandalone:!0,open:_.open,close:_.close}};function gq(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 yq(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 q_(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 s(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}y8.default=E;D8.exports=y8.default});var x8=J((l4)=>{l4.__esModule=!0;l4.SourceLocation=G4;l4.id=d4;l4.stripFlags=e4;l4.stripComment=b4;l4.preparePath=S4;l4.prepareMustache=C4;l4.prepareRawBlock=M4;l4.prepareBlock=V4;l4.prepareProgram=i4;l4.preparePartialBlock=N4;function p4(q){return q&&q.__esModule?q:{default:q}}var o4=N(),Dq=p4(o4);function Lq(q,_){if(_=_.path?_.path.original:_,q.path.original!==_){var $={loc:q.path.loc};throw new Dq.default(q.path.original+" doesn't match "+_,$)}}function G4(q,_){this.source=q,this.start={line:_.first_line,column:_.first_column},this.end={line:_.last_line,column:_.last_column}}function d4(q){if(/^\[.*\]$/.test(q))return q.substring(1,q.length-1);else return q}function e4(q,_){return{open:q.charAt(2)==="~",close:_.charAt(_.length-3)==="~"}}function b4(q){return q.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function S4(q,_,$){$=this.locInfo($);var f=q?"@":"",K=[],P=0;for(var j=0,v=_.length;j<v;j++){var w=_[j].part,O=_[j].original!==w;if(f+=(_[j].separator||"")+w,!O&&(w===".."||w==="."||w==="this")){if(K.length>0)throw new Dq.default("Invalid path: "+f,{loc:$});else if(w==="..")P++}else K.push(w)}return{type:"PathExpression",data:q,depth:P,parts:K,original:f,loc:$}}function C4(q,_,$,f,K,P){var j=f.charAt(3)||f.charAt(2),v=j!=="{"&&j!=="&",w=/\*/.test(f);return{type:w?"Decorator":"MustacheStatement",path:q,params:_,hash:$,escaped:v,strip:K,loc:this.locInfo(P)}}function M4(q,_,$,f){Lq(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 V4(q,_,$,f,K,P){if(f&&f.path)Lq(q,f);var j=/\*/.test(q.open);_.blockParams=q.blockParams;var v=void 0,w=void 0;if($){if(j)throw new Dq.default("Unexpected inverse block on decorator",$);if($.chain)$.program.body[0].closeStrip=f.strip;w=$.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:w,closeStrip:f&&f.strip,loc:this.locInfo(P)}}function i4(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 N4(q,_,$,f){return Lq(q,$),{type:"PartialBlockStatement",name:q.path,params:q.params,hash:q.hash,program:_,openStrip:q.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var U8=J((fj)=>{fj.__esModule=!0;fj.parseWithoutProcessing=B8;fj.parse=$j;function s4(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 s8(q){return q&&q.__esModule?q:{default:q}}var B4=a8(),xq=s8(B4),U4=L8(),F4=s8(U4),Q4=x8(),_j=s4(Q4),qj=e();fj.parser=xq.default;var F_={};qj.extend(F_,_j);function B8(q,_){if(q.type==="Program")return q;xq.default.yy=F_,F_.locInfo=function(f){return new F_.SourceLocation(_&&_.srcName,f)};var $=xq.default.parse(q);return $}function $j(q,_){var $=B8(q,_),f=new F4.default(_);return f.accept($)}});var q6=J((hj)=>{hj.__esModule=!0;hj.Compiler=sq;hj.precompile=Yj;hj.compile=kj;function Q8(q){return q&&q.__esModule?q:{default:q}}var wj=N(),b_=Q8(wj),S_=e(),Oj=Eq(),e_=Q8(Oj),Tj=[].slice;function sq(){}sq.prototype={compiler:sq,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||!_6(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=S_.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 b_.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(_){F8(_);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 b_.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(_){F8(_);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 b_.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,e_.default.helpers.simpleId(P))},PathExpression:function(_){this.addDepth(_.depth),this.opcode("getContext",_.depth);var $=_.parts[0],f=e_.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:Tj.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(_){if(!_)return;this.useDepths=!0},classifySexpr:function(_){var $=e_.default.helpers.simpleId(_.path),f=$&&!!this.blockParamIndex(_.path.parts[0]),K=!f&&e_.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&&!e_.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&&S_.indexOf(K,_);if(K&&P>=0)return[$,P]}}};function Yj(q,_,$){if(q==null||typeof q!=="string"&&q.type!=="Program")throw new b_.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 kj(q,_,$){if(_===void 0)_={};if(q==null||typeof q!=="string"&&q.type!=="Program")throw new b_.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+q);if(_=S_.extend({},_),!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=void 0;function K(){var j=$.parse(q,_),v=new $.Compiler().compile(j,_),w=new $.JavaScriptCompiler().compile(v,_,void 0,!0);return $.template(w)}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,w,O){if(!f)f=K();return f._child(j,v,w,O)},P}function _6(q,_){if(q===_)return!0;if(S_.isArray(q)&&S_.isArray(_)&&q.length===_.length){for(var $=0;$<q.length;$++)if(!_6(q[$],_[$]))return!1;return!0}}function F8(q){if(!q.path.parts){var _=q.path;q.path={type:"PathExpression",data:!1,depth:0,parts:[_.original+""],original:_.original+"",loc:_.loc}}}});var f6=J((Zj)=>{var $6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Zj.encode=function(q){if(0<=q&&q<$6.length)return $6[q];throw TypeError("Must be between 0 and 63: "+q)};Zj.decode=function(q){var _=65,$=90,f=97,K=122,P=48,j=57,v=43,w=47,O=26,Y=52;if(_<=q&&q<=$)return q-_;if(f<=q&&q<=K)return q-f+O;if(P<=q&&q<=j)return q-P+Y;if(q==v)return 62;if(q==w)return 63;return-1}});var Uq=J((mj)=>{var K6=f6(),Bq=5,P6=1<<Bq,j6=P6-1,v6=P6;function Aj(q){return q<0?(-q<<1)+1:(q<<1)+0}function Xj(q){var _=(q&1)===1,$=q>>1;return _?-$:$}mj.encode=function(_){var $="",f,K=Aj(_);do{if(f=K&j6,K>>>=Bq,K>0)f|=v6;$+=K6.encode(f)}while(K>0);return $};mj.decode=function(_,$,f){var K=_.length,P=0,j=0,v,w;do{if($>=K)throw Error("Expected more digits in base 64 VLQ value.");if(w=K6.decode(_.charCodeAt($++)),w===-1)throw Error("Invalid base64 digit: "+_.charAt($-1));v=!!(w&v6),w&=j6,P=P+(w<<j),j+=Bq}while(v);f.value=Xj(P),f.rest=$}});var z_=J((Nj)=>{function oj(q,_,$){if(_ in q)return q[_];else if(arguments.length===3)return $;else throw Error('"'+_+'" is a required argument.')}Nj.getArg=oj;var w6=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Gj=/^data:.+\,.+$/;function C_(q){var _=q.match(w6);if(!_)return null;return{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}}Nj.urlParse=C_;function k_(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 _}Nj.urlGenerate=k_;function Fq(q){var _=q,$=C_(q);if($){if(!$.path)return q;_=$.path}var f=Nj.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=_,k_($);return _}Nj.normalize=Fq;function O6(q,_){if(q==="")q=".";if(_==="")_=".";var $=C_(_),f=C_(q);if(f)q=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return k_($)}if($||_.match(Gj))return _;if(f&&!f.host&&!f.path)return f.host=_,k_(f);var K=_.charAt(0)==="/"?_:Fq(q.replace(/\/+$/,"")+"/"+_);if(f)return f.path=K,k_(f);return K}Nj.join=O6;Nj.isAbsolute=function(q){return q.charAt(0)==="/"||w6.test(q)};function dj(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)}Nj.relative=dj;var T6=function(){var q=Object.create(null);return!("__proto__"in q)}();function Y6(q){return q}function ej(q){if(k6(q))return"$"+q;return q}Nj.toSetString=T6?Y6:ej;function bj(q){if(k6(q))return q.slice(1);return q}Nj.fromSetString=T6?Y6:bj;function k6(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 Sj(q,_,$){var f=h_(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 h_(q.name,_.name)}Nj.compareByOriginalPositions=Sj;function Cj(q,_,$){var f=q.generatedLine-_.generatedLine;if(f!==0)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0||$)return f;if(f=h_(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 h_(q.name,_.name)}Nj.compareByGeneratedPositionsDeflated=Cj;function h_(q,_){if(q===_)return 0;if(q===null)return 1;if(_===null)return-1;if(q>_)return 1;return-1}function Mj(q,_){var $=q.generatedLine-_.generatedLine;if($!==0)return $;if($=q.generatedColumn-_.generatedColumn,$!==0)return $;if($=h_(q.source,_.source),$!==0)return $;if($=q.originalLine-_.originalLine,$!==0)return $;if($=q.originalColumn-_.originalColumn,$!==0)return $;return h_(q.name,_.name)}Nj.compareByGeneratedPositionsInflated=Mj;function Vj(q){return JSON.parse(q.replace(/^\)]}'[^\n]*\n/,""))}Nj.parseSourceMapInput=Vj;function ij(q,_,$){if(_=_||"",q){if(q[q.length-1]!=="/"&&_[0]!=="/")q+="/";_=q+_}if($){var f=C_($);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)}_=O6(k_(f),_)}return Fq(_)}Nj.computeSourceURL=ij});var q$=J((Uj)=>{var Qq=z_(),_$=Object.prototype.hasOwnProperty,$_=typeof Map<"u";function x(){this._array=[],this._set=$_?new Map:Object.create(null)}x.fromArray=function(_,$){var f=new x;for(var K=0,P=_.length;K<P;K++)f.add(_[K],$);return f};x.prototype.size=function(){return $_?this._set.size:Object.getOwnPropertyNames(this._set).length};x.prototype.add=function(_,$){var f=$_?_:Qq.toSetString(_),K=$_?this.has(_):_$.call(this._set,f),P=this._array.length;if(!K||$)this._array.push(_);if(!K)if($_)this._set.set(_,P);else this._set[f]=P};x.prototype.has=function(_){if($_)return this._set.has(_);else{var $=Qq.toSetString(_);return _$.call(this._set,$)}};x.prototype.indexOf=function(_){if($_){var $=this._set.get(_);if($>=0)return $}else{var f=Qq.toSetString(_);if(_$.call(this._set,f))return this._set[f]}throw Error('"'+_+'" is not in the set.')};x.prototype.at=function(_){if(_>=0&&_<this._array.length)return this._array[_];throw Error("No element indexed by "+_)};x.prototype.toArray=function(){return this._array.slice()};Uj.ArraySet=x});var z6=J((_7)=>{var h6=z_();function Qj(q,_){var $=q.generatedLine,f=_.generatedLine,K=q.generatedColumn,P=_.generatedColumn;return f>$||f==$&&P>=K||h6.compareByGeneratedPositionsInflated(q,_)<=0}function Q_(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Q_.prototype.unsortedForEach=function(_,$){this._array.forEach(_,$)};Q_.prototype.add=function(_){if(Qj(this._last,_))this._last=_,this._array.push(_);else this._sorted=!1,this._array.push(_)};Q_.prototype.toArray=function(){if(!this._sorted)this._array.sort(h6.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};_7.MappingList=Q_});var $$=J((f7)=>{var M_=Uq(),o=z_(),_q=q$().ArraySet,$7=z6().MappingList;function l(q){if(!q)q={};this._file=o.getArg(q,"file",null),this._sourceRoot=o.getArg(q,"sourceRoot",null),this._skipValidation=o.getArg(q,"skipValidation",!1),this._sources=new _q,this._names=new _q,this._mappings=new $7,this._sourcesContents=null}l.prototype._version=3;l.fromSourceMap=function(_){var $=_.sourceRoot,f=new l({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=o.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=o.relative($,K);if(!f._sources.has(P))f._sources.add(P);var j=_.sourceContentFor(K);if(j!=null)f.setSourceContent(K,j)}),f};l.prototype.addMapping=function(_){var $=o.getArg(_,"generated"),f=o.getArg(_,"original",null),K=o.getArg(_,"source",null),P=o.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})};l.prototype.setSourceContent=function(_,$){var f=_;if(this._sourceRoot!=null)f=o.relative(this._sourceRoot,f);if($!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[o.toSetString(f)]=$}else if(this._sourcesContents){if(delete this._sourcesContents[o.toSetString(f)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};l.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=o.relative(P,K);var j=new _q,v=new _q;this._mappings.unsortedForEach(function(w){if(w.source===K&&w.originalLine!=null){var O=_.originalPositionFor({line:w.originalLine,column:w.originalColumn});if(O.source!=null){if(w.source=O.source,f!=null)w.source=o.join(f,w.source);if(P!=null)w.source=o.relative(P,w.source);if(w.originalLine=O.line,w.originalColumn=O.column,O.name!=null)w.name=O.name}}var Y=w.source;if(Y!=null&&!j.has(Y))j.add(Y);var T=w.name;if(T!=null&&!v.has(T))v.add(T)},this),this._sources=j,this._names=v,_.sources.forEach(function(w){var O=_.sourceContentFor(w);if(O!=null){if(f!=null)w=o.join(f,w);if(P!=null)w=o.relative(P,w);this.setSourceContent(w,O)}},this)};l.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}))};l.prototype._serializeMappings=function(){var _=0,$=1,f=0,K=0,P=0,j=0,v="",w,O,Y,T,k=this._mappings.toArray();for(var h=0,W=k.length;h<W;h++){if(O=k[h],w="",O.generatedLine!==$){_=0;while(O.generatedLine!==$)w+=";",$++}else if(h>0){if(!o.compareByGeneratedPositionsInflated(O,k[h-1]))continue;w+=","}if(w+=M_.encode(O.generatedColumn-_),_=O.generatedColumn,O.source!=null){if(T=this._sources.indexOf(O.source),w+=M_.encode(T-j),j=T,w+=M_.encode(O.originalLine-1-K),K=O.originalLine-1,w+=M_.encode(O.originalColumn-f),f=O.originalColumn,O.name!=null)Y=this._names.indexOf(O.name),w+=M_.encode(Y-P),P=Y}v+=w}return v};l.prototype._generateSourcesContent=function(_,$){return _.map(function(f){if(!this._sourcesContents)return null;if($!=null)f=o.relative($,f);var K=o.toSetString(f);return Object.prototype.hasOwnProperty.call(this._sourcesContents,K)?this._sourcesContents[K]:null},this)};l.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 _};l.prototype.toString=function(){return JSON.stringify(this.toJSON())};f7.SourceMapGenerator=l});var W6=J((P7)=>{P7.GREATEST_LOWER_BOUND=1;P7.LEAST_UPPER_BOUND=2;function f$(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 f$(j,_,$,f,K,P);if(P==P7.LEAST_UPPER_BOUND)return _<f.length?_:-1;else return j}else{if(j-q>1)return f$(q,j,$,f,K,P);if(P==P7.LEAST_UPPER_BOUND)return j;else return q<0?-1:q}}P7.search=function(_,$,f,K){if($.length===0)return-1;var P=f$(-1,$.length,_,$,f,K||P7.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var J6=J((w7)=>{function P$(q,_,$){var f=q[_];q[_]=q[$],q[$]=f}function v7(q,_){return Math.round(q+Math.random()*(_-q))}function j$(q,_,$,f){if($<f){var K=v7($,f),P=$-1;P$(q,K,f);var j=q[f];for(var v=$;v<f;v++)if(_(q[v],j)<=0)P+=1,P$(q,P,v);P$(q,P+1,v);var w=P+1;j$(q,_,$,w-1),j$(q,_,w+1,f)}}w7.quickSort=function(q,_){j$(q,_,0,q.length-1)}});var r6=J((Y7)=>{var z=z_(),v$=W6(),H_=q$().ArraySet,T7=Uq(),V_=J6().quickSort;function m(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);return $.sections!=null?new a($,_):new G($,_)}m.fromSourceMap=function(q,_){return G.fromSourceMap(q,_)};m.prototype._version=3;m.prototype.__generatedMappings=null;Object.defineProperty(m.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});m.prototype.__originalMappings=null;Object.defineProperty(m.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});m.prototype._charIsMappingSeparator=function(_,$){var f=_.charAt($);return f===";"||f===","};m.prototype._parseMappings=function(_,$){throw Error("Subclasses must implement _parseMappings")};m.GENERATED_ORDER=1;m.ORIGINAL_ORDER=2;m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.prototype.eachMapping=function(_,$,f){var K=$||null,P=f||m.GENERATED_ORDER,j;switch(P){case m.GENERATED_ORDER:j=this._generatedMappings;break;case m.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(w){var O=w.source===null?null:this._sources.at(w.source);return O=z.computeSourceURL(v,O,this._sourceMapURL),{source:O,generatedLine:w.generatedLine,generatedColumn:w.generatedColumn,originalLine:w.originalLine,originalColumn:w.originalColumn,name:w.name===null?null:this._names.at(w.name)}},this).forEach(_,K)};m.prototype.allGeneratedPositionsFor=function(_){var $=z.getArg(_,"line"),f={source:z.getArg(_,"source"),originalLine:$,originalColumn:z.getArg(_,"column",0)};if(f.source=this._findSourceIndex(f.source),f.source<0)return[];var K=[],P=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,v$.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:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var w=j.originalColumn;while(j&&j.originalLine===$&&j.originalColumn==w)K.push({line:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return K};Y7.SourceMapConsumer=m;function G(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sources"),P=z.getArg($,"names",[]),j=z.getArg($,"sourceRoot",null),v=z.getArg($,"sourcesContent",null),w=z.getArg($,"mappings"),O=z.getArg($,"file",null);if(f!=this._version)throw Error("Unsupported version: "+f);if(j)j=z.normalize(j);K=K.map(String).map(z.normalize).map(function(Y){return j&&z.isAbsolute(j)&&z.isAbsolute(Y)?z.relative(j,Y):Y}),this._names=H_.fromArray(P.map(String),!0),this._sources=H_.fromArray(K,!0),this._absoluteSources=this._sources.toArray().map(function(Y){return z.computeSourceURL(j,Y,_)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=w,this._sourceMapURL=_,this.file=O}G.prototype=Object.create(m.prototype);G.prototype.consumer=m;G.prototype._findSourceIndex=function(q){var _=q;if(this.sourceRoot!=null)_=z.relative(this.sourceRoot,_);if(this._sources.has(_))return this._sources.indexOf(_);var $;for($=0;$<this._absoluteSources.length;++$)if(this._absoluteSources[$]==q)return $;return-1};G.fromSourceMap=function(_,$){var f=Object.create(G.prototype),K=f._names=H_.fromArray(_._names.toArray(),!0),P=f._sources=H_.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(h){return z.computeSourceURL(f.sourceRoot,h,$)});var j=_._mappings.toArray().slice(),v=f.__generatedMappings=[],w=f.__originalMappings=[];for(var O=0,Y=j.length;O<Y;O++){var T=j[O],k=new Z6;if(k.generatedLine=T.generatedLine,k.generatedColumn=T.generatedColumn,T.source){if(k.source=P.indexOf(T.source),k.originalLine=T.originalLine,k.originalColumn=T.originalColumn,T.name)k.name=K.indexOf(T.name);w.push(k)}v.push(k)}return V_(f.__originalMappings,z.compareByOriginalPositions),f};G.prototype._version=3;Object.defineProperty(G.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Z6(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}G.prototype._parseMappings=function(_,$){var f=1,K=0,P=0,j=0,v=0,w=0,O=_.length,Y=0,T={},k={},h=[],W=[],H,u,Z,X,r;while(Y<O)if(_.charAt(Y)===";")f++,Y++,K=0;else if(_.charAt(Y)===",")Y++;else{H=new Z6,H.generatedLine=f;for(X=Y;X<O;X++)if(this._charIsMappingSeparator(_,X))break;if(u=_.slice(Y,X),Z=T[u],Z)Y+=u.length;else{Z=[];while(Y<X)T7.decode(_,Y,k),r=k.value,Y=k.rest,Z.push(r);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");T[u]=Z}if(H.generatedColumn=K+Z[0],K=H.generatedColumn,Z.length>1){if(H.source=v+Z[1],v+=Z[1],H.originalLine=P+Z[2],P=H.originalLine,H.originalLine+=1,H.originalColumn=j+Z[3],j=H.originalColumn,Z.length>4)H.name=w+Z[4],w+=Z[4]}if(W.push(H),typeof H.originalLine==="number")h.push(H)}V_(W,z.compareByGeneratedPositionsDeflated),this.__generatedMappings=W,V_(h,z.compareByOriginalPositions),this.__originalMappings=h};G.prototype._findMapping=function(_,$,f,K,P,j){if(_[f]<=0)throw TypeError("Line must be greater than or equal to 1, got "+_[f]);if(_[K]<0)throw TypeError("Column must be greater than or equal to 0, got "+_[K]);return v$.search(_,$,P,j)};G.prototype.computeColumnSpans=function(){for(var _=0;_<this._generatedMappings.length;++_){var $=this._generatedMappings[_];if(_+1<this._generatedMappings.length){var f=this._generatedMappings[_+1];if($.generatedLine===f.generatedLine){$.lastGeneratedColumn=f.generatedColumn-1;continue}}$.lastGeneratedColumn=1/0}};G.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=this._findMapping($,this._generatedMappings,"generatedLine","generatedColumn",z.compareByGeneratedPositionsDeflated,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(f>=0){var K=this._generatedMappings[f];if(K.generatedLine===$.generatedLine){var P=z.getArg(K,"source",null);if(P!==null)P=this._sources.at(P),P=z.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=z.getArg(K,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:z.getArg(K,"originalLine",null),column:z.getArg(K,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};G.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(_){return _==null})};G.prototype.sourceContentFor=function(_,$){if(!this.sourcesContent)return null;var f=this._findSourceIndex(_);if(f>=0)return this.sourcesContent[f];var K=_;if(this.sourceRoot!=null)K=z.relative(this.sourceRoot,K);var P;if(this.sourceRoot!=null&&(P=z.urlParse(this.sourceRoot))){var j=K.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+K))return this.sourcesContent[this._sources.indexOf("/"+K)]}if($)return null;else throw Error('"'+K+'" is not in the SourceMap.')};G.prototype.generatedPositionFor=function(_){var $=z.getArg(_,"source");if($=this._findSourceIndex($),$<0)return{line:null,column:null,lastColumn:null};var f={source:$,originalLine:z.getArg(_,"line"),originalColumn:z.getArg(_,"column")},K=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(K>=0){var P=this._originalMappings[K];if(P.source===f.source)return{line:z.getArg(P,"generatedLine",null),column:z.getArg(P,"generatedColumn",null),lastColumn:z.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Y7.BasicSourceMapConsumer=G;function a(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sections");if(f!=this._version)throw Error("Unsupported version: "+f);this._sources=new H_,this._names=new H_;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=z.getArg(j,"offset"),w=z.getArg(v,"line"),O=z.getArg(v,"column");if(w<P.line||w===P.line&&O<P.column)throw Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:w+1,generatedColumn:O+1},consumer:new m(z.getArg(j,"map"),_)}})}a.prototype=Object.create(m.prototype);a.prototype.constructor=m;a.prototype._version=3;Object.defineProperty(a.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}});a.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=v$.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})};a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(_){return _.consumer.hasContentsOfAllSources()})};a.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.')};a.prototype.generatedPositionFor=function(_){for(var $=0;$<this._sections.length;$++){var f=this._sections[$];if(f.consumer._findSourceIndex(z.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}};a.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],w=K.consumer._sources.at(v.source);w=z.computeSourceURL(K.consumer.sourceRoot,w,this._sourceMapURL),this._sources.add(w),w=this._sources.indexOf(w);var O=null;if(v.name)O=K.consumer._names.at(v.name),this._names.add(O),O=this._names.indexOf(O);var Y={source:w,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:O};if(this.__generatedMappings.push(Y),typeof Y.originalLine==="number")this.__originalMappings.push(Y)}}V_(this.__generatedMappings,z.compareByGeneratedPositionsDeflated),V_(this.__originalMappings,z.compareByOriginalPositions)};Y7.IndexedSourceMapConsumer=a});var u6=J((Z7)=>{var H7=$$().SourceMapGenerator,qq=z_(),W7=/(\r?\n)/,J7=10,W_="$$$isSourceNode$$$";function M(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[W_]=!0,f!=null)this.add(f)}M.fromStringWithSourceMap=function(_,$,f){var K=new M,P=_.split(W7),j=0,v=function(){var k=W(),h=W()||"";return k+h;function W(){return j<P.length?P[j++]:void 0}},w=1,O=0,Y=null;if($.eachMapping(function(k){if(Y!==null)if(w<k.generatedLine)T(Y,v()),w++,O=0;else{var h=P[j]||"",W=h.substr(0,k.generatedColumn-O);P[j]=h.substr(k.generatedColumn-O),O=k.generatedColumn,T(Y,W),Y=k;return}while(w<k.generatedLine)K.add(v()),w++;if(O<k.generatedColumn){var h=P[j]||"";K.add(h.substr(0,k.generatedColumn)),P[j]=h.substr(k.generatedColumn),O=k.generatedColumn}Y=k},this),j<P.length){if(Y)T(Y,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(k){var h=$.sourceContentFor(k);if(h!=null){if(f!=null)k=qq.join(f,k);K.setSourceContent(k,h)}}),K;function T(k,h){if(k===null||k.source===void 0)K.add(h);else{var W=f?qq.join(f,k.source):k.source;K.add(new M(k.originalLine,k.originalColumn,W,h,k.name))}}};M.prototype.add=function(_){if(Array.isArray(_))_.forEach(function($){this.add($)},this);else if(_[W_]||typeof _==="string"){if(_)this.children.push(_)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.prepend=function(_){if(Array.isArray(_))for(var $=_.length-1;$>=0;$--)this.prepend(_[$]);else if(_[W_]||typeof _==="string")this.children.unshift(_);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.walk=function(_){var $;for(var f=0,K=this.children.length;f<K;f++)if($=this.children[f],$[W_])$.walk(_);else if($!=="")_($,{source:this.source,line:this.line,column:this.column,name:this.name})};M.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};M.prototype.replaceRight=function(_,$){var f=this.children[this.children.length-1];if(f[W_])f.replaceRight(_,$);else if(typeof f==="string")this.children[this.children.length-1]=f.replace(_,$);else this.children.push("".replace(_,$));return this};M.prototype.setSourceContent=function(_,$){this.sourceContents[qq.toSetString(_)]=$};M.prototype.walkSourceContents=function(_){for(var $=0,f=this.children.length;$<f;$++)if(this.children[$][W_])this.children[$].walkSourceContents(_);var K=Object.keys(this.sourceContents);for(var $=0,f=K.length;$<f;$++)_(qq.fromSetString(K[$]),this.sourceContents[K[$]])};M.prototype.toString=function(){var _="";return this.walk(function($){_+=$}),_};M.prototype.toStringWithSourceMap=function(_){var $={code:"",line:1,column:0},f=new H7(_),K=!1,P=null,j=null,v=null,w=null;return this.walk(function(O,Y){if($.code+=O,Y.source!==null&&Y.line!==null&&Y.column!==null){if(P!==Y.source||j!==Y.line||v!==Y.column||w!==Y.name)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name});P=Y.source,j=Y.line,v=Y.column,w=Y.name,K=!0}else if(K)f.addMapping({generated:{line:$.line,column:$.column}}),P=null,K=!1;for(var T=0,k=O.length;T<k;T++)if(O.charCodeAt(T)===J7){if($.line++,$.column=0,T+1===k)P=null,K=!1;else if(K)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name})}else $.column++}),this.walkSourceContents(function(O,Y){f.setSourceContent(O,Y)}),{code:$.code,map:f}};Z7.SourceNode=M});var A6=J((u7)=>{u7.SourceMapGenerator=$$().SourceMapGenerator;u7.SourceMapConsumer=r6().SourceMapConsumer;u7.SourceNode=u6().SourceNode});var p6=J((m6,n6)=>{m6.__esModule=!0;var O$=e(),f_=void 0;try{if(typeof define!=="function"||!define.amd)T$=A6(),f_=T$.SourceNode}catch(q){}var T$;if(!f_)f_=function(q,_,$,f){if(this.src="",f)this.add(f)},f_.prototype={add:function(_){if(O$.isArray(_))_=_.join("");this.src+=_},prepend:function(_){if(O$.isArray(_))_=_.join("");this.src=_+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function w$(q,_,$){if(O$.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 X6(q){this.srcFile=q,this.source=[]}X6.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([" ",$,`
545
- `])}),_},each:function(_){for(var $=0,f=this.source.length;$<f;$++)_(this.source[$])},empty:function(){var _=this.currentLocation||{start:{}};return new f_(_.start.line,_.start.column,this.srcFile)},wrap:function(_){var $=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(_ instanceof f_)return _;return _=w$(_,this,$),new f_($.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=w$(_[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(w$(_[f],this))}return $},generateArray:function(_){var $=this.generateList(_);return $.prepend("["),$.add("]"),$}};m6.default=X6;n6.exports=m6.default});var S6=J((e6,b6)=>{e6.__esModule=!0;function d6(q){return q&&q.__esModule?q:{default:q}}var o6=L_(),o7=N(),Y$=d6(o7),G7=e(),d7=p6(),G6=d6(d7);function J_(q){this.value=q}function Z_(){}Z_.prototype={nameLookup:function(_,$){return this.internalNameLookup(_,$)},depthedLookup:function(_){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(_),")"]},compilerInfo:function(){var _=o6.COMPILER_REVISION,$=o6.REVISION_CHANGES[_];return[_,$]},appendToBuffer:function(_,$,f){if(!G7.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,w=void 0,O=void 0;for(w=0,O=P.length;w<O;w++)j=P[w],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(),`;
544
+ `+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,w){function O(T,k){return j.yytext=j.yytext.substring(T,j.yyleng-k+T)}var Y=w;switch(v){case 0:if(j.yytext.slice(-2)==="\\\\")O(0,1),this.begin("mu");else if(j.yytext.slice(-1)==="\\")O(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 O(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=O(1,2).replace(/\\"/g,'"'),80;break;case 32:return j.yytext=O(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 $}();t8.default=w4;c8.exports=t8.default});var U_=J((I8,g8)=>{I8.__esModule=!0;function Y4(q){return q&&q.__esModule?q:{default:q}}var k4=N(),Iq=Y4(k4);function s_(){this.parents=[]}s_.prototype={constructor:s_,mutating:!1,acceptKey:function(_,$){var f=this.accept(_[$]);if(this.mutating){if(f&&!s_.prototype[f.type])throw new Iq.default('Unexpected node type "'+f.type+'" found when accepting '+$+" on "+_.type);_[$]=f}},acceptRequired:function(_,$){if(this.acceptKey(_,$),!_[$])throw new Iq.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 Iq.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:B_,Decorator:B_,BlockStatement:R8,DecoratorBlock:R8,PartialStatement:E8,PartialBlockStatement:function(_){E8.call(this,_),this.acceptKey(_,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:B_,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(_){this.acceptArray(_.pairs)},HashPair:function(_){this.acceptRequired(_,"value")}};function B_(q){this.acceptRequired(q,"path"),this.acceptArray(q.params),this.acceptKey(q,"hash")}function R8(q){B_.call(this,q),this.acceptKey(q,"program"),this.acceptKey(q,"inverse")}function E8(q){this.acceptRequired(q,"name"),this.acceptArray(q.params),this.acceptKey(q,"hash")}I8.default=s_;g8.exports=I8.default});var L8=J((y8,D8)=>{y8.__esModule=!0;function H4(q){return q&&q.__esModule?q:{default:q}}var W4=U_(),J4=H4(W4);function E(){var q=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=q}E.prototype=new J4.default;E.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 w=gq(f,K,$),O=yq(f,K,$),Y=v.openStandalone&&w,T=v.closeStandalone&&O,k=v.inlineStandalone&&w&&O;if(v.close)q_(f,K,!0);if(v.open)s(f,K,!0);if(_&&k){if(q_(f,K),s(f,K)){if(j.type==="PartialStatement")j.indent=/([ \t]+$)/.exec(f[K-1].original)[1]}}if(_&&Y)q_((j.program||j.inverse).body),s(f,K);if(_&&T)q_(f,K),s((j.inverse||j.program).body)}return q};E.prototype.BlockStatement=E.prototype.DecoratorBlock=E.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:yq(_.body),closeStandalone:gq((f||_).body)};if(q.openStrip.close)q_(_.body,null,!0);if($){var j=q.inverseStrip;if(j.open)s(_.body,null,!0);if(j.close)q_(f.body,null,!0);if(q.closeStrip.open)s(K.body,null,!0);if(!this.options.ignoreStandalone&&gq(_.body)&&yq(f.body))s(_.body),q_(f.body)}else if(q.closeStrip.open)s(_.body,null,!0);return P};E.prototype.Decorator=E.prototype.MustacheStatement=function(q){return q.strip};E.prototype.PartialStatement=E.prototype.CommentStatement=function(q){var _=q.strip||{};return{inlineStandalone:!0,open:_.open,close:_.close}};function gq(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 yq(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 q_(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 s(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}y8.default=E;D8.exports=y8.default});var x8=J((C4)=>{C4.__esModule=!0;C4.SourceLocation=X4;C4.id=m4;C4.stripFlags=n4;C4.stripComment=p4;C4.preparePath=o4;C4.prepareMustache=G4;C4.prepareRawBlock=d4;C4.prepareBlock=e4;C4.prepareProgram=b4;C4.preparePartialBlock=S4;function u4(q){return q&&q.__esModule?q:{default:q}}var A4=N(),Dq=u4(A4);function Lq(q,_){if(_=_.path?_.path.original:_,q.path.original!==_){var $={loc:q.path.loc};throw new Dq.default(q.path.original+" doesn't match "+_,$)}}function X4(q,_){this.source=q,this.start={line:_.first_line,column:_.first_column},this.end={line:_.last_line,column:_.last_column}}function m4(q){if(/^\[.*\]$/.test(q))return q.substring(1,q.length-1);else return q}function n4(q,_){return{open:q.charAt(2)==="~",close:_.charAt(_.length-3)==="~"}}function p4(q){return q.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function o4(q,_,$){$=this.locInfo($);var f=q?"@":"",K=[],P=0;for(var j=0,v=_.length;j<v;j++){var w=_[j].part,O=_[j].original!==w;if(f+=(_[j].separator||"")+w,!O&&(w===".."||w==="."||w==="this")){if(K.length>0)throw new Dq.default("Invalid path: "+f,{loc:$});else if(w==="..")P++}else K.push(w)}return{type:"PathExpression",data:q,depth:P,parts:K,original:f,loc:$}}function G4(q,_,$,f,K,P){var j=f.charAt(3)||f.charAt(2),v=j!=="{"&&j!=="&",w=/\*/.test(f);return{type:w?"Decorator":"MustacheStatement",path:q,params:_,hash:$,escaped:v,strip:K,loc:this.locInfo(P)}}function d4(q,_,$,f){Lq(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 e4(q,_,$,f,K,P){if(f&&f.path)Lq(q,f);var j=/\*/.test(q.open);_.blockParams=q.blockParams;var v=void 0,w=void 0;if($){if(j)throw new Dq.default("Unexpected inverse block on decorator",$);if($.chain)$.program.body[0].closeStrip=f.strip;w=$.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:w,closeStrip:f&&f.strip,loc:this.locInfo(P)}}function b4(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 S4(q,_,$,f){return Lq(q,$),{type:"PartialBlockStatement",name:q.path,params:q.params,hash:q.hash,program:_,openStrip:q.strip,closeStrip:$&&$.strip,loc:this.locInfo(f)}}});var U8=J((F4)=>{F4.__esModule=!0;F4.parseWithoutProcessing=B8;F4.parse=U4;function g4(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 s8(q){return q&&q.__esModule?q:{default:q}}var y4=a8(),xq=s8(y4),D4=L8(),L4=s8(D4),x4=x8(),s4=g4(x4),B4=e();F4.parser=xq.default;var F_={};B4.extend(F_,s4);function B8(q,_){if(q.type==="Program")return q;xq.default.yy=F_,F_.locInfo=function(f){return new F_.SourceLocation(_&&_.srcName,f)};var $=xq.default.parse(q);return $}function U4(q,_){var $=B8(q,_),f=new L4.default(_);return f.accept($)}});var q6=J((wj)=>{wj.__esModule=!0;wj.Compiler=sq;wj.precompile=jj;wj.compile=vj;function Q8(q){return q&&q.__esModule?q:{default:q}}var fj=N(),b_=Q8(fj),S_=e(),Kj=Eq(),e_=Q8(Kj),Pj=[].slice;function sq(){}sq.prototype={compiler:sq,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||!_6(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=S_.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 b_.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(_){F8(_);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 b_.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(_){F8(_);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 b_.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,e_.default.helpers.simpleId(P))},PathExpression:function(_){this.addDepth(_.depth),this.opcode("getContext",_.depth);var $=_.parts[0],f=e_.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:Pj.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(_){if(!_)return;this.useDepths=!0},classifySexpr:function(_){var $=e_.default.helpers.simpleId(_.path),f=$&&!!this.blockParamIndex(_.path.parts[0]),K=!f&&e_.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&&!e_.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&&S_.indexOf(K,_);if(K&&P>=0)return[$,P]}}};function jj(q,_,$){if(q==null||typeof q!=="string"&&q.type!=="Program")throw new b_.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 vj(q,_,$){if(_===void 0)_={};if(q==null||typeof q!=="string"&&q.type!=="Program")throw new b_.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+q);if(_=S_.extend({},_),!("data"in _))_.data=!0;if(_.compat)_.useDepths=!0;var f=void 0;function K(){var j=$.parse(q,_),v=new $.Compiler().compile(j,_),w=new $.JavaScriptCompiler().compile(v,_,void 0,!0);return $.template(w)}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,w,O){if(!f)f=K();return f._child(j,v,w,O)},P}function _6(q,_){if(q===_)return!0;if(S_.isArray(q)&&S_.isArray(_)&&q.length===_.length){for(var $=0;$<q.length;$++)if(!_6(q[$],_[$]))return!1;return!0}}function F8(q){if(!q.path.parts){var _=q.path;q.path={type:"PathExpression",data:!1,depth:0,parts:[_.original+""],original:_.original+"",loc:_.loc}}}});var f6=J((hj)=>{var $6="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");hj.encode=function(q){if(0<=q&&q<$6.length)return $6[q];throw TypeError("Must be between 0 and 63: "+q)};hj.decode=function(q){var _=65,$=90,f=97,K=122,P=48,j=57,v=43,w=47,O=26,Y=52;if(_<=q&&q<=$)return q-_;if(f<=q&&q<=K)return q-f+O;if(P<=q&&q<=j)return q-P+Y;if(q==v)return 62;if(q==w)return 63;return-1}});var Uq=J((Zj)=>{var K6=f6(),Bq=5,P6=1<<Bq,j6=P6-1,v6=P6;function Wj(q){return q<0?(-q<<1)+1:(q<<1)+0}function Jj(q){var _=(q&1)===1,$=q>>1;return _?-$:$}Zj.encode=function(_){var $="",f,K=Wj(_);do{if(f=K&j6,K>>>=Bq,K>0)f|=v6;$+=K6.encode(f)}while(K>0);return $};Zj.decode=function(_,$,f){var K=_.length,P=0,j=0,v,w;do{if($>=K)throw Error("Expected more digits in base 64 VLQ value.");if(w=K6.decode(_.charCodeAt($++)),w===-1)throw Error("Invalid base64 digit: "+_.charAt($-1));v=!!(w&v6),w&=j6,P=P+(w<<j),j+=Bq}while(v);f.value=Jj(P),f.rest=$}});var z_=J((Sj)=>{function Aj(q,_,$){if(_ in q)return q[_];else if(arguments.length===3)return $;else throw Error('"'+_+'" is a required argument.')}Sj.getArg=Aj;var w6=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Xj=/^data:.+\,.+$/;function C_(q){var _=q.match(w6);if(!_)return null;return{scheme:_[1],auth:_[2],host:_[3],port:_[4],path:_[5]}}Sj.urlParse=C_;function k_(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 _}Sj.urlGenerate=k_;function Fq(q){var _=q,$=C_(q);if($){if(!$.path)return q;_=$.path}var f=Sj.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=_,k_($);return _}Sj.normalize=Fq;function O6(q,_){if(q==="")q=".";if(_==="")_=".";var $=C_(_),f=C_(q);if(f)q=f.path||"/";if($&&!$.scheme){if(f)$.scheme=f.scheme;return k_($)}if($||_.match(Xj))return _;if(f&&!f.host&&!f.path)return f.host=_,k_(f);var K=_.charAt(0)==="/"?_:Fq(q.replace(/\/+$/,"")+"/"+_);if(f)return f.path=K,k_(f);return K}Sj.join=O6;Sj.isAbsolute=function(q){return q.charAt(0)==="/"||w6.test(q)};function mj(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)}Sj.relative=mj;var T6=function(){var q=Object.create(null);return!("__proto__"in q)}();function Y6(q){return q}function nj(q){if(k6(q))return"$"+q;return q}Sj.toSetString=T6?Y6:nj;function pj(q){if(k6(q))return q.slice(1);return q}Sj.fromSetString=T6?Y6:pj;function k6(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 oj(q,_,$){var f=h_(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 h_(q.name,_.name)}Sj.compareByOriginalPositions=oj;function Gj(q,_,$){var f=q.generatedLine-_.generatedLine;if(f!==0)return f;if(f=q.generatedColumn-_.generatedColumn,f!==0||$)return f;if(f=h_(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 h_(q.name,_.name)}Sj.compareByGeneratedPositionsDeflated=Gj;function h_(q,_){if(q===_)return 0;if(q===null)return 1;if(_===null)return-1;if(q>_)return 1;return-1}function dj(q,_){var $=q.generatedLine-_.generatedLine;if($!==0)return $;if($=q.generatedColumn-_.generatedColumn,$!==0)return $;if($=h_(q.source,_.source),$!==0)return $;if($=q.originalLine-_.originalLine,$!==0)return $;if($=q.originalColumn-_.originalColumn,$!==0)return $;return h_(q.name,_.name)}Sj.compareByGeneratedPositionsInflated=dj;function ej(q){return JSON.parse(q.replace(/^\)]}'[^\n]*\n/,""))}Sj.parseSourceMapInput=ej;function bj(q,_,$){if(_=_||"",q){if(q[q.length-1]!=="/"&&_[0]!=="/")q+="/";_=q+_}if($){var f=C_($);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)}_=O6(k_(f),_)}return Fq(_)}Sj.computeSourceURL=bj});var q$=J((Dj)=>{var Qq=z_(),_$=Object.prototype.hasOwnProperty,$_=typeof Map<"u";function x(){this._array=[],this._set=$_?new Map:Object.create(null)}x.fromArray=function(_,$){var f=new x;for(var K=0,P=_.length;K<P;K++)f.add(_[K],$);return f};x.prototype.size=function(){return $_?this._set.size:Object.getOwnPropertyNames(this._set).length};x.prototype.add=function(_,$){var f=$_?_:Qq.toSetString(_),K=$_?this.has(_):_$.call(this._set,f),P=this._array.length;if(!K||$)this._array.push(_);if(!K)if($_)this._set.set(_,P);else this._set[f]=P};x.prototype.has=function(_){if($_)return this._set.has(_);else{var $=Qq.toSetString(_);return _$.call(this._set,$)}};x.prototype.indexOf=function(_){if($_){var $=this._set.get(_);if($>=0)return $}else{var f=Qq.toSetString(_);if(_$.call(this._set,f))return this._set[f]}throw Error('"'+_+'" is not in the set.')};x.prototype.at=function(_){if(_>=0&&_<this._array.length)return this._array[_];throw Error("No element indexed by "+_)};x.prototype.toArray=function(){return this._array.slice()};Dj.ArraySet=x});var z6=J((sj)=>{var h6=z_();function xj(q,_){var $=q.generatedLine,f=_.generatedLine,K=q.generatedColumn,P=_.generatedColumn;return f>$||f==$&&P>=K||h6.compareByGeneratedPositionsInflated(q,_)<=0}function Q_(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}Q_.prototype.unsortedForEach=function(_,$){this._array.forEach(_,$)};Q_.prototype.add=function(_){if(xj(this._last,_))this._last=_,this._array.push(_);else this._sorted=!1,this._array.push(_)};Q_.prototype.toArray=function(){if(!this._sorted)this._array.sort(h6.compareByGeneratedPositionsInflated),this._sorted=!0;return this._array};sj.MappingList=Q_});var $$=J((Fj)=>{var M_=Uq(),o=z_(),_q=q$().ArraySet,Uj=z6().MappingList;function l(q){if(!q)q={};this._file=o.getArg(q,"file",null),this._sourceRoot=o.getArg(q,"sourceRoot",null),this._skipValidation=o.getArg(q,"skipValidation",!1),this._sources=new _q,this._names=new _q,this._mappings=new Uj,this._sourcesContents=null}l.prototype._version=3;l.fromSourceMap=function(_){var $=_.sourceRoot,f=new l({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=o.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=o.relative($,K);if(!f._sources.has(P))f._sources.add(P);var j=_.sourceContentFor(K);if(j!=null)f.setSourceContent(K,j)}),f};l.prototype.addMapping=function(_){var $=o.getArg(_,"generated"),f=o.getArg(_,"original",null),K=o.getArg(_,"source",null),P=o.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})};l.prototype.setSourceContent=function(_,$){var f=_;if(this._sourceRoot!=null)f=o.relative(this._sourceRoot,f);if($!=null){if(!this._sourcesContents)this._sourcesContents=Object.create(null);this._sourcesContents[o.toSetString(f)]=$}else if(this._sourcesContents){if(delete this._sourcesContents[o.toSetString(f)],Object.keys(this._sourcesContents).length===0)this._sourcesContents=null}};l.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=o.relative(P,K);var j=new _q,v=new _q;this._mappings.unsortedForEach(function(w){if(w.source===K&&w.originalLine!=null){var O=_.originalPositionFor({line:w.originalLine,column:w.originalColumn});if(O.source!=null){if(w.source=O.source,f!=null)w.source=o.join(f,w.source);if(P!=null)w.source=o.relative(P,w.source);if(w.originalLine=O.line,w.originalColumn=O.column,O.name!=null)w.name=O.name}}var Y=w.source;if(Y!=null&&!j.has(Y))j.add(Y);var T=w.name;if(T!=null&&!v.has(T))v.add(T)},this),this._sources=j,this._names=v,_.sources.forEach(function(w){var O=_.sourceContentFor(w);if(O!=null){if(f!=null)w=o.join(f,w);if(P!=null)w=o.relative(P,w);this.setSourceContent(w,O)}},this)};l.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}))};l.prototype._serializeMappings=function(){var _=0,$=1,f=0,K=0,P=0,j=0,v="",w,O,Y,T,k=this._mappings.toArray();for(var h=0,W=k.length;h<W;h++){if(O=k[h],w="",O.generatedLine!==$){_=0;while(O.generatedLine!==$)w+=";",$++}else if(h>0){if(!o.compareByGeneratedPositionsInflated(O,k[h-1]))continue;w+=","}if(w+=M_.encode(O.generatedColumn-_),_=O.generatedColumn,O.source!=null){if(T=this._sources.indexOf(O.source),w+=M_.encode(T-j),j=T,w+=M_.encode(O.originalLine-1-K),K=O.originalLine-1,w+=M_.encode(O.originalColumn-f),f=O.originalColumn,O.name!=null)Y=this._names.indexOf(O.name),w+=M_.encode(Y-P),P=Y}v+=w}return v};l.prototype._generateSourcesContent=function(_,$){return _.map(function(f){if(!this._sourcesContents)return null;if($!=null)f=o.relative($,f);var K=o.toSetString(f);return Object.prototype.hasOwnProperty.call(this._sourcesContents,K)?this._sourcesContents[K]:null},this)};l.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 _};l.prototype.toString=function(){return JSON.stringify(this.toJSON())};Fj.SourceMapGenerator=l});var W6=J((_7)=>{_7.GREATEST_LOWER_BOUND=1;_7.LEAST_UPPER_BOUND=2;function f$(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 f$(j,_,$,f,K,P);if(P==_7.LEAST_UPPER_BOUND)return _<f.length?_:-1;else return j}else{if(j-q>1)return f$(q,j,$,f,K,P);if(P==_7.LEAST_UPPER_BOUND)return j;else return q<0?-1:q}}_7.search=function(_,$,f,K){if($.length===0)return-1;var P=f$(-1,$.length,_,$,f,K||_7.GREATEST_LOWER_BOUND);if(P<0)return-1;while(P-1>=0){if(f($[P],$[P-1],!0)!==0)break;--P}return P}});var J6=J((f7)=>{function P$(q,_,$){var f=q[_];q[_]=q[$],q[$]=f}function $7(q,_){return Math.round(q+Math.random()*(_-q))}function j$(q,_,$,f){if($<f){var K=$7($,f),P=$-1;P$(q,K,f);var j=q[f];for(var v=$;v<f;v++)if(_(q[v],j)<=0)P+=1,P$(q,P,v);P$(q,P+1,v);var w=P+1;j$(q,_,$,w-1),j$(q,_,w+1,f)}}f7.quickSort=function(q,_){j$(q,_,0,q.length-1)}});var r6=J((j7)=>{var z=z_(),v$=W6(),H_=q$().ArraySet,P7=Uq(),V_=J6().quickSort;function m(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);return $.sections!=null?new a($,_):new G($,_)}m.fromSourceMap=function(q,_){return G.fromSourceMap(q,_)};m.prototype._version=3;m.prototype.__generatedMappings=null;Object.defineProperty(m.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__generatedMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__generatedMappings}});m.prototype.__originalMappings=null;Object.defineProperty(m.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){if(!this.__originalMappings)this._parseMappings(this._mappings,this.sourceRoot);return this.__originalMappings}});m.prototype._charIsMappingSeparator=function(_,$){var f=_.charAt($);return f===";"||f===","};m.prototype._parseMappings=function(_,$){throw Error("Subclasses must implement _parseMappings")};m.GENERATED_ORDER=1;m.ORIGINAL_ORDER=2;m.GREATEST_LOWER_BOUND=1;m.LEAST_UPPER_BOUND=2;m.prototype.eachMapping=function(_,$,f){var K=$||null,P=f||m.GENERATED_ORDER,j;switch(P){case m.GENERATED_ORDER:j=this._generatedMappings;break;case m.ORIGINAL_ORDER:j=this._originalMappings;break;default:throw Error("Unknown order of iteration.")}var v=this.sourceRoot;j.map(function(w){var O=w.source===null?null:this._sources.at(w.source);return O=z.computeSourceURL(v,O,this._sourceMapURL),{source:O,generatedLine:w.generatedLine,generatedColumn:w.generatedColumn,originalLine:w.originalLine,originalColumn:w.originalColumn,name:w.name===null?null:this._names.at(w.name)}},this).forEach(_,K)};m.prototype.allGeneratedPositionsFor=function(_){var $=z.getArg(_,"line"),f={source:z.getArg(_,"source"),originalLine:$,originalColumn:z.getArg(_,"column",0)};if(f.source=this._findSourceIndex(f.source),f.source<0)return[];var K=[],P=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,v$.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:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}else{var w=j.originalColumn;while(j&&j.originalLine===$&&j.originalColumn==w)K.push({line:z.getArg(j,"generatedLine",null),column:z.getArg(j,"generatedColumn",null),lastColumn:z.getArg(j,"lastGeneratedColumn",null)}),j=this._originalMappings[++P]}}return K};j7.SourceMapConsumer=m;function G(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sources"),P=z.getArg($,"names",[]),j=z.getArg($,"sourceRoot",null),v=z.getArg($,"sourcesContent",null),w=z.getArg($,"mappings"),O=z.getArg($,"file",null);if(f!=this._version)throw Error("Unsupported version: "+f);if(j)j=z.normalize(j);K=K.map(String).map(z.normalize).map(function(Y){return j&&z.isAbsolute(j)&&z.isAbsolute(Y)?z.relative(j,Y):Y}),this._names=H_.fromArray(P.map(String),!0),this._sources=H_.fromArray(K,!0),this._absoluteSources=this._sources.toArray().map(function(Y){return z.computeSourceURL(j,Y,_)}),this.sourceRoot=j,this.sourcesContent=v,this._mappings=w,this._sourceMapURL=_,this.file=O}G.prototype=Object.create(m.prototype);G.prototype.consumer=m;G.prototype._findSourceIndex=function(q){var _=q;if(this.sourceRoot!=null)_=z.relative(this.sourceRoot,_);if(this._sources.has(_))return this._sources.indexOf(_);var $;for($=0;$<this._absoluteSources.length;++$)if(this._absoluteSources[$]==q)return $;return-1};G.fromSourceMap=function(_,$){var f=Object.create(G.prototype),K=f._names=H_.fromArray(_._names.toArray(),!0),P=f._sources=H_.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(h){return z.computeSourceURL(f.sourceRoot,h,$)});var j=_._mappings.toArray().slice(),v=f.__generatedMappings=[],w=f.__originalMappings=[];for(var O=0,Y=j.length;O<Y;O++){var T=j[O],k=new Z6;if(k.generatedLine=T.generatedLine,k.generatedColumn=T.generatedColumn,T.source){if(k.source=P.indexOf(T.source),k.originalLine=T.originalLine,k.originalColumn=T.originalColumn,T.name)k.name=K.indexOf(T.name);w.push(k)}v.push(k)}return V_(f.__originalMappings,z.compareByOriginalPositions),f};G.prototype._version=3;Object.defineProperty(G.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Z6(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}G.prototype._parseMappings=function(_,$){var f=1,K=0,P=0,j=0,v=0,w=0,O=_.length,Y=0,T={},k={},h=[],W=[],H,u,Z,X,r;while(Y<O)if(_.charAt(Y)===";")f++,Y++,K=0;else if(_.charAt(Y)===",")Y++;else{H=new Z6,H.generatedLine=f;for(X=Y;X<O;X++)if(this._charIsMappingSeparator(_,X))break;if(u=_.slice(Y,X),Z=T[u],Z)Y+=u.length;else{Z=[];while(Y<X)P7.decode(_,Y,k),r=k.value,Y=k.rest,Z.push(r);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");T[u]=Z}if(H.generatedColumn=K+Z[0],K=H.generatedColumn,Z.length>1){if(H.source=v+Z[1],v+=Z[1],H.originalLine=P+Z[2],P=H.originalLine,H.originalLine+=1,H.originalColumn=j+Z[3],j=H.originalColumn,Z.length>4)H.name=w+Z[4],w+=Z[4]}if(W.push(H),typeof H.originalLine==="number")h.push(H)}V_(W,z.compareByGeneratedPositionsDeflated),this.__generatedMappings=W,V_(h,z.compareByOriginalPositions),this.__originalMappings=h};G.prototype._findMapping=function(_,$,f,K,P,j){if(_[f]<=0)throw TypeError("Line must be greater than or equal to 1, got "+_[f]);if(_[K]<0)throw TypeError("Column must be greater than or equal to 0, got "+_[K]);return v$.search(_,$,P,j)};G.prototype.computeColumnSpans=function(){for(var _=0;_<this._generatedMappings.length;++_){var $=this._generatedMappings[_];if(_+1<this._generatedMappings.length){var f=this._generatedMappings[_+1];if($.generatedLine===f.generatedLine){$.lastGeneratedColumn=f.generatedColumn-1;continue}}$.lastGeneratedColumn=1/0}};G.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=this._findMapping($,this._generatedMappings,"generatedLine","generatedColumn",z.compareByGeneratedPositionsDeflated,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(f>=0){var K=this._generatedMappings[f];if(K.generatedLine===$.generatedLine){var P=z.getArg(K,"source",null);if(P!==null)P=this._sources.at(P),P=z.computeSourceURL(this.sourceRoot,P,this._sourceMapURL);var j=z.getArg(K,"name",null);if(j!==null)j=this._names.at(j);return{source:P,line:z.getArg(K,"originalLine",null),column:z.getArg(K,"originalColumn",null),name:j}}}return{source:null,line:null,column:null,name:null}};G.prototype.hasContentsOfAllSources=function(){if(!this.sourcesContent)return!1;return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(_){return _==null})};G.prototype.sourceContentFor=function(_,$){if(!this.sourcesContent)return null;var f=this._findSourceIndex(_);if(f>=0)return this.sourcesContent[f];var K=_;if(this.sourceRoot!=null)K=z.relative(this.sourceRoot,K);var P;if(this.sourceRoot!=null&&(P=z.urlParse(this.sourceRoot))){var j=K.replace(/^file:\/\//,"");if(P.scheme=="file"&&this._sources.has(j))return this.sourcesContent[this._sources.indexOf(j)];if((!P.path||P.path=="/")&&this._sources.has("/"+K))return this.sourcesContent[this._sources.indexOf("/"+K)]}if($)return null;else throw Error('"'+K+'" is not in the SourceMap.')};G.prototype.generatedPositionFor=function(_){var $=z.getArg(_,"source");if($=this._findSourceIndex($),$<0)return{line:null,column:null,lastColumn:null};var f={source:$,originalLine:z.getArg(_,"line"),originalColumn:z.getArg(_,"column")},K=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",z.compareByOriginalPositions,z.getArg(_,"bias",m.GREATEST_LOWER_BOUND));if(K>=0){var P=this._originalMappings[K];if(P.source===f.source)return{line:z.getArg(P,"generatedLine",null),column:z.getArg(P,"generatedColumn",null),lastColumn:z.getArg(P,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};j7.BasicSourceMapConsumer=G;function a(q,_){var $=q;if(typeof q==="string")$=z.parseSourceMapInput(q);var f=z.getArg($,"version"),K=z.getArg($,"sections");if(f!=this._version)throw Error("Unsupported version: "+f);this._sources=new H_,this._names=new H_;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=z.getArg(j,"offset"),w=z.getArg(v,"line"),O=z.getArg(v,"column");if(w<P.line||w===P.line&&O<P.column)throw Error("Section offsets must be ordered and non-overlapping.");return P=v,{generatedOffset:{generatedLine:w+1,generatedColumn:O+1},consumer:new m(z.getArg(j,"map"),_)}})}a.prototype=Object.create(m.prototype);a.prototype.constructor=m;a.prototype._version=3;Object.defineProperty(a.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}});a.prototype.originalPositionFor=function(_){var $={generatedLine:z.getArg(_,"line"),generatedColumn:z.getArg(_,"column")},f=v$.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})};a.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(_){return _.consumer.hasContentsOfAllSources()})};a.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.')};a.prototype.generatedPositionFor=function(_){for(var $=0;$<this._sections.length;$++){var f=this._sections[$];if(f.consumer._findSourceIndex(z.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}};a.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],w=K.consumer._sources.at(v.source);w=z.computeSourceURL(K.consumer.sourceRoot,w,this._sourceMapURL),this._sources.add(w),w=this._sources.indexOf(w);var O=null;if(v.name)O=K.consumer._names.at(v.name),this._names.add(O),O=this._names.indexOf(O);var Y={source:w,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:O};if(this.__generatedMappings.push(Y),typeof Y.originalLine==="number")this.__originalMappings.push(Y)}}V_(this.__generatedMappings,z.compareByGeneratedPositionsDeflated),V_(this.__originalMappings,z.compareByOriginalPositions)};j7.IndexedSourceMapConsumer=a});var u6=J((h7)=>{var T7=$$().SourceMapGenerator,qq=z_(),Y7=/(\r?\n)/,k7=10,W_="$$$isSourceNode$$$";function M(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[W_]=!0,f!=null)this.add(f)}M.fromStringWithSourceMap=function(_,$,f){var K=new M,P=_.split(Y7),j=0,v=function(){var k=W(),h=W()||"";return k+h;function W(){return j<P.length?P[j++]:void 0}},w=1,O=0,Y=null;if($.eachMapping(function(k){if(Y!==null)if(w<k.generatedLine)T(Y,v()),w++,O=0;else{var h=P[j]||"",W=h.substr(0,k.generatedColumn-O);P[j]=h.substr(k.generatedColumn-O),O=k.generatedColumn,T(Y,W),Y=k;return}while(w<k.generatedLine)K.add(v()),w++;if(O<k.generatedColumn){var h=P[j]||"";K.add(h.substr(0,k.generatedColumn)),P[j]=h.substr(k.generatedColumn),O=k.generatedColumn}Y=k},this),j<P.length){if(Y)T(Y,v());K.add(P.splice(j).join(""))}return $.sources.forEach(function(k){var h=$.sourceContentFor(k);if(h!=null){if(f!=null)k=qq.join(f,k);K.setSourceContent(k,h)}}),K;function T(k,h){if(k===null||k.source===void 0)K.add(h);else{var W=f?qq.join(f,k.source):k.source;K.add(new M(k.originalLine,k.originalColumn,W,h,k.name))}}};M.prototype.add=function(_){if(Array.isArray(_))_.forEach(function($){this.add($)},this);else if(_[W_]||typeof _==="string"){if(_)this.children.push(_)}else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.prepend=function(_){if(Array.isArray(_))for(var $=_.length-1;$>=0;$--)this.prepend(_[$]);else if(_[W_]||typeof _==="string")this.children.unshift(_);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+_);return this};M.prototype.walk=function(_){var $;for(var f=0,K=this.children.length;f<K;f++)if($=this.children[f],$[W_])$.walk(_);else if($!=="")_($,{source:this.source,line:this.line,column:this.column,name:this.name})};M.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};M.prototype.replaceRight=function(_,$){var f=this.children[this.children.length-1];if(f[W_])f.replaceRight(_,$);else if(typeof f==="string")this.children[this.children.length-1]=f.replace(_,$);else this.children.push("".replace(_,$));return this};M.prototype.setSourceContent=function(_,$){this.sourceContents[qq.toSetString(_)]=$};M.prototype.walkSourceContents=function(_){for(var $=0,f=this.children.length;$<f;$++)if(this.children[$][W_])this.children[$].walkSourceContents(_);var K=Object.keys(this.sourceContents);for(var $=0,f=K.length;$<f;$++)_(qq.fromSetString(K[$]),this.sourceContents[K[$]])};M.prototype.toString=function(){var _="";return this.walk(function($){_+=$}),_};M.prototype.toStringWithSourceMap=function(_){var $={code:"",line:1,column:0},f=new T7(_),K=!1,P=null,j=null,v=null,w=null;return this.walk(function(O,Y){if($.code+=O,Y.source!==null&&Y.line!==null&&Y.column!==null){if(P!==Y.source||j!==Y.line||v!==Y.column||w!==Y.name)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name});P=Y.source,j=Y.line,v=Y.column,w=Y.name,K=!0}else if(K)f.addMapping({generated:{line:$.line,column:$.column}}),P=null,K=!1;for(var T=0,k=O.length;T<k;T++)if(O.charCodeAt(T)===k7){if($.line++,$.column=0,T+1===k)P=null,K=!1;else if(K)f.addMapping({source:Y.source,original:{line:Y.line,column:Y.column},generated:{line:$.line,column:$.column},name:Y.name})}else $.column++}),this.walkSourceContents(function(O,Y){f.setSourceContent(O,Y)}),{code:$.code,map:f}};h7.SourceNode=M});var A6=J((H7)=>{H7.SourceMapGenerator=$$().SourceMapGenerator;H7.SourceMapConsumer=r6().SourceMapConsumer;H7.SourceNode=u6().SourceNode});var p6=J((m6,n6)=>{m6.__esModule=!0;var O$=e(),f_=void 0;try{if(typeof define!=="function"||!define.amd)T$=A6(),f_=T$.SourceNode}catch(q){}var T$;if(!f_)f_=function(q,_,$,f){if(this.src="",f)this.add(f)},f_.prototype={add:function(_){if(O$.isArray(_))_=_.join("");this.src+=_},prepend:function(_){if(O$.isArray(_))_=_.join("");this.src=_+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}};function w$(q,_,$){if(O$.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 X6(q){this.srcFile=q,this.source=[]}X6.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([" ",$,`
545
+ `])}),_},each:function(_){for(var $=0,f=this.source.length;$<f;$++)_(this.source[$])},empty:function(){var _=this.currentLocation||{start:{}};return new f_(_.start.line,_.start.column,this.srcFile)},wrap:function(_){var $=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];if(_ instanceof f_)return _;return _=w$(_,this,$),new f_($.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=w$(_[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(w$(_[f],this))}return $},generateArray:function(_){var $=this.generateList(_);return $.prepend("["),$.add("]"),$}};m6.default=X6;n6.exports=m6.default});var S6=J((e6,b6)=>{e6.__esModule=!0;function d6(q){return q&&q.__esModule?q:{default:q}}var o6=L_(),A7=N(),Y$=d6(A7),X7=e(),m7=p6(),G6=d6(m7);function J_(q){this.value=q}function Z_(){}Z_.prototype={nameLookup:function(_,$){return this.internalNameLookup(_,$)},depthedLookup:function(_){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(_),")"]},compilerInfo:function(){var _=o6.COMPILER_REVISION,$=o6.REVISION_CHANGES[_];return[_,$]},appendToBuffer:function(_,$,f){if(!X7.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,w=void 0,O=void 0;for(w=0,O=P.length;w<O;w++)j=P[w],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(),`;
546
546
  `]),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) {
547
547
  `),this.decorators.push(`}
548
548
  `),this.decorators=this.decorators.merge();else this.decorators=void 0;var Y=this.createFunctionContext(K);if(!this.isChild){var T={compiler:this.compilerInfo(),main:Y};if(this.decorators)T.main_d=this.decorators,T.useDecorators=!0;var k=this.context,h=k.programs,W=k.decorators;for(w=0,O=h.length;w<O;w++)if(h[w]){if(T[w]=h[w],W[w])T[w+"_d"]=W[w],T.useDecorators=!0}if(this.environment.usePartial)T.usePartial=!0;if(this.options.data)T.useData=!0;if(this.useDepths)T.useDepths=!0;if(this.useBlockParams)T.useBlockParams=!0;if(this.options.compat)T.compat=!0;if(!K)if(T.compiler=JSON.stringify(T.compiler),this.source.currentLocation={start:{line:1,column:0}},T=this.objectLiteral(T),$.srcName)T=T.toStringWithSourceMap({file:$.destName}),T.map=T.map&&T.map.toString();else T=T.toString();else T.compilerOptions=this.options;return T}else return Y},preamble:function(){this.lastContext=0,this.source=new G6.default(this.options.srcName),this.decorators=new G6.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(w){var O=$.aliases[w];if(O.children&&O.referenceCount>1)f+=", alias"+ ++P+"="+w,O.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(","),`) {
@@ -554,8 +554,8 @@ Expecting `+l_.join(", ")+", got '"+(this.terminals_[A]||A)+"'";else wq="Parse e
554
554
  }
555
555
  return undefined
556
556
  }
557
- `.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(e7(this.options.strict&&P,this,$,f,_));return}var v=$.length;for(;f<v;f++)this.replaceStack(function(w){var O=j.nameLookup(w,$[f],_);if(!K)return[" != null ? ",O," : ",w];else return[" && ",O]})},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,"||"),")"],w=this.source.functionCall(v,"call",P.callParams);this.push(w)},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:Z_,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 w=this.matchExistingProgram(K);if(w==null){this.context.programs.push("");var O=this.context.programs.length;K.index=O,K.name="program"+O,this.context.programs[O]=P.compile(K,$,this.context,!this.precompile),this.context.decorators[O]=P.decorators,this.context.environments[O]=K,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,K.useDepths=this.useDepths,K.useBlockParams=this.useBlockParams}else K.index=w.index,K.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.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 J_))_=this.source.wrap(_);return this.inlineStack.push(_),_},pushStackLiteral:function(_){this.push(new J_(_))},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 Y$.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof J_)f=[j.value],$=["(",f],P=!0;else{K=!0;var v=this.incrStack();$=["((",this.push(v)," = ",j,")"],f=this.topStack()}var w=_.call(this,f);if(!P)this.popStack();if(K)this.stackSlot--;this.push($.concat(w,")"))},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 J_)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 J_)return f.value;else{if(!$){if(!this.stackSlot)throw new Y$.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var _=this.isInline()?this.inlineStack:this.compileStack,$=_[_.length-1];if($ instanceof J_)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=[],w=!f,O=void 0;if(w)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 Y=this.popStack(),T=this.popStack();if(T||Y)K.fn=T||"container.noop",K.inverse=Y||"container.noop";var k=$;while(k--){if(O=this.popStack(),f[k]=O,this.trackIds)v[k]=this.popStack();if(this.stringParams)j[k]=this.popStack(),P[k]=this.popStack()}if(w)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(" "),_=Z_.RESERVED_WORDS={};for(var $=0,f=q.length;$<f;$++)_[q[$]]=!0})();Z_.isValidJavaScriptVariableName=function(q){return!Z_.RESERVED_WORDS[q]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(q)};function e7(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}e6.default=Z_;b6.exports=e6.default});var i6=J((M6,V6)=>{M6.__esModule=!0;function i_(q){return q&&q.__esModule?q:{default:q}}var C7=V8(),M7=i_(C7),V7=Eq(),i7=i_(V7),k$=U8(),h$=q6(),N7=S6(),l7=i_(N7),t7=U_(),c7=i_(t7),a7=tq(),R7=i_(a7),E7=M7.default.create;function C6(){var q=E7();return q.compile=function(_,$){return h$.compile(_,$,q)},q.precompile=function(_,$){return h$.precompile(_,$,q)},q.AST=i7.default,q.Compiler=h$.Compiler,q.JavaScriptCompiler=l7.default,q.Parser=k$.parser,q.parse=k$.parse,q.parseWithoutProcessing=k$.parseWithoutProcessing,q}var r_=C6();r_.create=C6;R7.default(r_);r_.Visitor=c7.default;r_.default=r_;M6.default=r_;V6.exports=M6.default});var N6=J((s7)=>{s7.__esModule=!0;s7.print=x7;s7.PrintVisitor=n;function y7(q){return q&&q.__esModule?q:{default:q}}var D7=U_(),L7=y7(D7);function x7(q){return new n().accept(q)}function n(){this.padding=0}n.prototype=new L7.default;n.prototype.pad=function(q){var _="";for(var $=0,f=this.padding;$<f;$++)_+=" ";return _+=q+`
558
- `,_};n.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--,_};n.prototype.MustacheStatement=function(q){return this.pad("{{ "+this.SubExpression(q)+" }}")};n.prototype.Decorator=function(q){return this.pad("{{ DIRECTIVE "+this.SubExpression(q)+" }}")};n.prototype.BlockStatement=n.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--,_};n.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("{{> "+_+" }}")};n.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("{{> "+_+" }}")};n.prototype.ContentStatement=function(q){return this.pad("CONTENT[ '"+q.value+"' ]")};n.prototype.CommentStatement=function(q){return this.pad("{{! '"+q.value+"' }}")};n.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};n.prototype.PathExpression=function(q){var _=q.parts.join("/");return(q.data?"@":"")+"PATH:"+_};n.prototype.StringLiteral=function(q){return'"'+q.value+'"'};n.prototype.NumberLiteral=function(q){return"NUMBER{"+q.value+"}"};n.prototype.BooleanLiteral=function(q){return"BOOLEAN{"+q.value+"}"};n.prototype.UndefinedLiteral=function(){return"UNDEFINED"};n.prototype.NullLiteral=function(){return"NULL"};n.prototype.Hash=function(q){var _=q.pairs,$=[];for(var f=0,K=_.length;f<K;f++)$.push(this.accept(_[f]));return"HASH{"+$.join(", ")+"}"};n.prototype.HashPair=function(q){return q.key+"="+this.accept(q.value)}});var z$=J((d9,c6)=>{var $q=i6().default,t6=N6();$q.PrintVisitor=t6.PrintVisitor;$q.print=t6.print;c6.exports=$q;function l6(q,_){var $=u_("fs"),f=$.readFileSync(_,"utf8");q.exports=$q.compile(f)}if(u_.extensions)u_.extensions[".handlebars"]=l6,u_.extensions[".hbs"]=l6});import{readFileSync as fv}from"fs";import{dirname as U6,join as F6,resolve as Q6}from"path";import{join as J$}from"node:path";import{writeFileSync as s6,mkdirSync as $v}from"node:fs";import{readFileSync as hf,readdirSync as Ov,statSync as Tv}from"node:fs";import{join as zf,dirname as u$}from"node:path";import{fileURLToPath as Hf}from"node:url";var t_=null;try{t_=(await Promise.resolve().then(() => (Yq(),Tq))).assets}catch{}var Wf=u$(u$(Hf(import.meta.url)));function P_(q){if(t_&&q in t_)return t_[q];let _=zf(Wf,q);try{return hf(_,"utf-8")}catch{throw Error(`Asset not found: ${q}`)}}var A_=null;function Jf(){if(A_)return A_;let q=P_("assets/chipctx-gen/device-mappings.json"),_=JSON.parse(q);A_=[];for(let $ of Object.values(_.families))for(let f of $)try{A_.push({...f,compiledPattern:new RegExp(f.pattern)})}catch(K){throw Error(`Invalid regex "${f.pattern}" in device-mappings.json: ${K.message}`)}return A_}function A$(q){let _=Jf();for(let $ of _)if($.compiledPattern.test(q))return $;return null}class kq{layers;linkerGenerator;constructor(q,_){this.layers=q;this.linkerGenerator=_}async resolve(q,_){for(let $ of this.layers)try{if(await $.canResolve(q))try{let f=await $.resolve(q,_);if(!f.linkerScript&&this.linkerGenerator)f.linkerScript=await this.linkerGenerator.generate(q,_);return f}catch(f){console.warn(`[chipctx-gen] ${$.name} resolve failed: ${f.message}, trying next layer`);continue}}catch(f){console.warn(`[chipctx-gen] ${$.name} canResolve failed: ${f.message}, trying next layer`);continue}throw Error(`No startup source available for ${q.name}`)}}import{readFileSync as uq,existsSync as Aq,readdirSync as Xq,copyFileSync as g_,mkdirSync as jK}from"node:fs";import{join as R,basename as w_,dirname as vK}from"node:path";var Zf=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",rf="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Zf+"]*",uf=new RegExp("^"+rf+"$");function c_(q,_){let $=[],f=_.exec(q);while(f){let K=[];K.startIndex=_.lastIndex-f[0].length;let P=f.length;for(let j=0;j<P;j++)K.push(f[j]);$.push(K),f=_.exec(q)}return $}var j_=function(q){let _=uf.exec(q);return!(_===null||typeof _>"u")};function X$(q){return typeof q<"u"}var X_=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],a_=["__proto__","constructor","prototype"];var Af={allowBooleanAttributes:!1,unpairedTags:[]};function G$(q,_){_=Object.assign({},Af,_);let $=[],f=!1,K=!1;if(q[0]==="\uFEFF")q=q.substr(1);for(let P=0;P<q.length;P++)if(q[P]==="<"&&q[P+1]==="?"){if(P+=2,P=n$(q,P),P.err)return P}else if(q[P]==="<"){let j=P;if(P++,q[P]==="!"){P=p$(q,P);continue}else{let v=!1;if(q[P]==="/")v=!0,P++;let w="";for(;P<q.length&&q[P]!==">"&&q[P]!==" "&&q[P]!=="\t"&&q[P]!==`
559
- `&&q[P]!=="\r";P++)w+=q[P];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),P--;if(!ef(w)){let T;if(w.trim().length===0)T="Invalid space after '<'.";else T="Tag '"+w+"' is an invalid name.";return p("InvalidTag",T,d(q,P))}let O=nf(q,P);if(O===!1)return p("InvalidAttr","Attributes for '"+w+"' have open quote.",d(q,P));let Y=O.value;if(P=O.index,Y[Y.length-1]==="/"){let T=P-Y.length;Y=Y.substring(0,Y.length-1);let k=o$(Y,_);if(k===!0)f=!0;else return p(k.err.code,k.err.msg,d(q,T+k.err.line))}else if(v)if(!O.tagClosed)return p("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",d(q,P));else if(Y.trim().length>0)return p("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",d(q,j));else if($.length===0)return p("InvalidTag","Closing tag '"+w+"' has not been opened.",d(q,j));else{let T=$.pop();if(w!==T.tagName){let k=d(q,T.tagStartPos);return p("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+k.line+", col "+k.col+") instead of closing tag '"+w+"'.",d(q,j))}if($.length==0)K=!0}else{let T=o$(Y,_);if(T!==!0)return p(T.err.code,T.err.msg,d(q,P-Y.length+T.err.line));if(K===!0)return p("InvalidXml","Multiple possible root nodes found.",d(q,P));else if(_.unpairedTags.indexOf(w)!==-1);else $.push({tagName:w,tagStartPos:j});f=!0}for(P++;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="!"){P++,P=p$(q,P);continue}else if(q[P+1]==="?"){if(P=n$(q,++P),P.err)return P}else break;else if(q[P]==="&"){let T=Gf(q,P);if(T==-1)return p("InvalidChar","char '&' is not expected.",d(q,P));P=T}else if(K===!0&&!m$(q[P]))return p("InvalidXml","Extra text at the end",d(q,P));if(q[P]==="<")P--}}else{if(m$(q[P]))continue;return p("InvalidChar","char '"+q[P]+"' is not expected.",d(q,P))}if(!f)return p("InvalidXml","Start tag expected.",1);else if($.length==1)return p("InvalidTag","Unclosed tag '"+$[0].tagName+"'.",d(q,$[0].tagStartPos));else if($.length>0)return p("InvalidXml","Invalid '"+JSON.stringify($.map((P)=>P.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0}function m$(q){return q===" "||q==="\t"||q===`
560
- `||q==="\r"}function n$(q,_){let $=_;for(;_<q.length;_++)if(q[_]=="?"||q[_]==" "){let f=q.substr($,_-$);if(_>5&&f==="xml")return p("InvalidXml","XML declaration allowed only at the start of the document.",d(q,_));else if(q[_]=="?"&&q[_+1]==">"){_++;break}else continue}return _}function p$(q,_){if(q.length>_+5&&q[_+1]==="-"&&q[_+2]==="-"){for(_+=3;_<q.length;_++)if(q[_]==="-"&&q[_+1]==="-"&&q[_+2]===">"){_+=2;break}}else if(q.length>_+8&&q[_+1]==="D"&&q[_+2]==="O"&&q[_+3]==="C"&&q[_+4]==="T"&&q[_+5]==="Y"&&q[_+6]==="P"&&q[_+7]==="E"){let $=1;for(_+=8;_<q.length;_++)if(q[_]==="<")$++;else if(q[_]===">"){if($--,$===0)break}}else if(q.length>_+9&&q[_+1]==="["&&q[_+2]==="C"&&q[_+3]==="D"&&q[_+4]==="A"&&q[_+5]==="T"&&q[_+6]==="A"&&q[_+7]==="["){for(_+=8;_<q.length;_++)if(q[_]==="]"&&q[_+1]==="]"&&q[_+2]===">"){_+=2;break}}return _}var Xf='"',mf="'";function nf(q,_){let $="",f="",K=!1;for(;_<q.length;_++){if(q[_]===Xf||q[_]===mf)if(f==="")f=q[_];else if(f!==q[_]);else f="";else if(q[_]===">"){if(f===""){K=!0;break}}$+=q[_]}if(f!=="")return!1;return{value:$,index:_,tagClosed:K}}var pf=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function o$(q,_){let $=c_(q,pf),f={};for(let K=0;K<$.length;K++){if($[K][1].length===0)return p("InvalidAttr","Attribute '"+$[K][2]+"' has no space in starting.",m_($[K]));else if($[K][3]!==void 0&&$[K][4]===void 0)return p("InvalidAttr","Attribute '"+$[K][2]+"' is without value.",m_($[K]));else if($[K][3]===void 0&&!_.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+$[K][2]+"' is not allowed.",m_($[K]));let P=$[K][2];if(!df(P))return p("InvalidAttr","Attribute '"+P+"' is an invalid name.",m_($[K]));if(!Object.prototype.hasOwnProperty.call(f,P))f[P]=1;else return p("InvalidAttr","Attribute '"+P+"' is repeated.",m_($[K]))}return!0}function of(q,_){let $=/\d/;if(q[_]==="x")_++,$=/[\da-fA-F]/;for(;_<q.length;_++){if(q[_]===";")return _;if(!q[_].match($))break}return-1}function Gf(q,_){if(_++,q[_]===";")return-1;if(q[_]==="#")return _++,of(q,_);let $=0;for(;_<q.length;_++,$++){if(q[_].match(/\w/)&&$<20)continue;if(q[_]===";")break;return-1}return _}function p(q,_,$){return{err:{code:q,msg:_,line:$.line||$,col:$.col}}}function df(q){return j_(q)}function ef(q){return j_(q)}function d(q,_){let $=q.substring(0,_).split(/\r?\n/);return{line:$.length,col:$[$.length-1].length+1}}function m_(q){return q.startIndex+q[1].length}var d$=(q)=>{if(X_.includes(q))return"__"+q;return q},bf={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(q,_){return _},attributeValueProcessor:function(q,_){return _},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(q,_,$){return q},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:d$};function Sf(q,_){if(typeof q!=="string")return;let $=q.toLowerCase();if(X_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`)}function e$(q){if(typeof q==="boolean")return{enabled:q,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1000,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null};if(typeof q==="object"&&q!==null)return{enabled:q.enabled!==!1,maxEntitySize:q.maxEntitySize??1e4,maxExpansionDepth:q.maxExpansionDepth??10,maxTotalExpansions:q.maxTotalExpansions??1000,maxExpandedLength:q.maxExpandedLength??1e5,maxEntityCount:q.maxEntityCount??100,allowedTags:q.allowedTags??null,tagFilter:q.tagFilter??null};return e$(!0)}var b$=function(q){let _=Object.assign({},bf,q),$=[{value:_.attributeNamePrefix,name:"attributeNamePrefix"},{value:_.attributesGroupName,name:"attributesGroupName"},{value:_.textNodeName,name:"textNodeName"},{value:_.cdataPropName,name:"cdataPropName"},{value:_.commentPropName,name:"commentPropName"}];for(let{value:f,name:K}of $)if(f)Sf(f,K);if(_.onDangerousProperty===null)_.onDangerousProperty=d$;if(_.processEntities=e$(_.processEntities),_.stopNodes&&Array.isArray(_.stopNodes))_.stopNodes=_.stopNodes.map((f)=>{if(typeof f==="string"&&f.startsWith("*."))return".."+f.substring(2);return f});return _};var R_;if(typeof Symbol!=="function")R_="@@xmlMetadata";else R_=Symbol("XML Node Metadata");class S{constructor(q){this.tagname=q,this.child=[],this[":@"]=Object.create(null)}add(q,_){if(q==="__proto__")q="#__proto__";this.child.push({[q]:_})}addChild(q,_){if(q.tagname==="__proto__")q.tagname="#__proto__";if(q[":@"]&&Object.keys(q[":@"]).length>0)this.child.push({[q.tagname]:q.child,[":@"]:q[":@"]});else this.child.push({[q.tagname]:q.child});if(_!==void 0)this.child[this.child.length-1][R_]={startIndex:_}}static getMetaDataSymbol(){return R_}}class E_{constructor(q){this.suppressValidationErr=!q,this.options=q}readDocType(q,_){let $=Object.create(null),f=0;if(q[_+3]==="O"&&q[_+4]==="C"&&q[_+5]==="T"&&q[_+6]==="Y"&&q[_+7]==="P"&&q[_+8]==="E"){_=_+9;let K=1,P=!1,j=!1,v="";for(;_<q.length;_++)if(q[_]==="<"&&!j){if(P&&U(q,"!ENTITY",_)){_+=7;let w,O;if([w,O,_]=this.readEntityExp(q,_+1,this.suppressValidationErr),O.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount&&f>=this.options.maxEntityCount)throw Error(`Entity count (${f+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let Y=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");$[w]={regx:RegExp(`&${Y};`,"g"),val:O},f++}}else if(P&&U(q,"!ELEMENT",_)){_+=8;let{index:w}=this.readElementExp(q,_+1);_=w}else if(P&&U(q,"!ATTLIST",_))_+=8;else if(P&&U(q,"!NOTATION",_)){_+=9;let{index:w}=this.readNotationExp(q,_+1,this.suppressValidationErr);_=w}else if(U(q,"!--",_))j=!0;else throw Error("Invalid DOCTYPE");K++,v=""}else if(q[_]===">"){if(j){if(q[_-1]==="-"&&q[_-2]==="-")j=!1,K--}else K--;if(K===0)break}else if(q[_]==="[")P=!0;else v+=q[_];if(K!==0)throw Error("Unclosed DOCTYPE")}else throw Error("Invalid Tag instead of DOCTYPE");return{entities:$,i:_}}readEntityExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_])&&q[_]!=='"'&&q[_]!=="'")$+=q[_],_++;if(n_($),_=b(q,_),!this.suppressValidationErr){if(q.substring(_,_+6).toUpperCase()==="SYSTEM")throw Error("External entities are not supported");else if(q[_]==="%")throw Error("Parameter entities are not supported")}let f="";if([_,f]=this.readIdentifierVal(q,_,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize&&f.length>this.options.maxEntitySize)throw Error(`Entity "${$}" size (${f.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return _--,[$,f,_]}readNotationExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;!this.suppressValidationErr&&n_($),_=b(q,_);let f=q.substring(_,_+6).toUpperCase();if(!this.suppressValidationErr&&f!=="SYSTEM"&&f!=="PUBLIC")throw Error(`Expected SYSTEM or PUBLIC, found "${f}"`);_+=f.length,_=b(q,_);let K=null,P=null;if(f==="PUBLIC"){if([_,K]=this.readIdentifierVal(q,_,"publicIdentifier"),_=b(q,_),q[_]==='"'||q[_]==="'")[_,P]=this.readIdentifierVal(q,_,"systemIdentifier")}else if(f==="SYSTEM"){if([_,P]=this.readIdentifierVal(q,_,"systemIdentifier"),!this.suppressValidationErr&&!P)throw Error("Missing mandatory system identifier for SYSTEM notation")}return{notationName:$,publicIdentifier:K,systemIdentifier:P,index:--_}}readIdentifierVal(q,_,$){let f="",K=q[_];if(K!=='"'&&K!=="'")throw Error(`Expected quoted string, found "${K}"`);_++;while(_<q.length&&q[_]!==K)f+=q[_],_++;if(q[_]!==K)throw Error(`Unterminated ${$} value`);return _++,[_,f]}readElementExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;if(!this.suppressValidationErr&&!j_($))throw Error(`Invalid element name: "${$}"`);_=b(q,_);let f="";if(q[_]==="E"&&U(q,"MPTY",_))_+=4;else if(q[_]==="A"&&U(q,"NY",_))_+=2;else if(q[_]==="("){_++;while(_<q.length&&q[_]!==")")f+=q[_],_++;if(q[_]!==")")throw Error("Unterminated content model")}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${q[_]}"`);return{elementName:$,contentModel:f.trim(),index:_}}readAttlistExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;n_($),_=b(q,_);let f="";while(_<q.length&&!/\s/.test(q[_]))f+=q[_],_++;if(!n_(f))throw Error(`Invalid attribute name: "${f}"`);_=b(q,_);let K="";if(q.substring(_,_+8).toUpperCase()==="NOTATION"){if(K="NOTATION",_+=8,_=b(q,_),q[_]!=="(")throw Error(`Expected '(', found "${q[_]}"`);_++;let j=[];while(_<q.length&&q[_]!==")"){let v="";while(_<q.length&&q[_]!=="|"&&q[_]!==")")v+=q[_],_++;if(v=v.trim(),!n_(v))throw Error(`Invalid notation name: "${v}"`);if(j.push(v),q[_]==="|")_++,_=b(q,_)}if(q[_]!==")")throw Error("Unterminated list of notations");_++,K+=" ("+j.join("|")+")"}else{while(_<q.length&&!/\s/.test(q[_]))K+=q[_],_++;let j=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!j.includes(K.toUpperCase()))throw Error(`Invalid attribute type: "${K}"`)}_=b(q,_);let P="";if(q.substring(_,_+8).toUpperCase()==="#REQUIRED")P="#REQUIRED",_+=8;else if(q.substring(_,_+7).toUpperCase()==="#IMPLIED")P="#IMPLIED",_+=7;else[_,P]=this.readIdentifierVal(q,_,"ATTLIST");return{elementName:$,attributeName:f,attributeType:K,defaultValue:P,index:_}}}var b=(q,_)=>{while(_<q.length&&/\s/.test(q[_]))_++;return _};function U(q,_,$){for(let f=0;f<_.length;f++)if(_[f]!==q[$+f+1])return!1;return!0}function n_(q){if(j_(q))return q;else throw Error(`Invalid entity name ${q}`)}var Cf=/^[-+]?0x[a-fA-F0-9]+$/,Mf=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Vf={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function hq(q,_={}){if(_=Object.assign({},Vf,_),!q||typeof q!=="string")return q;let $=q.trim();if(_.skipLike!==void 0&&_.skipLike.test($))return q;else if(q==="0")return 0;else if(_.hex&&Cf.test($))return cf($,16);else if(!isFinite($))return af(q,Number($),_);else if($.includes("e")||$.includes("E"))return lf(q,$,_);else{let f=Mf.exec($);if(f){let K=f[1]||"",P=f[2],j=tf(f[3]),v=K?q[P.length+1]===".":q[P.length]===".";if(!_.leadingZeros&&(P.length>1||P.length===1&&!v))return q;else{let w=Number($),O=String(w);if(w===0)return w;if(O.search(/[eE]/)!==-1)if(_.eNotation)return w;else return q;else if($.indexOf(".")!==-1)if(O==="0")return w;else if(O===j)return w;else if(O===`${K}${j}`)return w;else return q;let Y=P?j:$;if(P)return Y===O||K+Y===O?w:q;else return Y===O||Y===K+O?w:q}}else return q}}var Nf=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function lf(q,_,$){if(!$.eNotation)return q;let f=_.match(Nf);if(f){let K=f[1]||"",P=f[3].indexOf("e")===-1?"E":"e",j=f[2],v=K?q[j.length+1]===P:q[j.length]===P;if(j.length>1&&v)return q;else if(j.length===1&&(f[3].startsWith(`.${P}`)||f[3][0]===P))return Number(_);else if($.leadingZeros&&!v)return _=(f[1]||"")+f[3],Number(_);else return q}else return q}function tf(q){if(q&&q.indexOf(".")!==-1){if(q=q.replace(/0+$/,""),q===".")q="0";else if(q[0]===".")q="0"+q;else if(q[q.length-1]===".")q=q.substring(0,q.length-1);return q}return q}function cf(q,_){if(parseInt)return parseInt(q,_);else if(Number.parseInt)return Number.parseInt(q,_);else if(window&&window.parseInt)return window.parseInt(q,_);else throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}function af(q,_,$){let f=_===1/0;switch($.infinity.toLowerCase()){case"null":return null;case"infinity":return _;case"string":return f?"Infinity":"-Infinity";case"original":default:return q}}function zq(q){if(typeof q==="function")return q;if(Array.isArray(q))return(_)=>{for(let $ of q){if(typeof $==="string"&&_===$)return!0;if($ instanceof RegExp&&$.test(_))return!0}};return()=>!1}class v_{constructor(q,_={}){this.pattern=q,this.separator=_.separator||".",this.segments=this._parse(q),this._hasDeepWildcard=this.segments.some(($)=>$.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(($)=>$.attrName!==void 0),this._hasPositionSelector=this.segments.some(($)=>$.position!==void 0)}_parse(q){let _=[],$=0,f="";while($<q.length)if(q[$]===this.separator)if($+1<q.length&&q[$+1]===this.separator){if(f.trim())_.push(this._parseSegment(f.trim())),f="";_.push({type:"deep-wildcard"}),$+=2}else{if(f.trim())_.push(this._parseSegment(f.trim()));f="",$++}else f+=q[$],$++;if(f.trim())_.push(this._parseSegment(f.trim()));return _}_parseSegment(q){let _={type:"tag"},$=null,f=q,K=q.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(K){if(f=K[1]+K[3],K[2]){let O=K[2].slice(1,-1);if(O)$=O}}let P=void 0,j=f;if(f.includes("::")){let O=f.indexOf("::");if(P=f.substring(0,O).trim(),j=f.substring(O+2).trim(),!P)throw Error(`Invalid namespace in pattern: ${q}`)}let v=void 0,w=null;if(j.includes(":")){let O=j.lastIndexOf(":"),Y=j.substring(0,O).trim(),T=j.substring(O+1).trim();if(["first","last","odd","even"].includes(T)||/^nth\(\d+\)$/.test(T))v=Y,w=T;else v=j}else v=j;if(!v)throw Error(`Invalid segment pattern: ${q}`);if(_.tag=v,P)_.namespace=P;if($)if($.includes("=")){let O=$.indexOf("=");_.attrName=$.substring(0,O).trim(),_.attrValue=$.substring(O+1).trim()}else _.attrName=$.trim();if(w){let O=w.match(/^nth\((\d+)\)$/);if(O)_.position="nth",_.positionValue=parseInt(O[1],10);else _.position=w}return _}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class p_{constructor(q={}){this.separator=q.separator||".",this.path=[],this.siblingStacks=[]}push(q,_=null,$=null){if(this.path.length>0){let O=this.path[this.path.length-1];O.values=void 0}let f=this.path.length;if(!this.siblingStacks[f])this.siblingStacks[f]=new Map;let K=this.siblingStacks[f],P=$?`${$}:${q}`:q,j=K.get(P)||0,v=0;for(let O of K.values())v+=O;K.set(P,j+1);let w={tag:q,position:v,counter:j};if($!==null&&$!==void 0)w.namespace=$;if(_!==null&&_!==void 0)w.values=_;this.path.push(w)}pop(){if(this.path.length===0)return;let q=this.path.pop();if(this.siblingStacks.length>this.path.length+1)this.siblingStacks.length=this.path.length+1;return q}updateCurrent(q){if(this.path.length>0){let _=this.path[this.path.length-1];if(q!==null&&q!==void 0)_.values=q}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(q){if(this.path.length===0)return;return this.path[this.path.length-1].values?.[q]}hasAttr(q){if(this.path.length===0)return!1;let _=this.path[this.path.length-1];return _.values!==void 0&&q in _.values}getPosition(){if(this.path.length===0)return-1;return this.path[this.path.length-1].position??0}getCounter(){if(this.path.length===0)return-1;return this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(q,_=!0){let $=q||this.separator;return this.path.map((f)=>{if(_&&f.namespace)return`${f.namespace}:${f.tag}`;return f.tag}).join($)}toArray(){return this.path.map((q)=>q.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(q){let _=q.segments;if(_.length===0)return!1;if(q.hasDeepWildcard())return this._matchWithDeepWildcard(_);return this._matchSimple(_)}_matchSimple(q){if(this.path.length!==q.length)return!1;for(let _=0;_<q.length;_++){let $=q[_],f=this.path[_],K=_===this.path.length-1;if(!this._matchSegment($,f,K))return!1}return!0}_matchWithDeepWildcard(q){let _=this.path.length-1,$=q.length-1;while($>=0&&_>=0){let f=q[$];if(f.type==="deep-wildcard"){if($--,$<0)return!0;let K=q[$],P=!1;for(let j=_;j>=0;j--){let v=j===this.path.length-1;if(this._matchSegment(K,this.path[j],v)){_=j-1,$--,P=!0;break}}if(!P)return!1}else{let K=_===this.path.length-1;if(!this._matchSegment(f,this.path[_],K))return!1;_--,$--}}return $<0}_matchSegment(q,_,$){if(q.tag!=="*"&&q.tag!==_.tag)return!1;if(q.namespace!==void 0){if(q.namespace!=="*"&&q.namespace!==_.namespace)return!1}if(q.attrName!==void 0){if(!$)return!1;if(!_.values||!(q.attrName in _.values))return!1;if(q.attrValue!==void 0){let f=_.values[q.attrName];if(String(f)!==String(q.attrValue))return!1}}if(q.position!==void 0){if(!$)return!1;let f=_.counter??0;if(q.position==="first"&&f!==0)return!1;else if(q.position==="odd"&&f%2!==1)return!1;else if(q.position==="even"&&f%2!==0)return!1;else if(q.position==="nth"){if(f!==q.positionValue)return!1}}return!0}snapshot(){return{path:this.path.map((q)=>({...q})),siblingStacks:this.siblingStacks.map((q)=>new Map(q))}}restore(q){this.path=q.path.map((_)=>({..._})),this.siblingStacks=q.siblingStacks.map((_)=>new Map(_))}}function Rf(q,_){if(!q)return{};let $=_.attributesGroupName?q[_.attributesGroupName]:q;if(!$)return{};let f={};for(let K in $)if(K.startsWith(_.attributeNamePrefix)){let P=K.substring(_.attributeNamePrefix.length);f[P]=$[K]}else f[K]=$[K];return f}function Ef(q){if(!q||typeof q!=="string")return;let _=q.indexOf(":");if(_!==-1&&_>0){let $=q.substring(0,_);if($!=="xmlns")return $}return}class I_{constructor(q){if(this.options=q,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(_,$)=>S$($,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(_,$)=>S$($,16,"&#x")}},this.addExternalEntities=If,this.parseXml=xf,this.parseTextData=gf,this.resolveNameSpace=yf,this.buildAttributesMap=Lf,this.isItStopNode=Ff,this.replaceEntitiesValue=Bf,this.readStopNodeData=_K,this.saveTextToParentTag=Uf,this.addChild=sf,this.ignoreAttributesFn=zq(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new p_,this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let _=0;_<this.options.stopNodes.length;_++){let $=this.options.stopNodes[_];if(typeof $==="string")this.stopNodeExpressions.push(new v_($));else if($ instanceof v_)this.stopNodeExpressions.push($)}}}}function If(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$],K=f.replace(/[.\-+*:]/g,"\\.");this.lastEntities[f]={regex:new RegExp("&"+K+";","g"),val:q[f]}}}function gf(q,_,$,f,K,P,j){if(q!==void 0){if(this.options.trimValues&&!f)q=q.trim();if(q.length>0){if(!j)q=this.replaceEntitiesValue(q,_,$);let v=this.options.jPath?$.toString():$,w=this.options.tagValueProcessor(_,q,v,K,P);if(w===null||w===void 0)return q;else if(typeof w!==typeof q||w!==q)return w;else if(this.options.trimValues)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else if(q.trim()===q)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else return q}}}function yf(q){if(this.options.removeNSPrefix){let _=q.split(":"),$=q.charAt(0)==="/"?"/":"";if(_[0]==="xmlns")return"";if(_.length===2)q=$+_[1]}return q}var Df=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Lf(q,_,$){if(this.options.ignoreAttributes!==!0&&typeof q==="string"){let f=c_(q,Df),K=f.length,P={},j={};for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=f[v][4];if(w.length&&O!==void 0){let Y=O;if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_),j[w]=Y}}if(Object.keys(j).length>0&&typeof _==="object"&&_.updateCurrent)_.updateCurrent(j);for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=this.options.jPath?_.toString():_;if(this.ignoreAttributesFn(w,O))continue;let Y=f[v][4],T=this.options.attributeNamePrefix+w;if(w.length){if(this.options.transformAttributeName)T=this.options.transformAttributeName(T);if(T=C$(T,this.options),Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_);let k=this.options.jPath?_.toString():_,h=this.options.attributeValueProcessor(w,Y,k);if(h===null||h===void 0)P[T]=Y;else if(typeof h!==typeof Y||h!==Y)P[T]=h;else P[T]=Jq(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)P[T]=!0}}if(!Object.keys(P).length)return;if(this.options.attributesGroupName){let v={};return v[this.options.attributesGroupName]=P,v}return P}}var xf=function(q){q=q.replace(/\r\n?/g,`
561
- `);let _=new S("!xml"),$=_,f="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let K=new E_(this.options.processEntities);for(let P=0;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="/"){let v=F(q,">",P,"Closing Tag is not closed."),w=q.substring(P+2,v).trim();if(this.options.removeNSPrefix){let Y=w.indexOf(":");if(Y!==-1)w=w.substr(Y+1)}if(w=Hq(this.options.transformTagName,w,"",this.options).tagName,$)f=this.saveTextToParentTag(f,$,this.matcher);let O=this.matcher.getCurrentTag();if(w&&this.options.unpairedTags.indexOf(w)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${w}>`);if(O&&this.options.unpairedTags.indexOf(O)!==-1)this.matcher.pop(),this.tagsNodeStack.pop();this.matcher.pop(),this.isCurrentNodeStopNode=!1,$=this.tagsNodeStack.pop(),f="",P=v}else if(q[P+1]==="?"){let v=Wq(q,P,!1,"?>");if(!v)throw Error("Pi Tag is not closed.");if(f=this.saveTextToParentTag(f,$,this.matcher),this.options.ignoreDeclaration&&v.tagName==="?xml"||this.options.ignorePiTags);else{let w=new S(v.tagName);if(w.add(this.options.textNodeName,""),v.tagName!==v.tagExp&&v.attrExpPresent)w[":@"]=this.buildAttributesMap(v.tagExp,this.matcher,v.tagName);this.addChild($,w,this.matcher,P)}P=v.closeIndex+1}else if(q.substr(P+1,3)==="!--"){let v=F(q,"-->",P+4,"Comment is not closed.");if(this.options.commentPropName){let w=q.substring(P+4,v-2);f=this.saveTextToParentTag(f,$,this.matcher),$.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}P=v}else if(q.substr(P+1,2)==="!D"){let v=K.readDocType(q,P);this.docTypeEntities=v.entities,P=v.i}else if(q.substr(P+1,2)==="!["){let v=F(q,"]]>",P,"CDATA is not closed.")-2,w=q.substring(P+9,v);f=this.saveTextToParentTag(f,$,this.matcher);let O=this.parseTextData(w,$.tagname,this.matcher,!0,!1,!0,!0);if(O==null)O="";if(this.options.cdataPropName)$.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else $.add(this.options.textNodeName,O);P=v+2}else{let v=Wq(q,P,this.options.removeNSPrefix);if(!v){let r=q.substring(Math.max(0,P-50),Math.min(q.length,P+50));throw Error(`readTagExp returned undefined at position ${P}. Context: "${r}"`)}let{tagName:w,rawTagName:O,tagExp:Y,attrExpPresent:T,closeIndex:k}=v;if({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options),this.options.strictReservedNames&&(w===this.options.commentPropName||w===this.options.cdataPropName))throw Error(`Invalid tag name: ${w}`);if($&&f){if($.tagname!=="!xml")f=this.saveTextToParentTag(f,$,this.matcher,!1)}let h=$;if(h&&this.options.unpairedTags.indexOf(h.tagname)!==-1)$=this.tagsNodeStack.pop(),this.matcher.pop();let W=!1;if(Y.length>0&&Y.lastIndexOf("/")===Y.length-1){if(W=!0,w[w.length-1]==="/")w=w.substr(0,w.length-1),Y=w;else Y=Y.substr(0,Y.length-1);T=w!==Y}let H=null,u={},Z=void 0;if(Z=Ef(O),w!==_.tagname)this.matcher.push(w,{},Z);if(w!==Y&&T){if(H=this.buildAttributesMap(Y,this.matcher,w),H)u=Rf(H,this.options)}if(w!==_.tagname)this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher);let X=P;if(this.isCurrentNodeStopNode){let r="";if(W)P=v.closeIndex;else if(this.options.unpairedTags.indexOf(w)!==-1)P=v.closeIndex;else{let t=this.readStopNodeData(q,O,k+1);if(!t)throw Error(`Unexpected end of ${O}`);P=t.i,r=t.tagContent}let A=new S(w);if(H)A[":@"]=H;A.add(this.options.textNodeName,r),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild($,A,this.matcher,X)}else{if(W){({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options));let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(w)!==-1){let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1,P=v.closeIndex;continue}else{let r=new S(w);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error("Maximum nested tags exceeded");if(this.tagsNodeStack.push($),H)r[":@"]=H;this.addChild($,r,this.matcher,X),$=r}f="",P=k}}else f+=q[P];return _.child};function sf(q,_,$,f){if(!this.options.captureMetaData)f=void 0;let K=this.options.jPath?$.toString():$,P=this.options.updateTag(_.tagname,K,_[":@"]);if(P===!1);else if(typeof P==="string")_.tagname=P,q.addChild(_,f);else q.addChild(_,f)}function Bf(q,_,$){let f=this.options.processEntities;if(!f||!f.enabled)return q;if(f.allowedTags){let K=this.options.jPath?$.toString():$;if(!(Array.isArray(f.allowedTags)?f.allowedTags.includes(_):f.allowedTags(_,K)))return q}if(f.tagFilter){let K=this.options.jPath?$.toString():$;if(!f.tagFilter(_,K))return q}for(let K of Object.keys(this.docTypeEntities)){let P=this.docTypeEntities[K],j=q.match(P.regx);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`);let v=q.length;if(q=q.replace(P.regx,P.val),f.maxExpandedLength){if(this.currentExpandedLength+=q.length-v,this.currentExpandedLength>f.maxExpandedLength)throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${f.maxExpandedLength}`)}}}for(let K of Object.keys(this.lastEntities)){let P=this.lastEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}if(q.indexOf("&")===-1)return q;if(this.options.htmlEntities)for(let K of Object.keys(this.htmlEntities)){let P=this.htmlEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}return q=q.replace(this.ampEntity.regex,this.ampEntity.val),q}function Uf(q,_,$,f){if(q){if(f===void 0)f=_.child.length===0;if(q=this.parseTextData(q,_.tagname,$,!1,_[":@"]?Object.keys(_[":@"]).length!==0:!1,f),q!==void 0&&q!=="")_.add(this.options.textNodeName,q);q=""}return q}function Ff(q,_){if(!q||q.length===0)return!1;for(let $=0;$<q.length;$++)if(_.matches(q[$]))return!0;return!1}function Qf(q,_,$=">"){let f,K="";for(let P=_;P<q.length;P++){let j=q[P];if(f){if(j===f)f=""}else if(j==='"'||j==="'")f=j;else if(j===$[0])if($[1]){if(q[P+1]===$[1])return{data:K,index:P}}else return{data:K,index:P};else if(j==="\t")j=" ";K+=j}}function F(q,_,$,f){let K=q.indexOf(_,$);if(K===-1)throw Error(f);else return K+_.length-1}function Wq(q,_,$,f=">"){let K=Qf(q,_+1,f);if(!K)return;let{data:P,index:j}=K,v=P.search(/\s/),w=P,O=!0;if(v!==-1)w=P.substring(0,v),P=P.substring(v+1).trimStart();let Y=w;if($){let T=w.indexOf(":");if(T!==-1)w=w.substr(T+1),O=w!==K.data.substr(T+1)}return{tagName:w,tagExp:P,closeIndex:j,attrExpPresent:O,rawTagName:Y}}function _K(q,_,$){let f=$,K=1;for(;$<q.length;$++)if(q[$]==="<")if(q[$+1]==="/"){let P=F(q,">",$,`${_} is not closed`);if(q.substring($+2,P).trim()===_){if(K--,K===0)return{tagContent:q.substring(f,$),i:P}}$=P}else if(q[$+1]==="?")$=F(q,"?>",$+1,"StopNode is not closed.");else if(q.substr($+1,3)==="!--")$=F(q,"-->",$+3,"StopNode is not closed.");else if(q.substr($+1,2)==="![")$=F(q,"]]>",$,"StopNode is not closed.")-2;else{let P=Wq(q,$,">");if(P){if((P&&P.tagName)===_&&P.tagExp[P.tagExp.length-1]!=="/")K++;$=P.closeIndex}}}function Jq(q,_,$){if(_&&typeof q==="string"){let f=q.trim();if(f==="true")return!0;else if(f==="false")return!1;else return hq(q,$)}else if(X$(q))return q;else return""}function S$(q,_,$){let f=Number.parseInt(q,_);if(f>=0&&f<=1114111)return String.fromCodePoint(f);else return $+q+";"}function Hq(q,_,$,f){if(q){let K=q(_);if($===_)$=K;_=K}return _=C$(_,f),{tagName:_,tagExp:$}}function C$(q,_){if(a_.includes(q))throw Error(`[SECURITY] Invalid name: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);else if(X_.includes(q))return _.onDangerousProperty(q);return q}var Zq=S.getMetaDataSymbol();function qK(q,_){if(!q||typeof q!=="object")return{};if(!_)return q;let $={};for(let f in q)if(f.startsWith(_)){let K=f.substring(_.length);$[K]=q[f]}else $[f]=q[f];return $}function rq(q,_,$){return M$(q,_,$)}function M$(q,_,$){let f,K={};for(let P=0;P<q.length;P++){let j=q[P],v=$K(j);if(v!==void 0&&v!==_.textNodeName){let w=qK(j[":@"]||{},_.attributeNamePrefix);$.push(v,w)}if(v===_.textNodeName)if(f===void 0)f=j[v];else f+=""+j[v];else if(v===void 0)continue;else if(j[v]){let w=M$(j[v],_,$),O=KK(w,_);if(j[":@"])fK(w,j[":@"],$,_);else if(Object.keys(w).length===1&&w[_.textNodeName]!==void 0&&!_.alwaysCreateTextNode)w=w[_.textNodeName];else if(Object.keys(w).length===0)if(_.alwaysCreateTextNode)w[_.textNodeName]="";else w="";if(j[Zq]!==void 0&&typeof w==="object"&&w!==null)w[Zq]=j[Zq];if(K[v]!==void 0&&Object.prototype.hasOwnProperty.call(K,v)){if(!Array.isArray(K[v]))K[v]=[K[v]];K[v].push(w)}else{let Y=_.jPath?$.toString():$;if(_.isArray(v,Y,O))K[v]=[w];else K[v]=w}if(v!==void 0&&v!==_.textNodeName)$.pop()}}if(typeof f==="string"){if(f.length>0)K[_.textNodeName]=f}else if(f!==void 0)K[_.textNodeName]=f;return K}function $K(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$];if(f!==":@")return f}}function fK(q,_,$,f){if(_){let K=Object.keys(_),P=K.length;for(let j=0;j<P;j++){let v=K[j],w=v.startsWith(f.attributeNamePrefix)?v.substring(f.attributeNamePrefix.length):v,O=f.jPath?$.toString()+"."+w:$;if(f.isArray(v,O,!0,!0))q[v]=[_[v]];else q[v]=_[v]}}}function KK(q,_){let{textNodeName:$}=_,f=Object.keys(q).length;if(f===0)return!0;if(f===1&&(q[$]||typeof q[$]==="boolean"||q[$]===0))return!0;return!1}class c{constructor(q){this.externalEntities={},this.options=b$(q)}parse(q,_){if(typeof q!=="string"&&q.toString)q=q.toString();else if(typeof q!=="string")throw Error("XML data is accepted in String or Bytes[] form.");if(_){if(_===!0)_={};let K=G$(q,_);if(K!==!0)throw Error(`${K.err.msg}:${K.err.line}:${K.err.col}`)}let $=new I_(this.options);$.addExternalEntities(this.externalEntities);let f=$.parseXml(q);if(this.options.preserveOrder||f===void 0)return f;else return rq(f,this.options,$.matcher)}addEntity(q,_){if(_.indexOf("&")!==-1)throw Error("Entity value can't have '&'");else if(q.indexOf("&")!==-1||q.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(_==="&")throw Error("An entity with value '&' is not permitted");else this.externalEntities[q]=_}static getMetaDataSymbol(){return S.getMetaDataSymbol()}}function V$(q){let f=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q).package;if(!f)throw Error("Invalid PDSC: missing <package> root element");let K=PK(f.components?.component),P=K.some((v)=>v["@_generator"]==="CubeMX"),j=K.some((v)=>v["@_Cgroup"]?.includes("Startup")||v["@_Csub"]==="Startup");if(P&&!j)return"2.x";if(j)return"1.x";throw Error("Cannot classify DFP version: PDSC has neither Startup component nor CubeMX generator reference")}function PK(q){if(!q)return[];return Array.isArray(q)?q:[q]}class mq{packRoot;name="DfpPackLayer (L1)";constructor(q){this.packRoot=q}async canResolve(q){let _=this.findPdsc(q);if(!_)return!1;let $=uq(_,"utf-8");return V$($)==="1.x"}async resolve(q,_){let $=this.findPdsc(q);if(!$)throw Error(`No PDSC found for device family ${q.family}`);let f=vK($),K=uq($,"utf-8"),j=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(K),w=O_(j.package?.components?.component).find((H)=>H["@_Cgroup"]?.includes("Startup")||H["@_Csub"]==="Startup");if(!w)throw Error(`No Startup component found in PDSC for ${q.family}`);let O=O_(w.files?.file),Y=null,T=null,k=[];for(let H of O){let u=H["@_name"]??"",Z=H["@_category"]??"",X=R(f,u);if(!Aq(X))continue;if(Z==="source"&&u.includes("startup")){let r=R(_,w_(u));g_(X,r),Y=r}else if(Z==="source"&&u.includes("system")){let r=R(_,w_(u));g_(X,r),T=r}else if(Z==="header"){let r=R(_,"Include");jK(r,{recursive:!0});let A=R(r,w_(u));g_(X,A),k.push(A)}}if(!Y)throw Error(`No startup file found in Pack for ${q.family}`);if(!T)throw Error(`No system file found in Pack for ${q.family}`);let h=null,W=this.findBestLinkerScript(f,K,q);if(W){let H=R(_,w_(W));g_(W,H),h=H}return{startupFile:Y,systemFile:T,linkerScript:h,headers:k,source:"dfp-pack"}}findPdsc(q){if(!Aq(this.packRoot))return null;let _=Xq(this.packRoot);for(let $ of _){let f=R(this.packRoot,$);try{let P=Xq(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=R(f,P),v=uq(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}findBestLinkerScript(q,_,$){let f=wK(_,q);if(f)return f;return TK(q,$)}}function O_(q){if(!q)return[];return Array.isArray(q)?q:[q]}function wK(q,_){let f=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q),K=O_(f.package?.conditions?.condition),P=new Set;for(let w of K){let O=w["@_id"]??"";if(O_(w.require).some((k)=>(k["@_Tcompiler"]??"").toUpperCase()==="GCC"))P.add(O)}let v=O_(f.package?.components?.component).filter((w)=>{let O=(w["@_Cclass"]??"").toLowerCase(),Y=(w["@_Cgroup"]??"").toLowerCase(),T=(w["@_Csub"]??"").toLowerCase();return O.includes("device")&&(Y.includes("startup")||T==="startup")});for(let w of v){let O=O_(w.files?.file);for(let Y of O){if((Y["@_category"]??"")!=="linkerScript")continue;let T=Y["@_condition"]??"";if(T&&!P.has(T))continue;let k=R(_,Y["@_name"]??"");if(Aq(k))return k}}return null}var OK=["example","examples","template","templates","test","tests","board","boards"];function TK(q,_){let $=YK(q);if($.length===0)return null;let f=$.filter((P)=>{let j=P.slice(q.length).toLowerCase();return!OK.some((v)=>j.includes(v))});if(f.length===0)return null;let K=f.map((P)=>{let j=P.slice(q.length+1);return{path:P,score:kK(j,_.name,_.family),depth:j.split(/[/\\]/).length,nameLen:w_(P).length}});if(K.sort((P,j)=>{if(j.score!==P.score)return j.score-P.score;if(P.depth!==j.depth)return P.depth-j.depth;return P.nameLen-j.nameLen}),K[0].score<0)return null;return K[0].path}function YK(q){let _=[],$=(f)=>{try{for(let K of Xq(f,{withFileTypes:!0})){let P=R(f,K.name);if(K.isDirectory())$(P);else if(K.name.endsWith(".ld")||K.name.endsWith(".lds"))_.push(P)}}catch{}};return $(q),_}function kK(q,_,$){let f=q.toLowerCase(),K=w_(q).toLowerCase(),P=0;if(f.includes("gcc"))P+=30;if(f.includes("armcc")||f.includes("iar")||f.includes("mdk"))P-=100;if(K.includes("flash")||K.includes("rom"))P+=50;if(K.includes("sram")||K.includes("ram"))P-=20;if(K.includes(_.toLowerCase()))P+=40;if(K.includes($.toLowerCase()))P+=20;if(q.split(/[/\\]/).map((v)=>v.toLowerCase()).some((v)=>v.includes("device")||v==="startup"||v==="gcc"))P+=10;return P}import{existsSync as T_,readdirSync as hK,copyFileSync as nq,mkdirSync as zK}from"node:fs";import{join as C}from"node:path";class pq{coreRoot;name="ArduinoCoreLayer (L4)";constructor(q){this.coreRoot=q}async canResolve(q){if(!q.family.startsWith("STM32"))return!1;return this.getFamilyDir(q)!==null}async resolve(q,_){let $=this.getFamilyDir(q);if(!$)throw Error(`Arduino Core has no files for family ${q.family}`);let f=C($,"Source","Templates","gcc"),K=`startup_${q.subfamilyDefine.toLowerCase()}.s`,P=C(f,K);if(!T_(P))throw Error(`Startup file not found: ${P}`);let j=C(_,K);nq(P,j);let v=C($,"Source","Templates"),O=`system_${q.family.toLowerCase()}.c`,Y=C(v,O);if(!T_(Y))throw Error(`System file not found: ${Y}`);let T=C(_,O);nq(Y,T);let k=[],h=C($,"Include");if(T_(h)){let W=C(_,"Include");zK(W,{recursive:!0});let H=`${q.subfamilyDefine.toLowerCase()}.h`,u=C(h,H);if(T_(u)){let Z=C(W,H);nq(u,Z),k.push(Z)}}return{startupFile:j,systemFile:T,linkerScript:null,headers:k,source:"arduino-core"}}getFamilyDir(q){let _=C(this.coreRoot,"system","Drivers","CMSIS","Device","ST");if(!T_(_))return null;let $=C(_,q.family);if(T_($))return $;try{let K=hK(_).find((P)=>P.toLowerCase()===q.family.toLowerCase());if(K)return C(_,K)}catch{}return null}}var a6=r$(z$(),1);var fq=null;function Q7(){if(fq)return fq;let q=P_("assets/chipctx-gen/templates/linker.ld.hbs");return fq=a6.default.compile(q,{noEscape:!0}),fq}function R6(q){return Q7()({...q,stackSize:q.stackSize??"0x400",heapSize:q.heapSize??"0x200"})}var E6=r$(z$(),1);var Kq=null;function _v(){if(Kq)return Kq;let q=P_("assets/chipctx-gen/templates/cgen.yml.hbs");return Kq=E6.default.compile(q,{noEscape:!0}),Kq}function I6(q){return _v()({...q,version:"1.0.0",board:q.board??""})}import{readFileSync as H$,existsSync as g6,readdirSync as y6,copyFileSync as D6,mkdirSync as L6}from"node:fs";import{join as B,basename as x6,dirname as qv}from"node:path";class W${packRoot;constructor(q){this.packRoot=q}detectDriverType(q){let _=this.findPdsc(q);if(!_)return"none";let $=H$(_,"utf-8"),K=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse($),P=Pq(K.package?.components?.component);if(P.some((j)=>j["@_Cgroup"]==="HAL"||this.getFiles(j).some((v)=>v.includes("_hal_"))))return"hal";if(P.some((j)=>j["@_Cgroup"]==="Driver"||this.getFiles(j).some((v)=>v.includes("_ll_"))))return"ll";return"none"}async fetch(q,_,$){if($==="none")return{files:[],driverGroupName:null,includeDir:null};let f=$==="auto"?this.detectDriverType(q):$;if(f==="none")return{files:[],driverGroupName:null,includeDir:null};let K=this.findPdsc(q);if(!K)return{files:[],driverGroupName:null,includeDir:null};let P=qv(K),j=H$(K,"utf-8"),w=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(j),Y=Pq(w.package?.components?.component).filter((u)=>{if(f==="hal")return u["@_Cgroup"]==="HAL"||this.getFiles(u).some((Z)=>Z.includes("_hal_"));return u["@_Cgroup"]==="Driver"||this.getFiles(u).some((Z)=>Z.includes("_ll_"))}),T=[],k=B(_,"Driver"),h=B(k,"Src"),W=B(k,"Inc");L6(h,{recursive:!0}),L6(W,{recursive:!0});for(let u of Y){let Z=Pq(u.files?.file);for(let X of Z){let r=X["@_name"]??"",A=X["@_category"]??"",t=B(P,r);if(!g6(t))continue;if(A==="source"){let V=B(h,x6(r));D6(t,V),T.push(V)}else if(A==="header"){let V=B(W,x6(r));D6(t,V)}}}let H=f==="hal"?"HAL_Driver":"LL_Driver";return{files:T,driverGroupName:T.length>0?H:null,includeDir:T.length>0?W:null}}getFiles(q){return Pq(q.files?.file).map((_)=>_["@_name"]??"")}findPdsc(q){if(!g6(this.packRoot))return null;let _=y6(this.packRoot);for(let $ of _){let f=B(this.packRoot,$);try{let P=y6(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=B(f,P),v=H$(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}}function Pq(q){if(!q)return[];return Array.isArray(q)?q:[q]}async function B6(q){let{deviceName:_,outputDir:$,packRoot:f,arduinoCoreRoot:K,driverMode:P}=q,j=A$(_);if(!j)return{success:!1,cgenPath:null,generatedFiles:[],error:`Unknown device: "${_}". Not in device-mappings.json.`};let v={name:_,family:j.family,subfamilyDefine:j.subfamilyDefine,cpu:j.cpu,fpu:j.fpu,dfpVersion:j.dfpVersion};$v($,{recursive:!0});let w={generate:async(Z,X)=>{let r=R6({flashOrigin:j.memory.flash.origin,flashSize:j.memory.flash.size,ramOrigin:j.memory.ram.origin,ramSize:j.memory.ram.size,ccmOrigin:j.memory.ccm?.origin,ccmSize:j.memory.ccm?.size}),A=J$(X,`${_}.ld`);return s6(A,r),A}},O=new kq([new mq(f),new pq(K)],w),Y;try{Y=await O.resolve(v,$)}catch(Z){return{success:!1,cgenPath:null,generatedFiles:[],error:Z.message}}let T=[Y.startupFile,Y.systemFile];if(Y.linkerScript)T.push(Y.linkerScript);T.push(...Y.headers);let k,h;if(P!=="none"){let X=await new W$(f).fetch(v,$,P);if(X.files.length>0)k=X.files,h=X.driverGroupName??void 0,T.push(...X.files)}let W=I6({device:_,board:q.board,subfamilyDefine:j.subfamilyDefine,startupFile:`./${jq($,Y.startupFile)}`,systemFile:`./${jq($,Y.systemFile)}`,includePaths:Y.headers.length>0?[`./${jq($,J$($,"Include"))}`]:[],driverFiles:k?.map((Z)=>`./${jq($,Z)}`),driverGroupName:h}),H=q.projectName??_,u=J$($,`${H}.cgen.yml`);return s6(u,W),T.push(u),{success:!0,cgenPath:u,generatedFiles:T,error:null}}function jq(q,_){if(_.startsWith(q)){let $=_.slice(q.length);if($.startsWith("/"))$=$.slice(1);return $}return _}async function Kv(){let q=process.argv.slice(2);if(q.length===0)console.error("Usage: chipctx-gen <cbuild-gen-idx.yml>"),console.error(" This is a CMSIS Generator. It is called by cbuild automatically."),process.exit(1);let _=Q6(q[0]),$;try{$=fv(_,"utf-8")}catch(T){console.error(`[chipctx-gen] Cannot read: ${_}`),console.error(`[chipctx-gen] Error: ${T.message}`),process.exit(1)}let f=$.match(/device:\s*(\S+)/),K=$.match(/output:\s*(\S+)/);if(!f)console.error("[chipctx-gen] Cannot find 'device' field in cbuild-gen-idx.yml"),process.exit(1);let P=f[1],j=K?Q6(U6(_),K[1]):U6(_),v=process.env.CMSIS_PACK_ROOT??F6(process.env.HOME??"",".cache","arm","packs"),w=process.env.ARDUINO_CORE_ROOT??F6(process.env.HOME??"",".chipctx","arduino","data","packages","STMicroelectronics","hardware","stm32"),O=process.env.CHIPCTX_DRIVER_MODE??"none";console.log(`[chipctx-gen] Device: ${P}`),console.log(`[chipctx-gen] Output: ${j}`);let Y=await B6({deviceName:P,outputDir:j,packRoot:v,arduinoCoreRoot:w,driverMode:O});if(Y.success)console.log(`[chipctx-gen] Generated ${Y.generatedFiles.length} files`),console.log(`[chipctx-gen] cgen.yml: ${Y.cgenPath}`),process.exit(0);else console.error(`[chipctx-gen] Failed: ${Y.error}`),process.exit(1)}Kv().catch((q)=>{console.error(`[chipctx-gen] Unexpected error: ${q.message}`),process.exit(1)});
557
+ `.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(n7(this.options.strict&&P,this,$,f,_));return}var v=$.length;for(;f<v;f++)this.replaceStack(function(w){var O=j.nameLookup(w,$[f],_);if(!K)return[" != null ? ",O," : ",w];else return[" && ",O]})},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,"||"),")"],w=this.source.functionCall(v,"call",P.callParams);this.push(w)},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:Z_,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 w=this.matchExistingProgram(K);if(w==null){this.context.programs.push("");var O=this.context.programs.length;K.index=O,K.name="program"+O,this.context.programs[O]=P.compile(K,$,this.context,!this.precompile),this.context.decorators[O]=P.decorators,this.context.environments[O]=K,this.useDepths=this.useDepths||P.useDepths,this.useBlockParams=this.useBlockParams||P.useBlockParams,K.useDepths=this.useDepths,K.useBlockParams=this.useBlockParams}else K.index=w.index,K.name="program"+w.index,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.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 J_))_=this.source.wrap(_);return this.inlineStack.push(_),_},pushStackLiteral:function(_){this.push(new J_(_))},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 Y$.default("replaceStack on non-inline");var j=this.popStack(!0);if(j instanceof J_)f=[j.value],$=["(",f],P=!0;else{K=!0;var v=this.incrStack();$=["((",this.push(v)," = ",j,")"],f=this.topStack()}var w=_.call(this,f);if(!P)this.popStack();if(K)this.stackSlot--;this.push($.concat(w,")"))},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 J_)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 J_)return f.value;else{if(!$){if(!this.stackSlot)throw new Y$.default("Invalid stack pop");this.stackSlot--}return f}},topStack:function(){var _=this.isInline()?this.inlineStack:this.compileStack,$=_[_.length-1];if($ instanceof J_)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=[],w=!f,O=void 0;if(w)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 Y=this.popStack(),T=this.popStack();if(T||Y)K.fn=T||"container.noop",K.inverse=Y||"container.noop";var k=$;while(k--){if(O=this.popStack(),f[k]=O,this.trackIds)v[k]=this.popStack();if(this.stringParams)j[k]=this.popStack(),P[k]=this.popStack()}if(w)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(" "),_=Z_.RESERVED_WORDS={};for(var $=0,f=q.length;$<f;$++)_[q[$]]=!0})();Z_.isValidJavaScriptVariableName=function(q){return!Z_.RESERVED_WORDS[q]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(q)};function n7(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}e6.default=Z_;b6.exports=e6.default});var i6=J((M6,V6)=>{M6.__esModule=!0;function i_(q){return q&&q.__esModule?q:{default:q}}var G7=V8(),d7=i_(G7),e7=Eq(),b7=i_(e7),k$=U8(),h$=q6(),S7=S6(),C7=i_(S7),M7=U_(),V7=i_(M7),i7=tq(),N7=i_(i7),l7=d7.default.create;function C6(){var q=l7();return q.compile=function(_,$){return h$.compile(_,$,q)},q.precompile=function(_,$){return h$.precompile(_,$,q)},q.AST=b7.default,q.Compiler=h$.Compiler,q.JavaScriptCompiler=C7.default,q.Parser=k$.parser,q.parse=k$.parse,q.parseWithoutProcessing=k$.parseWithoutProcessing,q}var r_=C6();r_.create=C6;N7.default(r_);r_.Visitor=V7.default;r_.default=r_;M6.default=r_;V6.exports=M6.default});var N6=J((g7)=>{g7.__esModule=!0;g7.print=I7;g7.PrintVisitor=n;function a7(q){return q&&q.__esModule?q:{default:q}}var R7=U_(),E7=a7(R7);function I7(q){return new n().accept(q)}function n(){this.padding=0}n.prototype=new E7.default;n.prototype.pad=function(q){var _="";for(var $=0,f=this.padding;$<f;$++)_+=" ";return _+=q+`
558
+ `,_};n.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--,_};n.prototype.MustacheStatement=function(q){return this.pad("{{ "+this.SubExpression(q)+" }}")};n.prototype.Decorator=function(q){return this.pad("{{ DIRECTIVE "+this.SubExpression(q)+" }}")};n.prototype.BlockStatement=n.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--,_};n.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("{{> "+_+" }}")};n.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("{{> "+_+" }}")};n.prototype.ContentStatement=function(q){return this.pad("CONTENT[ '"+q.value+"' ]")};n.prototype.CommentStatement=function(q){return this.pad("{{! '"+q.value+"' }}")};n.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};n.prototype.PathExpression=function(q){var _=q.parts.join("/");return(q.data?"@":"")+"PATH:"+_};n.prototype.StringLiteral=function(q){return'"'+q.value+'"'};n.prototype.NumberLiteral=function(q){return"NUMBER{"+q.value+"}"};n.prototype.BooleanLiteral=function(q){return"BOOLEAN{"+q.value+"}"};n.prototype.UndefinedLiteral=function(){return"UNDEFINED"};n.prototype.NullLiteral=function(){return"NULL"};n.prototype.Hash=function(q){var _=q.pairs,$=[];for(var f=0,K=_.length;f<K;f++)$.push(this.accept(_[f]));return"HASH{"+$.join(", ")+"}"};n.prototype.HashPair=function(q){return q.key+"="+this.accept(q.value)}});var z$=J((m9,c6)=>{var $q=i6().default,t6=N6();$q.PrintVisitor=t6.PrintVisitor;$q.print=t6.print;c6.exports=$q;function l6(q,_){var $=u_("fs"),f=$.readFileSync(_,"utf8");q.exports=$q.compile(f)}if(u_.extensions)u_.extensions[".handlebars"]=l6,u_.extensions[".hbs"]=l6});import{readFileSync as F7}from"fs";import{dirname as U6,join as F6,resolve as Q6}from"path";import{join as J$}from"node:path";import{writeFileSync as s6,mkdirSync as U7}from"node:fs";import{readFileSync as wf,readdirSync as Kv,statSync as Pv}from"node:fs";import{join as Of,dirname as u$}from"node:path";import{fileURLToPath as Tf}from"node:url";var t_=null;try{t_=(await Promise.resolve().then(() => (Yq(),Tq))).assets}catch{}var Yf=u$(u$(Tf(import.meta.url)));function P_(q){if(t_&&q in t_)return t_[q];let _=Of(Yf,q);try{return wf(_,"utf-8")}catch{throw Error(`Asset not found: ${q}`)}}var A_=null;function kf(){if(A_)return A_;let q=P_("assets/chipctx-gen/device-mappings.json"),_=JSON.parse(q);A_=[];for(let $ of Object.values(_.families))for(let f of $)try{A_.push({...f,compiledPattern:new RegExp(f.pattern)})}catch(K){throw Error(`Invalid regex "${f.pattern}" in device-mappings.json: ${K.message}`)}return A_}function A$(q){let _=kf();for(let $ of _)if($.compiledPattern.test(q))return $;return null}class kq{layers;linkerGenerator;constructor(q,_){this.layers=q;this.linkerGenerator=_}async resolve(q,_){for(let $ of this.layers)try{if(await $.canResolve(q))try{let f=await $.resolve(q,_);if(!f.linkerScript&&this.linkerGenerator)f.linkerScript=await this.linkerGenerator.generate(q,_);return f}catch(f){console.warn(`[chipctx-gen] ${$.name} resolve failed: ${f.message}, trying next layer`);continue}}catch(f){console.warn(`[chipctx-gen] ${$.name} canResolve failed: ${f.message}, trying next layer`);continue}throw Error(`No startup source available for ${q.name}`)}}import{readFileSync as uq,existsSync as Aq,readdirSync as Xq,copyFileSync as g_,mkdirSync as qK}from"node:fs";import{join as R,basename as w_,dirname as $K}from"node:path";var hf=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",zf="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+hf+"]*",Hf=new RegExp("^"+zf+"$");function c_(q,_){let $=[],f=_.exec(q);while(f){let K=[];K.startIndex=_.lastIndex-f[0].length;let P=f.length;for(let j=0;j<P;j++)K.push(f[j]);$.push(K),f=_.exec(q)}return $}var j_=function(q){let _=Hf.exec(q);return!(_===null||typeof _>"u")};function X$(q){return typeof q<"u"}var X_=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],a_=["__proto__","constructor","prototype"];var Wf={allowBooleanAttributes:!1,unpairedTags:[]};function G$(q,_){_=Object.assign({},Wf,_);let $=[],f=!1,K=!1;if(q[0]==="\uFEFF")q=q.substr(1);for(let P=0;P<q.length;P++)if(q[P]==="<"&&q[P+1]==="?"){if(P+=2,P=n$(q,P),P.err)return P}else if(q[P]==="<"){let j=P;if(P++,q[P]==="!"){P=p$(q,P);continue}else{let v=!1;if(q[P]==="/")v=!0,P++;let w="";for(;P<q.length&&q[P]!==">"&&q[P]!==" "&&q[P]!=="\t"&&q[P]!==`
559
+ `&&q[P]!=="\r";P++)w+=q[P];if(w=w.trim(),w[w.length-1]==="/")w=w.substring(0,w.length-1),P--;if(!nf(w)){let T;if(w.trim().length===0)T="Invalid space after '<'.";else T="Tag '"+w+"' is an invalid name.";return p("InvalidTag",T,d(q,P))}let O=rf(q,P);if(O===!1)return p("InvalidAttr","Attributes for '"+w+"' have open quote.",d(q,P));let Y=O.value;if(P=O.index,Y[Y.length-1]==="/"){let T=P-Y.length;Y=Y.substring(0,Y.length-1);let k=o$(Y,_);if(k===!0)f=!0;else return p(k.err.code,k.err.msg,d(q,T+k.err.line))}else if(v)if(!O.tagClosed)return p("InvalidTag","Closing tag '"+w+"' doesn't have proper closing.",d(q,P));else if(Y.trim().length>0)return p("InvalidTag","Closing tag '"+w+"' can't have attributes or invalid starting.",d(q,j));else if($.length===0)return p("InvalidTag","Closing tag '"+w+"' has not been opened.",d(q,j));else{let T=$.pop();if(w!==T.tagName){let k=d(q,T.tagStartPos);return p("InvalidTag","Expected closing tag '"+T.tagName+"' (opened in line "+k.line+", col "+k.col+") instead of closing tag '"+w+"'.",d(q,j))}if($.length==0)K=!0}else{let T=o$(Y,_);if(T!==!0)return p(T.err.code,T.err.msg,d(q,P-Y.length+T.err.line));if(K===!0)return p("InvalidXml","Multiple possible root nodes found.",d(q,P));else if(_.unpairedTags.indexOf(w)!==-1);else $.push({tagName:w,tagStartPos:j});f=!0}for(P++;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="!"){P++,P=p$(q,P);continue}else if(q[P+1]==="?"){if(P=n$(q,++P),P.err)return P}else break;else if(q[P]==="&"){let T=Xf(q,P);if(T==-1)return p("InvalidChar","char '&' is not expected.",d(q,P));P=T}else if(K===!0&&!m$(q[P]))return p("InvalidXml","Extra text at the end",d(q,P));if(q[P]==="<")P--}}else{if(m$(q[P]))continue;return p("InvalidChar","char '"+q[P]+"' is not expected.",d(q,P))}if(!f)return p("InvalidXml","Start tag expected.",1);else if($.length==1)return p("InvalidTag","Unclosed tag '"+$[0].tagName+"'.",d(q,$[0].tagStartPos));else if($.length>0)return p("InvalidXml","Invalid '"+JSON.stringify($.map((P)=>P.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0}function m$(q){return q===" "||q==="\t"||q===`
560
+ `||q==="\r"}function n$(q,_){let $=_;for(;_<q.length;_++)if(q[_]=="?"||q[_]==" "){let f=q.substr($,_-$);if(_>5&&f==="xml")return p("InvalidXml","XML declaration allowed only at the start of the document.",d(q,_));else if(q[_]=="?"&&q[_+1]==">"){_++;break}else continue}return _}function p$(q,_){if(q.length>_+5&&q[_+1]==="-"&&q[_+2]==="-"){for(_+=3;_<q.length;_++)if(q[_]==="-"&&q[_+1]==="-"&&q[_+2]===">"){_+=2;break}}else if(q.length>_+8&&q[_+1]==="D"&&q[_+2]==="O"&&q[_+3]==="C"&&q[_+4]==="T"&&q[_+5]==="Y"&&q[_+6]==="P"&&q[_+7]==="E"){let $=1;for(_+=8;_<q.length;_++)if(q[_]==="<")$++;else if(q[_]===">"){if($--,$===0)break}}else if(q.length>_+9&&q[_+1]==="["&&q[_+2]==="C"&&q[_+3]==="D"&&q[_+4]==="A"&&q[_+5]==="T"&&q[_+6]==="A"&&q[_+7]==="["){for(_+=8;_<q.length;_++)if(q[_]==="]"&&q[_+1]==="]"&&q[_+2]===">"){_+=2;break}}return _}var Jf='"',Zf="'";function rf(q,_){let $="",f="",K=!1;for(;_<q.length;_++){if(q[_]===Jf||q[_]===Zf)if(f==="")f=q[_];else if(f!==q[_]);else f="";else if(q[_]===">"){if(f===""){K=!0;break}}$+=q[_]}if(f!=="")return!1;return{value:$,index:_,tagClosed:K}}var uf=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function o$(q,_){let $=c_(q,uf),f={};for(let K=0;K<$.length;K++){if($[K][1].length===0)return p("InvalidAttr","Attribute '"+$[K][2]+"' has no space in starting.",m_($[K]));else if($[K][3]!==void 0&&$[K][4]===void 0)return p("InvalidAttr","Attribute '"+$[K][2]+"' is without value.",m_($[K]));else if($[K][3]===void 0&&!_.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+$[K][2]+"' is not allowed.",m_($[K]));let P=$[K][2];if(!mf(P))return p("InvalidAttr","Attribute '"+P+"' is an invalid name.",m_($[K]));if(!Object.prototype.hasOwnProperty.call(f,P))f[P]=1;else return p("InvalidAttr","Attribute '"+P+"' is repeated.",m_($[K]))}return!0}function Af(q,_){let $=/\d/;if(q[_]==="x")_++,$=/[\da-fA-F]/;for(;_<q.length;_++){if(q[_]===";")return _;if(!q[_].match($))break}return-1}function Xf(q,_){if(_++,q[_]===";")return-1;if(q[_]==="#")return _++,Af(q,_);let $=0;for(;_<q.length;_++,$++){if(q[_].match(/\w/)&&$<20)continue;if(q[_]===";")break;return-1}return _}function p(q,_,$){return{err:{code:q,msg:_,line:$.line||$,col:$.col}}}function mf(q){return j_(q)}function nf(q){return j_(q)}function d(q,_){let $=q.substring(0,_).split(/\r?\n/);return{line:$.length,col:$[$.length-1].length+1}}function m_(q){return q.startIndex+q[1].length}var d$=(q)=>{if(X_.includes(q))return"__"+q;return q},pf={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(q,_){return _},attributeValueProcessor:function(q,_){return _},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(q,_,$){return q},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:d$};function of(q,_){if(typeof q!=="string")return;let $=q.toLowerCase();if(X_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a_.some((f)=>$===f.toLowerCase()))throw Error(`[SECURITY] Invalid ${_}: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`)}function e$(q){if(typeof q==="boolean")return{enabled:q,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1000,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null};if(typeof q==="object"&&q!==null)return{enabled:q.enabled!==!1,maxEntitySize:q.maxEntitySize??1e4,maxExpansionDepth:q.maxExpansionDepth??10,maxTotalExpansions:q.maxTotalExpansions??1000,maxExpandedLength:q.maxExpandedLength??1e5,maxEntityCount:q.maxEntityCount??100,allowedTags:q.allowedTags??null,tagFilter:q.tagFilter??null};return e$(!0)}var b$=function(q){let _=Object.assign({},pf,q),$=[{value:_.attributeNamePrefix,name:"attributeNamePrefix"},{value:_.attributesGroupName,name:"attributesGroupName"},{value:_.textNodeName,name:"textNodeName"},{value:_.cdataPropName,name:"cdataPropName"},{value:_.commentPropName,name:"commentPropName"}];for(let{value:f,name:K}of $)if(f)of(f,K);if(_.onDangerousProperty===null)_.onDangerousProperty=d$;if(_.processEntities=e$(_.processEntities),_.stopNodes&&Array.isArray(_.stopNodes))_.stopNodes=_.stopNodes.map((f)=>{if(typeof f==="string"&&f.startsWith("*."))return".."+f.substring(2);return f});return _};var R_;if(typeof Symbol!=="function")R_="@@xmlMetadata";else R_=Symbol("XML Node Metadata");class S{constructor(q){this.tagname=q,this.child=[],this[":@"]=Object.create(null)}add(q,_){if(q==="__proto__")q="#__proto__";this.child.push({[q]:_})}addChild(q,_){if(q.tagname==="__proto__")q.tagname="#__proto__";if(q[":@"]&&Object.keys(q[":@"]).length>0)this.child.push({[q.tagname]:q.child,[":@"]:q[":@"]});else this.child.push({[q.tagname]:q.child});if(_!==void 0)this.child[this.child.length-1][R_]={startIndex:_}}static getMetaDataSymbol(){return R_}}class E_{constructor(q){this.suppressValidationErr=!q,this.options=q}readDocType(q,_){let $=Object.create(null),f=0;if(q[_+3]==="O"&&q[_+4]==="C"&&q[_+5]==="T"&&q[_+6]==="Y"&&q[_+7]==="P"&&q[_+8]==="E"){_=_+9;let K=1,P=!1,j=!1,v="";for(;_<q.length;_++)if(q[_]==="<"&&!j){if(P&&U(q,"!ENTITY",_)){_+=7;let w,O;if([w,O,_]=this.readEntityExp(q,_+1,this.suppressValidationErr),O.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount&&f>=this.options.maxEntityCount)throw Error(`Entity count (${f+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let Y=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");$[w]={regx:RegExp(`&${Y};`,"g"),val:O},f++}}else if(P&&U(q,"!ELEMENT",_)){_+=8;let{index:w}=this.readElementExp(q,_+1);_=w}else if(P&&U(q,"!ATTLIST",_))_+=8;else if(P&&U(q,"!NOTATION",_)){_+=9;let{index:w}=this.readNotationExp(q,_+1,this.suppressValidationErr);_=w}else if(U(q,"!--",_))j=!0;else throw Error("Invalid DOCTYPE");K++,v=""}else if(q[_]===">"){if(j){if(q[_-1]==="-"&&q[_-2]==="-")j=!1,K--}else K--;if(K===0)break}else if(q[_]==="[")P=!0;else v+=q[_];if(K!==0)throw Error("Unclosed DOCTYPE")}else throw Error("Invalid Tag instead of DOCTYPE");return{entities:$,i:_}}readEntityExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_])&&q[_]!=='"'&&q[_]!=="'")$+=q[_],_++;if(n_($),_=b(q,_),!this.suppressValidationErr){if(q.substring(_,_+6).toUpperCase()==="SYSTEM")throw Error("External entities are not supported");else if(q[_]==="%")throw Error("Parameter entities are not supported")}let f="";if([_,f]=this.readIdentifierVal(q,_,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize&&f.length>this.options.maxEntitySize)throw Error(`Entity "${$}" size (${f.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return _--,[$,f,_]}readNotationExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;!this.suppressValidationErr&&n_($),_=b(q,_);let f=q.substring(_,_+6).toUpperCase();if(!this.suppressValidationErr&&f!=="SYSTEM"&&f!=="PUBLIC")throw Error(`Expected SYSTEM or PUBLIC, found "${f}"`);_+=f.length,_=b(q,_);let K=null,P=null;if(f==="PUBLIC"){if([_,K]=this.readIdentifierVal(q,_,"publicIdentifier"),_=b(q,_),q[_]==='"'||q[_]==="'")[_,P]=this.readIdentifierVal(q,_,"systemIdentifier")}else if(f==="SYSTEM"){if([_,P]=this.readIdentifierVal(q,_,"systemIdentifier"),!this.suppressValidationErr&&!P)throw Error("Missing mandatory system identifier for SYSTEM notation")}return{notationName:$,publicIdentifier:K,systemIdentifier:P,index:--_}}readIdentifierVal(q,_,$){let f="",K=q[_];if(K!=='"'&&K!=="'")throw Error(`Expected quoted string, found "${K}"`);_++;while(_<q.length&&q[_]!==K)f+=q[_],_++;if(q[_]!==K)throw Error(`Unterminated ${$} value`);return _++,[_,f]}readElementExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;if(!this.suppressValidationErr&&!j_($))throw Error(`Invalid element name: "${$}"`);_=b(q,_);let f="";if(q[_]==="E"&&U(q,"MPTY",_))_+=4;else if(q[_]==="A"&&U(q,"NY",_))_+=2;else if(q[_]==="("){_++;while(_<q.length&&q[_]!==")")f+=q[_],_++;if(q[_]!==")")throw Error("Unterminated content model")}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${q[_]}"`);return{elementName:$,contentModel:f.trim(),index:_}}readAttlistExp(q,_){_=b(q,_);let $="";while(_<q.length&&!/\s/.test(q[_]))$+=q[_],_++;n_($),_=b(q,_);let f="";while(_<q.length&&!/\s/.test(q[_]))f+=q[_],_++;if(!n_(f))throw Error(`Invalid attribute name: "${f}"`);_=b(q,_);let K="";if(q.substring(_,_+8).toUpperCase()==="NOTATION"){if(K="NOTATION",_+=8,_=b(q,_),q[_]!=="(")throw Error(`Expected '(', found "${q[_]}"`);_++;let j=[];while(_<q.length&&q[_]!==")"){let v="";while(_<q.length&&q[_]!=="|"&&q[_]!==")")v+=q[_],_++;if(v=v.trim(),!n_(v))throw Error(`Invalid notation name: "${v}"`);if(j.push(v),q[_]==="|")_++,_=b(q,_)}if(q[_]!==")")throw Error("Unterminated list of notations");_++,K+=" ("+j.join("|")+")"}else{while(_<q.length&&!/\s/.test(q[_]))K+=q[_],_++;let j=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!j.includes(K.toUpperCase()))throw Error(`Invalid attribute type: "${K}"`)}_=b(q,_);let P="";if(q.substring(_,_+8).toUpperCase()==="#REQUIRED")P="#REQUIRED",_+=8;else if(q.substring(_,_+7).toUpperCase()==="#IMPLIED")P="#IMPLIED",_+=7;else[_,P]=this.readIdentifierVal(q,_,"ATTLIST");return{elementName:$,attributeName:f,attributeType:K,defaultValue:P,index:_}}}var b=(q,_)=>{while(_<q.length&&/\s/.test(q[_]))_++;return _};function U(q,_,$){for(let f=0;f<_.length;f++)if(_[f]!==q[$+f+1])return!1;return!0}function n_(q){if(j_(q))return q;else throw Error(`Invalid entity name ${q}`)}var Gf=/^[-+]?0x[a-fA-F0-9]+$/,df=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,ef={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"};function hq(q,_={}){if(_=Object.assign({},ef,_),!q||typeof q!=="string")return q;let $=q.trim();if(_.skipLike!==void 0&&_.skipLike.test($))return q;else if(q==="0")return 0;else if(_.hex&&Gf.test($))return Mf($,16);else if(!isFinite($))return Vf(q,Number($),_);else if($.includes("e")||$.includes("E"))return Sf(q,$,_);else{let f=df.exec($);if(f){let K=f[1]||"",P=f[2],j=Cf(f[3]),v=K?q[P.length+1]===".":q[P.length]===".";if(!_.leadingZeros&&(P.length>1||P.length===1&&!v))return q;else{let w=Number($),O=String(w);if(w===0)return w;if(O.search(/[eE]/)!==-1)if(_.eNotation)return w;else return q;else if($.indexOf(".")!==-1)if(O==="0")return w;else if(O===j)return w;else if(O===`${K}${j}`)return w;else return q;let Y=P?j:$;if(P)return Y===O||K+Y===O?w:q;else return Y===O||Y===K+O?w:q}}else return q}}var bf=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Sf(q,_,$){if(!$.eNotation)return q;let f=_.match(bf);if(f){let K=f[1]||"",P=f[3].indexOf("e")===-1?"E":"e",j=f[2],v=K?q[j.length+1]===P:q[j.length]===P;if(j.length>1&&v)return q;else if(j.length===1&&(f[3].startsWith(`.${P}`)||f[3][0]===P))return Number(_);else if($.leadingZeros&&!v)return _=(f[1]||"")+f[3],Number(_);else return q}else return q}function Cf(q){if(q&&q.indexOf(".")!==-1){if(q=q.replace(/0+$/,""),q===".")q="0";else if(q[0]===".")q="0"+q;else if(q[q.length-1]===".")q=q.substring(0,q.length-1);return q}return q}function Mf(q,_){if(parseInt)return parseInt(q,_);else if(Number.parseInt)return Number.parseInt(q,_);else if(window&&window.parseInt)return window.parseInt(q,_);else throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Vf(q,_,$){let f=_===1/0;switch($.infinity.toLowerCase()){case"null":return null;case"infinity":return _;case"string":return f?"Infinity":"-Infinity";case"original":default:return q}}function zq(q){if(typeof q==="function")return q;if(Array.isArray(q))return(_)=>{for(let $ of q){if(typeof $==="string"&&_===$)return!0;if($ instanceof RegExp&&$.test(_))return!0}};return()=>!1}class v_{constructor(q,_={}){this.pattern=q,this.separator=_.separator||".",this.segments=this._parse(q),this._hasDeepWildcard=this.segments.some(($)=>$.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(($)=>$.attrName!==void 0),this._hasPositionSelector=this.segments.some(($)=>$.position!==void 0)}_parse(q){let _=[],$=0,f="";while($<q.length)if(q[$]===this.separator)if($+1<q.length&&q[$+1]===this.separator){if(f.trim())_.push(this._parseSegment(f.trim())),f="";_.push({type:"deep-wildcard"}),$+=2}else{if(f.trim())_.push(this._parseSegment(f.trim()));f="",$++}else f+=q[$],$++;if(f.trim())_.push(this._parseSegment(f.trim()));return _}_parseSegment(q){let _={type:"tag"},$=null,f=q,K=q.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(K){if(f=K[1]+K[3],K[2]){let O=K[2].slice(1,-1);if(O)$=O}}let P=void 0,j=f;if(f.includes("::")){let O=f.indexOf("::");if(P=f.substring(0,O).trim(),j=f.substring(O+2).trim(),!P)throw Error(`Invalid namespace in pattern: ${q}`)}let v=void 0,w=null;if(j.includes(":")){let O=j.lastIndexOf(":"),Y=j.substring(0,O).trim(),T=j.substring(O+1).trim();if(["first","last","odd","even"].includes(T)||/^nth\(\d+\)$/.test(T))v=Y,w=T;else v=j}else v=j;if(!v)throw Error(`Invalid segment pattern: ${q}`);if(_.tag=v,P)_.namespace=P;if($)if($.includes("=")){let O=$.indexOf("=");_.attrName=$.substring(0,O).trim(),_.attrValue=$.substring(O+1).trim()}else _.attrName=$.trim();if(w){let O=w.match(/^nth\((\d+)\)$/);if(O)_.position="nth",_.positionValue=parseInt(O[1],10);else _.position=w}return _}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class p_{constructor(q={}){this.separator=q.separator||".",this.path=[],this.siblingStacks=[]}push(q,_=null,$=null){if(this.path.length>0){let O=this.path[this.path.length-1];O.values=void 0}let f=this.path.length;if(!this.siblingStacks[f])this.siblingStacks[f]=new Map;let K=this.siblingStacks[f],P=$?`${$}:${q}`:q,j=K.get(P)||0,v=0;for(let O of K.values())v+=O;K.set(P,j+1);let w={tag:q,position:v,counter:j};if($!==null&&$!==void 0)w.namespace=$;if(_!==null&&_!==void 0)w.values=_;this.path.push(w)}pop(){if(this.path.length===0)return;let q=this.path.pop();if(this.siblingStacks.length>this.path.length+1)this.siblingStacks.length=this.path.length+1;return q}updateCurrent(q){if(this.path.length>0){let _=this.path[this.path.length-1];if(q!==null&&q!==void 0)_.values=q}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(q){if(this.path.length===0)return;return this.path[this.path.length-1].values?.[q]}hasAttr(q){if(this.path.length===0)return!1;let _=this.path[this.path.length-1];return _.values!==void 0&&q in _.values}getPosition(){if(this.path.length===0)return-1;return this.path[this.path.length-1].position??0}getCounter(){if(this.path.length===0)return-1;return this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(q,_=!0){let $=q||this.separator;return this.path.map((f)=>{if(_&&f.namespace)return`${f.namespace}:${f.tag}`;return f.tag}).join($)}toArray(){return this.path.map((q)=>q.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(q){let _=q.segments;if(_.length===0)return!1;if(q.hasDeepWildcard())return this._matchWithDeepWildcard(_);return this._matchSimple(_)}_matchSimple(q){if(this.path.length!==q.length)return!1;for(let _=0;_<q.length;_++){let $=q[_],f=this.path[_],K=_===this.path.length-1;if(!this._matchSegment($,f,K))return!1}return!0}_matchWithDeepWildcard(q){let _=this.path.length-1,$=q.length-1;while($>=0&&_>=0){let f=q[$];if(f.type==="deep-wildcard"){if($--,$<0)return!0;let K=q[$],P=!1;for(let j=_;j>=0;j--){let v=j===this.path.length-1;if(this._matchSegment(K,this.path[j],v)){_=j-1,$--,P=!0;break}}if(!P)return!1}else{let K=_===this.path.length-1;if(!this._matchSegment(f,this.path[_],K))return!1;_--,$--}}return $<0}_matchSegment(q,_,$){if(q.tag!=="*"&&q.tag!==_.tag)return!1;if(q.namespace!==void 0){if(q.namespace!=="*"&&q.namespace!==_.namespace)return!1}if(q.attrName!==void 0){if(!$)return!1;if(!_.values||!(q.attrName in _.values))return!1;if(q.attrValue!==void 0){let f=_.values[q.attrName];if(String(f)!==String(q.attrValue))return!1}}if(q.position!==void 0){if(!$)return!1;let f=_.counter??0;if(q.position==="first"&&f!==0)return!1;else if(q.position==="odd"&&f%2!==1)return!1;else if(q.position==="even"&&f%2!==0)return!1;else if(q.position==="nth"){if(f!==q.positionValue)return!1}}return!0}snapshot(){return{path:this.path.map((q)=>({...q})),siblingStacks:this.siblingStacks.map((q)=>new Map(q))}}restore(q){this.path=q.path.map((_)=>({..._})),this.siblingStacks=q.siblingStacks.map((_)=>new Map(_))}}function Nf(q,_){if(!q)return{};let $=_.attributesGroupName?q[_.attributesGroupName]:q;if(!$)return{};let f={};for(let K in $)if(K.startsWith(_.attributeNamePrefix)){let P=K.substring(_.attributeNamePrefix.length);f[P]=$[K]}else f[K]=$[K];return f}function lf(q){if(!q||typeof q!=="string")return;let _=q.indexOf(":");if(_!==-1&&_>0){let $=q.substring(0,_);if($!=="xmlns")return $}return}class I_{constructor(q){if(this.options=q,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(_,$)=>S$($,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(_,$)=>S$($,16,"&#x")}},this.addExternalEntities=tf,this.parseXml=If,this.parseTextData=cf,this.resolveNameSpace=af,this.buildAttributesMap=Ef,this.isItStopNode=Lf,this.replaceEntitiesValue=yf,this.readStopNodeData=sf,this.saveTextToParentTag=Df,this.addChild=gf,this.ignoreAttributesFn=zq(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new p_,this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let _=0;_<this.options.stopNodes.length;_++){let $=this.options.stopNodes[_];if(typeof $==="string")this.stopNodeExpressions.push(new v_($));else if($ instanceof v_)this.stopNodeExpressions.push($)}}}}function tf(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$],K=f.replace(/[.\-+*:]/g,"\\.");this.lastEntities[f]={regex:new RegExp("&"+K+";","g"),val:q[f]}}}function cf(q,_,$,f,K,P,j){if(q!==void 0){if(this.options.trimValues&&!f)q=q.trim();if(q.length>0){if(!j)q=this.replaceEntitiesValue(q,_,$);let v=this.options.jPath?$.toString():$,w=this.options.tagValueProcessor(_,q,v,K,P);if(w===null||w===void 0)return q;else if(typeof w!==typeof q||w!==q)return w;else if(this.options.trimValues)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else if(q.trim()===q)return Jq(q,this.options.parseTagValue,this.options.numberParseOptions);else return q}}}function af(q){if(this.options.removeNSPrefix){let _=q.split(":"),$=q.charAt(0)==="/"?"/":"";if(_[0]==="xmlns")return"";if(_.length===2)q=$+_[1]}return q}var Rf=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Ef(q,_,$){if(this.options.ignoreAttributes!==!0&&typeof q==="string"){let f=c_(q,Rf),K=f.length,P={},j={};for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=f[v][4];if(w.length&&O!==void 0){let Y=O;if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_),j[w]=Y}}if(Object.keys(j).length>0&&typeof _==="object"&&_.updateCurrent)_.updateCurrent(j);for(let v=0;v<K;v++){let w=this.resolveNameSpace(f[v][1]),O=this.options.jPath?_.toString():_;if(this.ignoreAttributesFn(w,O))continue;let Y=f[v][4],T=this.options.attributeNamePrefix+w;if(w.length){if(this.options.transformAttributeName)T=this.options.transformAttributeName(T);if(T=C$(T,this.options),Y!==void 0){if(this.options.trimValues)Y=Y.trim();Y=this.replaceEntitiesValue(Y,$,_);let k=this.options.jPath?_.toString():_,h=this.options.attributeValueProcessor(w,Y,k);if(h===null||h===void 0)P[T]=Y;else if(typeof h!==typeof Y||h!==Y)P[T]=h;else P[T]=Jq(Y,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)P[T]=!0}}if(!Object.keys(P).length)return;if(this.options.attributesGroupName){let v={};return v[this.options.attributesGroupName]=P,v}return P}}var If=function(q){q=q.replace(/\r\n?/g,`
561
+ `);let _=new S("!xml"),$=_,f="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let K=new E_(this.options.processEntities);for(let P=0;P<q.length;P++)if(q[P]==="<")if(q[P+1]==="/"){let v=F(q,">",P,"Closing Tag is not closed."),w=q.substring(P+2,v).trim();if(this.options.removeNSPrefix){let Y=w.indexOf(":");if(Y!==-1)w=w.substr(Y+1)}if(w=Hq(this.options.transformTagName,w,"",this.options).tagName,$)f=this.saveTextToParentTag(f,$,this.matcher);let O=this.matcher.getCurrentTag();if(w&&this.options.unpairedTags.indexOf(w)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${w}>`);if(O&&this.options.unpairedTags.indexOf(O)!==-1)this.matcher.pop(),this.tagsNodeStack.pop();this.matcher.pop(),this.isCurrentNodeStopNode=!1,$=this.tagsNodeStack.pop(),f="",P=v}else if(q[P+1]==="?"){let v=Wq(q,P,!1,"?>");if(!v)throw Error("Pi Tag is not closed.");if(f=this.saveTextToParentTag(f,$,this.matcher),this.options.ignoreDeclaration&&v.tagName==="?xml"||this.options.ignorePiTags);else{let w=new S(v.tagName);if(w.add(this.options.textNodeName,""),v.tagName!==v.tagExp&&v.attrExpPresent)w[":@"]=this.buildAttributesMap(v.tagExp,this.matcher,v.tagName);this.addChild($,w,this.matcher,P)}P=v.closeIndex+1}else if(q.substr(P+1,3)==="!--"){let v=F(q,"-->",P+4,"Comment is not closed.");if(this.options.commentPropName){let w=q.substring(P+4,v-2);f=this.saveTextToParentTag(f,$,this.matcher),$.add(this.options.commentPropName,[{[this.options.textNodeName]:w}])}P=v}else if(q.substr(P+1,2)==="!D"){let v=K.readDocType(q,P);this.docTypeEntities=v.entities,P=v.i}else if(q.substr(P+1,2)==="!["){let v=F(q,"]]>",P,"CDATA is not closed.")-2,w=q.substring(P+9,v);f=this.saveTextToParentTag(f,$,this.matcher);let O=this.parseTextData(w,$.tagname,this.matcher,!0,!1,!0,!0);if(O==null)O="";if(this.options.cdataPropName)$.add(this.options.cdataPropName,[{[this.options.textNodeName]:w}]);else $.add(this.options.textNodeName,O);P=v+2}else{let v=Wq(q,P,this.options.removeNSPrefix);if(!v){let r=q.substring(Math.max(0,P-50),Math.min(q.length,P+50));throw Error(`readTagExp returned undefined at position ${P}. Context: "${r}"`)}let{tagName:w,rawTagName:O,tagExp:Y,attrExpPresent:T,closeIndex:k}=v;if({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options),this.options.strictReservedNames&&(w===this.options.commentPropName||w===this.options.cdataPropName))throw Error(`Invalid tag name: ${w}`);if($&&f){if($.tagname!=="!xml")f=this.saveTextToParentTag(f,$,this.matcher,!1)}let h=$;if(h&&this.options.unpairedTags.indexOf(h.tagname)!==-1)$=this.tagsNodeStack.pop(),this.matcher.pop();let W=!1;if(Y.length>0&&Y.lastIndexOf("/")===Y.length-1){if(W=!0,w[w.length-1]==="/")w=w.substr(0,w.length-1),Y=w;else Y=Y.substr(0,Y.length-1);T=w!==Y}let H=null,u={},Z=void 0;if(Z=lf(O),w!==_.tagname)this.matcher.push(w,{},Z);if(w!==Y&&T){if(H=this.buildAttributesMap(Y,this.matcher,w),H)u=Nf(H,this.options)}if(w!==_.tagname)this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher);let X=P;if(this.isCurrentNodeStopNode){let r="";if(W)P=v.closeIndex;else if(this.options.unpairedTags.indexOf(w)!==-1)P=v.closeIndex;else{let t=this.readStopNodeData(q,O,k+1);if(!t)throw Error(`Unexpected end of ${O}`);P=t.i,r=t.tagContent}let A=new S(w);if(H)A[":@"]=H;A.add(this.options.textNodeName,r),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild($,A,this.matcher,X)}else{if(W){({tagName:w,tagExp:Y}=Hq(this.options.transformTagName,w,Y,this.options));let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(w)!==-1){let r=new S(w);if(H)r[":@"]=H;this.addChild($,r,this.matcher,X),this.matcher.pop(),this.isCurrentNodeStopNode=!1,P=v.closeIndex;continue}else{let r=new S(w);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error("Maximum nested tags exceeded");if(this.tagsNodeStack.push($),H)r[":@"]=H;this.addChild($,r,this.matcher,X),$=r}f="",P=k}}else f+=q[P];return _.child};function gf(q,_,$,f){if(!this.options.captureMetaData)f=void 0;let K=this.options.jPath?$.toString():$,P=this.options.updateTag(_.tagname,K,_[":@"]);if(P===!1);else if(typeof P==="string")_.tagname=P,q.addChild(_,f);else q.addChild(_,f)}function yf(q,_,$){let f=this.options.processEntities;if(!f||!f.enabled)return q;if(f.allowedTags){let K=this.options.jPath?$.toString():$;if(!(Array.isArray(f.allowedTags)?f.allowedTags.includes(_):f.allowedTags(_,K)))return q}if(f.tagFilter){let K=this.options.jPath?$.toString():$;if(!f.tagFilter(_,K))return q}for(let K of Object.keys(this.docTypeEntities)){let P=this.docTypeEntities[K],j=q.match(P.regx);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`);let v=q.length;if(q=q.replace(P.regx,P.val),f.maxExpandedLength){if(this.currentExpandedLength+=q.length-v,this.currentExpandedLength>f.maxExpandedLength)throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${f.maxExpandedLength}`)}}}for(let K of Object.keys(this.lastEntities)){let P=this.lastEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}if(q.indexOf("&")===-1)return q;if(this.options.htmlEntities)for(let K of Object.keys(this.htmlEntities)){let P=this.htmlEntities[K],j=q.match(P.regex);if(j){if(this.entityExpansionCount+=j.length,f.maxTotalExpansions&&this.entityExpansionCount>f.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${f.maxTotalExpansions}`)}q=q.replace(P.regex,P.val)}return q=q.replace(this.ampEntity.regex,this.ampEntity.val),q}function Df(q,_,$,f){if(q){if(f===void 0)f=_.child.length===0;if(q=this.parseTextData(q,_.tagname,$,!1,_[":@"]?Object.keys(_[":@"]).length!==0:!1,f),q!==void 0&&q!=="")_.add(this.options.textNodeName,q);q=""}return q}function Lf(q,_){if(!q||q.length===0)return!1;for(let $=0;$<q.length;$++)if(_.matches(q[$]))return!0;return!1}function xf(q,_,$=">"){let f,K="";for(let P=_;P<q.length;P++){let j=q[P];if(f){if(j===f)f=""}else if(j==='"'||j==="'")f=j;else if(j===$[0])if($[1]){if(q[P+1]===$[1])return{data:K,index:P}}else return{data:K,index:P};else if(j==="\t")j=" ";K+=j}}function F(q,_,$,f){let K=q.indexOf(_,$);if(K===-1)throw Error(f);else return K+_.length-1}function Wq(q,_,$,f=">"){let K=xf(q,_+1,f);if(!K)return;let{data:P,index:j}=K,v=P.search(/\s/),w=P,O=!0;if(v!==-1)w=P.substring(0,v),P=P.substring(v+1).trimStart();let Y=w;if($){let T=w.indexOf(":");if(T!==-1)w=w.substr(T+1),O=w!==K.data.substr(T+1)}return{tagName:w,tagExp:P,closeIndex:j,attrExpPresent:O,rawTagName:Y}}function sf(q,_,$){let f=$,K=1;for(;$<q.length;$++)if(q[$]==="<")if(q[$+1]==="/"){let P=F(q,">",$,`${_} is not closed`);if(q.substring($+2,P).trim()===_){if(K--,K===0)return{tagContent:q.substring(f,$),i:P}}$=P}else if(q[$+1]==="?")$=F(q,"?>",$+1,"StopNode is not closed.");else if(q.substr($+1,3)==="!--")$=F(q,"-->",$+3,"StopNode is not closed.");else if(q.substr($+1,2)==="![")$=F(q,"]]>",$,"StopNode is not closed.")-2;else{let P=Wq(q,$,">");if(P){if((P&&P.tagName)===_&&P.tagExp[P.tagExp.length-1]!=="/")K++;$=P.closeIndex}}}function Jq(q,_,$){if(_&&typeof q==="string"){let f=q.trim();if(f==="true")return!0;else if(f==="false")return!1;else return hq(q,$)}else if(X$(q))return q;else return""}function S$(q,_,$){let f=Number.parseInt(q,_);if(f>=0&&f<=1114111)return String.fromCodePoint(f);else return $+q+";"}function Hq(q,_,$,f){if(q){let K=q(_);if($===_)$=K;_=K}return _=C$(_,f),{tagName:_,tagExp:$}}function C$(q,_){if(a_.includes(q))throw Error(`[SECURITY] Invalid name: "${q}" is a reserved JavaScript keyword that could cause prototype pollution`);else if(X_.includes(q))return _.onDangerousProperty(q);return q}var Zq=S.getMetaDataSymbol();function Bf(q,_){if(!q||typeof q!=="object")return{};if(!_)return q;let $={};for(let f in q)if(f.startsWith(_)){let K=f.substring(_.length);$[K]=q[f]}else $[f]=q[f];return $}function rq(q,_,$){return M$(q,_,$)}function M$(q,_,$){let f,K={};for(let P=0;P<q.length;P++){let j=q[P],v=Uf(j);if(v!==void 0&&v!==_.textNodeName){let w=Bf(j[":@"]||{},_.attributeNamePrefix);$.push(v,w)}if(v===_.textNodeName)if(f===void 0)f=j[v];else f+=""+j[v];else if(v===void 0)continue;else if(j[v]){let w=M$(j[v],_,$),O=Qf(w,_);if(j[":@"])Ff(w,j[":@"],$,_);else if(Object.keys(w).length===1&&w[_.textNodeName]!==void 0&&!_.alwaysCreateTextNode)w=w[_.textNodeName];else if(Object.keys(w).length===0)if(_.alwaysCreateTextNode)w[_.textNodeName]="";else w="";if(j[Zq]!==void 0&&typeof w==="object"&&w!==null)w[Zq]=j[Zq];if(K[v]!==void 0&&Object.prototype.hasOwnProperty.call(K,v)){if(!Array.isArray(K[v]))K[v]=[K[v]];K[v].push(w)}else{let Y=_.jPath?$.toString():$;if(_.isArray(v,Y,O))K[v]=[w];else K[v]=w}if(v!==void 0&&v!==_.textNodeName)$.pop()}}if(typeof f==="string"){if(f.length>0)K[_.textNodeName]=f}else if(f!==void 0)K[_.textNodeName]=f;return K}function Uf(q){let _=Object.keys(q);for(let $=0;$<_.length;$++){let f=_[$];if(f!==":@")return f}}function Ff(q,_,$,f){if(_){let K=Object.keys(_),P=K.length;for(let j=0;j<P;j++){let v=K[j],w=v.startsWith(f.attributeNamePrefix)?v.substring(f.attributeNamePrefix.length):v,O=f.jPath?$.toString()+"."+w:$;if(f.isArray(v,O,!0,!0))q[v]=[_[v]];else q[v]=_[v]}}}function Qf(q,_){let{textNodeName:$}=_,f=Object.keys(q).length;if(f===0)return!0;if(f===1&&(q[$]||typeof q[$]==="boolean"||q[$]===0))return!0;return!1}class c{constructor(q){this.externalEntities={},this.options=b$(q)}parse(q,_){if(typeof q!=="string"&&q.toString)q=q.toString();else if(typeof q!=="string")throw Error("XML data is accepted in String or Bytes[] form.");if(_){if(_===!0)_={};let K=G$(q,_);if(K!==!0)throw Error(`${K.err.msg}:${K.err.line}:${K.err.col}`)}let $=new I_(this.options);$.addExternalEntities(this.externalEntities);let f=$.parseXml(q);if(this.options.preserveOrder||f===void 0)return f;else return rq(f,this.options,$.matcher)}addEntity(q,_){if(_.indexOf("&")!==-1)throw Error("Entity value can't have '&'");else if(q.indexOf("&")!==-1||q.indexOf(";")!==-1)throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(_==="&")throw Error("An entity with value '&' is not permitted");else this.externalEntities[q]=_}static getMetaDataSymbol(){return S.getMetaDataSymbol()}}function V$(q){let f=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q).package;if(!f)throw Error("Invalid PDSC: missing <package> root element");let K=_K(f.components?.component),P=K.some((v)=>v["@_generator"]==="CubeMX"),j=K.some((v)=>v["@_Cgroup"]?.includes("Startup")||v["@_Csub"]==="Startup");if(P&&!j)return"2.x";if(j)return"1.x";throw Error("Cannot classify DFP version: PDSC has neither Startup component nor CubeMX generator reference")}function _K(q){if(!q)return[];return Array.isArray(q)?q:[q]}class mq{packRoot;name="DfpPackLayer (L1)";constructor(q){this.packRoot=q}async canResolve(q){let _=this.findPdsc(q);if(!_)return!1;let $=uq(_,"utf-8");return V$($)==="1.x"}async resolve(q,_){let $=this.findPdsc(q);if(!$)throw Error(`No PDSC found for device family ${q.family}`);let f=$K($),K=uq($,"utf-8"),j=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(K),w=O_(j.package?.components?.component).find((H)=>H["@_Cgroup"]?.includes("Startup")||H["@_Csub"]==="Startup");if(!w)throw Error(`No Startup component found in PDSC for ${q.family}`);let O=O_(w.files?.file),Y=null,T=null,k=[];for(let H of O){let u=H["@_name"]??"",Z=H["@_category"]??"",X=R(f,u);if(!Aq(X))continue;if(Z==="source"&&u.includes("startup")){let r=R(_,w_(u));g_(X,r),Y=r}else if(Z==="source"&&u.includes("system")){let r=R(_,w_(u));g_(X,r),T=r}else if(Z==="header"){let r=R(_,"Include");qK(r,{recursive:!0});let A=R(r,w_(u));g_(X,A),k.push(A)}}if(!Y)throw Error(`No startup file found in Pack for ${q.family}`);if(!T)throw Error(`No system file found in Pack for ${q.family}`);let h=null,W=this.findBestLinkerScript(f,K,q);if(W){let H=R(_,w_(W));g_(W,H),h=H}return{startupFile:Y,systemFile:T,linkerScript:h,headers:k,source:"dfp-pack"}}findPdsc(q){if(!Aq(this.packRoot))return null;let _=Xq(this.packRoot);for(let $ of _){let f=R(this.packRoot,$);try{let P=Xq(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=R(f,P),v=uq(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}findBestLinkerScript(q,_,$){let f=fK(_,q);if(f)return f;return PK(q,$)}}function O_(q){if(!q)return[];return Array.isArray(q)?q:[q]}function fK(q,_){let f=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(q),K=O_(f.package?.conditions?.condition),P=new Set;for(let w of K){let O=w["@_id"]??"";if(O_(w.require).some((k)=>(k["@_Tcompiler"]??"").toUpperCase()==="GCC"))P.add(O)}let v=O_(f.package?.components?.component).filter((w)=>{let O=(w["@_Cclass"]??"").toLowerCase(),Y=(w["@_Cgroup"]??"").toLowerCase(),T=(w["@_Csub"]??"").toLowerCase();return O.includes("device")&&(Y.includes("startup")||T==="startup")});for(let w of v){let O=O_(w.files?.file);for(let Y of O){if((Y["@_category"]??"")!=="linkerScript")continue;let T=Y["@_condition"]??"";if(T&&!P.has(T))continue;let k=R(_,Y["@_name"]??"");if(Aq(k))return k}}return null}var KK=["example","examples","template","templates","test","tests","board","boards"];function PK(q,_){let $=jK(q);if($.length===0)return null;let f=$.filter((P)=>{let j=P.slice(q.length).toLowerCase();return!KK.some((v)=>j.includes(v))});if(f.length===0)return null;let K=f.map((P)=>{let j=P.slice(q.length+1);return{path:P,score:vK(j,_.name,_.family),depth:j.split(/[/\\]/).length,nameLen:w_(P).length}});if(K.sort((P,j)=>{if(j.score!==P.score)return j.score-P.score;if(P.depth!==j.depth)return P.depth-j.depth;return P.nameLen-j.nameLen}),K[0].score<0)return null;return K[0].path}function jK(q){let _=[],$=(f)=>{try{for(let K of Xq(f,{withFileTypes:!0})){let P=R(f,K.name);if(K.isDirectory())$(P);else if(K.name.endsWith(".ld")||K.name.endsWith(".lds"))_.push(P)}}catch{}};return $(q),_}function vK(q,_,$){let f=q.toLowerCase(),K=w_(q).toLowerCase(),P=0;if(f.includes("gcc"))P+=30;if(f.includes("armcc")||f.includes("iar")||f.includes("mdk"))P-=100;if(K.includes("flash")||K.includes("rom"))P+=50;if(K.includes("sram")||K.includes("ram"))P-=20;if(K.includes(_.toLowerCase()))P+=40;if(K.includes($.toLowerCase()))P+=20;if(q.split(/[/\\]/).map((v)=>v.toLowerCase()).some((v)=>v.includes("device")||v==="startup"||v==="gcc"))P+=10;return P}import{existsSync as T_,readdirSync as wK,copyFileSync as nq,mkdirSync as OK}from"node:fs";import{join as C}from"node:path";class pq{coreRoot;name="ArduinoCoreLayer (L4)";constructor(q){this.coreRoot=q}async canResolve(q){if(!q.family.startsWith("STM32"))return!1;return this.getFamilyDir(q)!==null}async resolve(q,_){let $=this.getFamilyDir(q);if(!$)throw Error(`Arduino Core has no files for family ${q.family}`);let f=C($,"Source","Templates","gcc"),K=`startup_${q.subfamilyDefine.toLowerCase()}.s`,P=C(f,K);if(!T_(P))throw Error(`Startup file not found: ${P}`);let j=C(_,K);nq(P,j);let v=C($,"Source","Templates"),O=`system_${q.family.toLowerCase()}.c`,Y=C(v,O);if(!T_(Y))throw Error(`System file not found: ${Y}`);let T=C(_,O);nq(Y,T);let k=[],h=C($,"Include");if(T_(h)){let W=C(_,"Include");OK(W,{recursive:!0});let H=`${q.subfamilyDefine.toLowerCase()}.h`,u=C(h,H);if(T_(u)){let Z=C(W,H);nq(u,Z),k.push(Z)}}return{startupFile:j,systemFile:T,linkerScript:null,headers:k,source:"arduino-core"}}getFamilyDir(q){let _=C(this.coreRoot,"system","Drivers","CMSIS","Device","ST");if(!T_(_))return null;let $=C(_,q.family);if(T_($))return $;try{let K=wK(_).find((P)=>P.toLowerCase()===q.family.toLowerCase());if(K)return C(_,K)}catch{}return null}}var a6=r$(z$(),1);var fq=null;function x7(){if(fq)return fq;let q=P_("assets/chipctx-gen/templates/linker.ld.hbs");return fq=a6.default.compile(q,{noEscape:!0}),fq}function R6(q){return x7()({...q,stackSize:q.stackSize??"0x400",heapSize:q.heapSize??"0x200"})}var E6=r$(z$(),1);var Kq=null;function s7(){if(Kq)return Kq;let q=P_("assets/chipctx-gen/templates/cgen.yml.hbs");return Kq=E6.default.compile(q,{noEscape:!0}),Kq}function I6(q){return s7()({...q,version:"1.0.0",board:q.board??""})}import{readFileSync as H$,existsSync as g6,readdirSync as y6,copyFileSync as D6,mkdirSync as L6}from"node:fs";import{join as B,basename as x6,dirname as B7}from"node:path";class W${packRoot;constructor(q){this.packRoot=q}detectDriverType(q){let _=this.findPdsc(q);if(!_)return"none";let $=H$(_,"utf-8"),K=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse($),P=Pq(K.package?.components?.component);if(P.some((j)=>j["@_Cgroup"]==="HAL"||this.getFiles(j).some((v)=>v.includes("_hal_"))))return"hal";if(P.some((j)=>j["@_Cgroup"]==="Driver"||this.getFiles(j).some((v)=>v.includes("_ll_"))))return"ll";return"none"}async fetch(q,_,$){if($==="none")return{files:[],driverGroupName:null,includeDir:null};let f=$==="auto"?this.detectDriverType(q):$;if(f==="none")return{files:[],driverGroupName:null,includeDir:null};let K=this.findPdsc(q);if(!K)return{files:[],driverGroupName:null,includeDir:null};let P=B7(K),j=H$(K,"utf-8"),w=new c({ignoreAttributes:!1,attributeNamePrefix:"@_"}).parse(j),Y=Pq(w.package?.components?.component).filter((u)=>{if(f==="hal")return u["@_Cgroup"]==="HAL"||this.getFiles(u).some((Z)=>Z.includes("_hal_"));return u["@_Cgroup"]==="Driver"||this.getFiles(u).some((Z)=>Z.includes("_ll_"))}),T=[],k=B(_,"Driver"),h=B(k,"Src"),W=B(k,"Inc");L6(h,{recursive:!0}),L6(W,{recursive:!0});for(let u of Y){let Z=Pq(u.files?.file);for(let X of Z){let r=X["@_name"]??"",A=X["@_category"]??"",t=B(P,r);if(!g6(t))continue;if(A==="source"){let V=B(h,x6(r));D6(t,V),T.push(V)}else if(A==="header"){let V=B(W,x6(r));D6(t,V)}}}let H=f==="hal"?"HAL_Driver":"LL_Driver";return{files:T,driverGroupName:T.length>0?H:null,includeDir:T.length>0?W:null}}getFiles(q){return Pq(q.files?.file).map((_)=>_["@_name"]??"")}findPdsc(q){if(!g6(this.packRoot))return null;let _=y6(this.packRoot);for(let $ of _){let f=B(this.packRoot,$);try{let P=y6(f).find((j)=>j.endsWith(".pdsc"));if(P){let j=B(f,P),v=H$(j,"utf-8");if(v.includes(q.family)||v.includes(q.name))return j}}catch{}}return null}}function Pq(q){if(!q)return[];return Array.isArray(q)?q:[q]}async function B6(q){let{deviceName:_,outputDir:$,packRoot:f,arduinoCoreRoot:K,driverMode:P}=q,j=A$(_);if(!j)return{success:!1,cgenPath:null,generatedFiles:[],error:`Unknown device: "${_}". Not in device-mappings.json.`};let v={name:_,family:j.family,subfamilyDefine:j.subfamilyDefine,cpu:j.cpu,fpu:j.fpu,dfpVersion:j.dfpVersion};U7($,{recursive:!0});let w={generate:async(Z,X)=>{let r=R6({flashOrigin:j.memory.flash.origin,flashSize:j.memory.flash.size,ramOrigin:j.memory.ram.origin,ramSize:j.memory.ram.size,ccmOrigin:j.memory.ccm?.origin,ccmSize:j.memory.ccm?.size}),A=J$(X,`${_}.ld`);return s6(A,r),A}},O=new kq([new mq(f),new pq(K)],w),Y;try{Y=await O.resolve(v,$)}catch(Z){return{success:!1,cgenPath:null,generatedFiles:[],error:Z.message}}let T=[Y.startupFile,Y.systemFile];if(Y.linkerScript)T.push(Y.linkerScript);T.push(...Y.headers);let k,h;if(P!=="none"){let X=await new W$(f).fetch(v,$,P);if(X.files.length>0)k=X.files,h=X.driverGroupName??void 0,T.push(...X.files)}let W=I6({device:_,board:q.board,subfamilyDefine:j.subfamilyDefine,startupFile:`./${jq($,Y.startupFile)}`,systemFile:`./${jq($,Y.systemFile)}`,includePaths:Y.headers.length>0?[`./${jq($,J$($,"Include"))}`]:[],driverFiles:k?.map((Z)=>`./${jq($,Z)}`),driverGroupName:h}),H=q.projectName??_,u=J$($,`${H}.cgen.yml`);return s6(u,W),T.push(u),{success:!0,cgenPath:u,generatedFiles:T,error:null}}function jq(q,_){if(_.startsWith(q)){let $=_.slice(q.length);if($.startsWith("/"))$=$.slice(1);return $}return _}async function Q7(){let q=process.argv.slice(2);if(q.length===0)console.error("Usage: chipctx-gen <cbuild-gen-idx.yml>"),console.error(" This is a CMSIS Generator. It is called by cbuild automatically."),process.exit(1);let _=Q6(q[0]),$;try{$=F7(_,"utf-8")}catch(T){console.error(`[chipctx-gen] Cannot read: ${_}`),console.error(`[chipctx-gen] Error: ${T.message}`),process.exit(1)}let f=$.match(/device:\s*(\S+)/),K=$.match(/output:\s*(\S+)/);if(!f)console.error("[chipctx-gen] Cannot find 'device' field in cbuild-gen-idx.yml"),process.exit(1);let P=f[1],j=K?Q6(U6(_),K[1]):U6(_),v=process.env.CMSIS_PACK_ROOT??F6(process.env.HOME??"",".cache","arm","packs"),w=process.env.ARDUINO_CORE_ROOT??F6(process.env.HOME??"",".chipctx","arduino","data","packages","STMicroelectronics","hardware","stm32"),O=process.env.CHIPCTX_DRIVER_MODE??"none";console.log(`[chipctx-gen] Device: ${P}`),console.log(`[chipctx-gen] Output: ${j}`);let Y=await B6({deviceName:P,outputDir:j,packRoot:v,arduinoCoreRoot:w,driverMode:O});if(Y.success)console.log(`[chipctx-gen] Generated ${Y.generatedFiles.length} files`),console.log(`[chipctx-gen] cgen.yml: ${Y.cgenPath}`),process.exit(0);else console.error(`[chipctx-gen] Failed: ${Y.error}`),process.exit(1)}Q7().catch((q)=>{console.error(`[chipctx-gen] Unexpected error: ${q.message}`),process.exit(1)});