PageSourceSearch

https://myinsurance.tataaia.com/portfolio/_next/static/chunks/28615c6d-0040c5b983ae9ca5.js

js tataaia.com collected 2026-10-02 10:36:59 UTC 74,676 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14173],{4315:function(e,t,r){var n;n=function(){return(function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){if(a)return a(o,!0);var u=Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[o]={exports:{}};t[o][0].call(c.exports,function(e){return i(t[o][1][e]||e)},c,c.exports,e,t,r,n)}return r[o].exports}for(var a=void 0,o=0;o<n.length;o++)i(n[o]);return i})({1:[function(e,t,r){let n=e("./utils"),i=function(){"use strict";let e=n.stringToArray,t=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],i=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],a=["Thousand","Million","Billion","Trillion"],o={};t.forEach(function(e,t){o[e.toLowerCase()]=t}),r.forEach(function(e,t){o[e.toLowerCase()]=t}),i.forEach(function(e,t){let r=e.toLowerCase();o[r]=(t+2)*10,o[r.substring(0,e.length-1)+"ieth"]=o[r]}),o.hundredth=100,a.forEach(function(e,t){let r=e.toLowerCase(),n=Math.pow(10,(t+1)*3);o[r]=n,o[r+"th"]=n});let s=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],u={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function c(e,t){if(void 0!==e)return f(e=Math.floor(e),h(t))}let l={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},p={UPPER:"upper",LOWER:"lower",TITLE:"title"};function f(n,o){let u;let c=n<0;switch(n=Math.abs(n),o.primary){case l.LETTERS:u=function(e,t){for(var r=[],n=t.charCodeAt(0);e>0;)r.unshift(String.fromCharCode((e-1)%26+n)),e=Math.floor((e-1)/26);return r.join("")}(n,o.case===p.UPPER?"A":"a");break;case l.ROMAN:u=function e(t){for(var r=0;r<s.length;r++){let n=s[r];if(t>=n[0])return n[1]+e(t-n[0])}return""}(n),o.case===p.UPPER&&(u=u.toUpperCase());break;case l.WORDS:var f,d,h;f=n,d=o.ordinal,u=(h=function(e,n,o){var s="";if(e<=19)s=(n?" and ":"")+(o?r[e]:t[e]);else if(e<100){let t=Math.floor(e/10),r=e%10;s=(n?" and ":"")+i[t-2],r>0?s+="-"+h(r,!1,o):o&&(s=s.substring(0,s.length-1)+"ieth")}else if(e<1e3){let r=Math.floor(e/100),i=e%100;s=(n?", ":"")+t[r]+" Hundred",i>0?s+=h(i,!0,o):o&&(s+="th")}else{var u=Math.floor(Math.log10(e)/3);u>a.length&&(u=a.length);let t=Math.pow(10,3*u),r=Math.floor(e/t),i=e-r*t;s=(n?", ":"")+h(r,!1,!1)+" "+a[u-1],i>0?s+=h(i,!0,o):o&&(s+="th")}return s})(f,!1,d),o.case===p.UPPER?u=u.toUpperCase():o.case===p.LOWER&&(u=u.toLowerCase());break;case l.DECIMAL:u=""+n;var v=o.mandatoryDigits-u.length;if(v>0&&(u=Array(v+1).join("0")+u),48!==o.zeroCode&&(u=e(u).map(e=>String.fromCodePoint(e.codePointAt(0)+o.zeroCode-48)).join("")),o.regular){let e=Math.floor((u.length-1)/o.groupingSeparators.position);for(let t=e;t>0;t--){let e=u.length-t*o.groupingSeparators.position;u=u.substr(0,e)+o.groupingSeparators.character+u.substr(e)}}else o.groupingSeparators.reverse().forEach(e=>{let t=u.length-e.position;u=u.substr(0,t)+e.character+u.substr(t)});if(o.ordinal){var g={1:"st",2:"nd",3:"rd"}[u[u.length-1]];(!g||u.length>1&&"1"===u[u.length-2])&&(g="th"),u+=g}break;case l.SEQUENCE:throw{code:"D3130",value:o.token}}return c&&(u="-"+u),u}let d=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function h(t){let r;let n={type:"integer",primary:l.DECIMAL,case:p.LOWER,ordinal:!1},i=t.lastIndexOf(";");switch(-1===i?r=t:(r=t.substring(0,i),"o"===t.substring(i+1)[0]&&(n.ordinal=!0)),r){case"A":n.case=p.UPPER;case"a":n.primary=l.LETTERS;break;case"I":n.case=p.UPPER;case"i":n.primary=l.ROMAN;break;case"W":n.case=p.UPPER,n.primary=l.WORDS;break;case"Ww":n.case=p.TITLE,n.primary=l.WORDS;break;case"w":n.primary=l.WORDS;break;default:{let t=null,i=0,a=0,o=[],s=0;if(e(r).map(e=>
1e.codePointAt(0)).reverse().forEach(e=>{let r=!1;for(let n=0;n<d.length;n++){let a=d[n];if(e>=a&&e<=a+9){if(r=!0,i++,s++,null===t)t=a;else if(a!==t)throw{code:"D3131"};break}}!r&&(35===e?(s++,a++):o.push({position:s,character:String.fromCodePoint(e)}))}),i>0){n.primary=l.DECIMAL,n.zeroCode=t,n.mandatoryDigits=i,n.optionalDigits=a;let e=function(e){if(0===e.length)return 0;let t=e[0].character;for(let r=1;r<e.length;r++)if(e[r].character!==t)return 0;let r=e.map(e=>e.position),n=function(e,t){return 0===t?e:n(t,e%t)},i=r.reduce(n);for(let e=1;e<=r.length;e++)if(-1===r.indexOf(e*i))return 0;return i}(o);e>0?(n.regular=!0,n.groupingSeparators={position:e,character:o[0].character}):(n.regular=!1,n.groupingSeparators=o)}else n.primary=l.SEQUENCE,n.token=r}}return n}let v={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function g(e){var t=[];let r=function(r,n){if(n>r){let i=e.substring(r,n);i=i.split("]]").join("]"),t.push({type:"literal",value:i})}};for(var n=0,i=0;i<e.length;){if("["===e.charAt(i)){if("["===e.charAt(i+1)){r(n,i),t.push({type:"literal",value:"["}),i+=2,n=i;continue}if(r(n,i),n=i,-1===(i=e.indexOf("]",n)))throw{code:"D3135"};let f=e.substring(n+1,i);var a,o={type:"marker",component:(f=f.split(/\s+/).join("")).charAt(0)},s=f.lastIndexOf(",");if(-1!==s){let e,t;let r=f.substring(s+1),n=r.indexOf("-"),i=function(e){if(void 0!==e&&"*"!==e)return parseInt(e)};-1===n?e=r:(e=r.substring(0,n),t=r.substring(n+1));let u={min:i(e),max:i(t)};o.width=u,a=f.substring(1,s)}else a=f.substring(1);if(1===a.length)o.presentation1=a;else if(a.length>1){var u=a.charAt(a.length-1);-1!=="atco".indexOf(u)?(o.presentation2=u,"o"===u&&(o.ordinal=!0),o.presentation1=a.substring(0,a.length-1)):o.presentation1=a}else o.presentation1=v[o.component];if(void 0===o.presentation1)throw{code:"D3132",value:o.component};if("n"===o.presentation1[0])o.names=p.LOWER;else if("N"===o.presentation1[0])"n"===o.presentation1[1]?o.names=p.TITLE:o.names=p.UPPER;else if(-1!=="YMDdFWwXxHhmsf".indexOf(o.component)){var c=o.presentation1;if(o.presentation2&&(c+=";"+o.presentation2),o.integerFormat=h(c),o.width&&void 0!==o.width.min&&o.integerFormat.mandatoryDigits<o.width.min&&(o.integerFormat.mandatoryDigits=o.width.min),-1!=="YMD".indexOf(o.component)){if(o.n=-1,o.width&&void 0!==o.width.max)o.n=o.width.max,o.integerFormat.mandatoryDigits=o.n;else{var l=o.integerFormat.mandatoryDigits+o.integerFormat.optionalDigits;l>=2&&(o.n=l)}}}("Z"===o.component||"z"===o.component)&&(o.integerFormat=h(o.presentation1)),t.push(o),n=i+1}i++}return r(n,i),{type:"datetime",parts:t}}let y=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],m=["January","February","March","April","May","June","July","August","September","October","November","December"],b=function(e){let t=Date.UTC(e.year,e.month);var r=new Date(t).getUTCDay();return 0===r&&(r=7),r>4?t+(8-r)*864e5:t-(r-1)*864e5},k=function(e,t){return{year:e,month:t,nextMonth:function(){return 11===t?k(e+1,0):k(e,t+1)},previousMonth:function(){return 0===t?k(e-1,11):k(e,t-1)},nextYear:function(){return k(e+1,t)},previousYear:function(){return k(e-1,t)}}},x=function(e,t){return(t-e)/6048e5+1},w=(e,t)=>{let r;switch(t){case"Y":r=e.getUTCFullYear();break;case"M":r=e.getUTCMonth()+1;break;case"D":r=e.getUTCDate();break;case"d":r=(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0))/864e5+1;break;case"F":0===(r=e.getUTCDay())&&(r=7);break;case"W":{let t=k(e.getUTCFullYear(),0),n=b(t),i=Date.UTC(t.year,e.getUTCMonth(),e.getUTCDate()),a=x(n,i);a>52?i>=b(t.nextYear())&&(a=1):a<1&&(a=x(b(t.previousYear()),i)),r=Math.floor(a);break}case"w":{let t=k(e.getUTCFullYear(),e.getUTCMonth()),n=b(t),i=Date.UTC(t.year,t.month,e.getUTCDate()),a=x(n,i);a>4?i>=b(t.nextMonth())&&(a=1):a<1&&(a=x(b(t.previousMonth()),i)),r=Math.floor(a);break}case"X":{let t=k(e.getUTCFullYear(),0),n=b(t),i=b(t.nextYear()),a=e.getTime();r=a<n?t.year-1:a>=i?t.year+1:t.year;break}case"x":{let t=k(e.getUTCFullYear(),e.getUTCMonth()),n=b(t),i=t.nextMonth(),a=b(i),o=e.getTime();r=o<n?t.previousMonth().month+1:o>=a?i.month+1:t.month+1;break}case"H":r=e.getUTCHours();break;case"h":0==(r=e.getUTCHours()%12)&&(r=12);break;case"P":r=e.getUTCHours()>=12?"pm":"am";break;case"m":r=e.getUTCMinutes();break;case"s":r=e.getUTCSeconds();break;case"f":r=e.getUTCMilliseconds();break;case"Z":case"z":break;case"C":case"E":r="ISO"}return r},A=null;function E(e,t,r){let n;var i=0,a=0;if(void 0!==r){let e=parseInt(r);i=Math.floor(e/100),a=e%100}var o=function(e,t){var r=w(e,t.component);if(-1!=="YMDdFWwXxHhms".indexOf(t.component)){if("Y"===t.component&&-1!==t.n&&(r%=Math.pow(10,t.n)),t.names){if
1("M"===t.component||"x"===t.component)r=m[r-1];else if("F"===t.component)r=y[r];else throw{code:"D3133",value:t.component};t.names===p.UPPER?r=r.toUpperCase():t.names===p.LOWER&&(r=r.toLowerCase()),t.width&&r.length>t.width.max&&(r=r.substring(0,t.width.max))}else r=f(r,t.integerFormat)}else if("f"===t.component)r=f(r,t.integerFormat);else if("Z"===t.component||"z"===t.component){let e=100*i+a;if(t.integerFormat.regular)r=f(e,t.integerFormat);else{let n=t.integerFormat.mandatoryDigits;if(1===n||2===n)r=f(i,t.integerFormat),0!==a&&(r+=":"+c(a,"00"));else if(3===n||4===n)r=f(e,t.integerFormat);else throw{code:"D3134",value:n}}e>=0&&(r="+"+r),"z"===t.component&&(r="GMT"+r),0===e&&"t"===t.presentation2&&(r="Z")}return r};void 0===t?(null===A&&(A=g("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),n=A):n=g(t);let s=new Date(e+(60*i+a)*6e4),u="";return n.parts.forEach(function(e){"literal"===e.type?u+=e.value:u+=o(s,e)}),u}function D(e){var t={};if("datetime"===e.type)t.type="datetime",t.parts=e.parts.map(function(e){var t={};if("literal"===e.type)t.regex=e.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if("Z"===e.component||"z"===e.component){let r;Array.isArray(e.integerFormat.groupingSeparators)||(r=e.integerFormat.groupingSeparators),t.regex="","z"===e.component&&(t.regex="GMT"),t.regex+="[-+][0-9]+",r&&(t.regex+=r.character+"[0-9]+"),t.parse=function(t){"z"===e.component&&(t=t.substring(3));let n=0,i=0;return r?(n=Number.parseInt(t.substring(0,t.indexOf(r.character))),i=Number.parseInt(t.substring(t.indexOf(r.character)+1))):t.length-1<=2?n=Number.parseInt(t):(n=Number.parseInt(t.substring(0,3)),i=Number.parseInt(t.substring(3))),60*n+i}}else if(e.integerFormat)e.integerFormat.n=e.n,t=D(e.integerFormat);else{t.regex="[a-zA-Z]+";var r={};if("M"===e.component||"x"===e.component)m.forEach(function(t,n){e.width&&e.width.max?r[t.substring(0,e.width.max)]=n+1:r[t]=n+1});else if("F"===e.component)y.forEach(function(t,n){n>0&&(e.width&&e.width.max?r[t.substring(0,e.width.max)]=n:r[t]=n)});else if("P"===e.component)r={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:e.component};t.parse=function(e){return r[e]}}return t.component=e.component,t});else{let r;t.type="integer";let n=e.case===p.UPPER;switch(r=e.n&&e.n>0?0===e.optionalDigits?`{${e.n}}`:`{${e.n-e.optionalDigits},${e.n}}`:"+",e.primary){case l.LETTERS:t.regex=n?"[A-Z]+":"[a-z]+",t.parse=function(e){return function(e,t){for(var r=t.charCodeAt(0),n=0,i=0;i<e.length;i++)n+=(e.charCodeAt(e.length-i-1)-r+1)*Math.pow(26,i);return n}(e,n?"A":"a")};break;case l.ROMAN:t.regex=n?"[MDCLXVI]+":"[mdclxvi]+",t.parse=function(e){return function(e){for(var t=0,r=1,n=e.length-1;n>=0;n--){let i=u[e[n]];i<r?t-=i:(r=i,t+=i)}return t}(n?e:e.toUpperCase())};break;case l.WORDS:t.regex="(?:"+Object.keys(o).concat("and","[\\-, ]").join("|")+")+",t.parse=function(e){return function(e){let t=e.split(/,\s|\sand\s|[\s\\-]/).map(e=>o[e]),r=[0];return t.forEach(e=>{if(e<100){let t=r.pop();t>=1e3&&(r.push(t),t=0),r.push(t+e)}else r.push(r.pop()*e)}),r.reduce((e,t)=>e+t,0)}(e.toLowerCase())};break;case l.DECIMAL:t.regex=`[0-9]${r}`,e.ordinal&&(t.regex+="(?:th|st|nd|rd)"),t.parse=function(t){let r=t;return e.ordinal&&(r=t.substring(0,t.length-2)),e.regular?r=r.split(",").join(""):e.groupingSeparators.forEach(e=>{r=r.split(e.character).join("")}),48!==e.zeroCode&&(r=r.split("").map(t=>String.fromCodePoint(t.codePointAt(0)-e.zeroCode+48)).join("")),parseInt(r)};break;case l.SEQUENCE:throw{code:"D3130",value:e.token}}}return t}function T(e,t){let r=D(g(t));var n=RegExp("^"+r.parts.map(e=>"("+e.regex+")").join("")+"$","i").exec(e);if(null!==n){let e,t,a;let o={};for(let e=1;e<n.length;e++){let t=r.parts[e-1];t.parse&&(o[t.component]=t.parse(n[e]))}if(0===Object.getOwnPropertyNames(o).length)return;let s=0,u=e=>{s<<=1,s+=e?1:0};"YXMxWwdD".split("").forEach(e=>u(o[e]));let c=!(!(-162&s)&&161&s)&&!(~(e=130)&s)&&!!(e&s),l=!(-85&s)&&!!(84&s),p=!l&&!(~(t=72)&s)&&!!(t&s);s=0,"PHhmsf".split("").forEach(e=>u(o[e]));let f=!(!(-24&s)&&23&s)&&!(~(a=47)&s)&&!!(a&s),d=this.environment.timestamp,h=!1,v=!1;if(((c?"YD":l?"XxwF":p?"XWF":"YMD")+(f?"Phmsf":"Hmsf")).split("").forEach(e
1=>{if(void 0===o[e])h?(o[e]=-1!=="MDd".indexOf(e)?1:0,v=!0):o[e]=w(d,e);else if(h=!0,v)throw{code:"D3136"}}),o.M>0?o.M-=1:o.M=0,c){let e=new Date(Date.UTC(o.Y,0)+(o.d-1)*864e5);o.M=e.getUTCMonth(),o.D=e.getUTCDate()}if(l||p)throw{code:"D3136"};f&&(o.H=12===o.h?0:o.h,1===o.P&&(o.H+=12));var i=Date.UTC(o.Y,o.M,o.D,o.H,o.m,o.s,o.f);return(o.Z||o.z)&&(i-=6e4*(o.Z||o.z)),i}}var S=RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");return{formatInteger:c,parseInteger:function(e,t){if(void 0!==e)return D(h(t)).parse(e)},fromMillis:function(e,t,r){if(void 0!==e)return E.call(this,e,t,r)},toMillis:function(e,t){if(void 0!==e){if(void 0!==t)return T.call(this,e,t);if(!S.test(e))throw{stack:Error().stack,code:"D3110",value:e};return Date.parse(e)}}}}();t.exports=i},{"./utils":6}],2:[function(e,t,n){(function(r){(function(){var n=e("./utils");let i=(()=>{"use strict";var e=n.isNumeric,t=n.isArrayOfStrings,i=n.isArrayOfNumbers,a=n.createSequence,o=n.isSequence,s=n.isFunction,u=n.isLambda,c=n.isIterable,l=n.getFunctionArity,p=n.isDeepEqual,f=n.stringToArray;function d(e,t,r){if(void 0!==e){var n=f(e),i=n.length;if(i+t<0&&(t=0),void 0!==r){if(r<=0)return"";var a=t>=0?t+r:i+t+r;return n.slice(t,a).join("")}return n.slice(t).join("")}}function h(e){if(void 0!==e)return f(e).length}function*v(e,t){var r=e.apply(this,[t]);if(c(r)&&(r=yield*r),r&&!("number"==typeof r.start||"number"===r.end||Array.isArray(r.groups)||s(r.next)))throw{code:"T1010",stack:Error().stack};return r}function g(e,t){if(void 0!==e){if(t){var r,n=e.toString().split("e");e=+(n[0]+"e"+(n[1]?+n[1]+t:t))}return .5===Math.abs((r=Math.round(e))-e)&&1===Math.abs(r%2)&&(r-=1),t&&(r=+((n=r.toString().split("e"))[0]+"e"+(n[1]?+n[1]-t:-t))),Object.is(r,-0)&&(r=0),r}}function y(t){if(void 0!==t){var r=!1;return Array.isArray(t)?1===t.length?r=y(t[0]):t.length>1&&(r=t.filter(function(e){return y(e)}).length>0):"string"==typeof t?t.length>0&&(r=!0):e(t)?0!==t&&(r=!0):null!==t&&"object"==typeof t?Object.keys(t).length>0&&(r=!0):"boolean"==typeof t&&!0===t&&(r=!0),r}}function m(e,t,r,n){var i=[t],a=l(e);return a>=2&&i.push(r),a>=3&&i.push(n),i}function b(e,t){return void 0===e?t:void 0===t?e:(Array.isArray(e)||(e=a(e)),Array.isArray(t)||(t=[t]),e.concat(t))}return{sum:function(e){if(void 0!==e){var t=0;return e.forEach(function(e){t+=e}),t}},count:function(e){return void 0===e?0:e.length},max:function(e){if(void 0!==e&&0!==e.length)return Math.max.apply(Math,e)},min:function(e){if(void 0!==e&&0!==e.length)return Math.min.apply(Math,e)},average:function(e){if(void 0!==e&&0!==e.length){var t=0;return e.forEach(function(e){t+=e}),t/e.length}},string:function(t,r=!1){if(void 0!==t){if("string"==typeof t)n=t;else if(s(t))n="";else if("number"!=typeof t||isFinite(t)){var n;Array.isArray(t)&&t.outerWrapper&&(t=t[0]),n=JSON.stringify(t,function(t,r){return null!=r&&r.toPrecision&&e(r)?Number(r.toPrecision(15)):r&&s(r)?"":r},r?2:0)}else throw{code:"D3001",value:t,stack:Error().stack};return n}},substring:d,substringBefore:function(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(0,r):e}},substringAfter:function(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(r+t.length):e}},lowercase:function(e){if(void 0!==e)return e.toLowerCase()},uppercase:function(e){if(void 0!==e)return e.toUpperCase()},length:h,trim:function(e){if(void 0!==e){var t=e.replace(/[ \t\n\r]+/gm," ");return" "===t.charAt(0)&&(t=t.substring(1))," "===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}},pad:function(e,t,r){if(void 0!==e){(void 0===r||0===r.length)&&(r=" ");var n,i=Math.abs(t)-h(e);if(i>0){var a=Array(i+1).join(r);r.length>1&&(a=d(a,0,i)),n=t>0?e+a:a+e}else n=e;return n}},match:function*(e,t,r){if(void 0!==e){if(r<0)throw{stack:Error().stack,value:r,code:"D3040",index:3};var n=a();if(void 0===r||r>0){var i=0,o=yield*v(t,e);if(void 0!==o)for(;void 0!==o&&(void 0===r||i<r);)n.push({match:o.match,index:o.start,groups:o.groups}),o=yield*v(o.next),i++}return n}},contains:function*(e,t){if(void 0!==e){if("string"==typeof t)r=-1!==e.indexOf(t);else{var r;r=void 0!==(yield*v(t,e))}return r}},replace:function*(e,t,r,n){if(void 0!==e){if(""===t)throw{code:"D3010",stack:Error().stack,value:t,index:2};if(n<0)throw{code:"D3011",stack:Error().stack,value:n,index:4};i="string"==typeof r?function(e){for(var t="",n=0,i=r.indexOf("$",n);-1!==i&&n<r.length;){t+=r.substring(n,i),n=i+1;var a,o=r.charAt(n);if("$"===o)t+="$",n++;else if("0"===o)t+=e.match,n++;else if(a=0===e.groups.length?1:Math.floor(Math.log(e.groups.length)*M
1ath.LOG10E)+1,i=parseInt(r.substring(n,n+a),10),a>1&&i>e.groups.length&&(i=parseInt(r.substring(n,n+a-1),10)),isNaN(i))t+="$";else{if(e.groups.length>0){var s=e.groups[i-1];void 0!==s&&(t+=s)}n+=i.toString().length}i=r.indexOf("$",n)}return t+r.substring(n)}:r;var i,a="",o=0;if(void 0===n||n>0){var s=0;if("string"==typeof t){for(var u=e.indexOf(t,o);-1!==u&&(void 0===n||s<n);)a+=e.substring(o,u)+r,o=u+t.length,s++,u=e.indexOf(t,o);a+=e.substring(o)}else{var l=yield*v(t,e);if(void 0!==l){for(;void 0!==l&&(void 0===n||s<n);){a+=e.substring(o,l.start);var p=i.apply(this,[l]);if(c(p)&&(p=yield*p),"string"==typeof p)a+=p;else throw{code:"D3012",stack:Error().stack,value:p};o=l.start+l.match.length,s++,l=yield*v(l.next)}a+=e.substring(o)}else a=e}}else a=e;return a}},split:function*(e,t,r){if(void 0!==e){if(r<0)throw{code:"D3020",stack:Error().stack,value:r,index:3};var n=[];if(void 0===r||r>0){if("string"==typeof t)n=e.split(t,r);else{var i=0,a=yield*v(t,e);if(void 0!==a){for(var o=0;void 0!==a&&(void 0===r||i<r);)n.push(e.substring(o,a.start)),o=a.end,a=yield*v(a.next),i++;(void 0===r||i<r)&&n.push(e.substring(o))}else n.push(e)}}return n}},join:function(e,t){if(void 0!==e)return void 0===t&&(t=""),e.join(t)},formatNumber:function(e,t,r){if(void 0!==e){var n,i,a,o,s={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&Object.keys(r).forEach(function(e){s[e]=r[e]});for(var u=[],c=s["zero-digit"].charCodeAt(0),l=c;l<c+10;l++)u.push(String.fromCharCode(l));var p=u.concat([s["decimal-separator"],s["exponent-separator"],s["grouping-separator"],s.digit,s["pattern-separator"]]),f=t.split(s["pattern-separator"]);if(f.length>2)throw{code:"D3080",stack:Error().stack};var d=f.map(function(e){var t,r,n,i,a=function(){for(var t,r=0;r<e.length;r++)if(t=e.charAt(r),-1!==p.indexOf(t)&&t!==s["exponent-separator"])return e.substring(0,r)}(),o=function(){for(var t,r=e.length-1;r>=0;r--)if(t=e.charAt(r),-1!==p.indexOf(t)&&t!==s["exponent-separator"])return e.substring(r+1)}(),u=e.substring(a.length,e.length-o.length),c=e.indexOf(s["exponent-separator"],a.length);-1===c||c>e.length-o.length?(t=u,r=void 0):(t=u.substring(0,c),r=u.substring(c+1));var l=t.indexOf(s["decimal-separator"]);return -1===l?(n=t,i=o):(n=t.substring(0,l),i=t.substring(l+1)),{prefix:a,suffix:o,activePart:u,mantissaPart:t,exponentPart:r,integerPart:n,fractionalPart:i,subpicture:e}});d.forEach(function(e){var t,r,n=e.subpicture,i=n.indexOf(s["decimal-separator"]);i!==n.lastIndexOf(s["decimal-separator"])&&(t="D3081"),n.indexOf(s.percent)!==n.lastIndexOf(s.percent)&&(t="D3082"),n.indexOf(s["per-mille"])!==n.lastIndexOf(s["per-mille"])&&(t="D3083"),-1!==n.indexOf(s.percent)&&-1!==n.indexOf(s["per-mille"])&&(t="D3084");var a=!1;for(r=0;r<e.mantissaPart.length;r++){var o=e.mantissaPart.charAt(r);if(-1!==u.indexOf(o)||o===s.digit){a=!0;break}}a||(t="D3085"),-1!==e.activePart.split("").map(function(e){return -1===p.indexOf(e)?"p":"a"}).join("").indexOf("p")&&(t="D3086"),-1!==i?(n.charAt(i-1)===s["grouping-separator"]||n.charAt(i+1)===s["grouping-separator"])&&(t="D3087"):e.integerPart.charAt(e.integerPart.length-1)===s["grouping-separator"]&&(t="D3088"),-1!==n.indexOf(s["grouping-separator"]+s["grouping-separator"])&&(t="D3089");var c=e.integerPart.indexOf(s.digit);-1!==c&&e.integerPart.substring(0,c).split("").filter(function(e){return u.indexOf(e)>-1}).length>0&&(t="D3090"),-1!==(c=e.fractionalPart.lastIndexOf(s.digit))&&e.fractionalPart.substring(c).split("").filter(function(e){return u.indexOf(e)>-1}).length>0&&(t="D3091");var l="string"==typeof e.exponentPart;if(l&&e.exponentPart.length>0&&(-1!==n.indexOf(s.percent)||-1!==n.indexOf(s["per-mille"]))&&(t="D3092"),l&&(0===e.exponentPart.length||e.exponentPart.split("").filter(function(e){return -1===u.indexOf(e)}).length>0)&&(t="D3093"),t)throw{code:t,stack:Error().stack}});var h=d.map(function(e){var t=function(t,r){for(var n=[],i=t.indexOf(s["grouping-separator"]);-1!==i;){var a=(r?t.substring(0,i):t.substring(i)).split("").filter(function(e){return -1!==u.indexOf(e)||e===s.digit}).length;n.push(a),i=e.integerPart.indexOf(s["grouping-separator"],i+1)}return n},r=t(e.integerPart),n=function(e){if(0===e.length)return 0;for(var t=function(e,r){return 0===r?e:t(r,e%r)},r=e.reduce(t),n=1;n<=e.length;n++)if(-1===e.indexOf(n*r))return 0;return r}(r),i=t(e.fractionalPart,!0),a=e.integerPart.split("").filter(function(e){return -1!==u.indexOf(e)}).length,o=a,c=e.fractionalPart.split(""),l=c.filter(function(e){return -1!==u.indexOf(e)}).length,p=c.filter(function(e){return -1!==u.indexOf(e)||e===s.digit}).length,f="string"==typeof e.exponentPart;0===a&&0===p&&(f?(l=1,p=1):a=1),f&&0===a&&-1!==e.integerPart.indexOf(s.digit)&&(a=1),0===a&&0===l&&(l=1);var d=0;return f&&(d=e.exponentPart.split("").filter(function(e){return -1!==u.indexOf(e)}).length),{integerPartGroupingPositions:r,regularGrouping:n,minimumIntegerPartSize:a,scalingFactor:o,prefix:e.prefix,fractionalPartGroupingPositions:i,minimumFactionalPartSize:l,maximumFactionalPartSize:p,minimumExponentSize:d,suffix:e.suffix,picture:e.subpicture}}),v=s["minus-sign"],y=s["zero-digit"],m=s["decimal-separator"],b=s["grouping-separator"];if(1===h.length&&(h.push(JSON.parse(JSON.stringify(h[0]))),h[1].prefix=v+h[1].prefix),i=-1!==(n=e>=0?h[0]:h[1]).picture.indexOf(s.percent)?100*e:-1!==n.picture.indexOf(s["per-mille"])?1e3*e:e,0===n.minimumExponentSize)a=i;else{var k=Math.pow(10,n.scalingFactor),x=Math.pow(10,n.scalingFactor-1);for(a=i,o=0;a<x;)a*=10,o-=1;for(;a>k;)a/=10,o+=1}var w=g(a,n.maximumFactionalPartSize),A=function(e,t){var r=Math.abs(e).toFixed(t);return"0"!==y&&(r=r.split("").map(function(e){return e>="0"&&e<="9"?u[e.charCodeAt(0)-48]:e}).join("")),r},E=A(w,n.maximumFactionalPartSize),D=E.indexOf(".");for(-1===D?E+=m:E=E.replace(".",m);E.charAt(0)===y;)E=E.substring(1);for(;E.charAt(E.length-1)===y;)E=E.substring(0,E.length-1);D=E.indexOf(m);var T=n.minimumIntegerPartSize-D,S=n.minimumFactionalPartSize-(E.length-D-1);if(D=(E=(T>0?Array(T+1).join(y):"")+E+(S>0?Array(S+1).join(y):"")).indexOf(m),n.regularGrouping>0)for(var O=Math.floor((D-1)/n.regularGrouping),P=1;P<=O;P++)E=[E.slice(0,D-P*n.regularGrouping),b,E.slice(D-P*n.regularGrouping)].join("");else n.integerPartGroupingPositions.forEach(function(e){E=[E.slice(0,D-e),b,E.slice(D-e)].join(""),D++});if(D=E.indexOf(m),n.fractionalPartGroupingPositions.forEach(function(e){E=[E.slice(0,e+D+1),b,E.slice(e+D+1)].join("")}),D=E.indexOf(m),(-1===n.picture.indexOf(m)||D===E.length-1)&&(E=E.substring(0,E.length-1)),void 0!==o){var M=A(o,0);(T=n.minimumExponentSize-M.length)>0&&(M=Array(T+1).join(y)+M),E=E+s["exponent-separator"]+(o<0?v:"")+M}return E=n.prefix+E+n.suffix}},formatBase:function(e,t){if(void 0!==e){if(e=g(e),(t=void 0===t?10:g(t))<2||t>36)throw{code:"D3100",stack:Error().stack,value:t};return e.toString(t)}},number:function(e){var t;if(void 0!==e){if("number"==typeof e)t=e;else if("string"==typeof e&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(e)&&!isNaN(parseFloat(e))&&isFinite(e))t=parseFloat(e);else if(!0===e)t=1;else if(!1===e)t=0;else throw{code:"D3030",value:e,stack:Error().stack,index:1};return t}},floor:function(e){if(void 0!==e)return Math.floor(e)},ceil:function(e){if(void 0!==e)return Math.ceil(e)}
1,round:g,abs:function(e){if(void 0!==e)return Math.abs(e)},sqrt:function(e){if(void 0!==e){if(e<0)throw{stack:Error().stack,code:"D3060",index:1,value:e};return Math.sqrt(e)}},power:function(e,t){var r;if(void 0!==e){if(!isFinite(r=Math.pow(e,t)))throw{stack:Error().stack,code:"D3061",index:1,value:e,exp:t};return r}},random:function(){return Math.random()},boolean:y,not:function(e){if(void 0!==e)return!y(e)},map:function*(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=m(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r}},zip:function(){for(var e=[],t=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,t.map(function(e){return Array.isArray(e)?e.length:0})),n=0;n<r;n++){var i=t.map(e=>e[n]);e.push(i)}return e},filter:function*(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=e[n],o=m(t,i,n,e);y((yield*t.apply(this,o)))&&r.push(i)}return r}},single:function*(e,t){if(void 0!==e){for(var r,n=!1,i=0;i<e.length;i++){var a=e[i],o=!0;if(void 0!==t){var s=m(t,a,i,e);o=y((yield*t.apply(this,s)))}if(o){if(n)throw{stack:Error().stack,code:"D3138",index:i};r=a,n=!0}}if(!n)throw{stack:Error().stack,code:"D3139"};return r}},foldLeft:function*(e,t,r){if(void 0!==e){var n,i,a=l(t);if(a<2)throw{stack:Error().stack,code:"D3050",index:1};for(void 0===r&&e.length>0?(n=e[0],i=1):(n=r,i=0);i<e.length;){var o=[n,e[i]];a>=3&&o.push(i),a>=4&&o.push(e),n=yield*t.apply(this,o),i++}return n}},sift:function*(e,t){var r={};for(var n in e){var i=e[n],a=m(t,i,n,e);y((yield*t.apply(this,a)))&&(r[n]=i)}return 0===Object.keys(r).length&&(r=void 0),r},keys:function e(t){var r=a();if(Array.isArray(t)){var n={};t.forEach(function(t){e(t).forEach(function(e){n[e]=!0})}),r=e(n)}else null===t||"object"!=typeof t||u(t)||Object.keys(t).forEach(e=>r.push(e));return r},lookup:function e(t,r){var n;if(Array.isArray(t)){n=a();for(var i=0;i<t.length;i++){var o=e(t[i],r);void 0!==o&&(Array.isArray(o)?o.forEach(e=>n.push(e)):n.push(o))}}else null!==t&&"object"==typeof t&&(n=t[r]);return n},append:b,exists:function(e){return void 0!==e},spread:function e(t){var r=a();if(Array.isArray(t))t.forEach(function(t){r=b(r,e(t))});else if(null===t||"object"!=typeof t||u(t))r=t;else for(var n in t){var i={};i[n]=t[n],r.push(i)}return r},merge:function(e){if(void 0!==e){var t={};return e.forEach(function(e){for(var r in e)t[r]=e[r]}),t}},reverse:function(e){if(void 0!==e){if(e.length<=1)return e;for(var t=e.length,r=Array(t),n=0;n<t;n++)r[t-n-1]=e[n];return r}},each:function*(e,t){var r=a();for(var n in e){var i=m(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r},error:function(e){throw{code:"D3137",stack:Error().stack,message:e||"$error() function evaluated"}},assert:function(e,t){if(!e)throw{code:"D3141",stack:Error().stack,message:t||"$assert() statement failed"}},type:function(t){return void 0===t?void 0:null===t?"null":e(t)?"number":"string"==typeof t?"string":"boolean"==typeof t?"boolean":Array.isArray(t)?"array":s(t)?"function":"object"},sort:function*(e,r){if(void 0!==e){if(e.length<=1)return e;if(void 0===r){if(!i(e)&&!t(e))throw{stack:Error().stack,code:"D3070",index:1};n=function*(e,t){return e>t}}else n=r;var n,a=function*(e,t){var r=function*(e,t,i){0===t.length?Array.prototype.push.apply(e,i):0===i.length?Array.prototype.push.apply(e,t):(yield*n(t[0],i[0]))?(e.push(i[0]),yield*r(e,t,i.slice(1))):(e.push(t[0]),yield*r(e,t.slice(1),i))},i=[];return yield*r(i,e,t),i},o=function*(e){if(!Array.isArray(e)||e.length<=1)return e;var t=Math.floor(e.length/2),r=e.slice(0,t),n=e.slice(t);return r=yield*o(r),n=yield*o(n),yield*a(r,n)};return yield*o(e)}},shuffle:function(e){if(void 0!==e){if(e.length<=1)return e;for(var t=Array(e.length),r=0;r<e.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(t[r]=t[n]),t[n]=e[r]}return t}},distinct:function(e){if(void 0!==e){if(!Array.isArray(e)||e.length<=1)return e;for(var t=o(e)?a():[],r=0;r<e.length;r++){for(var n=e[r],i=!1,s=0;s<t.length;s++)if(p(n,t[s])){i=!0;break}i||t.push(n)}return t}},base64encode:function(e){if(void 0!==e)return("undefined"!=typeof window?window.btoa:function(e){return new r.Buffer.from(e,"binary").toString("base64")})(e)},base64decode:function(e){if(void 0!==e)return("undefined"!=typeof window?window.atob:function(e){return new r.Buffer.from(e,"base64").toString("binary")})(e)},encodeUrlComponent:function(e){var t;if(void 0!==e){try{t=encodeURIComponent(e)}catch(t){throw{code:"D3140",stack:Error().stack,value:e,functionName:"encodeUrlComponent"}}return t}},encodeUrl:function(e){var t;if(void 0!==e){try{t=encodeURI(e)}catch(t){throw{code:"D3140",stack:Error().stack,value:e,functionName:"encodeUrl"}}return t}},decodeUrlComponent:function(e){var t;if(void 0!==e){try{t=decodeURIComponent(e)}catch(t){throw{code:"D3140",stack:Error().stack,value:e,functionName:"decodeUrlComponent"}}return t}},decodeUrl:function(e){var t;if(void 0!==e){try{t=decodeURI(e)}catch(t){throw{code:"D3140",stack:Error().stack,value:e,functionName:"decodeUrl"}}return t}}}})();t.exports=i}).call(this)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils":6}],3:[function(e,t,r){var n=e("./datetime"),i=e("./functions"),a=e("./utils"),o=e("./parser"),s=e("./signature"),u=function(){"use strict";var e=a.isNumeric,t=a.isArrayOfStrings,r=a.isArrayOfNumbers,u=a.createSequence,c=a.isSequence,l=a.isFunction,p=a.isLambda,f=a.isIterable,d=a.getFunctionArity,h=a.isDeepEqual,v=C(null);function*g(r,n,a){var o,s,f,d,v,T,P,j,U=a.lookup("__evaluate_entry");switch(U&&U(r,n,a),r.type){case"path":j=yield*function*(e,t,r){n=Array.isArray(t)&&"variable"!==e.steps[0].type?t:u(t);for(var n,i,a=!1,o=void 0,s=0;s<e.steps.length;s++){var l=e.steps[s];if(l.tuple&&(a=!0),0===s&&l.consarray?i=yield*g(l,n,r):a?o=yield*function*(e,t,r,n){if("sort"===e.type){if(r)i=yield*w(e,r,n);else{var i,a=yield*w(e,t,n);(i=u()).tupleStream=!0;for(var o=0;o<a.length;o++){var s={"@":a[o]};s[e.index]=o,i.push(s)}}
1return e.stages&&(i=yield*m(e.stages,i,n)),i}(i=u()).tupleStream=!0;var c=n;void 0===r&&(r=t.map(e=>({"@":e})));for(var l=0;l<r.length;l++){c=y(n,r[l]);var p=yield*g(e,r[l]["@"],c);if(void 0!==p){Array.isArray(p)||(p=[p]);for(var f=0;f<p.length;f++)Object.assign(s={},r[l]),p.tupleStream?Object.assign(s,p[f]):(e.focus?(s[e.focus]=p[f],s["@"]=r[l]["@"]):s["@"]=p[f],e.index&&(s[e.index]=f),e.ancestor&&(s[e.ancestor.label]=r[l]["@"])),i.push(s)}}return e.stages&&(i=yield*m(e.stages,i,n)),i}(l,n,o,r):i=yield*function*(e,t,r,n){if("sort"===e.type)return i=yield*w(e,t,r),e.stages&&(i=yield*m(e.stages,i,r)),i;i=u();for(var i,a=0;a<t.length;a++){var o=yield*g(e,t[a],r);if(e.stages)for(var s=0;s<e.stages.length;s++)o=yield*b(e.stages[s].expr,o,r);void 0!==o&&i.push(o)}var l=u();return n&&1===i.length&&Array.isArray(i[0])&&!c(i[0])?l=i[0]:i.forEach(function(e){!Array.isArray(e)||e.cons?l.push(e):e.forEach(e=>l.push(e))}),l}(l,n,r,s===e.steps.length-1),!a&&(void 0===i||0===i.length))break;void 0===l.focus&&(n=i)}if(a){if(e.tuple)i=o;else for(s=0,i=u();s<o.length;s++)i.push(o[s]["@"])}return e.keepSingletonArray&&(Array.isArray(i)&&i.cons&&!i.sequence&&(i=u(i)),i.keepSingleton=!0),e.hasOwnProperty("group")&&(i=yield*x(e.group,a?o:i,r)),i}(r,n,a);break;case"binary":j=yield*function*(t,r,n){var a,o,s,u=yield*g(t.lhs,r,n),c=t.value,l=function*(){return yield*g(t.rhs,r,n)};if("and"===c||"or"===c)try{return yield*function*(e,t,r){var n,i=k(e);switch(r){case"and":n=i&&k((yield*t()));break;case"or":n=i||k((yield*t()))}return n}(u,l,c)}catch(e){throw e.position=t.position,e.token=c,e}var p=yield*l();try{switch(c){case"+":case"-":case"*":case"/":case"%":s=function(t,r,n){var i;if(void 0!==t&&!e(t))throw{code:"T2001",stack:Error().stack,value:t};if(void 0!==r&&!e(r))throw{code:"T2002",stack:Error().stack,value:r};if(void 0===t||void 0===r)return i;switch(n){case"+":i=t+r;break;case"-":i=t-r;break;case"*":i=t*r;break;case"/":i=t/r;break;case"%":i=t%r}return i}(u,p,c);break;case"=":case"!=":s=function(e,t,r){var n,i=typeof t;if(void 0===e||"undefined"===i)return!1;switch(r){case"=":n=h(e,t);break;case"!=":n=!h(e,t)}return n}(u,p,c);break;case"<":case"<=":case">":case">=":s=function(e,t,r){var n,i=typeof e,a=typeof t;if(!("undefined"===i||"string"===i||"number"===i)||!("undefined"===a||"string"===a||"number"===a))throw{code:"T2010",stack:Error().stack,value:"string"===i||"number"===i?t:e};if("undefined"!==i&&"undefined"!==a){if(i!==a)throw{code:"T2009",stack:Error().stack,value:e,value2:t};switch(r){case"<":n=e<t;break;case"<=":n=e<=t;break;case">":n=e>t;break;case">=":n=e>=t}return n}}(u,p,c);break;case"&":a="",o="",void 0!==u&&(a=i.string(u)),void 0!==p&&(o=i.string(p)),s=a.concat(o);break;case"..":s=function(e,t){if(void 0!==e&&!Number.isInteger(e))throw{code:"T2003",stack:Error().stack,value:e};if(void 0!==t&&!Number.isInteger(t))throw{code:"T2004",stack:Error().stack,value:t};if(void 0===e||void 0===t||e>t)return r;var r,n=t-e+1;if(n>1e7)throw{code:"D2014",stack:Error().stack,value:n};r=Array(n);for(var i=e,a=0;i<=t;i++,a++)r[a]=i;return r.sequence=!0,r}(u,p);break;case"in":s=function(e,t){var r=!1;if(void 0===e||void 0===t)return!1;Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++)if(t[n]===e){r=!0;break}return r}(u,p)}}catch(e){throw e.position=t.position,e.token=c,e}return s}(r,n,a);break;case"unary":j=yield*function*(t,r,n){var a;switch(t.value){case"-":if(void 0===(a=yield*g(t.expression,r,n)))a=void 0;else if(e(a))a=-a;else throw{code:"D1002",stack:Error().stack,position:t.position,token:t.value,value:a};break;case"[":a=[];for(var o=0;o<t.expressions.length;o++){var s=t.expressions[o],u=yield*g(s,r,n);void 0!==u&&("["===s.value?a.push(u):a=i.append(a,u))}t.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=yield*x(t,r,n)}return a}(r,n,a);break;case"name":j=i.lookup(n,r.value);break;case"string":case"number":case"value":j=r.value;break;case"wildcard":o=n,s=u(),Array.isArray(o)&&o.outerWrapper&&o.length>0&&(o=o[0]),null!==o&&"object"==typeof o&&Object.keys(o).forEach(function(e){var t=o[e];Array.isArray(t)?(t=function e(t,r){return void 0===r&&(r=[]),Array.isArray(t)?t.forEach(function(t){e(t,r)}):r.push(t),r}(t),s=i.append(s,t)):s.push(t)}),j=s;break;
1case"descendant":d=u(),void 0!==n&&(function e(t,r){Array.isArray(t)||r.push(t),Array.isArray(t)?t.forEach(function(t){e(t,r)}):null!==t&&"object"==typeof t&&Object.keys(t).forEach(function(n){e(t[n],r)})}(n,d),f=1===d.length?d[0]:d),j=f;break;case"parent":j=a.lookup(r.slot.label);break;case"condition":j=yield*function*(e,t,r){var n,a=yield*g(e.condition,t,r);return i.boolean(a)?n=yield*g(e.then,t,r):void 0!==e.else&&(n=yield*g(e.else,t,r)),n}(r,n,a);break;case"block":j=yield*function*(e,t,r){for(var n,i=C(r),a=0;a<e.expressions.length;a++)n=yield*g(e.expressions[a],t,i);return n}(r,n,a);break;case"bind":j=yield*function*(e,t,r){var n=yield*g(e.rhs,t,r);return r.bind(e.lhs.value,n),n}(r,n,a);break;case"regex":v=new F.RegexEngine(r.value),j=T=function(e,t){v.lastIndex=t||0;var n,i=v.exec(e);if(null!==i){if(n={match:i[0],start:i.index,end:i.index+i[0].length,groups:[]},i.length>1)for(var a=1;a<i.length;a++)n.groups.push(i[a]);n.next=function(){if(!(v.lastIndex>=e.length)){var t=T(e,v.lastIndex);if(t&&""===t.match)throw{code:"D1004",stack:Error().stack,position:r.position,value:r.value.source};return t}}}return n};break;case"function":j=yield*E(r,n,a);break;case"variable":j=""===r.value?n&&n.outerWrapper?n[0]:n:a.lookup(r.value);break;case"lambda":P={_jsonata_lambda:!0,input:n,environment:a,arguments:r.arguments,signature:r.signature,body:r.body},!0===r.thunk&&(P.thunk=!0),P.apply=function*(e,t){return yield*D(P,t,n,e.environment)},j=P;break;case"partial":j=yield*function*(e,t,r){for(var n,i=[],a=0;a<e.arguments.length;a++){var o=e.arguments[a];"operator"===o.type&&"?"===o.value?i.push(o):i.push((yield*g(o,t,r)))}var s=yield*g(e.procedure,t,r);if(void 0===s&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1007",stack:Error().stack,position:e.position,token:e.procedure.steps[0].value};if(p(s))n=S(s,i);else if(s&&!0===s._jsonata_function)n=O(s.implementation,i);else if("function"==typeof s)n=O(s,i);else throw{code:"T1008",stack:Error().stack,position:e.position,token:"path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value};return n}(r,n,a);break;case"apply":j=yield*function*(e,t,r){var n,i=yield*g(e.lhs,t,r);if("function"===e.rhs.type)n=yield*E(e.rhs,t,r,{context:i});else{var a=yield*g(e.rhs,t,r);if(!l(a))throw{code:"T2006",stack:Error().stack,position:e.position,value:a};if(l(i)){var o=yield*g(A,null,r);n=yield*D(o,[i,a],null,r)}else n=yield*D(a,[i],null,r)}return n}(r,n,a);break;case"transform":j=M(function*(e){if(void 0!==e){var n=a.lookup("clone");if(!l(n))throw{code:"T2013",stack:Error().stack,position:r.position};var i=yield*D(n,[e],null,a),o=yield*g(r.pattern,i,a);if(void 0!==o){Array.isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var u=o[s];if(u&&(u.isPrototypeOf(i)||u instanceof Object.constructor))throw{code:"D1010",stack:Error().stack,position:r.position};var c=yield*g(r.update,u,a),p=typeof c;if("undefined"!==p){if("object"!==p||null===c||Array.isArray(c))throw{code:"T2011",stack:Error().stack,position:r.update.position,value:c};for(var f in c)u[f]=c[f]}if(void 0!==r.delete){var d=yield*g(r.delete,u,a);if(void 0!==d){var h=d;if(Array.isArray(d)||(d=[d]),!t(d))throw{code:"T2012",stack:Error().stack,position:r.delete.position,value:h};for(var v=0;v<d.length;v++)"object"==typeof u&&null!==u&&delete u[d[v]]}}}}return i}},"<(oa):o>")}if(a.async&&(null==j||"function"!=typeof j.then)&&(j=Promise.resolve(j)),a.async&&"function"==typeof j.then&&r.nextFunction&&"function"==typeof j[r.nextFunction]||(j=yield j),Object.prototype.hasOwnProperty.call(r,"predicate"))for(var N=0;N<r.predicate.length;N++)j=yield*b(r.predicate[N].expr,j,a);"path"!==r.type&&Object.prototype.hasOwnProperty.call(r,"group")&&(j=yield*x(r.group,j,a));var I=a.lookup("__evaluate_exit");return I&&I(r,n,a,j),j&&c(j)&&!j.tupleStream&&(r.keepArray&&(j.keepSingleton=!0),0===j.length?j=void 0:1===j.length&&(j=j.keepSingleton?j:j[0])),j}function y(e,t){var r=C(e);for(let e in t)r.bind(e,t[e]);return r}function*m(e,t,r){for(var n=t,i=0;i<e.length;i++){var a=e[i];switch(a.type){case"filter":n=yield*b(a.expr,n,r);break;case"index":for(var o=0;o<n.length;o++)n[o][a.value]=o}}return n}function*b(t,n,a){var o=u();if(n&&n.tupleStream&&(o.tupleStream=!0),Array.isArray(n)||(n=u(n)),"number"===t.type){var s=Math.floor(t.value);s<0&&(s=n.length+s);var c=n[s];void 0!==c&&(Array.isArray(c)?o=c:o.push(c))}else for(s=0;s<n.length;s++){var c=n[s],l=c,p=a;n.tupleStream&&(l=c["@"],p=y(a,c));var f=yield*g(t,l,p);e(f)&&(f=[f]),r(f)?f.forEach(function(e){var t=Math.floor(e);t<0&&(t=n.length+t),t===s&&o.push(c)}):i.boolean(f)&&o.push(c)}return o}function k(e){var t=i.boolean(e);return void 0!==t&&t}function*x(e,t,r){var n={},a={},o=!!t&&!!t.tupleStream;Array.isArray(t)||(t=u(t)),0===t.length&&t.push(void 0);for(var s=0;s<t.length;s++)for(var c=t[s],l=o?y(r,c):r,p=0;p<e.lhs.length;p++){var f=e.lhs[p],d=yield*g(f[0],o?c["@"]:c,l);if("string"!=typeof d&&void 0!==d)throw{code:"T1003",stack:Error().stack,position:e.position,value:d};if(void 0!==d){var h={data:c,exprIndex:p};if(a.hasOwnProperty(d)){if(a[d].exprIndex!==p)throw{code:"D1009",stack:Error().stack,position:e.position,value:d};a[d].data=i.append(a[d].data,c)}else a[d]=h}}for(d in a){var v=(h=a[d]).data,l=r;if(o){var m=function(e){if(!Array.isArray(e))return e;var t={};Object.assign(t,e[0]);for(var r=1;r<e.length;r++)for(let n in e[r])t[n]=i.append(t[n],e[r][n]);return t}(h.data);v=m["@"],delete m["@"],l=y(r,m)}var b=yield*g(e.lhs[h.exprIndex][1],v,l);void 0!==b&&(n[d]=b)}return n}function*w(e,t,r){var n=!!t.tupleStream,a=function*(t,i){for(var a=0,o=0;0===a&&o<e.terms.length;o++){var s=e.terms[o],u=t,c=r;n&&(u=t["@"],c=y(r,t));var l=yield*g(s.expression,u,c);u=i,c=r,n&&(u=i["@"],c=y(r,i));var p=yield*g(s.expression,u,c),f=typeof l,d=typeof p;if("undefined"===f){a="undefined"===d?0:1;continue}if("undefined"===d){a=-1;continue}if(!("string"===f||"number"===f)||!("string"===d||"number"===d))throw{code:"T2008",stack:Error().stack,position:e.position,value:"string"===f||"number"===f?p:l};if(f!==d)throw{code:"T2007",stack:Error().stack,position:e.position,value:l,value2:p};l!==p&&(a=l<p?-1:1,!0===s.descending&&(a=-a))}return 1===a};return yield*i.sort.apply({environment:r,input:t},[t,a])}var A=o("function($f, $g) { function($x){ $g($f($x)) } }");function*E(e,t,r,n){var i,a=yield*g(e.procedure,t,r);if(void 0===a&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1005",stack:Error().stack,position:e.position,token:e.procedure.steps[0].value};var o=[];void 0!==n&&o.push(n.context);for(var s=0;s<e.arguments.length;s++){let n=yield*g(e.arguments[s],t,r);if(l(n)){let e=function*(...e){return yield*D(n,e,null,r)};e.arity=d(n),o.push(e)}else o.push(n)}var u="path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value;try{"object"==typeof a&&(a.token=u,a.position=e.position),i=yield*D(a,o,t,r)}catch(t){throw t.position||(t.position=e.position),t.token||(t.token=u),t}return i}function*D(e,t,r,n){var i;for(i=yield*T(e,t,r,n);p(i)&&!0===i.thunk;){var a=yield*g(i.body.procedure,i.input,i.environment);"variable"===i.body.procedure.type&&(a.token=i.body.procedure.value),a.position=i.body.procedure.position;for(var o=[],s=0;s<i.body.arguments.length;s++)o.push((yield*g(i.body.arguments[s],i.input,i.environment)));i=yield*T(a,o,r,n)}return i}function*T(e,t,r,n){var i;try{var a,o=t;if(e&&(a=e.signature,o=void 0===a?t:a.validate(t,r)),p(e))i=yield*function*(e,t){var r=C(e.environment);
1return e.arguments.forEach(function(e,n){r.bind(e.value,t[n])}),"function"==typeof e.body?yield*function*(e,t){var r=P(e).map(function(e){return t.lookup(e.trim())}),n=e.apply({environment:t},r);return f(n)&&(n=yield*n),n}(e.body,r):yield*g(e.body,e.input,r)}(e,o);else if(e&&!0===e._jsonata_function)i=e.implementation.apply({environment:n,input:r},o),f(i)&&(i=yield*i);else if("function"==typeof e)i=e.apply(r,o),f(i)&&(i=yield*i);else throw{code:"T1006",stack:Error().stack}}catch(t){throw e&&(void 0===t.token&&void 0!==e.token&&(t.token=e.token),t.position=e.position||t.position),t}return i}function S(e,t){var r=C(e.environment),n=[];return e.arguments.forEach(function(e,i){var a=t[i];a&&"operator"===a.type&&"?"===a.value?n.push(e):r.bind(e.value,a)}),{_jsonata_lambda:!0,input:e.input,environment:r,arguments:n,body:e.body}}function O(e,t){var r=P(e),n=o("function("+(r=r.map(function(e){return"$"+e.trim()})).join(", ")+"){ _ }");return n.body=e,S(n,t)}function P(e){var t=e.toString();return/\(([^)]*)\)/.exec(t)[1].split(",")}function M(e,t){var r={_jsonata_function:!0,implementation:e};return void 0!==t&&(r.signature=s(t)),r}function C(e){var t={};return{bind:function(e,r){t[e]=r},lookup:function(r){var n;return t.hasOwnProperty(r)?n=t[r]:e&&(n=e.lookup(r)),n},timestamp:e?e.timestamp:null,async:!!e&&e.async,global:e?e.global:{ancestry:[null]}}}v.bind("sum",M(i.sum,"<a<n>:n>")),v.bind("count",M(i.count,"<a:n>")),v.bind("max",M(i.max,"<a<n>:n>")),v.bind("min",M(i.min,"<a<n>:n>")),v.bind("average",M(i.average,"<a<n>:n>")),v.bind("string",M(i.string,"<x-b?:s>")),v.bind("substring",M(i.substring,"<s-nn?:s>")),v.bind("substringBefore",M(i.substringBefore,"<s-s:s>")),v.bind("substringAfter",M(i.substringAfter,"<s-s:s>")),v.bind("lowercase",M(i.lowercase,"<s-:s>")),v.bind("uppercase",M(i.uppercase,"<s-:s>")),v.bind("length",M(i.length,"<s-:n>")),v.bind("trim",M(i.trim,"<s-:s>")),v.bind("pad",M(i.pad,"<s-ns?:s>")),v.bind("match",M(i.match,"<s-f<s:o>n?:a<o>>")),v.bind("contains",M(i.contains,"<s-(sf):b>")),v.bind("replace",M(i.replace,"<s-(sf)(sf)n?:s>")),v.bind("split",M(i.split,"<s-(sf)n?:a<s>>")),v.bind("join",M(i.join,"<a<s>s?:s>")),v.bind("formatNumber",M(i.formatNumber,"<n-so?:s>")),v.bind("formatBase",M(i.formatBase,"<n-n?:s>")),v.bind("formatInteger",M(n.formatInteger,"<n-s:s>")),v.bind("parseInteger",M(n.parseInteger,"<s-s:n>")),v.bind("number",M(i.number,"<(nsb)-:n>")),v.bind("floor",M(i.floor,"<n-:n>")),v.bind("ceil",M(i.ceil,"<n-:n>")),v.bind("round",M(i.round,"<n-n?:n>")),v.bind("abs",M(i.abs,"<n-:n>")),v.bind("sqrt",M(i.sqrt,"<n-:n>")),v.bind("power",M(i.power,"<n-n:n>")),v.bind("random",M(i.random,"<:n>")),v.bind("boolean",M(i.boolean,"<x-:b>")),v.bind("not",M(i.not,"<x-:b>")),v.bind("map",M(i.map,"<af>")),v.bind("zip",M(i.zip,"<a+>")),v.bind("filter",M(i.filter,"<af>")),v.bind("single",M(i.single,"<af?>")),v.bind("reduce",M(i.foldLeft,"<afj?:j>")),v.bind("sift",M(i.sift,"<o-f?:o>")),v.bind("keys",M(i.keys,"<x-:a<s>>")),v.bind("lookup",M(i.lookup,"<x-s:x>")),v.bind("append",M(i.append,"<xx:a>")),v.bind("exists",M(i.exists,"<x:b>")),v.bind("spread",M(i.spread,"<x-:a<o>>")),v.bind("merge",M(i.merge,"<a<o>:o>")),v.bind("reverse",M(i.reverse,"<a:a>")),v.bind("each",M(i.each,"<o-f:a>")),v.bind("error",M(i.error,"<s?:x>")),v.bind("assert",M(i.assert,"<bs?:x>")),v.bind("type",M(i.type,"<x:s>")),v.bind("sort",M(i.sort,"<af?:a>")),v.bind("shuffle",M(i.shuffle,"<a:a>")),v.bind("distinct",M(i.distinct,"<x:x>")),v.bind("base64encode",M(i.base64encode,"<s-:s>")),v.bind("base64decode",M(i.base64decode,"<s-:s>")),v.bind("encodeUrlComponent",M(i.encodeUrlComponent,"<s-:s>")),v.bind("encodeUrl",M(i.encodeUrl,"<s-:s>")),v.bind("decodeUrlComponent",M(i.decodeUrlComponent,"<s-:s>")),v.bind("decodeUrl",M(i.decodeUrl,"<s-:s>")),v.bind("eval",M(function*(e,t){if(void 0!==e){var r=this.input;void 0!==t&&Array.isArray(r=t)&&!c(r)&&((r=u(r)).outerWrapper=!0);try{var n=o(e,!1)}catch(e){throw U(e),{stack:Error().stack,code:"D3120",value:e.message,error:e}}try{var i=yield*g(n,r,this.environment)}catch(e){throw U(e),{stack:Error().stack,code:"D3121",value:e.message,error:e}}return i}},"<sx?:x>")),v.bind("toMillis",M(n.toMillis,"<s-s?:n>")),v.bind("fromMillis",M(n.fromMillis,"<n-s?s?:s>")),v.bind("clone",M(function(e){if(void 0!==e)return JSON.parse(i.string(e))}
1,"<(oa)-:o>"));var j={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",D1010:"Attempted to access the Javascript object prototype",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function.  This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6.  Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of str
1ings or an array of numbers.  Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36.  It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result.  Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result.  Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function U(e){var t=j[e.code];if(void 0!==t){var r=t.replace(/\{\{\{([^}]+)}}}/g,function(){return e[arguments[1]]});r=r.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(e[arguments[1]])}),e.message=r}}function F(e,t){try{i=(r=o(e,t&&t.recover)).errors,delete r.errors}catch(e){throw U(e),e}var r,i,a=C(v),s=new Date;return a.bind("now",M(function(e,t){return n.fromMillis(s.getTime(),e,t)},"<s?s?:s>")),a.bind("millis",M(function(){return s.getTime()},"<:n>")),t&&t.RegexEngine?F.RegexEngine=t.RegexEngine:F.RegexEngine=RegExp,{evaluate:function(e,t,n){if(void 0!==i){var o,l,p,f={code:"S0500",position:0};throw U(f),f}if(void 0!==t)for(var d in o=C(a),t)o.bind(d,t[d]);else o=a;if(o.bind("$",e),s=new Date,o.timestamp=s,Array.isArray(e)&&!c(e)&&((e=u(e)).outerWrapper=!0),"function"==typeof n){o.async=!0;var h=function(e){U(e),n(e,null)},v=function(e){(l=p.next(e)).done?n(null,l.value):l.value.then(v).catch(h)};(l=(p=g(r,e,o)).next()).value.then(v).catch(h)}else try{for(l=(p=g(r,e,o)).next();!l.done;)l=p.next(l.value);return l.value}catch(e){throw U(e),e}},assign:function(e,t){a.bind(e,t)},registerFunction:function(e,t,r){var n=M(t,r);a.bind(e,n)},ast:function(){return r},errors:function(){return i}}}return F.parser=o,F}();t.exports=u},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(e,t,r){var n,i,a,o=e("./signature");let s=(n={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"	"},a=function(e){var t=0,r=e.length,a=function(e,r){return{type:e,value:r,position:t}},o=function(){for(var n,i=t,a=0;t<r;){var o=e.charAt(t);if("/"===o&&"\\"!==e.charAt(t-1)&&0===a){if(""===(n=e.substring(i,t)))throw{code:"S0301",stack:Error().stack,position:t};for(t++,o=e.charAt(t),i=t;"i"===o||"m"===o;)t++,o=e.charAt(t);return RegExp(n,e.substring(i,t)+"g")}("("===o||"["===o||"{"===o)&&"\\"!==e.charAt(t-1)&&a++,(")"===o||"]"===o||"}"===o)&&"\\"!==e.charAt(t-1)&&a--,t++}throw{code:"S0302",stack:Error().stack,position:t}},s=function(u){if(t>=r)return null;for(var c,l,p=e.charAt(t);t<r&&" 	\n\r\v".indexOf(p)>-1;)t++,p=e.charAt(t);if("/"===p&&"*"===e.charAt(t+1)){var f=t;for(t+=2,p=e.charAt(t);!("*"===p&&"/"===e.charAt(t+1));)if(p=e.charAt(++t),t>=r)throw{code:"S0106",stack:Error().stack,position:f};return t+=2,p=e.charAt(t),s(u)}if(!0!==u&&"/"===p)return t++,a("regex",o());if("."===p&&"."===e.charAt(t+1))return t+=2,a("operator","..");if(":"===p&&"="===e.charAt(t+1))return t+=2,a("operator",":=");if("!"===p&&"="===e.charAt(t+1))return t+=2,a("operator","!=");if(">"===p&&"="===e.charAt(t+1))return t+=2,a("operator",">=");
1if("<"===p&&"="===e.charAt(t+1))return t+=2,a("operator","<=");if("*"===p&&"*"===e.charAt(t+1))return t+=2,a("operator","**");if("~"===p&&">"===e.charAt(t+1))return t+=2,a("operator","~>");if(Object.prototype.hasOwnProperty.call(n,p))return t++,a("operator",p);if('"'===p||"'"===p){var d=p;t++;for(var h="";t<r;){if("\\"===(p=e.charAt(t))){if(t++,p=e.charAt(t),Object.prototype.hasOwnProperty.call(i,p))h+=i[p];else if("u"===p){var v=e.substr(t+1,4);if(/^[0-9a-fA-F]+$/.test(v))h+=String.fromCharCode(parseInt(v,16)),t+=4;else throw{code:"S0104",stack:Error().stack,position:t}}else throw{code:"S0103",stack:Error().stack,position:t,token:p}}else{if(p===d)return t++,a("string",h);h+=p}t++}throw{code:"S0101",stack:Error().stack,position:t}}var g=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(e.substring(t));if(null!==g){var y=parseFloat(g[0]);if(!isNaN(y)&&isFinite(y))return t+=g[0].length,a("number",y);throw{code:"S0102",stack:Error().stack,position:t,token:g[0]}}if("`"===p){t++;var m=e.indexOf("`",t);if(-1!==m)return c=e.substring(t,m),t=m+1,a("name",c);throw t=r,{code:"S0105",stack:Error().stack,position:t}}for(var b=t;;)if(l=e.charAt(b),b===r||" 	\n\r\v".indexOf(l)>-1||Object.prototype.hasOwnProperty.call(n,l)){if("$"===e.charAt(t))return c=e.substring(t+1,b),t=b,a("variable",c);switch(c=e.substring(t,b),t=b,c){case"or":case"in":case"and":return a("operator",c);case"true":return a("value",!0);case"false":return a("value",!1);case"null":return a("value",null);default:if(t===r&&""===c)return null;return a("name",c)}}else b++};return s},function(e,t){var r,i,s={},u=[],c=function(){var e=[];"(end)"!==r.id&&e.push({type:r.type,value:r.value,position:r.position});for(var t=i();null!==t;)e.push(t),t=i();return e},l={nud:function(){var e={code:"S0211",token:this.value,position:this.position};if(t)return e.remaining=c(),e.type="error",u.push(e),e;throw e.stack=Error().stack,e}},p=function(e,t){var r=s[e];return t=t||0,r?t>=r.lbp&&(r.lbp=t):((r=Object.create(l)).id=r.value=e,r.lbp=t,s[e]=r),r},f=function(e){if(t)return e.remaining=c(),u.push(e),(r=Object.create(s["(error)"])).error=e,r.type="(error)",r;throw e.stack=Error().stack,e},d=function(t,n){if(t&&r.id!==t){var a;return f({code:"(end)"===r.id?"S0203":"S0202",position:r.position,token:r.value,value:t})}var o=i(n);if(null===o)return(r=s["(end)"]).position=e.length,r;var u=o.value,c=o.type;switch(c){case"name":case"variable":a=s["(name)"];break;case"operator":if(!(a=s[u]))return f({code:"S0204",stack:Error().stack,position:o.position,token:u});break;case"string":case"number":case"value":a=s["(literal)"];break;case"regex":c="regex",a=s["(regex)"];break;default:return f({code:"S0205",stack:Error().stack,position:o.position,token:u})}return(r=Object.create(a)).value=u,r.type=c,r.position=o.position,r},h=function(e){var t,n=r;for(d(null,!0),t=n.nud();e<r.lbp;)n=r,d(),t=n.led(t);return t},v=function(e){p(e,0).nud=function(){return this}},g=function(e,t,r){var i=t||n[e],a=p(e,i);return a.led=r||function(e){return this.lhs=e,this.rhs=h(i),this.type="binary",this},a},y=function(e,t,r){var n=p(e,t);return n.led=r,n},m=function(e,t){var r=p(e);return r.nud=t||function(){return this.expression=h(70),this.type="unary",this},r};v("(end)"),v("(name)"),v("(literal)"),v("(regex)"),p(":"),p(";"),p(","),p(")"),p("]"),p("}"),p(".."),g("."),g("+"),g("-"),g("*"),g("/"),g("%"),g("="),g("<"),g(">"),g("!="),g("<="),g(">="),g("&"),g("and"),g("or"),g("in"),v("and"),v("or"),v("in"),m("-"),g("~>"),y("(error)",10,function(e){return this.lhs=e,this.error=r.error,this.remaining=c(),this.type="error",this}),m("*",function(){return this.type="wildcard",this}),m("**",function(){return this.type="descendant",this}),m("%",function(){return this.type="parent",this}),g("(",n["("],function(e){if(this.procedure=e,this.type="function",this.arguments=[],")"!==r.id)for(;"operator"===r.type&&"?"===r.id?(this.type="partial",this.arguments.push(r),d("?")):this.arguments.push(h(0)),","===r.id;)d(",");if(d(")",!0),"name"===e.type&&("function"===e.value||"λ"===e.value)){if(this.arguments.forEach(function(e,t){if("variable"!==e.type)return f({code:"S0208",stack:Error().stack,position:e.position,token:e.value,value:t+1})}),this.type="lambda","<"===r.id){for(var t=r.position,n=1,i="<";n>
10&&"{"!==r.id&&"(end)"!==r.id;){var a=d();">"===a.id?n--:"<"===a.id&&n++,i+=a.value}d(">");try{this.signature=o(i)}catch(e){return e.position=t+e.offset,f(e)}}d("{"),this.body=h(0),d("}")}return this}),m("(",function(){for(var e=[];")"!==r.id&&(e.push(h(0)),";"===r.id);)d(";");return d(")",!0),this.type="block",this.expressions=e,this}),m("[",function(){var e=[];if("]"!==r.id)for(;;){var t=h(0);if(".."===r.id){var n={type:"binary",value:"..",position:r.position,lhs:t};d(".."),n.rhs=h(0),t=n}if(e.push(t),","!==r.id)break;d(",")}return d("]",!0),this.expressions=e,this.type="unary",this}),g("[",n["["],function(e){if("]"!==r.id)return this.lhs=e,this.rhs=h(n["]"]),this.type="binary",d("]",!0),this;for(var t=e;t&&"binary"===t.type&&"["===t.value;)t=t.lhs;return t.keepArray=!0,d("]"),e}),g("^",n["^"],function(e){d("(");for(var t=[];;){var n={descending:!1};if("<"===r.id?d("<"):">"===r.id&&(n.descending=!0,d(">")),n.expression=h(0),t.push(n),","!==r.id)break;d(",")}return d(")"),this.lhs=e,this.rhs=t,this.type="binary",this});var b=function(e){var t=[];if("}"!==r.id)for(;;){var n=h(0);d(":");var i=h(0);if(t.push([n,i]),","!==r.id)break;d(",")}return d("}",!0),void 0===e?(this.lhs=t,this.type="unary"):(this.lhs=e,this.rhs=t,this.type="binary"),this};m("{",b),g("{",n["{"],b),y(":=",n[":="],function(e){return"variable"!==e.type?f({code:"S0212",stack:Error().stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=h(n[":="]-1),this.type="binary",this)}),g("@",n["@"],function(e){return(this.lhs=e,this.rhs=h(n["@"]),"variable"!==this.rhs.type)?f({code:"S0214",stack:Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),g("#",n["#"],function(e){return(this.lhs=e,this.rhs=h(n["#"]),"variable"!==this.rhs.type)?f({code:"S0214",stack:Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),g("?",n["?"],function(e){return this.type="condition",this.condition=e,this.then=h(0),":"===r.id&&(d(":"),this.else=h(0)),this}),m("|",function(){return this.type="transform",this.pattern=h(0),d("|"),this.update=h(0),","===r.id&&(d(","),this.delete=h(0)),d("|"),this});var k=function(e){var t;if("function"!==e.type||e.predicate){if("condition"===e.type)e.then=k(e.then),void 0!==e.else&&(e.else=k(e.else)),t=e;else if("block"===e.type){var r=e.expressions.length;r>0&&(e.expressions[r-1]=k(e.expressions[r-1])),t=e}else t=e}else{var n={type:"lambda",thunk:!0,arguments:[],position:e.position};n.body=e,t=n}return t},x=0,w=0,A=[],E=function(e,t){switch(e.type){case"name":case"wildcard":t.level--,0===t.level&&(void 0===e.ancestor||(A[t.index].slot.label=e.ancestor.label),e.ancestor=t,e.tuple=!0);break;case"parent":t.level++;break;case"block":e.expressions.length>0&&(e.tuple=!0,t=E(e.expressions[e.expressions.length-1],t));break;case"path":e.tuple=!0;var r=e.steps.length-1;for(t=E(e.steps[r--],t);t.level>0&&r>=0;)t=E(e.steps[r--],t);break;default:throw{code:"S0217",token:e.type,position:e.position}}return t},D=function(e,t){if(void 0!==t.seekingParent||"parent"===t.type){var r=void 0!==t.seekingParent?t.seekingParent:[];"parent"===t.type&&r.push(t.slot),void 0===e.seekingParent?e.seekingParent=r:Array.prototype.push.apply(e.seekingParent,r)}},T=function(e){var t=e.steps.length-1,r=e.steps[t],n=void 0!==r.seekingParent?r.seekingParent:[];"parent"===r.type&&n.push(r.slot);for(var i=0;i<n.length;i++){var a=n[i];for(t=e.steps.length-2;a.level>0;){if(t<0){void 0===e.seekingParent?e.seekingParent=[a]:e.seekingParent.push(a);break}for(var o=e.steps[t--];t>=0&&o.focus&&e.steps[t].focus;)o=e.steps[t--];a=E(o,a)}}},S=function(e){var r;switch(e.type){case"binary":switch(e.value){case".":var n=S(e.lhs);r="path"===n.type?n:{type:"path",steps:[n]},"parent"===n.type&&(r.seekingParent=[n.slot]);var i=S(e.rhs);"function"===i.type&&"path"===i.procedure.type&&1===i.procedure.steps.length&&"name"===i.procedure.steps[0].type&&"function"===r.steps[r.steps.length-1].type&&(r.steps[r.steps.length-1].nextFunction=i.procedure.steps[0].value),"path"===i.type?Array.prototype.push.apply(r.steps,i.steps):(void 0!==i.predicate&&(i.stages=i.predicate,delete i.predicate),r.steps.push(i)),r.steps.filter(function(e){if("number"===e.type||"value"===e.type)throw{code:"S0213",stack:Error().stack,position:e.position,value:e.value};return"string"===e.type}
1).forEach(function(e){e.type="name"}),r.steps.filter(function(e){return!0===e.keepArray}).length>0&&(r.keepSingletonArray=!0);var a=r.steps[0];"unary"===a.type&&"["===a.value&&(a.consarray=!0);var o=r.steps[r.steps.length-1];"unary"===o.type&&"["===o.value&&(o.consarray=!0),T(r);break;case"[":var s=r=S(e.lhs),c="predicate";if("path"===r.type&&(s=r.steps[r.steps.length-1],c="stages"),void 0!==s.group)throw{code:"S0209",stack:Error().stack,position:e.position};void 0===s[c]&&(s[c]=[]);var l=S(e.rhs);void 0!==l.seekingParent&&(l.seekingParent.forEach(e=>{1===e.level?E(s,e):e.level--}),D(s,l)),s[c].push({type:"filter",expr:l,position:e.position});break;case"{":if(void 0!==(r=S(e.lhs)).group)throw{code:"S0210",stack:Error().stack,position:e.position};r.group={lhs:e.rhs.map(function(e){return[S(e[0]),S(e[1])]}),position:e.position};break;case"^":"path"!==(r=S(e.lhs)).type&&(r={type:"path",steps:[r]});var p={type:"sort",position:e.position};p.terms=e.rhs.map(function(e){var t=S(e.expression);return D(p,t),{descending:e.descending,expression:t}}),r.steps.push(p),T(r);break;case":=":(r={type:"bind",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),D(r,r.rhs);break;case"@":if(s=r=S(e.lhs),"path"===r.type&&(s=r.steps[r.steps.length-1]),void 0!==s.stages||void 0!==s.predicate)throw{code:"S0215",stack:Error().stack,position:e.position};if("sort"===s.type)throw{code:"S0216",stack:Error().stack,position:e.position};e.keepArray&&(s.keepArray=!0),s.focus=e.rhs.value,s.tuple=!0;break;case"#":s=r=S(e.lhs),"path"===r.type?s=r.steps[r.steps.length-1]:(r={type:"path",steps:[r]},void 0!==s.predicate&&(s.stages=s.predicate,delete s.predicate)),void 0===s.stages?s.index=e.rhs.value:s.stages.push({type:"index",value:e.rhs.value,position:e.position}),s.tuple=!0;break;case"~>":(r={type:"apply",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs);break;default:(r={type:e.type,value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),D(r,r.lhs),D(r,r.rhs)}break;case"unary":r={type:e.type,value:e.value,position:e.position},"["===e.value?r.expressions=e.expressions.map(function(e){var t=S(e);return D(r,t),t}):"{"===e.value?r.lhs=e.lhs.map(function(e){var t=S(e[0]);D(r,t);var n=S(e[1]);return D(r,n),[t,n]}):(r.expression=S(e.expression),"-"===e.value&&"number"===r.expression.type?(r=r.expression).value=-r.value:D(r,r.expression));break;case"function":case"partial":(r={type:e.type,name:e.name,value:e.value,position:e.position}).arguments=e.arguments.map(function(e){var t=S(e);return D(r,t),t}),r.procedure=S(e.procedure);break;case"lambda":r={type:e.type,arguments:e.arguments,signature:e.signature,position:e.position};var f=S(e.body);r.body=k(f);break;case"condition":(r={type:e.type,position:e.position}).condition=S(e.condition),D(r,r.condition),r.then=S(e.then),D(r,r.then),void 0!==e.else&&(r.else=S(e.else),D(r,r.else));break;case"transform":(r={type:e.type,position:e.position}).pattern=S(e.pattern),r.update=S(e.update),void 0!==e.delete&&(r.delete=S(e.delete));break;case"block":(r={type:e.type,position:e.position}).expressions=e.expressions.map(function(e){var t=S(e);return D(r,t),(t.consarray||"path"===t.type&&t.steps[0].consarray)&&(r.consarray=!0),t});break;case"name":r={type:"path",steps:[e]},e.keepArray&&(r.keepSingletonArray=!0);break;case"parent":r={type:"parent",slot:{label:"!"+x++,level:1,index:w++}},A.push(r);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":r=e;break;case"operator":if("and"===e.value||"or"===e.value||"in"===e.value)e.type="name",r=S(e);else if("?"===e.value)r=e;else throw{code:"S0201",stack:Error().stack,position:e.position,token:e.value};break;case"error":r=e,e.lhs&&(r=S(e.lhs));break;default:var d="S0206";"(end)"===e.id&&(d="S0207");var h={code:d,position:e.position,token:e.value};if(t)return u.push(h),{type:"error",error:h};throw h.stack=Error().stack,h}return e.keepArray&&(r.keepArray=!0),r};i=a(e),d();var O=h(0);if("(end)"!==r.id&&f({code:"S0201",position:r.position,token:r.value}),"parent"===(O=S(O)).type||void 0!==O.seekingParent)throw{code:"S0217",token:O.type,position:O.position};return u.length>0&&(O.errors=u),O});t.exports=s},{"./signature":5}],5:[function(e,t,r){var n,i=e("./utils");let a=(n={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"},function(e){for(var t=1,r=[],a={},o=a;t<e.length;){var s=e.charAt(t);if(":"===s)break;var u=function(){r.push(a),o=a,a={}},c=function(e,t,r,n){for(var i=1,a=t;a<e.length;)if(a++,(s=e.charAt(a))===n){if(0==--i)break}else s===r&&i++;return a};switch(s){case"s":case"n":case"b":case"l":case"o":a.regex="["+s+"m]",a.type=s,u();break;case"a":a.regex="[asnblfom]",a.type=s,a.array=!0,u();break;case"f":a.regex="f",a.type=s,u();break;case"j":a.regex="[asnblom]",a.type=s,u();break;case"x":a.regex="[asnblfom]",a.type=s,u();break;case"-":o.context=!0,o.contextRegex=new RegExp(o.regex),o.regex+="?";break;case"?":case"+":o.regex+=s;break;case"(":var l=c(e,t,"(",")"),p=e.substring(t+1,l);if(-1===p.indexOf("<"))a.regex="["+p+"m]";else throw{code:"S0402",stack:Error().stack,value:p,offset:t};a.type="("+p+")",t=l,u();break;case"<":if("a"===o.type||"f"===o.type){var f=c(e,t,"<",">");o.subtype=e.substring(t+1,f),t=f}else throw{code:"S0401",stack:Error().stack,value:o.type,offset:t}}t++}var d=RegExp("^"+r.map(function(e){return"("+e.regex+")"}).join("")+"$"),h=function(e){var t;if(i.isFunction(e))t="f";else switch(typeof e){case"string":t="s";break;case"number":t="n";break;case"boolean":t="b";break;case"object":t=null===e?"l":Array.isArray(e)?"a":"o";break;default:t="m"}return t},v=function(e,t){for(var n="^",i=0,a=0;a<r.length;a++){n+=r[a].regex;var o=t.match(n);if(null===o)break;i=o[0].length}throw{code:"T0410",stack:Error().stack,value:e[i],index:i+1}};return{definition:e,validate:function(e,t){var i="";e.forEach(function(e){i+=h(e)});var a=d.exec(i);if(a){var o=[],s=0;return r.forEach(function(r,i){var u=e[s],c=a[i+1];if(""===c){if(r.context&&r.contextRegex){var l=h(t);if(r.contextRegex.test(l))o.push(t);else throw{code:"T0411",stack:Error().stack,value:t,index:s+1}}else o.push(u),s++}else c.split("").forEach(function(t){if("a"===r.type){if("m"===t)u=void 0;else{u=e[s];var i=!0;if(void 0!==r.subtype){if("a"!==t&&c!==r.subtype)i=!1;else if("a"===t&&u.length>0){var a=h(u[0]);i=a===r.subtype.charAt(0)&&0===u.filter(function(e){return h(e)!==a}).length}}if(!i)throw{code:"T0412",stack:Error().stack,value:u,index:s+1,type:n[r.subtype]};"a"!==t&&(u=[u])}o.push(u),s++}else o.push(u),s++})}),o}v(e,i)}}});t.exports=a},{"./utils":6}],6:[function(e,t,r){let n=(()=>{"use strict";function e(e){var t=!1;if("number"==typeof e&&(t=!isNaN(e))&&!isFinite(e))throw{code:"D1001",value:e,stack:Error().stack};return t}var t=("function"==typeof Symbol?Symbol:{}).iterator||"@@iterator";return{isNumeric:e,isArrayOfStrings:function(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter(function(e){return"string"!=typeof e}).length),t},isArrayOfNumbers:function(t){var r=!1;return Array.isArray(t)&&(r=0===t.filter(function(t){return!e(t)}).length),r},createSequence:function(){var e=[];return e.sequence=!0,1==arguments.length&&e.push(arguments[0]),e},isSequence:function(e){return!0===e.sequence&&Array.isArray(e)},isFunction:function(e){return e&&(!0===e._jsonata_function||!0===e._jsonata_lambda)||"function"==typeof e},isLambda:function(e){return e&&!0===e._jsonata_lambda},isIterable:function(e){return"object"==typeof e&&null!==e&&t in e&&"next"in e&&"function"==typeof e.next},getFunctionArity:function(e){return"number"==typeof e.arity?e.arity:"function"==typeof e.implementation?e.implementation.length:"number"==typeof e.length?e.length:e.arguments.length},isDeepEqual:function e(t,r){if(t===r)return!0;
1if("object"==typeof t&&"object"==typeof r&&null!==t&&null!==r){if(Array.isArray(t)&&Array.isArray(r)){if(t.length!==r.length)return!1;for(var n=0;n<t.length;n++)if(!e(t[n],r[n]))return!1;return!0}var i=Object.getOwnPropertyNames(t),a=Object.getOwnPropertyNames(r);if(i.length!==a.length)return!1;for(n=0,i=i.sort(),a=a.sort();n<i.length;n++)if(i[n]!==a[n])return!1;for(n=0;n<i.length;n++){var o=i[n];if(!e(t[o],r[o]))return!1}return!0}return!1},stringToArray:function(e){var t=[];for(let r of e)t.push(r);return t}}})();t.exports=n},{}]},{},[3])(3)},e.exports=n()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.