UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

14 lines 77.2 kB
import{Ea as ls,Gb as bt,Ib as ps,Pa as hs,Qa as cs,Qb as ms,Ta as us,Wa as fs,bb as ds,ma as yt,pa as we,ua as as,wa as wt}from"./chunk-N5PQPIBF.js";import{d as ye,g as gt,i as os}from"./chunk-IU2ZQ6TE.js";import{a as G,c as pi,e as mi,g as ge}from"./chunk-VPRTJUIN.js";var ci=pi(l=>{"use strict";ge();Object.defineProperty(l,"__esModule",{value:!0});var gi=G("stream"),W=G("path"),K=G("fs"),Ds=G("crypto"),O=class{constructor(e,s,i,r,n){this.kind=e,this.input=s,this.begin=i,this.end=r,this.file=n}getText(){return this.input.slice(this.begin,this.end)}getPosition(){let[e,s]=[1,1];for(let i=0;i<this.begin;i++)this.input[i]===` `?(e++,s=1):s++;return[e,s]}size(){return this.end-this.begin}},D=class{liquidMethodMissing(e,s){}},yi=Object.prototype.toString,gs=String.prototype.toLowerCase,Zt=Object.hasOwnProperty;function d(t){return typeof t=="string"}function x(t){return typeof t=="function"}function wi(t){return t&&x(t.then)}function Se(t){return t&&x(t.next)&&x(t.throw)&&x(t.return)}function Qt(t){return function(...e){return new Promise((s,i)=>{t(...e,(r,n)=>{r?i(r):s(n)})})}}function c(t){return t=g(t),d(t)?t:k(t)?"":S(t)?t.map(e=>c(e)).join(""):String(t)}function pe(t){return t=g(t),S(t)?t:d(t)&&t.length>0?[t]:ki(t)?Array.from(t):ft(t)?Object.keys(t).map(e=>[e,t[e]]):[]}function L(t){return t=g(t),k(t)?[]:S(t)?t:[t]}function g(t){return t instanceof D&&x(t.valueOf)?t.valueOf():t}function Tt(t){return+g(t)||0}function ut(t){return typeof t=="number"}function Es(t){return t&&x(t.toLiquid)?Es(t.toLiquid()):t}function k(t){return t==null}function bi(t){return t===void 0}function S(t){return yi.call(t)==="[object Array]"}function Vs(t){return t&&ut(t.length)}function ki(t){return ft(t)&&Symbol.iterator in t}function ys(t,e){t=t||{};for(let s in t)if(Zt.call(t,s)&&e(t[s],s,t)===!1)break;return t}function Ti(t){return t[t.length-1]}function ft(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function Ps(t,e,s=1){let i=[];for(let r=t;r<e;r+=s)i.push(r);return i}function ne(t,e,s=" "){return Cs(t,e,s,(i,r)=>r+i)}function xi(t,e,s=" "){return Cs(t,e,s,(i,r)=>i+r)}function Cs(t,e,s,i){t=String(t);let r=e-t.length;return r<=0?t:i(t,s.repeat(r))}function $s(t){return t}function Si(t){return[...t].some(s=>s>="a"&&s<="z")?t.toUpperCase():t.toLowerCase()}function _i(t,e){return t.length>e?t.slice(0,e-3)+"...":t}function Li(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||t<e?-1:t>e?1:0}function Fi(t,e){return k(t)&&k(e)?0:k(t)?1:k(e)||(t=gs.call(t),e=gs.call(e),t<e)?-1:t>e?1:0}function dt(t){return function(...e){return t.call(this,...e.map(g))}}function V(t){return function(...e){return t.call(this,...e.map(Tt))}}function*be(t){let e=new Set;for(let s of t){let i=JSON.stringify(s);e.has(i)||(e.add(i),yield s)}}var ws="__liquidClass__",E=class extends Error{constructor(e,s){super(typeof e=="string"?e:e.message),this.context="",typeof e!="string"&&Object.defineProperty(this,"originalError",{value:e,enumerable:!1}),Object.defineProperty(this,"token",{value:s,enumerable:!1}),Object.defineProperty(this,ws,{value:"LiquidError",enumerable:!1})}update(){Object.defineProperty(this,"context",{value:Oi(this.token),enumerable:!1}),this.message=vi(this.message,this.token),this.stack=this.message+` `+this.context+` `+this.stack,this.originalError&&(this.stack+=` From `+this.originalError.stack)}static is(e){return e?.[ws]==="LiquidError"}},_e=class extends E{constructor(e,s){super(e,s),this.name="TokenizationError",super.update()}},Le=class extends E{constructor(e,s){super(e,s),this.name="ParseError",this.message=e.message,super.update()}},Fe=class extends E{constructor(e,s){super(e,s.token),this.name="RenderError",this.message=e.message,super.update()}static is(e){return e.name==="RenderError"}},Oe=class extends E{constructor(e){super(e[0],e[0].token),this.errors=e,this.name="LiquidErrors";let s=e.length>1?"s":"";this.message=`${e.length} error${s} found`,super.update()}static is(e){return e.name==="LiquidErrors"}},ve=class extends E{constructor(e,s){super(e,s),this.name="UndefinedVariableError",this.message=e.message,super.update()}},xt=class extends Error{constructor(e){super(`undefined variable: ${e}`),this.name="InternalUndefinedVariableError",this.variableName=e}},ze=class extends Error{constructor(e){super(e),this.name="AssertionError",this.message=e+""}};function Oi(t){let[e,s]=t.getPosition(),i=t.input.split(` `),r=Math.max(e-2,1),n=Math.min(e+3,i.length);return Ps(r,n+1).map(a=>{let h=a===e?">> ":" ",f=ne(String(a),String(n).length),u=`${h}${f}| `,p=a===e?` `+ne("^",s+u.length):"";return u+=i[a-1],u+=p,u}).join(` `)}function vi(t,e){e.file&&(t+=`, file:${e.file}`);let[s,i]=e.getPosition();return t+=`, line:${s}, col:${i}`,t}var w=[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],zi=1,ee=4,bs=8,js=16,Ri=32,Ai=64,Ni=128;function ke(t){let e=t.charCodeAt(0);return e>=128?!w[e]:!!(w[e]&zi)}w[160]=w[5760]=w[6158]=w[8192]=w[8193]=w[8194]=w[8195]=w[8196]=w[8197]=w[8198]=w[8199]=w[8200]=w[8201]=w[8202]=w[8232]=w[8233]=w[8239]=w[8287]=w[12288]=ee;w[8220]=w[8221]=Ni;function _(t,e){if(!t){let s=typeof e=="function"?e():e||`expect ${t} to be true`;throw new ze(s)}}function Re(t,e=`unexpected ${JSON.stringify(t)}`){_(!t,e)}var St=class extends D{equals(e){return k(g(e))}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return null}},oe=class t extends D{equals(e){return e instanceof t?!1:(e=g(e),d(e)||S(e)?e.length===0:ft(e)?Object.keys(e).length===0:!1)}gt(){return!1}geq(){return!1}lt(){return!1}leq(){return!1}valueOf(){return""}static is(e){return e instanceof t}},_t=class t extends oe{equals(e){return e===!1||k(g(e))?!0:d(e)?/^\s*$/.test(e):super.equals(e)}static is(e){return e instanceof t}},ae=class extends D{constructor(e,s,i){super(),this.i=0,this.length=e,this.name=`${i}-${s}`}next(){this.i++}index0(){return this.i}index(){return this.i+1}first(){return this.i===0}last(){return this.i===this.length-1}rindex(){return this.length-this.i}rindex0(){return this.length-this.i-1}valueOf(){return JSON.stringify(this)}},Ae=class{constructor(){this.buffer=""}write(e){this.buffer+=c(e)}},Lt=class{constructor(){this.buffer="",this.stream=new gi.PassThrough}write(e){this.stream.write(c(e))}error(e){this.stream.emit("error",e)}end(){this.stream.end()}},Ft=class{constructor(){this.buffer=""}write(e){e=g(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=c(this.buffer)+c(e)}},Ne=class extends D{constructor(e=()=>""){super(),this.superBlockRender=e}*super(){let e=new Ae;return yield this.superBlockRender(e),e.buffer}};function A(t){return t&&x(t.equals)&&x(t.gt)&&x(t.geq)&&x(t.lt)&&x(t.leq)}var ks=new St,Is={true:!0,false:!1,nil:ks,null:ks,empty:new oe,blank:new _t};function Ot(t){let e={};for(let[s,i]of Object.entries(t)){let r=e;for(let n=0;n<s.length;n++){let o=s[n];r[o]=r[o]||{},n===s.length-1&&ke(s[n])&&(r[o].needBoundary=!0),r=r[o]}r.data=i,r.end=!0}return e}function vt(t,e){let s=e||t;return(i,...r)=>i?s(...r):t(...r)}async function q(t){if(!Se(t))return t;let e,s=!1,i="next";do{let r=t[i](e);s=r.done,e=r.value,i="next";try{Se(e)&&(e=q(e)),wi(e)&&(e=await e)}catch(n){i="throw",e=n}}while(!s);return e}function M(t){if(!Se(t))return t;let e,s=!1,i="next";do{let r=t[i](e);if(s=r.done,e=r.value,i="next",Se(e))try{e=M(e)}catch(n){i="throw",e=n}}while(!s);return e}var qi=/%([-_0^#:]+)?(\d+)?([EO])?(.)/;function Mi(t){return[31,Di(t)?29:28,31,30,31,30,31,31,30,31,30,31]}function Bs(t){let e=0;for(let s=0;s<t.getMonth();++s)e+=Mi(t)[s];return e+t.getDate()}function Ts(t,e){let s=Bs(t)+(e-t.getDay()),r=7-new Date(t.getFullYear(),0,1).getDay()+e;return String(Math.floor((s-r)/7)+1)}function Di(t){let e=t.getFullYear();return!!((e&3)===0&&(e%100||e%400===0&&e))}function Ei(t){let e=t.getDate();if([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"}}function Vi(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}var Pi={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},Ci=new Set("aAbBceklpP");function xs(t,e){let s=Math.abs(t.getTimezoneOffset()),i=Math.floor(s/60),r=s%60;return(t.getTimezoneOffset()>0?"-":"+")+ne(i,2,"0")+(e.flags[":"]?":":"")+ne(r,2,"0")}var zt={a:t=>t.getShortWeekdayName(),A:t=>t.getLongWeekdayName(),b:t=>t.getShortMonthName(),B:t=>t.getLongMonthName(),c:t=>t.toLocaleString(),C:t=>Vi(t),d:t=>t.getDate(),e:t=>t.getDate(),H:t=>t.getHours(),I:t=>String(t.getHours()%12||12),j:t=>Bs(t),k:t=>t.getHours(),l:t=>String(t.getHours()%12||12),L:t=>t.getMilliseconds(),m:t=>t.getMonth()+1,M:t=>t.getMinutes(),N:(t,e)=>{let s=Number(e.width)||9,i=String(t.getMilliseconds()).slice(0,s);return e.memoryLimit?.use(s-i.length),xi(i,s,"0")},p:t=>t.getHours()<12?"AM":"PM",P:t=>t.getHours()<12?"am":"pm",q:t=>Ei(t),s:t=>Math.round(t.getTime()/1e3),S:t=>t.getSeconds(),u:t=>t.getDay()||7,U:t=>Ts(t,0),w:t=>t.getDay(),W:t=>Ts(t,1),x:t=>t.toLocaleDateString(),X:t=>t.toLocaleTimeString(),y:t=>t.getFullYear().toString().slice(2,4),Y:t=>t.getFullYear(),z:xs,Z:(t,e)=>t.getTimeZoneName()||xs(t,e),t:()=>" ",n:()=>` `,"%":()=>"%"};zt.h=zt.b;function Te(t,e,s){let i="",r=e,n;for(;n=qi.exec(r);)i+=r.slice(0,n.index),r=r.slice(n.index+n[0].length),i+=$i(t,n,s);return i+r}function $i(t,e,s){let[i,r="",n,o,a]=e,h=zt[a];if(!h)return i;let f={};for(let y of r)f[y]=!0;let u=String(h(t,{flags:f,width:n,modifier:o,memoryLimit:s})),p=Ci.has(a)?" ":"0",m=n||Pi[a]||0;return f["^"]?u=u.toUpperCase():f["#"]&&(u=Si(u)),f._?p=" ":f[0]&&(p="0"),f["-"]&&(m=0),s?.use(Number(m)-u.length),ne(u,m,p)}function Us(){return typeof Intl<"u"?Intl.DateTimeFormat:void 0}var ji=6e4,Ii=/([zZ]|([+-])(\d{2}):?(\d{2}))$/,Ws=["January","February","March","April","May","June","July","August","September","October","November","December"],Bi=Ws.map(t=>t.slice(0,3)),Hs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ui=Hs.map(t=>t.slice(0,3)),I=class t{constructor(e,s,i){this.locale=s,this.DateTimeFormat=Us(),this.date=new Date(e),this.timezoneFixed=i!==void 0,i===void 0&&(i=this.date.getTimezoneOffset()),this.timezoneOffset=d(i)?t.getTimezoneOffset(i,this.date):i,this.timezoneName=d(i)?i:"";let r=(this.date.getTimezoneOffset()-this.timezoneOffset)*ji,n=this.date.getTime()+r;this.displayDate=new Date(n)}getTime(){return this.displayDate.getTime()}getMilliseconds(){return this.displayDate.getMilliseconds()}getSeconds(){return this.displayDate.getSeconds()}getMinutes(){return this.displayDate.getMinutes()}getHours(){return this.displayDate.getHours()}getDay(){return this.displayDate.getDay()}getDate(){return this.displayDate.getDate()}getMonth(){return this.displayDate.getMonth()}getFullYear(){return this.displayDate.getFullYear()}toLocaleString(e,s){return s?.timeZone?this.date.toLocaleString(e,s):this.displayDate.toLocaleString(e,s)}toLocaleTimeString(e){return this.displayDate.toLocaleTimeString(e)}toLocaleDateString(e){return this.displayDate.toLocaleDateString(e)}getTimezoneOffset(){return this.timezoneOffset}getTimeZoneName(){if(this.timezoneFixed)return this.timezoneName;if(this.DateTimeFormat)return this.DateTimeFormat().resolvedOptions().timeZone}getLongMonthName(){return this.format({month:"long"})??Ws[this.getMonth()]}getShortMonthName(){return this.format({month:"short"})??Bi[this.getMonth()]}getLongWeekdayName(){return this.format({weekday:"long"})??Hs[this.displayDate.getDay()]}getShortWeekdayName(){return this.format({weekday:"short"})??Ui[this.displayDate.getDay()]}valid(){return!isNaN(this.getTime())}format(e){return this.DateTimeFormat&&this.DateTimeFormat(this.locale,e).format(this.displayDate)}static createDateFixedToTimezone(e,s){let i=e.match(Ii);if(i&&i[1]==="Z")return new t(+new Date(e),s,0);if(i&&i[2]&&i[3]&&i[4]){let[,,r,n,o]=i,a=(r==="+"?-1:1)*(parseInt(n,10)*60+parseInt(o,10));return new t(+new Date(e),s,a)}return new t(e,s)}static getTimezoneOffset(e,s){let i=s.toLocaleString("en-US",{timeZone:e}),r=s.toLocaleString("en-US",{timeZone:"UTC"}),n=new Date(i);return(+new Date(r)-+n)/(60*1e3)}},le=class{constructor(e,s){this.base=0,this.message=`${e} limit exceeded`,this.limit=s}use(e){+e>0&&(_(this.base+ +e<=this.limit,this.message),this.base+=+e)}check(e){+e>0&&_(+e<=this.limit,this.message)}},he=class extends O{constructor(e,[s,i],r,n,o,a,h,f){super(e,r,n,o,f),this.trimLeft=!1,this.trimRight=!1;let u=r[s]==="-",p=r[i-1]==="-",m=u?s+1:s,y=p?i-1:i;for(;m<y&&w[r.charCodeAt(m)]&ee;)m++;for(;y>m&&w[r.charCodeAt(y-1)]&ee;)y--;this.contentRange=[m,y],this.trimLeft=u||a,this.trimRight=p||h}get content(){return this.input.slice(this.contentRange[0],this.contentRange[1])}},ce=class extends he{constructor(e,s,i,r,n){let{trimTagLeft:o,trimTagRight:a,tagDelimiterLeft:h,tagDelimiterRight:f}=r,[u,p]=[s+h.length,i-f.length];super(l.TokenKind.Tag,[u,p],e,s,i,o,a,n),this.tokenizer=new z(e,r.operators,n,this.contentRange),this.name=this.tokenizer.readTagName(),this.tokenizer.assert(this.name,"illegal tag syntax, tag name expected"),this.tokenizer.skipBlank(),this.args=this.tokenizer.input.slice(this.tokenizer.p,this.contentRange[1])}},Rt=class extends he{constructor(e,s,i,r,n){let{trimOutputLeft:o,trimOutputRight:a,outputDelimiterLeft:h,outputDelimiterRight:f}=r,u=[s+h.length,i-f.length];super(l.TokenKind.Output,u,e,s,i,o,a,n)}},qe=class extends O{constructor(e,s,i,r){super(l.TokenKind.HTML,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.trimLeft=0,this.trimRight=0}getContent(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)}},At=class extends O{constructor(e,s,i,r){super(l.TokenKind.Number,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=Number(this.getText())}},se=class extends O{constructor(e,s,i,r){super(l.TokenKind.Word,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=this.getText()}},Nt=class extends O{constructor(e,s,i,r){super(l.TokenKind.Literal,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.literal=this.getText(),this.content=Is[this.literal]}},Ss={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},Wi={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0},qt=class extends O{constructor(e,s,i,r){super(l.TokenKind.Operator,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.operator=this.getText()}getPrecedence(){let e=this.getText();return e in Ss?Ss[e]:1}},Me=class extends O{constructor(e,s,i,r,n,o){super(l.TokenKind.PropertyAccess,i,r,n,o),this.variable=e,this.props=s}},De=class extends O{constructor(e,s,i,r,n,o){super(l.TokenKind.Filter,i,r,n,o),this.name=e,this.args=s}},Mt=class extends O{constructor(e,s,i,r,n,o){super(l.TokenKind.Hash,e,s,i,o),this.input=e,this.begin=s,this.end=i,this.name=r,this.value=n,this.file=o}},Hi=/[\da-fA-F]/,_s=/[0-7]/,Ls={b:"\b",f:"\f",n:` `,r:"\r",t:" ",v:"\v"};function Fs(t){let e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function Yi(t){let e="";for(let s=1;s<t.length-1;s++){if(t[s]!=="\\"){e+=t[s];continue}if(Ls[t[s+1]]!==void 0)e+=Ls[t[++s]];else if(t[s+1]==="u"){let i=0,r=s+2;for(;r<=s+5&&Hi.test(t[r]);)i=i*16+Fs(t[r++]);s=r-1,e+=String.fromCharCode(i)}else if(!_s.test(t[s+1]))e+=t[++s];else{let i=s+1,r=0;for(;i<=s+3&&_s.test(t[i]);)r=r*8+Fs(t[i++]);s=i-1,e+=String.fromCharCode(r)}}return e}var Dt=class extends O{constructor(e,s,i,r){super(l.TokenKind.Quoted,e,s,i,r),this.input=e,this.begin=s,this.end=i,this.file=r,this.content=Yi(this.getText())}},Et=class extends O{constructor(e,s,i,r,n,o){super(l.TokenKind.Range,e,s,i,o),this.input=e,this.begin=s,this.end=i,this.lhs=r,this.rhs=n,this.file=o}},Vt=class extends he{constructor(e,s,i,r,n){super(l.TokenKind.Tag,[s,i],e,s,i,!1,!1,n),this.tokenizer=new z(e,r.operators,n,this.contentRange),this.name=this.tokenizer.readTagName(),this.tokenizer.assert(this.name,"illegal liquid tag syntax"),this.tokenizer.skipBlank()}get args(){return this.tokenizer.input.slice(this.tokenizer.p,this.contentRange[1])}},Pt=class extends O{constructor(e,s,i,r,n,o){super(l.TokenKind.FilteredValue,i,r,n,o),this.initial=e,this.filters=s,this.input=i,this.begin=r,this.end=n,this.file=o}},Ji={now:()=>Date.now()};function Ct(){return typeof global=="object"&&global.performance||typeof window=="object"&&window.performance||Ji}var $t=class{renderTemplatesToNodeStream(e,s){let i=new Lt;return Promise.resolve().then(()=>q(this.renderTemplates(e,s,i))).then(()=>i.end(),r=>i.error(r)),i.stream}*renderTemplates(e,s,i){i||(i=s.opts.keepOutputType?new Ft:new Ae),s.renderLimit.check(Ct().now());let r=[];for(let n of e){s.renderLimit.check(Ct().now());try{let o=yield n.render(s,i);if(o&&i.write(o),s.breakCalled||s.continueCalled)break}catch(o){let a=E.is(o)?o:new Fe(o,n);if(s.opts.catchAllErrors)r.push(a);else throw a}}if(r.length)throw new Oe(r);return i.buffer}},Ee=class{constructor(e){this.postfix=[...Ki(e)]}*evaluate(e,s){_(e,"unable to evaluate: context not defined");let i=[];for(let r of this.postfix)if(Kt(r)){let n=i.pop(),o;if(Wi[r.operator]===1)o=yield e.opts.operators[r.operator](n,e);else{let a=i.pop();o=yield e.opts.operators[r.operator](a,n,e)}i.push(o)}else i.push(yield T(r,e,s));return i[0]}valid(){return!!this.postfix.length}};function*T(t,e,s=!1){if(t){if("content"in t)return t.content;if(de(t))return yield Zi(t,e,s);if(Gt(t))return yield Qi(t,e)}}function*Zi(t,e,s){let i=[];for(let r of t.props)i.push(yield T(r,e,!1));try{if(t.variable){let r=yield T(t.variable,e,s);return yield e._getFromScope(r,i)}else return yield e._get(i)}catch(r){if(s&&r.name==="InternalUndefinedVariableError")return null;throw new ve(r,t)}}function Ys(t){return t.content}function*Qi(t,e){let s=yield T(t.lhs,e),i=yield T(t.rhs,e);return e.memoryLimit.use(i-s+1),Ps(+s,+i+1)}function*Ki(t){let e=[];for(let s of t)if(Kt(s)){for(;e.length&&e[e.length-1].getPrecedence()>s.getPrecedence();)yield e.pop();e.push(s)}else yield s;for(;e.length;)yield e.pop()}function U(t,e){return!me(t,e)}function me(t,e){return t=g(t),e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}var Js={"==":$,"!=":(t,e)=>!$(t,e),">":(t,e)=>A(t)?t.gt(e):A(e)?e.lt(t):g(t)>g(e),"<":(t,e)=>A(t)?t.lt(e):A(e)?e.gt(t):g(t)<g(e),">=":(t,e)=>A(t)?t.geq(e):A(e)?e.leq(t):g(t)>=g(e),"<=":(t,e)=>A(t)?t.leq(e):A(e)?e.geq(t):g(t)<=g(e),contains:(t,e)=>(t=g(t),S(t)?t.some(s=>$(s,e)):x(t?.indexOf)?t.indexOf(g(e))>-1:!1),not:(t,e)=>me(g(t),e),and:(t,e,s)=>U(g(t),s)&&U(g(e),s),or:(t,e,s)=>U(g(t),s)||U(g(e),s)};function $(t,e){return A(t)?t.equals(e):A(e)?e.equals(t):(t=g(t),e=g(e),S(t)?S(e)&&Gi(t,e):t===e)}function Gi(t,e){return t.length!==e.length?!1:!t.some((s,i)=>!$(s,e[i]))}function Xi(t,e){return t.some(s=>$(s,e))}var ie=class{constructor(e,s,i,r){this.key=e,this.value=s,this.next=i,this.prev=r}},Ve=class{constructor(e,s=0){this.limit=e,this.size=s,this.cache={},this.head=new ie("HEAD",null,null,null),this.tail=new ie("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}write(e,s){if(this.cache[e])this.cache[e].value=s;else{let i=new ie(e,s,this.head.next,this.head);this.head.next.prev=i,this.head.next=i,this.cache[e]=i,this.size++,this.ensureLimit()}}read(e){if(!this.cache[e])return;let{value:s}=this.cache[e];return this.remove(e),this.write(e,s),s}remove(e){let s=this.cache[e];s.prev.next=s.next,s.next.prev=s.prev,delete this.cache[e],this.size--}clear(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}}ensureLimit(){this.size>this.limit&&this.remove(this.tail.prev.key)}},er=t=>G.resolve(t,{paths:["."]}),tr=Qt(K.stat),sr=Qt(K.readFile);async function ir(t){try{return await tr(t),!0}catch{return!1}}function rr(t){return sr(t,"utf8")}function nr(t){try{return K.statSync(t),!0}catch{return!1}}function or(t){return K.readFileSync(t,"utf8")}function ar(t,e,s){return W.extname(e)||(e+=s),W.resolve(t,e)}function lr(t){try{return er(t)}catch{}}function hr(t){return W.dirname(t)}var Os=Qt(K.realpath);async function cr(t,e){try{let s=await Os(t),i=await Os(e),r=s.endsWith(W.sep)?s:s+W.sep;return i.startsWith(r)}catch{return!1}}function ur(t,e){try{let s=K.realpathSync(t),i=K.realpathSync(e),r=s.endsWith(W.sep)?s:s+W.sep;return i.startsWith(r)}catch{return!1}}var fr=Object.freeze({__proto__:null,exists:ir,readFile:rr,existsSync:nr,readFileSync:or,resolve:ar,fallback:lr,dirname:hr,contains:cr,containsSync:ur,sep:W.sep});function dr(t,e,...s){return t=g(t),S(t)||d(t)?t.length?t:e:t===!1&&new Map(s).get("allow_false")?!1:me(t,this.context)?e:t}function vs(t,e=0){return JSON.stringify(t,null,e)}function pr(t,e=0){let s=[];return JSON.stringify(t,function(i,r){if(typeof r!="object"||r===null)return r;for(;s.length>0&&s[s.length-1]!==this;)s.pop();return s.includes(r)?"[Circular]":(s.push(r),r)},e)}function mr(t){return Number(t)}var gr={raw:!0,handler:$s},Zs={default:dr,raw:gr,jsonify:vs,to_integer:mr,json:vs,inspect:pr},yr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},wr={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function pt(t){return t=c(t),this.context.memoryLimit.use(t.length),t.replace(/&|<|>|"|'/g,e=>yr[e])}function br(t){return pt.call(this,t)}function kr(t){return t=c(t),this.context.memoryLimit.use(t.length),t.replace(/&(amp|lt|gt|#34|#39);/g,e=>wr[e])}function Tr(t){return pt.call(this,kr.call(this,t))}function xr(t){let e=c(t);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,`<br /> `)}function Sr(t){let e=c(t);this.context.memoryLimit.use(e.length);let s=new Map([["<script","</script>"],["<style","</style>"],["<!--","-->"],["<",">"]]),i="",r=0;for(;r<e.length;){let n=e.indexOf("<",r);if(n<0)return i+e.slice(r);i+=e.slice(r,n);for(let[o,a]of s){if(!e.startsWith(o,n))continue;let h=e.indexOf(a,n+o.length);if(h>=0){r=h+a.length;break}s.delete(o)}if(r===n)return i+e.slice(n)}return i}var _r=Object.freeze({__proto__:null,escape:pt,xml_escape:br,escape_once:Tr,newline_to_br:xr,strip_html:Sr}),jt=class{constructor(e){this.mapping=e,this.sep="/"}async exists(e){return this.existsSync(e)}existsSync(e){return!k(this.mapping[e])}async readFile(e){return this.readFileSync(e)}readFileSync(e){let s=this.mapping[e];if(k(s))throw new Error(`ENOENT: ${e}`);return s}dirname(e){let s=e.split(this.sep);return s.pop(),s.join(this.sep)}resolve(e,s,i){if(s+=i,e===".")return s;let r=e.split(/\/+/);for(let n of s.split(this.sep))n==="."||n===""||(n===".."?(r.length>1||r[0]!=="")&&r.pop():r.push(n));return r.join(this.sep)}},Z={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,keyValueSeparator:":",cache:void 0,extname:"",fs:fr,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",locale:"",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:Js,memoryLimit:1/0,parseLimit:1/0,renderLimit:1/0};function Lr(t){if(t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){let e;typeof t.cache=="number"?e=t.cache>0?new Ve(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Ve(1024):void 0,t.cache=e}return t={...Z,...t.jekyllInclude?{dynamicPartials:!1}:{},...t},(!t.fs.dirname||!t.fs.sep)&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning"),t.relativeReference=!1),t.root=xe(t.root),t.partials=xe(t.partials),t.layouts=xe(t.layouts),t.outputEscape=t.outputEscape&&Fr(t.outputEscape),t.locale||(t.locale=Us()?.().resolvedOptions().locale??"en-US"),t.templates&&(t.fs=new jt(t.templates),t.relativeReference=!0,t.root=t.partials=t.layouts="."),t}function Fr(t){return t==="escape"?pt:t==="json"?Zs.json:(_(x(t),"`outputEscape` need to be of type string or function"),t)}function xe(t){let e=[];return S(t)&&(e=t),d(t)&&(e=[t]),e}function Or(t,e){let s=!1;for(let i=0;i<t.length;i++){let r=t[i];Xs(r)&&(!s&&r.trimLeft&&vr(t[i-1],e.greedy),Y(r)&&(r.name==="raw"?s=!0:r.name==="endraw"&&(s=!1)),!s&&r.trimRight&&zr(t[i+1],e.greedy))}}function vr(t,e){if(!t||!mt(t))return;let s=e?ee:js;for(;w[t.input.charCodeAt(t.end-1-t.trimRight)]&s;)t.trimRight++}function zr(t,e){if(!t||!mt(t))return;let s=e?ee:js;for(;w[t.input.charCodeAt(t.begin+t.trimLeft)]&s;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===` `&&t.trimLeft++}var z=class{constructor(e,s=Z.operators,i,r){this.input=e,this.file=i,this.rawBeginAt=-1,this.p=r?r[0]:0,this.N=r?r[1]:e.length,this.opTrie=Ot(s),this.literalTrie=Ot(Is)}readExpression(){return new Ee(this.readExpressionTokens())}*readExpressionTokens(){for(;this.p<this.N;){let e=this.readOperator();if(e){yield e;continue}let s=this.readValue();if(s){yield s;continue}return}}readOperator(){this.skipBlank();let e=this.matchTrie(this.opTrie);if(e!==-1)return new qt(this.input,this.p,this.p=e,this.file)}matchTrie(e){let s=e,i=this.p,r;for(;s[this.input[i]]&&i<this.N;)s=s[this.input[i++]],s.end&&(r=s);return!r||r.needBoundary&&ke(this.peek(i-this.p))?-1:i}readFilteredValue(){let e=this.p,s=this.readExpression();this.assert(s.valid(),`invalid value expression: ${this.snapshot()}`);let i=this.readFilters();return new Pt(s,i,this.input,e,this.p,this.file)}readFilters(){let e=[];for(;;){let s=this.readFilter();if(!s)return e;e.push(s)}}readFilter(){if(this.skipBlank(),this.end())return null;this.assert(this.read()==="|",'expected "|" before filter');let e=this.readIdentifier();if(!e.size())return this.assert(this.end(),"expected filter name"),null;let s=[];if(this.skipBlank(),this.peek()===":")do{++this.p;let i=this.readFilterArg();i&&s.push(i),this.skipBlank(),this.assert(this.end()||this.peek()===","||this.peek()==="|",()=>`unexpected character ${this.snapshot()}`)}while(this.peek()===",");else if(!(this.peek()==="|"||this.end()))throw this.error('expected ":" after filter name');return new De(e.getText(),s,this.input,e.begin,this.p,this.file)}readFilterArg(){let e=this.readValue();if(!e)return;if(this.skipBlank(),this.peek()!==":")return e;++this.p;let s=this.readValue();return[e.getText(),s]}readTopLevelTokens(e=Z){let s=[];for(;this.p<this.N;){let i=this.readTopLevelToken(e);s.push(i)}return Or(s,e),s}readTopLevelToken(e){let{tagDelimiterLeft:s,outputDelimiterLeft:i}=e;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(s)?this.readTagToken(e):this.match(i)?this.readOutputToken(e):this.readHTMLToken([s,i])}readHTMLToken(e){let s=this.p;for(;this.p<this.N&&!e.some(i=>this.match(i));)++this.p;return new qe(this.input,s,this.p,this.file)}readTagToken(e){let{file:s,input:i}=this,r=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.error(`tag ${this.snapshot(r)} not closed`,r);let n=new ce(i,r,this.p,e,s);return n.name==="raw"&&(this.rawBeginAt=r),n}readToDelimiter(e,s=!1){for(this.skipBlank();this.p<this.N;){if(s&&this.peekType()&bs){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1}readOutputToken(e=Z){let{file:s,input:i}=this,{outputDelimiterRight:r}=e,n=this.p;if(this.readToDelimiter(r,!0)===-1)throw this.error(`output ${this.snapshot(n)} not closed`,n);return new Rt(i,n,this.p,e,s)}readEndrawOrRawContent(e){let{tagDelimiterLeft:s,tagDelimiterRight:i}=e,r=this.p,n=this.readTo(s)-s.length;for(;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){n=this.readTo(s)-s.length;continue}for(;this.p<=this.N;){if(this.rmatch(i)){let o=this.p;return r===n?(this.rawBeginAt=-1,new ce(this.input,r,o,e,this.file)):(this.p=n,new qe(this.input,r,n,this.file))}if(this.rmatch(s))break;this.p++}}throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`,r)}readLiquidTagTokens(e=Z){let s=[];for(;this.p<this.N;){let i=this.readLiquidTagToken(e);i&&s.push(i)}return s}readLiquidTagToken(e){if(this.skipBlank(),this.end())return;let s=this.p;this.readToDelimiter(` `);let i=this.p;return new Vt(this.input,s,i,e,this.file)}error(e,s=this.p){return new _e(e,new se(this.input,s,this.N,this.file))}assert(e,s,i){if(!e)throw this.error(typeof s=="function"?s():s,i)}snapshot(e=this.p){return JSON.stringify(_i(this.input.slice(e,this.N),32))}readWord(){return this.readIdentifier()}readIdentifier(){this.skipBlank();let e=this.p;for(;!this.end()&&ke(this.peek());)++this.p;return new se(this.input,e,this.p,this.file)}readNonEmptyIdentifier(){let e=this.readIdentifier();return e.size()?e:void 0}readTagName(){return this.skipBlank(),this.input[this.p]==="#"?this.input.slice(this.p,++this.p):this.readIdentifier().getText()}readHashes(e){let s=[];for(;;){let i=this.readHash(e);if(!i)return s;s.push(i)}}readHash(e){this.skipBlank(),this.peek()===","&&++this.p;let s=this.p,i=this.readNonEmptyIdentifier();if(!i)return;let r;this.skipBlank();let n=d(e)?e:e?"=":":";return this.peek()===n&&(++this.p,r=this.readValue()),new Mt(this.input,s,this.p,i,r,this.file)}remaining(){return this.input.slice(this.p,this.N)}advance(e=1){this.p+=e}end(){return this.p>=this.N}read(){return this.input[this.p++]}readTo(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1}readValue(){this.skipBlank();let e=this.p,s=this.readLiteral()||this.readQuoted()||this.readRange()||this.readNumber(),i=this.readProperties(!s);return i.length?new Me(s,i,this.input,e,this.p):s}readScopeValue(){this.skipBlank();let e=this.p,s=this.readProperties();if(s.length)return new Me(void 0,s,this.input,e,this.p)}readProperties(e=!0){let s=[];for(;;){if(this.peek()==="["){this.p++;let i=this.readValue()||new se(this.input,this.p,this.p,this.file);this.assert(this.readTo("]")!==-1,"[ not closed"),s.push(i);continue}if(e&&!s.length){let i=this.readNonEmptyIdentifier();if(i){s.push(i);continue}}if(this.peek()==="."&&this.peek(1)!=="."){this.p++;let i=this.readNonEmptyIdentifier();if(!i)break;s.push(i);continue}break}return s}readNumber(){this.skipBlank();let e=!1,s=!1,i=0;for(this.peekType()&Ai&&i++;this.p+i<=this.N;)if(this.peekType(i)&Ri)s=!0,i++;else if(this.peek(i)==="."&&this.peek(i+1)!=="."){if(e||!s)return;e=!0,i++}else break;if(s&&!ke(this.peek(i))){let r=new At(this.input,this.p,this.p+i,this.file);return this.advance(i),r}}readLiteral(){this.skipBlank();let e=this.matchTrie(this.literalTrie);if(e===-1)return;let s=new Nt(this.input,this.p,e,this.file);return this.p=e,s}readRange(){this.skipBlank();let e=this.p;if(this.peek()!=="(")return;++this.p;let s=this.readValueOrThrow();this.skipBlank(),this.assert(this.read()==="."&&this.read()===".","invalid range syntax");let i=this.readValueOrThrow();return this.skipBlank(),this.assert(this.read()===")","invalid range syntax"),new Et(this.input,e,this.p,s,i,this.file)}readValueOrThrow(){let e=this.readValue();return this.assert(e,()=>`unexpected token ${this.snapshot()}, value expected`),e}readQuoted(){this.skipBlank();let e=this.p;if(!(this.peekType()&bs))return;++this.p;let s=!1;for(;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!s));)s?s=!1:this.input[this.p-1]==="\\"&&(s=!0);return new Dt(this.input,e,this.p,this.file)}*readFileNameTemplate(e){let{outputDelimiterLeft:s}=e,i=[","," ","\r",` `," ",s],r=new Set(i);for(;this.p<this.N&&!r.has(this.peek());)yield this.match(s)?this.readOutputToken(e):this.readHTMLToken(i)}match(e){for(let s=0;s<e.length;s++)if(e[s]!==this.input[this.p+s])return!1;return!0}rmatch(e){for(let s=0;s<e.length;s++)if(e[e.length-1-s]!==this.input[this.p-1-s])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:w[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&ee;)++this.p}},Pe=class{constructor(e,s){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=s}on(e,s){return this.handlers[e]=s,this}trigger(e,s){let i=this.handlers[e];return i?(i.call(this,s),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||Y(e)&&this.trigger(`tag:${e.name}`,e))continue;let s=this.parseToken(e,this.tokens);this.trigger("template",s)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}},ue=class{constructor(e){this.token=e}},b=class extends ue{constructor(e,s,i){super(e),this.name=e.name,this.liquid=i,this.tokenizer=e.tokenizer}},j=class{constructor(e,s){this.hash={};let i=e instanceof z?e:new z(e,{});for(let r of i.readHashes(s))this.hash[r.name.content]=r.value}*render(e){let s={};for(let i of Object.keys(this.hash))s[i]=this.hash[i]===void 0?!0:yield T(this.hash[i],e);return s}};function Rr(t){return class extends b{constructor(e,s,i){super(e,s,i),x(t.parse)&&t.parse.call(this,e,s)}*render(e,s){let i=yield new j(this.token.args,e.opts.keyValueSeparator).render(e);return yield t.render.call(this,e,s,i)}}}function Qs(t){return S(t)}var fe=class{constructor(e,s,i){this.token=e,this.name=e.name,this.handler=x(s)?s:x(s?.handler)?s.handler:$s,this.raw=!x(s)&&!!s?.raw,this.args=e.args,this.liquid=i}*render(e,s){let i=[];for(let r of this.args)Qs(r)?i.push([r[0],yield T(r[1],s)]):i.push(yield T(r,s));return yield this.handler.apply({context:s,token:this.token,liquid:this.liquid},[e,...i])}},F=class{constructor(e,s){this.filters=[];let i=typeof e=="string"?new z(e,s.options.operators).readFilteredValue():e;this.initial=i.initial,this.filters=i.filters.map(r=>new fe(r,this.getFilter(s,r.name),s))}*value(e,s){s=s||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let i=yield this.initial.evaluate(e,s);for(let r of this.filters)i=yield r.render(i,e);return i}getFilter(e,s){let i=e.filters[s];return _(i||!e.options.strictFilters,()=>`undefined filter: ${s}`),i}},Ce=class extends ue{constructor(e,s){super(e);let i=new z(e.input,s.options.operators,e.file,e.contentRange);this.value=new F(i.readFilteredValue(),s);let r=this.value.filters,n=s.options.outputEscape;if(!r[r.length-1]?.raw&&n){let o=new De(toString.call(n),[],"",0,0);r.push(new fe(o,n,s))}}*render(e,s){let i=yield this.value.value(e,!1);s.write(i)}*arguments(){yield this.value}},It=class extends ue{constructor(e){super(e),this.str=e.getContent()}*render(e,s){s.write(this.str)}},H=class t{constructor(e,s){this.segments=e,this.location=s}toString(){return je(this.segments,!0)}toArray(){function*e(...s){for(let i of s)i instanceof t?yield Array.from(e(...i.segments)):yield i}return Array.from(e(...this.segments))}},re=class{constructor(){this.map=new Map}get(e){let s=je([e.segments[0]]);return this.map.has(s)||this.map.set(s,[]),this.map.get(s)}has(e){return this.map.has(je([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}},Ks={partials:!0};function*Gs(t,e,s){let i=new re,r=new re,n=new re,o=new $e(new Set),a=new Set;function h(u,p){i.push(u);let m=p.alias(u);if(m!==void 0){let y=m.segments[0];d(y)&&!o.has(y)&&r.push(m)}else{let y=u.segments[0];d(y)&&!p.has(y)&&r.push(u)}for(let y of u.segments)y instanceof H&&h(y,p)}function*f(u,p){if(u.arguments)for(let m of u.arguments())for(let y of zs(m))h(y,p);if(u.localScope)for(let m of u.localScope()){p.add(m.content),p.deleteAlias(m.content);let[y,te]=m.getPosition();n.push(new H([m.content],{row:y,col:te,file:m.file}))}if(u.children)if(u.partialScope){let m=u.partialScope();if(m===void 0){for(let J of yield u.children(e,s))yield f(J,p);return}if(a.has(m.name))return;let y=new Set,te=m.isolated?new $e(y):p.push(y);for(let J of m.scope)if(d(J))y.add(J);else{let[rs,di]=J;y.add(rs);let ns=Array.from(zs(di));ns.length&&te.setAlias(rs,ns[0].segments)}for(let J of yield u.children(e,s))yield f(J,te),a.add(m.name);te.pop()}else{u.blockScope&&p.push(new Set(u.blockScope()));for(let m of yield u.children(e,s))yield f(m,p);u.blockScope&&p.pop()}}for(let u of t)yield f(u,o);return{variables:i.asObject(),globals:r.asObject(),locals:n.asObject()}}function P(t,e={}){let s={...Ks,...e};return q(Gs(t,s.partials,!1))}function C(t,e={}){let s={...Ks,...e};return M(Gs(t,s.partials,!0))}var $e=class{constructor(e){this.stack=[{names:e,aliases:new Map}]}has(e){for(let s of this.stack)if(s.names.has(e))return!0;return!1}push(e){return this.stack.push({names:e,aliases:new Map}),this}pop(){return this.stack.pop()?.names}add(e){this.stack[0].names.add(e)}alias(e){let s=e.segments[0];if(!d(s))return;let i=this.getAlias(s);if(i!==void 0)return new H([...i,...e.segments.slice(1)],e.location)}setAlias(e,s){this.stack[this.stack.length-1].aliases.set(e,s)}deleteAlias(e){this.stack[this.stack.length-1].aliases.delete(e)}getAlias(e){for(let s of this.stack){if(s.aliases.has(e))return s.aliases.get(e);if(s.names.has(e))return}}};function*zs(t){v(t)?yield*X(t):t instanceof F&&(yield*Ar(t))}function*Ar(t){for(let e of t.initial.postfix)v(e)&&(yield*X(e));for(let e of t.filters)for(let s of e.args)Qs(s)&&s[1]?yield*X(s[1]):v(s)&&(yield*X(s))}function*X(t){Gt(t)?(yield*X(t.lhs),yield*X(t.rhs)):de(t)&&(yield Bt(t))}function Bt(t){let e=[],s=t.file,i=t.props[0];s=s||i.file,Ie(i)||Wt(i)||Ht(i)?e.push(i.content):de(i)&&e.push(...Bt(i).segments);for(let o of t.props.slice(1))s=s||o.file,Ie(o)||Wt(o)||Ht(o)?e.push(o.content):de(o)&&e.push(Bt(o));let[r,n]=t.getPosition();return new H(e,{row:r,col:n,file:s})}var Rs=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function je(t,e=!1){let s=[],i=t[0];d(i)&&(!e||i.match(Rs)?s.push(`${i}`):s.push(`['${i}']`));for(let r of t.slice(1))r instanceof H?s.push(`[${je(r.segments)}]`):d(r)?r.match(Rs)?s.push(`.${r}`):s.push(`['${r}']`):s.push(`[${r}]`);return s.join("")}(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(l.LookupType||(l.LookupType={}));var Ut=class{constructor(e){if(this.options=e,e.relativeReference){let i=e.fs.sep;_(i,"`fs.sep` is required for relative reference");let r=["."+i,".."+i,"./","../"];this.shouldLoadRelative=n=>r.some(o=>n.startsWith(o))}else this.shouldLoadRelative=i=>!1;let s=e.fs;this.contains=vt(s.contains?.bind(s)||(async()=>!0),s.containsSync?.bind(s)||(()=>!0)),this.exists=vt(s.exists?.bind(s)||(async()=>!1),s.existsSync?.bind(s))}*lookup(e,s,i,r){let n=this.options[s];for(let o of this.candidates(e,n,r)){let a=!1;for(let h of n)if(yield this.contains(!!i,h,o)){a=!0;break}if(a&&(yield this.exists(!!i,o)))return o}throw this.lookupError(e,n)}*candidates(e,s,i){let{fs:r,extname:n}=this.options;this.shouldLoadRelative(e)&&i&&(yield r.resolve(this.dirname(i),e,n));for(let o of s)yield r.resolve(o,e,n);if(r.fallback!==void 0){let o=r.fallback(e);o!==void 0&&(yield o)}}dirname(e){let s=this.options.fs;return _(s.dirname,"`fs.dirname` is required for relative reference"),s.dirname(e)}lookupError(e,s){let i=new Error("ENOENT");return i.message=`ENOENT: Failed to lookup "${e}" in "${s}"`,i.code="ENOENT",i}},N=class{constructor(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 Ut(this.liquid.options),this.parseLimit=new le("parse length",e.options.parseLimit),this.readFile=vt(this.fs.readFile?.bind(this.fs)||(async()=>{throw new Error("readFile not implemented")}),this.fs.readFileSync?.bind(this.fs))}parse(e,s){e=String(e),this.parseLimit.use(e.length);let r=new z(e,this.liquid.options.operators,s).readTopLevelTokens(this.liquid.options);return this.parseTokens(r)}parseTokens(e){let s,i=[],r=[];for(;s=e.shift();)try{i.push(this.parseToken(s,e))}catch(n){if(this.liquid.options.catchAllErrors)r.push(n);else throw n}if(r.length)throw new Oe(r);return i}parseToken(e,s){try{if(Y(e)){let i=this.liquid.tags[e.name];return _(i,`tag "${e.name}" not found`),new i(e,s,this.liquid,this)}return ei(e)?new Ce(e,this.liquid):new It(e)}catch(i){throw E.is(i)?i:new Le(i,e)}}parseStream(e){return new Pe(e,(s,i)=>this.parseToken(s,i))}*_parseFileCached(e,s,i=l.LookupType.Root,r){let n=this.cache,o=this.loader.shouldLoadRelative(e)?r+","+e:i+":"+e,a=yield n.read(o);if(a)return a;let h=this._parseFile(e,s,i,r),f=s?yield h:q(h);n.write(o,f);try{return yield f}catch(u){throw n.remove(o),u}}*_parseFile(e,s,i=l.LookupType.Root,r){let n=yield this.loader.lookup(e,i,s,r);return this.parse(yield this.readFile(!!s,n),n)}};(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.FilteredValue=4096]="FilteredValue",t[t.Delimited=12]="Delimited"})(l.TokenKind||(l.TokenKind={}));function Xs(t){return!!(R(t)&l.TokenKind.Delimited)}function Kt(t){return R(t)===l.TokenKind.Operator}function mt(t){return R(t)===l.TokenKind.HTML}function ei(t){return R(t)===l.TokenKind.Output}function Y(t){return R(t)===l.TokenKind.Tag}function Ie(t){return R(t)===l.TokenKind.Quoted}function Nr(t){return R(t)===l.TokenKind.Literal}function Wt(t){return R(t)===l.TokenKind.Number}function de(t){return R(t)===l.TokenKind.PropertyAccess}function Ht(t){return R(t)===l.TokenKind.Word}function Gt(t){return R(t)===l.TokenKind.Range}function v(t){return(R(t)&1667)>0}function R(t){return t?t.kind:-1}var qr=Object.freeze({__proto__:null,isDelimitedToken:Xs,isOperatorToken:Kt,isHTMLToken:mt,isOutputToken:ei,isTagToken:Y,isQuotedToken:Ie,isLiteralToken:Nr,isNumberToken:Wt,isPropertyAccessToken:de,isWordToken:Ht,isRangeToken:Gt,isValueToken:v}),Be=function(){return Be=Object.assign||function(e){for(var s,i=1,r=arguments.length;i<r;i++){s=arguments[i];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},Be.apply(this,arguments)},B=class t{constructor(e={},s=Z,i={},{memoryLimit:r,renderLimit:n}={}){this.scopes=[{}],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!i.sync,this.opts=s,this.globals=i.globals??s.globals,this.environments=ft(e)?e:Object(e),this.strictVariables=i.strictVariables??this.opts.strictVariables,this.ownPropertyOnly=i.ownPropertyOnly??s.ownPropertyOnly,this.memoryLimit=r??new le("memory alloc",i.memoryLimit??s.memoryLimit),this.renderLimit=n??new le("template render",Ct().now()+(i.renderLimit??s.renderLimit))}getRegister(e,s=void 0){return this.registers[e]=this.registers[e]||s}setRegister(e,s){return this.registers[e]=s}saveRegister(...e){return e.map(s=>[s,this.getRegister(s)])}restoreRegister(e){return e.forEach(([s,i])=>this.setRegister(s,i))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,s)=>Be(e,s),{})}get(e){return this.getSync(e)}getSync(e){return M(this._get(e))}*_get(e){let s=this.findScope(e[0]);return yield this._getFromScope(s,e)}getFromScope(e,s){return M(this._getFromScope(e,s))}*_getFromScope(e,s,i=this.strictVariables){d(s)&&(s=s.split("."));for(let r=0;r<s.length;r++)if(e=yield this.readProperty(e,s[r]),i&&bi(e))throw new xt(s.slice(0,r+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new t(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables,ownPropertyOnly:this.ownPropertyOnly},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let s=this.scopes.length-1;s>=0;s--){let i=this.scopes[s];if(e in i)return i}return e in this.environments?this.environments:this.globals}readProperty(e,s){if(e=Es(e),s=g(s),k(e))return e;if(S(e)&&s<0)return e[e.length+ +s];let i=Mr(e,s,this.ownPropertyOnly);return i===void 0&&e instanceof D?e.liquidMethodMissing(s,this):x(i)?i.call(e):s==="size"?Vr(e):s==="first"?Dr(e):s==="last"?Er(e):i}};function Mr(t,e,s){if(!(s&&!Zt.call(t,e)&&!(t instanceof D)))return t[e]}function Dr(t){return S(t)?t[0]:t.first}function Er(t){return S(t)?t[t.length-1]:t.last}function Vr(t){if(Zt.call(t,"size")||t.size!==void 0)return t.size;if(S(t)||d(t))return t.length;if(typeof t=="object")return Object.keys(t).length}var Q;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(Q||(Q={}));var Pr=V(Math.abs),Cr=V(Math.max),$r=V(Math.min),jr=V(Math.ceil),Ir=V((t,e,s=!1)=>s?Math.floor(t/e):t/e),Br=V(Math.floor),Ur=V((t,e)=>t-e),Wr=V((t,e)=>t+e),Hr=V((t,e)=>t%e),Yr=V((t,e)=>t*e);function Jr(t,e=0){t=Tt(t),e=Tt(e);let s=Math.pow(10,e),i=t*s;return Math.sign(t)*Math.round(Math.abs(i))/s}var Zr=Object.freeze({__proto__:null,abs:Pr,at_least:Cr,at_most:$r,ceil:jr,divided_by:Ir,floor:Br,minus:Ur,plus:Wr,modulo:Hr,times:Yr,round:Jr}),Qr=t=>decodeURIComponent(c(t)).replace(/\+/g," "),Kr=t=>encodeURIComponent(c(t)).replace(/%20/g,"+"),Gr=t=>encodeURIComponent(c(t)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),Xr=t=>encodeURI(c(t)).replace(/%5B/g,"[").replace(/%5D/g,"]"),As=/[^\p{M}\p{L}\p{Nd}]+/ug,en={raw:/\s+/g,default:As,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:As,none:null};function tn(t,e="default",s=!1){t=c(t);let i=en[e];return i&&(e==="latin"&&(t=sn(t)),t=t.replace(i,"-").replace(/^-|-$/g,"")),s?t:t.toLowerCase()}function sn(t){return t.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")}var rn=Object.freeze({__proto__:null,url_decode:Qr,url_encode:Kr,cgi_escape:Gr,uri_escape:Xr,slugify:tn}),nn=dt(function(t,e){let s=L(t),i=k(e)?" ":c(e),r=s.length*(1+i.length);return this.context.memoryLimit.use(r),s.join(i)}),on=dt(t=>Vs(t)?Ti(t):""),an=dt(t=>Vs(t)?t[0]:""),ln=dt(function(t){let e=L(t);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*ti(t,e,s){let i=[],r=L(t);this.context.memoryLimit.use(r.length);for(let n of r)i.push([n,e?yield this.context._getFromScope(n,c(e).split("."),!1):n]);return i.sort((n,o)=>s(n[1],o[1])).map(n=>n[0])}function*hn(t,e){return yield*ti.call(this,t,e,Li)}function*cn(t,e){return yield*ti.call(this,t,e,Fi)}var un=t=>t&&t.length||0;function*fn(t,e){let s=[],i=L(t);this.context.memoryLimit.use(i.length);for(let r of i)s.push(yield this.context._getFromScope(r,c(e),!1));return s}function*dn(t,e){let s=0,i=L(t);for(let r of i){let n=Number(e?yield this.context._getFromScope(r,c(e),!1):r);s+=Number.isNaN(n)?0:n}return s}function pn(t){let e=L(t);return this.context.memoryLimit.use(e.length),e.filter(s=>!k(g(s)))}function si(t,e=[]){let s=L(t),i=L(e);return this.context.memoryLimit.use(s.length+i.length),s.concat(i)}function mn(t,e){return si.call(this,t,[e])}function gn(t,e){let s=L(t);this.context.memoryLimit.use(s.length);let i=[...s];return i.unshift(e),i}function yn(t){let e=[...L(t)];return e.pop(),e}function wn(t){let e=L(t);this.context.memoryLimit.use(e.length);let s=[...e];return s.shift(),s}function bn(t,e,s=1){return t=g(t),k(t)?[]:(S(t)||(t=c(t)),e=e<0?t.length+e:e,this.context.memoryLimit.use(s),t.slice(e,e+s))}function ii(t){return this.context.opts.jekyllWhere?e=>oe.is(t)?$(e,t):S(e)?Xi(e,t):$(e,t):t===void 0?e=>U(e,this.context):e=>$(e,t)}function*ri(t,e,s,i){let r=[];e=L(e),this.context.memoryLimit.use(e.length);let n=new z(c(s)).readScopeValue();for(let a of e)r.push(yield T(n,this.context.spawn(a)));let o=ii.call(this,i);return e.filter((a,h)=>o(r[h])===t)}function*ni(t,e,s,i){let r=[],n=new F(c(i),this.liquid),o=L(e);this.context.memoryLimit.use(o.length);for(let a of o){this.context.push({[s]:a});let h=yield n.value(this.context);this.context.pop(),h===t&&r.push(a)}return r}function*kn(t,e,s){return yield*ri.call(this,!0,t,e,s)}function*Tn(t,e,s){return yield*ri.call(this,!1,t,e,s)}function*xn(t,e,s){return yield*ni.call(this,!0,t,e,s)}function*Sn(t,e,s){return yield*ni.call(this,!1,t,e,s)}function*_n(t,e){let s=new Map;t=pe(t);let i=new z(c(e)).readScopeValue();this.context.memoryLimit.use(t.length);for(let r of t){let n=yield T(i,this.context.spawn(r));s.has(n)||s.set(n,[]),s.get(n).push(r)}return[...s.entries()].map(([r,n])=>({name:r,items:n}))}function*Ln(t,e,s){let i=new Map,r=new F(c(s),this.liquid);t=pe(t),this.context.memoryLimit.use(t.length);for(let n of t){this.context.push({[e]:n});let o=yield r.value(this.context);this.context.pop(),i.has(o)||i.set(o,[]),i.get(o).push(n)}return[...i.entries()].map(([n,o])=>({name:n,items:o}))}function*Xt(t,e,s){let i=new z(c(e)).readScopeValue(),r=L(t),n=ii.call(this,s);for(let o=0;o<r.length;o++){let a=yield T(i,this.context.spawn(r[o]));if(n(a))return[o,r[o]]}}function*es(t,e,s){let i=new F(c(s),this.liquid),r=L(t);for(let n=0;n<r.length;n++){this.context.push({[e]:r[n]});let o=yield i.value(this.context);if(this.context.pop(),o)return[n,r[n]]}}function*Fn(t,e,s){return!!(yield*Xt.call(this,t,e,s))}function*On(t,e,s){return!!(yield*es.call(this,t,e,s))}function*vn(t,e,s){let i=yield*Xt.call(this,t,e,s);return i?i[0]:void 0}function*zn(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[0]:void 0}function*Rn(t,e,s){let i=yield*Xt.call(this,t,e,s);return i?i[1]:void 0}function*An(t,e,s){let i=yield*es.call(this,t,e,s);return i?i[1]:void 0}function Nn(t){return t=L(t),this.context.memoryLimit.use(t.length),[...new Set(t)]}function qn(t,e=1){if(t=g(t),k(t))return[];S(t)||(t=c(t)),this.context.memoryLimit.use(e);let s=[...t].sort(()=>Math.random()-.5);return e===1?s[0]:s.slice(0,e)}var Mn=Object.freeze({__proto__:null,join:nn,last:on,first:an,reverse:ln,sort:hn,sort_natural:cn,size:un,map:fn,sum:dn,compact:pn,concat:si,push:mn,unshift:gn,pop:yn,shift:wn,slice:bn,where:kn,reject:Tn,where_exp:xn,reject_exp:Sn,group_by:_n,group_by_exp:Ln,has:Fn,has_exp:On,find_index:vn,find_index_exp:zn,find:Rn,find_exp:An,uniq:Nn,sample:qn});function ts(t,e,s){let i=(t?.length??0)+(s?.length??0);this.context.memoryLimit.use(i);let r=ai(t,this.context.opts,s);return r?(e=