!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).liquidjs={})}(this,function(l){"use strict";var j=function(e,t){return(j=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}j(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var k=function(){return(k=Object.assign||function(e){for(var t,r=1,n=arguments.length;ra[0]&&t[1]=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0> ":" ",r=W(String(e),String(s).length),t="".concat(t).concat(r,"| "),r=e===n?"\n"+W("^",i+t.length):"";return t+o[e-1]+r}).join("\n")),enumerable:!1}),this.message=(e=this.message,(t=this.token).file&&(e+=", file:".concat(t.file)),t=d(t.getPosition(),2),r=t[0],t=t[1],e+=", line:".concat(r,", col:").concat(t)),this.stack=this.message+"\n"+this.context+"\n"+this.stack,this.originalError&&(this.stack+="\nFrom "+this.originalError.stack)};var X,ee=te;function te(e,t){var r=X.call(this,"string"==typeof e?e:e.message)||this;return r.context="","string"!=typeof e&&Object.defineProperty(r,"originalError",{value:e,enumerable:!1}),Object.defineProperty(r,"token",{value:t,enumerable:!1}),r}o(ie,re=ee);var re,ne=ie;function ie(e,t){e=re.call(this,e,t)||this;return e.name="TokenizationError",re.prototype.update.call(e),e}o(ae,oe=ee);var oe,se=ae;function ae(e,t){t=oe.call(this,e,t)||this;return t.name="ParseError",t.message=e.message,oe.prototype.update.call(t),t}o(le,ue=ee),le.is=function(e){return"RenderError"===e.name};var ue,ce=le;function le(e,t){t=ue.call(this,e,t.token)||this;return t.name="RenderError",t.message=e.message,ue.prototype.update.call(t),t}o(fe,pe=ee);var pe,he=fe;function fe(e,t){t=pe.call(this,e,t)||this;return t.name="UndefinedVariableError",t.message=e.message,pe.prototype.update.call(t),t}o(ve,de=Error);var de,ge=ve;function ve(e){var t=de.call(this,"undefined variable: ".concat(e))||this;return t.name="InternalUndefinedVariableError",t.variableName=e,t}o(be,ye=Error);var ye,me=be;function be(e){var t=ye.call(this,e)||this;return t.name="AssertionError",t.message=e+"",t}var h=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],we=1,Te=4,ke=16;function S(e,t){if(!e)throw t="function"==typeof t?t():t||"expect ".concat(e," to be true"),new me(t)}h[160]=h[5760]=h[6158]=h[8192]=h[8193]=h[8194]=h[8195]=h[8196]=h[8197]=h[8198]=h[8199]=h[8200]=h[8201]=h[8202]=h[8232]=h[8233]=h[8239]=h[8287]=h[12288]=Te;o(Oe,xe=i),Oe.prototype.equals=function(e){return c(y(e))},Oe.prototype.gt=function(){return!1},Oe.prototype.geq=function(){return!1},Oe.prototype.lt=function(){return!1},Oe.prototype.leq=function(){return!1},Oe.prototype.valueOf=function(){return null};var xe,r=Oe;function Oe(){return null!==xe&&xe.apply(this,arguments)||this}o(n,Se=i),n.prototype.equals=function(e){return!(e instanceof n||(s(e=y(e))||v(e)?0!==e.length:!Q(e)||0!==Object.keys(e).length))},n.prototype.gt=function(){return!1},n.prototype.geq=function(){return!1},n.prototype.lt=function(){return!1},n.prototype.leq=function(){return!1},n.prototype.valueOf=function(){return""};var Se,ze=n;function n(){return null!==Se&&Se.apply(this,arguments)||this}o(_e,Re=ze),_e.prototype.equals=function(e){return!1===e||!!c(y(e))||(s(e)?/^\s*$/.test(e):Re.prototype.equals.call(this,e))};var Re,p=_e;function _e(){return null!==Re&&Re.apply(this,arguments)||this}o(m,Fe=i),m.prototype.next=function(){this.i++},m.prototype.index0=function(){return this.i},m.prototype.index=function(){return this.i+1},m.prototype.first=function(){return 0===this.i},m.prototype.last=function(){return this.i===this.length-1},m.prototype.rindex=function(){return this.length-this.i},m.prototype.rindex0=function(){return this.length-this.i-1},m.prototype.valueOf=function(){return JSON.stringify(this)};var Fe,qe=m;function m(e,t,r){var n=Fe.call(this)||this;return n.i=0,n.length=e,n.name="".concat(r,"-").concat(t),n}o(De,Le=i),De.prototype.super=function(){return this.superBlockRender()};var Le,Ee=De;function De(e){void 0===e&&(e=function(){return""});var t=Le.call(this)||this;return t.superBlockRender=e,t}function b(e){return e&&u(e.equals)}var r=new r,Me={true:!0,false:!1,nil:r,null:r,empty:new ze,blank:new p};function Pe(e){var t,r,n={};try{for(var i=O(Object.entries(e)),o=i.next();!o.done;o=i.next()){for(var s=d(o.value,2),a=s[0],u=s[1],c=n,l=0;l":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},Tt={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0},kt=(o(xt,bt=e),xt.prototype.getPrecedence=function(){var e=this.getText();return e in wt?wt[e]:1},xt);function xt(e,t,r,n){var i=bt.call(this,l.TokenKind.Operator,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.operator=i.getText(),i}o(zt,Ot=e);var Ot,St=zt;function zt(e,t,r){r=Ot.call(this,l.TokenKind.PropertyAccess,e.input,e.begin,r,e.file)||this;return r.variable=e,r.props=t,r.propertyName=r.variable instanceof dt?r.variable.getText():Hr(r.variable.getText()),r}o(Ft,Rt=e);var Rt,_t=Ft;function Ft(e,t,r,n,i,o){r=Rt.call(this,l.TokenKind.Filter,r,n,i,o)||this;return r.name=e,r.args=t,r}o(Et,qt=e);var qt,Lt=Et;function Et(e,t,r,n,i,o){var s=qt.call(this,l.TokenKind.Hash,e,t,r,o)||this;return s.input=e,s.begin=t,s.end=r,s.name=n,s.value=i,s.file=o,s}o(Pt,Dt=e);var Dt,Mt=Pt;function Pt(e,t,r,n){var i=Dt.call(this,l.TokenKind.Quoted,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i}o(At,jt=e);var jt,Nt=At;function At(e,t,r,n,i,o){var s=jt.call(this,l.TokenKind.Range,e,t,r,o)||this;return s.input=e,s.begin=t,s.end=r,s.lhs=n,s.rhs=i,s.file=o,s}o(Ct,Vt=r);var Vt,It=Ct;function Ct(e,t,r,n,i){t=Vt.call(this,l.TokenKind.Tag,[t,r],e,t,r,!1,!1,i)||this;return t.tokenizer=new yr(e,n.operators,i,t.contentRange),t.name=t.tokenizer.readTagName(),t.tokenizer.assert(t.name,"illegal liquid tag syntax"),t.tokenizer.skipBlank(),t.args=t.tokenizer.remaining(),t}o(Kt,Bt=e);var Bt,Ht=Kt;function Kt(e,t,r,n,i,o){var s=Bt.call(this,l.TokenKind.FilteredValue,r,n,i,o)||this;return s.initial=e,s.filters=t,s.input=r,s.begin=n,s.end=i,s.file=o,s}Qt.prototype.write=function(e){this.buffer+=f(e)};var Ut=Qt;function Qt(){this.buffer=""}var $t=function(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")},Wt=(Yt.prototype.write=function(e){"string"!=typeof(e=y(e))&&""===this.buffer?this.buffer=e:this.buffer=f(this.buffer)+f(e)},Yt);function Yt(){this.buffer=""}Zt.prototype.renderTemplatesToNodeStream=function(e,t){var r=this,n=new $t;return Promise.resolve().then(function(){return w(r.renderTemplates(e,t,n))}).then(function(){return n.end()},function(e){return n.error(e)}),n.stream},Zt.prototype.renderTemplates=function(t,r,n){var i,o,s,a,u,c;return x(this,function(e){switch(e.label){case 0:n=n||new(r.opts.keepOutputType?Wt:Ut),e.label=1;case 1:e.trys.push([1,8,9,10]),i=O(t),o=i.next(),e.label=2;case 2:if(o.done)return[3,7];s=o.value,e.label=3;case 3:return e.trys.push([3,5,,6]),[4,s.render(r,n)];case 4:return(a=e.sent())&&n.write(a),n.break||n.continue?[3,7]:[3,6];case 5:throw a=e.sent(),ce.is(a)?a:new ce(a,s);case 6:return o=i.next(),[3,2];case 7:return[3,10];case 8:return u=e.sent(),u={error:u},[3,10];case 9:try{o&&!o.done&&(c=i.return)&&c.call(i)}finally{if(u)throw u.error}return[7];case 10:return[2,n.buffer]}})};var Jt=Zt;function Zt(){}Xt.prototype.evaluate=function(t,r){var n,i,o,s,a,u,c,l,p,h,f;return x(this,function(e){switch(e.label){case 0:S(t,"unable to evaluate: context not defined"),n=[],e.label=1;case 1:e.trys.push([1,11,12,13]),i=O(this.postfix),o=i.next(),e.label=2;case 2:return o.done?[3,10]:Ur(s=o.value)?(a=n.pop(),u=void 0,1!==Tt[s.operator]?[3,4]:[4,t.opts.operators[s.operator](a,t)]):[3,7];case 3:return u=e.sent(),[3,6];case 4:return p=n.pop(),[4,t.opts.operators[s.operator](p,a,t)];case 5:u=e.sent(),e.label=6;case 6:return n.push(u),[3,9];case 7:return l=(c=n).push,[4,_(s,t,r&&1===this.postfix.length)];case 8:l.apply(c,[e.sent()]),e.label=9;case 9:return o=i.next(),[3,2];case 10:return[3,13];case 11:return p=e.sent(),h={error:p},[3,13];case 12:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(h)throw h.error}return[7];case 13:return[2,n[0]]}})},Xt.prototype.valid=function(){return!!this.postfix.length};var Gt=Xt;function Xt(e){this.postfix=g([],d(function(t){var r,n,i,o,s,a;return x(this,function(e){switch(e.label){case 0:r=[],e.label=1;case 1:e.trys.push([1,10,11,12]),n=O(t),i=n.next(),e.label=2;case 2:if(i.done)return[3,9];if(!Ur(o=i.value))return[3,6];e.label=3;case 3:return r.length&&r[r.length-1].getPrecedence()>o.getPrecedence()?[4,r.pop()]:[3,5];case 4:return e.sent(),[3,3];case 5:return r.push(o),[3,8];case 6:return[4,o];case 7:e.sent(),e.label=8;case 8:return i=n.next(),[3,2];case 9:return[3,12];case 10:return s=e.sent(),s={error:s},[3,12];case 11:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 12:return r.length?[4,r.pop()]:[3,14];case 13:return e.sent(),[3,12];case 14:return[2]}})}(e)),!1)}function _(t,r,n){return void 0===n&&(n=!1),x(this,function(e){switch(e.label){case 0:return Gr(t)?[4,function(t,r,n){var i,o,s,a,u,c,l,p,h;return x(this,function(e){switch(e.label){case 0:i=[],e.label=1;case 1:e.trys.push([1,6,7,8]),o=O(t.props),s=o.next(),e.label=2;case 2:return s.done?[3,5]:(c=s.value,u=(a=i).push,[4,_(c,r,!1)]);case 3:u.apply(a,[e.sent()]),e.label=4;case 4:return s=o.next(),[3,2];case 5:return[3,8];case 6:return c=e.sent(),p={error:c},[3,8];case 7:try{s&&!s.done&&(h=o.return)&&h.call(o)}finally{if(p)throw p.error}return[7];case 8:return e.trys.push([8,10,,11]),[4,r._get(g([t.propertyName],d(i),!1))];case 9:return[2,e.sent()];case 10:if(l=e.sent(),n&&"InternalUndefinedVariableError"===l.name)return[2,null];throw new he(l,t);case 11:return[2]}})}(t,r,n)]:[3,2];case 1:return[2,e.sent()];case 2:return en(t)?[4,function(t,r){var n,i;return x(this,function(e){switch(e.label){case 0:return[4,_(t.lhs,r)];case 1:return n=e.sent(),[4,_(t.rhs,r)];case 2:return i=e.sent(),[2,$(+n,+i+1)]}})}(t,r)]:[3,4];case 3:return[2,e.sent()];case 4:return Jr(t)?[2,Me[t.literal]]:Zr(t)?[2,function(e){e=e.whole.content+"."+(e.decimal?e.decimal.content:"");return Number(e)}(t)]:Xr(t)?[2,t.getText()]:Yr(t)?[2,er(t)]:[2]}})}function er(e){return Hr(e.getText())}function tr(e,t){return!rr(e,t)}function rr(e,t){return t.opts.jsTruthy?!e:!1===e||null==e}ze={"==":nr,"!=":function(e,t){return!nr(e,t)},">":function(e,t){return b(e)?e.gt(t):b(t)?t.lt(e):y(e)>y(t)},"<":function(e,t){return b(e)?e.lt(t):b(t)?t.gt(e):y(e)=":function(e,t){return b(e)?e.geq(t):b(t)?t.leq(e):y(e)>=y(t)},"<=":function(e,t){return b(e)?e.leq(t):b(t)?t.geq(e):y(e)<=y(t)},contains:function(e,t){return e=y(e),t=y(t),!(!e||!u(e.indexOf))&&-1this.limit&&this.remove(this.tail.prev.key)},sr);function sr(e,t){void 0===t&&(t=0),this.limit=e,this.size=t,this.cache={},this.head=new ir("HEAD",null,null,null),this.tail=new ir("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}function ar(e,t){var r=document.createElement("base"),e=(r.href=e,document.getElementsByTagName("head")[0]),n=(e.insertBefore(r,e.firstChild),document.createElement("a")),t=(n.href=t,n.href);return e.removeChild(r),t}p=Object.freeze({__proto__:null,resolve:function(e,t,i){return e.length&&"/"!==U(e)&&(e+="/"),ar(e,t).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(e,t,r){var n=r.split("/").pop();return/\.\w+$/.test(n)?e:t+r+i})},readFile:function(n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,new Promise(function(e,t){var r=new XMLHttpRequest;r.onload=function(){200<=r.status&&r.status<300?e(r.responseText):t(new Error(r.statusText))},r.onerror=function(){t(new Error("An error occurred whilst receiving the response."))},r.open("GET",n),r.send()})]})})},readFileSync:function(e){var t=new XMLHttpRequest;if(t.open("GET",e,!1),t.send(),t.status<200||300<=t.status)throw new Error(t.statusText);return t.responseText},exists:function(e){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,!0]})})},existsSync:function(e){return!0},dirname:function(e){return ar(e,".")},sep:"/"});function ur(e,t){return void 0===t&&(t=0),JSON.stringify(e,null,t)}var r={raw:!0,handler:J},cr={"&":"&","<":"<",">":">",'"':""","'":"'"},lr={"&":"&","<":"<",">":">",""":'"',"'":"'"};function pr(e){return f(e).replace(/&|<|>|"|'/g,function(e){return cr[e]})}var hr=Object.freeze({__proto__:null,escape:pr,escape_once:function(e){return pr((e=f(e),f(e).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return lr[e]})))},newline_to_br:function(e){return f(e).replace(/\n/g,"
\n")},strip_html:function(e){return f(e).replace(/||<.*?>|/g,"")}}),fr={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:p,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:ze};function dr(e){var t;return e.hasOwnProperty("root")&&(e.hasOwnProperty("partials")||(e.partials=e.root),e.hasOwnProperty("layouts")||(e.layouts=e.root)),e.hasOwnProperty("cache")&&(t=void 0,t="number"==typeof e.cache?0t?e.slice(0,t-3)+"...":e));var t},F.prototype.readWord=function(){return this.readIdentifier()},F.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;!this.end()&&this.peekType()&we;)++this.p;return new dt(this.input,e,this.p,this.file)},F.prototype.readTagName=function(){return this.skipBlank(),"#"===this.input[this.p]?this.input.slice(this.p,++this.p):this.readIdentifier().getText()},F.prototype.readHashes=function(e){for(var t=[];;){var r=this.readHash(e);if(!r)return t;t.push(r)}},F.prototype.readHash=function(e){this.skipBlank(),","===this.peek()&&++this.p;var t,r=this.p,n=this.readIdentifier();if(n.size())return this.skipBlank(),e=e?"=":":",this.peek()===e&&(++this.p,t=this.readValue()),new Lt(this.input,r,this.p,n,t,this.file)},F.prototype.remaining=function(){return this.input.slice(this.p,this.N)},F.prototype.advance=function(e){this.p+=e=void 0===e?1:e},F.prototype.end=function(){return this.p>=this.N},F.prototype.readTo=function(e){for(;this.p=this.N?"":this.input[this.p+e]},F.prototype.skipBlank=function(){for(;this.peekType()&Te;)++this.p};var yr=F;function F(e,t,r,n){void 0===t&&(t=fr.operators),this.input=e,this.file=r,this.range=n,this.rawBeginAt=-1,this.p=n?n[0]:0,this.N=n?n[1]:e.length,this.opTrie=Pe(t)}br.prototype.on=function(e,t){return this.handlers[e]=t,this},br.prototype.trigger=function(e,t){e=this.handlers[e];return!!e&&(e.call(this,t),!0)},br.prototype.start=function(){var e,t;for(this.trigger("start");!this.stopRequested&&(e=this.tokens.shift());)this.trigger("token",e)||Wr(e)&&this.trigger("tag:".concat(e.name),e)||(t=this.parseToken(e,this.tokens),this.trigger("template",t));return this.stopRequested||this.trigger("end"),this},br.prototype.stop=function(){return this.stopRequested=!0,this};var mr=br;function br(e,t){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=t}function wr(e){this.token=e}o(kr,Tr=wr);var Tr,q=kr;function kr(e,t,r){var n=Tr.call(this,e)||this;return n.name=e.name,n.liquid=r,n.tokenizer=e.tokenizer,n}Or.prototype.render=function(t){var r,n,i,o,s,a,u,c,l;return x(this,function(e){switch(e.label){case 0:r={},e.label=1;case 1:e.trys.push([1,8,9,10]),n=O(Object.keys(this.hash)),i=n.next(),e.label=2;case 2:return i.done?[3,7]:(o=i.value,s=r,a=o,void 0!==this.hash[o]?[3,3]:(u=!0,[3,5]));case 3:return[4,_(this.hash[o],t)];case 4:u=e.sent(),e.label=5;case 5:s[a]=u,e.label=6;case 6:return i=n.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),c={error:c},[3,10];case 9:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(c)throw c.error}return[7];case 10:return[2,r]}})};var xr=Or;function Or(e,t){this.hash={};var r,n,e=new yr(e,{});try{for(var i=O(e.readHashes(t)),o=i.next();!o.done;o=i.next()){var s=o.value;this.hash[s.name.content]=s.value}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}zr.prototype.render=function(t,r){var n,i,o,s,a,u,c,l,p,h,f;return x(this,function(e){switch(e.label){case 0:n=[],e.label=1;case 1:e.trys.push([1,8,9,10]),i=O(this.args),o=i.next(),e.label=2;case 2:return o.done?[3,7]:v(s=o.value)?(u=(a=n).push,c=[s[0]],[4,_(s[1],r)]):[3,4];case 3:return u.apply(a,[c.concat([e.sent()])]),[3,6];case 4:return p=(l=n).push,[4,_(s,r)];case 5:p.apply(l,[e.sent()]),e.label=6;case 6:return o=i.next(),[3,2];case 7:return[3,10];case 8:return h=e.sent(),h={error:h},[3,10];case 9:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(h)throw h.error}return[7];case 10:return[2,this.handler.apply({context:r,liquid:this.liquid},g([t],d(n),!1))]}})};var Sr=zr;function zr(e,t,r,n){this.name=e,this.handler=u(t)?t:u(null==t?void 0:t.handler)?t.handler:J,this.raw=!u(t)&&!(null==t||!t.raw),this.args=r,this.liquid=n}Rr.prototype.value=function(t,r){var n,i,o,s,a;return x(this,function(e){switch(e.label){case 0:return r=r||t.opts.lenientIf&&0=t&&(n+=r),n}}),gn=k(k(k(k(k(k(k({},hr),M),nn),cn),ln),pn),{json:ur,raw:r,default:function(e,t){for(var r=[],n=2;n"),r.write(''))),r.write('')),[4,o.renderTemplates(this.templates,t,r)]):[3,6];case 4:e.sent(),r.write(""),e.label=5;case 5:return u++,s.next(),[3,3];case 6:return n.length&&r.write(""),t.pop(),[2]}})};var Xn,ei=ti;function ti(e,t,r){var n,i=Xn.call(this,e,t,r)||this,r=i.tokenizer.readIdentifier(),o=(i.tokenizer.skipBlank(),i.tokenizer.readIdentifier()),s=i.tokenizer.readValue();if("in"!==o.content||!s)throw new Error("illegal tag: ".concat(e.getText()));i.variable=r.content,i.collection=s,i.args=new xr(i.tokenizer.remaining()),i.templates=[];var a=i.liquid.parser.parseStream(t).on("start",function(){return n=i.templates}).on("tag:endtablerow",function(){return a.stop()}).on("template",function(e){return n.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return a.start(),i}o(ii,ri=q),ii.prototype.render=function(t,r){var n,i,o,s,a,u,c,l;return x(this,function(e){switch(e.label){case 0:n=this.liquid.renderer,e.label=1;case 1:e.trys.push([1,7,8,9]),i=O(this.branches),o=i.next(),e.label=2;case 2:return o.done?[3,6]:(a=o.value,u=a.value,s=a.test,a=a.templates,[4,u.value(t,t.opts.lenientIf)]);case 3:return(u=e.sent(),s(u,t))?[4,n.renderTemplates(a,t,r)]:[3,5];case 4:return e.sent(),[2];case 5:return o=i.next(),[3,2];case 6:return[3,9];case 7:return c=e.sent(),c={error:c},[3,9];case 8:try{o&&!o.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}return[7];case 9:return[4,n.renderTemplates(this.elseTemplates,t,r)];case 10:return e.sent(),[2]}})};var ri,ni=ii;function ii(e,t,r){var n,i=ri.call(this,e,t,r)||this;return i.branches=[],i.elseTemplates=[],i.liquid.parser.parseStream(t).on("start",function(){return i.branches.push({value:new L(e.args,i.liquid),test:rr,templates:n=[]})}).on("tag:elsif",function(e){return i.branches.push({value:new L(e.args,i.liquid),test:tr,templates:n=[]})}).on("tag:else",function(){return n=i.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",function(e){return n.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))}).start(),i}o(ai,oi=q),ai.prototype.render=function(e,t){t.break=!0};var oi,si=ai;function ai(){return null!==oi&&oi.apply(this,arguments)||this}o(li,ui=q),li.prototype.render=function(e,t){t.continue=!0};var ui,ci=li;function li(){return null!==ui&&ui.apply(this,arguments)||this}o(fi,pi=q),fi.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return this.value?[4,this.value.value(t,!1)]:[2];case 1:return n=e.sent(),r.write(n),[2]}})};var pi,hi=fi;function fi(e,t,r){e=pi.call(this,e,t,r)||this;return e.tokenizer.skipBlank(),e.tokenizer.end()||(e.value=new L(e.tokenizer.readFilteredValue(),e.liquid)),e}o(vi,di=q),vi.prototype.render=function(t,r){return x(this,function(e){switch(e.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,t,r)];case 1:return e.sent(),[2]}})};var di,gi=vi;function vi(e,t,r){e=di.call(this,e,t,r)||this,t=e.tokenizer.readLiquidTagTokens(e.liquid.options);return e.templates=e.liquid.parser.parseTokens(t),e}o(bi,yi=q),bi.prototype.render=function(){};var yi,mi=bi;function bi(e,t,r){t=yi.call(this,e,t,r)||this;if(-1!==e.args.search(/\n\s*[^#\s]/g))throw new Error("every line of an inline comment must start with a '#' character");return t}var wi={assign:on,for:sn,capture:an,case:un,comment:hr,include:nn,render:M,decrement:cn,increment:r,cycle:ln,if:pn,layout:Bn,block:Un,raw:Wn,tablerow:ei,unless:ni,break:si,continue:ci,echo:hi,liquid:gi,"#":mi},Ti=(P.prototype.parse=function(e,t){return this.parser.parse(e,t)},P.prototype._render=function(e,t,r){t=t instanceof rn?t:new rn(t,this.options,r);return this.renderer.renderTemplates(e,t)},P.prototype.render=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._render(t,r,k(k({},n),{sync:!1})))]})})},P.prototype.renderSync=function(e,t,r){return T(this._render(e,t,k(k({},r),{sync:!0})))},P.prototype.renderToNodeStream=function(e,t,r){t=new rn(t,this.options,r=void 0===r?{}:r);return this.renderer.renderTemplatesToNodeStream(e,t)},P.prototype._parseAndRender=function(e,t,r){e=this.parse(e);return this._render(e,t,r)},P.prototype.parseAndRender=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._parseAndRender(t,r,k(k({},n),{sync:!1})))]})})},P.prototype.parseAndRenderSync=function(e,t,r){return T(this._parseAndRender(e,t,k(k({},r),{sync:!0})))},P.prototype._parsePartialFile=function(e,t,r){return this.parser.parseFile(e,t,Er.Partials,r)},P.prototype._parseLayoutFile=function(e,t,r){return this.parser.parseFile(e,t,Er.Layouts,r)},P.prototype._parseFile=function(e,t,r,n){return this.parser.parseFile(e,t,r,n)},P.prototype.parseFile=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this.parser.parseFile(t,!1,r))]})})},P.prototype.parseFileSync=function(e,t){return T(this.parser.parseFile(e,!0,t))},P.prototype._renderFile=function(t,r,n){var i;return x(this,function(e){switch(e.label){case 0:return[4,this._parseFile(t,n.sync,n.lookupType)];case 1:return i=e.sent(),[4,this._render(i,r,n)];case 2:return[2,e.sent()]}})},P.prototype.renderFile=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._renderFile(t,r,k(k({},n),{sync:!1})))]})})},P.prototype.renderFileSync=function(e,t,r){return T(this._renderFile(e,t,k(k({},r),{sync:!0})))},P.prototype.renderFileToNodeStream=function(r,n,i){return a(this,void 0,void 0,function(){var t;return x(this,function(e){switch(e.label){case 0:return[4,this.parseFile(r)];case 1:return t=e.sent(),[2,this.renderToNodeStream(t,n,i)]}})})},P.prototype._evalValue=function(e,t){e=new L(e,this),t=t instanceof rn?t:new rn(t,this.options);return e.value(t)},P.prototype.evalValue=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._evalValue(t,r))]})})},P.prototype.evalValueSync=function(e,t){return T(this._evalValue(e,t))},P.prototype.registerFilter=function(e,t){this.filters[e]=t},P.prototype.registerTag=function(e,t){function r(e,t,r){r=n.call(this,e,t,r)||this;return u(i.parse)&&i.parse.call(r,e,t),r}var i,n;this.tags[e]=u(t)?t:(i=t,o(r,n=q),r.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return[4,new xr(this.token.args).render(t)];case 1:return n=e.sent(),[4,i.render.call(this,t,r,n)];case 2:return[2,e.sent()]}})},r)},P.prototype.plugin=function(e){return e.call(this,P)},P.prototype.express=function(){var o=this,s=!0;return function(e,t,r){var n,i;s&&(s=!1,i=gr(this.root),(n=o.options.root).unshift.apply(n,g([],d(i),!1)),(n=o.options.layouts).unshift.apply(n,g([],d(i),!1)),(n=o.options.partials).unshift.apply(n,g([],d(i),!1))),o.renderFile(e,t).then(function(e){return r(null,e)},r)}},P);function P(e){void 0===e&&(e={});var r=this;this.renderer=new Jt,this.filters={},this.tags={},this.options=dr(e),this.parser=new Nr(this),K(wi,function(e,t){return r.registerTag(t,e)}),K(gn,function(e,t){return r.registerFilter(t,e)})}l.AssertionError=me,l.AssignTag=on,l.BlockTag=Un,l.BreakTag=si,l.CaptureTag=an,l.CaseTag=un,l.CommentTag=hr,l.Context=rn,l.ContinueTag=ci,l.CycleTag=ln,l.DecrementTag=cn,l.Drop=i,l.EchoTag=hi,l.Expression=Gt,l.Filter=Sr,l.ForTag=sn,l.Hash=xr,l.IfTag=pn,l.IncludeTag=nn,l.IncrementTag=r,l.InlineCommentTag=mi,l.LayoutTag=Bn,l.Liquid=Ti,l.LiquidError=ee,l.LiquidTag=gi,l.Output=Fr,l.ParseError=se,l.ParseStream=mr,l.RawTag=Wn,l.RenderError=ce,l.RenderTag=M,l.TablerowTag=ei,l.Tag=q,l.TagToken=rt,l.TimezoneDate=Ge,l.Token=e,l.TokenizationError=ne,l.Tokenizer=yr,l.TypeGuards=p,l.UndefinedVariableError=he,l.UnlessTag=ni,l.Value=L,l.assert=S,l.createTrie=Pe,l.defaultOperators=ze,l.defaultOptions=fr,l.evalQuotedToken=er,l.evalToken=_,l.filters=gn,l.isFalsy=rr,l.isTruthy=tr,l.tags=wi,l.toPromise=w,l.toValue=y,l.toValueSync=T,l.version="10.8.2",Object.defineProperty(l,"__esModule",{value:!0})}); //# sourceMappingURL=liquid.browser.min.js.map