import{s as i}from"./vc-shell-vendor-boolbase27325.js";const s=new Set([9,10,12,13,32]),l=48,d=57;function A(r){if(r=r.trim().toLowerCase(),r==="even")return[2,0];if(r==="odd")return[2,1];let t=0,o=0,u=n(),c=f();if(t<r.length&&r.charAt(t)==="n"&&(t++,o=u*(c??1),h(),t<r.length?(u=n(),h(),c=f()):u=c=0),c===null||t<r.length)throw new Error(`n-th rule couldn't be parsed ('${r}')`);return[o,u*c];function n(){return r.charAt(t)==="-"?(t++,-1):(r.charAt(t)==="+"&&t++,1)}function f(){const a=t;let e=0;for(;t<r.length&&r.charCodeAt(t)>=l&&r.charCodeAt(t)<=d;)e=e*10+(r.charCodeAt(t)-l),t++;return t===a?null:e}function h(){for(;t<r.length&&s.has(r.charCodeAt(t));)t++}}function C(r){const t=r[0],o=r[1]-1;if(o<0&&t<=0)return i.falseFunc;if(t===-1)return n=>n<=o;if(t===0)return n=>n===o;if(t===1)return o<0?i.trueFunc:n=>n>=o;const u=Math.abs(t),c=(o%u+u)%u;return t>1?n=>n>=o&&n%u===c:n=>n<=o&&n%u===c}function p(r){return C(A(r))}export{p};
