UNPKG

@nosto/autocomplete

Version:

Library designed to simplify the implementation of search autocomplete functionality

9 lines 89.4 kB
const dt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},mt=/[&<>"'`=]/g,gt=/[&<>"'`=]/;function yt(e){return dt[e]}function m(e){for(let t=1;t<arguments.length;t++)for(let r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}let F=Object.prototype.toString,U=function(e){return typeof e=="function"};U(/x/)&&(U=function(e){return typeof e=="function"&&F.call(e)==="[object Function]"});const _=Array.isArray||function(e){return e&&typeof e=="object"?F.call(e)==="[object Array]":!1};function he(e,t){for(let r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1}function pe(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return gt.test(e)?e.replace(mt,yt):e}function fe(e){return!e&&e!==0?!0:!!(_(e)&&e.length===0)}function N(e){let t=m({},e);return t._parent=e,t}function de(e,t){return e.path=t,e}function G(e,t){return(e?e+".":"")+t}var kt=Object.freeze({__proto__:null,appendContextPath:G,blockParams:de,createFrame:N,escapeExpression:pe,extend:m,indexOf:he,isArray:_,isEmpty:fe,get isFunction(){return U},toString:F});const me=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function f(e,t){let r=t&&t.loc,i,n,s,a;r&&(i=r.start.line,n=r.end.line,s=r.start.column,a=r.end.column,e+=" - "+i+":"+s);let o=Error.prototype.constructor.call(this,e);for(let u=0;u<me.length;u++)this[me[u]]=o[me[u]];Error.captureStackTrace&&Error.captureStackTrace(this,f);try{r&&(this.lineNumber=i,this.endLineNumber=n,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:a,enumerable:!0})):(this.column=s,this.endColumn=a))}catch{}}f.prototype=new Error;function St(e){e.registerHelper("blockHelperMissing",function(t,r){let i=r.inverse,n=r.fn;if(t===!0)return n(this);if(t===!1||t==null)return i(this);if(_(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):i(this);if(r.data&&r.ids){let s=N(r.data);s.contextPath=G(r.data.contextPath,r.name),r={data:s}}return n(t,r)})}function bt(e){e.registerHelper("each",function(t,r){if(!r)throw new f("Must pass iterator to #each");let i=r.fn,n=r.inverse,s=0,a="",o,u;r.data&&r.ids&&(u=G(r.data.contextPath,r.ids[0])+"."),U(t)&&(t=t.call(this)),r.data&&(o=N(r.data));function l(h,c,p){o&&(o.key=h,o.index=c,o.first=c===0,o.last=!!p,u&&(o.contextPath=u+h)),a=a+i(t[h],{data:o,blockParams:de([t[h],h],[u+h,null])})}if(t&&typeof t=="object")if(_(t))for(let h=t.length;s<h;s++)s in t&&l(s,s,s===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){const h=[],c=t[Symbol.iterator]();for(let p=c.next();!p.done;p=c.next())h.push(p.value);t=h;for(let p=t.length;s<p;s++)l(s,s,s===t.length-1)}else{let h;Object.keys(t).forEach(c=>{h!==void 0&&l(h,s-1),h=c,s++}),h!==void 0&&l(h,s-1,!0)}return s===0&&(a=n(this)),a})}function wt(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new f('Missing helper: "'+arguments[arguments.length-1].name+'"')})}function Pt(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new f("#if requires exactly one argument");return U(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||fe(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new f("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})}function vt(e){e.registerHelper("log",function(){let t=[void 0],r=arguments[arguments.length-1];for(let n=0;n<arguments.length-1;n++)t.push(arguments[n]);let i=1;r.hash.level!=null?i=r.hash.level:r.data&&r.data.level!=null&&(i=r.data.level),t[0]=i,e.log(...t)})}function _t(e){e.registerHelper("lookup",function(t,r,i){return t&&i.lookupProperty(t,r)})}function Et(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new f("#with requires exactly one argument");U(t)&&(t=t.call(this));let i=r.fn;if(fe(t))return r.inverse(this);{let n=r.data;return r.data&&r.ids&&(n=N(r.data),n.contextPath=G(r.data.contextPath,r.ids[0])),i(t,{data:n,blockParams:de([t],[n&&n.contextPath])})}})}function Lt(e){St(e),bt(e),wt(e),Pt(e),vt(e),_t(e),Et(e)}function He(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}function Ct(e){e.registerDecorator("inline",function(t,r,i,n){let s=t;return r.partials||(r.partials={},s=function(a,o){let u=i.partials;i.partials=m({},u,r.partials);let l=t(a,o);return i.partials=u,l}),r.partials[n.args[0]]=n.fn,s})}function xt(e){Ct(e)}let E={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){let t=he(E.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e,...t){if(e=E.lookupLevel(e),typeof console<"u"&&E.lookupLevel(E.level)<=e){let r=E.methodMap[e];console[r]||(r="log"),console[r](...t)}}};function Be(...e){return m(Object.create(null),...e)}const Y=Object.create(null);function It(e){let t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;let r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:Be(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:Be(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function Ot(e,t,r){return Me(typeof e=="function"?t.methods:t.properties,r)}function Me(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(Nt(t),!1)}function Nt(e){Y[e]!==!0&&(Y[e]=!0,E.log("error",`Handlebars: Access has been denied to resolve the property "${e}" because it is not an "own property" of its parent. You can add a runtime option to disable the check or this warning: See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function At(){Object.keys(Y).forEach(e=>{delete Y[e]})}const Dt="4.7.8",Q=8,ge=7,X={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"},ye="[object Object]";function Z(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},Lt(this),xt(this)}Z.prototype={constructor:Z,logger:E,log:E.log,registerHelper:function(e,t){if(F.call(e)===ye){if(t)throw new f("Arg not supported with multiple helpers");m(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(F.call(e)===ye)m(this.partials,e);else{if(typeof t>"u")throw new f(`Attempting to register a partial called "${e}" as undefined`);this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(F.call(e)===ye){if(t)throw new f("Arg not supported with multiple decorators");m(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses(){At()}};let Ht=E.log;var Bt=Object.freeze({__proto__:null,COMPILER_REVISION:Q,HandlebarsEnvironment:Z,LAST_COMPATIBLE_COMPILER_REVISION:ge,REVISION_CHANGES:X,VERSION:Dt,createFrame:N,log:Ht,logger:E});function ke(e){this.string=e}ke.prototype.toString=ke.prototype.toHTML=function(){return""+this.string};function Mt(e,t){return typeof e!="function"?e:function(){const i=arguments[arguments.length-1];return arguments[arguments.length-1]=t(i),e.apply(this,arguments)}}function Tt(e){const t=e&&e[0]||1,r=Q;if(!(t>=ge&&t<=Q))if(t<ge){const i=X[r],n=X[t];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+n+").")}else throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function Te(e,t){if(!t)throw new f("No environment passed to template");if(!e||!e.main)throw new f("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);const r=e.compiler&&e.compiler[0]===7;function i(a,o,u){u.hash&&(o=m({},o,u.hash),u.ids&&(u.ids[0]=!0)),a=t.VM.resolvePartial.call(this,a,o,u);let l=m({},u,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),h=t.VM.invokePartial.call(this,a,o,l);if(h==null&&t.compile&&(u.partials[u.name]=t.compile(a,e.compilerOptions,t),h=u.partials[u.name](o,l)),h!=null){if(u.indent){let c=h.split(` `);for(let p=0,S=c.length;p<S&&!(!c[p]&&p+1===S);p++)c[p]=u.indent+c[p];h=c.join(` `)}return h}else throw new f("The partial "+u.name+" could not be compiled when running in runtime-only mode")}let n={strict:function(a,o,u){if(!a||!(o in a))throw new f('"'+o+'" not defined in '+a,{loc:u});return n.lookupProperty(a,o)},lookupProperty:function(a,o){let u=a[o];if(u==null||Object.prototype.hasOwnProperty.call(a,o)||Ot(u,n.protoAccessControl,o))return u},lookup:function(a,o){const u=a.length;for(let l=0;l<u;l++)if((a[l]&&n.lookupProperty(a[l],o))!=null)return a[l][o]},lambda:function(a,o){return typeof a=="function"?a.call(o):a},escapeExpression:pe,invokePartial:i,fn:function(a){let o=e[a];return o.decorator=e[a+"_d"],o},programs:[],program:function(a,o,u,l,h){let c=this.programs[a],p=this.fn(a);return o||h||l||u?c=$(this,a,p,o,u,l,h):c||(c=this.programs[a]=$(this,a,p)),c},data:function(a,o){for(;a&&o--;)a=a._parent;return a},mergeIfNeeded:function(a,o){let u=a||o;return a&&o&&a!==o&&(u=m({},o,a)),u},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function s(a,o={}){let u=o.data;s._setup(o),!o.partial&&e.useData&&(u=Ft(a,u));let l,h=e.useBlockParams?[]:void 0;e.useDepths&&(o.depths?l=a!=o.depths[0]?[a].concat(o.depths):o.depths:l=[a]);function c(p){return""+e.main(n,p,n.helpers,n.partials,u,h,l)}return c=je(e.main,c,n,o.depths||[],u,h),c(a,o)}return s.isTop=!0,s._setup=function(a){if(a.partial)n.protoAccessControl=a.protoAccessControl,n.helpers=a.helpers,n.partials=a.partials,n.decorators=a.decorators,n.hooks=a.hooks;else{let o=m({},t.helpers,a.helpers);Ut(o,n),n.helpers=o,e.usePartial&&(n.partials=n.mergeIfNeeded(a.partials,t.partials)),(e.usePartial||e.useDecorators)&&(n.decorators=m({},t.decorators,a.decorators)),n.hooks={},n.protoAccessControl=It(a);let u=a.allowCallsToHelperMissing||r;He(n,"helperMissing",u),He(n,"blockHelperMissing",u)}},s._child=function(a,o,u,l){if(e.useBlockParams&&!u)throw new f("must pass block params");if(e.useDepths&&!l)throw new f("must pass parent depths");return $(n,a,e[a],o,0,u,l)},s}function $(e,t,r,i,n,s,a){function o(u,l={}){let h=a;return a&&u!=a[0]&&!(u===e.nullContext&&a[0]===null)&&(h=[u].concat(a)),r(e,u,e.helpers,e.partials,l.data||i,s&&[l.blockParams].concat(s),h)}return o=je(r,o,e,a,i,s),o.program=t,o.depth=a?a.length:0,o.blockParams=n||0,o}function Rt(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}function jt(e,t,r){const i=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);let n;if(r.fn&&r.fn!==Re){r.data=N(r.data);let s=r.fn;n=r.data["partial-block"]=function(o,u={}){return u.data=N(u.data),u.data["partial-block"]=i,s(o,u)},s.partials&&(r.partials=m({},r.partials,s.partials))}if(e===void 0&&n&&(e=n),e===void 0)throw new f("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function Re(){return""}function Ft(e,t){return(!t||!("root"in t))&&(t=t?N(t):{},t.root=e),t}function je(e,t,r,i,n,s){if(e.decorator){let a={};t=e.decorator(t,a,r,i&&i[0],n,s,i),m(t,a)}return t}function Ut(e,t){Object.keys(e).forEach(r=>{let i=e[r];e[r]=qt(i,t)})}function qt(e,t){const r=t.lookupProperty;return Mt(e,i=>m({lookupProperty:r},i))}var Vt=Object.freeze({__proto__:null,checkRevision:Tt,invokePartial:jt,noop:Re,resolvePartial:Rt,template:Te,wrapProgram:$});function Fe(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();const t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}}function Ue(){let e=new Z;return m(e,Bt),e.SafeString=ke,e.Exception=f,e.Utils=kt,e.escapeExpression=pe,e.VM=Vt,e.template=function(t){return Te(t,e)},e}let W=Ue();W.create=Ue,Fe(W),W.default=W;let H={helpers:{helperExpression:function(e){return e.type==="SubExpression"||(e.type==="MustacheStatement"||e.type==="BlockStatement")&&!!(e.params&&e.params.length||e.hash)},scopedId:function(e){return/^\.|this\b/.test(e.original)},simpleId:function(e){return e.parts.length===1&&!H.helpers.scopedId(e)&&!e.depth}}};var Se=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_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(n,s,a,o,u,l,h){var c=l.length-1;switch(u){case 1:return l[c-1];case 2:this.$=o.prepareProgram(l[c]);break;case 3:this.$=l[c];break;case 4:this.$=l[c];break;case 5:this.$=l[c];break;case 6:this.$=l[c];break;case 7:this.$=l[c];break;case 8:this.$=l[c];break;case 9:this.$={type:"CommentStatement",value:o.stripComment(l[c]),strip:o.stripFlags(l[c],l[c]),loc:o.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:l[c],value:l[c],loc:o.locInfo(this._$)};break;case 11:this.$=o.prepareRawBlock(l[c-2],l[c-1],l[c],this._$);break;case 12:this.$={path:l[c-3],params:l[c-2],hash:l[c-1]};break;case 13:this.$=o.prepareBlock(l[c-3],l[c-2],l[c-1],l[c],!1,this._$);break;case 14:this.$=o.prepareBlock(l[c-3],l[c-2],l[c-1],l[c],!0,this._$);break;case 15:this.$={open:l[c-5],path:l[c-4],params:l[c-3],hash:l[c-2],blockParams:l[c-1],strip:o.stripFlags(l[c-5],l[c])};break;case 16:this.$={path:l[c-4],params:l[c-3],hash:l[c-2],blockParams:l[c-1],strip:o.stripFlags(l[c-5],l[c])};break;case 17:this.$={path:l[c-4],params:l[c-3],hash:l[c-2],blockParams:l[c-1],strip:o.stripFlags(l[c-5],l[c])};break;case 18:this.$={strip:o.stripFlags(l[c-1],l[c-1]),program:l[c]};break;case 19:var p=o.prepareBlock(l[c-2],l[c-1],l[c],l[c],!1,this._$),S=o.prepareProgram([p],l[c-1].loc);S.chained=!0,this.$={strip:l[c-2].strip,program:S,chain:!0};break;case 20:this.$=l[c];break;case 21:this.$={path:l[c-1],strip:o.stripFlags(l[c-2],l[c])};break;case 22:this.$=o.prepareMustache(l[c-3],l[c-2],l[c-1],l[c-4],o.stripFlags(l[c-4],l[c]),this._$);break;case 23:this.$=o.prepareMustache(l[c-3],l[c-2],l[c-1],l[c-4],o.stripFlags(l[c-4],l[c]),this._$);break;case 24:this.$={type:"PartialStatement",name:l[c-3],params:l[c-2],hash:l[c-1],indent:"",strip:o.stripFlags(l[c-4],l[c]),loc:o.locInfo(this._$)};break;case 25:this.$=o.preparePartialBlock(l[c-2],l[c-1],l[c],this._$);break;case 26:this.$={path:l[c-3],params:l[c-2],hash:l[c-1],strip:o.stripFlags(l[c-4],l[c])};break;case 27:this.$=l[c];break;case 28:this.$=l[c];break;case 29:this.$={type:"SubExpression",path:l[c-3],params:l[c-2],hash:l[c-1],loc:o.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:l[c],loc:o.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:o.id(l[c-2]),value:l[c],loc:o.locInfo(this._$)};break;case 32:this.$=o.id(l[c-1]);break;case 33:this.$=l[c];break;case 34:this.$=l[c];break;case 35:this.$={type:"StringLiteral",value:l[c],original:l[c],loc:o.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(l[c]),original:Number(l[c]),loc:o.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:l[c]==="true",original:l[c]==="true",loc:o.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:o.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:o.locInfo(this._$)};break;case 40:this.$=l[c];break;case 41:this.$=l[c];break;case 42:this.$=o.preparePath(!0,l[c],this._$);break;case 43:this.$=o.preparePath(!1,l[c],this._$);break;case 44:l[c-2].push({part:o.id(l[c]),original:l[c],separator:l[c-1]}),this.$=l[c-2];break;case 45:this.$=[{part:o.id(l[c]),original:l[c]}];break;case 46:this.$=[];break;case 47:l[c-1].push(l[c]);break;case 48:this.$=[];break;case 49:l[c-1].push(l[c]);break;case 50:this.$=[];break;case 51:l[c-1].push(l[c]);break;case 58:this.$=[];break;case 59:l[c-1].push(l[c]);break;case 64:this.$=[];break;case 65:l[c-1].push(l[c]);break;case 70:this.$=[];break;case 71:l[c-1].push(l[c]);break;case 78:this.$=[];break;case 79:l[c-1].push(l[c]);break;case 82:this.$=[];break;case 83:l[c-1].push(l[c]);break;case 86:this.$=[];break;case 87:l[c-1].push(l[c]);break;case 90:this.$=[];break;case 91:l[c-1].push(l[c]);break;case 94:this.$=[];break;case 95:l[c-1].push(l[c]);break;case 98:this.$=[l[c]];break;case 99:l[c-1].push(l[c]);break;case 100:this.$=[l[c]];break;case 101:l[c-1].push(l[c]);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(n,s){throw new Error(n)},parse:function(n){var s=this,a=[0],o=[null],u=[],l=this.table,h="",c=0,p=0;this.lexer.setInput(n),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var S=this.lexer.yylloc;u.push(S);var ce=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function K(){var O;return O=s.lexer.lex()||1,typeof O!="number"&&(O=s.symbols_[O]||O),O}for(var g,v,y,R,x={},D,w,z,j;;){if(v=a[a.length-1],this.defaultActions[v]?y=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=K()),y=l[v]&&l[v][g]),typeof y>"u"||!y.length||!y[0]){var I="";{j=[];for(D in l[v])this.terminals_[D]&&D>2&&j.push("'"+this.terminals_[D]+"'");this.lexer.showPosition?I="Parse error on line "+(c+1)+`: `+this.lexer.showPosition()+` Expecting `+j.join(", ")+", got '"+(this.terminals_[g]||g)+"'":I="Parse error on line "+(c+1)+": Unexpected "+(g==1?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(I,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:S,expected:j})}}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(y[0]){case 1:a.push(g),o.push(this.lexer.yytext),u.push(this.lexer.yylloc),a.push(y[1]),g=null,p=this.lexer.yyleng,h=this.lexer.yytext,c=this.lexer.yylineno,S=this.lexer.yylloc;break;case 2:if(w=this.productions_[y[1]][1],x.$=o[o.length-w],x._$={first_line:u[u.length-(w||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(w||1)].first_column,last_column:u[u.length-1].last_column},ce&&(x._$.range=[u[u.length-(w||1)].range[0],u[u.length-1].range[1]]),R=this.performAction.call(x,h,p,c,this.yy,y[1],o,u),typeof R<"u")return R;w&&(a=a.slice(0,-1*w*2),o=o.slice(0,-1*w),u=u.slice(0,-1*w)),a.push(this.productions_[y[1]][0]),o.push(x.$),u.push(x._$),z=l[a[a.length-2]][a[a.length-1]],a.push(z);break;case 3:return!0}}return!0}},t=(function(){var i={EOF:1,parseError:function(s,a){if(this.yy.parser)this.yy.parser.parseError(s,a);else throw new Error(s)},setInput:function(n){return this._input=n,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var s=n.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var s=n.length,a=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var n=this.pastInput(),s=new Array(n.length+1).join("-");return n+this.upcomingInput()+` `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,s,a,o,u;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),h=0;h<l.length&&(a=this._input.match(this.rules[l[h]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,o=h,!this.options.flex)));h++);return s?(u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],n=this.performAction.call(this,this.yy,this,l[o],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var s=this.next();return typeof s<"u"?s:this.lex()},begin:function(s){this.conditionStack.push(s)},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(s){this.begin(s)}};return i.options={},i.performAction=function(s,a,o,u){function l(h,c){return a.yytext=a.yytext.substring(h,a.yyleng-c+h)}switch(o){case 0:if(a.yytext.slice(-2)==="\\\\"?(l(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(l(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(l(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;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;case 30:return this.popState(),33;case 31:return a.yytext=l(1,2).replace(/\\"/g,'"'),80;case 32:return a.yytext=l(1,2).replace(/\\'/g,"'"),80;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 a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},i.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\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],i.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}},i})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();function J(){this.parents=[]}J.prototype={constructor:J,mutating:!1,acceptKey:function(e,t){let r=this.accept(e[t]);if(this.mutating){if(r&&!J.prototype[r.type])throw new f('Unexpected node type "'+r.type+'" found when accepting '+t+" on "+e.type);e[t]=r}},acceptRequired:function(e,t){if(this.acceptKey(e,t),!e[t])throw new f(e.type+" requires "+t)},acceptArray:function(e){for(let t=0,r=e.length;t<r;t++)this.acceptKey(e,t),e[t]||(e.splice(t,1),t--,r--)},accept:function(e){if(!e)return;if(!this[e.type])throw new f("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;let t=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||t)return t;if(t!==!1)return e},Program:function(e){this.acceptArray(e.body)},MustacheStatement:ee,Decorator:ee,BlockStatement:qe,DecoratorBlock:qe,PartialStatement:Ve,PartialBlockStatement:function(e){Ve.call(this,e),this.acceptKey(e,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:ee,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(e){this.acceptArray(e.pairs)},HashPair:function(e){this.acceptRequired(e,"value")}};function ee(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function qe(e){ee.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function Ve(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function L(e={}){this.options=e}L.prototype=new J,L.prototype.Program=function(e){const t=!this.options.ignoreStandalone;let r=!this.isRootSeen;this.isRootSeen=!0;let i=e.body;for(let n=0,s=i.length;n<s;n++){let a=i[n],o=this.accept(a);if(!o)continue;let u=be(i,n,r),l=we(i,n,r),h=o.openStandalone&&u,c=o.closeStandalone&&l,p=o.inlineStandalone&&u&&l;o.close&&B(i,n,!0),o.open&&A(i,n,!0),t&&p&&(B(i,n),A(i,n)&&a.type==="PartialStatement"&&(a.indent=/([ \t]+$)/.exec(i[n-1].original)[1])),t&&h&&(B((a.program||a.inverse).body),A(i,n)),t&&c&&(B(i,n),A((a.inverse||a.program).body))}return e},L.prototype.BlockStatement=L.prototype.DecoratorBlock=L.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);let t=e.program||e.inverse,r=e.program&&e.inverse,i=r,n=r;if(r&&r.chained)for(i=r.body[0].program;n.chained;)n=n.body[n.body.length-1].program;let s={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:we(t.body),closeStandalone:be((i||t).body)};if(e.openStrip.close&&B(t.body,null,!0),r){let a=e.inverseStrip;a.open&&A(t.body,null,!0),a.close&&B(i.body,null,!0),e.closeStrip.open&&A(n.body,null,!0),!this.options.ignoreStandalone&&be(t.body)&&we(i.body)&&(A(t.body),B(i.body))}else e.closeStrip.open&&A(t.body,null,!0);return s},L.prototype.Decorator=L.prototype.MustacheStatement=function(e){return e.strip},L.prototype.PartialStatement=L.prototype.CommentStatement=function(e){let t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function be(e,t,r){t===void 0&&(t=e.length);let i=e[t-1],n=e[t-2];if(!i)return r;if(i.type==="ContentStatement")return(n||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(i.original)}function we(e,t,r){t===void 0&&(t=-1);let i=e[t+1],n=e[t+2];if(!i)return r;if(i.type==="ContentStatement")return(n||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(i.original)}function B(e,t,r){let i=e[t==null?0:t+1];if(!i||i.type!=="ContentStatement"||!r&&i.rightStripped)return;let n=i.value;i.value=i.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),i.rightStripped=i.value!==n}function A(e,t,r){let i=e[t==null?e.length-1:t-1];if(!i||i.type!=="ContentStatement"||!r&&i.leftStripped)return;let n=i.value;return i.value=i.value.replace(r?/\s+$/:/[ \t]+$/,""),i.leftStripped=i.value!==n,i.leftStripped}function Pe(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){let r={loc:e.path.loc};throw new f(e.path.original+" doesn't match "+t,r)}}function Kt(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function Wt(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function Jt(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function zt(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function Gt(e,t,r){r=this.locInfo(r);let i=e?"@":"",n=[],s=0;for(let a=0,o=t.length;a<o;a++){let u=t[a].part,l=t[a].original!==u;if(i+=(t[a].separator||"")+u,!l&&(u===".."||u==="."||u==="this")){if(n.length>0)throw new f("Invalid path: "+i,{loc:r});u===".."&&s++}else n.push(u)}return{type:"PathExpression",data:e,depth:s,parts:n,original:i,loc:r}}function Yt(e,t,r,i,n,s){let a=i.charAt(3)||i.charAt(2),o=a!=="{"&&a!=="&";return{type:/\*/.test(i)?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:o,strip:n,loc:this.locInfo(s)}}function Qt(e,t,r,i){Pe(e,r),i=this.locInfo(i);let n={type:"Program",body:t,strip:{},loc:i};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:n,openStrip:{},inverseStrip:{},closeStrip:{},loc:i}}function Xt(e,t,r,i,n,s){i&&i.path&&Pe(e,i);let a=/\*/.test(e.open);t.blockParams=e.blockParams;let o,u;if(r){if(a)throw new f("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=i.strip),u=r.strip,o=r.program}return n&&(n=o,o=t,t=n),{type:a?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:o,openStrip:e.strip,inverseStrip:u,closeStrip:i&&i.strip,loc:this.locInfo(s)}}function Zt(e,t){if(!t&&e.length){const r=e[0].loc,i=e[e.length-1].loc;r&&i&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:i.end.line,column:i.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}function $t(e,t,r,i){return Pe(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(i)}}var er=Object.freeze({__proto__:null,SourceLocation:Kt,id:Wt,prepareBlock:Xt,prepareMustache:Yt,preparePartialBlock:$t,preparePath:Gt,prepareProgram:Zt,prepareRawBlock:Qt,stripComment:zt,stripFlags:Jt});let te={};m(te,er);function Ke(e,t){return e.type==="Program"?e:(Se.yy=te,te.locInfo=function(i){return new te.SourceLocation(t&&t.srcName,i)},Se.parse(e))}function tr(e,t){let r=Ke(e,t);return new L(t).accept(r)}const rr=[].slice;function ve(){}ve.prototype={compiler:ve,equals:function(e){let t=this.opcodes.length;if(e.opcodes.length!==t)return!1;for(let r=0;r<t;r++){let i=this.opcodes[r],n=e.opcodes[r];if(i.opcode!==n.opcode||!We(i.args,n.args))return!1}t=this.children.length;for(let r=0;r<t;r++)if(!this.children[r].equals(e.children[r]))return!1;return!0},guid:0,compile:function(e,t){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=t,this.stringParams=t.stringParams,this.trackIds=t.trackIds,t.blockParams=t.blockParams||[],t.knownHelpers=m(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},t.knownHelpers),this.accept(e)},compileProgram:function(e){let t=new this.compiler,r=t.compile(e,this.options),i=this.guid++;return this.usePartial=this.usePartial||r.usePartial,this.children[i]=r,this.useDepths=this.useDepths||r.useDepths,i},accept:function(e){if(!this[e.type])throw new f("Unknown type: "+e.type,e);this.sourceNode.unshift(e);let t=this[e.type](e);return this.sourceNode.shift(),t},Program:function(e){this.options.blockParams.unshift(e.blockParams);let t=e.body,r=t.length;for(let i=0;i<r;i++)this.accept(t[i]);return this.options.blockParams.shift(),this.isSimple=r===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){Je(e);let t=e.program,r=e.inverse;t=t&&this.compileProgram(t),r=r&&this.compileProgram(r);let i=this.classifySexpr(e);i==="helper"?this.helperSexpr(e,t,r):i==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,t,r),this.opcode("pushProgram",t),this.opcode("pushProgram",r),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock(e){let t=e.program&&this.compileProgram(e.program),r=this.setupFullMustacheParams(e,t,void 0),i=e.path;this.useDecorators=!0,this.opcode("registerDecorator",r.length,i.original)},PartialStatement:function(e){this.usePartial=!0;let t=e.program;t&&(t=this.compileProgram(e.program));let r=e.params;if(r.length>1)throw new f("Unsupported number of partial arguments: "+r.length,e);r.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):r.push({type:"PathExpression",parts:[],depth:0}));let i=e.name.original,n=e.name.type==="SubExpression";n&&this.accept(e.name),this.setupFullMustacheParams(e,t,void 0,!0);let s=e.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",n,i,s),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Je(e);let t=this.classifySexpr(e);t==="simple"?this.simpleSexpr(e):t==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,t,r){let i=e.path,n=i.parts[0],s=t!=null||r!=null;this.opcode("getContext",i.depth),this.opcode("pushProgram",t),this.opcode("pushProgram",r),i.strict=!0,this.accept(i),this.opcode("invokeAmbiguous",n,s)},simpleSexpr:function(e){let t=e.path;t.strict=!0,this.accept(t),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,t,r){let i=this.setupFullMustacheParams(e,t,r),n=e.path,s=n.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",i.length,s);else{if(this.options.knownHelpersOnly)throw new f("You specified knownHelpersOnly, but used the unknown helper "+s,e);n.strict=!0,n.falsy=!0,this.accept(n),this.opcode("invokeHelper",i.length,n.original,H.helpers.simpleId(n))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);let t=e.parts[0],r=H.helpers.scopedId(e),i=!e.depth&&!r&&this.blockParamIndex(t);i?this.opcode("lookupBlockParam",i,e.parts):t?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,r):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushL