!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 P=function(e,t){return(P=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 s(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}P(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var T=function(){return(T=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,s=r.call(e),o=[];try{for(;(void 0===t||0> ":" ",r=W(String(e),String(o).length),t="".concat(t).concat(r,"| "),r=e===n?"\n"+W("^",i+t.length):"";return t+s[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)},re.is=function(e){return"LiquidError"===(null==e?void 0:e[ee])},re);function re(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}),Object.defineProperty(r,ee,{value:"LiquidError",enumerable:!1}),r}s(se,ne=te);var ne,ie=se;function se(e,t){e=ne.call(this,e,t)||this;return e.name="TokenizationError",ne.prototype.update.call(e),e}s(ue,oe=te);var oe,ae=ue;function ue(e,t){t=oe.call(this,e,t)||this;return t.name="ParseError",t.message=e.message,oe.prototype.update.call(t),t}s(he,ce=te),he.is=function(e){return"RenderError"===e.name};var ce,le=he;function he(e,t){t=ce.call(this,e,t.token)||this;return t.name="RenderError",t.message=e.message,ce.prototype.update.call(t),t}s(de,pe=te);var pe,fe=de;function de(e,t){t=pe.call(this,e,t)||this;return t.name="UndefinedVariableError",t.message=e.message,pe.prototype.update.call(t),t}s(ye,ve=Error);var ve,ge=ye;function ye(e){var t=ve.call(this,"undefined variable: ".concat(e))||this;return t.name="InternalUndefinedVariableError",t.variableName=e,t}s(we,me=Error);var me,be=we;function we(e){var t=me.call(this,e)||this;return t.name="AssertionError",t.message=e+"",t}var p=[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],ke=1,Te=4,xe=16;function Oe(e){e=e.charCodeAt(0);return 128<=e?!p[e]:p[e]&ke}function z(e,t){if(!e)throw t="function"==typeof t?t():t||"expect ".concat(e," to be true"),new be(t)}p[160]=p[5760]=p[6158]=p[8192]=p[8193]=p[8194]=p[8195]=p[8196]=p[8197]=p[8198]=p[8199]=p[8200]=p[8201]=p[8202]=p[8232]=p[8233]=p[8239]=p[8287]=p[12288]=Te,p[8220]=p[8221]=128;s(_e,ze=o),_e.prototype.equals=function(e){return h(y(e))},_e.prototype.gt=function(){return!1},_e.prototype.geq=function(){return!1},_e.prototype.lt=function(){return!1},_e.prototype.leq=function(){return!1},_e.prototype.valueOf=function(){return null};var ze,r=_e;function _e(){return null!==ze&&ze.apply(this,arguments)||this}s(n,Se=o),n.prototype.equals=function(e){return!(e instanceof n||(u(e=y(e))||g(e)?0!==e.length:!$(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,Re=n;function n(){return null!==Se&&Se.apply(this,arguments)||this}s(qe,Fe=Re),qe.prototype.equals=function(e){return!1===e||!!h(y(e))||(u(e)?/^\s*$/.test(e):Fe.prototype.equals.call(this,e))};var Fe,i=qe;function qe(){return null!==Fe&&Fe.apply(this,arguments)||this}s(m,Le=o),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 Le,Ee=m;function m(e,t,r){var n=Le.call(this)||this;return n.i=0,n.length=e,n.name="".concat(r,"-").concat(t),n}s(Me,De=o),Me.prototype.super=function(){return this.superBlockRender()};var De,je=Me;function Me(e){void 0===e&&(e=function(){return""});var t=De.call(this)||this;return t.superBlockRender=e,t}function b(e){return e&&c(e.equals)}var r=new r,Pe={true:!0,false:!1,nil:r,null:r,empty:new Re,blank:new i};function Ne(e){var t,r,n={};try{for(var i=O(Object.entries(e)),s=i.next();!s.done;s=i.next()){for(var o=d(s.value,2),a=o[0],u=o[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},xt=(s(Ot,wt=e),Ot.prototype.getPrecedence=function(){var e=this.getText();return e in kt?kt[e]:1},Ot);function Ot(e,t,r,n){var i=wt.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}s(St,zt=e);var zt,_t=St;function St(e,t,r,n,i,s){r=zt.call(this,l.TokenKind.PropertyAccess,r,n,i,s)||this;return r.variable=e,r.props=t,r}s(qt,Rt=e);var Rt,Ft=qt;function qt(e,t,r,n,i,s){r=Rt.call(this,l.TokenKind.Filter,r,n,i,s)||this;return r.name=e,r.args=t,r}s(Dt,Lt=e);var Lt,Et=Dt;function Dt(e,t,r,n,i,s){var o=Lt.call(this,l.TokenKind.Hash,e,t,r,s)||this;return o.input=e,o.begin=t,o.end=r,o.name=n,o.value=i,o.file=s,o}var jt=/[\da-fA-F]/,Mt=/[0-7]/,Pt={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v"};function Nt(e){e=e.charCodeAt(0);return 97<=e?e-87:65<=e?e-55:e-48}s(It,Vt=e);var Vt,At=It;function It(e,t,r,n){var i=Vt.call(this,l.TokenKind.Quoted,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=function(e){for(var t="",r=1;rs.getPrecedence()?[4,r.pop()]:[3,5];case 4:return e.sent(),[3,3];case 5:return r.push(s),[3,8];case 6:return[4,s];case 7:e.sent(),e.label=8;case 8:return i=n.next(),[3,2];case 9:return[3,12];case 10:return o=e.sent(),o={error:o},[3,12];case 11:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.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 R(t,r,n){return void 0===n&&(n=!1),x(this,function(e){switch(e.label){case 0:return t?"content"in t?[2,t.content]:Jr(t)?[4,function(t,r,n){var i,s,o,a,u,c,l,h,p,f;return x(this,function(e){switch(e.label){case 0:return i=[],[4,R(t.variable,r,n)];case 1:s=e.sent(),e.label=2;case 2:e.trys.push([2,7,8,9]),o=O(t.props),a=o.next(),e.label=3;case 3:return a.done?[3,6]:(l=a.value,c=(u=i).push,[4,R(l,r,!1)]);case 4:c.apply(u,[e.sent()]),e.label=5;case 5:return a=o.next(),[3,3];case 6:return[3,9];case 7:return l=e.sent(),p={error:l},[3,9];case 8:try{a&&!a.done&&(f=o.return)&&f.call(o)}finally{if(p)throw p.error}return[7];case 9:return(e.trys.push([9,14,,15]),t.variable)?[4,r._getFromScope(s,i)]:[3,11];case 10:return[2,e.sent()];case 11:return[4,r._get(i)];case 12:return[2,e.sent()];case 13:return[3,15];case 14:if(h=e.sent(),n&&"InternalUndefinedVariableError"===h.name)return[2,null];throw new fe(h,t);case 15:return[2]}})}(t,r,n)]:[3,2]:[2];case 1:return[2,e.sent()];case 2:return Zr(t)?[4,function(t,r){var n,i;return x(this,function(e){switch(e.label){case 0:return[4,R(t.lhs,r)];case 1:return n=e.sent(),[4,R(t.rhs,r)];case 2:return i=e.sent(),[2,Q(+n,+i+1)]}})}(t,r)]:[3,4];case 3:return[2,e.sent()];case 4:return[2]}})}function sr(e){return e.content}function or(e,t){return!ar(e,t)}function ar(e,t){return t.opts.jsTruthy?!e:!1===e||null==e}Re={"==":ur,"!=":function(e,t){return!ur(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||!c(e.indexOf))&&-1this.limit&&this.remove(this.tail.prev.key)},hr);function hr(e,t){void 0===t&&(t=0),this.limit=e,this.size=t,this.cache={},this.head=new cr("HEAD",null,null,null),this.tail=new cr("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}function pr(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}i=Object.freeze({__proto__:null,resolve:function(e,t,i){return e.length&&"/"!==U(e)&&(e+="/"),pr(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 pr(e,".")},sep:"/"});function fr(e,t){return void 0===t&&(t=0),JSON.stringify(e,null,t)}var r={raw:!0,handler:J},dr={"&":"&","<":"<",">":">",'"':""","'":"'"},vr={"&":"&","<":"<",">":">",""":'"',"'":"'"};function gr(e){return f(e).replace(/&|<|>|"|'/g,function(e){return dr[e]})}var yr=Object.freeze({__proto__:null,escape:gr,escape_once:function(e){return gr((e=f(e),f(e).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return vr[e]})))},newline_to_br:function(e){return f(e).replace(/\r?\n/gm,"
\n")},strip_html:function(e){return f(e).replace(/||<.*?>|/g,"")}}),mr={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:i,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:Re};function br(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()&&Oe(this.peek());)++this.p;return new vt(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 Et(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?0:p[this.input.charCodeAt(this.p+e)]},F.prototype.peek=function(e){return this.p+(e=void 0===e?0:e)>=this.N?"":this.input[this.p+e]},F.prototype.skipBlank=function(){for(;this.peekType()&Te;)++this.p};var Tr=F;function F(e,t,r,n){void 0===t&&(t=mr.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=Ne(t),this.literalTrie=Ne(Pe)}Or.prototype.on=function(e,t){return this.handlers[e]=t,this},Or.prototype.trigger=function(e,t){e=this.handlers[e];return!!e&&(e.call(this,t),!0)},Or.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},Or.prototype.stop=function(){return this.stopRequested=!0,this};var xr=Or;function Or(e,t){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=t}function zr(e){this.token=e}s(Sr,_r=zr);var _r,q=Sr;function Sr(e,t,r){var n=_r.call(this,e)||this;return n.name=e.name,n.liquid=r,n.tokenizer=e.tokenizer,n}Fr.prototype.render=function(t){var r,n,i,s,o,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]:(s=i.value,o=r,a=s,void 0!==this.hash[s]?[3,3]:(u=!0,[3,5]));case 3:return[4,R(this.hash[s],t)];case 4:u=e.sent(),e.label=5;case 5:o[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 Rr=Fr;function Fr(e,t){this.hash={};var r,n,e=new Tr(e,{});try{for(var i=O(e.readHashes(t)),s=i.next();!s.done;s=i.next()){var o=s.value;this.hash[o.name.content]=o.value}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}Lr.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,h,p,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),s=i.next(),e.label=2;case 2:return s.done?[3,7]:g(o=s.value)?(u=(a=n).push,c=[o[0]],[4,R(o[1],r)]):[3,4];case 3:return u.apply(a,[c.concat([e.sent()])]),[3,6];case 4:return h=(l=n).push,[4,R(o,r)];case 5:h.apply(l,[e.sent()]),e.label=6;case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return p=e.sent(),p={error:p},[3,10];case 9:try{s&&!s.done&&(f=i.return)&&f.call(i)}finally{if(p)throw p.error}return[7];case 10:return[4,this.handler.apply({context:r,liquid:this.liquid},v([t],d(n),!1))];case 11:return[2,e.sent()]}})};var qr=Lr;function Lr(e,t,r,n){this.name=e,this.handler=c(t)?t:c(null==t?void 0:t.handler)?t.handler:J,this.raw=!c(t)&&!(null==t||!t.raw),this.args=r,this.liquid=n}Er.prototype.value=function(t,r){var n,i,s,o,a;return x(this,function(e){switch(e.label){case 0:return r=r||t.opts.lenientIf&&0=t&&(n+=r),n}}),pn=T(T(T(T(T(T(T({},yr),j),en),on),an),un),{json:fr,raw:r,default:function(e,t){for(var r=[],n=2;n"),r.write(''))),r.write('')),[4,s.renderTemplates(this.templates,t,r)]):[3,6];case 4:e.sent(),r.write(""),e.label=5;case 5:return u++,o.next(),[3,3];case 6:return n.length&&r.write(""),t.pop(),[2]}})};var Jn,Zn=Gn;function Gn(e,t,r){var n,i=Jn.call(this,e,t,r)||this,r=i.tokenizer.readIdentifier(),s=(i.tokenizer.skipBlank(),i.tokenizer.readIdentifier()),o=i.tokenizer.readValue();if("in"!==s.content||!o)throw new Error("illegal tag: ".concat(e.getText()));i.variable=r.content,i.collection=o,i.args=new Rr(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}s(ti,Xn=q),ti.prototype.render=function(t,r){var n,i,s,o,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),s=i.next(),e.label=2;case 2:return s.done?[3,6]:(a=s.value,u=a.value,o=a.test,a=a.templates,[4,u.value(t,t.opts.lenientIf)]);case 3:return(u=e.sent(),o(u,t))?[4,n.renderTemplates(a,t,r)]:[3,5];case 4:return e.sent(),[2];case 5:return s=i.next(),[3,2];case 6:return[3,9];case 7:return c=e.sent(),c={error:c},[3,9];case 8:try{s&&!s.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 Xn,ei=ti;function ti(e,t,r){var n,i=Xn.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:ar,templates:n=[]})}).on("tag:elsif",function(e){return i.branches.push({value:new L(e.args,i.liquid),test:or,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}s(ii,ri=q),ii.prototype.render=function(e,t){t.break=!0};var ri,ni=ii;function ii(){return null!==ri&&ri.apply(this,arguments)||this}s(ai,si=q),ai.prototype.render=function(e,t){t.continue=!0};var si,oi=ai;function ai(){return null!==si&&si.apply(this,arguments)||this}s(li,ui=q),li.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 ui,ci=li;function li(e,t,r){e=ui.call(this,e,t,r)||this;return e.tokenizer.skipBlank(),e.tokenizer.end()||(e.value=new L(e.tokenizer.readFilteredValue(),e.liquid)),e}s(fi,hi=q),fi.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 hi,pi=fi;function fi(e,t,r){e=hi.call(this,e,t,r)||this,t=e.tokenizer.readLiquidTagTokens(e.liquid.options);return e.templates=e.liquid.parser.parseTokens(t),e}s(gi,di=q),gi.prototype.render=function(){};var di,vi=gi;function gi(e,t,r){t=di.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 yi={assign:tn,for:rn,capture:nn,case:sn,comment:yr,include:en,render:j,decrement:on,increment:r,cycle:an,if:un,layout:An,block:Cn,raw:Un,tablerow:Zn,unless:ei,break:ni,continue:oi,echo:ci,liquid:pi,"#":vi},mi=(M.prototype.parse=function(e,t){return this.parser.parse(e,t)},M.prototype._render=function(e,t,r){t=t instanceof Xr?t:new Xr(t,this.options,r);return this.renderer.renderTemplates(e,t)},M.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,T(T({},n),{sync:!1})))]})})},M.prototype.renderSync=function(e,t,r){return k(this._render(e,t,T(T({},r),{sync:!0})))},M.prototype.renderToNodeStream=function(e,t,r){t=new Xr(t,this.options,r=void 0===r?{}:r);return this.renderer.renderTemplatesToNodeStream(e,t)},M.prototype._parseAndRender=function(e,t,r){e=this.parse(e);return this._render(e,t,r)},M.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,T(T({},n),{sync:!1})))]})})},M.prototype.parseAndRenderSync=function(e,t,r){return k(this._parseAndRender(e,t,T(T({},r),{sync:!0})))},M.prototype._parsePartialFile=function(e,t,r){return this.parser.parseFile(e,t,Nr.Partials,r)},M.prototype._parseLayoutFile=function(e,t,r){return this.parser.parseFile(e,t,Nr.Layouts,r)},M.prototype._parseFile=function(e,t,r,n){return this.parser.parseFile(e,t,r,n)},M.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))]})})},M.prototype.parseFileSync=function(e,t){return k(this.parser.parseFile(e,!0,t))},M.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()]}})},M.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,T(T({},n),{sync:!1})))]})})},M.prototype.renderFileSync=function(e,t,r){return k(this._renderFile(e,t,T(T({},r),{sync:!0})))},M.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)]}})})},M.prototype._evalValue=function(e,t){e=new L(e,this),t=t instanceof Xr?t:new Xr(t,this.options);return e.value(t)},M.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))]})})},M.prototype.evalValueSync=function(e,t){return k(this._evalValue(e,t))},M.prototype.registerFilter=function(e,t){this.filters[e]=t},M.prototype.registerTag=function(e,t){function r(e,t,r){r=n.call(this,e,t,r)||this;return c(i.parse)&&i.parse.call(r,e,t),r}var i,n;this.tags[e]=c(t)?t:(i=t,s(r,n=q),r.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return[4,new Rr(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)},M.prototype.plugin=function(e){return e.call(this,M)},M.prototype.express=function(){var s=this,o=!0;return function(e,t,r){var n,i;o&&(o=!1,i=wr(this.root),(n=s.options.root).unshift.apply(n,v([],d(i),!1)),(n=s.options.layouts).unshift.apply(n,v([],d(i),!1)),(n=s.options.partials).unshift.apply(n,v([],d(i),!1))),s.renderFile(e,t).then(function(e){return r(null,e)},r)}},M);function M(e){void 0===e&&(e={});var r=this;this.renderer=new tr,this.filters={},this.tags={},this.options=br(e),this.parser=new Cr(this),K(yi,function(e,t){return r.registerTag(t,e)}),K(pn,function(e,t){return r.registerFilter(t,e)})}l.AssertionError=be,l.AssignTag=tn,l.BlockTag=Cn,l.BreakTag=ni,l.CaptureTag=nn,l.CaseTag=sn,l.CommentTag=yr,l.Context=Xr,l.ContinueTag=oi,l.CycleTag=an,l.DecrementTag=on,l.Drop=o,l.EchoTag=ci,l.Expression=nr,l.Filter=qr,l.ForTag=rn,l.Hash=Rr,l.IfTag=un,l.IncludeTag=en,l.IncrementTag=r,l.InlineCommentTag=vi,l.LayoutTag=An,l.Liquid=mi,l.LiquidError=te,l.LiquidTag=pi,l.Output=jr,l.ParseError=ae,l.ParseStream=xr,l.RawTag=Un,l.RenderError=le,l.RenderTag=j,l.TablerowTag=Zn,l.Tag=q,l.TagToken=nt,l.TimezoneDate=Xe,l.Token=e,l.TokenizationError=ie,l.Tokenizer=Tr,l.TypeGuards=i,l.UndefinedVariableError=fe,l.UnlessTag=ei,l.Value=L,l.assert=z,l.createTrie=Ne,l.defaultOperators=Re,l.defaultOptions=mr,l.evalQuotedToken=sr,l.evalToken=R,l.filters=pn,l.isFalsy=ar,l.isTruthy=or,l.tags=yi,l.toPromise=w,l.toValue=y,l.toValueSync=k,l.version="10.9.4",Object.defineProperty(l,"__esModule",{value:!0})}); //# sourceMappingURL=liquid.browser.min.js.map