devsite/node_modules/liquidjs/dist/liquid.browser.min.js
2024-07-07 18:49:38 -07:00

3 lines
83 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).liquidjs={})}(this,function(l){"use strict";var j=function(e,t){return(j=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)};function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}j(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var T=function(){return(T=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,o,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{s(u.next(e))}catch(e){t(e)}}function i(e){try{s(u.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}s((u=u.apply(e,o||[])).next())})}function x(n,i){var s,o,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(s)throw new TypeError("Generator is already executing.");for(;u=c&&t[c=0]?0:u;)try{if(s=1,o&&(a=2&t[0]?o.return:t[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,t[1])).done)return a;switch(o=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,o=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))u.label=t[1];else if(6===t[0]&&u.label<a[1])u.label=a[1],a=t;else{if(!(a&&u.label<a[2])){a[2]&&u.ops.pop(),u.trys.pop();continue}u.label=a[2],u.ops.push(t)}}t=i.call(n,u)}catch(e){t=[6,e],o=0}finally{s=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function _(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||0<t--)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function g(e,t,r){if(r||2===arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}P.prototype.getText=function(){return this.input.slice(this.begin,this.end)},P.prototype.getPosition=function(){for(var e=d([1,1],2),t=e[0],r=e[1],n=0;n<this.begin;n++)"\n"===this.input[n]?(t++,r=1):r++;return[t,r]},P.prototype.size=function(){return this.end-this.begin};var e=P;function P(e,t,r,n,i){this.kind=e,this.input=t,this.begin=r,this.end=n,this.file=i}V.prototype.liquidMethodMissing=function(e){};var A=V;function V(){}var I=Object.prototype.toString,B=String.prototype.toLowerCase,C=Object.hasOwnProperty;function o(e){return"string"==typeof e}function u(e){return"function"==typeof e}function H(e){return e&&u(e.next)&&u(e.throw)&&u(e.return)}function v(e){return o(e=m(e))?e:c(e)?"":b(e)?e.map(v).join(""):String(e)}function U(t){var e;return b(t=m(t))?t:o(t)&&0<t.length?[t]:Q(e=t)&&Symbol.iterator in e?Array.from(t):Q(t)?Object.keys(t).map(function(e){return[e,t[e]]}):[]}function y(e){return c(e=m(e))?[]:b(e)?e:[e]}function m(e){return e instanceof A&&u(e.valueOf)?e.valueOf():e}function K(e){return"number"==typeof e}function c(e){return null==e}function b(e){return"[object Array]"===I.call(e)}function Y(e,t){for(var r in e=e||{})if(C.call(e,r)&&!1===t(e[r],r,e))break}function $(e){return e[e.length-1]}function Q(e){var t=typeof e;return null!==e&&("object"==t||"function"==t)}function W(e,t,r){void 0===r&&(r=1);for(var n=[],i=e;i<t;i+=r)n.push(i);return n}function J(e,t,r){return Z(e,t,r=void 0===r?" ":r,function(e,t){return t+e})}function Z(e,t,r,n){for(var i=t-(e=String(e)).length;0<i--;)e=n(e,r);return e}function G(e){return e}function X(e,t){return null==e&&null==t?0:null==e?1:null==t||(e=B.call(e))<(t=B.call(t))?-1:t<e?1:0}function t(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.apply(void 0,g([],d(e.map(m)),!1))}}function ee(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var te,re="__liquidClass__",ne=(s(ie,te=Error),ie.prototype.update=function(){var n,i,s,o,e,t,r;Object.defineProperty(this,"context",{value:(e=this.token,t=d(e.getPosition(),2),n=t[0],i=t[1],s=e.input.split("\n"),t=Math.max(n-2,1),o=Math.min(n+3,s.length),W(t,o+1).map(function(e){var t=e===n?">> ":" ",r=J(String(e),String(o).length),t="".concat(t).concat(r,"| "),r=e===n?"\n"+J("^",i+t.length):"";return t+s[e-1]+r}).join("\n")),enumerable:!1}),this.message=(e=this.message,(t=this.token).file&&(e+=", file:".concat(t.file)),t=d(t.getPosition(),2),r=t[0],t=t[1],e+=", line:".concat(r,", col:").concat(t)),this.stack=this.message+"\n"+this.context+"\n"+this.stack,this.originalError&&(this.stack+="\nFrom "+this.originalError.stack)},ie.is=function(e){return"LiquidError"===(null==e?void 0:e[re])},ie);function ie(e,t){var r=te.call(this,"string"==typeof e?e:e.message)||this;return r.context="","string"!=typeof e&&Object.defineProperty(r,"originalError",{value:e,enumerable:!1}),Object.defineProperty(r,"token",{value:t,enumerable:!1}),Object.defineProperty(r,re,{value:"LiquidError",enumerable:!1}),r}s(ae,se=ne);var se,oe=ae;function ae(e,t){e=se.call(this,e,t)||this;return e.name="TokenizationError",se.prototype.update.call(e),e}s(le,ue=ne);var ue,ce=le;function le(e,t){t=ue.call(this,e,t)||this;return t.name="ParseError",t.message=e.message,ue.prototype.update.call(t),t}s(fe,pe=ne),fe.is=function(e){return"RenderError"===e.name};var pe,he=fe;function fe(e,t){t=pe.call(this,e,t.token)||this;return t.name="RenderError",t.message=e.message,pe.prototype.update.call(t),t}s(ve,de=ne),ve.is=function(e){return"LiquidErrors"===e.name};var de,ge=ve;function ve(e){var t=de.call(this,e[0],e[0].token)||this,r=(t.errors=e,t.name="LiquidErrors",1<e.length?"s":"");return t.message="".concat(e.length," error").concat(r," found"),de.prototype.update.call(t),t}s(be,ye=ne);var ye,me=be;function be(e,t){t=ye.call(this,e,t)||this;return t.name="UndefinedVariableError",t.message=e.message,ye.prototype.update.call(t),t}s(Te,we=Error);var we,ke=Te;function Te(e){var t=we.call(this,"undefined variable: ".concat(e))||this;return t.name="InternalUndefinedVariableError",t.variableName=e,t}s(Fe,xe=Error);var xe,_e=Fe;function Fe(e){var t=xe.call(this,e)||this;return t.name="AssertionError",t.message=e+"",t}var p=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Oe=1,ze=4,Se=16;function Re(e){e=e.charCodeAt(0);return 128<=e?!p[e]:p[e]&Oe}function F(e,t){if(!e)throw t="function"==typeof t?t():t||"expect ".concat(e," to be true"),new _e(t)}p[160]=p[5760]=p[6158]=p[8192]=p[8193]=p[8194]=p[8195]=p[8196]=p[8197]=p[8198]=p[8199]=p[8200]=p[8201]=p[8202]=p[8232]=p[8233]=p[8239]=p[8287]=p[12288]=ze,p[8220]=p[8221]=128;s(Ee,qe=A),Ee.prototype.equals=function(e){return c(m(e))},Ee.prototype.gt=function(){return!1},Ee.prototype.geq=function(){return!1},Ee.prototype.lt=function(){return!1},Ee.prototype.leq=function(){return!1},Ee.prototype.valueOf=function(){return null};var qe,r=Ee;function Ee(){return null!==qe&&qe.apply(this,arguments)||this}s(n,Le=A),n.prototype.equals=function(e){return!(e instanceof n||(o(e=m(e))||b(e)?0!==e.length:!Q(e)||0!==Object.keys(e).length))},n.prototype.gt=function(){return!1},n.prototype.geq=function(){return!1},n.prototype.lt=function(){return!1},n.prototype.leq=function(){return!1},n.prototype.valueOf=function(){return""};var Le,De=n;function n(){return null!==Le&&Le.apply(this,arguments)||this}s(Me,Ne=De),Me.prototype.equals=function(e){return!1===e||!!c(m(e))||(o(e)?/^\s*$/.test(e):Ne.prototype.equals.call(this,e))};var Ne,i=Me;function Me(){return null!==Ne&&Ne.apply(this,arguments)||this}s(h,je=A),h.prototype.next=function(){this.i++},h.prototype.index0=function(){return this.i},h.prototype.index=function(){return this.i+1},h.prototype.first=function(){return 0===this.i},h.prototype.last=function(){return this.i===this.length-1},h.prototype.rindex=function(){return this.length-this.i},h.prototype.rindex0=function(){return this.length-this.i-1},h.prototype.valueOf=function(){return JSON.stringify(this)};var je,Pe=h;function h(e,t,r){var n=je.call(this)||this;return n.i=0,n.length=e,n.name="".concat(r,"-").concat(t),n}s(Ie,Ae=A),Ie.prototype.super=function(){return this.superBlockRender()};var Ae,Ve=Ie;function Ie(e){void 0===e&&(e=function(){return""});var t=Ae.call(this)||this;return t.superBlockRender=e,t}function f(e){return e&&u(e.equals)&&u(e.gt)&&u(e.geq)&&u(e.lt)&&u(e.leq)}var r=new r,Be={true:!0,false:!1,nil:r,null:r,empty:new De,blank:new i};function Ce(e){var t,r,n={};try{for(var i=_(Object.entries(e)),s=i.next();!s.done;s=i.next()){for(var o=d(s.value,2),a=o[0],u=o[1],c=n,l=0;l<a.length;l++){var p=a[l];c[p]=c[p]||{},l===a.length-1&&Re(a[l])&&(c[p].needBoundary=!0),c=c[p]}c.data=u,c.end=!0}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function w(o){return a(this,void 0,void 0,function(){var r,n,i,s;return x(this,function(e){switch(e.label){case 0:if(!H(o))return[2,o];n=!1,i="next",e.label=1;case 1:s=o[i](r),n=s.done,r=s.value,i="next",e.label=2;case 2:return(e.trys.push([2,5,,6]),H(r)&&(r=w(r)),(t=r)&&u(t.then))?[4,r]:[3,4];case 3:r=e.sent(),e.label=4;case 4:return[3,6];case 5:return s=e.sent(),i="throw",r=s,[3,6];case 6:if(!n)return[3,1];e.label=7;case 7:return[2,r]}var t})})}function k(e){if(!H(e))return e;var t="next";do{var r,n=e[t](r),i=n.done,t="next";if(H(r=n.value))try{r=k(r)}catch(e){t="throw",r=e}}while(!i);return r}var He=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,Ue=["January","February","March","April","May","June","July","August","September","October","November","December"],Ke=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ye=Ue.map(Qe),$e=Ke.map(Qe);function Qe(e){return e.slice(0,3)}function We(e){return[31,function(e){e=e.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)}(e)?29:28,31,30,31,30,31,31,30,31,30,31]}function Je(e){for(var t=0,r=0;r<e.getMonth();++r)t+=We(e)[r];return t+e.getDate()}function Ze(e,t){var r=Je(e)+(t-e.getDay()),e=7-new Date(e.getFullYear(),0,1).getDay()+t;return String(Math.floor((r-e)/7)+1)}var Ge={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},Xe={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "};function et(e,t){var r=Math.abs(e.getTimezoneOffset()),n=Math.floor(r/60),r=r%60;return(0<e.getTimezoneOffset()?"-":"+")+J(n,2,"0")+(t.flags[":"]?":":"")+J(r,2,"0")}var tt={a:function(e){return $e[e.getDay()]},A:function(e){return Ke[e.getDay()]},b:function(e){return Ye[e.getMonth()]},B:function(e){return Ue[e.getMonth()]},c:function(e){return e.toLocaleString()},C:function(e){return parseInt(e.getFullYear().toString().substring(0,2),10)},d:function(e){return e.getDate()},e:function(e){return e.getDate()},H:function(e){return e.getHours()},I:function(e){return String(e.getHours()%12||12)},j:Je,k:function(e){return e.getHours()},l:function(e){return String(e.getHours()%12||12)},L:function(e){return e.getMilliseconds()},m:function(e){return e.getMonth()+1},M:function(e){return e.getMinutes()},N:function(e,t){t=Number(t.width)||9;return Z(String(e.getMilliseconds()).slice(0,t),t,e=void 0===(e="0")?" ":e,function(e,t){return e+t})},p:function(e){return e.getHours()<12?"AM":"PM"},P:function(e){return e.getHours()<12?"am":"pm"},q:function(e){if(e=e.getDate(),[11,12,13].includes(e))return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},s:function(e){return Math.round(e.getTime()/1e3)},S:function(e){return e.getSeconds()},u:function(e){return e.getDay()||7},U:function(e){return Ze(e,0)},w:function(e){return e.getDay()},W:function(e){return Ze(e,1)},x:function(e){return e.toLocaleDateString()},X:function(e){return e.toLocaleTimeString()},y:function(e){return e.getFullYear().toString().slice(2,4)},Y:function(e){return e.getFullYear()},z:et,Z:function(e,t){return e.getTimezoneName?e.getTimezoneName()||et(e,t):"undefined"!=typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:""},t:function(){return"\t"},n:function(){return"\n"},"%":function(){return"%"}};function rt(e,t){for(var r,n="",i=t;r=He.exec(i);)n+=i.slice(0,r.index),i=i.slice(r.index+r[0].length),n+=function(e,t){var r,t=d(t,5),n=t[0],i=t[1],i=void 0===i?"":i,s=t[2],o=t[3],t=t[4],a=tt[t];if(!a)return n;var u={};try{for(var c=_(i),l=c.next();!l.done;l=c.next()){var p=l.value;u[p]=!0}}catch(e){r={error:e}}finally{try{l&&!l.done&&(h=c.return)&&h.call(c)}finally{if(r)throw r.error}}var n=String(a(e,{flags:u,width:s,modifier:o})),i=Xe[t]||"0",h=s||Ge[t]||0;u["^"]?n=n.toUpperCase():u["#"]&&(n=function(e){return g([],d(e),!1).some(function(e){return"a"<=e&&e<="z"})?e.toUpperCase():e.toLowerCase()}(n));u._?i=" ":u[0]&&(i="0");u["-"]&&(h=0);return J(n,h,i)}(e,r);return n+i}tt.h=tt.b;var nt=/([zZ]|([+-])(\d{2}):(\d{2}))$/,it=(O.prototype.getTime=function(){return this.displayDate.getTime()},O.prototype.getMilliseconds=function(){return this.displayDate.getMilliseconds()},O.prototype.getSeconds=function(){return this.displayDate.getSeconds()},O.prototype.getMinutes=function(){return this.displayDate.getMinutes()},O.prototype.getHours=function(){return this.displayDate.getHours()},O.prototype.getDay=function(){return this.displayDate.getDay()},O.prototype.getDate=function(){return this.displayDate.getDate()},O.prototype.getMonth=function(){return this.displayDate.getMonth()},O.prototype.getFullYear=function(){return this.displayDate.getFullYear()},O.prototype.toLocaleString=function(e,t){return(null!=t&&t.timeZone?this.date:this.displayDate).toLocaleString(e,t)},O.prototype.toLocaleTimeString=function(e){return this.displayDate.toLocaleTimeString(e)},O.prototype.toLocaleDateString=function(e){return this.displayDate.toLocaleDateString(e)},O.prototype.getTimezoneOffset=function(){return this.timezoneOffset},O.prototype.getTimezoneName=function(){return this.timezoneName},O.createDateFixedToTimezone=function(e){var t,r,n=e.match(nt);return n&&"Z"===n[1]?new O(+new Date(e),0):n&&n[2]&&n[3]&&n[4]?(r=(n=d(n,5))[2],t=n[3],n=n[4],r=("+"===r?-1:1)*(60*parseInt(t,10)+parseInt(n,10)),new O(+new Date(e),r)):new Date(e)},O.getTimezoneOffset=function(e,t){e=(t=void 0===t?new Date:t).toLocaleString("en-US",{timeZone:e}),t=t.toLocaleString("en-US",{timeZone:"UTC"}),e=new Date(e);return(+new Date(t)-+e)/6e4},O);function O(e,t){this.date=e instanceof O?e.date:new Date(e),this.timezoneOffset=o(t)?O.getTimezoneOffset(t,this.date):t,this.timezoneName=o(t)?t:"";e=6e4*(this.date.getTimezoneOffset()-this.timezoneOffset),t=this.date.getTime()+e;this.displayDate=new Date(t)}s(ot,st=e),Object.defineProperty(ot.prototype,"content",{get:function(){return this.input.slice(this.contentRange[0],this.contentRange[1])},enumerable:!1,configurable:!0});var st,r=ot;function ot(e,t,r,n,i,s,o,a){for(var t=d(t,2),u=t[0],t=t[1],e=st.call(this,e,r,n,i,a)||this,n=(e.trimLeft=!1,e.trimRight=!1,"-"===r[u]),i="-"===r[t-1],c=n?u+1:u,l=i?t-1:t;c<l&&p[r.charCodeAt(c)]&ze;)c++;for(;c<l&&p[r.charCodeAt(l-1)]&ze;)l--;return e.contentRange=[c,l],e.trimLeft=n||s,e.trimRight=i||o,e}s(ct,at=r),Object.defineProperty(ct.prototype,"args",{get:function(){return this.tokenizer.input.slice(this.tokenizer.p,this.contentRange[1])},enumerable:!1,configurable:!0});var at,ut=ct;function ct(e,t,r,n,i){var s=this,o=n.trimTagLeft,a=n.trimTagRight,u=n.tagDelimiterLeft,c=n.tagDelimiterRight,u=d([t+u.length,r-c.length],2),c=u[0],u=u[1];return(s=at.call(this,l.TokenKind.Tag,[c,u],e,t,r,o,a,i)||this).tokenizer=new S(e,n.operators,i,s.contentRange),s.name=s.tokenizer.readTagName(),s.tokenizer.assert(s.name,"illegal tag syntax, tag name expected"),s.tokenizer.skipBlank(),s}s(ht,lt=r);var lt,pt=ht;function ht(e,t,r,n,i){var s=n.trimOutputLeft,o=n.trimOutputRight,a=n.outputDelimiterLeft,n=n.outputDelimiterRight,a=[t+a.length,r-n.length];return lt.call(this,l.TokenKind.Output,a,e,t,r,s,o,i)||this}s(gt,ft=e),gt.prototype.getContent=function(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)};var ft,dt=gt;function gt(e,t,r,n){var i=ft.call(this,l.TokenKind.HTML,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.trimLeft=0,i.trimRight=0,i}s(mt,vt=e);var vt,yt=mt;function mt(e,t,r,n){var i=vt.call(this,l.TokenKind.Number,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=Number(i.getText()),i}s(kt,bt=e),kt.prototype.isNumber=function(e){for(var t=(e=void 0===e?!1:e)&&64&p[this.input.charCodeAt(this.begin)]?this.begin+1:this.begin;t<this.end;t++)if(!(32&p[this.input.charCodeAt(t)]))return!1;return!0};var bt,wt=kt;function kt(e,t,r,n){var i=bt.call(this,l.TokenKind.Word,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=i.getText(),i}s(_t,Tt=e);var Tt,xt=_t;function _t(e,t,r,n){var i=Tt.call(this,l.TokenKind.Literal,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.literal=i.getText(),i.content=Be[i.literal],i}var Ft,Ot={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},zt={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0},St=(s(Rt,Ft=e),Rt.prototype.getPrecedence=function(){var e=this.getText();return e in Ot?Ot[e]:1},Rt);function Rt(e,t,r,n){var i=Ft.call(this,l.TokenKind.Operator,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.operator=i.getText(),i}s(Lt,qt=e);var qt,Et=Lt;function Lt(e,t,r,n,i,s){r=qt.call(this,l.TokenKind.PropertyAccess,r,n,i,s)||this;return r.variable=e,r.props=t,r}s(Mt,Dt=e);var Dt,Nt=Mt;function Mt(e,t,r,n,i,s){r=Dt.call(this,l.TokenKind.Filter,r,n,i,s)||this;return r.name=e,r.args=t,r}s(At,jt=e);var jt,Pt=At;function At(e,t,r,n,i,s){var o=jt.call(this,l.TokenKind.Hash,e,t,r,s)||this;return o.input=e,o.begin=t,o.end=r,o.name=n,o.value=i,o.file=s,o}var Vt=/[\da-fA-F]/,It=/[0-7]/,Bt={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v"};function Ct(e){e=e.charCodeAt(0);return 97<=e?e-87:65<=e?e-55:e-48}s(Kt,Ht=e);var Ht,Ut=Kt;function Kt(e,t,r,n){var i=Ht.call(this,l.TokenKind.Quoted,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=function(e){for(var t="",r=1;r<e.length-1;r++)if("\\"!==e[r])t+=e[r];else if(void 0!==Bt[e[r+1]])t+=Bt[e[++r]];else if("u"===e[r+1]){for(var n=0,i=r+2;i<=r+5&&Vt.test(e[i]);)n=16*n+Ct(e[i++]);r=i-1,t+=String.fromCharCode(n)}else if(It.test(e[r+1])){for(i=r+1,n=0;i<=r+3&&It.test(e[i]);)n=8*n+Ct(e[i++]);r=i-1,t+=String.fromCharCode(n)}else t+=e[++r];return t}(i.getText()),i}s(Qt,Yt=e);var Yt,$t=Qt;function Qt(e,t,r,n,i,s){var o=Yt.call(this,l.TokenKind.Range,e,t,r,s)||this;return o.input=e,o.begin=t,o.end=r,o.lhs=n,o.rhs=i,o.file=s,o}s(Zt,Wt=r);var Wt,Jt=Zt;function Zt(e,t,r,n,i){t=Wt.call(this,l.TokenKind.Tag,[t,r],e,t,r,!1,!1,i)||this;return t.tokenizer=new S(e,n.operators,i,t.contentRange),t.name=t.tokenizer.readTagName(),t.tokenizer.assert(t.name,"illegal liquid tag syntax"),t.tokenizer.skipBlank(),t.args=t.tokenizer.remaining(),t}s(er,Gt=e);var Gt,Xt=er;function er(e,t,r,n,i,s){var o=Gt.call(this,l.TokenKind.FilteredValue,r,n,i,s)||this;return o.initial=e,o.filters=t,o.input=r,o.begin=n,o.end=i,o.file=s,o}rr.prototype.write=function(e){this.buffer+=v(e)};var tr=rr;function rr(){this.buffer=""}var nr=function(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")},ir=(sr.prototype.write=function(e){"string"!=typeof(e=m(e))&&""===this.buffer?this.buffer=e:this.buffer=v(this.buffer)+v(e)},sr);function sr(){this.buffer=""}ar.prototype.renderTemplatesToNodeStream=function(e,t){var r=this,n=new nr;return Promise.resolve().then(function(){return w(r.renderTemplates(e,t,n))}).then(function(){return n.end()},function(e){return n.error(e)}),n.stream},ar.prototype.renderTemplates=function(t,r,n){var i,s,o,a,u,c,l,p;return x(this,function(e){switch(e.label){case 0:n=n||new(r.opts.keepOutputType?ir:tr),i=[],e.label=1;case 1:e.trys.push([1,8,9,10]),s=_(t),o=s.next(),e.label=2;case 2:if(o.done)return[3,7];a=o.value,e.label=3;case 3:return e.trys.push([3,5,,6]),[4,a.render(r,n)];case 4:return(u=e.sent())&&n.write(u),n.break||n.continue?[3,7]:[3,6];case 5:if(u=e.sent(),c=ne.is(u)?u:new he(u,a),r.opts.catchAllErrors)return i.push(c),[3,6];throw c;case 6:return o=s.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),l={error:c},[3,10];case 9:try{o&&!o.done&&(p=s.return)&&p.call(s)}finally{if(l)throw l.error}return[7];case 10:if(i.length)throw new ge(i);return[2,n.buffer]}})};var or=ar;function ar(){}cr.prototype.evaluate=function(t,r){var n,i,s,o,a,u,c,l,p,h,f;return x(this,function(e){switch(e.label){case 0:F(t,"unable to evaluate: context not defined"),n=[],e.label=1;case 1:e.trys.push([1,11,12,13]),i=_(this.postfix),s=i.next(),e.label=2;case 2:return s.done?[3,10]:Wr(o=s.value)?(a=n.pop(),u=void 0,1!==zt[o.operator]?[3,4]:[4,t.opts.operators[o.operator](a,t)]):[3,7];case 3:return u=e.sent(),[3,6];case 4:return p=n.pop(),[4,t.opts.operators[o.operator](p,a,t)];case 5:u=e.sent(),e.label=6;case 6:return n.push(u),[3,9];case 7:return l=(c=n).push,[4,z(o,t,r)];case 8:l.apply(c,[e.sent()]),e.label=9;case 9:return s=i.next(),[3,2];case 10:return[3,13];case 11:return p=e.sent(),h={error:p},[3,13];case 12:try{s&&!s.done&&(f=i.return)&&f.call(i)}finally{if(h)throw h.error}return[7];case 13:return[2,n[0]]}})},cr.prototype.valid=function(){return!!this.postfix.length};var ur=cr;function cr(e){this.postfix=g([],d(function(t){var r,n,i,s,o,a;return x(this,function(e){switch(e.label){case 0:r=[],e.label=1;case 1:e.trys.push([1,10,11,12]),n=_(t),i=n.next(),e.label=2;case 2:if(i.done)return[3,9];if(!Wr(s=i.value))return[3,6];e.label=3;case 3:return r.length&&r[r.length-1].getPrecedence()>s.getPrecedence()?[4,r.pop()]:[3,5];case 4:return e.sent(),[3,3];case 5:return r.push(s),[3,8];case 6:return[4,s];case 7:e.sent(),e.label=8;case 8:return i=n.next(),[3,2];case 9:return[3,12];case 10:return o=e.sent(),o={error:o},[3,12];case 11:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(o)throw o.error}return[7];case 12:return r.length?[4,r.pop()]:[3,14];case 13:return e.sent(),[3,12];case 14:return[2]}})}(e)),!1)}function z(t,r,n){return void 0===n&&(n=!1),x(this,function(e){switch(e.label){case 0:return t?"content"in t?[2,t.content]:en(t)?[4,function(t,r,n){var i,s,o,a,u,c,l,p,h;return x(this,function(e){switch(e.label){case 0:i=[],e.label=1;case 1:e.trys.push([1,6,7,8]),s=_(t.props),o=s.next(),e.label=2;case 2:return o.done?[3,5]:(c=o.value,u=(a=i).push,[4,z(c,r,!1)]);case 3:u.apply(a,[e.sent()]),e.label=4;case 4:return o=s.next(),[3,2];case 5:return[3,8];case 6:return c=e.sent(),p={error:c},[3,8];case 7:try{o&&!o.done&&(h=s.return)&&h.call(s)}finally{if(p)throw p.error}return[7];case 8:return(e.trys.push([8,14,,15]),t.variable)?[4,z(t.variable,r,n)]:[3,11];case 9:return l=e.sent(),[4,r._getFromScope(l,i)];case 10:return[2,e.sent()];case 11:return[4,r._get(i)];case 12:return[2,e.sent()];case 13:return[3,15];case 14:if(l=e.sent(),n&&"InternalUndefinedVariableError"===l.name)return[2,null];throw new me(l,t);case 15:return[2]}})}(t,r,n)]:[3,2]:[2];case 1:return[2,e.sent()];case 2:return tn(t)?[4,function(t,r){var n,i;return x(this,function(e){switch(e.label){case 0:return[4,z(t.lhs,r)];case 1:return n=e.sent(),[4,z(t.rhs,r)];case 2:return i=e.sent(),[2,W(+n,+i+1)]}})}(t,r)]:[3,4];case 3:return[2,e.sent()];case 4:return[2]}})}function lr(e){return e.content}function pr(e,t){return!hr(e,t)}function hr(e,t){return e=m(e),t.opts.jsTruthy?!e:!1===e||null==e}De={"==":fr,"!=":function(e,t){return!fr(e,t)},">":function(e,t){return f(e)?e.gt(t):f(t)?t.lt(e):m(e)>m(t)},"<":function(e,t){return f(e)?e.lt(t):f(t)?t.gt(e):m(e)<m(t)},">=":function(e,t){return f(e)?e.geq(t):f(t)?t.leq(e):m(e)>=m(t)},"<=":function(e,t){return f(e)?e.leq(t):f(t)?t.geq(e):m(e)<=m(t)},contains:function(e,t){return b(e=m(e))?e.some(function(e){return fr(e,t)}):!!u(null==e?void 0:e.indexOf)&&-1<e.indexOf(m(t))},not:function(e,t){return hr(m(e),t)},and:function(e,t,r){return pr(m(e),r)&&pr(m(t),r)},or:function(e,t,r){return pr(m(e),r)||pr(m(t),r)}};function fr(e,t){var r,n;return f(e)?e.equals(t):f(t)?t.equals(e):(e=m(e),t=m(t),b(e)?b(t)&&(n=t,(r=e).length===n.length)&&!r.some(function(e,t){return!fr(e,n[t])}):e===t)}var dr=function(e,t,r,n){this.key=e,this.value=t,this.next=r,this.prev=n},gr=(vr.prototype.write=function(e,t){this.cache[e]?this.cache[e].value=t:(t=new dr(e,t,this.head.next,this.head),this.head.next.prev=t,this.head.next=t,this.cache[e]=t,this.size++,this.ensureLimit())},vr.prototype.read=function(e){var t;if(this.cache[e])return t=this.cache[e].value,this.remove(e),this.write(e,t),t},vr.prototype.remove=function(e){var t=this.cache[e];t.prev.next=t.next,t.next.prev=t.prev,delete this.cache[e],this.size--},vr.prototype.clear=function(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}},vr.prototype.ensureLimit=function(){this.size>this.limit&&this.remove(this.tail.prev.key)},vr);function vr(e,t){void 0===t&&(t=0),this.limit=e,this.size=t,this.cache={},this.head=new dr("HEAD",null,null,null),this.tail=new dr("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}function yr(e,t){var r=document.createElement("base"),e=(r.href=e,document.getElementsByTagName("head")[0]),n=(e.insertBefore(r,e.firstChild),document.createElement("a")),t=(n.href=t,n.href);return e.removeChild(r),t}i=Object.freeze({__proto__:null,resolve:function(e,t,i){return e.length&&"/"!==$(e)&&(e+="/"),yr(e,t).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(e,t,r){var n=r.split("/").pop();return/\.\w+$/.test(n)?e:t+r+i})},readFile:function(n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,new Promise(function(e,t){var r=new XMLHttpRequest;r.onload=function(){200<=r.status&&r.status<300?e(r.responseText):t(new Error(r.statusText))},r.onerror=function(){t(new Error("An error occurred whilst receiving the response."))},r.open("GET",n),r.send()})]})})},readFileSync:function(e){var t=new XMLHttpRequest;if(t.open("GET",e,!1),t.send(),t.status<200||300<=t.status)throw new Error(t.statusText);return t.responseText},exists:function(e){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,!0]})})},existsSync:function(e){return!0},dirname:function(e){return yr(e,".")},sep:"/"});function mr(e,t){return void 0===t&&(t=0),JSON.stringify(e,null,t)}var br={default:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return b(e=m(e))||o(e)?e.length?e:t:(!1!==e||!new Map(r).get("allow_false"))&&(hr(e,this.context)?t:e)},raw:{raw:!0,handler:G},jsonify:mr,to_integer:function(e){return Number(e)},json:mr,inspect:function(e,t){void 0===t&&(t=0);var r=[];return JSON.stringify(e,function(e,t){if("object"==typeof t&&null!==t){for(;0<r.length&&r[r.length-1]!==this;)r.pop();if(r.includes(t))return"[Circular]";r.push(t)}return t},t)}},wr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},kr={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function Tr(e){return v(e).replace(/&|<|>|"|'/g,function(e){return wr[e]})}var r=Object.freeze({__proto__:null,escape:Tr,xml_escape:Tr,escape_once:function(e){return Tr((e=v(e),v(e).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return kr[e]})))},newline_to_br:function(e){return v(e).replace(/\r?\n/gm,"<br />\n")},strip_html:function(e){return v(e).replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g,"")}}),xr={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:i,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:De};function _r(e){var t;return e.hasOwnProperty("root")&&(e.hasOwnProperty("partials")||(e.partials=e.root),e.hasOwnProperty("layouts")||(e.layouts=e.root)),e.hasOwnProperty("cache")&&(t=void 0,t="number"==typeof e.cache?0<e.cache?new gr(e.cache):void 0:"object"==typeof e.cache?e.cache:e.cache?new gr(1024):void 0,e.cache=t),(e=T(T(T({},xr),e.jekyllInclude?{dynamicPartials:!1}:{}),e)).fs.dirname&&e.fs.sep||!e.relativeReference||(console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"),e.relativeReference=!1),e.root=Fr(e.root),e.partials=Fr(e.partials),e.layouts=Fr(e.layouts),e.outputEscape=e.outputEscape&&("escape"===(t=e.outputEscape)?Tr:"json"===t?br.json:(F(u(t),"`outputEscape` need to be of type string or function"),t)),e}function Fr(e){var t=[];return b(e)&&(t=e),t=o(e)?[e]:t}function Or(e,t){for(var r=!1,n=0;n<e.length;n++){var i=e[n];if(Qr(i)){if(!r&&i.trimLeft){a=o=s=void 0;var s=e[n-1],o=t.greedy;if(s&&Jr(s))for(var a=o?ze:Se;p[s.input.charCodeAt(s.end-1-s.trimRight)]&a;)s.trimRight++}if(Gr(i)&&("raw"===i.name?r=!0:"endraw"===i.name&&(r=!1)),!r&&i.trimRight){c=o=u=void 0;var u=e[n+1],o=t.greedy;if(u&&Jr(u)){for(var c=o?ze:Se;p[u.input.charCodeAt(u.begin+u.trimLeft)]&c;)u.trimLeft++;"\n"===u.input.charAt(u.begin+u.trimLeft)&&u.trimLeft++}}}}}R.prototype.readExpression=function(){return new ur(this.readExpressionTokens())},R.prototype.readExpressionTokens=function(){var t;return x(this,function(e){switch(e.label){case 0:return this.p<this.N?(t=this.readOperator())?[4,t]:[3,2]:[3,5];case 1:return e.sent(),[3,0];case 2:return(t=this.readValue())?[4,t]:[3,4];case 3:return e.sent(),[3,0];case 4:case 5:return[2]}})},R.prototype.readOperator=function(){this.skipBlank();var e=this.matchTrie(this.opTrie);if(-1!==e)return new St(this.input,this.p,this.p=e,this.file)},R.prototype.matchTrie=function(e){for(var t,r=e,n=this.p;r[this.input[n]]&&n<this.N;)(r=r[this.input[n++]]).end&&(t=r);return!t||t.needBoundary&&Re(this.peek(n-this.p))?-1:n},R.prototype.readFilteredValue=function(){var e=this.p,t=this.readExpression(),r=(this.assert(t.valid(),"invalid value expression: ".concat(this.snapshot())),this.readFilters());return new Xt(t,r,this.input,e,this.p,this.file)},R.prototype.readFilters=function(){for(var e=[];;){var t=this.readFilter();if(!t)return e;e.push(t)}},R.prototype.readFilter=function(){var e=this;if(this.skipBlank(),this.end())return null;this.assert("|"===this.peek(),'expected "|" before filter'),this.p++;var t=this.p,r=this.readIdentifier();if(!r.size())return this.assert(this.end(),"expected filter name"),null;var n=[];if(this.skipBlank(),":"===this.peek())do{++this.p;var i=this.readFilterArg()}while(i&&n.push(i),this.skipBlank(),this.assert(this.end()||","===this.peek()||"|"===this.peek(),function(){return"unexpected character ".concat(e.snapshot())}),","===this.peek());else if("|"!==this.peek()&&!this.end())throw this.error('expected ":" after filter name');return new Nt(r.getText(),n,this.input,t,this.p,this.file)},R.prototype.readFilterArg=function(){var e=this.readValue();if(e){if(this.skipBlank(),":"!==this.peek())return e;++this.p;var t=this.readValue();return[e.getText(),t]}},R.prototype.readTopLevelTokens=function(e){void 0===e&&(e=xr);for(var t=[];this.p<this.N;){var r=this.readTopLevelToken(e);t.push(r)}return Or(t,e),t},R.prototype.readTopLevelToken=function(e){var t=e.tagDelimiterLeft,r=e.outputDelimiterLeft;return-1<this.rawBeginAt?this.readEndrawOrRawContent(e):this.match(t)?this.readTagToken(e):this.match(r)?this.readOutputToken(e):this.readHTMLToken([t,r])},R.prototype.readHTMLToken=function(e){for(var t=this,r=this.p;this.p<this.N&&!e.some(function(e){return t.match(e)});)++this.p;return new dt(this.input,r,this.p,this.file)},R.prototype.readTagToken=function(e){void 0===e&&(e=xr);var t=this.file,r=this.input,n=this.p;if(-1===this.readToDelimiter(e.tagDelimiterRight))throw this.error("tag ".concat(this.snapshot(n)," not closed"),n);r=new ut(r,n,this.p,e,t);return"raw"===r.name&&(this.rawBeginAt=n),r},R.prototype.readToDelimiter=function(e,t){for(void 0===t&&(t=!1),this.skipBlank();this.p<this.N;)if(t&&8&this.peekType())this.readQuoted();else if(++this.p,this.rmatch(e))return this.p;return-1},R.prototype.readOutputToken=function(e){void 0===e&&(e=xr);var t=this.file,r=this.input,n=e.outputDelimiterRight,i=this.p;if(-1===this.readToDelimiter(n,!0))throw this.error("output ".concat(this.snapshot(i)," not closed"),i);return new pt(r,i,this.p,e,t)},R.prototype.readEndrawOrRawContent=function(e){for(var t,r=e.tagDelimiterLeft,n=e.tagDelimiterRight,i=this.p,s=this.readTo(r)-r.length;this.p<this.N;)if("endraw"!==this.readIdentifier().getText())s=this.readTo(r)-r.length;else for(;this.p<=this.N;){if(this.rmatch(n))return t=this.p,i===s?(this.rawBeginAt=-1,new ut(this.input,i,t,e,this.file)):(this.p=s,new dt(this.input,i,s,this.file));if(this.rmatch(r))break;this.p++}throw this.error("raw ".concat(this.snapshot(this.rawBeginAt)," not closed"),i)},R.prototype.readLiquidTagTokens=function(e){void 0===e&&(e=xr);for(var t=[];this.p<this.N;){var r=this.readLiquidTagToken(e);r&&t.push(r)}return t},R.prototype.readLiquidTagToken=function(e){var t,r;if(this.skipBlank(),!this.end())return t=this.p,this.readToDelimiter("\n"),r=this.p,new Jt(this.input,t,r,e,this.file)},R.prototype.error=function(e,t){return void 0===t&&(t=this.p),new oe(e,new wt(this.input,t,this.N,this.file))},R.prototype.assert=function(e,t,r){if(!e)throw this.error("function"==typeof t?t():t,r)},R.prototype.snapshot=function(e){return void 0===e&&(e=this.p),JSON.stringify((e=this.input.slice(e,this.N),t=32,e.length>t?e.slice(0,t-3)+"...":e));var t},R.prototype.readWord=function(){return this.readIdentifier()},R.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;!this.end()&&Re(this.peek());)++this.p;return new wt(this.input,e,this.p,this.file)},R.prototype.readNonEmptyIdentifier=function(){var e=this.readIdentifier();return e.size()?e:void 0},R.prototype.readTagName=function(){return this.skipBlank(),"#"===this.input[this.p]?this.input.slice(this.p,++this.p):this.readIdentifier().getText()},R.prototype.readHashes=function(e){for(var t=[];;){var r=this.readHash(e);if(!r)return t;t.push(r)}},R.prototype.readHash=function(e){this.skipBlank(),","===this.peek()&&++this.p;var t,r=this.p,n=this.readNonEmptyIdentifier();if(n)return this.skipBlank(),e=e?"=":":",this.peek()===e&&(++this.p,t=this.readValue()),new Pt(this.input,r,this.p,n,t,this.file)},R.prototype.remaining=function(){return this.input.slice(this.p,this.N)},R.prototype.advance=function(e){this.p+=e=void 0===e?1:e},R.prototype.end=function(){return this.p>=this.N},R.prototype.readTo=function(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1},R.prototype.readValue=function(){this.skipBlank();var e=this.p,t=this.readLiteral()||this.readQuoted()||this.readRange()||this.readNumber(),r=this.readProperties(!t);return r.length?new Et(t,r,this.input,e,this.p):t},R.prototype.readScopeValue=function(){this.skipBlank();var e=this.p,t=this.readProperties();if(t.length)return new Et(void 0,t,this.input,e,this.p)},R.prototype.readProperties=function(e){void 0===e&&(e=!0);for(var t=[];;){if("["===this.peek()){this.p++;var r=this.readValue()||new wt(this.input,this.p,this.p,this.file);this.assert(-1!==this.readTo("]"),"[ not closed")}else{if(e&&!t.length)if(r=this.readNonEmptyIdentifier()){t.push(r);continue}if("."!==this.peek()||"."===this.peek(1))break;if(this.p++,!(r=this.readNonEmptyIdentifier()))break}t.push(r)}return t},R.prototype.readNumber=function(){this.skipBlank();var e,t=!1,r=!1,n=0;for(64&this.peekType()&&n++;this.p+n<=this.N;){if(32&this.peekType(n))r=!0;else{if("."!==this.peek(n)||"."===this.peek(n+1))break;if(t||!r)return;t=!0}n++}if(r&&!Re(this.peek(n)))return e=new yt(this.input,this.p,this.p+n,this.file),this.advance(n),e},R.prototype.readLiteral=function(){this.skipBlank();var e,t=this.matchTrie(this.literalTrie);if(-1!==t)return e=new xt(this.input,this.p,t,this.file),this.p=t,e},R.prototype.readRange=function(){this.skipBlank();var e,t,r=this.p;if("("===this.peek())return++this.p,e=this.readValueOrThrow(),this.p+=2,t=this.readValueOrThrow(),++this.p,new $t(this.input,r,this.p,e,t,this.file)},R.prototype.readValueOrThrow=function(){var e=this,t=this.readValue();return this.assert(t,function(){return"unexpected token ".concat(e.snapshot(),", value expected")}),t},R.prototype.readQuoted=function(){this.skipBlank();var e=this.p;if(8&this.peekType()){++this.p;for(var t=!1;this.p<this.N&&(++this.p,this.input[this.p-1]!==this.input[e]||t);)t?t=!1:"\\"===this.input[this.p-1]&&(t=!0);return new Ut(this.input,e,this.p,this.file)}},R.prototype.readFileNameTemplate=function(t){var r,n,i;return x(this,function(e){switch(e.label){case 0:r=t.outputDelimiterLeft,n=[","," ",r],i=new Set(n),e.label=1;case 1:return this.p<this.N&&!i.has(this.peek())?[4,this.match(r)?this.readOutputToken(t):this.readHTMLToken(n)]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}})},R.prototype.match=function(e){for(var t=0;t<e.length;t++)if(e[t]!==this.input[this.p+t])return!1;return!0},R.prototype.rmatch=function(e){for(var t=0;t<e.length;t++)if(e[e.length-1-t]!==this.input[this.p-1-t])return!1;return!0},R.prototype.peekType=function(e){return this.p+(e=void 0===e?0:e)>=this.N?0:p[this.input.charCodeAt(this.p+e)]},R.prototype.peek=function(e){return this.p+(e=void 0===e?0:e)>=this.N?"":this.input[this.p+e]},R.prototype.skipBlank=function(){for(;this.peekType()&ze;)++this.p};var S=R;function R(e,t,r,n){void 0===t&&(t=xr.operators),this.input=e,this.file=r,this.rawBeginAt=-1,this.p=n?n[0]:0,this.N=n?n[1]:e.length,this.opTrie=Ce(t),this.literalTrie=Ce(Be)}Sr.prototype.on=function(e,t){return this.handlers[e]=t,this},Sr.prototype.trigger=function(e,t){e=this.handlers[e];return!!e&&(e.call(this,t),!0)},Sr.prototype.start=function(){var e,t;for(this.trigger("start");!this.stopRequested&&(e=this.tokens.shift());)this.trigger("token",e)||Gr(e)&&this.trigger("tag:".concat(e.name),e)||(t=this.parseToken(e,this.tokens),this.trigger("template",t));return this.stopRequested||this.trigger("end"),this},Sr.prototype.stop=function(){return this.stopRequested=!0,this};var zr=Sr;function Sr(e,t){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=t}function Rr(e){this.token=e}s(Er,qr=Rr);var qr,q=Er;function Er(e,t,r){var n=qr.call(this,e)||this;return n.name=e.name,n.liquid=r,n.tokenizer=e.tokenizer,n}Dr.prototype.render=function(t){var r,n,i,s,o,a,u,c,l;return x(this,function(e){switch(e.label){case 0:r={},e.label=1;case 1:e.trys.push([1,8,9,10]),n=_(Object.keys(this.hash)),i=n.next(),e.label=2;case 2:return i.done?[3,7]:(s=i.value,o=r,a=s,void 0!==this.hash[s]?[3,3]:(u=!0,[3,5]));case 3:return[4,z(this.hash[s],t)];case 4:u=e.sent(),e.label=5;case 5:o[a]=u,e.label=6;case 6:return i=n.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),c={error:c},[3,10];case 9:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(c)throw c.error}return[7];case 10:return[2,r]}})};var Lr=Dr;function Dr(e,t){this.hash={};var r,n,e=new S(e,{});try{for(var i=_(e.readHashes(t)),s=i.next();!s.done;s=i.next()){var o=s.value;this.hash[o.name.content]=o.value}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}Mr.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,p,h,f;return x(this,function(e){switch(e.label){case 0:n=[],e.label=1;case 1:e.trys.push([1,8,9,10]),i=_(this.args),s=i.next(),e.label=2;case 2:return s.done?[3,7]:b(o=s.value)?(u=(a=n).push,c=[o[0]],[4,z(o[1],r)]):[3,4];case 3:return u.apply(a,[c.concat([e.sent()])]),[3,6];case 4:return p=(l=n).push,[4,z(o,r)];case 5:p.apply(l,[e.sent()]),e.label=6;case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return h=e.sent(),h={error:h},[3,10];case 9:try{s&&!s.done&&(f=i.return)&&f.call(i)}finally{if(h)throw h.error}return[7];case 10:return[4,this.handler.apply({context:r,liquid:this.liquid},g([t],d(n),!1))];case 11:return[2,e.sent()]}})};var Nr=Mr;function Mr(e,t,r,n){this.name=e,this.handler=u(t)?t:u(null==t?void 0:t.handler)?t.handler:G,this.raw=!u(t)&&!(null==t||!t.raw),this.args=r,this.liquid=n}jr.prototype.value=function(t,r){var n,i,s,o,a;return x(this,function(e){switch(e.label){case 0:return r=r||t.opts.lenientIf&&0<this.filters.length&&"default"===this.filters[0].name,[4,this.initial.evaluate(t,r)];case 1:n=e.sent(),e.label=2;case 2:e.trys.push([2,7,8,9]),i=_(this.filters),s=i.next(),e.label=3;case 3:return s.done?[3,6]:[4,s.value.render(n,t)];case 4:n=e.sent(),e.label=5;case 5:return s=i.next(),[3,3];case 6:return[3,9];case 7:return o=e.sent(),o={error:o},[3,9];case 8:try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(o)throw o.error}return[7];case 9:return[2,n]}})},jr.prototype.getFilter=function(e,t){var r=e.filters[t];return F(r||!e.options.strictFilters,function(){return"undefined filter: ".concat(t)}),r};var E=jr;function jr(e,r){var n=this,e=(this.filters=[],"string"==typeof e?new S(e,r.options.operators).readFilteredValue():e);this.initial=e.initial,this.filters=e.filters.map(function(e){var t=e.name,e=e.args;return new Nr(t,n.getFilter(r,t),e,r)})}s(Vr,Pr=Rr),Vr.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return[4,this.value.value(t,!1)];case 1:return n=e.sent(),r.write(n),[2]}})};var Pr,Ar=Vr;function Vr(e,t){var r,n=this,n=Pr.call(this,e)||this,e=new S(e.input,t.options.operators,e.file,e.contentRange),e=(n.value=new E(e.readFilteredValue(),t),n.value.filters),i=t.options.outputEscape;return null!=(r=e[e.length-1])&&r.raw||!i||e.push(new Nr(toString.call(i),i,[],t)),n}s(Hr,Ir=Rr),Hr.prototype.render=function(e,t){return x(this,function(e){return t.write(this.str),[2]})};var Ir,Br,Cr=Hr;function Hr(e){var t=Ir.call(this,e)||this;return t.str=e.getContent(),t}(i=Br=Br||{}).Partials="partials",i.Layouts="layouts",i.Root="root";Kr.prototype.lookup=function(t,r,n,i){var s,o,a,u,c,l,p,h;return x(this,function(e){switch(e.label){case 0:s=this.options.fs,o=this.options[r],e.label=1;case 1:e.trys.push([1,8,9,10]),a=_(this.candidates(t,o,i,r!==Br.Root)),u=a.next(),e.label=2;case 2:return u.done?[3,7]:(c=u.value,n?(l=s.existsSync(c),[3,5]):[3,3]);case 3:return[4,s.exists(c)];case 4:l=e.sent(),e.label=5;case 5:if(l)return[2,c];e.label=6;case 6:return u=a.next(),[3,2];case 7:return[3,10];case 8:return p=e.sent(),p={error:p},[3,10];case 9:try{u&&!u.done&&(h=a.return)&&h.call(a)}finally{if(p)throw p.error}return[7];case 10:throw this.lookupError(t,o)}})},Kr.prototype.candidates=function(t,r,n,i){var s,o,a,u,c,l,p,h,f,d,g,v,y;return x(this,function(e){switch(e.label){case 0:if(o=this.options,s=o.fs,o=o.extname,!this.shouldLoadRelative(t)||!n)return[3,8];h=s.resolve(this.dirname(n),t,o),e.label=1;case 1:e.trys.push([1,6,7,8]),a=_(r),u=a.next(),e.label=2;case 2:return u.done?[3,5]:(p=u.value,i&&!this.contains(p,h)?[3,4]:[4,h]);case 3:return e.sent(),[3,5];case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return d=e.sent(),d={error:d},[3,8];case 7:try{u&&!u.done&&(g=a.return)&&g.call(a)}finally{if(d)throw d.error}return[7];case 8:e.trys.push([8,13,14,15]),c=_(r),l=c.next(),e.label=9;case 9:return l.done?[3,12]:(p=l.value,h=s.resolve(p,t,o),i&&!this.contains(p,h)?[3,11]:[4,h]);case 10:e.sent(),e.label=11;case 11:return l=c.next(),[3,9];case 12:return[3,15];case 13:return v=e.sent(),v={error:v},[3,15];case 14:try{l&&!l.done&&(y=c.return)&&y.call(c)}finally{if(v)throw v.error}return[7];case 15:return void 0===s.fallback?[3,17]:void 0===(f=s.fallback(t))?[3,17]:[4,f];case 16:e.sent(),e.label=17;case 17:return[2]}})},Kr.prototype.dirname=function(e){var t=this.options.fs;return F(t.dirname,"`fs.dirname` is required for relative reference"),t.dirname(e)},Kr.prototype.lookupError=function(e,t){var r=new Error("ENOENT");return r.message='ENOENT: Failed to lookup "'.concat(e,'" in "').concat(t,'"'),r.code="ENOENT",r};var Ur=Kr;function Kr(e){var t;(this.options=e).relativeReference?(F(e=e.fs.sep,"`fs.sep` is required for relative reference"),t=new RegExp(["."+e,".."+e,"./","../"].map(function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}).join("|")),this.shouldLoadRelative=function(e){return t.test(e)}):this.shouldLoadRelative=function(e){return!1},this.contains=this.options.fs.contains||function(){return!0}}$r.prototype.parse=function(e,t){e=new S(e,this.liquid.options.operators,t).readTopLevelTokens(this.liquid.options);return this.parseTokens(e)},$r.prototype.parseTokens=function(e){for(var t,r=[],n=[];t=e.shift();)try{r.push(this.parseToken(t,e))}catch(e){if(!this.liquid.options.catchAllErrors)throw e;n.push(e)}if(n.length)throw new ge(n);return r},$r.prototype.parseToken=function(t,e){try{var r;return Gr(t)?(F(r=this.liquid.tags[t.name],'tag "'.concat(t.name,'" not found')),new r(t,e,this.liquid)):Zr(t)?new Ar(t,this.liquid):new Cr(t)}catch(e){if(ne.is(e))throw e;throw new ce(e,t)}},$r.prototype.parseStream=function(e){var r=this;return new zr(e,function(e,t){return r.parseToken(e,t)})},$r.prototype._parseFileCached=function(t,r,n,i){var s,o,a,u,c,l;return void 0===n&&(n=Br.Root),x(this,function(e){switch(e.label){case 0:return s=this.cache,o=this.loader.shouldLoadRelative(t)?i+","+t:n+":"+t,[4,s.read(o)];case 1:return(l=e.sent())?[2,l]:(a=this._parseFile(t,r,n,i),r?[4,a]:[3,3]);case 2:return c=e.sent(),[3,4];case 3:c=w(a),e.label=4;case 4:u=c,s.write(o,u),e.label=5;case 5:return e.trys.push([5,7,,8]),[4,u];case 6:return[2,e.sent()];case 7:throw l=e.sent(),s.remove(o),l;case 8:return[2]}})},$r.prototype._parseFile=function(t,r,n,i){var s,o,a,u;return void 0===n&&(n=Br.Root),x(this,function(e){switch(e.label){case 0:return[4,this.loader.lookup(t,n,r,i)];case 1:return(s=e.sent(),a=(o=this.liquid).parse,r)?(u=this.fs.readFileSync(s),[3,4]):[3,2];case 2:return[4,this.fs.readFile(s)];case 3:u=e.sent(),e.label=4;case 4:return[2,a.apply(o,[u,s])]}})};var Yr=$r;function $r(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new Ur(this.liquid.options)}function Qr(e){return!!(L(e)&l.TokenKind.Delimited)}function Wr(e){return L(e)===l.TokenKind.Operator}function Jr(e){return L(e)===l.TokenKind.HTML}function Zr(e){return L(e)===l.TokenKind.Output}function Gr(e){return L(e)===l.TokenKind.Tag}function Xr(e){return L(e)===l.TokenKind.Quoted}function en(e){return L(e)===l.TokenKind.PropertyAccess}function tn(e){return L(e)===l.TokenKind.Range}function L(e){return e?e.kind:-1}(i=l.TokenKind||(l.TokenKind={}))[i.Number=1]="Number",i[i.Literal=2]="Literal",i[i.Tag=4]="Tag",i[i.Output=8]="Output",i[i.HTML=16]="HTML",i[i.Filter=32]="Filter",i[i.Hash=64]="Hash",i[i.PropertyAccess=128]="PropertyAccess",i[i.Word=256]="Word",i[i.Range=512]="Range",i[i.Quoted=1024]="Quoted",i[i.Operator=2048]="Operator",i[i.FilteredValue=4096]="FilteredValue",i[i.Delimited=12]="Delimited";var rn,i=Object.freeze({__proto__:null,isDelimitedToken:Qr,isOperatorToken:Wr,isHTMLToken:Jr,isOutputToken:Zr,isTagToken:Gr,isQuotedToken:Xr,isLiteralToken:function(e){return L(e)===l.TokenKind.Literal},isNumberToken:function(e){return L(e)===l.TokenKind.Number},isPropertyAccessToken:en,isWordToken:function(e){return L(e)===l.TokenKind.Word},isRangeToken:tn}),D=(N.prototype.getRegister=function(e){return this.registers[e]=this.registers[e]||{}},N.prototype.setRegister=function(e,t){return this.registers[e]=t},N.prototype.saveRegister=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.map(function(e){return[e,t.getRegister(e)]})},N.prototype.restoreRegister=function(e){var r=this;return e.forEach(function(e){var e=d(e,2),t=e[0],e=e[1];return r.setRegister(t,e)})},N.prototype.getAll=function(){return g([this.globals,this.environments],d(this.scopes),!1).reduce(function(e,t){return T(e,t)},{})},N.prototype.get=function(e){return this.getSync(e)},N.prototype.getSync=function(e){return k(this._get(e))},N.prototype._get=function(t){var r;return x(this,function(e){switch(e.label){case 0:return r=this.findScope(t[0]),[4,this._getFromScope(r,t)];case 1:return[2,e.sent()]}})},N.prototype.getFromScope=function(e,t){return k(this._getFromScope(e,t))},N.prototype._getFromScope=function(t,r,n){var i;return void 0===n&&(n=this.strictVariables),x(this,function(e){switch(e.label){case 0:o(r)&&(r=r.split(".")),i=0,e.label=1;case 1:return i<r.length?[4,function(e,t,r){if(c(e=function e(t){return t&&u(t.toLiquid)?e(t.toLiquid()):t}(e)))return e;if(b(e)&&t<0)return e[e.length+ +t];r=function(e,t,r){if(!r||Object.hasOwnProperty.call(e,t)||e instanceof A)return e[t]}(e,t,r);if(void 0===r&&e instanceof A)return e.liquidMethodMissing(t);if(u(r))return r.call(e);{if("size"===t)return function(e){return e.hasOwnProperty("size")||void 0!==e.size?e.size:b(e)||o(e)?e.length:"object"==typeof e?Object.keys(e).length:void 0}(e);if("first"===t)return function(e){return b(e)?e[0]:e.first}(e);if("last"===t)return function(e){return b(e)?e[e.length-1]:e.last}(e)}return r}(t,r[i],this.ownPropertyOnly)]:[3,4];case 2:if(t=e.sent(),n&&void 0===t)throw new ke(r.slice(0,i+1).join("."));e.label=3;case 3:return i++,[3,1];case 4:return[2,t]}})},N.prototype.push=function(e){return this.scopes.push(e)},N.prototype.pop=function(){return this.scopes.pop()},N.prototype.bottom=function(){return this.scopes[0]},N.prototype.findScope=function(e){for(var t=this.scopes.length-1;0<=t;t--){var r=this.scopes[t];if(e in r)return r}return e in this.environments?this.environments:this.globals},N);function N(e,t,r){var n;void 0===e&&(e={}),void 0===t&&(t=xr),void 0===r&&(r={}),this.scopes=[{}],this.registers={},this.sync=!!r.sync,this.opts=t,this.globals=null!=(n=r.globals)?n:t.globals,this.environments=Q(e)?e:Object(e),this.strictVariables=null!=(n=r.strictVariables)?n:this.opts.strictVariables,this.ownPropertyOnly=null!=(e=r.ownPropertyOnly)?e:t.ownPropertyOnly}(nn=rn=rn||{})[nn.OUTPUT=0]="OUTPUT",nn[nn.STORE=1]="STORE";var nn=t(Math.abs),sn=t(Math.max),on=t(Math.min),an=t(Math.ceil),un=t(function(e,t,r){return(r=void 0===r?!1:r)?Math.floor(e/t):e/t}),cn=t(Math.floor),ln=t(function(e,t){return e-t}),pn=t(function(e,t){return e%t}),hn=t(function(e,t){return e*t});var nn=Object.freeze({__proto__:null,abs:nn,at_least:sn,at_most:on,ceil:an,divided_by:un,floor:cn,minus:ln,modulo:pn,times:hn,round:function(e,t){return void 0===t&&(t=0),e=m(e),t=m(t),t=Math.pow(10,t),Math.round(e*t)/t},plus:function(e,t){return e=m(e),t=m(t),Number(e)+Number(t)}}),sn=/[^\p{M}\p{L}\p{Nd}]+/gu,fn={raw:/\s+/g,default:sn,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/gu,ascii:/[^A-Za-z0-9]+/g,latin:sn,none:null};on=Object.freeze({__proto__:null,url_decode:function(e){return decodeURIComponent(v(e)).replace(/\+/g," ")},url_encode:function(e){return encodeURIComponent(v(e)).replace(/%20/g,"+")},cgi_escape:function(e){return encodeURIComponent(v(e)).replace(/%20/g,"+").replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uri_escape:function(e){return encodeURI(v(e)).replace(/%5B/g,"[").replace(/%5D/g,"]")},slugify:function(e,t,r){void 0===t&&(t="default"),void 0===r&&(r=!1),e=v(e);var n=fn[t];return n&&(e=(e="latin"===t?e.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH"):e).replace(n,"-").replace(/^-|-$/g,"")),r?e:e.toLowerCase()}}),an=t(function(e,t){return y(e).join(void 0===t?" ":t)}),un=t(function(e){return b(e)?$(e):""}),cn=t(function(e){return b(e)?e[0]:""}),ln=t(function(e){return g([],d(y(e)),!1).reverse()});function dn(e,t){return void 0===t&&(t=[]),y(e).concat(y(t))}pn=Object.freeze({__proto__:null,join:an,last:un,first:cn,reverse:ln,sort:function(t,r){var n,i,s,o,a,u,c,l,p,h;return x(this,function(e){switch(e.label){case 0:n=[],e.label=1;case 1:e.trys.push([1,8,9,10]),i=_(y(t)),s=i.next(),e.label=2;case 2:return s.done?[3,7]:(o=s.value,u=(a=n).push,c=[o],r?[4,this.context._getFromScope(o,v(r).split("."),!1)]:[3,4]);case 3:return l=e.sent(),[3,5];case 4:l=o,e.label=5;case 5:u.apply(a,[c.concat([l])]),e.label=6;case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return p=e.sent(),p={error:p},[3,10];case 9:try{s&&!s.done&&(h=i.return)&&h.call(i)}finally{if(p)throw p.error}return[7];case 10:return[2,n.sort(function(e,t){e=e[1],t=t[1];return e<t?-1:t<e?1:0}).map(function(e){return e[0]})]}})},sort_natural:function(e,t){var r=v(t),t=void 0===t?X:function(e,t){return X(e[r],t[r])};return g([],d(y(e)),!1).sort(t)},size:function(e){return e&&e.length||0},map:function(t,r){var n,i,s,o,a,u,c,l;return x(this,function(e){switch(e.label){case 0:n=[],e.label=1;case 1:e.trys.push([1,6,7,8]),i=_(y(t)),s=i.next(),e.label=2;case 2:return s.done?[3,5]:(u=s.value,a=(o=n).push,[4,this.context._getFromScope(u,v(r),!1)]);case 3:a.apply(o,[e.sent()]),e.label=4;case 4:return s=i.next(),[3,2];case 5:return[3,8];case 6:return u=e.sent(),c={error:u},[3,8];case 7:try{s&&!s.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}return[7];case 8:return[2,n]}})},sum:function(t,r){var n,i,s,o,a,u,c,l,p;return x(this,function(e){switch(e.label){case 0:n=0,e.label=1;case 1:e.trys.push([1,8,9,10]),i=_(y(t)),s=i.next(),e.label=2;case 2:return s.done?[3,7]:(o=s.value,a=Number,r?[4,this.context._getFromScope(o,v(r),!1)]:[3,4]);case 3:return u=e.sent(),[3,5];case 4:u=o,e.label=5;case 5:c=a.apply(void 0,[u]),n+=Number.isNaN(c)?0:c,e.label=6;case 6:return s=i.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),l={error:c},[3,10];case 9:try{s&&!s.done&&(p=i.return)&&p.call(i)}finally{if(l)throw l.error}return[7];case 10:return[2,n]}})},compact:function(e){return y(e).filter(function(e){return!c(m(e))})},concat:dn,push:function(e,t){return dn(e,[t])},unshift:function(e,t){return(e=g([],d(y(e)),!1)).unshift(t),e},pop:function(e){return(e=g([],d(y(e)),!1)).pop(),e},shift:function(e){return(e=g([],d(y(e)),!1)).shift(),e},slice:function(e,t,r){return void 0===r&&(r=1),c(e=m(e))?[]:(b(e)||(e=v(e)),t=t<0?e.length+t:t,e.slice(t,t+r))},where:function(t,r,n){var i,s,o,a,u,c,l,p,h,f=this;return x(this,function(e){switch(e.label){case 0:i=[],t=y(t),s=new S(v(r)).readScopeValue(),e.label=1;case 1:e.trys.push([1,6,7,8]),o=_(t),a=o.next(),e.label=2;case 2:return a.done?[3,5]:(l=a.value,c=(u=i).push,[4,z(s,new D(l))]);case 3:c.apply(u,[e.sent()]),e.label=4;case 4:return a=o.next(),[3,2];case 5:return[3,8];case 6:return l=e.sent(),p={error:l},[3,8];case 7:try{a&&!a.done&&(h=o.return)&&h.call(o)}finally{if(p)throw p.error}return[7];case 8:return[2,t.filter(function(e,t){return void 0===n?pr(i[t],f.context):fr(i[t],n)})]}})},where_exp:function(t,r,n){var i,s,o,a,u,c,l,p;return x(this,function(e){switch(e.label){case 0:i=[],s=new E(v(n),this.liquid),e.label=1;case 1:e.trys.push([1,6,7,8]),o=_(y(t)),a=o.next(),e.label=2;case 2:return a.done?[3,5]:(u=a.value,[4,s.value(new D(((p={})[r]=u,p)))]);case 3:e.sent()&&i.push(u),e.label=4;case 4:return a=o.next(),[3,2];case 5:return[3,8];case 6:return p=e.sent(),c={error:p},[3,8];case 7:try{a&&!a.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}return[7];case 8:return[2,i]}})},group_by:function(t,r){var n,i,s,o,a,u,c,l;return x(this,function(e){switch(e.label){case 0:n=new Map,t=y(t),i=new S(v(r)).readScopeValue(),e.label=1;case 1:e.trys.push([1,6,7,8]),s=_(t),o=s.next(),e.label=2;case 2:return o.done?[3,5]:(a=o.value,[4,z(i,new D(a))]);case 3:u=e.sent(),n.has(u)||n.set(u,[]),n.get(u).push(a),e.label=4;case 4:return o=s.next(),[3,2];case 5:return[3,8];case 6:return u=e.sent(),c={error:u},[3,8];case 7:try{o&&!o.done&&(l=s.return)&&l.call(s)}finally{if(c)throw c.error}return[7];case 8:return[2,g([],d(n.entries()),!1).map(function(e){e=d(e,2);return{name:e[0],items:e[1]}})]}})},group_by_exp:function(t,r,n){var i,s,o,a,u,c,l,p;return x(this,function(e){switch(e.label){case 0:i=new Map,s=new E(v(n),this.liquid),e.label=1;case 1:e.trys.push([1,6,7,8]),o=_(y(t)),a=o.next(),e.label=2;case 2:return a.done?[3,5]:(u=a.value,[4,s.value(new D(((p={})[r]=u,p)))]);case 3:p=e.sent(),i.has(p)||i.set(p,[]),i.get(p).push(u),e.label=4;case 4:return a=o.next(),[3,2];case 5:return[3,8];case 6:return c=e.sent(),c={error:c},[3,8];case 7:try{a&&!a.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}return[7];case 8:return[2,g([],d(i.entries()),!1).map(function(e){e=d(e,2);return{name:e[0],items:e[1]}})]}})},find:function(t,r,n){var i,s,o,a,u,c;return x(this,function(e){switch(e.label){case 0:i=new S(v(r)).readScopeValue(),e.label=1;case 1:e.trys.push([1,6,7,8]),s=_(y(t)),o=s.next(),e.label=2;case 2:return o.done?[3,5]:(a=o.value,[4,z(i,new D(a))]);case 3:if(fr(e.sent(),n))return[2,a];e.label=4;case 4:return o=s.next(),[3,2];case 5:return[3,8];case 6:return u=e.sent(),u={error:u},[3,8];case 7:try{o&&!o.done&&(c=s.return)&&c.call(s)}finally{if(u)throw u.error}return[7];case 8:return[2,null]}})},find_exp:function(t,r,n){var i,s,o,a,u,c,l;return x(this,function(e){switch(e.label){case 0:i=new E(v(n),this.liquid),e.label=1;case 1:e.trys.push([1,6,7,8]),s=_(y(t)),o=s.next(),e.label=2;case 2:return o.done?[3,5]:(a=o.value,[4,i.value(new D(((l={})[r]=a,l)))]);case 3:if(e.sent())return[2,a];e.label=4;case 4:return o=s.next(),[3,2];case 5:return[3,8];case 6:return l=e.sent(),u={error:l},[3,8];case 7:try{o&&!o.done&&(c=s.return)&&c.call(s)}finally{if(u)throw u.error}return[7];case 8:return[2,null]}})},uniq:function(e){e=m(e);var t={};return(e||[]).filter(function(e){return!C.call(t,String(e))&&(t[String(e)]=!0)})},sample:function(e,t){return void 0===t&&(t=1),c(e=m(e))?[]:(e=g([],d(e=b(e)?e:v(e)),!1).sort(function(){return Math.random()-.5}),1===t?e[0]:e.slice(0,t))}});function gn(e,t,r){r=yn(e,this.context.opts,r);return r?rt(r,t=c(t=m(t))?this.context.opts.dateFormat:v(t)):e}function vn(e,t,r,n){var i=yn(e,this.context.opts);return i?"ordinal"===r?(r=i.getDate(),rt(i,"US"===n?"".concat(t," ").concat(r,"%q, %Y"):"".concat(r,"%q ").concat(t," %Y"))):rt(i,"%d ".concat(t," %Y")):e}function yn(e,t,r){var n;if(e=m(e),e="now"===e||"today"===e?new Date:K(e)?new Date(1e3*e):o(e)?/^\d+$/.test(e)?new Date(1e3*+e):t.preserveTimezones?it.createDateFixedToTimezone(e):new Date(e):e,((n=e)instanceof Date||n instanceof it)&&!isNaN(n.getTime()))return void 0!==r?e=new it(e,r):e instanceof it||void 0===t.timezoneOffset||(e=new it(e,t.timezoneOffset)),e}var hn=Object.freeze({__proto__:null,date:gn,date_to_xmlschema:function(e){return gn.call(this,e,"%Y-%m-%dT%H:%M:%S%:z")},date_to_rfc822:function(e){return gn.call(this,e,"%a, %d %b %Y %H:%M:%S %z")},date_to_string:function(e,t,r){return vn.call(this,e,"%b",t,r)},date_to_long_string:function(e,t,r){return vn.call(this,e,"%B",t,r)}}),mn=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,bn=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;var wn,sn=Object.freeze({__proto__:null,append:function(e,t){return F(2===arguments.length,"append expect 2 arguments"),v(e)+v(t)},prepend:function(e,t){return F(2===arguments.length,"prepend expect 2 arguments"),v(t)+v(e)},lstrip:function(e,t){return t?(t=ee(v(t)),v(e).replace(new RegExp("^[".concat(t,"]+"),"g"),"")):v(e).replace(/^\s+/,"")},downcase:function(e){return v(e).toLowerCase()},upcase:function(e){return v(e).toUpperCase()},remove:function(e,t){return v(e).split(v(t)).join("")},remove_first:function(e,t){return v(e).replace(v(t),"")},remove_last:function(e,t){var e=v(e),t=v(t),r=e.lastIndexOf(t);return-1===r?e:e.substring(0,r)+e.substring(r+t.length)},rstrip:function(e,t){return t?(t=ee(v(t)),v(e).replace(new RegExp("[".concat(t,"]+$"),"g"),"")):v(e).replace(/\s+$/,"")},split:function(e,t){for(var r=v(e).split(v(t));r.length&&""===r[r.length-1];)r.pop();return r},strip:function(e,t){return t?(t=ee(v(t)),v(e).replace(new RegExp("^[".concat(t,"]+"),"g"),"").replace(new RegExp("[".concat(t,"]+$"),"g"),"")):v(e).trim()},strip_newlines:function(e){return v(e).replace(/\r?\n/gm,"")},capitalize:function(e){return(e=v(e)).charAt(0).toUpperCase()+e.slice(1).toLowerCase()},replace:function(e,t,r){return v(e).split(v(t)).join(r)},replace_first:function(e,t,r){return v(e).replace(v(t),r)},replace_last:function(e,t,r){var e=v(e),t=v(t),n=e.lastIndexOf(t);return-1===n?e:(r=v(r),e.substring(0,n)+r+e.substring(n+t.length))},truncate:function(e,t,r){return void 0===t&&(t=50),void 0===r&&(r="..."),(e=v(e)).length<=t?e:e.substring(0,t-r.length)+r},truncatewords:function(e,t,r){void 0===t&&(t=15),void 0===r&&(r="...");var n=(e=v(e).split(/\s+/)).slice(0,t=t<=0?1:t).join(" ");return e.length>=t&&(n+=r),n},normalize_whitespace:function(e){return(e=v(e)).replace(/\s+/g," ")},number_of_words:function(e,t){if(!(e=v(e).trim()))return 0;switch(t){case"cjk":return(e.match(mn)||[]).length+(e.match(bn)||[]).length;case"auto":return mn.test(e)?e.match(mn).length+(e.match(bn)||[]).length:e.split(/\s+/).length;default:return e.split(/\s+/).length}},array_to_sentence_string:function(e,t){switch(void 0===t&&(t="and"),e.length){case 0:return"";case 1:return e[0];case 2:return"".concat(e[0]," ").concat(t," ").concat(e[1]);default:return"".concat(e.slice(0,-1).join(", "),", ").concat(t," ").concat(e[e.length-1])}}}),kn=T(T(T(T(T(T(T({},r),nn),on),pn),hn),sn),br),an=(s(Tn,wn=q),Tn.prototype.render=function(t){var r,n;return x(this,function(e){switch(e.label){case 0:return r=t.bottom(),n=this.key,[4,this.value.value(t,this.liquid.options.lenientIf)];case 1:return r[n]=e.sent(),[2]}})},Tn);function Tn(e,t,r){e=wn.call(this,e,t,r)||this;return e.key=e.tokenizer.readIdentifier().content,e.tokenizer.assert(e.key,"expected variable name"),e.tokenizer.skipBlank(),e.tokenizer.assert("="===e.tokenizer.peek(),'expected "="'),e.tokenizer.advance(),e.value=new E(e.tokenizer.readFilteredValue(),e.liquid),e}var xn,_n=["offset","limit","reversed"],un=(s(Fn,xn=q),Fn.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,p,h,f;return x(this,function(e){switch(e.label){case 0:return n=this.liquid.renderer,s=U,[4,z(this.collection,t)];case 1:return(i=s.apply(void 0,[e.sent()])).length?[3,3]:[4,n.renderTemplates(this.elseTemplates,t,r)];case 2:return e.sent(),[2];case 3:return o="continue-"+this.variable+"-"+this.collection.getText(),t.push({continue:t.getRegister(o)}),[4,this.hash.render(t)];case 4:a=e.sent(),t.pop(),u=this.liquid.options.orderedFilterParameters?Object.keys(a).filter(function(e){return _n.includes(e)}):_n.filter(function(e){return void 0!==a[e]}),i=u.reduce(function(e,t){var r;return"offset"===t?(r=a.offset,e.slice(r)):"limit"===t?(r=a.limit,e.slice(0,r)):g([],d(e),!1).reverse()},i),t.setRegister(o,(a.offset||0)+i.length),u={forloop:new Pe(i.length,this.collection.getText(),this.variable)},t.push(u),e.label=5;case 5:e.trys.push([5,10,11,12]),c=_(i),l=c.next(),e.label=6;case 6:return l.done?[3,9]:(p=l.value,u[this.variable]=p,[4,n.renderTemplates(this.templates,t,r)]);case 7:if(e.sent(),r.break)return r.break=!1,[3,9];r.continue=!1,u.forloop.next(),e.label=8;case 8:return l=c.next(),[3,6];case 9:return[3,12];case 10:return p=e.sent(),h={error:p},[3,12];case 11:try{l&&!l.done&&(f=c.return)&&f.call(c)}finally{if(h)throw h.error}return[7];case 12:return t.pop(),[2]}})},Fn);function Fn(e,t,r){var n,i=xn.call(this,e,t,r)||this,r=i.tokenizer.readIdentifier(),s=i.tokenizer.readIdentifier(),o=i.tokenizer.readValue();if(!r.size()||"in"!==s.content||!o)throw new Error("illegal tag: ".concat(e.getText()));i.variable=r.content,i.collection=o,i.hash=new Lr(i.tokenizer.remaining()),i.templates=[],i.elseTemplates=[];var a=i.liquid.parser.parseStream(t).on("start",function(){return n=i.templates}).on("tag:else",function(){return n=i.elseTemplates}).on("tag:endfor",function(){return a.stop()}).on("template",function(e){return n.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return a.start(),i}s(zn,On=q),zn.prototype.render=function(t){var r;return x(this,function(e){switch(e.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,t)];case 1:return r=e.sent(),t.bottom()[this.variable]=r,[2]}})},zn.prototype.readVariableName=function(){var e=this.tokenizer.readIdentifier().content;if(e)return e;e=this.tokenizer.readQuoted();if(e)return lr(e);throw this.tokenizer.error("invalid capture name")};var On,cn=zn;function zn(e,t,r){var n=On.call(this,e,t,r)||this;for(n.templates=[],n.variable=n.readVariableName();t.length;){var i=t.shift();if(Gr(i)&&"endcapture"===i.name)return n;n.templates.push(r.parser.parseToken(i,t))}throw new Error("tag ".concat(e.getText()," not closed"))}s(Rn,Sn=q),Rn.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,p,h,f,d,g,v;return x(this,function(e){switch(e.label){case 0:return n=this.liquid.renderer,s=m,[4,this.value.value(t,t.opts.lenientIf)];case 1:i=s.apply(void 0,[e.sent()]),o=!1,e.label=2;case 2:e.trys.push([2,14,15,16]),a=_(this.branches),u=a.next(),e.label=3;case 3:if(u.done)return[3,13];c=u.value,e.label=4;case 4:e.trys.push([4,10,11,12]),g=void 0,l=_(c.values),p=l.next(),e.label=5;case 5:return p.done?[3,9]:[4,z(p.value,t,t.opts.lenientIf)];case 6:return(h=e.sent(),fr(i,h))?[4,n.renderTemplates(c.templates,t,r)]:[3,8];case 7:return e.sent(),o=!0,[3,9];case 8:return p=l.next(),[3,5];case 9:return[3,12];case 10:return h=e.sent(),g={error:h},[3,12];case 11:try{p&&!p.done&&(v=l.return)&&v.call(l)}finally{if(g)throw g.error}return[7];case 12:return u=a.next(),[3,3];case 13:return[3,16];case 14:return f=e.sent(),f={error:f},[3,16];case 15:try{u&&!u.done&&(d=a.return)&&d.call(a)}finally{if(f)throw f.error}return[7];case 16:return o?[3,18]:[4,n.renderTemplates(this.elseTemplates,t,r)];case 17:e.sent(),e.label=18;case 18:return[2]}})};var Sn,ln=Rn;function Rn(e,t,r){var n=Sn.call(this,e,t,r)||this,i=(n.branches=[],n.elseTemplates=[],n.value=new E(n.tokenizer.readFilteredValue(),n.liquid),n.elseTemplates=[],[]),s=0,o=n.liquid.parser.parseStream(t).on("tag:when",function(e){if(!(0<s)){i=[];for(var t=[];!e.tokenizer.end();)t.push(e.tokenizer.readValueOrThrow()),e.tokenizer.skipBlank(),","===e.tokenizer.peek()?e.tokenizer.readTo(","):e.tokenizer.readTo("or");n.branches.push({values:t,templates:i})}}).on("tag:else",function(){s++,i=n.elseTemplates}).on("tag:endcase",function(){return o.stop()}).on("template",function(e){i===n.elseTemplates&&1!==s||i.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return o.start(),n}s(En,qn=q),En.prototype.render=function(){};var qn,r=En;function En(e,t,r){for(var n=qn.call(this,e,t,r)||this;t.length;){var i=t.shift();if(Gr(i)&&"endcomment"===i.name)return n}throw new Error("tag ".concat(e.getText()," not closed"))}s(Dn,Ln=q),Dn.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,p,h,f,d,g,v,y,m,b,w,k;return x(this,function(e){switch(e.label){case 0:return n=(i=this).liquid,i=i.hash,[4,jn(this.file,t,n)];case 1:return F(s=e.sent(),function(){return'illegal file path "'.concat(s,'"')}),o=new D({},t.opts,{sync:t.sync,globals:t.globals,strictVariables:t.strictVariables}),a=o.bottom(),u=T,c=[a],[4,i.render(t)];case 2:return(u.apply(void 0,c.concat([e.sent()])),this.with)?(f=this.with,h=f.value,f=f.alias,l=a,p=f||s,[4,z(h,t)]):[3,4];case 3:l[p]=e.sent(),e.label=4;case 4:return this.for?(g=this.for,h=g.value,f=g.alias,g=U,[4,z(h,t)]):[3,15];case 5:d=g.apply(void 0,[e.sent()]),a.forloop=new Pe(d.length,h.getText(),f),e.label=6;case 6:e.trys.push([6,12,13,14]),v=_(d),y=v.next(),e.label=7;case 7:return y.done?[3,11]:(m=y.value,a[f]=m,[4,n._parsePartialFile(s,o.sync,this.currentFile)]);case 8:return b=e.sent(),[4,n.renderer.renderTemplates(b,o,r)];case 9:e.sent(),a.forloop.next(),e.label=10;case 10:return y=v.next(),[3,7];case 11:return[3,14];case 12:return m=e.sent(),w={error:m},[3,14];case 13:try{y&&!y.done&&(k=v.return)&&k.call(v)}finally{if(w)throw w.error}return[7];case 14:return[3,18];case 15:return[4,n._parsePartialFile(s,o.sync,this.currentFile)];case 16:return b=e.sent(),[4,n.renderer.renderTemplates(b,o,r)];case 17:e.sent(),e.label=18;case 18:return[2]}})};var Ln,nn=Dn;function Dn(e,t,r){var n=Ln.call(this,e,t,r)||this,i=n.tokenizer;for(n.file=Nn(i,n.liquid),n.currentFile=e.file;!i.end();){i.skipBlank();var s=i.p,o=i.readIdentifier();if(("with"===o.content||"for"===o.content)&&(i.skipBlank(),":"!==i.peek())){var a=i.readValue();if(a){var u=i.p,c=void 0;"as"===i.readIdentifier().content?c=i.readIdentifier():i.p=u,n[o.content]={value:a,alias:c&&c.content},i.skipBlank(),","===i.peek()&&i.advance();continue}}i.p=s;break}return n.hash=new Lr(i.remaining()),n}function Nn(e,t){var r;return t.options.dynamicPartials?(r=e.readValue(),e.assert(r,"illegal file path"),"none"===r.getText()?void 0:Xr(r)?Mn(t.parse(lr(r))):r):(r=g([],d(e.readFileNameTemplate(t.options)),!1),"none"===(e=Mn(t.parser.parseTokens(r)))?void 0:e)}function Mn(e){return 1===e.length&&Jr(e[0].token)?e[0].token.getContent():e}function jn(t,r,n){return x(this,function(e){switch(e.label){case 0:return"string"==typeof t?[2,t]:Array.isArray(t)?[2,n.renderer.renderTemplates(t,r)]:[4,z(t,r)];case 1:return[2,e.sent()]}})}s(An,Pn=q),An.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,p,h;return x(this,function(e){switch(e.label){case 0:return n=(s=this).liquid,i=s.hash,s=s.withVar,o=n.renderer,[4,jn(this.file,t,n)];case 1:return F(a=e.sent(),function(){return'illegal file path "'.concat(a,'"')}),u=t.saveRegister("blocks","blockMode"),t.setRegister("blocks",{}),t.setRegister("blockMode",rn.OUTPUT),[4,i.render(t)];case 2:return(c=e.sent(),s)?(l=c,p=a,[4,z(s,t)]):[3,4];case 3:l[p]=e.sent(),e.label=4;case 4:return[4,n._parsePartialFile(a,t.sync,this.currentFile)];case 5:return h=e.sent(),t.push(t.opts.jekyllInclude?{include:c}:c),[4,o.renderTemplates(h,t,r)];case 6:return e.sent(),t.pop(),t.restoreRegister(u),[2]}})};var Pn,on=An;function An(e,t,r){t=Pn.call(this,e,t,r)||this,r=e.tokenizer,t.file=Nn(r,t.liquid),t.currentFile=e.file,e=r.p;return"with"===r.readIdentifier().content&&(r.skipBlank(),":"!==r.peek())?t.withVar=r.readValue():r.p=e,t.hash=new Lr(r.remaining(),t.liquid.options.jekyllInclude),t}s(In,Vn=q),In.prototype.render=function(e,t){e=e.environments;K(e[this.variable])||(e[this.variable]=0),t.write(v(--e[this.variable]))};var Vn,pn=In;function In(e,t,r){e=Vn.call(this,e,t,r)||this;return e.variable=e.tokenizer.readIdentifier().content,e}s(Cn,Bn=q),Cn.prototype.render=function(t,e){var r,n,i,s;return x(this,function(e){switch(e.label){case 0:return[4,z(this.group,t)];case 1:return r=e.sent(),r="cycle:".concat(r,":")+this.candidates.join(","),n=t.getRegister("cycle"),void 0===(i=n[r])&&(i=n[r]=0),s=this.candidates[i],i=(i+1)%this.candidates.length,n[r]=i,[4,z(s,t)];case 2:return[2,e.sent()]}})};var Bn,hn=Cn;function Cn(e,t,r){var n=Bn.call(this,e,t,r)||this,t=(n.candidates=[],n.tokenizer.readValue());for(n.tokenizer.skipBlank(),t&&(":"===n.tokenizer.peek()?(n.group=t,n.tokenizer.advance()):n.candidates.push(t));!n.tokenizer.end();){var i=n.tokenizer.readValue();i&&n.candidates.push(i),n.tokenizer.readTo(",")}return n.tokenizer.assert(n.candidates.length,function(){return'empty candidates: "'.concat(e.getText(),'"')}),n}s(Un,Hn=q),Un.prototype.render=function(t,r){var n,i,s,o,a,u,c;return x(this,function(e){switch(e.label){case 0:n=this.liquid.renderer,e.label=1;case 1:e.trys.push([1,7,8,9]),i=_(this.branches),s=i.next(),e.label=2;case 2:return s.done?[3,6]:(o=s.value,a=o.value,o=o.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return pr(e.sent(),t)?[4,n.renderTemplates(o,t,r)]:[3,5];case 4:return e.sent(),[2];case 5:return s=i.next(),[3,2];case 6:return[3,9];case 7:return a=e.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,t,r)];case 10:return e.sent(),[2]}})};var Hn,sn=Un;function Un(e,t,r){var n=Hn.call(this,e,t,r)||this,i=(n.branches=[],n.elseTemplates=[],[]),s=0;return r.parser.parseStream(t).on("start",function(){return n.branches.push({value:new E(e.args,n.liquid),templates:i=[]})}).on("tag:elsif",function(e){0<s?i=[]:n.branches.push({value:new E(e.args,n.liquid),templates:i=[]})}).on("tag:else",function(){s++,i=n.elseTemplates}).on("tag:endif",function(){this.stop()}).on("template",function(e){i===n.elseTemplates&&1!==s||i.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))}).start(),n}s($n,Kn=q),$n.prototype.render=function(e,t){var e=e.environments,r=(K(e[this.variable])||(e[this.variable]=0),e[this.variable]);e[this.variable]++,t.write(v(r))};var Kn,Yn=$n;function $n(e,t,r){e=Kn.call(this,e,t,r)||this;return e.variable=e.tokenizer.readIdentifier().content,e}s(Jn,Qn=q),Jn.prototype.render=function(t,r){var n,i,s,o,a,u,c,l,p;return x(this,function(e){switch(e.label){case 0:return(n=(c=this).liquid,i=c.args,c=c.file,s=n.renderer,void 0!==c)?[3,2]:(t.setRegister("blockMode",rn.OUTPUT),[4,s.renderTemplates(this.templates,t,r)]);case 1:return e.sent(),[2];case 2:return[4,jn(this.file,t,n)];case 3:return F(o=e.sent(),function(){return'illegal file path "'.concat(o,'"')}),[4,n._parseLayoutFile(o,t.sync,this.currentFile)];case 4:return a=e.sent(),t.setRegister("blockMode",rn.STORE),[4,s.renderTemplates(this.templates,t)];case 5:return u=e.sent(),void 0===(c=t.getRegister("blocks"))[""]&&(c[""]=function(e,t){return t.write(u)}),t.setRegister("blockMode",rn.OUTPUT),p=(l=t).push,[4,i.render(t)];case 6:return p.apply(l,[e.sent()]),[4,s.renderTemplates(a,t,r)];case 7:return e.sent(),t.pop(),[2]}})};var Qn,Wn=Jn;function Jn(e,t,r){r=Qn.call(this,e,t,r)||this;return r.file=Nn(r.tokenizer,r.liquid),r.currentFile=e.file,r.args=new Lr(r.tokenizer.remaining()),r.templates=r.liquid.parser.parseTokens(t),r}s(Xn,Zn=q),Xn.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return(n=this.getBlockRender(t),t.getRegister("blockMode")!==rn.STORE)?[3,1]:(t.getRegister("blocks")[this.block]=n,[3,3]);case 1:return[4,n(new Ve,r)];case 2:e.sent(),e.label=3;case 3:return[2]}})},Xn.prototype.getBlockRender=function(n){function r(t,r){return x(this,function(e){switch(e.label){case 0:return n.push({block:t}),[4,i.renderer.renderTemplates(s,n,r)];case 1:return e.sent(),n.pop(),[2]}})}var i=this.liquid,s=this.templates,o=n.getRegister("blocks")[this.block];return o?function(e,t){return o(new Ve(function(){return r(e,t)}),t)}:r};var Zn,Gn=Xn;function Xn(e,t,r){var n=Zn.call(this,e,t,r)||this,i=(n.templates=[],/\w+/.exec(e.args));for(n.block=i?i[0]:"";t.length;){var s=t.shift();if(Gr(s)&&"endblock"===s.name)return n;s=r.parser.parseToken(s,t);n.templates.push(s)}throw new Error("tag ".concat(e.getText()," not closed"))}s(ri,ei=q),ri.prototype.render=function(){return this.tokens.map(function(e){return e.getText()}).join("")};var ei,ti=ri;function ri(e,t,r){var n=ei.call(this,e,t,r)||this;for(n.tokens=[];t.length;){var i=t.shift();if(Gr(i)&&"endraw"===i.name)return n;n.tokens.push(i)}throw new Error("tag ".concat(e.getText()," not closed"))}s(si,ni=Pe),si.prototype.row=function(){return Math.floor(this.i/this.cols)+1},si.prototype.col0=function(){return this.i%this.cols},si.prototype.col=function(){return this.col0()+1},si.prototype.col_first=function(){return 0===this.col0()},si.prototype.col_last=function(){return this.col()===this.cols};var ni,ii=si;function si(e,t,r,n){r=ni.call(this,e,r,n)||this;return r.length=e,r.cols=t,r}s(ui,oi=q),ui.prototype.render=function(t,r){var n,i,s,o,a,u;return x(this,function(e){switch(e.label){case 0:return i=U,[4,z(this.collection,t)];case 1:return n=i.apply(void 0,[e.sent()]),[4,this.args.render(t)];case 2:o=e.sent(),a=o.offset||0,s=void 0===o.limit?n.length:o.limit,n=n.slice(a,a+s),a=o.cols||n.length,s=this.liquid.renderer,o=new ii(n.length,a,this.collection.getText(),this.variable),a={tablerowloop:o},t.push(a),u=0,e.label=3;case 3:return u<n.length?(a[this.variable]=n[u],0===o.col0()&&(1!==o.row()&&r.write("</tr>"),r.write('<tr class="row'.concat(o.row(),'">'))),r.write('<td class="col'.concat(o.col(),'">')),[4,s.renderTemplates(this.templates,t,r)]):[3,6];case 4:e.sent(),r.write("</td>"),e.label=5;case 5:return u++,o.next(),[3,3];case 6:return n.length&&r.write("</tr>"),t.pop(),[2]}})};var oi,ai=ui;function ui(e,t,r){var n,i=oi.call(this,e,t,r)||this,r=i.tokenizer.readIdentifier(),s=(i.tokenizer.skipBlank(),i.tokenizer.readIdentifier()),o=i.tokenizer.readValue();if("in"!==s.content||!o)throw new Error("illegal tag: ".concat(e.getText()));i.variable=r.content,i.collection=o,i.args=new Lr(i.tokenizer.remaining()),i.templates=[];var a=i.liquid.parser.parseStream(t).on("start",function(){return n=i.templates}).on("tag:endtablerow",function(){return a.stop()}).on("template",function(e){return n.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return a.start(),i}s(pi,ci=q),pi.prototype.render=function(t,r){var n,i,s,o,a,u,c,l;return x(this,function(e){switch(e.label){case 0:n=this.liquid.renderer,e.label=1;case 1:e.trys.push([1,7,8,9]),i=_(this.branches),s=i.next(),e.label=2;case 2:return s.done?[3,6]:(a=s.value,u=a.value,o=a.test,a=a.templates,[4,u.value(t,t.opts.lenientIf)]);case 3:return(u=e.sent(),o(u,t))?[4,n.renderTemplates(a,t,r)]:[3,5];case 4:return e.sent(),[2];case 5:return s=i.next(),[3,2];case 6:return[3,9];case 7:return c=e.sent(),c={error:c},[3,9];case 8:try{s&&!s.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}return[7];case 9:return[4,n.renderTemplates(this.elseTemplates,t,r)];case 10:return e.sent(),[2]}})};var ci,li=pi;function pi(e,t,r){var n=ci.call(this,e,t,r)||this,i=(n.branches=[],n.elseTemplates=[],[]),s=0;return n.liquid.parser.parseStream(t).on("start",function(){return n.branches.push({value:new E(e.args,n.liquid),test:hr,templates:i=[]})}).on("tag:elsif",function(e){0<s?i=[]:n.branches.push({value:new E(e.args,n.liquid),test:pr,templates:i=[]})}).on("tag:else",function(){s++,i=n.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",function(e){i===n.elseTemplates&&1!==s||i.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))}).start(),n}s(di,hi=q),di.prototype.render=function(e,t){t.break=!0};var hi,fi=di;function di(){return null!==hi&&hi.apply(this,arguments)||this}s(yi,gi=q),yi.prototype.render=function(e,t){t.continue=!0};var gi,vi=yi;function yi(){return null!==gi&&gi.apply(this,arguments)||this}s(wi,mi=q),wi.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return this.value?[4,this.value.value(t,!1)]:[2];case 1:return n=e.sent(),r.write(n),[2]}})};var mi,bi=wi;function wi(e,t,r){e=mi.call(this,e,t,r)||this;return e.tokenizer.skipBlank(),e.tokenizer.end()||(e.value=new E(e.tokenizer.readFilteredValue(),e.liquid)),e}s(xi,ki=q),xi.prototype.render=function(t,r){return x(this,function(e){switch(e.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,t,r)];case 1:return e.sent(),[2]}})};var ki,Ti=xi;function xi(e,t,r){e=ki.call(this,e,t,r)||this,t=e.tokenizer.readLiquidTagTokens(e.liquid.options);return e.templates=e.liquid.parser.parseTokens(t),e}s(Oi,_i=q),Oi.prototype.render=function(){};var _i,Fi=Oi;function Oi(e,t,r){t=_i.call(this,e,t,r)||this;if(-1!==e.args.search(/\n\s*[^#\s]/g))throw new Error("every line of an inline comment must start with a '#' character");return t}var zi={assign:an,for:un,capture:cn,case:ln,comment:r,include:on,render:nn,decrement:pn,increment:Yn,cycle:hn,if:sn,layout:Wn,block:Gn,raw:ti,tablerow:ai,unless:li,break:fi,continue:vi,echo:bi,liquid:Ti,"#":Fi},Si=(M.prototype.parse=function(e,t){return this.parser.parse(e,t)},M.prototype._render=function(e,t,r){t=t instanceof D?t:new D(t,this.options,r);return this.renderer.renderTemplates(e,t)},M.prototype.render=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._render(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.renderSync=function(e,t,r){return k(this._render(e,t,T(T({},r),{sync:!0})))},M.prototype.renderToNodeStream=function(e,t,r){t=new D(t,this.options,r=void 0===r?{}:r);return this.renderer.renderTemplatesToNodeStream(e,t)},M.prototype._parseAndRender=function(e,t,r){e=this.parse(e);return this._render(e,t,r)},M.prototype.parseAndRender=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._parseAndRender(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.parseAndRenderSync=function(e,t,r){return k(this._parseAndRender(e,t,T(T({},r),{sync:!0})))},M.prototype._parsePartialFile=function(e,t,r){return this.parser.parseFile(e,t,Br.Partials,r)},M.prototype._parseLayoutFile=function(e,t,r){return this.parser.parseFile(e,t,Br.Layouts,r)},M.prototype._parseFile=function(e,t,r,n){return this.parser.parseFile(e,t,r,n)},M.prototype.parseFile=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this.parser.parseFile(t,!1,r))]})})},M.prototype.parseFileSync=function(e,t){return k(this.parser.parseFile(e,!0,t))},M.prototype._renderFile=function(t,r,n){var i;return x(this,function(e){switch(e.label){case 0:return[4,this._parseFile(t,n.sync,n.lookupType)];case 1:return i=e.sent(),[4,this._render(i,r,n)];case 2:return[2,e.sent()]}})},M.prototype.renderFile=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._renderFile(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.renderFileSync=function(e,t,r){return k(this._renderFile(e,t,T(T({},r),{sync:!0})))},M.prototype.renderFileToNodeStream=function(r,n,i){return a(this,void 0,void 0,function(){var t;return x(this,function(e){switch(e.label){case 0:return[4,this.parseFile(r)];case 1:return t=e.sent(),[2,this.renderToNodeStream(t,n,i)]}})})},M.prototype._evalValue=function(e,t){e=new E(e,this),t=t instanceof D?t:new D(t,this.options);return e.value(t)},M.prototype.evalValue=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,w(this._evalValue(t,r))]})})},M.prototype.evalValueSync=function(e,t){return k(this._evalValue(e,t))},M.prototype.registerFilter=function(e,t){this.filters[e]=t},M.prototype.registerTag=function(e,t){function r(e,t,r){r=n.call(this,e,t,r)||this;return u(i.parse)&&i.parse.call(r,e,t),r}var i,n;this.tags[e]=u(t)?t:(i=t,s(r,n=q),r.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return[4,new Lr(this.token.args).render(t)];case 1:return n=e.sent(),[4,i.render.call(this,t,r,n)];case 2:return[2,e.sent()]}})},r)},M.prototype.plugin=function(e){return e.call(this,M)},M.prototype.express=function(){var s=this,o=!0;return function(e,t,r){var n,i;o&&(o=!1,i=Fr(this.root),(n=s.options.root).unshift.apply(n,g([],d(i),!1)),(n=s.options.layouts).unshift.apply(n,g([],d(i),!1)),(n=s.options.partials).unshift.apply(n,g([],d(i),!1))),s.renderFile(e,t).then(function(e){return r(null,e)},r)}},M);function M(e){void 0===e&&(e={});var r=this;this.renderer=new or,this.filters={},this.tags={},this.options=_r(e),this.parser=new Yr(this),Y(zi,function(e,t){return r.registerTag(t,e)}),Y(kn,function(e,t){return r.registerFilter(t,e)})}l.AssertionError=_e,l.AssignTag=an,l.BlockTag=Gn,l.BreakTag=fi,l.CaptureTag=cn,l.CaseTag=ln,l.CommentTag=r,l.Context=D,l.ContinueTag=vi,l.CycleTag=hn,l.DecrementTag=pn,l.Drop=A,l.EchoTag=bi,l.Expression=ur,l.Filter=Nr,l.ForTag=un,l.Hash=Lr,l.IfTag=sn,l.IncludeTag=on,l.IncrementTag=Yn,l.InlineCommentTag=Fi,l.LayoutTag=Wn,l.Liquid=Si,l.LiquidError=ne,l.LiquidTag=Ti,l.Output=Ar,l.ParseError=ce,l.ParseStream=zr,l.RawTag=ti,l.RenderError=he,l.RenderTag=nn,l.TablerowTag=ai,l.Tag=q,l.TagToken=ut,l.TimezoneDate=it,l.Token=e,l.TokenizationError=oe,l.Tokenizer=S,l.TypeGuards=i,l.UndefinedVariableError=me,l.UnlessTag=li,l.Value=E,l.assert=F,l.createTrie=Ce,l.defaultOperators=De,l.defaultOptions=xr,l.evalQuotedToken=lr,l.evalToken=z,l.filters=kn,l.isFalsy=hr,l.isTruthy=pr,l.tags=zi,l.toPromise=w,l.toValue=m,l.toValueSync=k,l.version="10.14.0",Object.defineProperty(l,"__esModule",{value:!0})});
//# sourceMappingURL=liquid.browser.min.js.map