Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

liquidjs

Package Overview
Dependencies
Maintainers
1
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquidjs - npm Package Compare versions

Comparing version 9.24.1 to 9.24.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [9.24.2](https://github.com/harttle/liquidjs/compare/v9.24.1...v9.24.2) (2021-05-04)
### Bug Fixes
* operator boundary not correctly recognized, fixes [#342](https://github.com/harttle/liquidjs/issues/342) ([3e3d84a](https://github.com/harttle/liquidjs/commit/3e3d84a))
## [9.24.1](https://github.com/harttle/liquidjs/compare/v9.24.0...v9.24.1) (2021-05-01)

@@ -2,0 +9,0 @@

2

dist/liquid.browser.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).liquidjs={})}(this,function(p){"use strict";var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function t(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var m=function(){return(m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(s,o,a,u){return new(a=a||Promise)(function(t,e){function r(t){try{i(u.next(t))}catch(t){e(t)}}function n(t){try{i(u.throw(t))}catch(t){e(t)}}function i(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(r,n)}i((u=u.apply(s,o||[])).next())})}function S(r,n){var i,s,o,t,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,s&&(o=2&e[0]?s.return:e[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,e[1])).done)return o;switch(s=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,s=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(o=0<(o=a.trys).length&&o[o.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(r,a)}catch(t){e=[6,t],s=0}finally{i=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function q(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function w(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(n=s.next()).done;)o.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}var i=(e.prototype.valueOf=function(){},e.prototype.liquidMethodMissing=function(t){},e);function e(){}var r=Object.prototype.toString,o=String.prototype.toLowerCase;function a(t){return"[object String]"===r.call(t)}function u(t){return"function"==typeof t}function c(t){return h(t=f(t))?"":String(t)}function f(t){return t instanceof i?t.valueOf():t}function l(t){return"number"==typeof t}function h(t){return null==t}function d(t){return"[object Array]"===r.call(t)}function v(t,e){for(var r in t=t||{})if(t.hasOwnProperty(r)&&!1===e(t[r],r,t))break;return t}function g(t){return t[t.length-1]}function y(t){var e=typeof t;return null!==t&&("object"==e||"function"==e)}function b(t,e,r){void 0===r&&(r=1);for(var n=[],i=t;i<e;i+=r)n.push(i);return n}function k(t,e,r){return void 0===r&&(r=" "),x(t,e,r,function(t,e){return e+t})}function x(t,e,r,n){for(var i=e-(t=String(t)).length;0<i--;)t=n(t,r);return t}function O(t){return t}function E(t){return t.replace(/(\w?)([A-Z])/g,function(t,e,r){return(e?e+"_":"")+r.toLowerCase()})}function R(t,e){return null==t&&null==e?0:null==t?1:null==e?-1:(t=o.call(t))<(e=o.call(e))?-1:e<t?1:0}var L=function(t,e,r,n){this.key=t,this.value=e,this.next=r,this.prev=n},F=(M.prototype.write=function(t,e){if(this.cache[t])this.cache[t].value=e;else{var r=new L(t,e,this.head.next,this.head);this.head.next.prev=r,this.head.next=r,this.cache[t]=r,this.size++,this.ensureLimit()}},M.prototype.read=function(t){if(this.cache[t]){var e=this.cache[t].value;return this.remove(t),this.write(t,e),e}},M.prototype.remove=function(t){var e=this.cache[t];e.prev.next=e.next,e.next.prev=e.prev,delete this.cache[t],this.size--},M.prototype.clear=function(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}},M.prototype.ensureLimit=function(){this.size>this.limit&&this.remove(this.tail.prev.key)},M);function M(t,e){void 0===e&&(e=0),this.limit=t,this.size=e,this.cache={},this.head=new L("HEAD",null,null,null),this.tail=new L("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}function D(t){return t&&u(t.equals)}function N(t,e){return!P(t,e)}function P(t,e){return e.opts.jsTruthy?!t:!1===t||null==t}var A={"==":function(t,e){return D(t)?t.equals(e):D(e)?e.equals(t):t===e},"!=":function(t,e){return D(t)?!t.equals(e):D(e)?!e.equals(t):t!==e},">":function(t,e){return D(t)?t.gt(e):D(e)?e.lt(t):e<t},"<":function(t,e){return D(t)?t.lt(e):D(e)?e.gt(t):t<e},">=":function(t,e){return D(t)?t.geq(e):D(e)?e.leq(t):e<=t},"<=":function(t,e){return D(t)?t.leq(e):D(e)?e.geq(t):t<=e},contains:function(t,e){return!(!t||!u(t.indexOf))&&-1<t.indexOf(e)},and:function(t,e,r){return N(t,r)&&N(e,r)},or:function(t,e,r){return N(t,r)||N(e,r)}};function I(t){var e,r,n={};try{for(var i=q(Object.entries(t)),s=i.next();!s.done;s=i.next()){for(var o=w(s.value,2),a=o[0],u=o[1],c=n,l=0;l<a.length;l++){var h=a[l];c[h]=c[h]||{},l===a.length-1&&"="!==h&&(c[h].needBoundary=!0),c=c[h]}c.handler=u,c.end=!0}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}var V={root:["."],cache:void 0,extname:"",fs:Object.freeze({resolve:function(t,e,i){return t.length&&"/"!==g(t)&&(t+="/"),function(t,e){var r=document.createElement("base");r.href=t;var n=document.getElementsByTagName("head")[0];n.insertBefore(r,n.firstChild);var i=document.createElement("a");i.href=e;var s=i.href;return n.removeChild(r),s}(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(t,e,r){var n=r.split("/").pop();return/\.\w+$/.test(n)?t:e+r+i})},readFile:function(n){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,new Promise(function(t,e){var r=new XMLHttpRequest;r.onload=function(){200<=r.status&&r.status<300?t(r.responseText):e(new Error(r.statusText))},r.onerror=function(){e(new Error("An error occurred whilst receiving the response."))},r.open("GET",n),r.send()})]})})},readFileSync:function(t){var e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(),e.status<200||300<=e.status)throw new Error(e.statusText);return e.responseText},exists:function(t){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,!0]})})},existsSync:function(t){return!0}}),dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,lenientIf:!1,globals:{},keepOutputType:!1,operators:A,operatorsTrie:I(A)};function _(t){if((t=t||{}).hasOwnProperty("root")&&(t.root=j(t.root)),t.hasOwnProperty("cache")){var e=void 0;e="number"==typeof t.cache?0<t.cache?new F(t.cache):void 0:"object"==typeof t.cache?t.cache:t.cache?new F(1024):void 0,t.cache=e}return t.hasOwnProperty("operators")&&(t.operatorsTrie=I(t.operators)),t}function j(t){return d(t)?t:a(t)?[t]:[]}var B,z=(t(C,B=Error),C.prototype.update=function(){var t=this.originalError;this.context=function(t){var e=w(t.getPosition(),1)[0],r=t.input.split("\n"),n=Math.max(e-2,1),i=Math.min(e+3,r.length);return b(n,i+1).map(function(t){return(t===e?">> ":" ")+k(String(t),String(i).length)+"| "+r[t-1]}).join("\n")}(this.token),this.message=function(t,e){e.file&&(t+=", file:"+e.file);var r=w(e.getPosition(),2),n=r[0],i=r[1];return t+=", line:"+n+", col:"+i}(t.message,this.token),this.stack=this.message+"\n"+this.context+"\n"+this.stack+"\nFrom "+t.stack},C);function C(t,e){var r=B.call(this,t.message)||this;return r.originalError=t,r.token=e,r.context="",r}var H,K=(t(U,H=z),U);function U(t,e){var r=H.call(this,new Error(t),e)||this;return r.name="TokenizationError",H.prototype.update.call(r),r}var Q,W=(t(J,Q=z),J);function J(t,e){var r=Q.call(this,t,e)||this;return r.name="ParseError",r.message=t.message,Q.prototype.update.call(r),r}var Y,Z=(t($,Y=z),$.is=function(t){return"RenderError"===t.name},$);function $(t,e){var r=Y.call(this,t,e.token)||this;return r.name="RenderError",r.message=t.message,Y.prototype.update.call(r),r}var G,X=(t(tt,G=z),tt);function tt(t,e){var r=G.call(this,t,e)||this;return r.name="UndefinedVariableError",r.message=t.message,G.prototype.update.call(r),r}var et,rt=(t(nt,et=Error),nt);function nt(t){var e=et.call(this,"undefined variable: "+t)||this;return e.name="InternalUndefinedVariableError",e.variableName=t,e}var it,st=(t(ot,it=Error),ot);function ot(t){var e=it.call(this,t)||this;return e.name="AssertionError",e.message=t+"",e}var at,ut=(ct.prototype.getRegister=function(t,e){return void 0===e&&(e={}),this.registers[t]=this.registers[t]||e},ct.prototype.setRegister=function(t,e){return this.registers[t]=e},ct.prototype.saveRegister=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.map(function(t){return[t,e.getRegister(t)]})},ct.prototype.restoreRegister=function(t){var i=this;return t.forEach(function(t){var e=w(t,2),r=e[0],n=e[1];return i.setRegister(r,n)})},ct.prototype.getAll=function(){return T([this.globals,this.environments],this.scopes).reduce(function(t,e){return m(t,e)},{})},ct.prototype.get=function(t){var e=this.findScope(t[0]);return this.getFromScope(e,t)},ct.prototype.getFromScope=function(t,e){var r=this;return"string"==typeof e&&(e=e.split(".")),e.reduce(function(t,e){if(h(t=function(t,e){return h(t)?t:u((t=function t(e){return e&&u(e.toLiquid)?t(e.toLiquid()):e}(t))[e])?t[e]():t instanceof i?t.hasOwnProperty(e)?t[e]:t.liquidMethodMissing(e):"size"===e?function(t){return d(t)||a(t)?t.length:t.size}(t):"first"===e?function(t){return d(t)?t[0]:t.first}(t):"last"===e?function(t){return d(t)?t[t.length-1]:t.last}(t):t[e]}(t,e))&&r.opts.strictVariables)throw new rt(e);return t},t)},ct.prototype.push=function(t){return this.scopes.push(t)},ct.prototype.pop=function(){return this.scopes.pop()},ct.prototype.bottom=function(){return this.scopes[0]},ct.prototype.findScope=function(t){for(var e=this.scopes.length-1;0<=e;e--){var r=this.scopes[e];if(t in r)return r}return t in this.environments?this.environments:this.globals},ct);function ct(t,e,r){void 0===t&&(t={}),void 0===e&&(e=V),void 0===r&&(r=!1),this.scopes=[{}],this.registers={},this.sync=r,this.opts=e,this.globals=e.globals,this.environments=t}function lt(t){return!!(bt(t)&p.TokenKind.Delimited)}function ht(t){return bt(t)===p.TokenKind.Operator}function pt(t){return bt(t)===p.TokenKind.HTML}function ft(t){return bt(t)===p.TokenKind.Output}function dt(t){return bt(t)===p.TokenKind.Tag}function vt(t){return bt(t)===p.TokenKind.Quoted}function gt(t){return bt(t)===p.TokenKind.Literal}function yt(t){return bt(t)===p.TokenKind.Number}function mt(t){return bt(t)===p.TokenKind.PropertyAccess}function wt(t){return bt(t)===p.TokenKind.Word}function Tt(t){return bt(t)===p.TokenKind.Range}function bt(t){return t?t.kind:-1}(at=p.TokenKind||(p.TokenKind={}))[at.Number=1]="Number",at[at.Literal=2]="Literal",at[at.Tag=4]="Tag",at[at.Output=8]="Output",at[at.HTML=16]="HTML",at[at.Filter=32]="Filter",at[at.Hash=64]="Hash",at[at.PropertyAccess=128]="PropertyAccess",at[at.Word=256]="Word",at[at.Range=512]="Range",at[at.Quoted=1024]="Quoted",at[at.Operator=2048]="Operator",at[at.Delimited=12]="Delimited";var kt=Object.freeze({isDelimitedToken:lt,isOperatorToken:ht,isHTMLToken:pt,isOutputToken:ft,isTagToken:dt,isQuotedToken:vt,isLiteralToken:gt,isNumberToken:yt,isPropertyAccessToken:mt,isWordToken:wt,isRangeToken:Tt}),xt=[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],Ot=4,St=16;function qt(t,e){if(t&&pt(t))for(var r=e?Ot:St;xt[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Et(t,e){if(t&&pt(t)){for(var r=e?Ot:St;xt[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;"\n"===t.input.charAt(t.begin+t.trimLeft)&&t.trimLeft++}}xt[160]=xt[5760]=xt[6158]=xt[8192]=xt[8193]=xt[8194]=xt[8195]=xt[8196]=xt[8197]=xt[8198]=xt[8199]=xt[8200]=xt[8201]=xt[8202]=xt[8232]=xt[8233]=xt[8239]=xt[8287]=xt[12288]=Ot;var Rt=(Lt.prototype.getText=function(){return this.input.slice(this.begin,this.end)},Lt.prototype.getPosition=function(){for(var t=w([1,1],2),e=t[0],r=t[1],n=0;n<this.begin;n++)"\n"===this.input[n]?(e++,r=1):r++;return[e,r]},Lt.prototype.size=function(){return this.end-this.begin},Lt);function Lt(t,e,r,n,i){this.kind=t,this.input=e,this.begin=r,this.end=n,this.file=i}var Ft,Mt=(t(Dt,Ft=Rt),Dt);function Dt(t,e){var r=Ft.call(this,p.TokenKind.Number,t.input,t.begin,e?e.end:t.end,t.file)||this;return r.whole=t,r.decimal=e,r}var Nt,Pt=(t(At,Nt=Rt),At.prototype.isNumber=function(t){void 0===t&&(t=!1);for(var e=t&&64&xt[this.input.charCodeAt(this.begin)]?this.begin+1:this.begin;e<this.end;e++)if(!(32&xt[this.input.charCodeAt(e)]))return!1;return!0},At);function At(t,e,r,n){var i=Nt.call(this,p.TokenKind.Word,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.content=i.getText(),i}var It,Vt=(t(_t,It=i),_t.prototype.equals=function(t){return h(f(t))},_t.prototype.gt=function(){return!1},_t.prototype.geq=function(){return!1},_t.prototype.lt=function(){return!1},_t.prototype.leq=function(){return!1},_t.prototype.valueOf=function(){return null},_t);function _t(){return null!==It&&It.apply(this,arguments)||this}var jt,Bt=(t(zt,jt=i),zt.prototype.equals=function(t){return!(t instanceof zt||(a(t=f(t))||d(t)?0!==t.length:!y(t)||0!==Object.keys(t).length))},zt.prototype.gt=function(){return!1},zt.prototype.geq=function(){return!1},zt.prototype.lt=function(){return!1},zt.prototype.leq=function(){return!1},zt.prototype.valueOf=function(){return""},zt);function zt(){return null!==jt&&jt.apply(this,arguments)||this}var Ct,Ht=(t(Kt,Ct=Bt),Kt.prototype.equals=function(t){return!1===t||!!h(f(t))||(a(t)?/^\s*$/.test(t):Ct.prototype.equals.call(this,t))},Kt);function Kt(){return null!==Ct&&Ct.apply(this,arguments)||this}var Ut,Qt=new Vt,Wt={true:!0,false:!1,nil:Qt,null:Qt,empty:new Bt,blank:new Ht},Jt=(t(Yt,Ut=Rt),Yt);function Yt(t,e,r,n){var i=Ut.call(this,p.TokenKind.Literal,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.literal=i.getText(),i}var Zt,$t={"==":1,"!=":1,">":1,"<":1,">=":1,"<=":1,contains:1,and:0,or:0},Gt=(t(Xt,Zt=Rt),Xt.prototype.getPrecedence=function(){var t=this.getText();return t in $t?$t[t]:1},Xt);function Xt(t,e,r,n){var i=Zt.call(this,p.TokenKind.Operator,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.operator=i.getText(),i}var te=/[\da-fA-F]/,ee=/[0-7]/,re={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v"};function ne(t){var e=t.charCodeAt(0);return 97<=e?e-87:65<=e?e-55:e-48}function ie(t){for(var e="",r=1;r<t.length-1;r++)if("\\"===t[r])if(void 0!==re[t[r+1]])e+=re[t[++r]];else if("u"===t[r+1]){for(var n=0,i=r+2;i<=r+5&&te.test(t[i]);)n=16*n+ne(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(ee.test(t[r+1])){for(i=r+1,n=0;i<=r+3&&ee.test(t[i]);)n=8*n+ne(t[i++]);r=i-1,e+=String.fromCharCode(n)}else e+=t[++r];else e+=t[r];return e}var se,oe=(t(ae,se=Rt),ae.prototype.getVariableAsText=function(){return this.variable instanceof Pt?this.variable.getText():ie(this.variable.getText())},ae);function ae(t,e,r){var n=se.call(this,p.TokenKind.PropertyAccess,t.input,t.begin,r,t.file)||this;return n.variable=t,n.props=e,n}function ue(t,e){if(!t){var r=e?e():"expect "+t+" to be true";throw new st(r)}}var ce,le=(t(he,ce=Rt),he);function he(t,e,r,n,i,s){var o=ce.call(this,p.TokenKind.Filter,r,n,i,s)||this;return o.name=t,o.args=e,o}var pe,fe=(t(de,pe=Rt),de);function de(t,e,r,n,i,s){var o=pe.call(this,p.TokenKind.Hash,t,e,r,s)||this;return o.input=t,o.begin=e,o.end=r,o.name=n,o.value=i,o.file=s,o}var ve,ge=(t(ye,ve=Rt),ye);function ye(t,e,r,n){var i=ve.call(this,p.TokenKind.Quoted,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i}var me,we=(t(Te,me=Rt),Te.prototype.getContent=function(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)},Te);function Te(t,e,r,n){var i=me.call(this,p.TokenKind.HTML,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.trimLeft=0,i.trimRight=0,i}var be,ke=(t(xe,be=Rt),xe);function xe(t,e,r,n,i,s,o,a){var u=be.call(this,t,r,n,i,a)||this;u.trimLeft=!1,u.trimRight=!1,u.content=u.getText();var c="-"===e[0],l="-"===g(e);return u.content=e.slice(c?1:0,l?-1:e.length).trim(),u.trimLeft=c||s,u.trimRight=l||o,u}var Oe,Se=(t(qe,Oe=ke),qe);function qe(t,e,r,n,i){var s=this,o=n.trimTagLeft,a=n.trimTagRight,u=n.tagDelimiterLeft,c=n.tagDelimiterRight,l=t.slice(e+u.length,r-c.length);s=Oe.call(this,p.TokenKind.Tag,l,t,e,r,o,a,i)||this;var h=new Ve(s.content,n.operatorsTrie);if(s.name=h.readIdentifier().getText(),!s.name)throw new K("illegal tag syntax",s);return h.skipBlank(),s.args=h.remaining(),s}var Ee,Re=(t(Le,Ee=Rt),Le);function Le(t,e,r,n,i,s){var o=Ee.call(this,p.TokenKind.Range,t,e,r,s)||this;return o.input=t,o.begin=e,o.end=r,o.lhs=n,o.rhs=i,o.file=s,o}var Fe,Me=(t(De,Fe=ke),De);function De(t,e,r,n,i){var s=n.trimOutputLeft,o=n.trimOutputRight,a=n.outputDelimiterLeft,u=n.outputDelimiterRight,c=t.slice(e+a.length,r-u.length);return Fe.call(this,p.TokenKind.Output,c,t,e,r,s,o,i)||this}var Ne=(Pe.prototype.evaluate=function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d;return S(this,function(t){switch(t.label){case 0:ue(e,function(){return"unable to evaluate: context not defined"}),n=[],t.label=1;case 1:t.trys.push([1,9,10,11]),i=q(this.postfix),s=i.next(),t.label=2;case 2:return s.done?[3,8]:ht(o=s.value)?[4,n.pop()]:[3,5];case 3:return a=t.sent(),[4,n.pop()];case 4:return u=t.sent(),c=function(t,e,r,n,i){return(0,t[e.operator])(r,n,i)}(e.opts.operators,o,u,a,e),n.push(c),[3,7];case 5:return h=(l=n).push,[4,Ae(o,e,r&&1===this.postfix.length)];case 6:h.apply(l,[t.sent()]),t.label=7;case 7:return s=i.next(),[3,2];case 8:return[3,11];case 9:return p=t.sent(),f={error:p},[3,11];case 10:try{s&&!s.done&&(d=i.return)&&d.call(i)}finally{if(f)throw f.error}return[7];case 11:return[2,n[0]]}})},Pe);function Pe(t){this.postfix=T(function(e){var r,n,i,s,o,a,u;return S(this,function(t){switch(t.label){case 0:r=[],t.label=1;case 1:t.trys.push([1,10,11,12]),n=q(e),i=n.next(),t.label=2;case 2:if(i.done)return[3,9];if(!ht(s=i.value))return[3,6];t.label=3;case 3:return r.length&&r[r.length-1].getPrecedence()>s.getPrecedence()?[4,r.pop()]:[3,5];case 4:return t.sent(),[3,3];case 5:return r.push(s),[3,8];case 6:return[4,s];case 7:t.sent(),t.label=8;case 8:return i=n.next(),[3,2];case 9:return[3,12];case 10:return o=t.sent(),a={error:o},[3,12];case 11:try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}return[7];case 12:return r.length?[4,r.pop()]:[3,14];case 13:return t.sent(),[3,12];case 14:return[2]}})}(t))}function Ae(t,e,r){return void 0===r&&(r=!1),mt(t)?function(e,r,n){var t=e.getVariableAsText(),i=e.props.map(function(t){return Ae(t,r,!1)});try{return r.get(T([t],i))}catch(t){if(n&&"InternalUndefinedVariableError"===t.name)return null;throw new X(t,e)}}(t,e,r):Tt(t)?function(t,e){var r=Ae(t.lhs,e),n=Ae(t.rhs,e);return b(+r,+n+1)}(t,e):gt(t)?function(t){return Wt[t.literal]}(t):yt(t)?function(t){var e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}(t):wt(t)?t.getText():vt(t)?Ie(t):void 0}function Ie(t){return ie(t.getText())}var Ve=(_e.prototype.readExpression=function(){return new Ne(this.readExpressionTokens())},_e.prototype.readExpressionTokens=function(){var e,r,n;return S(this,function(t){switch(t.label){case 0:return(e=this.readValue())?[4,e]:[2];case 1:t.sent(),t.label=2;case 2:return this.p<this.N?(r=this.readOperator())&&(n=this.readValue())?[4,r]:[2]:[3,5];case 3:return t.sent(),[4,n];case 4:return t.sent(),[3,2];case 5:return[2]}})},_e.prototype.readOperator=function(){this.skipBlank();var t=function(t,e,r,n){void 0===n&&(n=t.length);for(var i,s=r,o=e;s[t[o]]&&o<n;)(s=s[t[o++]]).end&&(i=s);return i?i.needBoundary&&1&t.charCodeAt(o)?-1:o:-1}(this.input,this.p,this.trie,this.p+8);if(-1!==t)return new Gt(this.input,this.p,this.p=t,this.file)},_e.prototype.readFilters=function(){for(var t=[];;){var e=this.readFilter();if(!e)return t;t.push(e)}},_e.prototype.readFilter=function(){var t=this;if(this.skipBlank(),this.end())return null;ue("|"===this.peek(),function(){return"unexpected token at "+t.snapshot()}),this.p++;var e=this.p,r=this.readIdentifier();if(!r.size())return null;var n=[];if(this.skipBlank(),":"===this.peek())do{++this.p;var i=this.readFilterArg();for(i&&n.push(i);this.p<this.N&&","!==this.peek()&&"|"!==this.peek();)++this.p}while(","===this.peek());return new le(r.getText(),n,this.input,e,this.p,this.file)},_e.prototype.readFilterArg=function(){var t=this.readValue();if(t){if(this.skipBlank(),":"!==this.peek())return t;++this.p;var e=this.readValue();return[t.getText(),e]}},_e.prototype.readTopLevelTokens=function(t){void 0===t&&(t=V);for(var e=[];this.p<this.N;){var r=this.readTopLevelToken(t);e.push(r)}return function(t,e){for(var r=!1,n=0;n<t.length;n++){var i=t[n];lt(i)&&(!r&&i.trimLeft&&qt(t[n-1],e.greedy),dt(i)&&("raw"===i.name?r=!0:"endraw"===i.name&&(r=!1)),!r&&i.trimRight&&Et(t[n+1],e.greedy))}}(e,t),e},_e.prototype.readTopLevelToken=function(t){var e=t.tagDelimiterLeft,r=t.outputDelimiterLeft;return-1<this.rawBeginAt?this.readEndrawOrRawContent(t):this.match(e)?this.readTagToken(t):this.match(r)?this.readOutputToken(t):this.readHTMLToken(t)},_e.prototype.readHTMLToken=function(t){for(var e=this.p;this.p<this.N;){var r=t.tagDelimiterLeft,n=t.outputDelimiterLeft;if(this.match(r))break;if(this.match(n))break;++this.p}return new we(this.input,e,this.p,this.file)},_e.prototype.readTagToken=function(t){void 0===t&&(t=V);var e=this.file,r=this.input,n=this.p;if(-1===this.readToDelimiter(t.tagDelimiterRight))throw this.mkError("tag "+this.snapshot(n)+" not closed",n);var i=new Se(r,n,this.p,t,e);return"raw"===i.name&&(this.rawBeginAt=n),i},_e.prototype.readToDelimiter=function(t){for(;this.p<this.N;)if(8&this.peekType())this.readQuoted();else if(++this.p,this.rmatch(t))return this.p;return-1},_e.prototype.readOutputToken=function(t){void 0===t&&(t=V);var e=this.file,r=this.input,n=t.outputDelimiterRight,i=this.p;if(-1===this.readToDelimiter(n))throw this.mkError("output "+this.snapshot(i)+" not closed",i);return new Me(r,i,this.p,t,e)},_e.prototype.readEndrawOrRawContent=function(t){for(var e=t.tagDelimiterLeft,r=t.tagDelimiterRight,n=this.p,i=this.readTo(e)-e.length;this.p<this.N;)if("endraw"===this.readIdentifier().getText())for(;this.p<=this.N;){if(this.rmatch(r)){var s=this.p;return n===i?(this.rawBeginAt=-1,new Se(this.input,n,s,t,this.file)):(this.p=i,new we(this.input,n,i,this.file))}if(this.rmatch(e))break;this.p++}else i=this.readTo(e)-e.length;throw this.mkError("raw "+this.snapshot(this.rawBeginAt)+" not closed",n)},_e.prototype.mkError=function(t,e){return new K(t,new Pt(this.input,e,this.N,this.file))},_e.prototype.snapshot=function(t){return void 0===t&&(t=this.p),JSON.stringify(function(t,e){return t.length>e?t.substr(0,e-3)+"...":t}(this.input.slice(t),16))},_e.prototype.readWord=function(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()},_e.prototype.readIdentifier=function(){this.skipBlank();for(var t=this.p;1&this.peekType();)++this.p;return new Pt(this.input,t,this.p,this.file)},_e.prototype.readHashes=function(){for(var t=[];;){var e=this.readHash();if(!e)return t;t.push(e)}},_e.prototype.readHash=function(){this.skipBlank(),","===this.peek()&&++this.p;var t,e=this.p,r=this.readIdentifier();if(r.size())return this.skipBlank(),":"===this.peek()&&(++this.p,t=this.readValue()),new fe(this.input,e,this.p,r,t,this.file)},_e.prototype.remaining=function(){return this.input.slice(this.p)},_e.prototype.advance=function(t){void 0===t&&(t=1),this.p+=t},_e.prototype.end=function(){return this.p>=this.N},_e.prototype.readTo=function(t){for(;this.p<this.N;)if(++this.p,this.rmatch(t))return this.p;return-1},_e.prototype.readValue=function(){var t=this.readQuoted()||this.readRange();if(t)return t;if("["===this.peek()){if(this.p++,!(i=this.readQuoted()))return;if("]"!==this.peek())return;return this.p++,new oe(i,[],this.p)}var e=this.readIdentifier();if(e.size()){for(var r=e.isNumber(!0),n=[];;)if("["===this.peek()){r=!1,this.p++;var i=this.readValue()||new Pt(this.input,this.p,this.p,this.file);this.readTo("]"),n.push(i)}else{if("."!==this.peek()||"."===this.peek(1))break;if(this.p++,!(i=this.readIdentifier()).size())break;i.isNumber()||(r=!1),n.push(i)}return!n.length&&Wt.hasOwnProperty(e.content)?new Jt(this.input,e.begin,e.end,this.file):r?new Mt(e,n[0]):new oe(e,n,this.p)}},_e.prototype.readRange=function(){this.skipBlank();var t=this.p;if("("===this.peek()){++this.p;var e=this.readValueOrThrow();this.p+=2;var r=this.readValueOrThrow();return++this.p,new Re(this.input,t,this.p,e,r,this.file)}},_e.prototype.readValueOrThrow=function(){var t=this,e=this.readValue();return ue(e,function(){return"unexpected token "+t.snapshot()+", value expected"}),e},_e.prototype.readQuoted=function(){this.skipBlank();var t=this.p;if(8&this.peekType()){++this.p;for(var e=!1;this.p<this.N&&(++this.p,this.input[this.p-1]!==this.input[t]||e);)e?e=!1:"\\"===this.input[this.p-1]&&(e=!0);return new ge(this.input,t,this.p,this.file)}},_e.prototype.readFileName=function(){for(var t=this.p;!(this.peekType()&Ot)&&","!==this.peek()&&this.p<this.N;)this.p++;return new Pt(this.input,t,this.p,this.file)},_e.prototype.match=function(t){for(var e=0;e<t.length;e++)if(t[e]!==this.input[this.p+e])return!1;return!0},_e.prototype.rmatch=function(t){for(var e=0;e<t.length;e++)if(t[t.length-1-e]!==this.input[this.p-1-e])return!1;return!0},_e.prototype.peekType=function(t){return void 0===t&&(t=0),xt[this.input.charCodeAt(this.p+t)]},_e.prototype.peek=function(t){return void 0===t&&(t=0),this.input[this.p+t]},_e.prototype.skipBlank=function(){for(;this.peekType()&Ot;)++this.p},_e);function _e(t,e,r){void 0===r&&(r=""),this.input=t,this.trie=e,this.file=r,this.p=0,this.rawBeginAt=-1,this.N=t.length}var je=(Be.prototype.write=function(t){t=!0===this.keepOutputType?f(t):c(f(t)),!0===this.keepOutputType&&"string"!=typeof t&&""===this.html?this.html=t:this.html=c(this.html)+c(t)},Be);function Be(t){this.html="",this.break=!1,this.continue=!1,this.keepOutputType=!1,this.keepOutputType=t}var ze=(Ce.prototype.renderTemplates=function(e,r,n){var i,s,o,a,u,c,l,h;return S(this,function(t){switch(t.label){case 0:n=n||new je(r.opts.keepOutputType),t.label=1;case 1:t.trys.push([1,8,9,10]),i=q(e),s=i.next(),t.label=2;case 2:if(s.done)return[3,7];o=s.value,t.label=3;case 3:return t.trys.push([3,5,,6]),[4,o.render(r,n)];case 4:return(a=t.sent())&&n.write(a),n.break||n.continue?[3,7]:[3,6];case 5:throw u=t.sent(),Z.is(u)?u:new Z(u,o);case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return c=t.sent(),l={error:c},[3,10];case 9:try{s&&!s.done&&(h=i.return)&&h.call(i)}finally{if(l)throw l.error}return[7];case 10:return[2,n.html]}})},Ce);function Ce(){}var He=(Ke.prototype.on=function(t,e){return this.handlers[t]=e,this},Ke.prototype.trigger=function(t,e){var r=this.handlers[t];return!!r&&(r(e),!0)},Ke.prototype.start=function(){var t;for(this.trigger("start");!this.stopRequested&&(t=this.tokens.shift());)if(!(this.trigger("token",t)||dt(t)&&this.trigger("tag:"+t.name,t))){var e=this.parseToken(t,this.tokens);this.trigger("template",e)}return this.stopRequested||this.trigger("end"),this},Ke.prototype.stop=function(){return this.stopRequested=!0,this},Ke);function Ke(t,e){this.handlers={},this.stopRequested=!1,this.tokens=t,this.parseToken=e}function Ue(t){this.token=t}var Qe=(We.prototype.render=function(e){var r,n,i,s,o,a,u,c,l;return S(this,function(t){switch(t.label){case 0:r={},t.label=1;case 1:t.trys.push([1,6,7,8]),n=q(Object.keys(this.hash)),i=n.next(),t.label=2;case 2:return i.done?[3,5]:(s=i.value,o=r,a=s,[4,Ae(this.hash[s],e)]);case 3:o[a]=t.sent(),t.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return u=t.sent(),c={error:u},[3,8];case 7:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(c)throw c.error}return[7];case 8:return[2,r]}})},We);function We(t){var e,r;this.hash={};var n=new Ve(t,{});try{for(var i=q(n.readHashes()),s=i.next();!s.done;s=i.next()){var o=s.value;this.hash[o.name.content]=o.value}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}var Je=(Ye.prototype.render=function(t,e){var r,n,i=[];try{for(var s=q(this.args),o=s.next();!o.done;o=s.next()){var a=o.value;d(a)?i.push([a[0],Ae(a[1],e)]):i.push(Ae(a,e))}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this.impl.apply({context:e,liquid:this.liquid},T([t],i))},Ye);function Ye(t,e,r,n){this.name=t,this.impl=e||O,this.args=r,this.liquid=n}var Ze=($e.prototype.value=function(e,r){var n,i,s,o,a,u;return S(this,function(t){switch(t.label){case 0:return r=r||e.opts.lenientIf&&0<this.filters.length&&"default"===this.filters[0].name,[4,this.initial.evaluate(e,r)];case 1:n=t.sent(),t.label=2;case 2:t.trys.push([2,7,8,9]),i=q(this.filters),s=i.next(),t.label=3;case 3:return s.done?[3,6]:[4,s.value.render(n,e)];case 4:n=t.sent(),t.label=5;case 5:return s=i.next(),[3,3];case 6:return[3,9];case 7:return o=t.sent(),a={error:o},[3,9];case 8:try{s&&!s.done&&(u=i.return)&&u.call(i)}finally{if(a)throw a.error}return[7];case 9:return[2,n]}})},$e);function $e(t,n){this.filters=[];var e=new Ve(t,n.options.operatorsTrie);this.initial=e.readExpression(),this.filters=e.readFilters().map(function(t){var e=t.name,r=t.args;return new Je(e,n.filters.get(e),r,n)})}function Ge(e){var t={then:function(t){return t(e)},catch:function(){return t}};return t}function Xe(r){var n={then:function(t,e){return e?e(r):n},catch:function(t){return t(r)}};return n}function tr(n){return function(t){return t&&u(t.then)}(n)?n:function(t){return t&&u(t.next)&&u(t.throw)&&u(t.return)}(n)?function r(t){var e;try{e=n.next(t)}catch(t){return Xe(t)}if(e.done)return Ge(e.value);return tr(e.value).then(r,function(t){var e;try{e=n.throw(t)}catch(t){return Xe(t)}return e.done?Ge(e.value):r(e.value)})}():Ge(n)}function er(t){return Promise.resolve(tr(t))}function rr(t){var e;return tr(t).then(function(t){return Ge(e=t)}).catch(function(t){throw t}),e}var nr,ir=(t(sr,nr=Ue),sr.prototype.render=function(e,r){var n,i;return S(this,function(t){switch(t.label){case 0:return[4,new Qe(this.token.args).render(e)];case 1:return n=t.sent(),u((i=this.impl).render)?[4,i.render(e,r,n)]:[3,3];case 2:return[2,t.sent()];case 3:return[2]}})},sr);function sr(t,e,r){var n=nr.call(this,t)||this;n.name=t.name;var i=r.tags.get(t.name);return n.impl=Object.create(i),n.impl.liquid=r,n.impl.parse&&n.impl.parse(t,e),n}var or,ar=(t(ur,or=Ue),ur.prototype.render=function(e,r){var n;return S(this,function(t){switch(t.label){case 0:return[4,this.value.value(e,!1)];case 1:return n=t.sent(),r.write(n),[2]}})},ur);function ur(t,e){var r=or.call(this,t)||this;return r.value=new Ze(t.content,e),r}var cr,lr=(t(hr,cr=Ue),hr.prototype.render=function(t,e){return S(this,function(t){return e.write(this.str),[2]})},hr);function hr(t){var e=cr.call(this,t)||this;return e.str=t.getContent(),e}var pr=(fr.prototype.parse=function(t){for(var e,r=[];e=t.shift();)r.push(this.parseToken(e,t));return r},fr.prototype.parseToken=function(e,t){try{return dt(e)?new ir(e,t,this.liquid):ft(e)?new ar(e,this.liquid):new lr(e)}catch(t){throw new W(t,e)}},fr.prototype.parseStream=function(t){var r=this;return new He(t,function(t,e){return r.parseToken(t,e)})},fr);function fr(t){this.liquid=t}var dr={parse:function(t){var e=new Ve(t.args,this.liquid.options.operatorsTrie);this.key=e.readIdentifier().content,e.skipBlank(),ue("="===e.peek(),function(){return"illegal token "+t.getText()}),e.advance(),this.value=e.remaining()},render:function(e){var r,n;return S(this,function(t){switch(t.label){case 0:return r=e.bottom(),n=this.key,[4,this.liquid._evalValue(this.value,e)];case 1:return r[n]=t.sent(),[2]}})}};function vr(e){return d(e)?e:a(e)&&0<e.length?[e]:y(e)?Object.keys(e).map(function(t){return[t,e[t]]}):[]}function gr(t){return d(t)?t:[t]}var yr,mr=(t(wr,yr=i),wr.prototype.next=function(){this.i++},wr.prototype.index0=function(){return this.i},wr.prototype.index=function(){return this.i+1},wr.prototype.first=function(){return 0===this.i},wr.prototype.last=function(){return this.i===this.length-1},wr.prototype.rindex=function(){return this.length-this.i},wr.prototype.rindex0=function(){return this.length-this.i-1},wr.prototype.valueOf=function(){return JSON.stringify(this)},wr);function wr(t){var e=yr.call(this)||this;return e.i=0,e.length=t,e}var Tr={type:"block",parse:function(t,e){var r,n=this,i=new Ve(t.args,this.liquid.options.operatorsTrie),s=i.readIdentifier(),o=i.readIdentifier(),a=i.readValue();ue(s.size()&&"in"===o.content&&a,function(){return"illegal tag: "+t.getText()}),this.variable=s.content,this.collection=a,this.hash=new Qe(i.remaining()),this.templates=[],this.elseTemplates=[];var u=this.liquid.parser.parseStream(e).on("start",function(){return r=n.templates}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endfor",function(){return u.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});u.start()},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d,v;return S(this,function(t){switch(t.label){case 0:return n=this.liquid.renderer,s=vr,[4,Ae(this.collection,e)];case 1:return(i=s.apply(void 0,[t.sent()])).length?[3,3]:[4,n.renderTemplates(this.elseTemplates,e,r)];case 2:return t.sent(),[2];case 3:return[4,this.hash.render(e)];case 4:o=t.sent(),a=o.offset||0,u=void 0===o.limit?i.length:o.limit,i=i.slice(a,a+u),"reversed"in o&&i.reverse(),c={forloop:new mr(i.length)},e.push(c),t.label=5;case 5:t.trys.push([5,10,11,12]),l=q(i),h=l.next(),t.label=6;case 6:return h.done?[3,9]:(p=h.value,c[this.variable]=p,[4,n.renderTemplates(this.templates,e,r)]);case 7:if(t.sent(),r.break)return r.break=!1,[3,9];r.continue=!1,c.forloop.next(),t.label=8;case 8:return h=l.next(),[3,6];case 9:return[3,12];case 10:return f=t.sent(),d={error:f},[3,12];case 11:try{h&&!h.done&&(v=l.return)&&v.call(l)}finally{if(d)throw d.error}return[7];case 12:return e.pop(),[2]}})}},br={parse:function(t,e){var r=this,n=new Ve(t.args,this.liquid.options.operatorsTrie);this.variable=function(t){var e=t.readIdentifier().content;if(e)return e;var r=t.readQuoted();if(r)return Ie(r)}(n),ue(this.variable,function(){return t.args+" not valid identifier"}),this.templates=[];var i=this.liquid.parser.parseStream(e);i.on("tag:endcapture",function(){return i.stop()}).on("template",function(t){return r.templates.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")}),i.start()},render:function(e){var r;return S(this,function(t){switch(t.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,e)];case 1:return r=t.sent(),e.bottom()[this.variable]=r,[2]}})}};var kr,xr,Or={parse:function(t,e){var r=this;this.cond=new Ze(t.args,this.liquid),this.cases=[],this.elseTemplates=[];var n=[],i=this.liquid.parser.parseStream(e).on("tag:when",function(t){r.cases.push({val:new Ze(t.args,r.liquid),templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endcase",function(){return i.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n,i,s,o,a,u,c,l,h,p;return S(this,function(t){switch(t.label){case 0:return n=this.liquid.renderer,s=f,[4,this.cond.value(e,e.opts.lenientIf)];case 1:i=s.apply(void 0,[t.sent()]),t.label=2;case 2:t.trys.push([2,8,9,10]),o=q(this.cases),a=o.next(),t.label=3;case 3:return a.done?[3,7]:(u=a.value,c=f,[4,u.val.value(e,e.opts.lenientIf)]);case 4:return c.apply(void 0,[t.sent()])!==i?[3,6]:[4,n.renderTemplates(u.templates,e,r)];case 5:return t.sent(),[2];case 6:return a=o.next(),[3,3];case 7:return[3,10];case 8:return l=t.sent(),h={error:l},[3,10];case 9:try{a&&!a.done&&(p=o.return)&&p.call(o)}finally{if(h)throw h.error}return[7];case 10:return[4,n.renderTemplates(this.elseTemplates,e,r)];case 11:return t.sent(),[2]}})}},Sr={parse:function(t,e){var r=this.liquid.parser.parseStream(e);r.on("token",function(t){"endcomment"===t.name&&r.stop()}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")}),r.start()}};(xr=kr=kr||{})[xr.OUTPUT=0]="OUTPUT",xr[xr.STORE=1]="STORE";var qr,Er=kr,Rr={parse:function(t){var e=t.args,r=new Ve(e,this.liquid.options.operatorsTrie);this.file=this.liquid.options.dynamicPartials?r.readValue():r.readFileName(),ue(this.file,function(){return'illegal argument "'+t.args+'"'});var n=r.p;"with"===r.readIdentifier().content?(r.skipBlank(),":"!==r.peek()?this.withVar=r.readValue():r.p=n):r.p=n,this.hash=new Qe(r.remaining())},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d;return S(this,function(t){switch(t.label){case 0:return i=(n=this).liquid,s=n.hash,o=n.withVar,a=n.file,u=i.renderer,e.opts.dynamicPartials?vt(a)?[4,u.renderTemplates(i.parse(Ie(a)),e)]:[3,2]:[3,5];case 1:return h=t.sent(),[3,4];case 2:return[4,Ae(a,e)];case 3:h=t.sent(),t.label=4;case 4:return l=h,[3,6];case 5:l=a.getText(),t.label=6;case 6:return ue(c=l,function(){return'illegal filename "'+a.getText()+'":"'+c+'"'}),p=e.saveRegister("blocks","blockMode"),e.setRegister("blocks",{}),e.setRegister("blockMode",Er.OUTPUT),[4,s.render(e)];case 7:return f=t.sent(),o&&(f[c]=Ae(o,e)),[4,i._parseFile(c,e.opts,e.sync)];case 8:return d=t.sent(),e.push(f),[4,u.renderTemplates(d,e,r)];case 9:return t.sent(),e.pop(),e.restoreRegister(p),[2]}})}},Lr={parse:function(t){var e=t.args,r=new Ve(e,this.liquid.options.operatorsTrie);for(this.file=this.liquid.options.dynamicPartials?r.readValue():r.readFileName(),ue(this.file,function(){return'illegal argument "'+t.args+'"'});!r.end();){r.skipBlank();var n=r.p,i=r.readIdentifier();if(("with"===i.content||"for"===i.content)&&(r.skipBlank(),":"!==r.peek())){var s=r.readValue();if(s){var o=r.p,a=void 0;"as"===r.readIdentifier().content?a=r.readIdentifier():r.p=o,this[i.content]={value:s,alias:a&&a.content},r.skipBlank(),","===r.peek()&&r.advance();continue}}r.p=n;break}this.hash=new Qe(r.remaining())},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d,v,g,y,m,w,T,b,k,x,O;return S(this,function(t){switch(t.label){case 0:return i=(n=this).liquid,s=n.file,o=n.hash,a=i.renderer,e.opts.dynamicPartials?vt(s)?[4,a.renderTemplates(i.parse(Ie(s)),e)]:[3,2]:[3,4];case 1:return l=t.sent(),[3,3];case 2:l=Ae(s,e),t.label=3;case 3:return c=l,[3,5];case 4:c=s.getText(),t.label=5;case 5:return ue(u=c,function(){return'illegal filename "'+s.getText()+'":"'+u+'"'}),h=new ut({},e.opts,e.sync),[4,o.render(e)];case 6:if(p=t.sent(),this.with&&(f=this.with,v=f.value,g=f.alias,p[g||u]=Ae(v,e)),h.push(p),!this.for)return[3,16];d=this.for,v=d.value,g=d.alias,y=vr(y=Ae(v,e)),p.forloop=new mr(y.length),t.label=7;case 7:t.trys.push([7,13,14,15]),m=q(y),w=m.next(),t.label=8;case 8:return w.done?[3,12]:(T=w.value,p[g]=T,[4,i._parseFile(u,h.opts,h.sync)]);case 9:return k=t.sent(),[4,a.renderTemplates(k,h,r)];case 10:t.sent(),p.forloop.next(),t.label=11;case 11:return w=m.next(),[3,8];case 12:return[3,15];case 13:return b=t.sent(),x={error:b},[3,15];case 14:try{w&&!w.done&&(O=m.return)&&O.call(m)}finally{if(x)throw x.error}return[7];case 15:return[3,19];case 16:return[4,i._parseFile(u,h.opts,h.sync)];case 17:return k=t.sent(),[4,a.renderTemplates(k,h,r)];case 18:t.sent(),t.label=19;case 19:return[2]}})}},Fr={parse:function(t){var e=new Ve(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;l(r[this.variable])||(r[this.variable]=0),e.write(c(--r[this.variable]))}},Mr={parse:function(t){var e=new Ve(t.args,this.liquid.options.operatorsTrie),r=e.readValue();for(e.skipBlank(),this.candidates=[],r&&(":"===e.peek()?(this.group=r,e.advance()):this.candidates.push(r));!e.end();){var n=e.readValue();n&&this.candidates.push(n),e.readTo(",")}ue(this.candidates.length,function(){return"empty candidates: "+t.getText()})},render:function(t,e){var r="cycle:"+Ae(this.group,t)+":"+this.candidates.join(","),n=t.getRegister("cycle"),i=n[r];void 0===i&&(i=n[r]=0);var s=this.candidates[i];i=(i+1)%this.candidates.length,n[r]=i;var o=Ae(s,t);e.write(o)}},Dr={parse:function(t,e){var r,n=this;this.branches=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){return n.branches.push({cond:new Ze(t.args,n.liquid),templates:r=[]})}).on("tag:elsif",function(t){n.branches.push({cond:new Ze(t.args,n.liquid),templates:r=[]})}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endif",function(){return i.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n,i,s,o,a,u,c;return S(this,function(t){switch(t.label){case 0:n=this.liquid.renderer,t.label=1;case 1:t.trys.push([1,7,8,9]),i=q(this.branches),s=i.next(),t.label=2;case 2:return s.done?[3,6]:[4,(o=s.value).cond.value(e,e.opts.lenientIf)];case 3:return N(t.sent(),e)?[4,n.renderTemplates(o.templates,e,r)]:[3,5];case 4:return t.sent(),[2];case 5:return s=i.next(),[3,2];case 6:return[3,9];case 7:return a=t.sent(),u={error:a},[3,9];case 8:try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(u)throw u.error}return[7];case 9:return[4,n.renderTemplates(this.elseTemplates,e,r)];case 10:return t.sent(),[2]}})}},Nr={parse:function(t){var e=new Ve(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;l(r[this.variable])||(r[this.variable]=0);var n=r[this.variable];r[this.variable]++,e.write(c(n))}},Pr={parse:function(t,e){var r=new Ve(t.args,this.liquid.options.operatorsTrie),n=this.liquid.options.dynamicPartials?r.readValue():r.readFileName();ue(n,function(){return'illegal argument "'+t.args+'"'}),this.file=n,this.hash=new Qe(r.remaining()),this.tpls=this.liquid.parser.parse(e)},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d,v,g,y;return S(this,function(t){switch(t.label){case 0:return i=(n=this).liquid,s=n.hash,o=n.file,a=i.renderer,"none"!==o.getText()?[3,2]:(e.setRegister("blockMode",Er.OUTPUT),[4,a.renderTemplates(this.tpls,e)]);case 1:return u=t.sent(),r.write(u),[2];case 2:return e.opts.dynamicPartials?vt(o)?[4,a.renderTemplates(i.parse(Ie(o)),e)]:[3,4]:[3,6];case 3:return h=t.sent(),[3,5];case 4:h=Ae(this.file,e),t.label=5;case 5:return l=h,[3,7];case 6:l=o.getText(),t.label=7;case 7:return ue(c=l,function(){return'file "'+o.getText()+'"("'+c+'") not available'}),[4,i._parseFile(c,e.opts,e.sync)];case 8:return p=t.sent(),e.setRegister("blockMode",Er.STORE),[4,a.renderTemplates(this.tpls,e)];case 9:return f=t.sent(),void 0===(d=e.getRegister("blocks"))[""]&&(d[""]=function(){return f}),e.setRegister("blockMode",Er.OUTPUT),g=(v=e).push,[4,s.render(e)];case 10:return g.apply(v,[t.sent()]),[4,a.renderTemplates(p,e)];case 11:return y=t.sent(),e.pop(),r.write(y),[2]}})}},Ar=(t(Ir,qr=i),Ir.prototype.super=function(){return this.superBlockRender()},Ir);function Ir(t){void 0===t&&(t=function(){return""});var e=qr.call(this)||this;return e.superBlockRender=t,e}var Vr,_r={parse:function(t,e){var r=this,n=/\w+/.exec(t.args);this.block=n?n[0]:"",this.tpls=[];var i=this.liquid.parser.parseStream(e).on("tag:endblock",function(){return i.stop()}).on("template",function(t){return r.tpls.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n;return S(this,function(t){switch(t.label){case 0:return n=this.getBlockRender(e),[4,this.emitHTML(e,r,n)];case 1:return t.sent(),[2]}})},getBlockRender:function(n){function e(e){var r;return S(this,function(t){switch(t.label){case 0:return n.push({block:e}),[4,i.renderer.renderTemplates(s,n)];case 1:return r=t.sent(),n.pop(),[2,r]}})}var i=this.liquid,s=this.tpls,r=n.getRegister("blocks")[this.block];return r?function(t){return r(new Ar(function(){return e(t)}))}:e},emitHTML:function(e,r,n){var i,s;return S(this,function(t){switch(t.label){case 0:return e.getRegister("blockMode",Er.OUTPUT)!==Er.STORE?[3,1]:(e.getRegister("blocks")[this.block]=n,[3,3]);case 1:return s=(i=r).write,[4,n(new Ar)];case 2:s.apply(i,[t.sent()]),t.label=3;case 3:return[2]}})}},jr={parse:function(t,e){var r=this;this.tokens=[];var n=this.liquid.parser.parseStream(e);n.on("token",function(t){"endraw"===t.name?n.stop():r.tokens.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")}),n.start()},render:function(){return this.tokens.map(function(t){return t.getText()}).join("")}},Br=(t(zr,Vr=mr),zr.prototype.row=function(){return Math.floor(this.i/this.cols)+1},zr.prototype.col0=function(){return this.i%this.cols},zr.prototype.col=function(){return this.col0()+1},zr.prototype.col_first=function(){return 0===this.col0()},zr.prototype.col_last=function(){return this.col()===this.cols},zr);function zr(t,e){var r=Vr.call(this,t)||this;return r.length=t,r.cols=e,r}var Cr={assign:dr,for:Tr,capture:br,case:Or,comment:Sr,include:Rr,render:Lr,decrement:Fr,increment:Nr,cycle:Mr,if:Dr,layout:Pr,block:_r,raw:jr,tablerow:{parse:function(t,e){var r=this,n=new Ve(t.args,this.liquid.options.operatorsTrie);this.variable=n.readIdentifier(),n.skipBlank();var i,s=n.readIdentifier();ue(s&&"in"===s.content,function(){return"illegal tag: "+t.getText()}),this.collection=n.readValue(),this.hash=new Qe(n.remaining()),this.templates=[];var o=this.liquid.parser.parseStream(e).on("start",function(){return i=r.templates}).on("tag:endtablerow",function(){return o.stop()}).on("template",function(t){return i.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});o.start()},render:function(e,r){var n,i,s,o,a,u,c,l,h,p;return S(this,function(t){switch(t.label){case 0:return i=vr,[4,Ae(this.collection,e)];case 1:return n=i.apply(void 0,[t.sent()]),[4,this.hash.render(e)];case 2:s=t.sent(),o=s.offset||0,a=void 0===s.limit?n.length:s.limit,n=n.slice(o,o+a),u=s.cols||n.length,c=this.liquid.renderer,l=new Br(n.length,u),h={tablerowloop:l},e.push(h),p=0,t.label=3;case 3:return p<n.length?(h[this.variable.content]=n[p],0===l.col0()&&(1!==l.row()&&r.write("</tr>"),r.write('<tr class="row'+l.row()+'">')),r.write('<td class="col'+l.col()+'">'),[4,c.renderTemplates(this.templates,e,r)]):[3,6];case 4:t.sent(),r.write("</td>"),t.label=5;case 5:return p++,l.next(),[3,3];case 6:return n.length&&r.write("</tr>"),e.pop(),[2]}})}},unless:{parse:function(t,e){var r,n=this;this.templates=[],this.branches=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){r=n.templates,n.cond=new Ze(t.args,n.liquid)}).on("tag:elsif",function(t){n.branches.push({cond:new Ze(t.args,n.liquid),templates:r=[]})}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endunless",function(){return i.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n,i,s,o,a,u,c;return S(this,function(t){switch(t.label){case 0:return n=this.liquid.renderer,[4,this.cond.value(e,e.opts.lenientIf)];case 1:return P(t.sent(),e)?[4,n.renderTemplates(this.templates,e,r)]:[3,3];case 2:return t.sent(),[2];case 3:t.trys.push([3,9,10,11]),i=q(this.branches),s=i.next(),t.label=4;case 4:return s.done?[3,8]:[4,(o=s.value).cond.value(e,e.opts.lenientIf)];case 5:return N(t.sent(),e)?[4,n.renderTemplates(o.templates,e,r)]:[3,7];case 6:return t.sent(),[2];case 7:return s=i.next(),[3,4];case 8:return[3,11];case 9:return a=t.sent(),u={error:a},[3,11];case 10:try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(u)throw u.error}return[7];case 11:return[4,n.renderTemplates(this.elseTemplates,e,r)];case 12:return t.sent(),[2]}})}},break:{render:function(t,e){e.break=!0}},continue:{render:function(t,e){e.continue=!0}}},Hr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},Kr={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function Ur(t){return c(t).replace(/&|<|>|"|'/g,function(t){return Hr[t]})}var Qr=Math.abs,Wr=Math.max,Jr=Math.min,Yr=Math.ceil,Zr=Math.floor;var $r=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,Gr=["January","February","March","April","May","June","July","August","September","October","November","December"],Xr=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],tn=Gr.map(nn),en=Xr.map(nn),rn={1:"st",2:"nd",3:"rd",default:"th"};function nn(t){return t.slice(0,3)}function sn(t){for(var e=0,r=0;r<t.getMonth();++r)e+=[31,function(t){var e=t.getFullYear();return!(0!=(3&e)||!(e%100||e%400==0&&e))}(t)?29:28,31,30,31,30,31,31,30,31,30,31][r];return e+t.getDate()}function on(t,e){var r=sn(t)+(e-t.getDay()),n=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((r-n)/7)+1)}var an={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},un={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},cn={a:function(t){return en[t.getDay()]},A:function(t){return Xr[t.getDay()]},b:function(t){return tn[t.getMonth()]},B:function(t){return Gr[t.getMonth()]},c:function(t){return t.toLocaleString()},C:function(t){return function(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}(t)},d:function(t){return t.getDate()},e:function(t){return t.getDate()},H:function(t){return t.getHours()},I:function(t){return String(t.getHours()%12||12)},j:function(t){return sn(t)},k:function(t){return t.getHours()},l:function(t){return String(t.getHours()%12||12)},L:function(t){return t.getMilliseconds()},m:function(t){return t.getMonth()+1},M:function(t){return t.getMinutes()},N:function(t,e){var r=Number(e.width)||9;return function(t,e,r){return void 0===r&&(r=" "),x(t,e,r,function(t,e){return t+e})}(String(t.getMilliseconds()).substr(0,r),r,"0")},p:function(t){return t.getHours()<12?"AM":"PM"},P:function(t){return t.getHours()<12?"am":"pm"},q:function(t){return function(t){var e=t.getDate().toString(),r=parseInt(e.slice(-1));return rn[r]||rn.default}(t)},s:function(t){return Math.round(t.valueOf()/1e3)},S:function(t){return t.getSeconds()},u:function(t){return t.getDay()||7},U:function(t){return on(t,0)},w:function(t){return t.getDay()},W:function(t){return on(t,1)},x:function(t){return t.toLocaleDateString()},X:function(t){return t.toLocaleTimeString()},y:function(t){return t.getFullYear().toString().substring(2,4)},Y:function(t){return t.getFullYear()},z:function(t,e){var r=t.getTimezoneOffset(),n=Math.abs(r),i=n%60;return(0<r?"-":"+")+k(Math.floor(n/60),2,"0")+(e.flags[":"]?":":"")+k(i,2,"0")},t:function(){return"\t"},n:function(){return"\n"},"%":function(){return"%"}};function ln(t,e){var r,n,i=w(e,5),s=i[0],o=i[1],a=void 0===o?"":o,u=i[2],c=i[3],l=i[4],h=cn[l];if(!h)return s;var p={};try{for(var f=q(a),d=f.next();!d.done;d=f.next()){p[d.value]=!0}}catch(t){r={error:t}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}var v=String(h(t,{flags:p,width:u,modifier:c})),g=un[l]||"0",y=u||an[l]||0;return p["^"]?v=v.toUpperCase():p["#"]&&(v=function(t){return T(t).some(function(t){return"a"<=t&&t<="z"})?t.toUpperCase():t.toLowerCase()}(v)),p._?g=" ":p[0]&&(g="0"),p["-"]&&(y=0),k(v,y,g)}cn.h=cn.b;var hn,pn=(t(fn,hn=Date),fn.prototype.getDisplayDate=function(){return new Date(+this+60*this.inputTimezoneOffset*1e3)},fn);function fn(t){var e=hn.call(this,t)||this;e.dateString=t,e.ISO8601_TIMEZONE_PATTERN=/([zZ]|([+-])(\d{2}):(\d{2}))$/,e.inputTimezoneOffset=0;var r=t.match(e.ISO8601_TIMEZONE_PATTERN);if(r&&"Z"===r[1])e.inputTimezoneOffset=e.getTimezoneOffset();else if(r&&r[2]&&r[3]&&r[4]){var n=w(r,5),i=n[2],s=n[3],o=n[4],a=("+"===i?1:-1)*(60*parseInt(s,10)+parseInt(o,10));e.inputTimezoneOffset=e.getTimezoneOffset()+a}return e}var dn=Object.freeze({escape:Ur,escapeOnce:function(t){return Ur(function(t){return String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(t){return Kr[t]})}(t))},newlineToBr:function(t){return t.replace(/\n/g,"<br />\n")},stripHtml:function(t){return t.replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")},abs:Qr,atLeast:Wr,atMost:Jr,ceil:Yr,dividedBy:function(t,e){return t/e},floor:Zr,minus:function(t,e){return t-e},modulo:function(t,e){return t%e},times:function(t,e){return t*e},round:function(t,e){void 0===e&&(e=0);var r=Math.pow(10,e);return Math.round(t*r)/r},plus:function(t,e){return Number(t)+Number(e)},sortNatural:function(t,r){return t&&t.sort?void 0!==r?T(t).sort(function(t,e){return R(t[r],e[r])}):T(t).sort(R):[]},urlDecode:function(t){return t.split("+").map(decodeURIComponent).join(" ")},urlEncode:function(t){return t.split(" ").map(encodeURIComponent).join("+")},join:function(t,e){return t.join(void 0===e?" ":e)},last:function(t){return d(t)?g(t):""},first:function(t){return d(t)?t[0]:""},reverse:function(t){return T(t).reverse()},sort:function(t,e){function r(t){return e?n.context.getFromScope(t,e.split(".")):t}var n=this;return gr(t).sort(function(t,e){return(t=r(t))<(e=r(e))?-1:e<t?1:0})},size:function(t){return t&&t.length||0},map:function(t,e){var r=this;return gr(t).map(function(t){return r.context.getFromScope(t,e.split("."))})},compact:function(t){return gr(t).filter(function(t){return!h(t)})},concat:function(t,e){return gr(t).concat(e)},slice:function(t,e,r){return void 0===r&&(r=1),e=e<0?t.length+e:e,t.slice(e,e+r)},where:function(t,r,n){var i=this;return gr(t).filter(function(t){var e=i.context.getFromScope(t,String(r).split("."));return void 0===n?N(e,i.context):e===n})},uniq:function(t){var e={};return(t||[]).filter(function(t){return!e.hasOwnProperty(String(t))&&(e[String(t)]=!0)})},date:function(t,e){var r=t;return"now"===t||"today"===t?r=new Date:l(t)?r=new Date(1e3*t):a(t)&&(r=/^\d+$/.test(t)?new Date(1e3*+t):this.context.opts.preserveTimezones?new pn(t):new Date(t)),function(t){return t instanceof Date&&!isNaN(t.getTime())}(r)?function(t,e){var r=t;r instanceof pn&&(r=r.getDisplayDate());for(var n,i="",s=e;n=$r.exec(s);)i+=s.slice(0,n.index),s=s.slice(n.index+n[0].length),i+=ln(r,n);return i+s}(r,e):t},Default:function(t,e){return d(t)||a(t)?t.length?t:e:P(f(t),this.context)?e:t},json:function(t){return JSON.stringify(t)},append:function(t,e){return ue(void 0!==e,function(){return"append expect 2 arguments"}),c(t)+c(e)},prepend:function(t,e){return ue(void 0!==e,function(){return"prepend expect 2 arguments"}),c(e)+c(t)},lstrip:function(t){return c(t).replace(/^\s+/,"")},downcase:function(t){return c(t).toLowerCase()},upcase:function(t){return c(t).toUpperCase()},remove:function(t,e){return c(t).split(String(e)).join("")},removeFirst:function(t,e){return c(t).replace(String(e),"")},rstrip:function(t){return c(t).replace(/\s+$/,"")},split:function(t,e){return c(t).split(String(e))},strip:function(t){return c(t).trim()},stripNewlines:function(t){return c(t).replace(/\n/g,"")},capitalize:function(t){return(t=c(t)).charAt(0).toUpperCase()+t.slice(1).toLowerCase()},replace:function(t,e,r){return c(t).split(String(e)).join(r)},replaceFirst:function(t,e,r){return c(t).replace(String(e),r)},truncate:function(t,e,r){return void 0===e&&(e=50),void 0===r&&(r="..."),(t=c(t)).length<=e?t:t.substr(0,e-r.length)+r},truncatewords:function(t,e,r){void 0===e&&(e=15),void 0===r&&(r="...");var n=t.split(/\s+/),i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}}),vn=(gn.prototype.get=function(t){var e=this.impls[t];return ue(e,function(){return'tag "'+t+'" not found'}),e},gn.prototype.set=function(t,e){this.impls[t]=e},gn);function gn(){this.impls={}}var yn=(mn.prototype.get=function(t){var e=this.impls[t];return ue(e||!this.strictFilters,function(){return"undefined filter: "+t}),e},mn.prototype.set=function(t,e){this.impls[t]=e},mn.prototype.create=function(t,e){return new Je(t,this.get(t),e,this.liquid)},mn);function mn(t,e){this.strictFilters=t,this.liquid=e,this.impls={}}var wn=(Tn.prototype.parse=function(t,e){var r=new Ve(t,this.options.operatorsTrie,e).readTopLevelTokens(this.options);return this.parser.parse(r)},Tn.prototype._render=function(t,e,r,n){var i=m({},this.options,_(r)),s=new ut(e,i,n),o=new je(i.keepOutputType);return this.renderer.renderTemplates(t,s,o)},Tn.prototype.render=function(e,r,n){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,er(this._render(e,r,n,!1))]})})},Tn.prototype.renderSync=function(t,e,r){return rr(this._render(t,e,r,!0))},Tn.prototype._parseAndRender=function(t,e,r,n){var i=this.parse(t);return this._render(i,e,r,n)},Tn.prototype.parseAndRender=function(e,r,n){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,er(this._parseAndRender(e,r,n,!1))]})})},Tn.prototype.parseAndRenderSync=function(t,e,r){return rr(this._parseAndRender(t,e,r,!0))},Tn.prototype._parseFile=function(e,r,n){var i,s,o,a,u,c,l,h,p,f,d,v,g,y;return S(this,function(t){switch(t.label){case 0:i=m({},this.options,_(r)),s=i.root.map(function(t){return i.fs.resolve(t,e,i.extname)}),void 0!==i.fs.fallback&&void 0!==(u=i.fs.fallback(e))&&s.push(u),t.label=1;case 1:t.trys.push([1,13,14,15]),o=q(s),a=o.next(),t.label=2;case 2:return a.done?[3,12]:(u=a.value,(c=i.cache)?[4,c.read(u)]:[3,4]);case 3:if(l=t.sent())return[2,l];t.label=4;case 4:return n?(h=i.fs.existsSync(u),[3,7]):[3,5];case 5:return[4,i.fs.exists(u)];case 6:h=t.sent(),t.label=7;case 7:return h?(f=this.parse,n?(d=i.fs.readFileSync(u),[3,10]):[3,8]):[3,11];case 8:return[4,i.fs.readFile(u)];case 9:d=t.sent(),t.label=10;case 10:return p=f.apply(this,[d,u]),c&&c.write(u,p),[2,p];case 11:return a=o.next(),[3,2];case 12:return[3,15];case 13:return v=t.sent(),g={error:v},[3,15];case 14:try{a&&!a.done&&(y=o.return)&&y.call(o)}finally{if(g)throw g.error}return[7];case 15:throw this.lookupError(e,i.root)}})},Tn.prototype.parseFile=function(e,r){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,er(this._parseFile(e,r,!1))]})})},Tn.prototype.parseFileSync=function(t,e){return rr(this._parseFile(t,e,!0))},Tn.prototype.renderFile=function(r,n,i){return s(this,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:return[4,this.parseFile(r,i)];case 1:return e=t.sent(),[2,this.render(e,n,i)]}})})},Tn.prototype.renderFileSync=function(t,e,r){var n=this.parseFileSync(t,r);return this.renderSync(n,e,r)},Tn.prototype._evalValue=function(t,e){return new Ze(t,this).value(e,!1)},Tn.prototype.evalValue=function(e,r){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,er(this._evalValue(e,r))]})})},Tn.prototype.evalValueSync=function(t,e){return rr(this._evalValue(t,e))},Tn.prototype.registerFilter=function(t,e){this.filters.set(t,e)},Tn.prototype.registerTag=function(t,e){this.tags.set(t,e)},Tn.prototype.plugin=function(t){return t.call(this,Tn)},Tn.prototype.express=function(){var i=this;return function(t,e,r){var n={root:T(j(this.root),i.options.root)};i.renderFile(t,e,n).then(function(t){return r(null,t)},r)}},Tn.prototype.lookupError=function(t,e){var r=new Error("ENOENT");return r.message='ENOENT: Failed to lookup "'+t+'" in "'+e+'"',r.code="ENOENT",r},Tn.prototype.getTemplate=function(e,r){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,this.parseFile(e,r)]})})},Tn.prototype.getTemplateSync=function(t,e){return this.parseFileSync(t,e)},Tn);function Tn(t){var r=this;void 0===t&&(t={}),this.options=function(t){return m({},V,t)}(_(t)),this.parser=new pr(this),this.renderer=new ze,this.filters=new yn(this.options.strictFilters,this),this.tags=new vn,v(Cr,function(t,e){return r.registerTag(E(e),t)}),v(dn,function(t,e){return r.registerFilter(E(e),t)})}p.AssertionError=st,p.Context=ut,p.Drop=i,p.Emitter=je,p.Expression=Ne,p.Hash=Qe,p.InternalUndefinedVariableError=rt,p.Liquid=wn,p.LiquidError=z,p.ParseError=W,p.ParseStream=He,p.RenderError=Z,p.TagToken=Se,p.Token=Rt,p.TokenizationError=K,p.Tokenizer=Ve,p.TypeGuards=kt,p.UndefinedVariableError=X,p.Value=Ze,p.assert=ue,p.createTrie=I,p.defaultOperators=A,p.evalQuotedToken=Ie,p.evalToken=Ae,p.isFalsy=P,p.isTruthy=N,p.toPromise=er,p.toThenable=tr,p.toValue=f,Object.defineProperty(p,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).liquidjs={})}(this,function(p){"use strict";var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function t(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var m=function(){return(m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function s(s,o,a,u){return new(a=a||Promise)(function(t,e){function r(t){try{i(u.next(t))}catch(t){e(t)}}function n(t){try{i(u.throw(t))}catch(t){e(t)}}function i(e){e.done?t(e.value):new a(function(t){t(e.value)}).then(r,n)}i((u=u.apply(s,o||[])).next())})}function S(r,n){var i,s,o,t,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,s&&(o=2&e[0]?s.return:e[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,e[1])).done)return o;switch(s=0,o&&(e=[2&e[0],o.value]),e[0]){case 0:case 1:o=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,s=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(o=0<(o=a.trys).length&&o[o.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!o||e[1]>o[0]&&e[1]<o[3])){a.label=e[1];break}if(6===e[0]&&a.label<o[1]){a.label=o[1],o=e;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(e);break}o[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(r,a)}catch(t){e=[6,t],s=0}finally{i=o=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function q(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function w(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(n=s.next()).done;)o.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(w(arguments[e]));return t}var i=(e.prototype.valueOf=function(){},e.prototype.liquidMethodMissing=function(t){},e);function e(){}var r=Object.prototype.toString,o=String.prototype.toLowerCase;function a(t){return"[object String]"===r.call(t)}function u(t){return"function"==typeof t}function c(t){return h(t=f(t))?"":String(t)}function f(t){return t instanceof i?t.valueOf():t}function l(t){return"number"==typeof t}function h(t){return null==t}function d(t){return"[object Array]"===r.call(t)}function v(t,e){for(var r in t=t||{})if(t.hasOwnProperty(r)&&!1===e(t[r],r,t))break;return t}function g(t){return t[t.length-1]}function y(t){var e=typeof t;return null!==t&&("object"==e||"function"==e)}function b(t,e,r){void 0===r&&(r=1);for(var n=[],i=t;i<e;i+=r)n.push(i);return n}function k(t,e,r){return void 0===r&&(r=" "),x(t,e,r,function(t,e){return e+t})}function x(t,e,r,n){for(var i=e-(t=String(t)).length;0<i--;)t=n(t,r);return t}function O(t){return t}function E(t){return t.replace(/(\w?)([A-Z])/g,function(t,e,r){return(e?e+"_":"")+r.toLowerCase()})}function R(t,e){return null==t&&null==e?0:null==t?1:null==e?-1:(t=o.call(t))<(e=o.call(e))?-1:e<t?1:0}var L=function(t,e,r,n){this.key=t,this.value=e,this.next=r,this.prev=n},F=(M.prototype.write=function(t,e){if(this.cache[t])this.cache[t].value=e;else{var r=new L(t,e,this.head.next,this.head);this.head.next.prev=r,this.head.next=r,this.cache[t]=r,this.size++,this.ensureLimit()}},M.prototype.read=function(t){if(this.cache[t]){var e=this.cache[t].value;return this.remove(t),this.write(t,e),e}},M.prototype.remove=function(t){var e=this.cache[t];e.prev.next=e.next,e.next.prev=e.prev,delete this.cache[t],this.size--},M.prototype.clear=function(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}},M.prototype.ensureLimit=function(){this.size>this.limit&&this.remove(this.tail.prev.key)},M);function M(t,e){void 0===e&&(e=0),this.limit=t,this.size=e,this.cache={},this.head=new L("HEAD",null,null,null),this.tail=new L("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}var D=Object.freeze({resolve:function(t,e,i){return t.length&&"/"!==g(t)&&(t+="/"),function(t,e){var r=document.createElement("base");r.href=t;var n=document.getElementsByTagName("head")[0];n.insertBefore(r,n.firstChild);var i=document.createElement("a");i.href=e;var s=i.href;return n.removeChild(r),s}(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(t,e,r){var n=r.split("/").pop();return/\.\w+$/.test(n)?t:e+r+i})},readFile:function(n){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,new Promise(function(t,e){var r=new XMLHttpRequest;r.onload=function(){200<=r.status&&r.status<300?t(r.responseText):e(new Error(r.statusText))},r.onerror=function(){e(new Error("An error occurred whilst receiving the response."))},r.open("GET",n),r.send()})]})})},readFileSync:function(t){var e=new XMLHttpRequest;if(e.open("GET",t,!1),e.send(),e.status<200||300<=e.status)throw new Error(e.statusText);return e.responseText},exists:function(t){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,!0]})})},existsSync:function(t){return!0}});function N(t){return t&&u(t.equals)}function P(t,e){return!A(t,e)}function A(t,e){return e.opts.jsTruthy?!t:!1===t||null==t}var I={"==":function(t,e){return N(t)?t.equals(e):N(e)?e.equals(t):t===e},"!=":function(t,e){return N(t)?!t.equals(e):N(e)?!e.equals(t):t!==e},">":function(t,e){return N(t)?t.gt(e):N(e)?e.lt(t):e<t},"<":function(t,e){return N(t)?t.lt(e):N(e)?e.gt(t):t<e},">=":function(t,e){return N(t)?t.geq(e):N(e)?e.leq(t):e<=t},"<=":function(t,e){return N(t)?t.leq(e):N(e)?e.geq(t):t<=e},contains:function(t,e){return!(!t||!u(t.indexOf))&&-1<t.indexOf(e)},and:function(t,e,r){return P(t,r)&&P(e,r)},or:function(t,e,r){return P(t,r)||P(e,r)}},V=[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],_=1,j=4,B=16;function z(t){var e,r,n={};try{for(var i=q(Object.entries(t)),s=i.next();!s.done;s=i.next()){for(var o=w(s.value,2),a=o[0],u=o[1],c=n,l=0;l<a.length;l++){var h=a[l];c[h]=c[h]||{},l===a.length-1&&V[a.charCodeAt(l)]&_&&(c[h].needBoundary=!0),c=c[h]}c.handler=u,c.end=!0}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}V[160]=V[5760]=V[6158]=V[8192]=V[8193]=V[8194]=V[8195]=V[8196]=V[8197]=V[8198]=V[8199]=V[8200]=V[8201]=V[8202]=V[8232]=V[8233]=V[8239]=V[8287]=V[12288]=j;var C={root:["."],cache:void 0,extname:"",fs:D,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,lenientIf:!1,globals:{},keepOutputType:!1,operators:I,operatorsTrie:z(I)};function H(t){if((t=t||{}).hasOwnProperty("root")&&(t.root=K(t.root)),t.hasOwnProperty("cache")){var e=void 0;e="number"==typeof t.cache?0<t.cache?new F(t.cache):void 0:"object"==typeof t.cache?t.cache:t.cache?new F(1024):void 0,t.cache=e}return t.hasOwnProperty("operators")&&(t.operatorsTrie=z(t.operators)),t}function K(t){return d(t)?t:a(t)?[t]:[]}var U,Q=(t(W,U=Error),W.prototype.update=function(){var t=this.originalError;this.context=function(t){var e=w(t.getPosition(),1)[0],r=t.input.split("\n"),n=Math.max(e-2,1),i=Math.min(e+3,r.length);return b(n,i+1).map(function(t){return(t===e?">> ":" ")+k(String(t),String(i).length)+"| "+r[t-1]}).join("\n")}(this.token),this.message=function(t,e){e.file&&(t+=", file:"+e.file);var r=w(e.getPosition(),2),n=r[0],i=r[1];return t+=", line:"+n+", col:"+i}(t.message,this.token),this.stack=this.message+"\n"+this.context+"\n"+this.stack+"\nFrom "+t.stack},W);function W(t,e){var r=U.call(this,t.message)||this;return r.originalError=t,r.token=e,r.context="",r}var J,Y=(t(Z,J=Q),Z);function Z(t,e){var r=J.call(this,new Error(t),e)||this;return r.name="TokenizationError",J.prototype.update.call(r),r}var $,G=(t(X,$=Q),X);function X(t,e){var r=$.call(this,t,e)||this;return r.name="ParseError",r.message=t.message,$.prototype.update.call(r),r}var tt,et=(t(rt,tt=Q),rt.is=function(t){return"RenderError"===t.name},rt);function rt(t,e){var r=tt.call(this,t,e.token)||this;return r.name="RenderError",r.message=t.message,tt.prototype.update.call(r),r}var nt,it=(t(st,nt=Q),st);function st(t,e){var r=nt.call(this,t,e)||this;return r.name="UndefinedVariableError",r.message=t.message,nt.prototype.update.call(r),r}var ot,at=(t(ut,ot=Error),ut);function ut(t){var e=ot.call(this,"undefined variable: "+t)||this;return e.name="InternalUndefinedVariableError",e.variableName=t,e}var ct,lt=(t(ht,ct=Error),ht);function ht(t){var e=ct.call(this,t)||this;return e.name="AssertionError",e.message=t+"",e}var pt,ft=(dt.prototype.getRegister=function(t,e){return void 0===e&&(e={}),this.registers[t]=this.registers[t]||e},dt.prototype.setRegister=function(t,e){return this.registers[t]=e},dt.prototype.saveRegister=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.map(function(t){return[t,e.getRegister(t)]})},dt.prototype.restoreRegister=function(t){var i=this;return t.forEach(function(t){var e=w(t,2),r=e[0],n=e[1];return i.setRegister(r,n)})},dt.prototype.getAll=function(){return T([this.globals,this.environments],this.scopes).reduce(function(t,e){return m(t,e)},{})},dt.prototype.get=function(t){var e=this.findScope(t[0]);return this.getFromScope(e,t)},dt.prototype.getFromScope=function(t,e){var r=this;return"string"==typeof e&&(e=e.split(".")),e.reduce(function(t,e){if(h(t=function(t,e){return h(t)?t:u((t=function t(e){return e&&u(e.toLiquid)?t(e.toLiquid()):e}(t))[e])?t[e]():t instanceof i?t.hasOwnProperty(e)?t[e]:t.liquidMethodMissing(e):"size"===e?function(t){return d(t)||a(t)?t.length:t.size}(t):"first"===e?function(t){return d(t)?t[0]:t.first}(t):"last"===e?function(t){return d(t)?t[t.length-1]:t.last}(t):t[e]}(t,e))&&r.opts.strictVariables)throw new at(e);return t},t)},dt.prototype.push=function(t){return this.scopes.push(t)},dt.prototype.pop=function(){return this.scopes.pop()},dt.prototype.bottom=function(){return this.scopes[0]},dt.prototype.findScope=function(t){for(var e=this.scopes.length-1;0<=e;e--){var r=this.scopes[e];if(t in r)return r}return t in this.environments?this.environments:this.globals},dt);function dt(t,e,r){void 0===t&&(t={}),void 0===e&&(e=C),void 0===r&&(r=!1),this.scopes=[{}],this.registers={},this.sync=r,this.opts=e,this.globals=e.globals,this.environments=t}function vt(t){return!!(qt(t)&p.TokenKind.Delimited)}function gt(t){return qt(t)===p.TokenKind.Operator}function yt(t){return qt(t)===p.TokenKind.HTML}function mt(t){return qt(t)===p.TokenKind.Output}function wt(t){return qt(t)===p.TokenKind.Tag}function Tt(t){return qt(t)===p.TokenKind.Quoted}function bt(t){return qt(t)===p.TokenKind.Literal}function kt(t){return qt(t)===p.TokenKind.Number}function xt(t){return qt(t)===p.TokenKind.PropertyAccess}function Ot(t){return qt(t)===p.TokenKind.Word}function St(t){return qt(t)===p.TokenKind.Range}function qt(t){return t?t.kind:-1}(pt=p.TokenKind||(p.TokenKind={}))[pt.Number=1]="Number",pt[pt.Literal=2]="Literal",pt[pt.Tag=4]="Tag",pt[pt.Output=8]="Output",pt[pt.HTML=16]="HTML",pt[pt.Filter=32]="Filter",pt[pt.Hash=64]="Hash",pt[pt.PropertyAccess=128]="PropertyAccess",pt[pt.Word=256]="Word",pt[pt.Range=512]="Range",pt[pt.Quoted=1024]="Quoted",pt[pt.Operator=2048]="Operator",pt[pt.Delimited=12]="Delimited";var Et=Object.freeze({isDelimitedToken:vt,isOperatorToken:gt,isHTMLToken:yt,isOutputToken:mt,isTagToken:wt,isQuotedToken:Tt,isLiteralToken:bt,isNumberToken:kt,isPropertyAccessToken:xt,isWordToken:Ot,isRangeToken:St});function Rt(t,e){if(t&&yt(t))for(var r=e?j:B;V[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Lt(t,e){if(t&&yt(t)){for(var r=e?j:B;V[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;"\n"===t.input.charAt(t.begin+t.trimLeft)&&t.trimLeft++}}var Ft=(Mt.prototype.getText=function(){return this.input.slice(this.begin,this.end)},Mt.prototype.getPosition=function(){for(var t=w([1,1],2),e=t[0],r=t[1],n=0;n<this.begin;n++)"\n"===this.input[n]?(e++,r=1):r++;return[e,r]},Mt.prototype.size=function(){return this.end-this.begin},Mt);function Mt(t,e,r,n,i){this.kind=t,this.input=e,this.begin=r,this.end=n,this.file=i}var Dt,Nt=(t(Pt,Dt=Ft),Pt);function Pt(t,e){var r=Dt.call(this,p.TokenKind.Number,t.input,t.begin,e?e.end:t.end,t.file)||this;return r.whole=t,r.decimal=e,r}var At,It=(t(Vt,At=Ft),Vt.prototype.isNumber=function(t){void 0===t&&(t=!1);for(var e=t&&64&V[this.input.charCodeAt(this.begin)]?this.begin+1:this.begin;e<this.end;e++)if(!(32&V[this.input.charCodeAt(e)]))return!1;return!0},Vt);function Vt(t,e,r,n){var i=At.call(this,p.TokenKind.Word,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.content=i.getText(),i}var _t,jt=(t(Bt,_t=i),Bt.prototype.equals=function(t){return h(f(t))},Bt.prototype.gt=function(){return!1},Bt.prototype.geq=function(){return!1},Bt.prototype.lt=function(){return!1},Bt.prototype.leq=function(){return!1},Bt.prototype.valueOf=function(){return null},Bt);function Bt(){return null!==_t&&_t.apply(this,arguments)||this}var zt,Ct=(t(Ht,zt=i),Ht.prototype.equals=function(t){return!(t instanceof Ht||(a(t=f(t))||d(t)?0!==t.length:!y(t)||0!==Object.keys(t).length))},Ht.prototype.gt=function(){return!1},Ht.prototype.geq=function(){return!1},Ht.prototype.lt=function(){return!1},Ht.prototype.leq=function(){return!1},Ht.prototype.valueOf=function(){return""},Ht);function Ht(){return null!==zt&&zt.apply(this,arguments)||this}var Kt,Ut=(t(Qt,Kt=Ct),Qt.prototype.equals=function(t){return!1===t||!!h(f(t))||(a(t)?/^\s*$/.test(t):Kt.prototype.equals.call(this,t))},Qt);function Qt(){return null!==Kt&&Kt.apply(this,arguments)||this}var Wt,Jt=new jt,Yt={true:!0,false:!1,nil:Jt,null:Jt,empty:new Ct,blank:new Ut},Zt=(t($t,Wt=Ft),$t);function $t(t,e,r,n){var i=Wt.call(this,p.TokenKind.Literal,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.literal=i.getText(),i}var Gt,Xt={"==":1,"!=":1,">":1,"<":1,">=":1,"<=":1,contains:1,and:0,or:0},te=(t(ee,Gt=Ft),ee.prototype.getPrecedence=function(){var t=this.getText();return t in Xt?Xt[t]:1},ee);function ee(t,e,r,n){var i=Gt.call(this,p.TokenKind.Operator,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.operator=i.getText(),i}var re=/[\da-fA-F]/,ne=/[0-7]/,ie={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v"};function se(t){var e=t.charCodeAt(0);return 97<=e?e-87:65<=e?e-55:e-48}function oe(t){for(var e="",r=1;r<t.length-1;r++)if("\\"===t[r])if(void 0!==ie[t[r+1]])e+=ie[t[++r]];else if("u"===t[r+1]){for(var n=0,i=r+2;i<=r+5&&re.test(t[i]);)n=16*n+se(t[i++]);r=i-1,e+=String.fromCharCode(n)}else if(ne.test(t[r+1])){for(i=r+1,n=0;i<=r+3&&ne.test(t[i]);)n=8*n+se(t[i++]);r=i-1,e+=String.fromCharCode(n)}else e+=t[++r];else e+=t[r];return e}var ae,ue=(t(ce,ae=Ft),ce.prototype.getVariableAsText=function(){return this.variable instanceof It?this.variable.getText():oe(this.variable.getText())},ce);function ce(t,e,r){var n=ae.call(this,p.TokenKind.PropertyAccess,t.input,t.begin,r,t.file)||this;return n.variable=t,n.props=e,n}function le(t,e){if(!t){var r=e?e():"expect "+t+" to be true";throw new lt(r)}}var he,pe=(t(fe,he=Ft),fe);function fe(t,e,r,n,i,s){var o=he.call(this,p.TokenKind.Filter,r,n,i,s)||this;return o.name=t,o.args=e,o}var de,ve=(t(ge,de=Ft),ge);function ge(t,e,r,n,i,s){var o=de.call(this,p.TokenKind.Hash,t,e,r,s)||this;return o.input=t,o.begin=e,o.end=r,o.name=n,o.value=i,o.file=s,o}var ye,me=(t(we,ye=Ft),we);function we(t,e,r,n){var i=ye.call(this,p.TokenKind.Quoted,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i}var Te,be=(t(ke,Te=Ft),ke.prototype.getContent=function(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)},ke);function ke(t,e,r,n){var i=Te.call(this,p.TokenKind.HTML,t,e,r,n)||this;return i.input=t,i.begin=e,i.end=r,i.file=n,i.trimLeft=0,i.trimRight=0,i}var xe,Oe=(t(Se,xe=Ft),Se);function Se(t,e,r,n,i,s,o,a){var u=xe.call(this,t,r,n,i,a)||this;u.trimLeft=!1,u.trimRight=!1,u.content=u.getText();var c="-"===e[0],l="-"===g(e);return u.content=e.slice(c?1:0,l?-1:e.length).trim(),u.trimLeft=c||s,u.trimRight=l||o,u}var qe,Ee=(t(Re,qe=Oe),Re);function Re(t,e,r,n,i){var s=this,o=n.trimTagLeft,a=n.trimTagRight,u=n.tagDelimiterLeft,c=n.tagDelimiterRight,l=t.slice(e+u.length,r-c.length);s=qe.call(this,p.TokenKind.Tag,l,t,e,r,o,a,i)||this;var h=new je(s.content,n.operatorsTrie);if(s.name=h.readIdentifier().getText(),!s.name)throw new Y("illegal tag syntax",s);return h.skipBlank(),s.args=h.remaining(),s}var Le,Fe=(t(Me,Le=Ft),Me);function Me(t,e,r,n,i,s){var o=Le.call(this,p.TokenKind.Range,t,e,r,s)||this;return o.input=t,o.begin=e,o.end=r,o.lhs=n,o.rhs=i,o.file=s,o}var De,Ne=(t(Pe,De=Oe),Pe);function Pe(t,e,r,n,i){var s=n.trimOutputLeft,o=n.trimOutputRight,a=n.outputDelimiterLeft,u=n.outputDelimiterRight,c=t.slice(e+a.length,r-u.length);return De.call(this,p.TokenKind.Output,c,t,e,r,s,o,i)||this}var Ae=(Ie.prototype.evaluate=function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d;return S(this,function(t){switch(t.label){case 0:le(e,function(){return"unable to evaluate: context not defined"}),n=[],t.label=1;case 1:t.trys.push([1,9,10,11]),i=q(this.postfix),s=i.next(),t.label=2;case 2:return s.done?[3,8]:gt(o=s.value)?[4,n.pop()]:[3,5];case 3:return a=t.sent(),[4,n.pop()];case 4:return u=t.sent(),c=function(t,e,r,n,i){return(0,t[e.operator])(r,n,i)}(e.opts.operators,o,u,a,e),n.push(c),[3,7];case 5:return h=(l=n).push,[4,Ve(o,e,r&&1===this.postfix.length)];case 6:h.apply(l,[t.sent()]),t.label=7;case 7:return s=i.next(),[3,2];case 8:return[3,11];case 9:return p=t.sent(),f={error:p},[3,11];case 10:try{s&&!s.done&&(d=i.return)&&d.call(i)}finally{if(f)throw f.error}return[7];case 11:return[2,n[0]]}})},Ie);function Ie(t){this.postfix=T(function(e){var r,n,i,s,o,a,u;return S(this,function(t){switch(t.label){case 0:r=[],t.label=1;case 1:t.trys.push([1,10,11,12]),n=q(e),i=n.next(),t.label=2;case 2:if(i.done)return[3,9];if(!gt(s=i.value))return[3,6];t.label=3;case 3:return r.length&&r[r.length-1].getPrecedence()>s.getPrecedence()?[4,r.pop()]:[3,5];case 4:return t.sent(),[3,3];case 5:return r.push(s),[3,8];case 6:return[4,s];case 7:t.sent(),t.label=8;case 8:return i=n.next(),[3,2];case 9:return[3,12];case 10:return o=t.sent(),a={error:o},[3,12];case 11:try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(a)throw a.error}return[7];case 12:return r.length?[4,r.pop()]:[3,14];case 13:return t.sent(),[3,12];case 14:return[2]}})}(t))}function Ve(t,e,r){return void 0===r&&(r=!1),xt(t)?function(e,r,n){var t=e.getVariableAsText(),i=e.props.map(function(t){return Ve(t,r,!1)});try{return r.get(T([t],i))}catch(t){if(n&&"InternalUndefinedVariableError"===t.name)return null;throw new it(t,e)}}(t,e,r):St(t)?function(t,e){var r=Ve(t.lhs,e),n=Ve(t.rhs,e);return b(+r,+n+1)}(t,e):bt(t)?function(t){return Yt[t.literal]}(t):kt(t)?function(t){var e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}(t):Ot(t)?t.getText():Tt(t)?_e(t):void 0}function _e(t){return oe(t.getText())}var je=(Be.prototype.readExpression=function(){return new Ae(this.readExpressionTokens())},Be.prototype.readExpressionTokens=function(){var e,r,n;return S(this,function(t){switch(t.label){case 0:return(e=this.readValue())?[4,e]:[2];case 1:t.sent(),t.label=2;case 2:return this.p<this.N?(r=this.readOperator())&&(n=this.readValue())?[4,r]:[2]:[3,5];case 3:return t.sent(),[4,n];case 4:return t.sent(),[3,2];case 5:return[2]}})},Be.prototype.readOperator=function(){this.skipBlank();var t=function(t,e,r,n){void 0===n&&(n=t.length);for(var i,s=r,o=e;s[t[o]]&&o<n;)(s=s[t[o++]]).end&&(i=s);return i?i.needBoundary&&V[t.charCodeAt(o)]&_?-1:o:-1}(this.input,this.p,this.trie,this.p+8);if(-1!==t)return new te(this.input,this.p,this.p=t,this.file)},Be.prototype.readFilters=function(){for(var t=[];;){var e=this.readFilter();if(!e)return t;t.push(e)}},Be.prototype.readFilter=function(){var t=this;if(this.skipBlank(),this.end())return null;le("|"===this.peek(),function(){return"unexpected token at "+t.snapshot()}),this.p++;var e=this.p,r=this.readIdentifier();if(!r.size())return null;var n=[];if(this.skipBlank(),":"===this.peek())do{++this.p;var i=this.readFilterArg();for(i&&n.push(i);this.p<this.N&&","!==this.peek()&&"|"!==this.peek();)++this.p}while(","===this.peek());return new pe(r.getText(),n,this.input,e,this.p,this.file)},Be.prototype.readFilterArg=function(){var t=this.readValue();if(t){if(this.skipBlank(),":"!==this.peek())return t;++this.p;var e=this.readValue();return[t.getText(),e]}},Be.prototype.readTopLevelTokens=function(t){void 0===t&&(t=C);for(var e=[];this.p<this.N;){var r=this.readTopLevelToken(t);e.push(r)}return function(t,e){for(var r=!1,n=0;n<t.length;n++){var i=t[n];vt(i)&&(!r&&i.trimLeft&&Rt(t[n-1],e.greedy),wt(i)&&("raw"===i.name?r=!0:"endraw"===i.name&&(r=!1)),!r&&i.trimRight&&Lt(t[n+1],e.greedy))}}(e,t),e},Be.prototype.readTopLevelToken=function(t){var e=t.tagDelimiterLeft,r=t.outputDelimiterLeft;return-1<this.rawBeginAt?this.readEndrawOrRawContent(t):this.match(e)?this.readTagToken(t):this.match(r)?this.readOutputToken(t):this.readHTMLToken(t)},Be.prototype.readHTMLToken=function(t){for(var e=this.p;this.p<this.N;){var r=t.tagDelimiterLeft,n=t.outputDelimiterLeft;if(this.match(r))break;if(this.match(n))break;++this.p}return new be(this.input,e,this.p,this.file)},Be.prototype.readTagToken=function(t){void 0===t&&(t=C);var e=this.file,r=this.input,n=this.p;if(-1===this.readToDelimiter(t.tagDelimiterRight))throw this.mkError("tag "+this.snapshot(n)+" not closed",n);var i=new Ee(r,n,this.p,t,e);return"raw"===i.name&&(this.rawBeginAt=n),i},Be.prototype.readToDelimiter=function(t){for(;this.p<this.N;)if(8&this.peekType())this.readQuoted();else if(++this.p,this.rmatch(t))return this.p;return-1},Be.prototype.readOutputToken=function(t){void 0===t&&(t=C);var e=this.file,r=this.input,n=t.outputDelimiterRight,i=this.p;if(-1===this.readToDelimiter(n))throw this.mkError("output "+this.snapshot(i)+" not closed",i);return new Ne(r,i,this.p,t,e)},Be.prototype.readEndrawOrRawContent=function(t){for(var e=t.tagDelimiterLeft,r=t.tagDelimiterRight,n=this.p,i=this.readTo(e)-e.length;this.p<this.N;)if("endraw"===this.readIdentifier().getText())for(;this.p<=this.N;){if(this.rmatch(r)){var s=this.p;return n===i?(this.rawBeginAt=-1,new Ee(this.input,n,s,t,this.file)):(this.p=i,new be(this.input,n,i,this.file))}if(this.rmatch(e))break;this.p++}else i=this.readTo(e)-e.length;throw this.mkError("raw "+this.snapshot(this.rawBeginAt)+" not closed",n)},Be.prototype.mkError=function(t,e){return new Y(t,new It(this.input,e,this.N,this.file))},Be.prototype.snapshot=function(t){return void 0===t&&(t=this.p),JSON.stringify(function(t,e){return t.length>e?t.substr(0,e-3)+"...":t}(this.input.slice(t),16))},Be.prototype.readWord=function(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()},Be.prototype.readIdentifier=function(){this.skipBlank();for(var t=this.p;this.peekType()&_;)++this.p;return new It(this.input,t,this.p,this.file)},Be.prototype.readHashes=function(){for(var t=[];;){var e=this.readHash();if(!e)return t;t.push(e)}},Be.prototype.readHash=function(){this.skipBlank(),","===this.peek()&&++this.p;var t,e=this.p,r=this.readIdentifier();if(r.size())return this.skipBlank(),":"===this.peek()&&(++this.p,t=this.readValue()),new ve(this.input,e,this.p,r,t,this.file)},Be.prototype.remaining=function(){return this.input.slice(this.p)},Be.prototype.advance=function(t){void 0===t&&(t=1),this.p+=t},Be.prototype.end=function(){return this.p>=this.N},Be.prototype.readTo=function(t){for(;this.p<this.N;)if(++this.p,this.rmatch(t))return this.p;return-1},Be.prototype.readValue=function(){var t=this.readQuoted()||this.readRange();if(t)return t;if("["===this.peek()){if(this.p++,!(i=this.readQuoted()))return;if("]"!==this.peek())return;return this.p++,new ue(i,[],this.p)}var e=this.readIdentifier();if(e.size()){for(var r=e.isNumber(!0),n=[];;)if("["===this.peek()){r=!1,this.p++;var i=this.readValue()||new It(this.input,this.p,this.p,this.file);this.readTo("]"),n.push(i)}else{if("."!==this.peek()||"."===this.peek(1))break;if(this.p++,!(i=this.readIdentifier()).size())break;i.isNumber()||(r=!1),n.push(i)}return!n.length&&Yt.hasOwnProperty(e.content)?new Zt(this.input,e.begin,e.end,this.file):r?new Nt(e,n[0]):new ue(e,n,this.p)}},Be.prototype.readRange=function(){this.skipBlank();var t=this.p;if("("===this.peek()){++this.p;var e=this.readValueOrThrow();this.p+=2;var r=this.readValueOrThrow();return++this.p,new Fe(this.input,t,this.p,e,r,this.file)}},Be.prototype.readValueOrThrow=function(){var t=this,e=this.readValue();return le(e,function(){return"unexpected token "+t.snapshot()+", value expected"}),e},Be.prototype.readQuoted=function(){this.skipBlank();var t=this.p;if(8&this.peekType()){++this.p;for(var e=!1;this.p<this.N&&(++this.p,this.input[this.p-1]!==this.input[t]||e);)e?e=!1:"\\"===this.input[this.p-1]&&(e=!0);return new me(this.input,t,this.p,this.file)}},Be.prototype.readFileName=function(){for(var t=this.p;!(this.peekType()&j)&&","!==this.peek()&&this.p<this.N;)this.p++;return new It(this.input,t,this.p,this.file)},Be.prototype.match=function(t){for(var e=0;e<t.length;e++)if(t[e]!==this.input[this.p+e])return!1;return!0},Be.prototype.rmatch=function(t){for(var e=0;e<t.length;e++)if(t[t.length-1-e]!==this.input[this.p-1-e])return!1;return!0},Be.prototype.peekType=function(t){return void 0===t&&(t=0),V[this.input.charCodeAt(this.p+t)]},Be.prototype.peek=function(t){return void 0===t&&(t=0),this.input[this.p+t]},Be.prototype.skipBlank=function(){for(;this.peekType()&j;)++this.p},Be);function Be(t,e,r){void 0===r&&(r=""),this.input=t,this.trie=e,this.file=r,this.p=0,this.rawBeginAt=-1,this.N=t.length}var ze=(Ce.prototype.write=function(t){t=!0===this.keepOutputType?f(t):c(f(t)),!0===this.keepOutputType&&"string"!=typeof t&&""===this.html?this.html=t:this.html=c(this.html)+c(t)},Ce);function Ce(t){this.html="",this.break=!1,this.continue=!1,this.keepOutputType=!1,this.keepOutputType=t}var He=(Ke.prototype.renderTemplates=function(e,r,n){var i,s,o,a,u,c,l,h;return S(this,function(t){switch(t.label){case 0:n=n||new ze(r.opts.keepOutputType),t.label=1;case 1:t.trys.push([1,8,9,10]),i=q(e),s=i.next(),t.label=2;case 2:if(s.done)return[3,7];o=s.value,t.label=3;case 3:return t.trys.push([3,5,,6]),[4,o.render(r,n)];case 4:return(a=t.sent())&&n.write(a),n.break||n.continue?[3,7]:[3,6];case 5:throw u=t.sent(),et.is(u)?u:new et(u,o);case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return c=t.sent(),l={error:c},[3,10];case 9:try{s&&!s.done&&(h=i.return)&&h.call(i)}finally{if(l)throw l.error}return[7];case 10:return[2,n.html]}})},Ke);function Ke(){}var Ue=(Qe.prototype.on=function(t,e){return this.handlers[t]=e,this},Qe.prototype.trigger=function(t,e){var r=this.handlers[t];return!!r&&(r(e),!0)},Qe.prototype.start=function(){var t;for(this.trigger("start");!this.stopRequested&&(t=this.tokens.shift());)if(!(this.trigger("token",t)||wt(t)&&this.trigger("tag:"+t.name,t))){var e=this.parseToken(t,this.tokens);this.trigger("template",e)}return this.stopRequested||this.trigger("end"),this},Qe.prototype.stop=function(){return this.stopRequested=!0,this},Qe);function Qe(t,e){this.handlers={},this.stopRequested=!1,this.tokens=t,this.parseToken=e}function We(t){this.token=t}var Je=(Ye.prototype.render=function(e){var r,n,i,s,o,a,u,c,l;return S(this,function(t){switch(t.label){case 0:r={},t.label=1;case 1:t.trys.push([1,6,7,8]),n=q(Object.keys(this.hash)),i=n.next(),t.label=2;case 2:return i.done?[3,5]:(s=i.value,o=r,a=s,[4,Ve(this.hash[s],e)]);case 3:o[a]=t.sent(),t.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return u=t.sent(),c={error:u},[3,8];case 7:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(c)throw c.error}return[7];case 8:return[2,r]}})},Ye);function Ye(t){var e,r;this.hash={};var n=new je(t,{});try{for(var i=q(n.readHashes()),s=i.next();!s.done;s=i.next()){var o=s.value;this.hash[o.name.content]=o.value}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}var Ze=($e.prototype.render=function(t,e){var r,n,i=[];try{for(var s=q(this.args),o=s.next();!o.done;o=s.next()){var a=o.value;d(a)?i.push([a[0],Ve(a[1],e)]):i.push(Ve(a,e))}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this.impl.apply({context:e,liquid:this.liquid},T([t],i))},$e);function $e(t,e,r,n){this.name=t,this.impl=e||O,this.args=r,this.liquid=n}var Ge=(Xe.prototype.value=function(e,r){var n,i,s,o,a,u;return S(this,function(t){switch(t.label){case 0:return r=r||e.opts.lenientIf&&0<this.filters.length&&"default"===this.filters[0].name,[4,this.initial.evaluate(e,r)];case 1:n=t.sent(),t.label=2;case 2:t.trys.push([2,7,8,9]),i=q(this.filters),s=i.next(),t.label=3;case 3:return s.done?[3,6]:[4,s.value.render(n,e)];case 4:n=t.sent(),t.label=5;case 5:return s=i.next(),[3,3];case 6:return[3,9];case 7:return o=t.sent(),a={error:o},[3,9];case 8:try{s&&!s.done&&(u=i.return)&&u.call(i)}finally{if(a)throw a.error}return[7];case 9:return[2,n]}})},Xe);function Xe(t,n){this.filters=[];var e=new je(t,n.options.operatorsTrie);this.initial=e.readExpression(),this.filters=e.readFilters().map(function(t){var e=t.name,r=t.args;return new Ze(e,n.filters.get(e),r,n)})}function tr(e){var t={then:function(t){return t(e)},catch:function(){return t}};return t}function er(r){var n={then:function(t,e){return e?e(r):n},catch:function(t){return t(r)}};return n}function rr(n){return function(t){return t&&u(t.then)}(n)?n:function(t){return t&&u(t.next)&&u(t.throw)&&u(t.return)}(n)?function r(t){var e;try{e=n.next(t)}catch(t){return er(t)}if(e.done)return tr(e.value);return rr(e.value).then(r,function(t){var e;try{e=n.throw(t)}catch(t){return er(t)}return e.done?tr(e.value):r(e.value)})}():tr(n)}function nr(t){return Promise.resolve(rr(t))}function ir(t){var e;return rr(t).then(function(t){return tr(e=t)}).catch(function(t){throw t}),e}var sr,or=(t(ar,sr=We),ar.prototype.render=function(e,r){var n,i;return S(this,function(t){switch(t.label){case 0:return[4,new Je(this.token.args).render(e)];case 1:return n=t.sent(),u((i=this.impl).render)?[4,i.render(e,r,n)]:[3,3];case 2:return[2,t.sent()];case 3:return[2]}})},ar);function ar(t,e,r){var n=sr.call(this,t)||this;n.name=t.name;var i=r.tags.get(t.name);return n.impl=Object.create(i),n.impl.liquid=r,n.impl.parse&&n.impl.parse(t,e),n}var ur,cr=(t(lr,ur=We),lr.prototype.render=function(e,r){var n;return S(this,function(t){switch(t.label){case 0:return[4,this.value.value(e,!1)];case 1:return n=t.sent(),r.write(n),[2]}})},lr);function lr(t,e){var r=ur.call(this,t)||this;return r.value=new Ge(t.content,e),r}var hr,pr=(t(fr,hr=We),fr.prototype.render=function(t,e){return S(this,function(t){return e.write(this.str),[2]})},fr);function fr(t){var e=hr.call(this,t)||this;return e.str=t.getContent(),e}var dr=(vr.prototype.parse=function(t){for(var e,r=[];e=t.shift();)r.push(this.parseToken(e,t));return r},vr.prototype.parseToken=function(e,t){try{return wt(e)?new or(e,t,this.liquid):mt(e)?new cr(e,this.liquid):new pr(e)}catch(t){throw new G(t,e)}},vr.prototype.parseStream=function(t){var r=this;return new Ue(t,function(t,e){return r.parseToken(t,e)})},vr);function vr(t){this.liquid=t}var gr={parse:function(t){var e=new je(t.args,this.liquid.options.operatorsTrie);this.key=e.readIdentifier().content,e.skipBlank(),le("="===e.peek(),function(){return"illegal token "+t.getText()}),e.advance(),this.value=e.remaining()},render:function(e){var r,n;return S(this,function(t){switch(t.label){case 0:return r=e.bottom(),n=this.key,[4,this.liquid._evalValue(this.value,e)];case 1:return r[n]=t.sent(),[2]}})}};function yr(e){return d(e)?e:a(e)&&0<e.length?[e]:y(e)?Object.keys(e).map(function(t){return[t,e[t]]}):[]}function mr(t){return d(t)?t:[t]}var wr,Tr=(t(br,wr=i),br.prototype.next=function(){this.i++},br.prototype.index0=function(){return this.i},br.prototype.index=function(){return this.i+1},br.prototype.first=function(){return 0===this.i},br.prototype.last=function(){return this.i===this.length-1},br.prototype.rindex=function(){return this.length-this.i},br.prototype.rindex0=function(){return this.length-this.i-1},br.prototype.valueOf=function(){return JSON.stringify(this)},br);function br(t){var e=wr.call(this)||this;return e.i=0,e.length=t,e}var kr={type:"block",parse:function(t,e){var r,n=this,i=new je(t.args,this.liquid.options.operatorsTrie),s=i.readIdentifier(),o=i.readIdentifier(),a=i.readValue();le(s.size()&&"in"===o.content&&a,function(){return"illegal tag: "+t.getText()}),this.variable=s.content,this.collection=a,this.hash=new Je(i.remaining()),this.templates=[],this.elseTemplates=[];var u=this.liquid.parser.parseStream(e).on("start",function(){return r=n.templates}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endfor",function(){return u.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});u.start()},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d,v;return S(this,function(t){switch(t.label){case 0:return n=this.liquid.renderer,s=yr,[4,Ve(this.collection,e)];case 1:return(i=s.apply(void 0,[t.sent()])).length?[3,3]:[4,n.renderTemplates(this.elseTemplates,e,r)];case 2:return t.sent(),[2];case 3:return[4,this.hash.render(e)];case 4:o=t.sent(),a=o.offset||0,u=void 0===o.limit?i.length:o.limit,i=i.slice(a,a+u),"reversed"in o&&i.reverse(),c={forloop:new Tr(i.length)},e.push(c),t.label=5;case 5:t.trys.push([5,10,11,12]),l=q(i),h=l.next(),t.label=6;case 6:return h.done?[3,9]:(p=h.value,c[this.variable]=p,[4,n.renderTemplates(this.templates,e,r)]);case 7:if(t.sent(),r.break)return r.break=!1,[3,9];r.continue=!1,c.forloop.next(),t.label=8;case 8:return h=l.next(),[3,6];case 9:return[3,12];case 10:return f=t.sent(),d={error:f},[3,12];case 11:try{h&&!h.done&&(v=l.return)&&v.call(l)}finally{if(d)throw d.error}return[7];case 12:return e.pop(),[2]}})}},xr={parse:function(t,e){var r=this,n=new je(t.args,this.liquid.options.operatorsTrie);this.variable=function(t){var e=t.readIdentifier().content;if(e)return e;var r=t.readQuoted();if(r)return _e(r)}(n),le(this.variable,function(){return t.args+" not valid identifier"}),this.templates=[];var i=this.liquid.parser.parseStream(e);i.on("tag:endcapture",function(){return i.stop()}).on("template",function(t){return r.templates.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")}),i.start()},render:function(e){var r;return S(this,function(t){switch(t.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,e)];case 1:return r=t.sent(),e.bottom()[this.variable]=r,[2]}})}};var Or,Sr,qr={parse:function(t,e){var r=this;this.cond=new Ge(t.args,this.liquid),this.cases=[],this.elseTemplates=[];var n=[],i=this.liquid.parser.parseStream(e).on("tag:when",function(t){r.cases.push({val:new Ge(t.args,r.liquid),templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endcase",function(){return i.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n,i,s,o,a,u,c,l,h,p;return S(this,function(t){switch(t.label){case 0:return n=this.liquid.renderer,s=f,[4,this.cond.value(e,e.opts.lenientIf)];case 1:i=s.apply(void 0,[t.sent()]),t.label=2;case 2:t.trys.push([2,8,9,10]),o=q(this.cases),a=o.next(),t.label=3;case 3:return a.done?[3,7]:(u=a.value,c=f,[4,u.val.value(e,e.opts.lenientIf)]);case 4:return c.apply(void 0,[t.sent()])!==i?[3,6]:[4,n.renderTemplates(u.templates,e,r)];case 5:return t.sent(),[2];case 6:return a=o.next(),[3,3];case 7:return[3,10];case 8:return l=t.sent(),h={error:l},[3,10];case 9:try{a&&!a.done&&(p=o.return)&&p.call(o)}finally{if(h)throw h.error}return[7];case 10:return[4,n.renderTemplates(this.elseTemplates,e,r)];case 11:return t.sent(),[2]}})}},Er={parse:function(t,e){var r=this.liquid.parser.parseStream(e);r.on("token",function(t){"endcomment"===t.name&&r.stop()}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")}),r.start()}};(Sr=Or=Or||{})[Sr.OUTPUT=0]="OUTPUT",Sr[Sr.STORE=1]="STORE";var Rr,Lr=Or,Fr={parse:function(t){var e=t.args,r=new je(e,this.liquid.options.operatorsTrie);this.file=this.liquid.options.dynamicPartials?r.readValue():r.readFileName(),le(this.file,function(){return'illegal argument "'+t.args+'"'});var n=r.p;"with"===r.readIdentifier().content?(r.skipBlank(),":"!==r.peek()?this.withVar=r.readValue():r.p=n):r.p=n,this.hash=new Je(r.remaining())},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d;return S(this,function(t){switch(t.label){case 0:return i=(n=this).liquid,s=n.hash,o=n.withVar,a=n.file,u=i.renderer,e.opts.dynamicPartials?Tt(a)?[4,u.renderTemplates(i.parse(_e(a)),e)]:[3,2]:[3,5];case 1:return h=t.sent(),[3,4];case 2:return[4,Ve(a,e)];case 3:h=t.sent(),t.label=4;case 4:return l=h,[3,6];case 5:l=a.getText(),t.label=6;case 6:return le(c=l,function(){return'illegal filename "'+a.getText()+'":"'+c+'"'}),p=e.saveRegister("blocks","blockMode"),e.setRegister("blocks",{}),e.setRegister("blockMode",Lr.OUTPUT),[4,s.render(e)];case 7:return f=t.sent(),o&&(f[c]=Ve(o,e)),[4,i._parseFile(c,e.opts,e.sync)];case 8:return d=t.sent(),e.push(f),[4,u.renderTemplates(d,e,r)];case 9:return t.sent(),e.pop(),e.restoreRegister(p),[2]}})}},Mr={parse:function(t){var e=t.args,r=new je(e,this.liquid.options.operatorsTrie);for(this.file=this.liquid.options.dynamicPartials?r.readValue():r.readFileName(),le(this.file,function(){return'illegal argument "'+t.args+'"'});!r.end();){r.skipBlank();var n=r.p,i=r.readIdentifier();if(("with"===i.content||"for"===i.content)&&(r.skipBlank(),":"!==r.peek())){var s=r.readValue();if(s){var o=r.p,a=void 0;"as"===r.readIdentifier().content?a=r.readIdentifier():r.p=o,this[i.content]={value:s,alias:a&&a.content},r.skipBlank(),","===r.peek()&&r.advance();continue}}r.p=n;break}this.hash=new Je(r.remaining())},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d,v,g,y,m,w,T,b,k,x,O;return S(this,function(t){switch(t.label){case 0:return i=(n=this).liquid,s=n.file,o=n.hash,a=i.renderer,e.opts.dynamicPartials?Tt(s)?[4,a.renderTemplates(i.parse(_e(s)),e)]:[3,2]:[3,4];case 1:return l=t.sent(),[3,3];case 2:l=Ve(s,e),t.label=3;case 3:return c=l,[3,5];case 4:c=s.getText(),t.label=5;case 5:return le(u=c,function(){return'illegal filename "'+s.getText()+'":"'+u+'"'}),h=new ft({},e.opts,e.sync),[4,o.render(e)];case 6:if(p=t.sent(),this.with&&(f=this.with,v=f.value,g=f.alias,p[g||u]=Ve(v,e)),h.push(p),!this.for)return[3,16];d=this.for,v=d.value,g=d.alias,y=yr(y=Ve(v,e)),p.forloop=new Tr(y.length),t.label=7;case 7:t.trys.push([7,13,14,15]),m=q(y),w=m.next(),t.label=8;case 8:return w.done?[3,12]:(T=w.value,p[g]=T,[4,i._parseFile(u,h.opts,h.sync)]);case 9:return k=t.sent(),[4,a.renderTemplates(k,h,r)];case 10:t.sent(),p.forloop.next(),t.label=11;case 11:return w=m.next(),[3,8];case 12:return[3,15];case 13:return b=t.sent(),x={error:b},[3,15];case 14:try{w&&!w.done&&(O=m.return)&&O.call(m)}finally{if(x)throw x.error}return[7];case 15:return[3,19];case 16:return[4,i._parseFile(u,h.opts,h.sync)];case 17:return k=t.sent(),[4,a.renderTemplates(k,h,r)];case 18:t.sent(),t.label=19;case 19:return[2]}})}},Dr={parse:function(t){var e=new je(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;l(r[this.variable])||(r[this.variable]=0),e.write(c(--r[this.variable]))}},Nr={parse:function(t){var e=new je(t.args,this.liquid.options.operatorsTrie),r=e.readValue();for(e.skipBlank(),this.candidates=[],r&&(":"===e.peek()?(this.group=r,e.advance()):this.candidates.push(r));!e.end();){var n=e.readValue();n&&this.candidates.push(n),e.readTo(",")}le(this.candidates.length,function(){return"empty candidates: "+t.getText()})},render:function(t,e){var r="cycle:"+Ve(this.group,t)+":"+this.candidates.join(","),n=t.getRegister("cycle"),i=n[r];void 0===i&&(i=n[r]=0);var s=this.candidates[i];i=(i+1)%this.candidates.length,n[r]=i;var o=Ve(s,t);e.write(o)}},Pr={parse:function(t,e){var r,n=this;this.branches=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){return n.branches.push({cond:new Ge(t.args,n.liquid),templates:r=[]})}).on("tag:elsif",function(t){n.branches.push({cond:new Ge(t.args,n.liquid),templates:r=[]})}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endif",function(){return i.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n,i,s,o,a,u,c;return S(this,function(t){switch(t.label){case 0:n=this.liquid.renderer,t.label=1;case 1:t.trys.push([1,7,8,9]),i=q(this.branches),s=i.next(),t.label=2;case 2:return s.done?[3,6]:[4,(o=s.value).cond.value(e,e.opts.lenientIf)];case 3:return P(t.sent(),e)?[4,n.renderTemplates(o.templates,e,r)]:[3,5];case 4:return t.sent(),[2];case 5:return s=i.next(),[3,2];case 6:return[3,9];case 7:return a=t.sent(),u={error:a},[3,9];case 8:try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(u)throw u.error}return[7];case 9:return[4,n.renderTemplates(this.elseTemplates,e,r)];case 10:return t.sent(),[2]}})}},Ar={parse:function(t){var e=new je(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;l(r[this.variable])||(r[this.variable]=0);var n=r[this.variable];r[this.variable]++,e.write(c(n))}},Ir={parse:function(t,e){var r=new je(t.args,this.liquid.options.operatorsTrie),n=this.liquid.options.dynamicPartials?r.readValue():r.readFileName();le(n,function(){return'illegal argument "'+t.args+'"'}),this.file=n,this.hash=new Je(r.remaining()),this.tpls=this.liquid.parser.parse(e)},render:function(e,r){var n,i,s,o,a,u,c,l,h,p,f,d,v,g,y;return S(this,function(t){switch(t.label){case 0:return i=(n=this).liquid,s=n.hash,o=n.file,a=i.renderer,"none"!==o.getText()?[3,2]:(e.setRegister("blockMode",Lr.OUTPUT),[4,a.renderTemplates(this.tpls,e)]);case 1:return u=t.sent(),r.write(u),[2];case 2:return e.opts.dynamicPartials?Tt(o)?[4,a.renderTemplates(i.parse(_e(o)),e)]:[3,4]:[3,6];case 3:return h=t.sent(),[3,5];case 4:h=Ve(this.file,e),t.label=5;case 5:return l=h,[3,7];case 6:l=o.getText(),t.label=7;case 7:return le(c=l,function(){return'file "'+o.getText()+'"("'+c+'") not available'}),[4,i._parseFile(c,e.opts,e.sync)];case 8:return p=t.sent(),e.setRegister("blockMode",Lr.STORE),[4,a.renderTemplates(this.tpls,e)];case 9:return f=t.sent(),void 0===(d=e.getRegister("blocks"))[""]&&(d[""]=function(){return f}),e.setRegister("blockMode",Lr.OUTPUT),g=(v=e).push,[4,s.render(e)];case 10:return g.apply(v,[t.sent()]),[4,a.renderTemplates(p,e)];case 11:return y=t.sent(),e.pop(),r.write(y),[2]}})}},Vr=(t(_r,Rr=i),_r.prototype.super=function(){return this.superBlockRender()},_r);function _r(t){void 0===t&&(t=function(){return""});var e=Rr.call(this)||this;return e.superBlockRender=t,e}var jr,Br={parse:function(t,e){var r=this,n=/\w+/.exec(t.args);this.block=n?n[0]:"",this.tpls=[];var i=this.liquid.parser.parseStream(e).on("tag:endblock",function(){return i.stop()}).on("template",function(t){return r.tpls.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n;return S(this,function(t){switch(t.label){case 0:return n=this.getBlockRender(e),[4,this.emitHTML(e,r,n)];case 1:return t.sent(),[2]}})},getBlockRender:function(n){function e(e){var r;return S(this,function(t){switch(t.label){case 0:return n.push({block:e}),[4,i.renderer.renderTemplates(s,n)];case 1:return r=t.sent(),n.pop(),[2,r]}})}var i=this.liquid,s=this.tpls,r=n.getRegister("blocks")[this.block];return r?function(t){return r(new Vr(function(){return e(t)}))}:e},emitHTML:function(e,r,n){var i,s;return S(this,function(t){switch(t.label){case 0:return e.getRegister("blockMode",Lr.OUTPUT)!==Lr.STORE?[3,1]:(e.getRegister("blocks")[this.block]=n,[3,3]);case 1:return s=(i=r).write,[4,n(new Vr)];case 2:s.apply(i,[t.sent()]),t.label=3;case 3:return[2]}})}},zr={parse:function(t,e){var r=this;this.tokens=[];var n=this.liquid.parser.parseStream(e);n.on("token",function(t){"endraw"===t.name?n.stop():r.tokens.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")}),n.start()},render:function(){return this.tokens.map(function(t){return t.getText()}).join("")}},Cr=(t(Hr,jr=Tr),Hr.prototype.row=function(){return Math.floor(this.i/this.cols)+1},Hr.prototype.col0=function(){return this.i%this.cols},Hr.prototype.col=function(){return this.col0()+1},Hr.prototype.col_first=function(){return 0===this.col0()},Hr.prototype.col_last=function(){return this.col()===this.cols},Hr);function Hr(t,e){var r=jr.call(this,t)||this;return r.length=t,r.cols=e,r}var Kr={assign:gr,for:kr,capture:xr,case:qr,comment:Er,include:Fr,render:Mr,decrement:Dr,increment:Ar,cycle:Nr,if:Pr,layout:Ir,block:Br,raw:zr,tablerow:{parse:function(t,e){var r=this,n=new je(t.args,this.liquid.options.operatorsTrie);this.variable=n.readIdentifier(),n.skipBlank();var i,s=n.readIdentifier();le(s&&"in"===s.content,function(){return"illegal tag: "+t.getText()}),this.collection=n.readValue(),this.hash=new Je(n.remaining()),this.templates=[];var o=this.liquid.parser.parseStream(e).on("start",function(){return i=r.templates}).on("tag:endtablerow",function(){return o.stop()}).on("template",function(t){return i.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});o.start()},render:function(e,r){var n,i,s,o,a,u,c,l,h,p;return S(this,function(t){switch(t.label){case 0:return i=yr,[4,Ve(this.collection,e)];case 1:return n=i.apply(void 0,[t.sent()]),[4,this.hash.render(e)];case 2:s=t.sent(),o=s.offset||0,a=void 0===s.limit?n.length:s.limit,n=n.slice(o,o+a),u=s.cols||n.length,c=this.liquid.renderer,l=new Cr(n.length,u),h={tablerowloop:l},e.push(h),p=0,t.label=3;case 3:return p<n.length?(h[this.variable.content]=n[p],0===l.col0()&&(1!==l.row()&&r.write("</tr>"),r.write('<tr class="row'+l.row()+'">')),r.write('<td class="col'+l.col()+'">'),[4,c.renderTemplates(this.templates,e,r)]):[3,6];case 4:t.sent(),r.write("</td>"),t.label=5;case 5:return p++,l.next(),[3,3];case 6:return n.length&&r.write("</tr>"),e.pop(),[2]}})}},unless:{parse:function(t,e){var r,n=this;this.templates=[],this.branches=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){r=n.templates,n.cond=new Ge(t.args,n.liquid)}).on("tag:elsif",function(t){n.branches.push({cond:new Ge(t.args,n.liquid),templates:r=[]})}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endunless",function(){return i.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.getText()+" not closed")});i.start()},render:function(e,r){var n,i,s,o,a,u,c;return S(this,function(t){switch(t.label){case 0:return n=this.liquid.renderer,[4,this.cond.value(e,e.opts.lenientIf)];case 1:return A(t.sent(),e)?[4,n.renderTemplates(this.templates,e,r)]:[3,3];case 2:return t.sent(),[2];case 3:t.trys.push([3,9,10,11]),i=q(this.branches),s=i.next(),t.label=4;case 4:return s.done?[3,8]:[4,(o=s.value).cond.value(e,e.opts.lenientIf)];case 5:return P(t.sent(),e)?[4,n.renderTemplates(o.templates,e,r)]:[3,7];case 6:return t.sent(),[2];case 7:return s=i.next(),[3,4];case 8:return[3,11];case 9:return a=t.sent(),u={error:a},[3,11];case 10:try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(u)throw u.error}return[7];case 11:return[4,n.renderTemplates(this.elseTemplates,e,r)];case 12:return t.sent(),[2]}})}},break:{render:function(t,e){e.break=!0}},continue:{render:function(t,e){e.continue=!0}}},Ur={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},Qr={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function Wr(t){return c(t).replace(/&|<|>|"|'/g,function(t){return Ur[t]})}var Jr=Math.abs,Yr=Math.max,Zr=Math.min,$r=Math.ceil,Gr=Math.floor;var Xr=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,tn=["January","February","March","April","May","June","July","August","September","October","November","December"],en=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],rn=tn.map(on),nn=en.map(on),sn={1:"st",2:"nd",3:"rd",default:"th"};function on(t){return t.slice(0,3)}function an(t){for(var e=0,r=0;r<t.getMonth();++r)e+=[31,function(t){var e=t.getFullYear();return!(0!=(3&e)||!(e%100||e%400==0&&e))}(t)?29:28,31,30,31,30,31,31,30,31,30,31][r];return e+t.getDate()}function un(t,e){var r=an(t)+(e-t.getDay()),n=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((r-n)/7)+1)}var cn={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},ln={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},hn={a:function(t){return nn[t.getDay()]},A:function(t){return en[t.getDay()]},b:function(t){return rn[t.getMonth()]},B:function(t){return tn[t.getMonth()]},c:function(t){return t.toLocaleString()},C:function(t){return function(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}(t)},d:function(t){return t.getDate()},e:function(t){return t.getDate()},H:function(t){return t.getHours()},I:function(t){return String(t.getHours()%12||12)},j:function(t){return an(t)},k:function(t){return t.getHours()},l:function(t){return String(t.getHours()%12||12)},L:function(t){return t.getMilliseconds()},m:function(t){return t.getMonth()+1},M:function(t){return t.getMinutes()},N:function(t,e){var r=Number(e.width)||9;return function(t,e,r){return void 0===r&&(r=" "),x(t,e,r,function(t,e){return t+e})}(String(t.getMilliseconds()).substr(0,r),r,"0")},p:function(t){return t.getHours()<12?"AM":"PM"},P:function(t){return t.getHours()<12?"am":"pm"},q:function(t){return function(t){var e=t.getDate().toString(),r=parseInt(e.slice(-1));return sn[r]||sn.default}(t)},s:function(t){return Math.round(t.valueOf()/1e3)},S:function(t){return t.getSeconds()},u:function(t){return t.getDay()||7},U:function(t){return un(t,0)},w:function(t){return t.getDay()},W:function(t){return un(t,1)},x:function(t){return t.toLocaleDateString()},X:function(t){return t.toLocaleTimeString()},y:function(t){return t.getFullYear().toString().substring(2,4)},Y:function(t){return t.getFullYear()},z:function(t,e){var r=t.getTimezoneOffset(),n=Math.abs(r),i=n%60;return(0<r?"-":"+")+k(Math.floor(n/60),2,"0")+(e.flags[":"]?":":"")+k(i,2,"0")},t:function(){return"\t"},n:function(){return"\n"},"%":function(){return"%"}};function pn(t,e){var r,n,i=w(e,5),s=i[0],o=i[1],a=void 0===o?"":o,u=i[2],c=i[3],l=i[4],h=hn[l];if(!h)return s;var p={};try{for(var f=q(a),d=f.next();!d.done;d=f.next()){p[d.value]=!0}}catch(t){r={error:t}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}var v=String(h(t,{flags:p,width:u,modifier:c})),g=ln[l]||"0",y=u||cn[l]||0;return p["^"]?v=v.toUpperCase():p["#"]&&(v=function(t){return T(t).some(function(t){return"a"<=t&&t<="z"})?t.toUpperCase():t.toLowerCase()}(v)),p._?g=" ":p[0]&&(g="0"),p["-"]&&(y=0),k(v,y,g)}hn.h=hn.b;var fn,dn=(t(vn,fn=Date),vn.prototype.getDisplayDate=function(){return new Date(+this+60*this.inputTimezoneOffset*1e3)},vn);function vn(t){var e=fn.call(this,t)||this;e.dateString=t,e.ISO8601_TIMEZONE_PATTERN=/([zZ]|([+-])(\d{2}):(\d{2}))$/,e.inputTimezoneOffset=0;var r=t.match(e.ISO8601_TIMEZONE_PATTERN);if(r&&"Z"===r[1])e.inputTimezoneOffset=e.getTimezoneOffset();else if(r&&r[2]&&r[3]&&r[4]){var n=w(r,5),i=n[2],s=n[3],o=n[4],a=("+"===i?1:-1)*(60*parseInt(s,10)+parseInt(o,10));e.inputTimezoneOffset=e.getTimezoneOffset()+a}return e}var gn=Object.freeze({escape:Wr,escapeOnce:function(t){return Wr(function(t){return String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(t){return Qr[t]})}(t))},newlineToBr:function(t){return t.replace(/\n/g,"<br />\n")},stripHtml:function(t){return t.replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")},abs:Jr,atLeast:Yr,atMost:Zr,ceil:$r,dividedBy:function(t,e){return t/e},floor:Gr,minus:function(t,e){return t-e},modulo:function(t,e){return t%e},times:function(t,e){return t*e},round:function(t,e){void 0===e&&(e=0);var r=Math.pow(10,e);return Math.round(t*r)/r},plus:function(t,e){return Number(t)+Number(e)},sortNatural:function(t,r){return t&&t.sort?void 0!==r?T(t).sort(function(t,e){return R(t[r],e[r])}):T(t).sort(R):[]},urlDecode:function(t){return t.split("+").map(decodeURIComponent).join(" ")},urlEncode:function(t){return t.split(" ").map(encodeURIComponent).join("+")},join:function(t,e){return t.join(void 0===e?" ":e)},last:function(t){return d(t)?g(t):""},first:function(t){return d(t)?t[0]:""},reverse:function(t){return T(t).reverse()},sort:function(t,e){function r(t){return e?n.context.getFromScope(t,e.split(".")):t}var n=this;return mr(t).sort(function(t,e){return(t=r(t))<(e=r(e))?-1:e<t?1:0})},size:function(t){return t&&t.length||0},map:function(t,e){var r=this;return mr(t).map(function(t){return r.context.getFromScope(t,e.split("."))})},compact:function(t){return mr(t).filter(function(t){return!h(t)})},concat:function(t,e){return mr(t).concat(e)},slice:function(t,e,r){return void 0===r&&(r=1),e=e<0?t.length+e:e,t.slice(e,e+r)},where:function(t,r,n){var i=this;return mr(t).filter(function(t){var e=i.context.getFromScope(t,String(r).split("."));return void 0===n?P(e,i.context):e===n})},uniq:function(t){var e={};return(t||[]).filter(function(t){return!e.hasOwnProperty(String(t))&&(e[String(t)]=!0)})},date:function(t,e){var r=t;return"now"===t||"today"===t?r=new Date:l(t)?r=new Date(1e3*t):a(t)&&(r=/^\d+$/.test(t)?new Date(1e3*+t):this.context.opts.preserveTimezones?new dn(t):new Date(t)),function(t){return t instanceof Date&&!isNaN(t.getTime())}(r)?function(t,e){var r=t;r instanceof dn&&(r=r.getDisplayDate());for(var n,i="",s=e;n=Xr.exec(s);)i+=s.slice(0,n.index),s=s.slice(n.index+n[0].length),i+=pn(r,n);return i+s}(r,e):t},Default:function(t,e){return d(t)||a(t)?t.length?t:e:A(f(t),this.context)?e:t},json:function(t){return JSON.stringify(t)},append:function(t,e){return le(void 0!==e,function(){return"append expect 2 arguments"}),c(t)+c(e)},prepend:function(t,e){return le(void 0!==e,function(){return"prepend expect 2 arguments"}),c(e)+c(t)},lstrip:function(t){return c(t).replace(/^\s+/,"")},downcase:function(t){return c(t).toLowerCase()},upcase:function(t){return c(t).toUpperCase()},remove:function(t,e){return c(t).split(String(e)).join("")},removeFirst:function(t,e){return c(t).replace(String(e),"")},rstrip:function(t){return c(t).replace(/\s+$/,"")},split:function(t,e){return c(t).split(String(e))},strip:function(t){return c(t).trim()},stripNewlines:function(t){return c(t).replace(/\n/g,"")},capitalize:function(t){return(t=c(t)).charAt(0).toUpperCase()+t.slice(1).toLowerCase()},replace:function(t,e,r){return c(t).split(String(e)).join(r)},replaceFirst:function(t,e,r){return c(t).replace(String(e),r)},truncate:function(t,e,r){return void 0===e&&(e=50),void 0===r&&(r="..."),(t=c(t)).length<=e?t:t.substr(0,e-r.length)+r},truncatewords:function(t,e,r){void 0===e&&(e=15),void 0===r&&(r="...");var n=t.split(/\s+/),i=n.slice(0,e).join(" ");return n.length>=e&&(i+=r),i}}),yn=(mn.prototype.get=function(t){var e=this.impls[t];return le(e,function(){return'tag "'+t+'" not found'}),e},mn.prototype.set=function(t,e){this.impls[t]=e},mn);function mn(){this.impls={}}var wn=(Tn.prototype.get=function(t){var e=this.impls[t];return le(e||!this.strictFilters,function(){return"undefined filter: "+t}),e},Tn.prototype.set=function(t,e){this.impls[t]=e},Tn.prototype.create=function(t,e){return new Ze(t,this.get(t),e,this.liquid)},Tn);function Tn(t,e){this.strictFilters=t,this.liquid=e,this.impls={}}var bn=(kn.prototype.parse=function(t,e){var r=new je(t,this.options.operatorsTrie,e).readTopLevelTokens(this.options);return this.parser.parse(r)},kn.prototype._render=function(t,e,r,n){var i=m({},this.options,H(r)),s=new ft(e,i,n),o=new ze(i.keepOutputType);return this.renderer.renderTemplates(t,s,o)},kn.prototype.render=function(e,r,n){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,nr(this._render(e,r,n,!1))]})})},kn.prototype.renderSync=function(t,e,r){return ir(this._render(t,e,r,!0))},kn.prototype._parseAndRender=function(t,e,r,n){var i=this.parse(t);return this._render(i,e,r,n)},kn.prototype.parseAndRender=function(e,r,n){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,nr(this._parseAndRender(e,r,n,!1))]})})},kn.prototype.parseAndRenderSync=function(t,e,r){return ir(this._parseAndRender(t,e,r,!0))},kn.prototype._parseFile=function(e,r,n){var i,s,o,a,u,c,l,h,p,f,d,v,g,y;return S(this,function(t){switch(t.label){case 0:i=m({},this.options,H(r)),s=i.root.map(function(t){return i.fs.resolve(t,e,i.extname)}),void 0!==i.fs.fallback&&void 0!==(u=i.fs.fallback(e))&&s.push(u),t.label=1;case 1:t.trys.push([1,13,14,15]),o=q(s),a=o.next(),t.label=2;case 2:return a.done?[3,12]:(u=a.value,(c=i.cache)?[4,c.read(u)]:[3,4]);case 3:if(l=t.sent())return[2,l];t.label=4;case 4:return n?(h=i.fs.existsSync(u),[3,7]):[3,5];case 5:return[4,i.fs.exists(u)];case 6:h=t.sent(),t.label=7;case 7:return h?(f=this.parse,n?(d=i.fs.readFileSync(u),[3,10]):[3,8]):[3,11];case 8:return[4,i.fs.readFile(u)];case 9:d=t.sent(),t.label=10;case 10:return p=f.apply(this,[d,u]),c&&c.write(u,p),[2,p];case 11:return a=o.next(),[3,2];case 12:return[3,15];case 13:return v=t.sent(),g={error:v},[3,15];case 14:try{a&&!a.done&&(y=o.return)&&y.call(o)}finally{if(g)throw g.error}return[7];case 15:throw this.lookupError(e,i.root)}})},kn.prototype.parseFile=function(e,r){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,nr(this._parseFile(e,r,!1))]})})},kn.prototype.parseFileSync=function(t,e){return ir(this._parseFile(t,e,!0))},kn.prototype.renderFile=function(r,n,i){return s(this,void 0,void 0,function(){var e;return S(this,function(t){switch(t.label){case 0:return[4,this.parseFile(r,i)];case 1:return e=t.sent(),[2,this.render(e,n,i)]}})})},kn.prototype.renderFileSync=function(t,e,r){var n=this.parseFileSync(t,r);return this.renderSync(n,e,r)},kn.prototype._evalValue=function(t,e){return new Ge(t,this).value(e,!1)},kn.prototype.evalValue=function(e,r){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,nr(this._evalValue(e,r))]})})},kn.prototype.evalValueSync=function(t,e){return ir(this._evalValue(t,e))},kn.prototype.registerFilter=function(t,e){this.filters.set(t,e)},kn.prototype.registerTag=function(t,e){this.tags.set(t,e)},kn.prototype.plugin=function(t){return t.call(this,kn)},kn.prototype.express=function(){var i=this;return function(t,e,r){var n={root:T(K(this.root),i.options.root)};i.renderFile(t,e,n).then(function(t){return r(null,t)},r)}},kn.prototype.lookupError=function(t,e){var r=new Error("ENOENT");return r.message='ENOENT: Failed to lookup "'+t+'" in "'+e+'"',r.code="ENOENT",r},kn.prototype.getTemplate=function(e,r){return s(this,void 0,void 0,function(){return S(this,function(t){return[2,this.parseFile(e,r)]})})},kn.prototype.getTemplateSync=function(t,e){return this.parseFileSync(t,e)},kn);function kn(t){var r=this;void 0===t&&(t={}),this.options=function(t){return m({},C,t)}(H(t)),this.parser=new dr(this),this.renderer=new He,this.filters=new wn(this.options.strictFilters,this),this.tags=new yn,v(Kr,function(t,e){return r.registerTag(E(e),t)}),v(gn,function(t,e){return r.registerFilter(E(e),t)})}p.AssertionError=lt,p.Context=ft,p.Drop=i,p.Emitter=ze,p.Expression=Ae,p.Hash=Je,p.InternalUndefinedVariableError=at,p.Liquid=bn,p.LiquidError=Q,p.ParseError=G,p.ParseStream=Ue,p.RenderError=et,p.TagToken=Ee,p.Token=Ft,p.TokenizationError=Y,p.Tokenizer=je,p.TypeGuards=Et,p.UndefinedVariableError=it,p.Value=Ge,p.assert=le,p.createTrie=z,p.defaultOperators=I,p.evalQuotedToken=_e,p.evalToken=Ve,p.isFalsy=A,p.isTruthy=P,p.toPromise=nr,p.toThenable=rr,p.toValue=f,Object.defineProperty(p,"__esModule",{value:!0})});
//# sourceMappingURL=liquid.browser.min.js.map
{
"name": "liquidjs",
"version": "9.24.1",
"version": "9.24.2",
"description": "A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.",

@@ -5,0 +5,0 @@ "main": "dist/liquid.node.cjs.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc